adb Configuration and Usage - magic-lantern-android-studio/mle-documentation GitHub Wiki
This page provides useful information on how to setup and configure the Android adb platform tool. It offers instructions on how to enable and use USB debugging.
Table of Contents
Configure Android Device
This section discusses how to configure the Android device for USB debugging.
- On the Android device (i.e. phone, tablet, etc.), enable the "Developer" options. Instructions for doing this can be found on the Configure on-device developer options web page.
- On the Android device, turn on "USB debugging". Instructions for doing this can also be found on the Configure on-device developer options web page.
Configure Host Development Platform
- The Ubuntu 18.04 LTS 64-bit host development platform needs to be configured for USB debugging. Instructions for configuring the Linux platform can be found on the Set up a device for development web page.
Troubleshooting
ADB Android Device Unauthorized
If the command "adb devices" shows the device as unauthorized, then try the following:
Check if the device is authorized
Use the following:
$ adb devices
List of devices attached
4df798d76f98cf6d unauthorized
Revoke USB Debugging on device
If the device is shown as unauthorized, go to the developer options on the device and click "Revoke USB debugging authorization".
Restart ADB Server
Restart the adb server by using:
$ adb kill-server
$ adb start-server
Reconnect the device
The device will ask if you agree to connect the computer id. You need to confirm it.
Check the device
$ adb devices
List of devices attached
4df798d76f98cf6d device
It is now authorized!