Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to authorize and accept ADB RSA key with broken touch screen on Android [closed]

Tags:

android

adb

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?

like image 641
user2002077 Avatar asked May 11 '15 22:05

user2002077


People also ask

How do I enable adb in recovery mode?

Connect the device to Mac or PC in recovery mode. Now open terminal/CMD in computer and go to platform-tools/. type and enter adb devices to check if the device is connected in recovery mode. Now type adb shell mount data and adb shell mount system to mount the respective directories.

What is adb wait for device?

wait-for-device can be specified after adb to ensure that the command will run once the device is connected. -s can be used to send the commands to a specific device when multiple are connected.


2 Answers

If you are using macOS (or any Linux distro):

  1. Reboot your phone into recovery mode.

  2. Connect it to your computer.

  3. Open the terminal and type:

     cd ~/.android
     adb push adbkey.pub /data/misc/adb/adb_keys
    
  4. 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.

like image 87
kiradotee Avatar answered Sep 21 '22 20:09

kiradotee


Using OTG and teamviewer help me control a broken touch screen android.

like image 44
Trần Quốc Hoài new 2015 Avatar answered Sep 21 '22 20:09

Trần Quốc Hoài new 2015