Fairphone 5 - locking bootloader

Hi there, I did install e/OS 2.6.3 on fairphone 5 fp5 according to the install guide . The install went well, apparently and according to that guide, the next (and last) step would have been to lock the bootloader again. The guide suggested to lock the Bootloader before a reboot

Once you have completed the above steps and before rebooting you can lock your Bootloader.

However, the device rebooted automatically. There was no chance for me to stop the device from rebooting and lock the Bootloader before the reboot.
I’ve tried to fix it by booting into the Bootloader with fastboot, but I ended up in a disaster. After I did the last 2 steps
adb reboot bootloader + fastboot flashing lock_critical + fastboot flashing lock
I’ve got an error message saying " Your device is corrupt. It can’t be trusted and will not boot" and I was indeed not able to boot anymore. I’ve tried locking the Bootloader again, but I got stuck in Bootloader bootloop. I couldn’t get to the recovery anymore and I couldn’t boot to system either.
Fastboot commands still worked and the following command has saved me fastboot flash boot boot.img from a bricked phone.

My question is now, should I lock the bootloader and if so, how (without bootloop/bricked phone)?

Thanks.

Regain your privacy! Adopt /e/OS the deGoogled mobile OS and online servicesphone

2 Likes

Usually your phone should start just fine with an unlocked bootloader, if the flashing went well. That’s what I did, in order to check everything and take the time because of the anti-rollback feature. You should NOT lock your bootloader, before being sure your /e/os version’s security patch has the same (or newer date) your stock android version had.

There is a command to check, if it is safe to lock your bootloader. I’d have to look it up, or maybe someone here has it at hand.

Locking your bootloader will wipe your user data though, if you already use /e/os before doing so, and you will have to go through settings again.

" Before going in and locking use the following command to check whether you would be able to unlock again afterwards if there was some sort of problem:

fastboot flashing get_unlock_ability

If the output =1, then you would be able to unlock again

if the output=0, do not lock. You will not be able to unlock again and if the phone doesn’t boot properly you’ve had it. Fairphone will need to reset it."

2 Likes

Thanks for your hints.
the flashing went well. I’ve checked the installed security patch version in advance. It was June 2024 or something and e/OS 2.6.3 has Dec. 2024. Also after flashing e/OS, it booted into system normally and all looked good.

fastboot flashing get_unlock_ability seems to be Okay in my device.

(bootloader) get_unlock_ability: 1
OKAY [  0.000s]

fastboot oem device-info this one state’s that it’s unlocked, but I think I would need to know what got me in that bootloader bootloop situation before I should try again locking the Bootloader.

(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: true
OKAY [  0.000s]

I’ve only installed e/OS A14 community build for testing. I will use the phone only when the A14 / U stable is out and then I will wipe and flash anyways again.

1 Like

The community build here says November 1st not December. Are you sure about your stock android security patch then? Or where did you get your unofficial build from?

https://doc.e.foundation/devices/FP5/install

1 Like

indeed it’s Nov. 24, but that is still far off from June 24 and also I was able to boot into system after installation. The bootloop only came after I’ve tried to lock the Bootloader. So that doesn’t sound to me like a problem with anti roll-back feature, doesn’t it?
If you think it’s worth trying again to lock the Bootloader, I can do. Now that I know to get out of such a bootloop :smile:

Have you been able to boot into /e/os again with the open bootloader?

Hi, I had the same problem. I flashed again and left the bootloader unlocked.
After that I went into some wifi problems, so I flash stock rom and I was able to lock the bootloader again. I will wait now for a new version of eOS, with new security patch.

2 Likes

yes, but only after flashing boot.img and resolving the bootloop.

1 Like

Maybe I try again Bootloader lock with the stable build 2.6.3, once it’s out.
Else I would have to leave the Bootloader open, I guess.

2 Likes

I’ve flashed my new FP5 yesterday and had the very same issues, and my dates of sec updates are exactly the same. After getting to that really tricky close-to-bricked state 3 times, I left it unlocked. (I used a different trick to unbrick with fastboot --set-active a/b but that did not feel elegant or make any sense to me).

But I feel less comfortable arguing with some banks that they should allow me to login with such system (I successfully argued with my previous FP3 which had the bootloader nicely locked)

1 Like

Same here, only official build can be locked without errors.

1 Like

I just tried locking the bootloader to be greeted with “Your device is corrupt. It can’t be trusted and will not boot” as well.

I used IMG-e-2.7-t-20250111460957-official-FP5.zip to flash and made sure the security patch dates where at least the same if not higher on the e/os build. they where both January 5.

I can still unlock and reflash though. But I’d like to fully lock the phone if possible.

Has anyone tried if locking after an OTA update to /e/2.8 works? (careful, I am almost sure that will wipe all the data)

Sideloading it won’t delete data and then it could be locked after that

Oh, how scattered is the information on these things. It is hard to follow. Sorry for basic questions - I thought I was starting to understand some things, but it looks like I am still far from it.
How does sideloading work? Could I sideload “t official” version on existing data/config of “u community” edition?

Don’t worry about basic questions, it is fine. But sure with soma research you can find your way through. I suggested it cause I thought it won’t boot into the OS.

Sideloading is in the e/OS/ Recovery. You can either enter that via button combination or via the menu (need to turn ‘expanded reboot’, search in the settings).

You shouldn’t switch from official to community and vice versa via sideload, although it could work. But with your question there is also a different Android version, not sure if that works.

Ah and you can’t lock community. I think you need to install new with official t

OK, flashed the “official” and was able to lock the bootloader.
There should be a warning next to “community” builds saying that bootladers cannot be locked with them.
Thank you @mihi

1 Like

wasn’t this a downgrade from U to T?
If so, isn’t it against the anti-roll back feature of Android and is supposed to brick your device?
Or does it not a apply to major versions but only to minor security patch versions no mater what the major version is? It looks like it and then this would also be good to be mention in the documentation. I’m waiting for more than 2.5 month for the official version to be released when I simply could have downgraded my stock A14 to A13 /e/OS right away and upgraded again a few month later to A14.

The rollback might be included with security patch but not Android version :thinking: