Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

ADB Android Debug Bridge

20200121 The Android Debug Bridge is an application that runs on a computer to communicate with a USB connected Android device. Begin by changing settings on the Android device, under Developer options, to enable USB debugging. Then connect the device and click OK on the popup seeking permission for remote access. If in the device listing below it says unauthorised instead of device then the popup on the device has probably not provided the right permissions. Sometimes re-plugging the device will do the trick to show the popup on the device.

On Ubuntu install the command line application:

$ wajig install adb

$ adb devices
List of devices attached
bf0546056101270a02	device

Start up a shell running on the Android device connected via a daemon which is started up if it is not already running:

$ adb shell

Common GNU/Linux shell commands can now be utilised to navigate the device's operating system.

herolte:/ $ ls
[...]
1|herolte:/ $ cd storage/emulated/0
[...]
herolte:/storage/emulated/0 $ ls
[...]
Here, herolte is the code name for the Samsung Galaxy S7.

Type Ctrl-d or the exit command to exit from the shell.

If the daemon is not running it will automatically start up with the message:

* daemon not running; starting now at tcp:5037
* daemon started successfully

In the following circumstance, do as suggested—check for the confirmation dialog on the device:

$ adb shell
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

If your device is not listed then try using an alternative USB cable, which oddly enough can be the problem. This may be because a Samsung cable is required (?) or the old USB cable is functional enough for charging but not communicating.

If your device is not rooted you will be limited in what you can access.

See https://developer.android.com/studio/command-line/adb for details of using ADB.


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. Creative Commons ShareAlike V4.