in

How to Install and Use ADB, the Android Debug Bridge Utility

how-to-install-and-use-adb,-the-android-debug-bridge-utility

Android logo ADB

To install and use Android Debug Bridge Utility (ADB), download the platform tools from the ADB page and extract them anywhere. Open the Settings app on your phone, go to the “System” page, tap the build button seven times, and connect your phone to your PC. Open PowerShell, navigate to the platform tools folder, then run any adb command.

ADB, Android Debug Bridge, is a command-line utility included with Google’s Android SDK. ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, and more.

We’ve covered some other tricks that require ADB in the past, including backing up and restoring your smartphone or tablet and installing Android apps to your SD card by default. ADB is used for a variety of geeky Android tricks.

Step One: Download Platform Tools

Download Platform Tools.

Head to the Android SDK Platform Tools download page. Select the link for your operating system from the “Downloads” section. This will download a ZIP file, which you can unzip wherever you want to store the ADB files–they’re portable, so you can put them anywhere you want.

That’s all we have to do for now. Just make sure to remember where you unzipped the files, we will need to access that later.

Step Two: Enable USB Debugging on Your Phone

To use ADB with your Android device, you must enable a feature called “USB Debugging.” Open your phone’s app drawer, tap the Settings icon, and select “About Phone”. Scroll all the way down and tap the “Build Number” item seven times. You should get a message saying you are now a developer.

Head back to the main Settings page, and you should see a new option in the “System” section called “Developer Options.” Open that, and enable “USB Debugging.”

Enable USB Debugging.

Later on, when you connect your phone to your computer, you’ll see a popup entitled “Allow USB Debugging?” on your phone. Check the “Always allow from this computer” box and tap OK.

Step Three: Test ADB and Install Your Phone’s Drivers (if Needed)

Open the Command Prompt (PowerShell and Terminal will also work) and change the directory to where you unzipped the file earlier. You can do this by entering the command below. Replace the file destination with your own:

CD C:”Program Files”platform-tools

To test whether ADB is working properly, connect your Android device to your computer using a USB cable and run the following command:

adb devices

Note: If you’re using PowerShell or the Terminal with a PowerShell profile, you’ll need to run ./adb devices instead.

Run

You should see a device in the list. If your device is connected but nothing appears in the list, you’ll need to install the appropriate drivers.

In the vast majority of cases, your PC will automatically detect your phone and set it up with the appropriate drivers. If that doesn’t happen, you can usually find the drivers for your device from the XDA Developers forums or your manufacturer’s website. The drivers for Google devices, like Pixel phones, can be found on Google’s website. Google also has a list of USB drivers sorted by manufacturer that will save you a ton of time.

Note: Make sure to carefully follow the instructions for installing your device’s drivers if specific instructions are provided. 

If you download the drivers manually, you may have to force Windows to find them on your device. Open the Device Manager (click Start, type “Device Manager”, and press Enter), locate your device, right-click it, and select Properties. You may see a yellow exclamation mark next to the device if its driver isn’t installed properly.

On the Driver tab, click “Update Driver.”

Use the Browse my computer for driver software option.

Find the drivers you downloaded for your device.

Note: If you downloaded the drivers from your OEM or Google, look for an executable or INF file in the drivers folder.

Once you’ve installed your device’s drivers, plug in your phone and try the adb devices command again:

adb devices

Or:

./adb devices

If all went well, you should see your device in the list, and you are ready to start using ADB!

If running adb devices still won’t return any devices, there are a few things you can try:

  • Swap out your USB cable for a higher quality one
  • Plug the USB cable into a different port
  • Plug the USB cable directly into the USB ports on your motherboard (at the back), rather than the ports on the front of your PC or on a USB hub.
  • Change your phone’s USB mode to PTP, MTP (File Transfer/Android Auto), or USB Tethering.

Step Four (Optional): Add ADB to Your System PATH

As it stands, you have to navigate to ADB’s folder and open a Command Prompt there whenever you want to use it. However, if you add it to your Windows System PATH, that won’t be necessary–you can just type adb from the Command Prompt to run commands whenever you want, no matter what folder you’re in.

The process is a bit different on Windows 11, 10, and 7, so check out our full guide to editing your System PATH for the steps required to do this.

RELATED: How to Edit Your System PATH for Easy Command Line Access in Windows

Useful ADB Commands

In addition to the variety of tricks that require ADB, ADB offers some useful commands:

  • adb install C:package.apk — Installs the package located at C:package.apk on your computer on your device.
  • adb uninstall package.name — Uninstalls the package with package.name from your device. For example, you’d use the name com.rovio.angrybirds to uninstall the Angry Birds app.
  • adb push C:file /sdcard/file — Pushes a file from your computer to your device. For example, the command here pushes the file located at C:file on your computer to /sdcard/file on your device
  • adb pull /sdcard/file C:file — Pulls a file from your device to your computer — works like adb push, but in reverse.
  • adb logcat — View your Android device’s log. Can be useful for debugging apps.
  • adb shell — Gives you an interactive Linux command-line shell on your device.
  • adb shell command — Runs the specified shell command on your device.

For a full guide to ADB, consult the Android Debug Bridge page on Google’s Android Developers site.

Leave a Reply

Your email address will not be published.

9to5mac-gift-guide:-iphone-wallets-with-form,-function,-and-flexibility

9to5Mac Gift Guide: iPhone wallets with form, function, and flexibility

how-to-play-youtube-in-the-background-on-iphone-and-android

How to play YouTube in the background on iPhone and Android