March 19, 2023, 6:42am
Thank you very much,
@AnotherElk! At least, that took me one step further. I have copied the necessary TWRP and Magisk files onto an SD card and I can see and choose them within TWRP. But when trying to flash them, TWRP 3.7.0_9 reports multiple
Failed to mount '/system_root' errors. Apparently there were more serious changes with this OS update from
0019.2 to 0021.0.
Edit: OMG, this led to an bootloop into recovery again and again… I am not able to start the phone anymore… Any help appreciated!
Edit 2: I managed to revive the phone again by redoing the OS update to 0021.0.
Hmmm, this might be related …
System update improvements
Your Fairphone will be better at managing storage partitions in the background, making system updates better-prepared for years to come.
We retrofitted a new way of managing the system storage (dynamic partitions). This affects system partition and images only, it does not affect user data."
Assuming your bootloader is unlocked since you wanted to install TWRP:
To update your Fairphone 3(+), always use the regular procedure.If you encounter an issue, you can follow this article to perform a manual update installation of Fairphone OS on Fairphone 3(+) usin...
According to the instructions there should be a prompt whether to erase or keep user data.
(Which is only meaningful when not unlocking or locking the bootloader which both force a factory reset for security reasons.)
Does this mean you have a backup of your data partition from before the update?
And a separate backup of the “Internal Storage” because TWRP backups don’t include it?
March 19, 2023, 10:03am
Thank you very much
@AnotherElk for your prompt support! In the meantime, I reapplied the OS update and was able to revive my phone again. Phew. I was already on the brink to do a factory reset…
Maybe. And that way, they maybe also killed a working root mechanism.
No and no. I basically follow the procedure of the OS manual installation above. At the end of that procedure, I reapply TWRP and Magisk:
ADB push TWRP installer zip file + Magisk zip file + TWRP image file onto phone
adb reboot bootloader and then
fastboot boot twrp.img
TWRP flash zip files
(this step fails now!)
That worked for numerous OS updates without any error or data loss. The
0021.0 update is the very first one that failed there.
according to the release notes:
“We retrofitted a new way of managing the system storage (
dynamic partitions). This affects system partition and images only, it does not affect user data.”
This seeems to be the issue!
I have found this on AOSP Webpage about dynamic partitions
Dynamic Partitions | Android Open Source Project
The new partition layout looks like this:
Implementing Dynamic Partitions | Android Open Source Project
It seems that the TWRP needs to be aware of the dynamic (or super) partition.
There ist the point we are struggeling and need to investigate.
Maybe there is a workaround or any other way to circumvent this issue.
Hope this lead us to the right direction.
TWRP on the Fairphone 3/3+ is currently on the Android 9 branch of TWRP (the “9_0” in the TWRP image filename).
Dynamic partitions were introduced with Android 10 …
TWRP and Android 10.
My guess is that TWRP for the Fairphone 3/3+ would need to be on a
branch which can handle dynamic partitions. TWRP in general is prepared to do this, apparently.
Split this topic
May 25, 2023, 9:01am
5 posts were split to a new topic:
Issues rooting a FP3
March 22, 2023, 6:34am
Looks like something topjohnwo would want to fix – is there a Magisk bug report for this?
Same for TWRP … just talking about it in the forum isn’t going to help IMHO.
This topic was opened by the maintainer of TWRP on the Fairphone 3/3+, so in theory posts here should not be in vain, but there’s also
Issues · TeamWin/android_bootable_recovery · GitHub … there’s an issue already …
05:38PM - 16 Feb 23 UTC
- [ x] I am running an official build of TWRP, downloaded from https://twrp.me/D
- [ x] I am running the latest version of TWRP
- [ x] I have read the FAQ (https://twrp.me/FAQ/)
- [ x] I have searched for my issue and it does not already exist
#### WHAT STEPS WILL REPRODUCE THE PROBLEM?
TWRP was not installed on the device, but run via the bootloader command, i.e.:
$ adb reboot booloader
$ fastboot boot twrp-3.7.0_9-0-FP3.img
TWRP does load, but the system partitions are no longer recognized correctly "Failed to mount /system_root".
#### WHAT IS THE EXPECTED RESULT?
TWRP boots, asks for encryption pattern/code, mounts system partitions r/o, allows the installation of zip files/backups/restores...
#### WHAT HAPPENS INSTEAD?
TWRP boots, does *not* ask for encryption pattern/code, none of the system partitions are mountable, the data partition is still encrypted.
#### ADDITIONAL INFORMATION
The update description has a paragraph that reads:
" System update improvements
Your Fairphone will be better at managing storage partitions in the background, making system updates better prepared for years to come."
It does not look like anyone is actually working on this
So I guess this is the end of rooting on the FP3?
June 6, 2023, 4:36pm
Took me a while, but it’s here, first Android-11 based TWRP for FP3 with dynamic partitions and decryption:
I’ve also looked into the Magisk-Issue, see here:
11:58AM - 25 Mar 23 UTC
## READ BEFORE OPENING ISSUES
All bug reports require you to **USE DE
… BUG BUILDS**. Please include the version name and version code in the bug report.
If you experience a bootloop, attach a `dmesg` (kernel logs) when the device refuse to boot. This may very likely require a custom kernel on some devices as `last_kmsg` or `pstore ramoops` are usually not enabled by default. In addition, please also upload the result of `[proc_mounts.txt](https://github.com/topjohnwu/Magisk/files/11068768/proc_mounts.txt)` when your device is working correctly **WITHOUT MAGISK**.
If you experience issues during installation, in recovery, upload the recovery logs, or in Magisk, upload the install logs. Please also upload the `boot.img` or `recovery.img` that you are using for patching.
If you experience a crash of Magisk app, dump the full `logcat` **when the crash happens**.
If you experience other issues related to Magisk, upload `magisk.log`, and preferably also include a boot `logcat` (start dumping `logcat` when the device boots up)
**DO NOT** open issues regarding root detection.
**DO NOT** ask for instructions.
**DO NOT** report issues if you have any modules installed.
Without following the rules above, your issue will be closed without explanation.
Device: Fairphone 3+ (FP3)
Android version: 11
Magisk version name: 981ccabb (D)
Magisk version code: 25210
FP3-8901.4.A.0021.0-gms-0b368514-user has introduced retrofitted Dynamic Partitions to the fairphone 3(+) and when preforming the update via fastboot boot.img patching results in a bootloop of the device until a counter is hit and the device is booted into fastboot.
Checking Fairphone's forurms preforming the update via ota from FP3-8901.4.A.0019.2-gms-53c17a08-user works as expected but not patching the boot.img as per the linked thread: https://forum.fairphone.com/t/magisk-fairphone-os/93689/6
I have attached the boot.img files and the output of cat /proc/mounts made on FP3-8901.4.A.0021.0-gms-0b368514-user.
[Output of `adb shell cat /proc/mounts`]
[Clean original boot.img]
[Patched with magisk manager 981ccabb (25210) (D)
June 7, 2023, 7:56am
Both (patched TWRP and patched boot image) work like a charm! Thanks a million (also for getting your patch into the next Magisk release).
June 7, 2023, 4:19pm
May I ask you how you did this, please? At which point do you apply the boot.img and how? Thank you!
Thanks for continuing to work on this.
I just booted it and unfortunately neither mounting partitions apart from data nor decrypting data seem to work for me. It doesn’t ask for my decryption password, so doesn’t decrypt data, and mounting the other partitions looks like this …
I’m running Android 12 (S) in the form of /e/OS e-1.11-s-20230511288805-dev-FP3 …
Is there something I can test or try?
Switching the storage to SD card works, so apart from screenshots I can copy logs.
June 7, 2023, 6:15pm
Please provide the /tmp/recovery.log.
Does /e/ use dynamic partitions?
What happens when you use the old 9.0-based TWRP?
Done via GitHub.
I don’t know. 9.0 based TWRP can mount partitions other than data, if that’s an indication.
Doesn’t ask for decryption password, so doesn’t decrypt, like the 11.0 based TWRP.
9.0 based TWRP decryption support was lost with /e/OS when it went from Android 11 to Android 12 on FP3.
Other partitions seem to mount fine, though (I can select them in “Mount”, too, which I can’t do in the 11.0 based TWRP) …
June 7, 2023, 7:29pm
Seems there are two issues then for /e/.
It doesn’t seem to use dynamic partitions and the 11-based TWRP can’t decrypt the 12-based encryption.
I tried building a 12-based TWRP before, but that wasn’t able to decrypt the 11-based encryption of FPOS.
So this might need a separate TWRP-build for /e/
Would be great to get feedback from someone using LOS.
June 8, 2023, 7:38am
@bami: How to apply the patched boot image
Make sure your FP3 is updated to the current patch level, (.0022) that it has the developer option enabled, that the boot loader is unlocked and that the current Magisk app is installed.
Make sure your PC has the Android developer tools adb and fastboot installed.
Download the patched boot image from
https://github.com/topjohnwu/Magisk/files/11646684/FP3-8901.4.A.0022.0-boot_magisk_patched_skip_initramfs.img.zip (from the link provided in “Bootloop upon fastboot installation with FP3-8901.4.A.0021.0-gms-0b368514-user” above) and unzip it. Reboot your FP to bootloader mode with “adb reboot bootloader”
Boot the downloaded image with “fastboot boot FP3-8901.4.A.0022.0-boot_magisk_patched_skip_initramfs.img” and make sure the patched image works for you.
If it does then reboot again to fastboot mode as in step 4. and then install the patched image to the boot partitions of your FP3 with “fastboot flash boot_a FP3-8901.4.A.0022.0-boot_magisk_patched_skip_initramfs.img” and “fastboot flash boot_b FP3-8901.4.A.0022.0-boot_magisk_patched_skip_initramfs.img”
Reboot (“fastboot reboot”) and enjoy
Note: If you want to apply any future releases to your FP3 you will have to revert to the unpatched boot image, so I strongly recommend that you keep an original boot image as contained in https://fairphone-android-builds.ams3.digitaloceanspaces.com/FP3/FP3-8901.4.A.0022.0-gms-5bdac72d-user-fastbootimage.zip handy. To flash the original boot repeat the above step 6 with the boot.img contained in the images directory of the zip.
June 8, 2023, 11:07am
unfortunately no password prompt, and no decryption…, but thanks for your efforts!
recovery.pdf (104.8 KB)
June 8, 2023, 11:41am
@wjg57, for your detailed instructions! These are perfect for me!
June 8, 2023, 2:09pm
Use this one instead:
The one you linked breaks recovery-boot (It will just boot to system, if you try booting recovery)