The Android Debug Bridge, or ADB, is a command-line tool that is part of the Android SDK Bundle. (It is also available separately.) It is used to issue commands to Android phones and tablets when they are connected to a PC by USB.
ADB was specifically designed for Android developers, but there are many useful things you, as a regular consumer, can do with ADB. These include sideloading applications, rooting your phone, transferring files between your phone and your computer, creating backups, and recording your screen.
But how do you get started with it?
Install ADB on Windows
1. Download the Platform Tools for Windows. (You can download it for Mac or Linux, too, on the same web page.)
2. Extract the zip file after download. You may find it useful to save it in your “C:” drive or Home folder (in Linux) to make it easy to find.
3. Open the folder platform-tools and hold down the Shift key while right-clicking on the folder.
4. Choose the option to “Open PowerShell window here.” (It could say, “Open command window here” on some computers.)
When you finish these steps, ADB is set up on your computer. The next step is to enable USB debugging on your phone.
Enable USB Debugging on your Android mobile device
The steps for enabling USB debugging may vary slightly on different Android phones. However, it will be very similar to the steps below.
1. Go to your phone’s settings.
2. Click on “About Phone -> Software Information.”
3. Scroll down to the Build number, and tap on it seven times to unlock developer options.
4. Go back to the About Phone screen, and Developer options should be listed as a choice. Tap that option.
5. Click to enable USB debugging, and confirm that you are choosing to do this.
6. Connect your phone to your PC.
7. When the message appears that says, “Allow USB debugging,” choose “Allow.”
It is a good idea to check the option to “Always allow this computer” if you are using a computer you trust. It makes the experience you will have when using ADB smoother and enables you to rescue data from a phone that is no longer working.
To determine if the connection between your phone and computer are working, test ADB by running the same steps you did to open the command prompt above.
1. Connect your phone to your PC.
adb devices in the command window and hit Enter.
3. If it lists your device, you have successfully made the connection.
What if it doesn’t work?
If you do not see the message on your phone that says, “Allow USB debugging,” after you have set everything up, don’t panic. The fix may be as easy as restarting your phone or changing the options for USB to transferring images or MIDI.
If it still doesn’t appear, try running the ADB test. If you get some scary-looking red text telling you that “ADB is not recognized as an internal or external command … ” try the following steps. They will add system variables for ADB to your computer.
1. Go to Oracle’s official website.
2. Scroll down to find the links for all the available options for Java SE to download.
3. Select “dk-12.0.1_windows-x64_bin.exe.” (That is the latest version as of this post.)
4. Download JavaSE.
5. Double-click on the setup file to install it.
6. After the Java installation finishes, right-click on the icon for My Computer in Windows Explorer.
7. Select “Properties.”
8. In the window that opens, select Advanced System Settings.
9. Click on the “Environment variables” button.
10. Select the path listed in the bottom box of the window and click Edit.
11. Click on “Browse” and navigate to the folder where you earlier saved your platform-tools folder.
12. Select the folder, platform-tools, and click OK.
13. Now, in Windows Explorer, navigate back to the platform-tools folder, and open the command prompt the way you did in the beginning.
14. In the command prompt, type
adb devices. Your device should show up now.
If your device is “unauthorized,” check your phone. The USB debugging box should be visible now. Allow your computer access to your phone, and you are set up and ready to use ADB!
Our latest tutorials delivered straight to your inbox