Content deleted Content added
m →Development history: Link 9to5Google |
Citation bot (talk | contribs) Removed URL that duplicated identifier. Removed access-date with no URL. Removed parameters. | Use this bot. Report bugs. | #UCB_CommandLine |
||
(9 intermediate revisions by 9 users not shown) | |||
Line 46:
}}
The '''Android Debug Bridge''' (commonly abbreviated as '''adb''') is a [[programming tool]] used for the [[debugging]] of [[Android (operating system)|Android]]-based devices. The [[Daemon (computing)|daemon]] on the Android device connects with the server on the host PC over [[USB]] or [[Transmission Control Protocol|TCP]], which connects to the client that is used by the end-user over TCP. Made available as [[open-source software]] under the [[Apache License]] by [[Google]] since 2007, its features include a shell and the possibility to make backups. The adb software is
== Features ==
[[File:Android Device Monitor.png|thumb|left|Android Device Monitor]]
Features of adb include copying files from the host computer,<ref>{{Cite book|last=Darcey|first=Lauren
Some [[Graphical user interface|graphical interfaces]] have been made available. The graphical Android Device Monitor in [[Android Studio]] can be used for retrieving information from an Android device.<ref>{{Cite book|last1=Morgillo|first1=Ivan|last2=Viola|first2=Stefano|url=https://books.google.com/books?id=bOrUDQAAQBAJ|title=Learning embedded Android N programming: create the perfectly customized system by unleashing the power of Android OS on your embedded device|date=2016|___location=Birmingham, UK|page=89|isbn=9781785283284|oclc=1020708322|access-date=2021-09-26|archive-date=2021-09-26|archive-url=https://web.archive.org/web/20210926122010/https://www.worldcat.org/title/learning-embedded-android-n-programming-create-the-perfectly-customized-system-by-unleashing-the-power-of-android-os-on-your-embedded-device/oclc/957278992|url-status=live}}</ref>
Android's method to install APK files on a device has been used as a way to sideload unofficial apps onto [[Windows Subsystem for Android]]<ref>{{cite web | url=https://www.xda-developers.com/how-to-sideload-android-apps-on-windows-11/ | title=How to sideload Android apps on Windows 11 | date=23 January 2022 }}</ref> and Chrome OS's Android virtual machine.<ref>{{cite web | url=https://www.xda-developers.com/how-sideload-apps-chromebook/ | title=How to sideload apps to a Chromebook | date=5 March 2023 }}</ref>
Shizuku allows an Android phone to connect to its own ADB when connected to a wireless network. The application is available for free on the Google Play Store.<ref>{{Cite web |title=User manual {{!}} Shizuku |url=https://shizuku.rikka.app/guide/setup/ |access-date=2024-07-19 |website=shizuku.rikka.app}}</ref>
== Development history ==
Line 66 ⟶ 68:
|width=200 | height=350
|align=right
|File:USB debugging prompt warning - Android 13.png|For enabling USB debugging on the Android device, it needs to be enabled in the "developer settings" window
}}
=== Host computer ===
For Windows, the Android SDK contains the adb.exe binary that can be extracted and installed.<ref>{{Cite book|last=Harwani|first=B. M.
On [[Ubuntu]], adb can be installed with the <code>android-tools-adb</code> package.<ref>{{Cite book|last=Smyth|first=Neil
=== Android device ===
In [[Android 4.2.2]] or later ([[Android version history#Overview|API level 17]]), a dialog is shown with an RSA [[Public key fingerprint|fingerprint]] that the user needs to accept. This protects against computers exploiting the debugging mechanism without consent of the device user.<ref>{{Cite web|title=Run apps on a hardware device|url=https://developer.android.com/studio/run/device?hl=de|access-date=2021-09-08|website=Android Developers|language=en|archive-date=2021-09-08|archive-url=https://web.archive.org/web/20210908120934/https://developer.android.com/studio/run/device?hl=de|url-status=live}}</ref> Starting in Android 4.2, the developer settings are hidden by default. Pressing seven times on the build number in the about menu makes them visible to the user. After that, the USB debugging option can be enabled.<ref>{{Cite web|last=Wallen|first=Jack|title=How to enable Developer options in Android 4.2|url=https://www.techrepublic.com/article/pro-tip-how-to-enable-developer-options-in-android-42/|url-status=live|access-date=2021-09-09|website=[[TechRepublic]]|language=en|archive-date=2021-09-09|archive-url=https://web.archive.org/web/20210909131841/https://www.techrepublic.com/article/pro-tip-how-to-enable-developer-options-in-android-42/}}</ref> Some Android vendors have different procedures to enable it. For example, Huawei requires entering a pincode before adb can be enabled.
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.<ref>{{Cite web|last=Ogubuike|first=Udochi|date=2019-08-09|title=How to enable USB debugging mode on Android|url=https://punchng.com/how-to-enable-usb-debugging-mode-on-android/|url-status=live|access-date=2021-09-09|website=[[The Punch]]|language=en-US|archive-date=2019-09-17|archive-url=https://web.archive.org/web/20190917190512/https://punchng.com/how-to-enable-usb-debugging-mode-on-android/}}</ref><ref name=":1">{{Cite web|last=Aranzulla|first=Salvatore|author-link=Salvatore Aranzulla|title=Come attivare debug USB|url=https://www.aranzulla.it/come-attivare-debug-usb-1144637.html|url-status=live|access-date=2021-09-09|website=Salvatore Aranzulla|language=it-IT|archive-date=2021-09-09|archive-url=https://web.archive.org/web/20210909140557/https://www.aranzulla.it/come-attivare-debug-usb-1144637.html}}</ref>
== Architecture ==
Line 99:
== Security ==
Up to [[Android 2.2]], Android was vulnerable to the ''RageAgainstTheCage'' [[Exploit (computer security)|exploit]]. The adb [[Daemon (computing)|daemon]] did not check for the return value of the [[setuid]] [[system call]] when [[dropping privileges]]. The exploit [[Fork (system call)|forks]] processes until it fails due to the exhaustion of [[process identifier]]s. When the daemon crashes and restarts, it cannot start a new process with dropped privileges and keeps running as root. Then adb provided a root shell.<ref>{{Cite book|last=Drake|first=Joshua J.
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.<ref>{{Cite web|last=Cimpanu|first=Catalin|title=Android devices ensnared in DDoS botnet|url=https://www.zdnet.com/article/android-devices-ensnared-in-ddos-botnet/|url-status=live|access-date=2021-09-10|website=[[ZDNet]]|language=en|archive-date=2021-09-10|archive-url=https://web.archive.org/web/20210910135518/https://www.zdnet.com/article/android-devices-ensnared-in-ddos-botnet/}}</ref> adb can also be used to remove [[malware]], by booting into [[safe mode]] and running the <code>adb uninstall</code> command.<ref>{{Cite news|last=Schuman|first=Evan|title=This Vultur app takes malicious to the next level|language=en|work=[[Computerworld]]|url=https://www.computerworld.com/article/3627326/this-vultur-app-takes-malicious-to-the-next-level.html|access-date=2021-09-10|archive-date=2021-09-10|archive-url=https://web.archive.org/web/20210910135522/https://www.computerworld.com/article/3627326/this-vultur-app-takes-malicious-to-the-next-level.html|url-status=live}}</ref>
Line 116:
* {{Cite web |title=Android Debug Bridge |url=https://wiki.archlinux.org/title/Android_Debug_Bridge |access-date=2023-05-02 |website=[[Arch Linux]] wiki}}
* {{Cite web |title=Android/adb - Gentoo Wiki |url=https://wiki.gentoo.org/wiki/Android/adb |access-date=2023-05-02 |website=[[Gentoo Linux]] wiki}}
* {{Cite web |title=Android Debug Bridge |url=https://en.droidwiki.org/wiki/Android_Debug_Bridge |access-date=2023-05-02 |website=Android Wiki |language=en}}{{dead link|date=March 2025|bot=medic}}{{cbignore|bot=medic}}
{{Android}}
|