Android Debug Bridge (ADB)

The Android Debug Bridge (ADB) is a client-server program used in Android application development.
The Android Debug-Bridge is part of the Android SDK and is made up of three components: a client, a daemon, and a server.
It is used to manage either an emulator instance or an actual Android device.

What does this mean for the normal user?

In addition to the Android SDK, part of which is the Android debugging bridge, the basic requirements of the Android programming configuration is a computer that meets the minimum system requirements to run the Android SDK and, in most cases, the same Android device. In the programming language, said the computer is called a programming machine. The Android Debug Bridge client component works on a development machine. It can be called from the command line (shell a.k.a) using the adb command. There are also other tools, such as the ADT (Android Development Tools) plugin and DDMS (Dalvik Debug Monitor Service), which can create adb clients. On the other hand, the ADB daemon acts as a background process in the instance of the emulator or in the device itself. Ultimately, the ADB server component, which also works on the development machine, but only in the background, deals with managing the communication between the ADB client and the ADB daemon. When Android Debug Bridge is active, the user can issue adb commands to interact with one or more instances of the emulator. Adb can also run multiple instances of the adb client, all of which can be used to control all existing emulator instances. The easiest way to use Android Debug Bridge is to install the ADT plugin in the Eclipse IDE (Integrated Development Environment). In this way, the programmer will not have to enter commands using the command line.

How to turn ADB on an Android phone?

To turn on ADB on the phone you need to go to phone settings --> developer menu and turn on USB debugging option.

Using the Android Debug Bridge (ADB) - Manual

You can access your Android device via the adb command on the command line. An Android virtual device can be freely accessed, a normal Android phone needs to get rooted for full access. For non-rooted devices, adb still accesses them, but you only have common user permissions.
The adb tools are located in the [android-sdks]/platform-tools directory. You should add this directory to your path to have direct access to this command.
The adb allows you to send commands to your Android device, pull and push files to it, gives shell access to the Android device and allows you to read information from your device, for example, the current memory usage. The following chapter describes the usage of the corresponding commands.
If you have several devices running you can issue commands to one individual device.

Most used command line:

  1. Checking communication with phone: adb devices
  2. Open an interactive shell: adb shell
  3. Copy files from and to your device:
    assume the gesture file exists on your Android device use: adb pull /sdcard/gestures ~/test
    now copy it back: adb push ~/test/gesture /sdcard/gestures2
  4. Install applications via adb: adb install <packagename>
  5. Uninstall an application via adb: adb uninstall <packagename>
  6. Battery information tasks: adb shell dumpsys batterystats --charged <package-name>

Where download ADB Tools with Drivers?

  1. Mini ADB & Fastboot with Drivers
  2. Android SDK Platform with Drivers