Android Debug Bridge
Original author(s) | |
---|---|
Stable release | 34.0.1 (March 2023)
|
Apache License 2.0 | |
Website | developer |
The Android Debug Bridge (commonly abbreviated as adb) is a
Features
Features of adb include copying files from the host computer,backup
to a file.[4] It also includes support for the Java Debug Wire Protocol.[5]
Some graphical interfaces have been made available. The graphical Android Device Monitor in Android Studio can be used for retrieving information from an Android device.[6]
Android's method to install APK files on a device has been used as a way to sideload unofficial apps onto
Development history
The Android Software Development Kit (SDK) was first released in 2007.[9] Since 2017, Google made it possible to download adb separately from the Android SDK.[10]
In 2015, Microsoft released an Android emulator that can connect to the adb client.[11] In 2016 for Android Studio 2.0 a 5x performance improvement was made for installing apps and pushing files through adb.[12] For easier usage of Android Things, a wrapper was made in 2017 around manual adb commands.[13] For Android 11 in 2020, Google added adb incremental installations.[14] In 2020, Wi-Fi adb was integrated into Android Studio for macOS.[15] In 2021 for Android 12, the adb backup
command was limited so that backing up user data from apps is opt-in using a per-app manifesto configuration[16] after being deprecated in Android 10 along with adb restore
.[17] Fuchsia will be backwards-compatible with adb. It will be replaced with fx and ffx.[18]
Setup
Host computer
For Windows, the Android SDK contains the adb.exe binary that can be extracted and installed.[19] How-To Geek recommends adding the folder containing the binaries to the PATH environment variable.[20]
On Ubuntu, adb can be installed with the android-tools-adb
package.[21] 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.[22] For macOS and other Linux distributions, the platform tools can be downloaded and the PATH variable can be modified in bashrc.[23]
Android device
In
If the touchscreen of an Android device is broken, it can be possible to connect a mouse to the device using USB On-The-Go and enable USB debugging.[27][26]
Architecture
The adb protocol can be transported over USB or over
UsbDeviceManager
and UsbDebuggingManager
.[5]Client ↔ server protocol
The communication mode between the client and server is a TCP socket. The server listens on a port, to which the client has to send a request. The request contains a 4-byte initial field in ASCII and a payload. The payload starts with the word host, to indicate it should be sent to the server. The server can then reply with OKAY or FAIL to indicate the status, combined with an optional payload and length.[5]
Server ↔ daemon protocol
The messages sent from the server consist of a 24-byte long header, with the following fields:[5]
- Command
- First argument
- Second argument
- Length of the payload, 0 or higher
- CRC-32of the data payload
- Magic value, calculated through command XOR
0xFFFFFFFF
Security
Up to
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.[30] adb can also be used to remove malware, by booting into safe mode and running the adb uninstall
command.[31]
See also
References
- 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.
- OCLC 1250310301. Archivedfrom 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.
- ^ )
- OCLC 1020708322. Archived from the original on 2021-09-26. Retrieved 2021-09-26.)
{{cite book}}
: CS1 maint: location missing publisher (link - ^ "How to sideload Android apps on Windows 11". 23 January 2022.
- ^ "How to sideload apps to a Chromebook". 5 March 2023.
- ^ "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.
- ^ "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.
- ^ "Turning it up to 11: Android 11 for developers". Android Developers Blog. Archived from the original on 2021-09-17. 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. Archived from the original on 2021-09-28. Retrieved 2021-09-28.
- ^ "Google Considers Removing Android ADB Backup and Restore".
- 9to5Google. Retrieved 2022-08-29.
- )
- ^ Hoffman, Chris; Fedewa, Joe (4 September 2021). "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.
- OCLC 1190906409. Archived from the original on 2021-09-26. Retrieved 2021-09-26.)
{{cite book}}
: CS1 maint: location missing publisher (link - ^ "Debian -- Details of package adb in bullseye". packages.debian.org. Archived from the original on 2021-09-08. Retrieved 2021-09-08.
- ^ "How to Install Android Debug Bridge (ADB) and Fastboot". Lifewire. Archived from the original on 2022-01-30. Retrieved 2022-01-18.
- ^ "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.
- ^ a b 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.
- 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.
- ZDNet. Archivedfrom 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.
External links
- Official website
- "Using ADB and fastboot". LineageOS wiki. Retrieved 2023-05-02.
- "Android Debug Bridge". Arch Linux wiki. Retrieved 2023-05-02.
- "Android/adb - Gentoo Wiki". Gentoo Linux wiki. Retrieved 2023-05-02.
- "Android Debug Bridge". Android Wiki. Retrieved 2023-05-02.