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.
| Component | Runs on | Role |
|---|---|---|
| Client | Development computer | Sends commands such as install or shell |
| Server | Development computer | Tracks devices and multiplexes connections |
| Daemon (adbd) | Android device or emulator | Executes commands with shell privileges |
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.
| Command | Purpose | Typical use |
|---|---|---|
adb devices -l | List connected targets | Confirm the device is authorized |
adb install -r app.apk | Install or replace an APK | Deploy a test build |
adb logcat | Stream system and app logs | Diagnose crashes and warnings |
adb shell | Open a device shell | Run am, pm or dumpsys |
adb push and adb pull | Copy files to or from device | Load test data, retrieve traces |
adb reverse tcp:8081 tcp:8081 | Forward device port to computer | Reach a local dev server |
adb bugreport | Collect a full diagnostic archive | Attach evidence to a bug ticket |
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.
| Mode | Setup | Strengths | Limitations |
|---|---|---|---|
| USB | Cable plus USB debugging | Fast, stable, simple | Requires a cable and correct drivers |
| Wireless debugging | Pairing code on Android 11 or later | No cable, convenient testing | Depends on network quality |
| Legacy TCP/IP | adb tcpip 5555 after USB | Works on older versions | Unencrypted, no pairing |
| Emulator | Started by the Android Emulator | Automatic connection | Not real hardware behavior |
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.
| Symptom | Likely cause | Fix |
|---|---|---|
| Device listed as unauthorized | RSA prompt not accepted | Reconnect and approve the fingerprint |
| No device listed | Missing driver or charge-only cable | Install driver, use a data cable |
| Server version mismatch | Two SDK copies on one machine | Use one Platform-Tools path |
| Install fails with signature error | Different signing key installed | Uninstall the old build first |
| Logcat floods with noise | No filter applied | Filter by tag, priority or process ID |
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.