Best daily deals

Links on Android Authority may earn us a commission. Learn more.

How to set up and use ADB

ADB is a powerful tool, here's how to get started.
By
December 27, 2022

ADB, or Android Debug Bridge, lets you control your Android smartphone or tablet via a command line interface. It’s supported on all desktop operating systems, including Windows, macOS, Linux, and even Chrome OS. While its primary purpose is to help developers debug their apps, it has other uses too. You can use ADB to sideload APK files, delete system apps, install software updates, factory reset your device, unlock its bootloader, and more. Find out how to use it below.

See also: How to factory reset Android devices

QUICK ANSWER

Using ADB is pretty straightforward, but you first need to enable USB Debugging on your Android device and download the command line utility on a computer. Keep reading for a step-by-step guide.


JUMP TO KEY SECTIONS

How to set up ADB on a computer: Windows, macOS, and Linux

There are two ways to set up the ADB command line on your computer. The easiest way is to install Android Studio, which is primarily a development environment for Android apps. But if you’re not an app developer, it’s a large unnecessary download since all you need is the tiny ADB utility. Luckily, you can also download that portion separately by following these steps:

Head to the Android SDK Platform Tools page. Click on the Platform-tools download link for your operating system. You should now have a zip archive in your Downloads folder. Unzip the archive into a new folder.

android adb platform tools extraction screenshot
Calvin Wankhede / Android Authority

Launch a command line tool. On Windows, open Command Prompt via the Search menu. If you’re on macOS, open Terminal instead.

android adb how to screenshot 2
Calvin Wankhede / Android Authority

Navigate to the folder from earlier inside the command line window. A sample command to do so on Windows is C:\Users\<user>\Downloads\platform-tools. Use your operating system’s file browser to find the exact path.

android adb how to screenshot 3
Calvin Wankhede / Android Authority

At this point, we’re nearly ready to execute ADB commands. However, you still need to allow your Android device to accept an ADB connection from your computer.

How to enable USB Debugging on Android for ADB connections

With your computer now prepared and ready to go, the hard part is out of the way. On your Android device, follow these steps:

Head to the Settings app on your Android device, scroll to the bottom, enter System, and tap About Phone. Next, find the Build Number entry and tap it repeatedly. After seven taps, you should see a notification stating that you’re now a developer.

Go back to the main Settings screen, enter the newly unlocked Developer options menu, and enable USB debugging. Your device will warn you against enabling this feature, tap OK to continue.

And that’s it — you’ve now prepared your Android device to accept incoming ADB connections. Simply connect it to your computer via a USB cable and follow the instructions in the next section.

How to use ADB: Connection, commands, and more

With everything set up, return to the command line window on your computer and initiate a connection with the adb devices command. This will bring up a confirmation prompt on your Android device, asking if you trust the computer. Tap Allow to proceed and optionally, check the “Always allow from this computer” box.

USB Debugging Prompt on OnePlus 8 Pro
C. Scott Brown / Android Authority

Once authorized, you should be able to use the adb devices command without any errors. You should see one connected device show up here. If the output is blank instead, check the connection between your computer and Android device and try a different cable. Alternatively, you might need to download and install USB drivers for your device. You can typically find this on your device manufacturer’s website, like this one for Samsung.

adb devices terminal window output

As mentioned previously, there’s plenty you can do with ADB commands. Here are a few examples to try out:

  • adb install app.apk — This will install an apk file on your device. Keep in mind that you’ll have to copy the apk file to the platform-tools folder or specify a path in the command instead.
  • adb uninstall x — Replace the x in this command with a package name of your choice. This is a popular command used to remove manufacturer apps and other bloatware that often can’t be uninstalled from within the Android settings menu.
  • adb logcat — This command generates a device log file that allows you to find error messages and debug information.
  • adb push <local> <remote> or adb pull <remote> <local> — Copy files to or from your Android device. You’ll have to specify the source and destination paths of the file at the end of either command.
  • adb reboot — Reboot your Android device. You can also specify adb reboot fastboot or adb reboot recovery to enter the bootloader and recovery menus instead

For even more commands, simply enter the adb help command.


FAQs

ADB commands allow you to install apps, software updates, and control your Android smartphone from a computer.

The ADB sideload command allows you to manually install an OTA update or custom ROM on your device from a computer. This command lets you install software updates or a custom operating system without booting into Android.

The ADB pull command will save files to the platform-tools or adb folder if you haven’t specified a destination. If you want to specify where a file is saved, add a path on your computer to the end of the command like this example on Windows: adb pull /sdcard/pic.jpg %USERPROFILE%\Downloads\

ADB, or Android Debug Bridge, is a command-line tool that allows developers to find errors or other problems while testing an app or software update. The adb logcat command, for example, outputs a log file for debugging.