Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed last year.
My Nexus 7 2012 has a broken touch screen so I use an OTG mouse with it. I recently had to do a factory reinstall so am running v5.1 lollipop. The problem is I now have to re authorize adb with my computer so I can do work on it but cannot accept the RSA key when the dialog pops up because my touch screen is broken.
I cannot use my otg mouse because the Nexus 7 is connected to the computer, I have tried a bluetooth remote android device app which fails to work when the dialog shows, I have tried using another remote android app over wifi, I have tried using my computer keyboard via telnet but fails to work when the dialog appears. I don't have a bluetooth mouse but don't even know if that would work.
Does anyone have any suggestions how I can accept the ADB RSA key dialogue to authorize adb with my computer without the use of a touch screen. Thanks?
If you are using OS X*:
- Reboot your phone into recovery mode.
- Connect it to your computer.
Open the terminal and type:
cd ~/.android
adb push adbkey.pub /data/misc/adb/adb_keys
All done! Just adb shell reboot
and feel the power!
*For Windows 10, .android directory is located in your the base of your C:\User\user_name directory.
This is actually very simple (although a little bit late..). You can download the teamviewer host from the playstore and teamviewer into your phone from your computer. Once the adb authorization prompt appears just accept it through teamviewer and you are set. Remember to check "Remember this computer" so you don't have to do this every time. Keep in mind that to control your device through teamviewer you need to add it to an account.
Using OTG and teamviewer help me control a broken touch screen android.
you can add the RSA key copying it from computer and adding the line to /data/misc/adb/adb_keys, but only with rooted device
If screen is broken and you can't enable ADB by clicking on a confirmation dialog with the RSA key, you can run TWRP Recovery and copy a file from this mode:
adb push adbkey.pub /data/misc/adb/
But it will work only on a rooted device.
I got it working. I rooted the device. Downloaded wifi adb app which requires root and connected to adb over wireless. This allowed me to use the micro usb at the same time and click accept when the RSA dialogue popped up.
Thank you for your comments.