Original author(s) | |
---|---|
Stable release | 34.0.1 (March 2023) |
Repository | android.googlesource.com |
Written in | C++ |
Operating system | Windows, Linux, macOS |
Included with | Android SDK |
Type | Software development tool |
License | Apache License 2.0 |
Website | developer |
The Android Debug Bridge (commonly abbreviated as adb) is a programming tool used for the debugging of Android-based devices. The daemon on the Android device connects with the server on the host PC over USB or 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 available for Windows, Linux and macOS. It has been misused by botnets and other malware, for which mitigations were developed such as RSA authentication and device whitelisting.
Features of adb include copying files from the host computer, [1] installing apps, viewing logcat output, getting a Unix shell, [2] and rebooting into Qualcomm EDL mode. [3] For example, Android applications can be saved by the command 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 Windows Subsystem for Android [7] and Chrome OS's Android virtual machine. [8]
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]
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]
In Android 4.2.2 or later (API level 17), a dialog is shown with an RSA fingerprint that the user needs to accept. This protects against computers exploiting the debugging mechanism without consent of the device user. [24] 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. [25] 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. [26] [27]
The adb protocol can be transported over USB or over Wi-Fi through TCP. It uses a client-server architecture. There are two different protocols in use. The first is between the client and the server and the second is between the server and the daemon. The adb daemon is implemented in C and located in the Android user space. The daemon is facilitated by the Android USB framework, UsbDeviceManager
and UsbDebuggingManager
. [5]
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]
The messages sent from the server consist of a 24-byte long header, with the following fields: [5]
0xFFFFFFFF
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 cannot start a new process with dropped privileges and keeps running as root. Then adb provided a root shell. [28] 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. [29]
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]
A software development kit (SDK) is a collection of software development tools in one installable package. They facilitate the creation of applications by having a compiler, debugger and sometimes a software framework. They are normally specific to a hardware platform and operating system combination. To create applications with advanced functionalities such as advertisements, push notifications, etc; most application software developers use specific software development kits.
QEMU is a free and open-source emulator. It emulates a computer's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems. It can interoperate with Kernel-based Virtual Machine (KVM) to run virtual machines at near-native speed. QEMU can also do emulation for user-level processes, allowing applications compiled for one architecture to run on another.
Android is a mobile operating system based on a modified version of the Linux kernel and other open-source software, designed primarily for touchscreen mobile devices such as smartphones and tablets. Android is developed by a consortium of developers known as the Open Handset Alliance, though its most widely used version is primarily developed by Google. It was unveiled in November 2007, with the first commercial Android device, the HTC Dream, being launched in September 2008.
The Nexus One is an Android smartphone designed and manufactured by HTC as Google's first Nexus smartphone. The Nexus became available on January 5, 2010, and features the ability to transcribe voice to text, an additional microphone for dynamic noise suppression, and voice guided turn-by-turn navigation to drivers.
The Android SDK is a software development kit for the Android software ecosystem that includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials. The SDK is part of the official Android Studio IDE but its various tools and resources can be used independently.
Rooting is the process by which users of Android devices can attain privileged control over various subsystems of the device, usually smartphones and tablets. Because Android is based on a modified version of the Linux kernel, rooting an Android device gives similar access to administrative (superuser) permissions as on Linux or any other Unix-like operating system such as FreeBSD or macOS.
Fastboot is a communication protocol used primarily with Android devices. It is implemented in a command-line interface tool of the same name and as a mode of the bootloader of Android devices. The tool is included with the Android SDK package and used primarily to modify the flash filesystem via a USB connection from a host computer. It requires that the device be started in Fastboot mode. If the mode is enabled, it will accept a specific set of commands, sent through USB bulk transfers. Fastboot on some devices allows unlocking the bootloader, and subsequently, enables installing custom recovery image and custom ROM on the device. Fastboot does not require USB debugging to be enabled on the device. To use fastboot, a specific combination of keys must be held during boot.
Sideloading describes the process of transferring files between two local devices, in particular between a personal computer and a mobile device such as a mobile phone, smartphone, PDA, tablet, portable media player or e-reader.
Android software development is the process by which applications are created for devices running the Android operating system. Google states that "Android apps can be written using Kotlin, Java, and C++ languages" using the Android software development kit (SDK), while using other languages is also possible. All non-Java virtual machine (JVM) languages, such as Go, JavaScript, C, C++ or assembly, need the help of JVM language code, that may be supplied by tools, likely with restricted API support. Some programming languages and tools allow cross-platform app support. Third party tools, development environments, and language support have also continued to evolve and expand since the initial SDK was released in 2008. The official Android app distribution mechanism to end users is Google Play; it also allows staged gradual app release, as well as distribution of pre-release app versions to testers.
Android Developer Lab is a series of mobile software development-focused events around the world held annually by Google. They include bootcamps and technical sessions focused on Android and give participants an excellent chance to learn about the state of the Android platform, get hands-on with the latest version of the SDK, test applications on the latest sample Android devices, get questions answered by Google engineers from the Android team as well as meet other like-minded members of the local Android developer community.
Google Cloud Messaging (GCM) was a mobile notification service developed by Google that enables third-party application developers to send notification data or information from developer-run servers to applications that target the Google Android Operating System, as well as applications or extensions developed for the Google Chrome internet browser. It was available to developers free of charge. The GCM Service was first announced in June 2012 as a successor to Google's now-defunct Android Cloud to Device Messaging (C2DM) service, citing improvements to authentication and delivery, new API endpoints and messaging parameters, and the removal of limitations on API send-rates and message sizes. It has been superseded by Google's Firebase Cloud Messaging (FCM) on May 29, 2019.
Fire OS is a mobile operating system based on the Android Open Source Project (AOSP). It is developed by Amazon for their devices. Fire OS includes proprietary software, a customized user interface primarily centered on content consumption, and heavy ties to content available from Amazon's storefronts and services.
Google Play Services is a proprietary software package produced by Google for installation on Android devices. It consists of background services and libraries for use by mobile apps running on the device. When it was introduced in 2012, it provided access to the Google+ APIs and OAuth 2.0. It expanded to cover a variety of Google services, allowing applications to communicate with the services through common means.
Odin is a utility software program developed and used by Samsung internally which is used to communicate with Samsung devices in Odin mode. It can be used to flash a custom recovery firmware image to a Samsung Android device. Odin is also used for unbricking certain Android devices. Odin is the Samsung proprietary alternative to Fastboot.
Tasker is an Android application originally developed by a developer known as "Pent", and later purchased by João Dias. It enables performing user-defined actions based on contexts in user-defined profiles, activated by click- or timer-based home screen widgets. It is expandable via AutoApps plugins from the developer and third-party apps. The app is available from Google Play; a 7-day free trial version which does not allow restoring backups can be downloaded as an APK on the app's website.
Firebase Cloud Messaging (FCM), formerly known as Google Cloud Messaging (GCM), is a cross-platform cloud service for messages and notifications for Android, iOS, and web applications, which as of May 2023 can be used at no cost. Firebase Cloud Messaging allows third-party application developers to send notifications or messages from servers hosted by FCM to users of the platform or end users.
Android 10 is the tenth major release and the 17th version of the Android mobile operating system. It was first released as a developer preview on March 13, 2019, and was released publicly on September 3, 2019.
Snaptube is a free Android app that downloads video, audio and also works as a social media aggregator. It provides video resolutions in a range of 144p, 720p, 1080p HD, 2K HD, 4K HD and audio formats in MP3 and M4A. With Snaptube, users can look for content on all their platforms without using numerous apps. As of June 2020, the application is used by over 100 million users.
Bootloader unlocking is the process of disabling the bootloader security that makes secure boot possible. It can make advanced customizations possible, such as installing a custom firmware. On smartphones this can be a custom Android distribution or another mobile operating system. Some bootloaders are not locked at all, others can be unlocked using a standard command, others need assistance from the manufacturer. Some do not include an unlocking method and can only be unlocked through a software exploit.
{{cite book}}
: CS1 maint: location missing publisher (link){{cite book}}
: CS1 maint: location missing publisher (link){{cite book}}
: CS1 maint: location missing publisher (link){{cite book}}
: CS1 maint: location missing publisher (link)