Android ADB devices unauthorized

2020-01-24 04:05发布

Configuration:

  • Windows 8.1
  • ADB version: 1.0.32
  • Smartphone: Oneplus One

Problem

I installed the Samsung drivers as it is said to do. When I run the ADB devices command, it said unauthorized.

Already tried:

  1. I've done everything that'd been said on this post: https://stackoverflow.com/a/25546300/1848376

    But the problem is that I don't get a prompt on the phone to tell me I must accept the connection.

  2. When I run the command adb shell, here is the answer:

    error: device unauthorized.
    This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong.
    Otherwise check for a confirmation dialog on your device.
    

I did "adb kill-server", but it didn't change anything. Why?

20条回答
Ridiculous、
2楼-- · 2020-01-24 04:51
  1. First Remove the adbkey and adbkey.pub from the .android directory in your Home directory.
  2. Make .android directory in your home with 710 permissions: $ chmod 710 .android/ and ownership as: chown -R <user>:<user> .android/. Ex:

    $ chmod 710 .android/
    $ chown -R ashan:ashan .android/
    
  3. Go to developer options in your mobile and tap option Revoke USB debugging authorizations

  4. Turn off all USB Debugging and Developer Options in the device and disconnect the device from your machine.

  5. Connect the device again and at first turn on the Developer Options. Then Turn on the USB debugging.

  6. At this point in your mobile, you will get a prompt for asking permission from you. Note: you must check the checkbox always accept from this …. option and click ok.

  7. Now in you machine, start the adb server: adb start-server.

  8. Hopefully when you issue the command: adb devices now, you will see your device ready authorized.

查看更多
对你真心纯属浪费
3楼-- · 2020-01-24 04:51

All you need is to authorize debug mode.
1. make sure your Device is connected to your PC.
2. Allow authorized for debug mode via Android-Studio by going to
Run -> Attach debugger to Android process
than you will see the pop up window for allow debug mode in your Device,
press OK. done.
i hope it help to someone.

查看更多
登录 后发表回答