Skip to content

Installing adb

brlbr edited this page Mar 27, 2022 · 5 revisions

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an Android-powered device connected to a computer via USB. One of its useful features is the ability to capture a debug log (logcat).

Downloading

Normally, adb is made available by installing the much larger Android SDK. But installing the entire SDK is overkill when all that is needed is adb. To download a much smaller zip file containing adb and a few other platform tools from the SDK, use this link and check for your operating system. Of course, your use of these files is subject to the terms contained in the most recent version of the Google's SDK Licensing Agreement.

Installing

Simply unzip the downloaded file in a folder somewhere. There is no installation process to go through. (Uninstalling is equally easy -- just delete the files.) The adb program is located in the platform-tools folder. Open a command prompt or shell in that folder and type adb to see a summary of available command line options. Additional usage info can be found here.

Additional Setup Steps

Enable Debugging

You will need to enable Android debugging on your device. Details for doing that can vary with the device and Android version. Follow the instructions found here.

Connect your device

If using Windows, you may need to install a USB driver for your device, if you haven't already done so. See here for details.

For Linux, you may need to add a udev rules file. See here for details.

Note that your device may prompt you for access permission the first time you connect, so be sure to have it unlocked so you can see the prompt when connecting.

You can verify that your device is connected correctly by executing adb devices from the platform-tools folder. If connected, your device will be listed under the list of devices attached. If the device is listed but is shown as offline, then try killing the adb server (see below), disabling Android debugging on the device, and then start over.

When done using adb, you can execute adb kill-server to shut down the adb server on your computer and terminate the connection to your device. You can also disable Android debugging on the device, if you wish.

Clone this wiki locally