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.

Ankit Agrawal
  • 325
  • 2
  • 5
  • 16

3 Answers3

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.

Saurabh Meshram
  • 8,106
  • 3
  • 23
  • 32
  • 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`. – Ankit Agrawal Aug 21 '14 at 08:04
  • Well I have restarted the device and even unplug and plug it back, It seems to work fine (Not asking me RSA Key again). It will ask again, only if I select [Revoke USB Authorization](http://sophosnews.files.wordpress.com/2014/01/revoke-500.png?w=500&h=332) under Developer's Setting. – Saurabh Meshram Aug 21 '14 at 08:39
  • 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. – Saurabh Meshram Aug 21 '14 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. – barbara.post Sep 14 '15 at 11:59
  • 1
    @barbara.post, Yes I did find it later with this answer http://stackoverflow.com/questions/25968542/please-check-the-confirmation-dialog-on-your-device/25970036#25970036. Also updated same in the comments for the Op to verify Thanks for improving the answer anyways :) – Saurabh Meshram Sep 14 '15 at 12:24
  • Hi, how can I authorize my device when it's in recovery mode? because it can't start (it's in a boot loop), thanks – MBX Jul 16 '16 at 16:28
  • 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 Dec 19 '18 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.

iowatiger08
  • 1,892
  • 24
  • 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.

L. D. James
  • 1,679
  • 1
  • 22
  • 35