contador web Skip to content

drivers, tools, commands and error messages

ADB: drivers, tools, commands and error messages

Android Debug Bridge (ADB) is a logical interface between your Android smartphone and your personal computer. Through it, commands can be sent directly from the PC to the smartphone (check the list of available commands). The most common use for ADB is rooting installation of different firmware or software updates.

What do you need to know

What is ADB?

ADB, or Android Debug Bridge, is a client and a server that communicate with each other. In other words, it is a communication tool between your smartphone and the computer. It is accessed through the prompt Windows or via the macOS or Linux Terminal and is used to send commands to Android through the computer, that is, it is a practical way to do root, install new ROMs or just solve problems on the smartphone.

What is fastboot?

Fastboot is basically a diagnostic tool used to modify the Android file system via a computer when the phone is in bootloader. The commands are basic and include, for example, «flash» (install) an image of boot or one bootloader.

nexus 5 fastboot unlocked

You can start in recovery mode using the ADB commands / © NextPit

What are drivers?

A driver is a small program that allows an operating system – Windows, in this case – to recognize a device and interact with or use it. Each device and component has its own driver, such as the HD, mouse, keyboard, etc.

On our smartphones, the system uses the driver, and the ADB mode and the fastboot also, since the interface is not the same. In short, Windows needs a driver for the smartphone, for the fastboot and for ADB. They are common to all smartphones.

Enabling USB debugging

In Settings smartphone, go to About the phone / device or in System> About the device and tap 7 times Build number or in Version number. A message stating that the Developer mode has been activated (or is already activated) will appear. Then, go back to Settings > System> Developer options and enable USB debugging.

adb 06

Tap Version number 7 in a row to become a developer / © NextPit (screenshot)

Changing the USB connection mode

Connect the smartphone to the PC and pull the notification tab. There, touch the Android System notification. Choose any of the transfer modes: File Transfer, Transfer MTP or PTP photos.

adb 07

Choose one of the transmission protocols / © NextPit (screenshot)

Windows Drivers

In our test with Windows 10, it was not necessary to install additional drivers to immediately access the ADB interface. Until Windows 7, communication between the computer and the smartphone was more complex. Ideally, you should search Google for the model name of your device followed by «windows driver».

Download the driver for your smartphone and leave it installed in Windows. For the ADB and fastboot drivers, we have a simpler solution below.

Installing Minimal ADB and Fastboot on Windows

Usually, you need to install the drivers for ADB and fastboot in Windows as well. However, thanks to this tool developed by users of the XDA-Developers forum, you can skip this process, needing only the smartphone driver installed on Windows.

adb 01

Minimal ADB and Fastboot / © XDA Developers

To install, follow the steps:

  • Keep your smartphone connected to your computer, with USB debugging enabled;
  • Have the smartphone driver installed on Windows;
  • Download the Minimal ADB and Fastboot setup.exe from this link;
  • Follow the Installer’s instructions and select where you would like to install Minimal ADB and Fastboot as well (for simplicity, install on the desktop);
  • After this choice, you can also create or not a folder in the Start menu for the installation, selecting the desired option;
  • After completing the Installation Wizard, you can start Minimal ADB and Fastboot; You can also start Minimal ADB and Fastboot by navigating to the Start Menu folder chosen to create during installation or the desktop shortcut created;
  • You should now see a command window open, and it is now possible to give the ADB and Fastboot commands to your device.

With the phone connected to the computer via USB, type in the command window the command adb devices. On your smartphone you will see an authorization warning message. Once you have enabled USB debugging on your smartphone and allowed by the computer, your device should appear in the device list in the command window.

adb 02

Authorize the device / © XDA Developers

Installing ADB on Linux and Mac

Linux and macOS systems are based on Unix, which makes the process easier, as we don’t have to worry about drivers. In addition, the tools are kept up to date thanks to the simpler package management systems.

