what_is_adb_how_to_use_adb_android_debug_bridge

What Is Android Debug Bridge (adb) & How do you use it?

If you encountered the acronym “ADB,” you might be asking “What is ADB?” & “How to use ADB?” is the question for those seeking more knowledge about it. When it comes to Android, the acronymo “ADB” means Android Debug Bridge. It’s a software that enables 2 different operating system to communicate with each other such as Windows & Android.

What is Android Debug Bridge (adb)?               

Android Debugging Bridge (adb) is commonly referred to as a command-line tool . It’s basically a software that enables communication between PC, Linux, or Mac to Android devices.

With adb, you can:

  • Issue a number of commands for debugging, shell creations, port forwarding, and viewing general information about your Android device.
  • Copying and pushing files from connected devices.
  • Installing applications from one connected device to another.
  • Gain more control over your device as a developer.

If any of these appeals to you, or you were already on board from the beginning, let’s take a look at what you need to build a bridge to new possibilities.

If you wish to learn how to install and use adb, then here are a few things you need to prepare:

First things first, you’ll need the following:

  • An Android smartphone or tablet.
  • A computer (Windows, Mac, or Linux).
  • A USB cable to connect the device to the computer.
  • and Android Studio.
android studio adb

The Android Studio installer is readily available for download on the Android Studio website.

Installing Android Studio on Windows

To install Android Studio on Windows, follow the setup wizard in Android Studio and install any SDK packages that it recommends.

Installing Android Studio on Mac

For Mac users, launch the Android Studio DMG file. Drag and drop Android Studio into the Applications folder, then launch Android Studio.

Installing Android Studio on Linux

To install Android Studio on Linux:

  1. Unpack the .zip file you downloaded.
  2. Open a terminal then navigate to the android-studio/bin/ directory, and execute studio.sh.
  3. Select whether you want to import previous Android Studio settings or not, then click OK.

Additionally, make Android Studio available in your list of applications by selecting Tools then Create Desktop Entry from the Android Studio menu bar.

Enable developer options and debugging

developer option usb debugging
Developer Options

Note:

  • On Android 4.1 and older, the Developer options screen is available by default.
  • On Android 4.2 and higher, you must enable this screen by following the steps below:
    1. Open the Settings app.
    2. (Only on Android 8.0 or higher) Select System.
    3. Scroll to the bottom and select About phone.
    4. Scroll to the bottom and tap Build number 7 times.
    5. Return to the previous screen to find Developer options near the bottom.

At the top of the Developer options screen, you can toggle the options on and off.

USB Debugging3
USB Debugging

Next, scroll down and look for USB debugging to enable it. This allows Android Studio and other SDK tools to recognize your device when connected via USB, so you can use the debugger and other tools.

You can now connect your device with USB. You can verify that your device is connected by executing adb devices from the android_sdk/platform-tools/ directory. If connected, you’ll see the device name listed as a “device.”

Connect Android Phone/Tablet to Computer (USB cable or Wi-Fi)

For this next step, you’ll need either a USB cable or Wi-Fi connection that both your computer and the device can be connected to at the same time. The USB cable is the easier of the two to use, but for some ADB functions, you will need to be using a rooted Android device for this method.

Must Read: How to Root Android?

The reason for this is that some ADB commands require permissions that Android devices aren’t able to perform unless rooted. If you haven’t rooted your device already, this may be the last push you need.

Otherwise, to bypass the need for a rooted device, you can connect over Wi-Fi along with the use of an additional application.

google-play-button

The application is called ADB Wireless, and will allow you to make full use of ADB without needing a rooted device.

There are instructions on the app page on how to use it, and to do so you’ll need to make use of the command prompt.

No matter the method used, make sure your device is booted into Android and connected to your computer before continuing to the next step.

Command line tools

You can now connect your device with USB. You can verify that your device is connected by executing adb devices from the android_sdk/platform-tools/ directory. If connected, you’ll see the device name listed as a “device.”

Well now that it’s set up, what can I do with it?

You can now run ADB commands to your device to perform actions such as:

  • Backing up an SD card.
  • Copying data from your device or you computer.
  • Installing applications that were on your computer that are compatible with Android.
  • Port forwarding.
  • In-depth debugging.
  • And more

You can view the link above for ADB command lists, tips, and general help that may be required with general ADB use, or even ADB use for development. You can view an additional ADB commands list here.

For those not interested in Android development, backing up an SD card, and other data shifting commands would most likely be the most useful. Because of this, those that are new to ADB should stick to File Manager type commands, like the ones in the link above.

Conclusion

The easiest way to set up and take advantage of ADB is with a rooted device, considering the ways around that requirement can be a little confusing to set up. However, the setup for these commands may not be worth it to the average Android user who won’t be diving into any of the more complex development uses.

