Android Debug Bridge
The Android Debug Bridge (ADB) is a command line software interface between an Android device and a host computer. It allows for the issuing of shell commands and the transfer of files. It can assist in debugging Android-powered devices and to provide means of bypassing a gui interface to directly communicate with the Android sy.
There are three pieces of software involved: a daemon, a server and a client.
The daemon runs on the Android device. The server and client run on the host device and are packed into a single executable. The host software can be downloaded as part of the Android SDK.
The ADB daemon, called abdb, runs on the Android device. It accesses the Android device and offers services over either a WiFi connection or a USB connection. The system property service.adb.tcp.port configures the port to which the daemon listens. The default is TCP port 5555. If no value is configured the daemon allows a connection over USB.
The server part of the adb executable on the host connects to the daemon on the Android device over either WiFi or USB connection. The server can connect simultaneously to multiple Android devices or an emulator. The server accepts multiple TCP connections on port 5037 from any client on the host and provides access to the Android device.
The client part of the adb executable on the host connects to the server part of the adb executable on the host. It provides user services.
Third party clients
Third party clients may be written that access ADB services. They may connect directly to the ADB server over a TCP connection or invoke an ADB client and communicate over a pipe. These could be GUI file managers or file system synchronizers.
The ADB daemon provides access to many services:
- Shell service
- TCP port forwarding
- Device stream forwarding
- Echo service
- Logcat service
- JDWP debugging
- Screen capture service
- File transfer service
- Backup service
- Restore service
- Disk mounter service
- Reboot device
|adb connect device||Connects to an Android device over WiFi, where device is a defined host or an IP address|
|adb usb||Connects to an Android device over a USB connection|
|adb shell||Brings up an interactive command shell|
|adb push source destination||Copies a file from host to Android device|
|adb pull source destination||Copies a file from Android device to host|
|adb logcat||Streams Android logcat (debugging log)|
|adb reboot||Reboots Android device|