The Android Debug Bridge, or ADB for short, is one of the most powerful tools for your favorite Android phone. While it may take some time to learn all the options the command-line tool offers, like installing your favorite custom ROM, activating it, and using it with guidance is as easy as running a simple line of code on your computer. The best part is that it doesn't matter which device you use to send ADB commands to your phone. ADB works on Windows, macOS, Linux, ChromeOS, and even on the web or your phone, at least to an extent.

What is ADB?

The Android Debug Bridge is a powerful command-line tool that gives you access to hidden features on your Android phone. It consists of three main parts:

  • The client. The device you're sending commands from, which is usually your computer.
  • The daemon. Runs on your phone as a background service and receives commands from the client.
  • The server. A service running in the background on your client that establishes the connection between the two devices.

ADB is a debugging tool for app developers, helping them create apps and troubleshoot issues in their code on a live phone environment. The tool is more than that, though. It also lets you access hidden settings on your phone and install system updates or a custom ROM.

Android setup

To get started with ADB, you'll tweak some settings on your Android device. If you haven't already, activate the developer options in your system settings. The steps can vary depending on your phone, but generally, these are the steps you'll follow:

  1. Go to your phone's system settings.
  2. Find your device's build number in the About phone section or similar.
  3. Tap the build number seven times until you see a message that says, "You're now a developer." You may be prompted to enter your screen.
  4. Look for the new Developer options that appear in your system settings after completing the step before.
  5. Within the developer options, enable USB debugging. This prepares your device for ADB connections with your computer (or the client you chose).
  6. If you want to connect your phone to your client via Wi-Fi, enable the Wi-Fi debugging toggle instead of or in addition to USB debugging.

We recommend turning off USB debugging and wireless debugging when you're done with what you want to do in ADB for security reasons. As mentioned, these steps can vary depending on your phone, so you may need to dig through your system settings to find these options.

Installing and setting up ADB on your client

Nexus Tools is the fastest way to get ADB up and running on your computer. It's an open source tool created by Android Police alumnus Corbin Davenport. Nexus Tools automatically downloads the latest platform tools from the Google website, extracts them, and adds them to your system's path for ease of use.

Set up ADB on macOS, Linux, and Chrome OS with Nexus Tools

To get started, paste the following command into a macOS or Linux terminal and press Enter:

        bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/main/install.sh)
    

When it's finished installing, open a new terminal window and confirm that ADB works with the ADB devices command. If your phone is connected with USB debugging enabled, you'll see its ID.

Screenshot of the Nexus Tools installation progress in a macOS terminal

The script also works for the latest Macs with custom M chips and Linux on Chromebooks (here's how to enable Linux on Chrome OS).

Install ADB on Windows with Nexus Tools

On Windows, you'll need to go a slightly different path. You'll open the Windows PowerShell (search for it using the Start menu) and paste the following command into it:

        iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/corbindavenport/nexus-tools/main/install.ps1'))

To confirm that it works on Windows, open a new PowerShell window, connect your phone, and enter the ADB devices command.

Perform a manual setup in Windows

If you prefer to set up ADB and the platform tools on Windows manually, we've got you covered:

  1. Download the SDK platform tools for Windows from the Android Developers website.
  2. Extract the ZIP file into a folder you can easily remember (like C:/platform-tools)
  3. Open a command window in the folder by holding Shift, right-clicking an empty spot in the folder, and selecting Open command prompt/PowerShell here. Then you can start using ADB. Connect your phone and enter .ADB devices to see if it's working. A list with attached devices appears.
    Screenshot of Windows PowerShell with ADB devices command confirming a phone is connected
  4. If your computer doesn't recognize your phone, you may need to install its respective Windows USB driver. Alternatively, there's an open source universal driver if you don't want to go through the hassle of finding the correct one for your device.

If you only want to open a command window and use ADB without navigating to your platform-tools folder first, add the folder to your Windows path (Nexus Tools takes care of that automatically for you):

  1. Search for system environment in the Windows Start search and select Edit the system environment variables from the results.
  2. Click Environment Variables toward the bottom of the window that opened.
  3. In the lower section of the next window, under System variables, look for the Path row. Select it and click Edit.
  4. Select the New button in the Edit environment variable window and add the path with the platform tools. In our example, that's C:/platform-tools.
  5. Exit all windows and save the changes you made by selecting OK.
  6. Open a new command prompt or PowerShell and see if ADB devices works without navigating to your platform-tools folder. You also won't have to add a period (.) in front of it anymore.

You may need to restart your computer before the changes take effect.

Install Android Studio on Windows, macOS, Linux, and Chrome OS

If you're a developer or looking to get into Android app development, install Android Studio. It's Google's official IDE (Integrated Development Environment) for Android applications and has all the tools you need to create your projects, including ADB and fastboot. The software also ensures that your tools are always up to date. You can download Android Studio on the Android Developers website. The installation process is straightforward. Follow the on-screen instructions from the installer.

Screenshot of Android Studio with command line tool and app preview window opened

Set up the ADB shell on your phone

If you don't want to root your phone or install a custom ROM and only need access to the ADB shell, you don't need to connect your handset to a computer. The open source LADB app allows you to run a shell locally, utilizing the wireless ADB protocol. However, setting it up is a little convoluted, and you'll need to be on Android 11 or higher to be truly free from a computer. We have a tutorial that walks you through the process.

How to use webADB

If you don't have Android 11 or higher or prefer to work with a bigger screen, webADB might be for you. It's an open source web app that you can use to run the ADB shell, but it also comes with a file manager and supports SCRCPY for screenshots and screencasts in apps that don't allow you to take them the regular way (on Android 11 and lower, that is). The biggest caveat: Being a web tool, you have to trust that the developers don't do anything fishy with your phone. You're granting an unknown party low-level access, so you might want to opt for a local install instead. Here's our hands-on with the tool.

Screenshot showing WebADB in action

Using ADB

These are the simplest ways to get up and running with ADB, but there are other ways. If you use Homebrew on Mac or Linux, a formula automatically installs ADB in the right spot, similar to Nexus Tools. You can also manually install ADB on Linux and macOS, as detailed in the Windows tutorial.

Depending on which install method you opted for, you may have to add a period (.) in front of ADB commands to make them work. If you haven't added your SDK tools installation to your path on Windows, you must run a terminal from the SDK tools folder (this isn't the case if you installed it using Nexus Tools).

You can enable or disable many advanced features and tweaks via ADB and the ADB shell. Our favorites include SCRCPY, APK installation, and stock-ifying Amazon Fire tablets.