Install and use ADB: this is how Android Debug Bridge works

Android Debug Bridge (ADB) is an interface between your computer and your Android smartphone. You can use it to send a series of commands to your smartphone via a USB cable. For example, you can root your smartphone, install a different firmware, or install an update.

Jump to section

Enable USB debugging

To get started with ADB for Android, you need to enable USB debugging on your phone. This is disabled by default. To change that, go to settings on the phone and type about the phone in, there seven times in the build number and then take a step back. There you can see the new entry. developer optionsin which your USB debugging can activate. You can find more information about developer settings in the linked article.

USB debugging

You can enable USB debugging through Android developer settings. / © Google / Screenshot: NextPit

install bad

ADB Driver for Windows

You may get lucky with Windows 10 and then you don’t have to install any additional drivers. So skip this step and try to access the ADB interface on your Android smartphone first. If the connection fails, it returns to this point.

If the ADB interface is not recognized, you must first download and install an ADB driver. Google provides a list of ADB drivers for different smartphone manufacturers and specific instructions for Windows 10 and 8.1 on the linked help page.

Alternatively, promise ADB Driver Installer, to be the universal solution to the problem. So go to the website and click there. ADB driver installer (9.22 MByte).. Open the ZIP file and start the EXE file it contains. Confirm the UAC warning if it appears.

Windows adb tools overview

The computer does most of the work in ADB! / © NextPit

Then connect your smartphone to computer and tap ADB Driver Installer to update. If your smartphone is still not listed, you need to enable USB debugging. So it goes like this:

Now click again on the android debug bridge driver installer to update, your device should now appear. If it still doesn’t work, you need to change the USB connection mode. Many smartphones initially only use the attached USB cable for charging. This is intentional, because your files are invisible to the user of the connected computer.

In such a case, pull the notification down from the top of the smartphone screen. Select the type of USB connection there. Then tap MTP or PTP (try both options one after another).

USB2 debugging

By default, Android recognizes connected devices as charging options; you should change this function for the ADB. © Google / Screenshot: NextPit

By now you should see your device listed in the ADB driver installer when you click to update clicks Then click on the line with your device and then on Install. The appropriate ADB driver for your smartphone should now install automatically. If problems arise, you should Device administrator Open, delete existing entries with your smartphone and repeat the installation.

ADB as a download for Windows, macOS or Linux

On the developer side, Google keeps current ADB downloads under the tag platform tools Clever. There you will also find explanations of the most recent changes in ADB updates. The tools are in the packages. bad Y fast boot contain. The files are approximately 4 MB in size, saving you the overhead of the entire software development kit.

Here you can find the always up-to-date downloads of Google’s minimal ADB tools:

Linux users can also simply install ADB through their distribution’s package manager.
Mac users should read up on “homebrew” and the android-platform-tools formula.
The advantage of installing through the package manager is that packages are automatically updated and tools are defined globally.

On Windows extract the platform tools in a folder and open it. Right-click while holding down the Shift key and click “open command prompt here”.

You can also extract the zip file to any directory on Mac OS or Linux. Open a terminal window and move around with it CD in the same directory. Connect your smartphone to the computer. Now type the command in the command prompt/terminal adb devices (under Linux with sudo). Now there is the following warning on the smartphone (lower right).

usb debugging permission device

You may need to re-register each individual computer for USB debugging. / © NextPit

after the first adb devices should be low List of connected devices the device ID with a Not authorized be recognized. After the second time, if you have allowed debugging on your PC (image above), it should device be displayed with a code. If absolutely no device appears, you may need to reinstall the missing drivers. To do this, go back up to the controller section.

BAD Commands

So now that ADB for Android is installed and running, let’s also learn and use some of the ADB commands. Before each session, it is recommended to check if ADB has correctly recognized the smartphone:

adb devices: This command gives you an overview of all devices connected to the computer with ADB support. Here you can see the device ID and status. Not authorized for example, it indicates that you must still allow the computer on the smartphone; on Linux it can also mean that you need to run the command as root or with sudo privileges. If you have multiple devices connected, you take control adb devices -l.

adb kill-server: Stop ADB on the machine. Useful for restarting the current ADB session in case of ADB problems. The counterpart, adb boot server automatically executed by ADB.

backup adb -f FullBackup.ab -apk -all: The idea here is that you make a complete backup of your application data. In practice, this turns out to be a wasted effort, as our test shows. Not all apps allow ADB backup, so you have to switch to an alternative. The save game save command is particularly useful.

adb restore backup.ab: Restore a backup.

adb reboot: This will reboot your smartphone.

adb reboot recovery: The device boots into recovery.

adb reboot bootloader: The smartphone/tablet boots into the bootloader. Once in this mode, you communicate through it. fast boot-Domain.

adb push [Verzeichnis am Computer/dateiname.endung] [Verzeichnis im Smartphone]: This command uploads a file from your computer to the smartphone.

pull adb [Verzeichnis im Smartphone/dateiname.endung] [Verzeichnis am Computer]: When you have executed this command, a file will be saved from your smartphone/tablet to PC. If the computer directory is not specified, the file ends at the path of the ADB executable or /home-Directory.

adb shell screencap -p /sdcard/screencap.png
adb pull /sdcard/screenshot.png
adb shell rm /sdcard/screenshot.png:
This creates a screenshot and saves it to your computer.

adb help: Summary of all ADB commands, syntax and help.

adb sideload update.zip: With this command, files such as official device updates can be installed on the smartphone; this works with Google devices and only rarely with other manufacturers. However, more complicated installations, such as custom ROMs, are done through the fast bootinterface, as we demonstrate in this example.

adb install android-app.apk: This allows you to install an Android application (APK) on your smartphone/tablet.

You can find a list of all the commands on this special page on Google!

ADB Shell: the red pill

Related to the above adb– respectively fast boot-Commands only on individual commands, the ADB shell takes you right down the rabbit hole. So just write…

  • adb shell: BYour terminal window takes you to the entry level of your smartphone. From now on, you no longer execute commands on your computer, but directly on your smartphone. The syntax and vocabulary of the commands change accordingly.

In the case of Android, these are largely commands that are familiar from the Unix world. Completing commands and names through tabs also works. Here are some ADB shell commands as examples:

  • cd/sd card move to directory SD card.
  • ls lists the contents of the current directory.
  • df-h shows the mounted partitions and their used/free space.
  • Upper part list active processes (exit with Ctrl + C).
  • mount lists existing file systems.
  • You can see the respective outputs with ” | grep [Suchbegriff]” to filter by specific terms.
  • mounted | grepf2fs about shows if and what the f2fs-format file systems are available.

Leave the adb shell again with Ctrl + C or with the command “exit”.

ADB error messages: common errors with solutions

command not found: You made a typo or the command is not yet available in your ADB version. Check the command via adb help or upgraded to a newer version of ADB.

no device: Your USB cable is not connected properly, your smartphone’s ADB interface is not active, or your smartphone is not recognized by your computer. Use a different USB port, a different cable, enable USB debugging, check the driver, restart the computer and smartphone.

The server is out of date: The ADB tools on the computer and the Android version on the smartphone must be compatible with each other. If they are not, this error occurs. Update your ADB tools.

Waiting for the device: This error is largely the same as no device. Your computer no longer recognizes the smartphone. Look above for solutions.

Now what?

ADB opens up new ways and possibilities to work with or modify your smartphone. Install OTA updates sooner, root your smartphone, install alternative firmware, remove pre-installed apps, and much more. What is your favorite command in Android Debug Bridge?


The information in this article was reviewed and updated on April 27, 2021. Existing comments were not removed.