9

I have connected some android devices to a Linux host. and when I run

adb devices

it will show unauthorized device. I fix this problem by

adb kill-server
sudo adb start-server

but every time the host restarts it will again show device unauthorized. please can someone explain how to fix this problem permanently.

The device is connected to the host through the USB cable.

3 Answers 3

23

This seems to be an issue with ADB version.
You may need to update your ADB.

Check using the follow, If older version, update to the latest.

$ adb version
Android Debug Bridge version 1.0.31

When you type:

$ adb devices
List of devices attached 
TA93300ZP0  unauthorized

and you should get below notification on your phone

this

Select Ok, and then when you issue

$ adb devices
List of devices attached 
TA93300ZP0  device

You should be able to connect to your device.

If you select Always allow from this computer.
This should fix your problem permanently.

Tested on Moto G (Android 4.4.4) on Ubuntu 12.04.

7
  • 1
    My current adb version is 1.0.31, and I has select Always allow from this computer but its now working. each time when device restarts or when I unglup and plug device back to the host, it asks for RSA key fingerprint. Commented Aug 21, 2014 at 8:04
  • 3
    One way to verify this would be 1) Switch OFF Developer's option 2) Revoke USB Authorization 3) Switch ON Developer's option 4) Enable USB Debugging, and you would see RSA Key Notification on device 5) Select Always allow from this computer and Ok 6) Run adb usb, Now you should not see the RSA Key Notification again on device and only see restarting in USB mode on prompt. Please try this and let me know. Commented Aug 21, 2014 at 10:12
  • 1
    A few steps less that in @SaurabhMeshram answer just above and it works : 1) kill adb server 2) In developer's options, revoke USB authorization 3) Run "adb devices" 4) You get RSA key notification popup on device. Accept with "always allow from this computer" checked. Commented Sep 14, 2015 at 11:59
  • 1
    @barbara.post, Yes I did find it later with this answer stackoverflow.com/questions/25968542/…. Also updated same in the comments for the Op to verify Thanks for improving the answer anyways :) Commented Sep 14, 2015 at 12:24
  • 1
    Following @SaurabhMeshram steps I got "Because an app is obscuring a permission request, Settings can't verify your response" and I wasn't able to click OK. Restarting the device without removing the cable fix this. I hope this is helpful to someone.
    – Metafaniel
    Commented Dec 19, 2018 at 17:53
6

Kill the adb server , Removing the .android folder from my user (ex. C:\Users\user.android on Win7) folder as well as unplugging and "revoking USB debugging authorization..", and then plug back in, I finally got the fingerprint to show up again.

2
  • 1
    Hail to the king! The only solution that worked with VirtualBox+Ubuntu16 Commented Mar 22, 2017 at 16:28
  • 1
    Worked! Nothing else did! Commented Jul 6, 2019 at 16:30
4

You should get the Allow USB debugging prompt. If for some reason you don't get it, disable debugging and re-enabling debugging will fix it.

Go into the Android's Debugging options screen. Disable debugging, then re-enable debugging. Then try again to connect using adb. Now the authorization prompt will pop up on the Android. You'll see:

Allow USB debugging? And the computer's RSA key finger print.

You'll also have a checkbox option to Always allow this computer.

Answer the prompt giving permission. You can also check the option to always allow this computer.

Not the answer you're looking for? Browse other questions tagged or ask your own question.