TWRP installable stock firmware packages for Fairphone 3

Okay, I get it now, that is specifically useful for TWRP. Well, nothing is lost in doing it, then it is quicker to flash, and it can still be flashed manually file by file through fastboot.

Perfect, that was a silly mistake. What about the dsp partition? It is an ext4, but in your images you did not create corresponding dat-files and brotli-files I think.

You’d have to convert the product, vendor and system images again for flashing with fastboot, but yes that’s possible.

I did that initially, but given the size of it and the fact that it is mostly treated as an image like the modem partition I didn’t do that in the recent versions.
Also if you look at the output of the file command it would actually tell you, that system, vendor and product are ext2 while dsp is identified as ext4.

@k4y0z: I just saw in your images that you also flash a partition sbltest. Well, I don’t find such a partition on my device, what is that supposed to be? Everything else looks fine.

That’s a mistake on my side, you can safely remove that line.

Here is a stock image of the firmware that was on my phone when I bought it (probably the oldest firmware available):

Fairphone_FP3_8901.2.A.0096.20191001_10011803_user_release-keys.zip
(8779a165ce39ed8be2ded7f69f0a9d6e)

The phone has been unlocked before the firmware was extracted. This is also not a TWRP package, but there is a script of my own to install it using fastboot.

Feel free to pin the link at the beginning if you find it suitable.

2 Likes

So, as a follow-up …

… now the A.0111 update is available, and my updater doesn’t update and complains about the system partition.

