English

TWRP for Fairphone 3

Gsi worked (lineage on the FP3, I will post in FP3 custom rom development based on released source code in few minutes)

3 Likes

Since this slot A/B stuff is a bit alien when coming from the Fairphone 2 …

Do I get this right that I can keep the now installed TWRP and OTA updates of the stock OS would still work because the recovery is not involved anymore in the updating process?

(I did a quick search and read this here … https://forum.xda-developers.com/oneplus-6/how-to/guide-noobs-guide-to-b-partitions-op6-t3816123)

2 Likes

I believe that the A/B partitions are alternated between updates so that the user doesnt have to wait for there phone to update. When you update it applies the update to the partition that is not in use, then after reboot you get switched to the partition that wasnt in use, for example B but now is, and now partition A is used for the next update and it cycles back and fourth.

2 Likes

Yeah, this is how it sounds in the guide, too.

On the Fairphone 2, when performing an automatic update instead of a manual one, update files were simply downloaded to a certain directory, then the phone got rebooted, and then the recovery took over and installed the update before rebooting into the updated OS.

Regarding the A/B mechanism (which is now used on the Fairphone 3), the guide doesn’t exactly say how the slots are switched to then boot the other slot which got updated in the background.
But my guess now is the recovery would have no role in this anymore, so keeping the installed TWRP shouldn’t break automatic updates of the stock OS. Or should it?

Well, if in doubt, I’ll just see when the next update comes around.

2 Likes

I think technically you could have two different systems running on the same phone that share the same data partition, it would probably break updates (or one partition would get overwritten.) This also means you could have a combo of rooted and unrooted, as long as they were both running the same systems. (I could be totally wrong though.)

2 Likes

If I understand correctly, TWRP (and Magisk) are gone after the OTA update, and need to be re-installed:

The key thing here is that it [the OTA update] installs a fresh, fully stock version. Your data gets pulled over, but none of your mods go with it. To get them back, you have to install them all again. There are various ways of doing this, and this isn’t the place to repeat the guides that are already posted on how. Just understand that you have to do it to keep root, twrp, and your other mods.

3 Likes

That’s when you are rooted, if I got that sorted right.
That’s certainly an effect to consider.

2 Likes

Actually, most of the OTA updates are diffs. Which can corrupted a custom boot/system (or other partitions)

2 Likes

Therefore it says in the article:

The update engine detects root and downloads the full update instead of the incremental update

But @AnotherElk is right, they only mention root - wouldn’t that be dangerous with other mods (like TWRP)?

2 Likes

The update_engine should actually check the partition checksums and either download a full update or refuse to update altogether if they don’t match.

4 Likes

Definitely tracking this thread.
As soon as all your mods, tweaks, twrp, root are stable, will check
Keep up the good works. Nice job folks :+1:

2 Likes

I have uploaded an installable ZIP-file for Stock-ROM here:
https://androidfilehost.com/?fid=4349826312261710557

If anyone wants to give that a try.

12 Likes

Can’t try it now, but I love the subtle change in filename compared to the earlier one :slight_smile: :+1: .

is this a way to get a full ota download url?
i still havent updated to 105 maybe i can try it

1 Like

Sure, give it a try.
If the incremental update fails, it should try a full update (if there is one available)

Did you root your phone? I guess, if you have a different boot :grin:
It might be a good idea to MITM the requests in the same time :slight_smile: (to be able to check for update without the phone)

Edit:
The public key (for the website or the update ?) is here :
/system/etc/update_engine/update-payload-key.pub.pem
G**gles certs are here :
/system/etc/security/cacerts_google/*

Some relevant strings in /system/bin/update_engine

Booted in dev mode.
Booted non-official build.
/data/misc/update_engine_log
/data/misc/update_engine

So it doesn’t want to install in case of modified boot. (We’ll pass thru TWRP flashable zip)

2 Likes

Yes that’s the behavior I know from the Pixel2XL. It never did a full system update for me there, it immediately stopped the update procedure once it detects a modification. As mentioned earlier, the safest option is to restore a previously backed up boot.img (or if you know which version you have - from a factory image), then reboot and update as usual. Finally redo the boot modifications on the the updated boot.img. Of cause this must also be done with system if that was modified as well.

I tried that, and it didn’t work … not with my own A.0105 boot.img from a backup, and not with the boot.img from the A.0105 stock image … the Updater doesn’t update and only says “installation problem”.

Did you flash magisk? Because it also mount system and vendor partition to do something (I didn’t look) *

*edited

1 Like