I cannot test this method because my device don't have USB-OTG support. I am not sure if the key sequence is always the same on each phone, this is for android 7.0 nougat
This only works with PIN or password! This only works once when installed the first time! we need to pick up the Google Play notification, make sure you won't disturbed by incoming calls or messages. call it the notification method :)
- download adb platform_tools or scrcpy
- install your phone usb drivers to PC
- remove your SIM card
- turn on your device with internet connection
- wait a while to get all recent incoming notifications
- connect your keyboard with USB-OTG adapter
- open a web browser on PC
- remote install this app to your device Developer Options
- wait ~1-2 minutes until the app is installed to your device
(after this step you can switch off your WiFi router)
lets (hopefully) select the Google Play notification from lock screen directly with arrow keys. Do this fast within ~5-10 seconds!
- press ↑ arrow up (10 x times)
- press ↓ arrow down
- press Enter
- type your PIN / password
- press Enter
We have successfully unlocked the screen now and opened the app which opened the Developer Settings.
Now lets activate Developer Settings and enable USB-Debugging
do this right after unlocking, if you wait too long your screen becomes locked again
select Developer Settings and confirm dialog 'okay'
- press Space Space
- press → arrow right
- press Space Space
scroll down to usb-debugging (sequence may differ for your device)
- press ↓ arrow down (11 x times)
select USB-Debugging and confirm dialog 'okay'
- press Space Space
- press → arrow right
- press Space Space
If all wents well, now comes the tricky part. You have successful enabled usb-debugging. But you still can not access your phone. Your PC is not authorized!
- open
cmd.exe
as administator andcd
change directory to the folder whereadb.exe
is installed (platform-tools or scrcpy) - connect your device with usb cable to PC
- type
adb devices
you should see 'unauthorized' - connect your keyboard with USB-OTG adapter
- press Space Space
- type your PIN / password
- press Enter
- press → arrow right
- press EnterSpace Space
Congratulations! You have successfully enabled usb-debugging and accepted your PC's RSA-Key