The Android Debug Bridge, aka adb, has been an indispensable tool while unlocking and rooting my new Moto G5 Plus. I’ve used it dozens of times this week to push and pull files, run shells, and reboot my phone. Today, as is my habit, I ran the command adb devices after plugging my phone into my laptop, but the response I received made it obvious that I had some troubleshooting ahead of me.
tpodlaski@Alabama:~ ls -la ~/.android total 44 drwxr-x--- 5 tpodlaski tpodlaski 4096 May 9 10:31 . drwxr-xr-x 46 tpodlaski tpodlaski 4096 May 14 11:58 .. -rw------- 1 tpodlaski tpodlaski 1704 May 9 10:31 adbkey -rw-r--r-- 1 tpodlaski tpodlaski 719 May 9 10:31 adbkey.pub -rw-r--r-- 1 tpodlaski tpodlaski 185 Dec 19 21:21 analytics.settings drwxr-xr-x 2 tpodlaski tpodlaski 4096 Dec 19 21:24 avd drwxr-xr-x 2 tpodlaski tpodlaski 4096 Dec 19 19:31 cache -rw-r--r-- 1 tpodlaski tpodlaski 140 Dec 19 22:21 ddms.cfg -rw-r--r-- 1 tpodlaski tpodlaski 1258 Dec 19 21:20 debug.keystore drwxr-xr-x 3 tpodlaski tpodlaski 4096 Dec 19 21:31 monitor-workspace -rw-r--r-- 1 tpodlaski tpodlaski 36 Dec 19 19:31 uid.txt tpodlaski@Alabama:~ adb devices List of devices attached * daemon not running. starting it now at tcp:5037 * * daemon started successfully * ZY2243PNMF recovery
tpodlaski@Alabama:~ touch ~/adb_keys
tpodlaski@Alabama:~ adb push ~/adb_keys /data/misc/adb/adb_keys adb_keys: 1 file pushed. 0.3 MB/s (719 bytes in 0.003s)
tpodlaski@Alabama:~$ adb devices List of devices attached ZY2243PNMF device
And success! Success for me anyway. Your mileage, as always, may vary. While I am pleased to be authorized again and able to continue on my way, I am still wary of the fact that I don’t know what caused this issue in the first place and why I don’t have a Revoke USB Debugging Authorizations option in my settings. If you have any insight, I kindly ask that you clue me in by leaving a comment below. Thanks!
15 comments
Skip to comment form
This will overwrite adb_keys file, which might contain multiple keys. An idea to save existing keys might be:
adb pull /data/misc/adb_keys ~/adb_keys
cat ~/.android/adbkey.pub >> ~/adb_keys
adb push ~/adb_keys /data/misc/adb_keys
Author
Thank you very much for pointing this out. However I borked my phone, I had completely lost the adb_keys file, so I hadn’t even considered overwriting it. I’ve rewritten the instructions using your suggestion for people who may have an adb_keys files they need to save.
Thanks, I solved the problem of my Moto G5 Plus, that there was no adb_keys file and the RSA Fingerprint window did not appear, i just followed the instructions. I also had the same problem.
I dont understand this. I tried many methods but didnt work. the last method you describe I dont understand. I’m using windows 10 pro computer
Thhhhhhaaaaaaaaaaaaaaaaaaaaaaank youuuuuuuu
Author
You are very welcome!
Thanks Tony!
I had a similar problem – my OnePlus One phone was in a boot loop previously so I booted into recovery but could not access the phone because adb was unauthorised in recovery. I had to “sneaker-net” the adb_keys file from my PC onto the phone by using a USB-otg drive.
Also on a moto g5 plus (coincidence..?). Had no idea what I did but copying your instructions was good enough to fix it. Thank you so much!
i have a problem, i dont have a sistem, i dont have a recovery, i get a brick, please help me, is a alcatel one touch idol 3 5.5.
hey, I’m stealing this from mnoguti, on xdaforums:
these are the commands listed above for windows:
type NUL > adb_keys
type c:\users\UserAccount\.android\adbkey.pub > adb_keys
adb push adb_keys /data/misc/adb/adb_keys
Thanks again!
Many thanks, I’ve followed floxin’s tip except with the following:
instead of NUL > adb_keys I copied adbkey.pub and renamed it to adb_keys
Also, copy adb_keys to the same directory as adb.exe if you using bundled tools or a version of adb not downloaded from google.
Then adb push adb_keys /data/misc/adb/adb_keys
Your solution is the only thing that worked for me. THANK YOU!
still doesnt work for me lg g3..
Didn’t have any luck with any of these but I did find a way using another Android device. In my case a tablet, but I expect it will work with any device you have root access to. Plug the device into the PC you are trying to get the adb_keys for. If you authorize the connection it will generate the file you need in the /data/misc/adb folder and you can steal it from there. Copy the file to a non-root folder (Android won’t share from root floders) & email it to the phone that needs it. Download it from the email & copy it to the /data/misc/adb on the phone. Worked like a charm.
I’m still having the same problem. Can anyone help??
Mine is a Nokia 2.2 with forgotten lockscreen.
I’ve turned on the USB debugging mode earlier but now I forgot my screen-PIN, now it says device unauthorized.. how to retrieve my call lists.. somebody help, please.