What are some of the best ADB commands

Android Debug Bridge (ADB)

The A.ndroidD.ebugB.ridge (often with adb abbreviated) is a software interface for the Android system that can be used to access an Android smartphone from a computer via USB cable and to execute commands.[1]

It is part of the Android SDK (Android S.oftware D.evelopment Kit) and is located there in the folder platform-tools. With earlier versions of the SDK it is in the folder tools. Since January 2017, Google has also been providing a separately packed package with the platform-tools, in which the ADB and Fastboot are contained, ready, so that a download of the entire SDK, which is quite large compared to the ADB, can be dispensed with.[2][3][4][5] The download link can be found on the Android developer page.

In addition to a wired connection to an Android device, the ADB also supports a wireless connection via a TCP / IP connection, e.g. WLAN.[6]

What is ADB? [Edit | edit source]

The ADB is a software interface between the PC and the end device that allows direct communication between the two components. This includes a file transfer function as well as the option of executing commands on the Android system using ADB and accessing system components. The ADB can be started and operated via a command window, "cmd" in Windows. The ADB does not yet have an official graphical user interface.

The main advantage of the ADB is that you can also send commands directly to the device, as if you were issuing the commands in a terminal emulator on the device.

In addition to the option of using the ADB via a USB cable connection, there is also the option of addressing and using the ADB via a TCP connection (thus in principle also via WLAN).

Important commands [edit | edit source]

Here are some of the most important ADB commands. A list of all commands can be found in the terminal or the command prompt with the following command:

adb help

Show devices [edit | edit source]

Available devices can be used with

adb devices

be listed.

The output is similar to the following:

List of devices attached

most likely you have not installed any drivers.

But is the output similar:

List of devices attached ???????????? no permissions

under Windows you have to write the vendor ID of the device manufacturer (to be found in the device manager) in the following file (format: 0xZZZZ, where Z is a hexadecimal number from 0 to F):% USERPROFILE% \. android \ adb_usb.ini

It is important that the vendor ID is on its own line. Under Linux, the file can be found in the home directory in the .android folder. The vendor ID can be filtered out with lsusb.

Copy files [edit | edit source]

  • From cell phone to computer:
adb pull /pfad/am/handy.txt /pfad/am/computer.txt
  • From the computer to the mobile phone:
adb push /path/am/computer.txt /pfad/am/handy.txt

Install application [edit | edit source]

The ADB can also be used to install apps. You have to note that the .apk file must be on the computer:

adb install /path/to/file/application.apk

Logcat [edit | edit source]

You can also view the system log via ADB:

adb logcat

It makes sense to redirect the data to a file:

adb logcat> file.txt

Enter shell [edit | edit source]

To execute commands on the Android device, an interactive Shell be entered:

adb shell

Installation [edit | edit source]

Set up installation and adb as system variable under Windows [edit | edit source]

So that you don't have to navigate to the folder with adb.exe every time you need it, you can enter it as a system variable under Windows and thus use it in every folder. To do this, proceed as follows under Windows 7:

  1. Control panel
  2. system and safety
  3. system
  4. Advanced system settings (on the left)
  5. Environment variables

Then enter the path of your platform-tools folder under "System variables" (below) under Path. From the other paths entered there simply through a; Separate without spaces (see picture).

If you now run the command prompt anywhere, you should enter


bring up a listing of all adb commands.

At android-hilfe.de[7] you can also find the instructions and the platform-tools folder as a download.

Linux [edit | edit source]

The larger Linux distributions contain the ADB and Fastboot tools as a package. Examples:

distribution Package name
Ubuntu, Debian android-tools-adb
openSUSE, Fedora, Arch Linux android tools
Slackware android-tools (as SlackBuild)

On the other distributions you search for "android" or "adb" with the appropriate package manager and then install the appropriate one. If no packages are available, start an installation of the Android SDK and just select the "Platform tools".

See also [edit | edit source]

Individual evidence [edit | edit source]