SEARCH

How-To Geek

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

android-plush

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.

Image Credit: LAI Ryanne on Flickr

Install Java JDK & Android SDK

Before installing the Android SDK, you’ll have to install Oracle’s Java development kit. You can download it from here – ensure you download the x86 (32-bit) version, even if your computer uses a 64-bit operating system.

Even if you already have the Java runtime (JRE) installed, you’ll need to install the JDK as well.

image

With the Java JDK installed, you can now download the Android SDK from Google and install it on your computer. If you see a Java-related error during installation, ensure you downloaded and installed the x86 version of the JDK, not the x64 one.

Android SDK Setup

Once the Android SDK is downloaded and installed, launch the SDK Manager application from your Start menu.

Enable the Android SDK Platform-tools checkbox and click the Install button. This downloads and installs the platform-tools package, which contains ADB and other utilities.

image

Enable USB Debugging

To use ADB with your Android device, you must enable USB debugging on it. You’ll find this option under Developer Options on your device’s Settings screen.

image

Test ADB and Install Device Drivers

Locate the android-sdk’s folder. Note the SDK path displayed at the top of the SDK Manager window.

image

If you used the default install location, you’ll find ADB in the following directory:

C:\Users\NAME\AppData\Local\Android\android-sdk\platform-tools

If you used a different install location, you’ll find ADB in the platform-tools directory inside your android-sdk directory.

Browse to this directory, hold Shift and right-click inside it, and select Open command window here.

image

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

image

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.

Your manufacturer may provide a downloadable driver package for your device. You can also try installing the Google USB Driver from the Extras folder in the SDK Manager window.

image

You may have to force Windows to use the installed drivers for 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.

image

On the Driver tab, click Update Driver.

image

Use the Browse my computer for driver software option.

image

Navigate to the following folder if you installd the Google USB driver:

C:\Users\NAME\AppData\Local\Android\android-sdk\extras\google\usb_driver

(Check the extras\google\usb_driver folder under the android-sdk folder if you installed the Android SDK to a non-default location.)

image

ADB Commands

Once you’ve got your drivers correctly installed and the adb devices command indicates it can communicate with your Android smartphone or tablet, you can start using ADB.

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.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 10/3/12

Comments (5)

  1. Arpit Jain

    ADB not ABD … :P title check ..
    cool stuff was a nice read :)

  2. PhoenixPath

    ADB, the 100,000 times easier method:

    Install WugFresh’s “Nexus Toolkit” from here:
    http://www.wugfresh.com/

    Open folder the toolkit installed to and create a shortcut to the ‘Data” folder inside it on your desktop.

    Now, whenever you need to do some ADB wizardry, simply right-click on the folder-shortcut while holding down the shift key and select, “Open command window here”.

    From the DOS Window that opens, enter any ADB commands you like.

    Easy Peasy.

  3. Stephan

    It isn’t a good idea to keep USB Debugging on when your not using it, someone can install all they want without unlocking it. O yea they can do that too.

    Just sayin…

  4. Bob Buckheit

    I have written a Java app using the information supplied here and everything works very nicely. Now I have to package the app into webstart for distribution and I cannot figure how to specify how to get to ADB in the jnlp. Do you have any suggestions?

  5. Jim

    Here is where I am getting held up:

    “With the Java JDK installed, you can now download the Android SDK from Google and install it on your computer.”

    When I download the ADT bundle from the link provided, it comes as a large .zip fie with two sub-files, “eclipse” and “SDK”. No installer. I try to run Eclipse.exe from the eclipse folder but it generates an error, I am assuming at this point because I was not able to go through the installation process? Or is running eclipse.exe for the first time supposed to take me through an installation process? This is where I am stalled out. Any information is greatly appreciated.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!