TWRP for Fairphone 3

If there is an addons.d in the ROM, it would put it’s retention-script there.
Not sure if it would touch a stock-ROM though.
However mounting system or vendor as RW in TWRP would be enough for invalidating the checksums.

Well, I think it mount them in read-only (due to what I read in the next link.)
Here is a tuto to update a device with magisk.


(thx @grumpy)

Thanks, that would most probably help, but when I have some time again I’ll start from scratch with GSI anyway, so I’ll just not update now.

So these partitions are enough to get a full snapshot of the phone?
Meaning I don’t need to make a nand backup for each and every partitions, but just for these (and EFS once for all)?

My goal is to have a easy way to try new buggy ROM (to start porting Lineage). Flashing a buggy rom → crash → restore nand backup → everything is back where it was.

I have installed TWRP as the recoery and rooted the phone with Magisk, additionally I removed some google system apps with the TWRP file manager.
The ota update tutorial doesn’t work for me.
I’d like to understand now if it’s because of TWRP or deleting the systems apps? Or both?
Am I right, that updating with disabling Magisk only works if I didn’t install/flash TWRP, but only booted it from fastboot and installed Magisk?

What’s necessary now to successfully update my FP? Will it work if I flash the boot and recovery partition, or is the system partition also necessary?
And for the future: will removing system apps with the twrp filemanager always result in an invalid check for the ota updater?

2 Likes

You can do it manually for the moment, thanks to the awesome work on payload_dumper done by @corvuscorax .

You need stock A0105, with the non-corrupted dsp.img here, and use his version of payload_dumper here.

Stock A0110 img/flashable zip are coming soon.

1 Like

I have uploaded a new TWRP-release to my github.
Installable ZIP for 110 is also currently uploading.

ZIPs available here:

7 Likes

I’m sorry, but I cannot run the payload dumper. I tried with my windows 10 computer and with windows itself and the ubuntu subsystem it’s not possible to get all the dependencies for the python2.7 script.
I’d rather try to install LOS with the GSI image now.

Edit: I just flashed the Fairphone_FP3_8901.2.A.0105.20191217_12171325_user_release-keys.zip from k4y0s and it worked :+1:

Sorry, I never even considered Windows. I successfully ran it on Ubuntu 18 though, maybe a VM would work. You could just use the image linked above:

Yes, I just flashed the Installable zip.
It’s not your fault it isn’t working with Windows, the dependencies are just a big mess.

Interesing, the ota update still fails, after flashing the stock rom (A.105). Because of the unlocked bootloader? I’m downloading the flashable A.110 now and try to flash it.

installing TWRP will indeed prevent you from using the OTA. When you uninstall Magisk, it will not restore the original boot.img but the modified one. Thus you must not install TWRP if you want to go this route.

I’d expect that removing system applications modifies the system partition, thus OTA will fail for that reason too.

2 Likes

I did the OTA with bootloader unlocked, so that alone definitely doesn’t have any effect. Any modifications to any of the following partitions (it’s enough to briefly mount one of them read/write, even without changes) will break the OTA update:

aboot
boot
cmnlib64
cmnlib
devcfg
dsp
dtbo
keymaster
lksecapp
mdtp
modem
product
rpm
sbl1
system
tz
vbmeta
vendor

The FP OTA so far are always differential updates, which means it contains binary diffs along with checksums of “before” and “after” - applying the diffs (patching) would fail if anything is different or worse - lead to a corrupted filesystem, so the update engine compares the checksums for each of those partitions first, and aborts the update if there is a mismatch to avoid bricking the phone (so this check isn’t just to make our lives difficult, the check actually makes sense :wink: )

This means, if you have installed magisk, TWRP, or both, rooted the phone, did any changes to system, or even just mounted it within TWRP once, you need to first go back to the original one OR apply the update yourself.
You can “simulate” an OTA by flashing the new image to the currently inactive slot, then attempt to boot from it. (possibly after also installing TWRP/magick/etc… in the freshly flashed slot as well) If that booting fails, the phone will do what it does in OTA’s, too, it will automatically revert back to the old slot, and you can try again, but you still have a working phone and access to all your data.

2 Likes

Thank you for the detailed explanation.
So that means, that deleting system apps isn’t an option when wanting to do ota updates in the future. Though disabling works.
What puzzled me was, that after flashing the A.105 Stock the OTA update still failed. I think it would have been necessary to do a factory reset/wipe in TWRP.

No, the A.105 shared online accidentially contained an altered partition which made OTAs impossible.

the first shared full image contained a corrupted dsp partition. you need to find the latest links and redownload. I would suggest installing the A.0110 full image right away.

Thank you, I though the A.0105 was updated with the new dsp partition in the meantime. I will try that now.
It’s not possible to boot the A.0110 at the moment. It freezes while booting, like described in the TWRP installable stock firmware thread.

its now possible with a little workaround.

you need: Fairphone_FP3_8901.2.A.0110.20200109_01092024_user_release-key.zip
and twrp-3.3.1-0_k4y0z-20200131-01-fp3.img

  • unzip content into a folder on your machine
  • put the zip to sdcard
  • boot into twrp
  • install it to slot b (under reboot you can switch slots)
  • now comes the tricky part. dont reboot to system! reboot it to fastboot!
  • now do:

check the slot with fastboot getvar all (it should be b)

fastboot flash vbmeta vbmeta.img
fastboot flash sbl1 sbl1.img

twrp does not flash these 2 partitions at the moment

reboot

3 Likes

There will probably be a new TWRP-release today, to fix that once and for all.

4 Likes

It’s always nice when stuff works out, but depending on what exactly users did with their phone in this early stage of experimenting results might differ (I found out the hard way), so we should be careful for now generalising like that, I think.

Let’s hope the next TWRP will make things easier.

What if the slot with the working OS is slot B?

Why should it be B in every case?

thats what worked for me … . slot b is a good slot so far :stuck_out_tongue: :stuck_out_tongue:

might be good to install and flash it to both slots.