Can't connect Nexus 4 to adb: unauthorized

后端 未结 26 1418
你的背包
你的背包 2020-12-02 07:44

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

相关标签:
26条回答
  • 2020-12-02 08:13

    Similar to Flavio's answer (https://stackoverflow.com/a/18542792/1064996), it was something to do with the files in ~/.android (on the host machine, not the phone).

    I didn't have ~/.android/adbkey, but I did have ~/.android/debug.keystore and my whole ~/.android directory was owned by root. I removed the keystore file and also changed ownership to me (sudo chown -R $USER ~/.android), killed the adb server and plugged in my phone, and it worked.

    It was probably the ownership thing. Make sure you have read/write permissions in ~/.android

    0 讨论(0)
  • 2020-12-02 08:13

    It happened for me after my backup software changed the permission to my user directory. I opened it in File Explorer, it prompted me to set permissions and it fixed the issue.

    FYI: Android has a special directory under "\User\.android" If you can't access it, it won't prompt you.

    0 讨论(0)
提交回复
热议问题