Unlock your Android device's potential with the Android Debug Bridge (ADB)

androidusb primary

The Android Debug Bridge (ADB) is a command line tool made for developers. It's used to issue commands to device emulators and/or Android phones and tablets connected to a computer via USB. While ADB is really meant for developers working on Android apps, it also makes it possible to do some things that regular consumers might want to do.

You can side-load applications that aren't available in the Google Play Store, or take screen recordings of your Android phone, for example. Here’s what you can do with ADB, and a guide on how to install ADB on your Windows machine.

Things You Can Do with ADB

Rooting: ADB plays a pivotal role in gaining root access to an Android device. In fact, you generally must have ADB properly installed in order to root your phone or tablet, and once you have root access, you’ll use several ADB commands as you continue to hack and toy with it.

Push and Pull Files between your PC and Android Device: Two simple commands, adb push and adb pull, let you easily transfer files between your PC and Android device. Again, this is more helpful when you’re working with rooted devices, since you can achieve the same end using Windows File Explorer or device management apps like AirDroid, but it’s a helpful and easy tool for getting information from one device to another, and helps you learn commands along the way.

adb install from unknown sources

If you're going to install APK files, you need "Uknown sources" checked.

Sideloading Apps: Sometimes you’ll want to install an application that’s either not available on Google Play in your location or was removed from the store (like the immensely popular Flappy Bird game). The adb install command will install an APK file onto your Android device, as long as you have enabled installation of apps from unknown sources in settings.

Setting up ADB

To setup ADB on your computer, the first thing you’ll need to do is install the Android SDK, which you can download from the Android SDK site. Click the big “Download the SDK” button to begin the download.

You’ll need to extract the file, and we recommend doing so directly to your C:\ drive since it will save you a lot of time navigating to subfolders to issue ADB commands. Once complete, double click the SDK Manager.exe file and install the default packages.

adb tap build number seven times

On recent versions of Android, you have to tap the Build Number 7 times to unlock Deverloper Options.

To connect your phone, you’ll need to install either the Google USB Driver for Nexus devices or the OEM USB driver for your particular phone (for a walkthrough on installing a USB Driver, follow Google’s handy guide). If you're on OS X or Linux, you won't need this driver. Next, you’ll need to enable USB debugging on your device. You'll find the option in different locations depending on which version of Android you have:

  • Android 3.2 or older - Settings > Applications > Development
  • Android 4.0 and 4.1 - Settings > Developer Options
  • Android 4.2 - Settings > Developer Options (but Developer Options is hidden by default, so you’ll need to go to Settings > About Phone and tap seven times on the Build Number entry to unlock Developer Options).

Once you have Developer Options enabled, plug your phone into your computer's USB port and wait for the driver to install. After it’s installed, open a Command Prompt window and enter the following command to navigate to the platform tools folder:

cd C:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\platform-tools

On OS X, you'd use Terminal, and of course you'll need to change the location to match the place you extracted the developer tools.

Now, you’re in the file location that contains the adb file and lets you issue adb commands to your Android device. Type ‘adb devices’ and hit enter to run the devices command.

adb device command window

If the adb devices command lists a device, you're in business!

If you see a device listed, you have successfully connected your phone or tablet and should now be able to issue adb commands. To learn more about the kinds of commands you can issue, check out Google’s ADB page.

Connecting your phone or tablet to your computer via ADB is the first step into a larger world. Once you can access your device as developers do, you'll find all sorts things you can change, customize, and tweak to your liking. A word of warning: you can also permanently mess up your device. So make sure you have a backup!

To comment on this article and other Greenbot content, visit our Facebook page or our Twitter feed.
Shop Tech Products at Amazon
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.