FP4 Root Access is possible, maybe a bit risky

That’s strange, you shouldn’t have to mess with the slots at all :thinking:

Did you always have issues with OTA updates?

I do not remember anymore the details exactly. It was just once on “initial root”. Maybe I also tried a different method than the current one, butmaybe not :wink:
The OTA process never worked for me. For sure, I can help me booting a patched image via fastboot, but that is not so comfortable than using your described approach.

Personally I would have probably performed a fresh install when the initial problems occured or after the first failed OTA, something feels off.
But I fully understand not wanting to waste time setting everything up again, it’s also a great way to test your backup strategy though :smirk:

If you ever have to perform a clean install or switch to a different ROM let me know if the OTA updates start working :slightly_smiling_face:

Haha - test backup strategy… I do this a lot of times during my work, but in private life I am always afraid…
Now, I remember - I’ve tried to use alternative OS (e.g Lineage or similar) and then returned to FOS.
Sure, I will let you know! BTW - fresh install means basicly doing a complete factroy reset? Or should I do sth else?

Yeah, I totally get it. I can’t keep myself from messing with devices so I can get it running again in maybe half an hour (backups remote and on SD helps), but it’s still always a hassle, too many things that can’t be properly automated.

Fresh install means flashing factory images (or some other ROM), a factory reset doesn’t restore (potentially damaged) partitions.

For me from the first OTA on the procedure with trying to keep Magisk did not work at all. So I started recovering the orginal boot image, run the OTA, reboot and root the FP4 from scratch. BTW, probably I am the FPOS case @hirnsushi mentioned before :wink:

Ok - I did it. I’ve taken the “upgrade” to Android 13 as a chance and did a complete fresh install using the factory images from here: Installing Fairphone OS Manually – Support
However, I’ve stucked into the “critical partions locked” - problem. Almost same like described here Stuck with locked critical and FPOS - Help / Fairphone 4 - Fairphone Community Forum, also that solution worked for me. (Thanks @ @hirnsushi)
Additonally, I found out that my “active slot” was set to “B”. So I reset it also to slot “A”.

Even I was fine with my backup strategy (Swift backup + some manual messenger backups), it tooks a couple of hours for me.
But now I have a rooted (Magisk Delta) FPOS 13 with all my needed apps incl. data/settings.
(Even some AdAway problems seems to be solved now, the main reason to root for me, the only thing I’m missing is a reliable vanced youtube replacement).

I’m looking forward to the next OTA and hopefully the build-in magisk mechanism (install to inactive slot) will work then :slight_smile:

1 Like

As a vanced YouTube replacement I can recommend Revances YouTube or - as I use it myself - Revanced YouTube Extended.

Or do you consider it unreliable? If so, why?

1 Like

Thank you, I will ckeck them out. To be honest, I didn’t search too deep for a replacement (since the old Vanced app is still working - for now). But I’ve found only a lot of garbage: non-working, spy-ware, malware and so on. This is what I meant with “unreliable”. I’m not sure if I’ve tried your suggestions - but I will do and let you know my opinion.

1 Like

Hirnsushi, do you by accident have the boot img from the latest update? I forgot how to acquire it. The buildnumber is FP4.TP1X.C.079.20231013

Thanks a lot,

Bas

I haven’t had time to update my family member’s FP4 yet, sorry, but you can follow these instructions to get it:

If you are extracting the image after the update but before you rebooted, make sure to get the other slot you aren’t currently in. If you are already running the updated system you’ll want your current slot.

If you lost root, get the previous boot.img from the kernel page, patch that and fastboot boot it. You will get some error messages if you are on a different version, but it will do for extracting the boot.img you need.

Have fun :nerd_face:

1 Like

I have one, but I do not have a place to put it for download for everyone.

EDIT: Creating the image is rather simple:

  1. Boot into bootloader
    adb reboot bootloader
  2. Start fastboot with recovery image (i.e. Linageos 20 recovery)
    fastboot boot lineage-20231001-recovery-FP4.img
  3. get the boot image (for example from slot a)
    dd if=/dev/block/by-name/boot_a /tmp/boot_a.img
  4. Get boot image
    adb get /tmp/boot_a.img
  5. reboot and push boot image to download dir
    adb push boot_a.img /sdcard/Download/
  6. Install magisk into the image under /sdcard/Download/
  7. Check image file created by magisk install under /sdcard/Download/ and download it via adb
    adb pull /sdcard/Download/FILENAME_MAGISK.img
  8. Reboot into bootloader again and boot the rooted image
    fastboot boot FILENAME_MAGISK.img
  9. Install magisk again with the direct method
  10. Reboot and done :wink:
2 Likes

No biggie. Thanks a lot! :smile:

Thanks Lars! I will try!

It worked guys, thanks a lot!

2 Likes

Just for future memories, I had to extract the boot.img for rooting FP5, and as the phone is not yet rooted the above command is not working (missing “su”)

So that’s my procedure:

  • fastboot boot twrp-FP5.img
  • identify the current slot (“a” in my case)
  • adb shell dd if=/dev/block/by-name/boot_a of=/external_sd/boot-FP5.img

As TWRP is unable to decrypt user partition I had to insert a MicroSD card, so that’s why I copy to external_sd instead of sdcard :slight_smile:
I don’t know if there is a method without external_sd, didn’t find a way to pull it directly to the computer without copying it first to the phone…

Yes - it worked out for me now :smiley:
No more annoying searching for an appropriate USB cable :rofl:

Thanks for advising me. Now I have to fight with stupid “root detection” of Google Wallet and some other apps, but anyway - there is always something :slight_smile:

You configure Zygisk in Magisk App and hide certain apps from root, like banking apps

Thanks, for helping me.
I am using Magisk Delta exactly of that reason to hide root for other apps. This forks works with a kind of “white list”, i.e. only apps on that list should be able to see root and root is hide from all others.

This works until a couple of days completely independent from current OS OTA update. I use three different banking apps, 2 of them still working (which did not working with original Magisk).
The 3rd has retrieved an update on Nov 8th and detects root now with that version. The same for Google Wallet. I could rollback the banking app to the previous version, it is working. But still no solution for Google Wallet…
I’m a little bit tired of such annoyning games of hide & seek…

Missing “of=” in front of the out file
I cannot edit the original message, so here is the corrected one:

  • Boot into bootloader
    adb reboot bootloader
  • Start fastboot with recovery image (i.e. Linageos 20 recovery)
    fastboot boot lineage-20231001-recovery-FP4.img
  • get the boot image (for example from slot a)
    dd if=/dev/block/by-name/boot_a of=/tmp/boot_a.img
    Or use any other dir that is available for storing the out file
  • Get boot image
    adb get /tmp/boot_a.img
  • reboot and push boot image to download dir
    adb push boot_a.img /sdcard/Download/
  • Install magisk into the image under /sdcard/Download/
  • Check image file created by magisk install under /sdcard/Download/ and download it via adb
    adb pull /sdcard/Download/FILENAME_MAGISK.img
  • Reboot into bootloader again and boot the rooted image
    fastboot boot FILENAME_MAGISK.img
  • Install magisk again with the direct method
  • Reboot and done
1 Like