Revert back to stock OS and relock bootloader

Hello everybody,

I switched from FP4 to FP6.
FP4 was running /e/OS, now I flashed it back to stock ROM in order to sell it off.
Flashing went smoothly, the phone is up and running.

Having read the relevant threads about Android anti-rollback feature vs. relocking the bootloader, I am aware, that the date of the Android security patch level of the newly flashed OS has to be higher/later.

However, in this thread is stated, that also the Android version number has to be higher:

Rollback protection errors trigger if you install an update whose version number is LESS than the rollback index’s value stored on device.

Additionally, running fastboot flashing get_unlock_ability
returns (bootloader) get_unlock_ability: 0
(see here)

On the other hand, in yet another thread was stated, that only the SPL date is checked by the anti-rollback mechanism. (Sorry, can’t find the thread right now).

Anyway, here is what I have:

Previous OS (/e/OS):

Stock OS now:

So, SPL date is later, but Android version is lower and fastboot flashing get_unlock_ability returns 0.

What applies to my situation?

Is this because you do not have

USB debugging enabled ?

OEM unlock may be required on to get a return of 1 from the “unlock_ability” command.

This is a direct quote from the install page but the use of “version” here talks of SPL version (that is the date) while further on is mentioned ANDRIOD VERSION (in a rather long sentence).

Thanks for the clarification about Android version vs SPL version.
Yes, a few lines on you state about Android version.
Sorry for my brain fog. Too much information in a very short time.

USB debugging is enabled.

OEM unlock is greyed out completely, stating that the bootloader is already unlocked (see screenshot below)
Is this normal Android behaviour?
Will it come back to a toggleable state after locking the bootloader in fastboot?

SPL goes from June 1st to July 5th. Therefore I should be safe, correct?

I asked about this only because you asked about your unlock_ability=0. Looks like the trick is the opposite, to disable USB debugging and Developer options.

Anything said on the FairphoneOS install page ?

“Late Lockers” (by which I mean those who do not perform the lock immediately after install, without reboot as said on the /e/OS install page) face a difficulty of ensuring the correct device state … I did a little research and made this proposal Installed 3.0.2 official and tried to lock bootloader - #5 by aibd. Please read the two links and the follow on explanation by @olli0371 of how he moved forward.

Those dates show that you are progressing forward in SPL dates so no rollback hazard appears.

1 Like

Thanks a lot for the links.

I solved it by:

  • re-flash the stock OS
  • reboot into bootloader directly (no booting into Android)
  • check get_unlock_ability=1
  • lock the bootloader

I once more checked the FairphoneOS install page and How to unlock and re-lock the bootloader. All the appropriate warnings are there, but I could not find a hint about having to re-lock directly.

As I was reverting to stock OS, I adhered to Fairphone’s manual installation page.

And yes, in e/OS/ installation doc it’s there:

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

I doubt though, that I would have been aware of the “late locker” issue, even if I had read the /e/OS page once more.
Knowing myself, I would have interpreted “you can lock before rebooting” as “you can lock before rebooting - or also lock at a later point” and not as “if you want to lock, you have to do so before rebooting the OS for the first time.”

Thank you once more, I highly appreciate your help.

1 Like