FP4 Root Access is possible, maybe a bit risky

For what it’s worth my Magisk is also hidden and I didn’t encounter a single issue while applying OTA.
As a matter of fact I don’t even need to uninstall magisk before installing OTA. Just installing Magisk on alternate slot before rebooting does the trick.

Feels like there are some modules messing up stuff here

1 Like

I think I have the same problem as @Lars_Hennig since a couple of OTAs. When I go to Settings/System/Updates, I can see the animation running for a second or two and then it returns to the home screen. With Magisk hidden I uninstalled it (reinstalled the original images) successfully, but still can’t access the update.
After unhide Magisk the uninstallation does not work at all and I have the same behaviour acceding to OTA. The only way to do the OTA is to uninstall Magisk, reboot, do the OTA and reinstall Magisk from scratch.
My installed Magisk’s modules :

  • Advanced Charging Controller
  • F-Droid privileged Extension
  • Font Manager
  • Shamiko
  • Systemless hosts
  • Universal Safetynet Fix
  • Webview manager
  • Zygisk -LSPosed

Some ideas ?

Well, in my case everything worked fine with my hidden Magisk until it finally came to the final reboot after patching the inactive boot image.

This time I was able to make it even worse myself: Just before the OTA procedure Magisk installed the beta update 26 (I had activated the beta upgrade path) and after that it was not able to find the stock image backup.

So I uninsttalled Magisk completely and started rooting from scratch this time

Could you capture a logcat please :pray:

  • adb logcat -c && adb logcat > logcat.txt
  • Press the update button and wait for it to fail
  • Stop the logcat

Had the same problem (on Calyx), which I kind of expected to happen. I ended up just downloading the factory images to the phone and dding the boot.img via Termux before starting the OTA update, worked fine :slightly_smiling_face:

1 Like

Thank you @hirnsushi . I saw your answer after I completed the upgrade and reinstalled Magisk from scratch. At the next OTA I will capture a logcat. But I couldn’t even get to the OTA startup screen, because after a second I was back on the home screen

1 Like

Hi every one,

I tried to root my FP4 but after this, my phone have been blocked in a bootloop.
I’m a bit lost and I tried to check every bootloop issue and there is always an other problem with mine.

