Android Enthusiasts Asked by James S. on December 22, 2021
After 10 hours spent, it seems that I need to remove /data/misc/adb/adb_key file and restart the phone. But how can I do it if phone is not rooted and adb has no access?
It’s a not rooted HTC One M7 Att. I’ve tried reinstalling drivers many times and reinstalling sdk. I plugged and unplugged usb, changed ports, turned on and off debugging. Nothing helps and rsa dialog doesn’t come up. I’ve also deleted adbkey files in .Android folder on Windows.
I’ve connected another HTC One and it worked smoothly. So, problem in the phone.
Help?
It looks like you know how this works, but for anyone who may not, normally /data/misc/adb/adb_key
contains the public keys of all the computers that have adb access to your device, which on your computer is located somewhere like ~/.android/adbkey.pub
. If you did have root, you could just use su
from the Terminal app, then create the file (say by copying or appending the adbkey.pub
file from the /sdcard/ to /data/misc/adb/adb_key
).
Without root, it's more challenging. As you note, the way it's supposed to happen is that connecting a device that's never been seen before will result in you being prompted to accept the key from the RSA dialog on the device. But if THAT'S not happening, I suspect that something is wrong with the ADB connection itself. Are you able to verify that adb is working with another device? The command adb devices
issued from your computer can tell if your computer sees the device. On Linux devices lsusb
will also show whether the device is recognized as connected to usb. Is your computer able to recognize other devices? You say that you've tried re-running adb-- for anyone who may be reading this, doing an adb kill-server
followed by an adb start-server
is one way to do this.
If you don't want to root your device, you may consider installing a custom recovery instead such as TWRP2, which will allow you to boot into recovery mode as root temporarily to make the change without having to actually touch the /system
partition directly. When you're done putting your key into place, you can always re-flash the original recovery and should be good-as-new. Looks like on the HTC One you can use fastboot
to flash to the correct partition via the command: fastboot flash recovery recoveryfilename.img
. Fastboot is part of the SDK, and it's in the /platform-tools
directory. You may need to run it with root privileges.
Answered by fattire on December 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP