FP4 Root Access is possible, maybe a bit risky

the /e/ logo isn’t going away, just as if I didn’t press the button

I tried the boot.img you provided.
On the first try, it showed a loading indicator onscreen (the same as pluging in the turned of phone without starting it) and my pc showed the fairphone as connected device for filetransfer, even though I couldn’t access the data.
I powered it off, tried again, same thing.
Then I switched the active slot (prior one was b) to a, fastboot boot and it straight up rebooted into bootloader.
After switching back to slot b the fastboot boot it booted again up to the /e/os logo but looped there again.

OK, so the device is actually still booting and doesn’t restart itself. That’s different from your classic boot loop.
Have you tried waiting for a while? :thinking: The old A.067 boot.img for example takes several minutes to boot.

If it doesn’t go away at all try running adb wait-for-device logcat while booting to see if it produces any output.

I wouldn’t try changing the slot, b is most likely already the right one.

That’s normal behaviour in the boot process.

1 Like

yesterday I tried a normal boot for at least an hour, all the time it stayed at looping the /e/ logo

I tried the boot.img without magisk for 20 minutes now, same thing.

around 5 mins after starting the boot, no output so far.
just to do it correct: I run the command while the phone is connected to the pc and do a normal power on?
EDIT: just checked with adb devices, the phone never shows up as connected in the boot process. If I go into recovery, I can see the phone with adb devices

Yeah, that’s too long.

It was worth a try, sometimes you get useful hints that way.
My guess is booting the wrong image somehow messed with some files in /system, but without any logs this is very hard to debug :thinking:

I’m running out of ideas here, sorry :see_no_evil:
My next move would be “nuke & pave” and setting it up again from scratch.

You might be able access your data through the /e/ recovery, no idea if that’s already working. Maybe try asking for help in their forum, I have zero experience with that ROM.

1 Like

It’s okay. U already spent so much time fixing my dumb mistake.
Thank you a lot for this!

Just to finish this story, I performed a factory reset through the recovery and despite loosing the data, it now works flawlessly again.
Next time I’ll first finish my setup, perform a backup and only after these steps I’ll try fiddling around with other os’es I know nothing about :smiley:

5 Likes

I’ve uploaded a new boot.img taken from the latest FPOS update (A.0116) and patched with Magisk v24.3.

Everything still working fine with Magisk :slightly_smiling_face:

4 Likes

@hirnsushi Would you like to elaborate a bit on this?

In particular, I installed iodé and rooted the phone (with a patched boot image and Magisk) and I wonder if it’s possible (and advisable?) to relock the bootloader (I know about checking get_unlock_ability) and have Verified Boot enabled (after flashing iodé’s avb_custom_key). Or will I need to unlock the bootloader again for e.g. system updates?

You can’t lock the bootloader if you rooted your phone.
I am by no means an expert in AvB, that’s why I’ve called it a minefield, but since rooting your phone does alter your boot partition the hashes wouldn’t match anymore and hashes that changed are no longer verified :smirk:

You have two choices:

  • If you switch to stock (unrooted) and relock the bootloader you don’t have to unlock the bootloader to perform OTA updates, but you also won’t be able to use root.
  • If you want to stay rooted you’ll have to disable Magisk every time there’s an OTA update:

Ok that’s good to know. Thanks a lot! :slight_smile:

1 Like

Hi,
I’m new here and do not own a Fairphone 4 yet. But I like the concept and I think it has everything I need from a smart phone.
Since I want to OWN the phone I want to root it. The rooting process as described here needs Windows or MacOS at some point – I only have Linux available.
Is a howto available with respect to that?
How is OS update OTA possible?

Thanks a lot for your help.

I wrote the tutorial from a Linux PC, rooting works perfectly fine on Linux.

Oh and welcome to the community btw :wave::slightly_smiling_face:

1 Like

Thank you!
For now I don’t want to replace stock OS with . Did it when using an old Samsung S3 → CyanogenMod. But with the new FairPhone I would try it with stock OS first. Just Magisk is mandatory. When later changing to another OS I have Titanium Backup to save my data.

Your tutorial: I am stuck at point 1. How do I patch the downloaded stock boot.img with Magisk?
Where can I get the boot.img? [EDIT: Sorry, overlooked the link in FP4 Root Access is possible, maybe a bit risky - #43 by hirnsushi]
I know how to handle Linux but I am quite unexperienced in flashing phones.
Any problems to get the Fairphone recognized by my Linux PC?

You have to install the Magisk app to your FP4, select :inbox_tray: InstallSelect and Patch a File and choose the boot.img.
Don’t use the old boot.img that’s linked there, you can get newer ones here.

Depends on your distribution, but generally not a problem. You’ll need the Android platform tools for adb and fastboot, but those should be packaged already. If they don’t work without sudo you might need android-udev-rules as well.
Some USB-cables / -ports can sometimes be a problem with fastboot but that’s not Linux specific and can only really be solved by trial and error, other than that you should be fine :slightly_smiling_face:

3 Likes

Ok, will try when I have bought my Fairphone. Will take some time. But I am quite sure that I return here then.

2 Likes

@H_Verweij @cortomalese

I installed Xposed, however when searching for modules it couldn’t find anything. Is there no module officially available? I didn’t knew this risks to brick a device, too.

Hi. In Magisk I have activated Zygisk, then I have installed LSposed-Zygisk release and I have all kinds of modules in LSposed app, such as GravityBox (R). AFWall+ is recognized too, or Greenify

Just to be sure: This does work with the official rom from fairphone?
currently I restore the image, install the update, do one reboot, boot from an older image and patch the current image, and reboot. patching directly after install and before reboot would save quite some time.

It does, I’ve successfully used it with both CalyxOS and stock FPOS :+1:

1 Like

Tried it with my present phone (HTC U11). It’s easier than expected. Both, adb and fastboot, are available as packages from ditribution.
sudo apt install adb fastboot
was all I had to do.

Connection worked on the first try. Later this year I’ll buy my Fairphone 4. Thank you!

2 Likes

I’ve uploaded a boot.img for the latest FPOS release A.142 patched with Magisk 25.1 for people who want to skip the first two steps :slightly_smiling_face:

3 Likes