4

I'm running Ubuntu 16.04

adb version
Android Debug Bridge version 1.0.32

However, when I plug in my devices for testing via ADB, I always get an unauthorized error.

adb devices

List of devices attached 
LGD855a1098057  unauthorized

adb works flawlessly on Windows 7 x64 SP1 with Koushik Douttas Universal ADB driver and my friend's Macbook, this singles out the Ubuntu 16.04 as the problem.

Things I have tried:

  • I tried revoking previous USB authorizations: nothing happened.

  • Switching adb debugging on and off: however, the CLI just keeps telling me with the unauthorized error.

  • Switching ports: each port on my 16-port development rig has been tried.

  • Updating adb:

    android-tools-adb is already the newest version (5.1.1r36+git20160322-0ubuntu3).
    android-tools-fastboot is already the newest version (5.1.1r36+git20160322-0ubuntu3).
    

3 Answers 3

6

Same problem here with exact same Linux Ubuntu version. The solution for me that works well is

  1. adb kill-server
  2. sudo adb usb

After this, your mobile will ask for authorization and work well. So, adb needs root privilege.

1
  • This is the reliable way to do it. The other answers may work fir a while, but this one keeps going. Sep 8 at 18:17
1

Kill the adb server if running:

adb kill-server

Remove ~/.android directory with all its content:

rm -rf ~/.android

Don't forget to Revoke USB debugging authorizations in developer options on your Android device.

Start the adb server:

adb start-server

Search for devices:

adb devices
1
  • rm -rf ~/.android fixed a similar kind of issue for me. thanks
    – ruwan800
    Sep 22, 2019 at 9:18
1

This worked for me:

  • I revoked previous USB authorizations

  • I killed and restarted the adb server using these commands:

    adb kill-server
    adb start-server
    
  • I restarted the phone

  • And ran adb devices

And the device didn't appear as unauthorized!

You must log in to answer this question.