Also I tried to follow these step (https://support.fairphone.com/hc/en-us/articles/4433978210833) but it’s blocking me at the 14 step because there is no “git-bash.exe” in this folder “bin-msys”.

Or may I need to update the firmware but I don’t know how to do this.

Someone can help me please ?

Welcome to the community :wave:

What steps did you follow to root your phone and at what point did it fail? :thinking:

Can you also boot the phone into fastboot and check the output of fastboot oem device-info please :pray:

Don’t reinstall the system for now, and whatever you do, don’t lock the bootloader!!!

Hi thanks for your quick response :smiley:

I followed these step on youtube (How To Root (Almost) Any Phone in 2020! - YouTube), the help of this forum and this (Fairphone 4 - Root | XDA Forums) with the .img for magisk
The only point who fails is for the reboot, so the last step

Here is the response of my console (I think that my computer don’t detect it in fastboot mode but in recovery the devices shows “unauthorised”) :

My phone shows actualy :
Fatsboot mode
Product_name:FP4

device state : unlocked

Thank you !

I need some more information about what you did and what the current state is:

  • What boot.img did you use?
  • Did you flash the image (like that YT video tells you) or fastboot boot as you are supposed to?
  • If you fastboot booted it, did the initial boot fail or did it stop working after you pressed Install in the Magisk app?
  • What FPOS version are you on (check the version shown in recovery as well)?

If you flashed the boot.img, the next step would be to boot from a stock (unpatched) one. Since you already downloaded the factory images just take the included boot.img and try booting from it with fastboot boot boot.img.
If that succeeds you can flash it and we’ll start process again from there.

Those instructions are quite old, the (up-to-date) instructions those are based on are here:

1 Like

I’ll try to sum up what I did:

  1. I unlocked OEM and allowed USB debugging
  2. I made an update of my driver and download adb on the support of fairphone (https: //support .fairphone. com/hc/en-us/articles/10492476238865)
  3. In adb, I reboot bootloader and I inputed fastboot flashing unlock
  4. reboot and I did the same as 1.
  5. I took the boot.img from here in the zip (https: //forum. fairphone. com/t/finally-the-fp4-rom-file-is-available/82041)
  6. I transferred it on my FP4, I downloaded and installed magisk from the boot.img.
  7. I transferred the magisk_patched.img on my laptop
  8. I reboot bootloader and I fastboot flash the magisk patched file
  9. I reboot it and here was the begenning of the bootloop

For your questions, I flashed it like the video
I was on the last FPOS, I made an update before and my recovery show this :

I tried to boot with fastboot boot boot.img and this append, the first one is from fastbootd and the second from the bootloader

So you downloaded version FP4.SP21.B.048 from here, right?!
Those are outdated, the current FPOS version is FP4.SP25.B.058, which we don’t have factory images for yet.

For future reference, no matter what people tell you, don’t flash it (if you don’t have a good reason to), that only creates problems, and you loose the ability to restore the stock images through the Magisk app before an OTA update.

That recovery doesn’t seem right, I would expect 12/SKQ1.220201.001/SP25 if you are on the latest release, notice the 12 for Android 12 at the beginning and that bold part at the end FP4.SP25.B.058.
Check your current slot with fastboot getvar current-slot, set it to the other one with fastboot --set-active plus a or b (depending on which one you’re in) and check that recovery version. I think your phone switched slots.

Bootloader is what we want. I assume your phone didn’t boot from the outdated boot.img, right? :thinking:

I’ve uploaded you a stock FPOS-B.058-boot.img and a patched FPOS-B.058-magisk-boot.img.

  • First make sure you are in the right slot
  • Then try booting that stock boot.img
  • If that works you can flash it, so we get a blank canvas to start from
  • Reboot to see if everything still works
  • Boot from the patched image and follow the rest of the installation described above

Yes I downloaded from there

Okay I’ll remember it thanks a lot

Yes you’r right

I check, I’m on the a slot, so I change it with fastboot --set-active=b and now on recovery it’s 12/SKQ1.220201.001/SP25

I boot on the bootloader your stock and it works ! It shows"Hi there"
But I don’t want make more mistake, I input this “fastboot flash boot FPOS–B.058-boot.img” in the bootloader now ?

Since you are in the right slot, that should work, yes :slightly_smiling_face:

1 Like

Thank you a lot !
Last question, should I do an update about something or this “flash boot” is like a factory reset ?

No, this doesn’t reset any data, all we are doing is restoring the boot partition to its vanilla state, so you can complete the rooting process from there.

In case you have any issues flashing, flash it explicitly to the b slot with fastboot flash boot_b.

1 Like

I had a similar problem to Lars_Henning:
restored images (after manually adding missing stock boot img), installed ota without reboot, ‘install after ota’ in magisk, then bootloop (unlocked warning → fairphone image → unlocked warning).
After switching the active partition successfully booted into (non root) pre update rom. I then updated without magisk, and reinstalled it afterwards using hirnsushi’s patched boot img. Now everything is working fine.

I will be following this process in the future:

  • Extract boot.img from ota.zip
  • patch boot.img using magisk app
  • restore images
  • update os (with reboot)
  • check if working
  • fastboot boot patched img
  • direct install using magisk app

It’s a little cumbersome and slow, but safe.

Maybe the updater only commits to the changes when restarting and magisk makes you boot to the inactive partition, causing a bootloop?

My device:
8GB RAM version
Magisk version during problem: 25.2
Magisk modules: ACC, ACP, AML, AuroraServices, Busybox NDK, DJS, JamesDSP, Universal SafetyNet Fix (Displax mod), LSPosed
Zygisk enabled
Magisk app hidden
Country: Germany
[I don’t think they are part of the Problem, since it didn’t even get to the animation part, if it is, it’s probably SafetyNet Fix]

Welcome to the community :wave:

The OTA updates are delta updates and don’t contain a full boot.img, you will have to merge the OTA update(s) with the previous factory images to get a usable boot.img.
The available factory images are also frequently several versions behind.

If you insist on taking the manual route (or have to), I’d suggest the following workflow:

  • Check the current slot adb shell 'getprop ro.boot.slot_suffix'
  • Restore images through Magisk
  • Install OTA, don’t reboot
  • Copy the new boot.img with adb shell 'su -c dd if=/dev/block/by-name/boot_{other slot} of=/sdcard/boot.img'
  • Patch that boot.img with Magisk, adb pull to PC
  • (Optional) reboot the system and check if the OTA updated was successful
  • Follow the usual fastboot boot process

The updater writes the new partitions to the inactive slot while the system is running. There is the possibility to run scripts after the new slot has been successfully booted, but I haven’t seen that break a Magisk installation so far (I’ve been updating a FPOS + a CalyxOS FP4 for well over a year without any issues).

Selecting “Install to inactive slot” in Magisk will force the phone to boot to that slot, which can be a problem if the OTA updated failed, yes. But the OTA updater should usually throw an error message in that case.

1 Like

I have FP4.SP21.048.20230215 installed on my rooted device with magisk 25.2 (25200). i tried doing the ota for SP25.B.0058 by doing the following steps:

  1. Magisk app → Uninstall → Restore Images
  2. Apply OTAs as normally (Settings → System → System Update).
    I watied for the installation to be fully done (both step 1: “installing update”, and step 2: “optimizing your device”, of the OTA). I did not pressed the “Restart now” button. Instead i did: Magisk app → Install → Install to Inactive Slot.
    Magisk completed that without any erros, so i pressed reboot in magisk.

The following reboot process didnt went well, multiple times I was seeing the unlocked bootloader page. After some times the phone booted again into (i guess the old slot). There it it is shown that my old system is installed. System update is still showing me the reboot now button and magisk says it is Uninstalled (N/A).

Im a bit of in fear of a next reboot and that i bricked my phone. Whats the best thing to do now?

Thank U

Have a look above please.

Welcome to the community :wave:

You aren’t the first with that problem, could you please list the modules you had enabled :pray:

Still looking for a pattern here, Universal SafetyNet Fix seems like a good candidate …

… that’s the one constant among all the cases so far :thinking:

As I’ve said before, I haven’t had any update issue with FPOS or CalyxOS, but both devices are only using a limited set of modules (ACC, Systemless hosts, Fullscreen/Immersive Gestures), no Zygisk and not hidden.

My money is on one of the more invasive modules causing issues.

1 Like