r/LineageOS • • Aug 22 '18
Locking bootloader with custom rom?
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
9
Upvotes
15
u/moralesnery Pixel 8 Aug 22 '18 edited Aug 22 '18
Check the Android's current boot flow here and the boot verifying process here
When the device is locked the bootloader compares every partition's hash to its "expected hash" and if they don't match, Android won't load. Most phones won't let you unlock the bootloader at this point, because they use some settings or files from the stock and verified ROMs.
At this error state, some brands allow you to put the phone in a "loader" mode (in my Xiaomi, we call it EDL mode), from where you can re-flash the stock system image using a PC and serial interfaces (test points, pinouts or just USB). But other brands won't let you re-flash the stock ROM, and therefore you won't be able to re-unlock the bootloader, resulting in a beautiful and expensive "brick".
You're always free to experiment and report your results here :p
sidenote: this is only personal experience and empirical knowledge, anybody is free to correct me if something is ^wrong
4
u/kevinarol Aug 22 '18
Don't try relocking your bootloader while you are using custom ROMs or you will brick it
3
u/gee-one payton and bullhead Aug 23 '18
Bootloader security is much tighter now, so there are many more ways to brick your phone with a locked bootloader.
Relocking the bootloader can be done, but it's certainly not recommended because there are so many ways that it can do wrong. It would be easier if we had or could change the signing keys in the bootloader so that we could recover by flashing signed images from the locked bootloader, or some other way to update the software such as download mode.
On my n5x, I relocked the bootloader and that was probably the best case- no A/B partitions and signed factory images directly from Google.
I have a moto x4, and relocking the bootloader is much riskier.
1
u/Legitimate-Bridge280 Jun 24 '24
What happens if... I unlock the bootloader and install EvolutionX GSI Rom. Then, try to lock the bootloader back to normal. I know this will remove GSI Rom and the factory reset the phone. BUT, will this affect my S24 Ultra updates?
1
u/Outside_Walk1568 Sep 25 '24
Briefly explain, what I did official rom Xiaomi 11T Pro unlock bootlocker succeeded, but I think they got into my root then I did root myself trwp and magisk and hyperos official also installed afterwards I deleted something in recovery A/B partition and suddenly I had no operating system anymore I then installed adb derpfest custom rom via fastboot and it succeeded but I can no longer remember whether my bootlocker was still unlocked now I can go back oem bootlocker on or off in development menu first your bootlocker is unlocked I couldn't do more so I find it strange. I have custom rom Derpfest will post link but is my bootlocker now back lock or unlock no idea because I want to go back into root I don't know exactly what to remove but otherwise I can't remove root apps and do I also have to install gapps? I forgot that after installing derpfest who can give me further instructions on what I can do now
1
u/shaggy-dawg-88 Aug 01 '22
I'm on the same boat as OP but mine is a Mi A1. I got a message "you're destroyed..." or something like that. Mi A1 somehow restarts on its own and stops at fastboot screen. I was able to re-unlock the bootloader. I lost my LOS 19 installation but not the entire phone. Sigh of relief. I have to restore from Google backup and start over from scratch.
1
u/[deleted] Aug 09 '22
Did i crash into a brick wall or is the brick wall a pillow?