Repository navigation
Custom boot.img/recoveries while bootloader locked? #642
|
Hello, I've been looking into avbroot as the security of a completely unlocked bootloader on my device (OnePlus 6) is a concern to me. However, one thing I'm used to being able to do is, for example, to take a full backup of the device (deeper than what, say, Seedvault can provide), I can just take a copy of TWRP/Ofox recovery, and just, I assumed this would still be possible with a relocked bootloader (of course, you would need to sign the recovery images with your keys) but of course, I've never tried it, and given the README doesn't make note of this (and mentions many times cases where you'd get stuffed, but could recover easy by doing this). |
Replies: 2 comments 4 replies
|
I'm not sure if OnePlus devices behave the same way, but generally, the only fastboot command allowed while the bootloader is locked is the command to unlock it. If you only want to use a custom recovery occasionally, you'll probably need to create 2 patched OTAs: one with the custom recovery and one without. Then you would sideload the "update" to switch between them. I haven't used TWRP for a decade and have never used Ofox, so I'm not familiar with how their OTA sideloading process works. If it works like normal, then it should be possible to switch back to the original recovery. |
|
There was a deleted comment here that asked a good question (I won't quote the username to respect their privacy):
Yes, if the custom recovery allows you to run arbitrary things as root, that's definitely a risk. It's not possible for it to modify However, it could definitely allow harmful things to be done indirectly. For example, if there is a security vulnerability in one of Android's system components that parses a file from |
There was a deleted comment here that asked a good question (I won't quote the username to respect their privacy):
Yes, if the custom recovery allows you to run arbitrary things as root, that's definitely a risk. It's not possible for it to modify
avb_custom_key, nor is it possible for it to modify the OS partitions in a way that's still bootable (signature verification would fail in subsequent boots).However, it…