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:17

For my Samsung S3, I had to go into Developer Options on the phone, untick the "USB debugging" checkbox, then re-tick it.

Then the dialog will appear, asking if you want to allow USB Debugging.

Once I'd done this, the "adb devices" command no longer showed "unauthorized" as my device name.

(Several months later..)

Actually, the same was true for connecting my Galaxy Tab S device, and the menu options were in slightly different places with Android 4.4.2:

enter image description here

查看更多
做自己的国王
3楼-- · 2020-01-29 04:18

I was not getting the RSA fingerprint pop up on my phone.

I had to delete the C:\Users\<userName>\.android\adbkey and adbkey.pub files and then do kill and restart of adb server.

adb kill-server
adb start-server

I had to stop and restart the debugger and connecting as USB in PTP mode.

Because the RSA authorisation key was getting stored in this path, killing and restarting the adb server didn't help.

查看更多
登录 后发表回答