android debug bridge - Mobiloitte Blog

What is Android Debug Bridge and How to Use It on Windows?

Those of you who have never worked on android application development before may find themselves new in front of this concept although chances are that anyone who has basic understanding and interest in unlocking Android device will be familiar with the term. Android Debug Bridge is one of the approaches our team of Android developers uses to experiment and simulate various vulnerabilities that may result from rooting operations.

One of those Android developers (that would be me) was particularly interesting in sharing few insights about what Android Debug Bridge is, how to use Android debug bridge on windows and what are some of the risks associated with it.

What is Android Debug Bridge for Windows?

Don’t get me wrong . Android debug bridge can be used on Mac and Linux as well. It is just that we were using Windows environment for our experiments and with most of the friends from the local Android development community. Hope that makes it debug bridge

Android Debug Bridge is exactly what it says – It’s a “bridge” for developers to work out bugs in their Android applications. This is done by connecting a device that runs the software over a PC, and feeding it terminal commands. Android Debug Bridge lets you modify your device (or device’s software) via a PC command line.

How to install Android Debug Bridge on Windows 7?

To configure Android Debug Bridge on your PC, you will first have to install the Android SDK, which you can download from the Android SDK site.

You will 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.

To connect your phone, you’ll need to install the OEM USB driver for your particular phone (check this 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, pad 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 input 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

After this you are ready for some magic.

What all can you do with ADB?

  • Phone rooting. This is the basic and most common function which in fact is compulsory for Android developers willing to root Nexus or any other Android device.
  • App side loading. If you want to install an application that’s either not available on Google Play in your location or was removed from the store (like Flappy Bird), then ADB comes handy again. The adb install command will install an APK file onto your Android device, on the condition that you have enabled installation of applications from unknown sources in settings.
  • Files Push and Pull between a PC and an Android device. 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
  • Even more handy commands – A lot of functions like flashing ROMs to your phone require you to boot into recovery mode. Normally, this requires you to hold down a particular set of buttons on your phone for a certain length of time, which is obnoxious. With ADB, you can install a ROM stored on the computer (helpful if running low on external sd memory). This even gives the command to flash a recovery image which has been topic for those with an unlocked bootloader that have been receiving the unlocked bootloader error message on reboot.

android debug bridge

 A word of warning

Enabling Android Debug Bridge allows apps to operate outside their sandbox and take any data on the phone (Credit cards, bank accounts). You really want to be sure you trust every app on your device before you enable this including that random game you tried six months ago that’s auto updated since, and the advertising software your apps use.

There you go. Handy yet comprehensive pocket guide on Android Debug  Bridge, installation guide and best user cases for ADB. However we would like to hear the voice of other Android developers out there. How do use ADB? Have you faced any difficulty or even brought yourself into trouble because of recklessness in using ADB?

Share your thoughts in comments