FP4 Root Access is possible, maybe a bit risky

Hi. I can’t update to Android 12. After “Uninstall Magisk → restore images” the update procedure starts but doesn’t succeed: message “update not possible”, as if Magisk was not uninstalled.

Could you record a logcat please :pray:

  • run adb logcat -c && adb logcat > logcat.txt
  • start the update and wait for it to fail
  • stop the logcat (Ctrl+C)

I suspect there might have been changes to one of your system partitions other than boot. Depending on what you used root for, that is always a risk.

Did previous OTA updates work fine for you? :thinking:

Thank you, @hirnsushi , I think you are right:

02-03 15:38:18.628 1588 1588 I update_engine: [INFO:delta_performer.cc(397)] Applying 80 operations to partition “recovery”
02-03 15:38:18.645 1588 1588 E update_engine: [ERROR:delta_performer.cc(431)] Unable to open ECC source partition recovery on slot B, file /dev/block/bootdevice/by-name/recovery_b: Success (0)
02-03 15:38:18.647 1588 1588 E update_engine: [ERROR:delta_performer.cc(1155)] 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.

I have installed LOS recovery. So either I switch to LOS, or I find a stock recovery.img and reinstall it

Did you reboot the phone after the uninstallation with restoring the old boot image? I guess otherwise the update will not work.

Yeah, you can’t keep that, the updater really hates it if you mess with it’s expected partitions :smile:

You can just use the recovery from the most recent factory images.

In the future, try only fastboot booting recoveries, if you can help it, less hassle :slightly_smiling_face:
(but I know that e.g. TWRP sometimes only works when flashed, I’ve forgotten it myself as well)

1 Like

Thank you for the factory images, @hirnsushi : everything worked according to your method.
@Lars_Hennig first I reinstalled Magisk, then I reboot FP4, like @hirnsushi wrote.

2 Likes

Hey there, I’m trying to reinstall magisk after doing the latest OTA to Android 12.
Since I wanted to factory reset anyways I did that before patching, using the latest flash_fp4_factory.bat. Now when I try to use magisk to patch the boot image I found in the folder for the factory reset and run that boot that image through bootloader, I get stuck at the FairPhone4 Boot screen (not the blue circles, the one before that)

Welcome to the community :wave:

If you’ve updated to Android 12 already, you might need an actual A12 boot.img, it’s very likely that too much has changed between releases that the A11 one from the factory images won’t boot.

I’ve uploaded you a patched FPOS-A12-magisk-boot.img, try that :crossed_fingers:

2 Likes

If I would decide to update to Android 12…
The way to do it would be

  • uninstall Magisk (therefore remove root access)
  • update to Android 12
  • re-root with your patched FPOS-A12-magisk-boot.img

Right?
I am cautious when I think about my last update attempts. :face_with_raised_eyebrow:

If you don’t intend to perform a factory reset you don’t need that boot.img, you can just follow the usual process:

I’ve had no issues upgrading my family members phone to A12 that way, but as always, YMMV … :upside_down_face:

Yes, it seems to. :wink:

1 Like

Hmm, weirdly enough I’ve been able to update LOS official without restoring the original boot.img.

I basically let the update process go through, then flash patched boot to the alternative slot through magisk and reboot.

I wonder if this somehow means my updates are not “full” ie I’d be sticking with the same boot.img while the rest of the system is updated? If that’s even possible…

If the update you are installing is a full update, unlike the usual (at least for FPOS, CalyxOS) delta updates, the hashes of your current partition aren’t necessarily checked, because the update already contains the new partitions and doesn’t rely on the existing ones to be cleanly patchable.

I haven’t played around with Lineage on the FP4 yet, so not sure if that’s the case there. Do you have a OTA link handy? :thinking:
On CalyxOS there sometimes are full OTAs (always available) and those install fine without restoring /boot as well.

Again my FP4 ran into a boot loop after disabling Magisk, updating OTA und trying to install Magisk in the inactive slot. It seems to me as if the a slot is somehow corrupted and cannot boot.
I sticked to the description here OTA Upgrade Guides | Magisk

Does anyone of you know how to fix a corrupted slot?

Strange that that keeps happening to some people. I just updated the FP4 of my family member to the latest release, no issues (as always) and Magisk works as expected.

Could you walk me through the steps you followed to update your system, did you get any error messages at some point? What version of Magisk are you using?

The most likely reason is that there’s something going wrong during the Magisk patching process, the OTA update should generally not produce unbootable slots (unless there’s an hardware issue somewhere) :thinking:

Hi, I followed exactly the procedure in the link above and I got no error message. I use Magisk 25.2 (hidden).

After having the boot loop I started in fastboot and switched the the other slot (in my case b) and restarted successfully without root and without the OTA installed. So I ran the update again and rebooted after that unlike in the original instructions. The I boot via fastboot into some recovery (LOS or TWRP), run dd to get the boot.img and re-root from scratch (first patch the extracted image, boot it via fastboot and the install Magisk directly.

Is there a way to check the two slots for inconsistencies? A hardware issue should produce other problems, too IMHO. And after the second OTA run a is active (before it was b) and it booted successfully so I doubt that there is a hardware problem

I agree, a hardware problem is very unlikely.

Not really, you can check if the partitions match the expected hash, but in the case of /boot that’s not really helpful since you modified it by patching it with Magisk.

Hmm, maybe the issues has something to do with Magisk hide. Never used it and it’s not active on my family members phone either.
Which modules are you using? Anything that could modify the system partition? Maybe we aren’t looking at a Magisk issue here, maybe one of the modules doesn’t properly survive the update :thinking:

OK, maybe next time I try to unhide Magisk before the OTA.

The modules on my phone are:

  • 3C Magisk Helper (but that was not present on the first OTA to A12)
  • ACC
  • Audio misc. settings
  • Busybox for Android NDK
  • DJS
  • ExtSDCard Access Enabler
  • F-Droid privileged Extension
  • MagiskHide Props Config
  • Systemless Hosts
  • Universal SafetyNet Fix
  • Wifi Bonding (Qcom)

Hmm, that’s a lot of variables :thinking:

Let’s postpone this until the next update, maybe we can capture some helpful logs then :crossed_fingers:

Anything else would have been far too easy :stuck_out_tongue_winking_eye:

1 Like