Authorising adb from recovery
Adb is usually accessible when the phone is in recovery mode. If, for some reason, you can’t start the phone normally to authorise the computer that you’re connecting to, there is a way to authorise from TWRP. This doesn’t work on encrypted phones (at least using FPOOOS TWRP), as you need access to /data and the TWRP from FPOOS does not support encrypted /data partitions.
- Start recovery
- Copy %user%/adbkey.pub (this is the path on windows; adb should have been run at least once on your computer beforehand) to your phone using the file manager. I’ve put it in the root of the folder tree of the device that is exposed to the computer (which is typically /sdcard on the phone). The file system is made accessible from TWRP, at least when it wasn’t encrypted.
- On the phone, open a command prompt and type
cat /sdcard/adbkey.pub >> /data/misc/adb/adb_keys
- On the computer stop the adb server:
adb kill-server
and then start it again, e.g. byadb devices
- which should now be listed as authorised.