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.

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: 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

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:Open the Settings app.(Only on Android 8.0 or higher) Select System.Scroll to the bottom and select About phone.Scroll to the bottom and tap Build number 7 times.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. 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. 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. 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

What Is Android Debug Bridge  adb    How do you use it  - 14What Is Android Debug Bridge  adb    How do you use it  - 1What Is Android Debug Bridge  adb    How do you use it  - 41