Android Debug Bridge
|Operating system||Windows, Linux, macOS|
|Included with||Android SDK|
|Type||Software development tool|
|License||Apache License 2.0|
The Android Debug Bridge, commonly abbreviated as adb is a programming tool used for debugging devices that are based on Android using a USB or TCP connection. It consists of a client and server on the host PC, where the server connects to the daemon on the Android device. It has been available since 2007 and includes various features, such as a shell and the possibility to make backups. It has seen different security attacks and improvements to mitigate these.
Features of adb include copying files from the host computer, installing apps, viewing logcat output, getting a Unix shell,  and rebooting into Qualcomm EDL mode. For example, Android applications can be saved by the command
backup to a file, whose name is
backup.ab by default. It also includes support for the Java Debug Wire Protocol. Some graphical interfaces have been made available.
The first beta release of the Android SDK was in 2007. Since 2017, Google made it possible to download ADB separately from the Android SDK. In 2015, Microsoft released an Android emulator that is able to connect using ADB. For Android 11, Google added ADB incremental installations. In Android Studio 2.0, a 5x performance improvement was made for installing apps and pushing files through ADB. For easier usage of Android Things, a wrapper was made around manual ADB commands. In 2020, Wi-Fi ADB was integrated into Android Studio for macOS. In Android 12, the
adb backup command will be limited.
For Windows, the Android SDK contains the adb.exe binary that can be extracted and installed, together with the fastboot software. It has been recommended to add the folder containing the binaries to the PATH environment variable.
On Ubuntu, ADB can be installed with the
android-tools-adb package. For Debian, it has been recommended to also install the
android-sdk-platform-tools-common package next to the
adb package, which installs the udev rules which makes it possible to run the tool without root permissions.
In Android 4.2.2 or later (API level 17), a dialog is shown with an RSA fingerprint that needs to be accepted. This protects against computers exploiting the debugging mechanism without consent of the phone user. Starting in Android 4.2, the developer settings are hidden by default. To make them visible, it is required to press seven times on the build number in the about menu. After that, the USB debugging option can be enabled. The procedure does differ for some Android vendors. For Huawei, it is needed to enter a pincode before enabling adb.
Up to Android 2.2, Android was vulnerable to the RageAgainstTheCage exploit. The ADB daemon did not check for the return value of the setuid system call when dropping privileges. The exploit forks processes until it fails due to the exhaustion of process identifiers. When the daemon crashes and restarts, it can't start a new process with dropped privileges and keeps running as root. Then adb provided a root shell. In 2017, a security vulnerability was disclosed that exploited ADB to take over the onboard modem. The attack required ADB to be already enabled and authorized, although some workarounds were available. Various families of malware such as ADB.Miner, Ares, IPStorm, Fbot and Trinity have scanned the internet for public availability of the ADB interface and installed malware on those devices. ADB has also been used in the process of getting rid of malware, by booting into safe mode and running the
adb uninstall command.
- Darcey, Lauren (2012). Android wireless application development. Shane Conder (3rd ed.). Upper Saddle River, NJ: Addison-Wesley. ISBN 978-0-321-81383-1. OCLC 749852462. Archived from the original on 2021-09-26. Retrieved 2021-09-26.
- "Things You Can Do with Android's adb Command". For Dummies. Archived from the original on 2018-05-15. Retrieved 2021-09-09.
- EASTTOM, CHUCK (2021). An In-Depth Guide to Mobile Device Forensics. [S.l.]: CRC PRESS. p. 72. ISBN 0-367-63300-0. OCLC 1250310301. Archived from the original on 2021-09-26. Retrieved 2021-09-26.
- Jack Wallen (2015-03-06). "How to create a full backup of your Android device without root". Archived from the original on 2016-01-24. Retrieved 2016-01-29.
- Regupathy, Rajaram (2014). Unboxing Android USB: a hands-on approach with real World examples. Berkeley, CA. ISBN 978-1-4302-6209-1. OCLC 880673864. Archived from the original on 2021-09-26. Retrieved 2021-09-26.
- Morgillo, Ivan (2016). Learning embedded Android N programming: create the perfectly customized system by unleashing the power of Android OS on your embedded device. Stefano Viola. Birmingham, UK. p. 89. ISBN 978-1-78528-328-4. OCLC 957278992. Archived from the original on 2021-09-26. Retrieved 2021-09-26.
- "Google releases Android SDK". Macworld. Archived from the original on 2021-09-10. Retrieved 2021-09-10.
- "Google makes ADB, fastboot, and other platform tools available without full SDK or Android Studio download". Android Police. 2017-01-05. Archived from the original on 2021-04-10. Retrieved 2021-09-09.
- Vasile, Cosmin. "Microsoft Releases Android Emulator and It's Supposed to Be Faster than Google's". Softpedia. Archived from the original on 2021-09-10. Retrieved 2021-09-10.
- "Turning it up to 11: Android 11 for developers". Android Developers Blog. Archived from the original on 2021-09-17. Retrieved 2021-09-10.
- "Android Studio 2.0 - Beta". Android Developers Blog. Archived from the original on 2021-09-10. Retrieved 2021-09-10.
- "Android Things Developer Preview 6". Android Developers Blog. Archived from the original on 2021-09-10. Retrieved 2021-09-10.
- "Announcing Android Studio Arctic Fox (2020.3.1) & Android Gradle plugin 7.0". Android Developers Blog. Archived from the original on 2021-09-12. Retrieved 2021-09-10.
- "Behavior changes: Apps targeting Android 12 | Android 12 Beta". Android Developers. Retrieved 2021-09-28.
- "The Easiest Way to Install Android's ADB and Fastboot Tools on Any OS". Lifehacker. Archived from the original on 2021-07-18. Retrieved 2021-09-25.
- Hoffman, Chris. "How to Install and Use ADB, the Android Debug Bridge Utility". How-To Geek. Archived from the original on 2021-09-18. Retrieved 2021-09-09.
- Smyth, Neil (2020). "7". Android Studio 4. 0 Development Essentials - Java Edition: Developing Android Apps Using Android Studio 4. 0, Java and Android Jetpack. Cary. ISBN 978-1-951442-21-7. OCLC 1190906409. Archived from the original on 2021-09-26. Retrieved 2021-09-26.
- "Debian -- Details of package adb in bullseye". packages.debian.org. Archived from the original on 2021-09-08. Retrieved 2021-09-08.
- "Run apps on a hardware device". Android Developers. Archived from the original on 2021-09-08. Retrieved 2021-09-08.
- Wallen, Jack. "How to enable Developer options in Android 4.2". TechRepublic. Archived from the original on 2021-09-09. Retrieved 2021-09-09.
- Aranzulla, Salvatore. "Come attivare debug USB". Salvatore Aranzulla (in Italian). Archived from the original on 2021-09-09. Retrieved 2021-09-09.
- Ogubuike, Udochi (2019-08-09). "How to enable USB debugging mode on Android". The Punch. Archived from the original on 2019-09-17. Retrieved 2021-09-09.
- Drake, Joshua J. (2014). Android hacker's handbook. Zach Lanier, Collin Mulliner, Pau Oliva, Stephen A. Ridley, Georg Wicherski. Indianapolis, IN: Wiley. p. 75. ISBN 978-1-118-60861-6. OCLC 875820167. Archived from the original on 2021-09-26. Retrieved 2021-09-26.
- Mendelsohn, Tom (2017-01-09). "Google plugs severe Android vulnerability that exposed devices to spying". Ars Technica. Archived from the original on 2021-09-10. Retrieved 2021-09-10.
- Cimpanu, Catalin. "Android devices ensnared in DDoS botnet". ZDNet. Archived from the original on 2021-09-10. Retrieved 2021-09-10.
- Schuman, Evan. "This Vultur app takes malicious to the next level". Computerworld. Archived from the original on 2021-09-10. Retrieved 2021-09-10.