Reputation: 20995
I am using a nexus 5 (hammerhead), and I just built AOSP marshmallow from source. I was trying various build configurations (user-debug vs user etc), and along the way, I did something which causes both my mac (yosemite) and my ubuntu vm (14.04), to not be authorised to debug via adb. ie. if I type "adb devices
", then I see a message:
0c4a84901a7ce6a2 unauthorized
Facts -
Although I built the source code, and flashed the device on the ubuntu vm, yosemite is not authorised either - same message (can't understand why).
Fastboot has the same problem, if I try rebooting into the boot loader by issuing a command from the terminal. If I use the hardware buttons to launch the boot loader menu, then I can flash files, lock / unlock the boot loader etc.
I have tried killing / restarting the adb server (e.g.: adb kill-server
/ adb start-server
)
I have tried deleting ~./.android/adbkey.pub in my ubuntu vm. Since it made no difference, I did not delete it in my mac.
I have tried restarting my mac, ubuntu vm, adb in combination...
When I enable / disable USB debugging on the device, no message pops up asking me to verify the computers finger print, and there is no option in the setting to revoke all the fingerprints (which is present in regular stock android roms / factory images)
I'm not sure what to do now. I know I can flash the factory image of marshmallow, so everything on the phone should be pristine. But What I want to know is why adb is unauthorised right now, and how to fix it - so I can get back to making aosp roms.
EDIT: I just flashed the marshmallow factory image, and now adb is authorised on my mac, but in ubuntu, I'm still listed as unauthorized, even after killing / restarting the server.
EDIT: I built and flashed AOSP 6.0 with build configuration set as user-debug, and it seems dab is authorised again. So I imagine this is because when the build configuration is "user", adb is prevented from debugging. I wonder why, and how to fix this?
Upvotes: 1
Views: 2857
Reputation: 1382
I find that my android devices are "unauthorized" if usb-debugging is not enabled, or my computer's fingerprint was never accepted as authorized. Also, USB connection mode needs to be set to File transfer or photo transfer (MTP or PTP) for some versions of Android.
Try the following:
After this sequence, I always get message to accept computer's fingerprint on Ubuntu.
Upvotes: 1
Reputation: 41
In case of AOSP user build, you may wish to check if ro.adb.secure=1, in your build default.prop. If not defined, then the popup to verify computer fingerprint may not come up.
Upvotes: 4