Can't connect Nexus 4 to adb: unauthorized

2020-01-29 03:51发布

I have a Nexus 4 with Android 4.3 and I am trying to connect the device to a computer with Windows 7 64bit.

I installed the latest drivers and the latest adb version. I think I tried almost everything and I still get the following message:

C:\Program Files (x86)\Android\sdk\platform-tools>adb devices
List of devices attached
007667324ccb229b        unauthorized

What can be the reason for this error?

26条回答
我只想做你的唯一
2楼-- · 2020-01-29 04:00

I solved this problem without deleting any keys. Here's how:

  1. My device was connected to my computer via USB
  2. I made sure Eclipse and android device monitor weren't running.
  3. Typed at the commandline prompt: adb kill-server
  4. Typed at the commandline prompt: adb start-server
  5. After adb was restarted, I got a prompt on my device to authorize which I allowed.
查看更多
淡お忘
3楼-- · 2020-01-29 04:01

Here is my version of the steps:

  1. Make sure adb is running
  2. In device go to Settings -> developer options -> Revoke USB debugging authorities
  3. Disconnect device
  4. In adb shell type > adb kill-server
  5. In adb shell type > adb start-server
  6. Connect device

if adb shell shows empty host name, restart device

查看更多
Luminary・发光体
4楼-- · 2020-01-29 04:02

This kind of an old post and in most cases I think the answer that has been upvoted the most will work for people.

In Lollipop on a GPE HTC M8 I was still having problems. The below steps worked for me.

  1. Go to Settings
  2. Tap on Storage
  3. Tap on 3 dots in the top right
  4. Tap on USB Computer Connection
  5. UNCHECK MTP
  6. UNCHECK PTP
  7. Back in your console, type adb devices

Now you should get the RSA popup on your phone.

查看更多
【Aperson】
5楼-- · 2020-01-29 04:04

Had the same issue. Not sure if these are the same steps for Windows as I'm using an OS X device but you can try:

  1. Reboot your phone into recovery mode.
  2. Connect it to your computer.
  3. Open the terminal and type:

    cd ~/.android
    adb push adbkey.pub /data/misc/adb/adb_keys
    
  4. All done! Just adb shell reboot and feel the power!

查看更多
太酷不给撩
6楼-- · 2020-01-29 04:05

My resolution was running adb devices from the command prompt, pathed to the adb application. For example C:\Android\platform-tools\adb devices . Running this command returned the following * daemon not running. starting it now on port 5037 * *daemon started successfully *

I then saw the device listed as unauthorized, unplugges the USB, plugged back in and was prompted for the RSA fingerprint.

查看更多
女痞
7楼-- · 2020-01-29 04:06

Had the same issues getting an authorization token on my Nexus 5 on Windows 8.1. I didn't have the latest adb driver installed - this is visible in device manager. Downloaded the latest ADB USB driver from Google here: http://developer.android.com/sdk/win-usb.html

Updated the driver in device manager, however enable/disable USB debugging and unplugging/plugging USB still did not work. Finally the "adb kill-server" and "adb start-server" mentioned in other answers did the trick once the driver was updated.

查看更多
登录 后发表回答