Search code examples
androidlinuxshelladb

running adb devices showing unauthorized device?


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.


Solution

  • 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.