Skip to content

Android Debug Bridge (adb)

What is adb?

The Android Debug Bridge or commonly known as adb is a programming software tool to aid in debugging of devices with the Android operating system. This allows for communications between an Android device and a personal computer with the use of a USB cable, Wi-Fi, etc.

Installation

The adb application is provided within Android SDK Platform Tools package and can be installed on a variety of operating systems.

Arch Linux

# pacman -Sy android-tools

Debian

# apt install adb

macOS

  1. Download the Android SDK Platform Tools.
  2. Decompress the downloaded archive to the desired install location (eg. platform-tools-latest-darwin.zip).

Windows

  1. Download the Android SDK Platform Tools.
  2. Decompress the downloaded archive to the desired install location (eg. platform-tools-latest-windows.zip).

Enable Debug Mode

In order to use Android Debug Bridge (adb) with a device, you’ll need to enable developer options and USB debugging on an Android-based device by following the instructions listed below. Please beware each step outlined may vary depending on the Android operating system version being used.

  1. On the Android device go to "Settings" > "About Phone" > "Software information".
  2. Touch on "Build number" seven times.
  3. Go to "Settings" > "Developer options".
  4. Scroll down, and check the "Android debugging" or "USB debugging" entry under "Debugging".
  5. Plug the Android device into a computer.
  6. List devices connected to the computer via the terminal or command prompt.

    $ adb devices
    
    List of devices attached
    XXXXXXXXXXX device
    

    Note

    The "XXXXXXXXXXX" represents the serial number of the connected device.

  7. Confirm permission for USB debugging.

    A dialog will appear on the Android device asking for permission to allow USB debugging. Check "always allow", and choose "OK".

    Tip

    If the dialog is not appearing or the list of devices is empty, check if you installed adb properly.

    Tip

    On Windows, make sure the Android device manager shows the device and doesn’t display a yellow triangle next to it.