Mac users can install the Homebrew manager and run brew cask install android-platform-tools in the computer’s Terminal application. Linux users need to search the system for android-platform-tools and install it. In addition, ADB tools must be defined globally, so that you can use the following ADB commands.

After installing ADB on macOS or Linux, connect the smartphone with the debugger enabled and run the command adb devices in the command window. The Terminal will indicate an unauthorized device, and authorization will be requested on your smartphone. You must grant this permission.

Installing an update using the ADB

Change the name of the downloaded update file to update.zip. Place this update file inside the user folder (for macOS and Linux) or at the root of the system for Windows, all on the computer.

Turn off your device, and with it still connected to the computer via USB cable, turn it on with the power button and the volume button down. When the menu appears, use the volume buttons to select Recovery Mode. Another way to do this is by running adb reboot recovery in the command window, with the smartphone connected normally.

adb 04

adb reboot recovery / © NextPit (screenshot)

If the warning No command appears, press and hold the power and volume buttons up for three seconds, then release the volume button, until a new menu, with words only, appears. Using the volume buttons, select Apply update from ADB.

In the command window, run adb sideload update.zip. In the command window, a percentage will appear running, and on your smartphone screen will appear the phrase Installing update …. Just leave it running and the update will be done alone from there.

adb 05

adb sideload update.zip / © NextPit (screenshot)

When finished, you will return to the word menu and the sentence at the bottom of the screen will be Install from ADB complete. You can then select Reboot system now in the menu.

Other ADB commands

adb sideload update.zip: This command is used to install files, such as official updates, on your phone. More complex installations, such as custom ROMs, however, must be done through the interface fastboot.

adb install [android app].apk: is used to install an Android app (apk) on your smartphone or tablet.

adb backup -f FullBackup.ab -apk -all: Here the idea is to backup your app’s data. In practice, the results are not reliable. Not all apps allow a backup via ADB, meaning you might be better off using an alternative method.

adb devices: With this command, you have an overview of all devices connected to the computer with ADB support. Here you can see the device’s identification and status. If the word Unauthorized (unauthorized) appears, it means that it is necessary to allow the computer to communicate with the smartphone.

adb reboot: does the reboot your smartphone.

adb reboot recovery: does the reboot in mode recovery.

adb reboot bootloader: does the reboot at the bootloader. In this mode, you can communicate with the device through fastbootcommand.

adb push [pasta no computador / nomedoarquivo.extensão] [Pasta no computador]: this command moves a file from the folder indicated on your computer to the folder indicated on your smartphone

adb pull [pasta no computador / nomedoarquivo.extensão] [Pasta no computador]: by running this command, you will save the file from your smartphone to your computer. If the directory is not specified, the file will go to the ADB executable folder or to / home.

adb shell screencap -p /sdcard/screenshot.pngadb pull /sdcard/screenshot.pngadb shell rm /sdcard/screenshot.png: Make a print and send it to the computer.

adb help: an overview of all ADB commands, help syntax.

ADB errors: common error messages and solutions

Command Not Found: you made a mistake or the command you made is not yet available in your version of ADB. Check the command through ADB help or upgrade to a new version of ADB.

No command: hold the power and volume buttons up for three seconds, then release the volume button, until a new menu, with words only, appears.

No Device / No device: The USB cable is not connected properly, the ADB interface is not running on your phone, or your computer does not recognize the smartphone. Try using a different USB port, another cable, reconnect the USB debugging, check the drivers, the computer or restart the device / computer.

Server is out of date: The version of ADB on your computer and the version of Android on your smartphone must be compatible, otherwise this error occurs. Update the ADB version by downloading a new version of the tool.

Waiting for device: This error is basically the same as the No Device / No device. Your computer does not recognize your smartphone. Try the solutions above.

And now?

Now you know the ways in which you can modify your smartphone. Whether installing a update, doing root, or installing a firmware differently, you will have full control over your phone.

Need more help? Use the comments.