I just broke the screen on my OnePlus 6, which doesn't allow adb debugging until you change the USB Connection Type to 'MTP' (via the screen), and their repair service states they will wipe any device they are sent, no exceptions. I didn't unlock the bootloader, and so unlocking it to flash a different recovery will also wipe the device. It also removed adb over wifi, so it appears it is completely locked down.
On my next phone (Razer Phone 2), I want to ensure this never happens again. I am concerned that potential Android updates may also require screen interaction before it will allow adb over USB, or that adb over wifi may be removed.
What is the best way to ensure that I can maintain adb access without screen interaction in the case of a future breakage?
I plan on:
- Unlocking the bootloader right away, so that worst case I could flash a custom recovery like twrp that would allow adb access
- Enabling adb
- Authorizing at least two computers
- Setting the default USB mode to MTP (if possible)
- Enabling adb over wifi, but ONLY if I can lock it down
Regarding adb over WiFi, I don't want this fully enabled on every network I join. Is there a way to whitelist only my home WiFi, or to only allow it from authorized computers?
I'm looking for ways to not lose access like this in the future - I have to order a replacement screen and repair it myself in order to try and retrieve the data. It's also important to me that I don't lose access via any system updates in the future, though this is difficult to ensure. Perhaps a nandroid backup of a system with everything ready that could be restored through the recovery?
In devices like the OnePlus 6, that have removed adb over WiFi and require touch input to adb over USB, what are the viable options?