03-19 21:17:50.814   784   784 I update_engine: [0319/211750.814552:INFO:delta_performer.cc(374)] Opening /dev/block/bootdevice/by-name/system_a partition without O_DSYNC
03-19 21:17:50.815   784   784 I update_engine: [0319/211750.815629:INFO:delta_performer.cc(126)] Caching writes.
03-19 21:17:50.815   784   784 I update_engine: [0319/211750.815794:INFO:delta_performer.cc(386)] Applying 6620 operations to partition "system"
03-19 21:17:50.852   784   784 E update_engine: [0319/211750.852800:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
03-19 21:17:50.853   784   784 E update_engine: [0319/211750.853026:ERROR:delta_performer.cc(995)] Expected:   sha256|hex = 4624201CA589D350FB5CACFEFBB1B585CA128D42E0B2FEF8B5F0A17145C697C9
03-19 21:17:50.853   784   784 E update_engine: [0319/211750.853072:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = FECA0CB7131E7B81E91B4DF33C3C3AB1494B446B051DEA8247564F3C0998716A
03-19 21:17:50.853   784   784 E update_engine: [0319/211750.853167:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:2,191:16,222:295,8289:2,8303:2,8352:1,8371:1,8383:1,8424:1,8484:1,8488:1,8523:1,8554:1,8559:1,8563:1,8576:1,8601:1,8633:1,8637:1,8658:1,8666:1,8670:1,8682:1,8690:1,8717:1,8724:1,8736:1,8775:1,8779:1,8785:1,24002:8,24362:5,28648:1,32593:1,32768:2,33229:8,38050:20,38116:1,38488:2,38930:1,39799:1,42717:1,46743:1,47109:3,51082:8,54916:31,54948:1,54950:34,54987:6,54996:3,55001:18,55020:1,55022:13
03-19 21:17:50.853   784   784 W update_engine: [0319/211750.853282:WARNING:mount_history.cc(66)] Device was remounted R/W 3 times. Last remount happened on 1970-01-02 19:30:47.000 UTC.
03-19 21:17:50.853   784   784 E update_engine: [0319/211750.853335:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
03-19 21:17:50.853   784   784 E update_engine: [0319/211750.853378:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 1399, which is the operation 0 in partition "system"
03-19 21:17:50.853   784   784 E update_engine: [0319/211750.853420:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing

I installed the A.0110 stock package (linked to in the first post) just now with TWRP, which went fine, but the updater still complains about system.

03-19 22:14:15.499   733   733 I update_engine: [0319/221415.499761:INFO:delta_performer.cc(374)] Opening /dev/block/bootdevice/by-name/system_a partition without O_DSYNC
03-19 22:14:15.501   733   733 I update_engine: [0319/221415.501070:INFO:delta_performer.cc(126)] Caching writes.
03-19 22:14:15.501   733   733 I update_engine: [0319/221415.501372:INFO:delta_performer.cc(386)] Applying 6620 operations to partition "system"
03-19 22:14:15.554   733   733 E update_engine: [0319/221415.554832:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
03-19 22:14:15.555   733   733 E update_engine: [0319/221415.555040:ERROR:delta_performer.cc(995)] Expected:   sha256|hex = 4624201CA589D350FB5CACFEFBB1B585CA128D42E0B2FEF8B5F0A17145C697C9
03-19 22:14:15.555   733   733 E update_engine: [0319/221415.555091:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = 39E9EF4ADFEC1EAA9E797858F764A65B8150016B3CFCC4D9BD31F2FE97985616
03-19 22:14:15.555   733   733 E update_engine: [0319/221415.555186:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:2,191:16,222:295,8289:2,8303:2,8352:1,8371:1,8383:1,8424:1,8484:1,8488:1,8523:1,8554:1,8559:1,8563:1,8576:1,8601:1,8633:1,8637:1,8658:1,8666:1,8670:1,8682:1,8690:1,8717:1,8724:1,8736:1,8775:1,8779:1,8785:1,24002:8,24362:5,28648:1,32593:1,32768:2,33229:8,38050:20,38116:1,38488:2,38930:1,39799:1,42717:1,46743:1,47109:3,51082:8,54916:31,54948:1,54950:34,54987:6,54996:3,55001:18,55020:1,55022:13
03-19 22:14:15.555   733   733 W update_engine: [0319/221415.555305:WARNING:mount_history.cc(66)] Device was remounted R/W 2 times. Last remount happened on 1970-01-08 00:53:56.000 UTC.
03-19 22:14:15.555   733   733 E update_engine: [0319/221415.555359:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
03-19 22:14:15.555   733   733 E update_engine: [0319/221415.555404:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 1399, which is the operation 0 in partition "system"
03-19 22:14:15.555   733   733 E update_engine: [0319/221415.555445:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing

I have no idea where these “Device was remounted R/W” warnings are coming from.
I only used the latest TWRP for backups, and by default it doesn’t show system as mounted.

Any idea how to proceed?

1 Like

Have you made sure the “Mount system partition read-only” is checked before you installed 110?

1 Like

I don’t get that request anymore when TWRP starts up.
I guess I would have to delete the .twrps file?

But what can be done about system then?

Just go to the Mount page, there is a checkbox at the bottom:

2 Likes

Nice … some more dots I didn’t connect until now.
Thank you very much, the update ran successfully now.

3 Likes

A post was merged into an existing topic: TWRP for Fairphone 3

Hmm… How can I make a full backup from my current FP3 firmware? Click “Backup” on TWRP? My FP3 is never used, one time started.

I want to install /e/ alpha on weekend. :smiley:

Same issue than AnotherElk, but with latest version of TWRP.

I was not able to install the new OTA update, so I tried to flash with TWRP the 110. I already had the mount system read only checked.

But after successful install, the phone does not boot. I end up with a screen saying that it can’t load android system and that my data may be corrupted. I can either retry to boot or do a factory reset.

I still have access to fastboot, I try several time to flash twrp and then try to reinstall 105 or 110, but still the same result.

I will go for a factory reset.

… which was resolved for me, luckily.
The update to A.0118 ran without a problem now, too.

Just to be clear for people reading along … you can’t “flash” TWRP on the Fairphone 3.
You just fastboot boot it … or, if you really want to, you can install it once TWRP is booted, which embeds it into the boot partition using an install script, which breaks OTA updates because the boot partition gets changed this way and the updater checks for such partition changes and doesn’t update in this case.

If installing the TWRP stock packages doesn’t work for you, there are stock partition image dumps out there you can flash with fastboot …

3 Likes

I was not sure that installing twrp from twrp boot breaks OTA updates, thanks for clarifying this :slight_smile:

Hey, I don’t suppose you have a TWRP installable stock firmware packages for A0111?

Could you please clarify which functionality would be lost by not mounting system read-only (e. g. to install F-Droid Privileged) and which steps would be necessary to get it back?

The point of mounting system read only is to keep it from being modified.
If you want to do modifications to it (such as installing F-Droid Privileged), you’ll have to mount it rw (Or the installer will do that automatically regardless of the setting).
Modifications will make incremental OTAs fail, and for some reason Fairphone still doesn’t appear to provide full OTAs.
You can backup and restore “System Image” before doing modifications.

Is there any benefit in installing f-droid privileges? You can give the right to install apks individually to apps that ask for it.

This does only affect Fairphone OS OTAs, right? So if I’m on /e/, I wouldn’t care, because I could restore system when going back to Fairphone OS!?
@lklaus
F-Droid Privileged can install updates without having to hit Update -> Install each time.