Android Debug Bridge

Also known as: ADB · adb

On this page 7

Android Debug Bridge (ADB) is the command-line tool and client-server protocol that lets a development computer communicate with an Android device or emulator to install apps, run shell commands, transfer files and read logs. In mobile app development, it is the low-level channel underneath Android Studio, Flutter, React Native and almost every other toolchain that deploys code to Android hardware.

ADB ships with the Android SDK Platform-Tools package and works over USB or a network connection. Developers use it directly through the adb command when they need precise control, and indirectly every time an IDE presses Run on an Android target.

How the ADB client, server and daemon interact

ADB uses a three-part architecture: a client, a server and a daemon. The client is the adb command typed in a terminal or invoked by an IDE, the server is a background process on the computer that manages connections, and the daemon (adbd) runs on the device and executes the requested operations.

ComponentRuns onRole
ClientDevelopment computerSends commands such as install or shell
ServerDevelopment computerTracks devices and multiplexes connections
Daemon (adbd)Android device or emulatorExecutes commands with shell privileges
Components of the ADB architecture

The server listens on local TCP port 5037 and is started automatically by the first client command. It scans for emulators on odd ports from 5555 to 5585, while physical devices appear through USB once USB debugging is enabled in Developer options. Several clients, such as a terminal and Android Studio, can share one server, which explains why conflicting SDK versions sometimes cause server version mismatch errors.

Essential ADB commands and what they do

Most daily work relies on a small set of commands that cover deployment, inspection and file handling. The table below lists the ones that appear in nearly every Android project.

CommandPurposeTypical use
adb devices -lList connected targetsConfirm the device is authorized
adb install -r app.apkInstall or replace an APKDeploy a test build
adb logcatStream system and app logsDiagnose crashes and warnings
adb shellOpen a device shellRun am, pm or dumpsys
adb push and adb pullCopy files to or from deviceLoad test data, retrieve traces
adb reverse tcp:8081 tcp:8081Forward device port to computerReach a local dev server
adb bugreportCollect a full diagnostic archiveAttach evidence to a bug ticket
Frequently used ADB commands

Inside the shell, the activity manager (`am`) starts activities and sends intents, which makes it the standard way to test deep linking without tapping through the interface. The package manager (`pm`) grants or revokes runtime permissions, and `dumpsys` prints the internal state of services such as battery, memory or notifications, which helps when verifying push notification behavior.

Connection modes: USB, Wi-Fi and emulators

ADB supports three connection modes, and each suits a different stage of work. Every physical connection is protected by RSA key authorization: the device shows the computer’s key fingerprint and the user must approve it before any command runs.

ModeSetupStrengthsLimitations
USBCable plus USB debuggingFast, stable, simpleRequires a cable and correct drivers
Wireless debuggingPairing code on Android 11 or laterNo cable, convenient testingDepends on network quality
Legacy TCP/IPadb tcpip 5555 after USBWorks on older versionsUnencrypted, no pairing
EmulatorStarted by the Android EmulatorAutomatic connectionNot real hardware behavior
Comparison of ADB connection modes

Wireless debugging introduced in Android 11 uses pairing codes and TLS, which makes it far safer than the legacy adb tcpip method. With several devices attached, commands need the `-s` flag with a serial number, otherwise ADB refuses to guess the target.

How ADB relates to other mobile development tools

ADB is infrastructure rather than a framework: higher-level tools call it instead of replacing it. Android Studio, the Flutter command-line interface, React Native, Expo development builds and Capacitor all rely on ADB to install builds, forward ports and attach debuggers on Android targets.

Its closest relative is fastboot, which ships in the same Platform-Tools package but works in the bootloader mode to flash partitions. On iOS, Xcode and Apple device services provide comparable functions, but there is no general-purpose shell equivalent to adb shell, which reflects the stricter platform model.

  • Android Studio wraps ADB for deployment, Logcat and the device file explorer.
  • Flutter and React Native call ADB to install builds and enable hot reload connections.
  • Test frameworks such as Espresso and UI Automator run through ADB instrumentation commands.
  • CI pipelines use ADB against emulators to run automated tests on every commit.

Security risks and common ADB problems

ADB grants powerful access to a device, so it must be treated as a privileged interface. An authorized computer can install software, read app-accessible storage and capture screens, and an exposed network port can let an attacker do the same. Disable USB debugging on personal devices when development ends and never leave port 5555 open on a public network.

Most connection failures have a small number of well-known causes, summarized below.

SymptomLikely causeFix
Device listed as unauthorizedRSA prompt not acceptedReconnect and approve the fingerprint
No device listedMissing driver or charge-only cableInstall driver, use a data cable
Server version mismatchTwo SDK copies on one machineUse one Platform-Tools path
Install fails with signature errorDifferent signing key installedUninstall the old build first
Logcat floods with noiseNo filter appliedFilter by tag, priority or process ID
ADB symptoms, causes and fixes

A frequent misconception is that ADB requires root access. It does not: the daemon runs with shell user privileges, which are enough for most development tasks, while root operations work only on debug builds or rooted devices.

The simple explanation

Android Debug Bridge is a cable of commands between a computer and an Android phone. A developer types an instruction on the computer, and the phone carries it out. It can put a new app version on the phone. It can show what the app is doing inside. It can also copy files back and forth.

Think of it as a service hatch on a machine. Normal users never open it. Mechanics use it to test and repair. Because it is so powerful, the phone asks for permission before any computer may use it.

How it is used in practice

A mobile developer at a food delivery startup receives a report that the app crashes when customers open an order link from an email. On the office test phone, she enables USB debugging, connects the cable and confirms the device with adb devices. She then installs the latest test build with adb install -r and triggers the link directly using adb shell am start with the order URL.

Running adb logcat filtered to the app’s process shows a null pointer exception caused by a missing order ID parameter. She fixes the parsing code, reinstalls the build in under a minute, repeats the same command and confirms that the order screen opens correctly.

The same commands go into the team’s CI pipeline, which now tests five deep link variants on an emulator before every release, so the defect cannot return unnoticed.