Will Verduzco · Oct 10, 2013 at 10:30 pm

Beginner’s Guide to the Android Debug Bridge

Most of us here are already quite familiar with the ADB (Android Debug Bridge). Heck, I’d even wager that many of us use it on quite a regular basis—adb pushing and pulling files, adb rebooting, running shell commands, and so on. Most new users, however, have not had such exposure. And let’s face it: For youngsters born after the emergence and popularization of the GUI, command line interfaces can be rather intimidating. So if you’re a seasoned veteran who knows ADB like the back of your hand, this article is not for you. But if you’re a new user looking to learn a little more about this great tool, read on!

The Android Debug Bridge, which comes as part of the Android SDK, allows for communication between your desktop computer and target device. So what can you do with ADB? Quite a bit. As alluded to earlier, you can push files to the device from the client PC, pull device from the device to the client PC, you can reboot (to Android, bootloader, or recovery), record a logcat, obtain a bug report, execute many standard Linux commands, and much, much more.

The biggest problem for new users becomes knowing what commands can be executed and remembering the proper syntax. Luckily, these commands and their syntax are all pretty understandable. For example, take a look at the following commands in proper syntax:

  • adb start-server : This command starts the adb daemon on your desktop computer and allows your computer to interact with your device. Note that this command isn’t essential, as executing any other ADB command will automatically start the daemon.
  • adb kill-server : As you would expect, this kills the adb daemon.
  • adb logcat : This generates a logcat, which is quite useful when figuring out where things are going wrong. You can redirect the output into a text file by using “>”. For example, you can type “adb logcat > logcat.txt” to record your logcat as logcat.txt.
  • adb bugreport : Generates a simple bug report. Just like logcat, you can redirect this into a text file using “>”
  • adb install <local apk name> : Installs an APK from your desktop computer directly to your device.
  • adb pull <source path and filename> <destination path and filename> : Pulls the specified file and deposits it into the specified folder with the specified name.
  • adb push <source path and filename> <destination path and filename> : Functions like adb pull, but in reverse.

The above, however, is not nearly comprehensive. These are just some of the more common commands that you’ll encounter.

For those looking to learn a few more, or those who would simply like to see a visual output of these commands in action, XDA Recognized Contributor doctor_droid has created a basic guide that covers everything a beginner needs to know in order to accomplish basic tasks through ADB.

Doctor_droid has also includes a direct link to the required ADB binaries for Windows users so that you don’t have to download the SDK for the sole purpose of getting ADB up and running. While the installation procedures are strictly for Windows users, the rest of the guide is equally valid for Linux and Mac users.

If you’re a new user looking to learn a little more about ADB, or even if you’re a seasoned vet looking to make sure you know all of the common commands, head over to the guide thread to learn more.


_________
Want something on the XDA Portal? Send us a tip!

Will Verduzco

willverduzco is an editor on XDA-Developers, the largest community for Android users. Will Verduzco is the Portal Administrator for the XDA-Developers Portal. He has been addicted to mobile technology since the HTC Wizard. But starting with the Nexus One, his gadget love affair shifted to Google's little green robot. He is also a Johns Hopkins University graduate in neuroscience and is now currently studying to become a physician. View willverduzco's posts and articles here.
Aamir Siddiqui · Jun 30, 2015 at 02:43 pm · 2 comments

Beats Music No Longer Accepting New Accounts

Whenever Apple launches a new product or service, it definitely manages to grab the attention of all. Whether you love the company and or its products, or you hate it, there's no denying that Apple does make more people interested in things, old or new. When the company announced Apple Music, it directly took aim at the user base of iTunes which had migrated to the streaming convenience of Spotify and later, Google Play Music. In order to further bolster...

XDA NEWS
Emil Kako · Jun 30, 2015 at 02:37 pm · 3 comments

Do You Do Self-Repairs on Your Devices?

As smartphone designs become more and more complex, self-repairs on devices are also becoming more complicated. Unibody handsets like HTC's One flagship series can sometimes be a nightmare to repair if the person doesn't have much experience. That, of course, all depends on the device you are attempting to repair though. So, how many of you do self-repairs on your devices? Let us know why or why not in the comments below.

DISCUSS
Faiz Malkani · Jun 30, 2015 at 02:03 pm · 3 comments

Sony Z4 Slips Out of Top 5 Smartphones in Japan

In a bid to streamline its flagship series which had been losing credibility over the past few years due to their 6 month release cycles, Sony announced that releases would be pushed back to the standard duration of one year instead. When Sony's 2015 flagship was unveiled as the Z4 in Japan and the Z3+ across the rest of the world, enthusiasts everywhere expected things to take a turn for the better, in lieu of the aforementioned announcement. However, two months...

XDA NEWS
Share This