If you plan to develop with Android, setup of the Android Debugging Bridge is essential, but for a casual user, it will save you the extra fuss to just stay clear.

Have any ADB or command line tips you’re just itching to get off your chest?

We’d love to hear about them in the comments below, and while you’re there you could even tell us your favorite uses for ADB!

Featured Image Credit

Similar Posts

19 Comments

    1. Hi Lena,
      ADB can be difficult, but most Android users will only use it for specific purposes like unlocking a phone. Developers are the ones that use it frequently. I am sure you will be able to use it if you learn about it little by little. Thanks for commenting. =-)

  1. Hello,

    I did the installation of the three items “Android SDK Tools / Android SDK Platform Tools / Google USB Driver” exactly as described above.
    But now I don’t find the folder on my C:\ drive. I uninstalled it twice and repeated all the steps.

    Has anyone encountered the same problem? I don’t know what I did wrong.

    BR
    Dries

  2. Done everything right, but once I go into c drive then click android, the sdk folder doesnt appear. Only android studio folder. No platform tools nothing. What do I do next?

    1. Hi Kris,

      If you have downloaded the AS + SDK bundle:

      By default, the SDK should be located in C:\Users\%USERNAME%\AppData\Local\Android
      If it is missing at this location, one of the following reasons apply: you have chosen a custom location, you missed to install the SDK at all, or (unlikely) they have changed the default install location.

      Note #1: the AppData directory is hidden by default. If you have a standard Windows configuration, the path I gave about should work “as is” (hit Win + R -> paste the path -> Enter).

      Note #2: you will never find the SDK in the Android Studio directory unless you have explicitly put it in there.

      If you have retrieved the standalone SDK by some other means:

      The SDK location may vary (from my experience), however (assuming the default configuration) you will most likely find it in C:\Program Files\Android or C:\Users\%USERNAME%\

      Hope this helps and thanks for commenting. =-)

  3. can i unlock my phone if the USB Debug is not Enabled?? obviosly i cant activate that because my screen is broken and the tactils functions are not working

  4. There’s not any single folder called as platform-tools. Help please, because I need it to unlock my dead-screen phone.

  5. WtF? The whole point of this exercise was to access a “black screen” phone… how in the h are you supposed to “Enable USB debugging” if I could do that why the h would I need to do this entire process????????

    1. there are other uses for ADB.

      – Issue a number of commands for debugging, shell creations, port forwarding, and viewing general information about your Android device.
      – Copying and pushing files from connected devices.
      – Installing applications from one connected device to another.
      – Gain more control over your device as a developer.

      If you have a broken screen and are talking about accessing the phone with no screen, yes it is an option, but you need the debugging on already. Most phones and versions of the OS let you turn it on, but debugging is only active when you plug in a USB to the phone.

      1. Trevor, you stated that most phone and versions of the OS let you turn on the debugging. The person above your paragraph though asks you the obvious (which is my question too). Since this post is about unlocking a phone with a black screen, if the debugging isn’t enabled, how are we supposed to enable it? Is there a way to do this , so that SDK Android software can unlock our broken screen phones? I run all the above process and the command prompt answer I got was “no devices/emulators found” although my phone is connected to my laptop with a USB cable.
        Any more suggestions please? I would really appreciate any further help. Thank you.

        1. It’s sort of like having a flat tire when you are driving, if you don’t have a spare tire in your car already, you can’t change it without the help of a service center or tow truck. For most phones, the debugging is in the developers menu. To turn this menu on requires you to go to the settings of the phone and tap the build number of the phone seven times (usually in the About Phone tab).

          So, to more directly answer your question, no, there is not a way to easily turn on debugging if your screen is broken, black or otherwise not functional. The same scenario goes for items on your phone, if you have not set up a backup program prior to losing your phone, you’ll be hard pressed to get the information off of it if it’s lost or broken.

  6. Is there a company or organization that takes care of all this? I have a Casio C771 Commando. It is locked because my daughter attempted to get into it. It is not activated. I will not do a factory reset because it defeats the purpose. All I want is my pictures. I can’t unlock it because my google account password has changed since the phone was deactivated. I’ve tried hundreds of different passwords, nothing. I can not get past the unlock screen. Any suggestions? Companies that I can ship it to?

    Dave

    1. Your phone will need to see the internet for it to verify your Google account password. This connection could be Wi-Fi or cellular. To my knowledge, no there is not a service that will use ADB to remove your images. In some cases, cell phone stores have celebrite devices that allow information removal from phones. Are the images stored on an external micro-SD card?

Leave a Reply

Your email address will not be published. Required fields are marked *