FP4 Root Access is possible, maybe a bit risky

It didn’t work for me (with mine, maybe I did something wrong) :thinking:
I patched it myself with WSA (Windows Subsystem for Android) 'cause yes, patching on Magisk was dysfunctional on the /e/OS FP4 (strange issue tho)
But when trying to boot on it, it just rebooted after showing the /e/ Logo (Android loading)
And when trying to flash, I had an error (tried a & b slots)

1 Like

Huh, interesting, now I really need to know what route you ultimately took :thinking:

Yeah, I don’t get it either why the /e/ people decided to set the jvm heapsize to a completely unusable size…

Since you already have a working (rooted) system, I wouldn’t ask you to test the boot.img I uploaded, but it seems to be working for others.
I still would be very interested in your method :smiley:

2 Likes

Do you think I might do a separate thread, or post it here ?
Maybe a separate thread for /e/OS specific could be interesting, 'cause the boot.img isn’t the same

2 Likes

Sure, this thread is getting long anyway :slightly_smiling_face:
I suspect there might be new problems with root on /e/ in the future, that definitely warrants a separate topic :smirk:

2 Likes

I have another idea
Maybe a wiki, for rooting both FPOS and /e/OS (every important information for everyone, without having to search every message of this thread x))
And for questions, they will be redirected here
I’ll ask for it to moderators

2 Likes

We already have a wiki covering rooting FPOS

2 Likes

Oh okay, so I’ll do the same for /e/OS (with a link to the FPOS one too) :man_shrugging:
Does that seems a good idea to you ?

1 Like

Sure you want me to open a wiki topic and then you can write it?

2 Likes

Don’t worry, I’ll make a thread for now, it should be enough (I’ll do it in a few days)
Thank you anyway and sorry for the disturbing :sweat_smile:

3 Likes

It seems I am on boot A099. Where can I get:
A.099-boot.img

You can still boot from any patched FPOS boot.img you have lying around and install Magisk the same way as before.

But if you really need it, here is a vanilla boot_A.099.img and a patched boot_A.099_magisk.img.

Don’t flash them (if you don’t have a good reason to), just boot from the patched one and follow the regular tutorial.

2 Likes

Thank you very much.

I assumed that booting the patched boot would cause Magisk to patch this version. I thus later have an older boot version with Magisk running.

Am I wrong?

1 Like

When you fastboot boot the patched boot.img all you are doing is temporarily booting from that image. That means, the boot.img gets sent over to your device, loaded into RAM and the phone starts from there, instead of the regular boot partition.
That way we can start the FP safely from a modified boot.img without actually modifying the underlying OS. If something doesn’t work, everything should be back to normal after a reboot.

While booted from that image we have root privileges available to us and we use those to install Magisk through the app. Magisk patches the real boot partition directly and after a reboot we have a working Magisk installation.

You can of course flash a matching patched boot.img directly, but this route is safer. It doesn’t matter if you picked the right image or accidentally flashed some wrong version to your device and end up in a bootloop. You don’t have to think about the slot you are in, did you actually pull the right boot.img from your device to patch etc.
And don’t get me started on the minefield that is “Android Verified Boot”:see_no_evil:

2 Likes

Is it possible to stay in temporary root or you have to let magisk patch te boot that installed. It would be nice to try with the option to go back to the original if needed?

Depends on what you want to use root for :thinking:

Temporary root is great for getting stuff off of a phone you otherwise don’t want to change. I use it to dump unmodified versions of system files from the FP4 of a family member. So I always have a clean reference device around to check against my modified one.

If you want to do anything related to Magisk modules, microG, changing system parameters or in general modify the system without actually installing Magisk, temporary root is not for you. That can get bootloopy pretty fast :smirk:
A reboot will bring you back to the original boot partition, but you absolutely can get your system to a state that’s not compatible with that partition anymore. And a reboot can happen anytime by accident…

This is only a safe space to play in if you don’t mess with the underlying system.

I dont know why, but I am not able to root my iodé FP4. I am in the step to boot my patched-magisk-boot-image. I wait more than 20 minutes. It does not boot.

And the strange thing is that I can not boot the normal boot-img either…

You didn’t mention you are running iodé, those are boot images for vanilla FPOS, there is a difference :point_up:

I’ll have to extract a iodé boot.img, give me a minute.


Edit: OK, here’s a patched boot.img for iodé. I patched the latest one available (20220126), but I have no way of testing it (not running iodé myself). So whatever you do, I strongly suggest you only boot from it and don’t flash it.

3 Likes

Oke thanks for the answer, I normally rooted my devices to make better use of macrodroid for example. Or use widgets to switch data and location options. To do that directly root is the easiest. I think it’s better to wait to get back to the original ROM I don’t want to make my mobile unusable and wait till there is an option to flash the original ROM back.

Thank’s a lot @hirnsushi for sharing all this. Would you describe how you got hold of the A.099 image? It doesn’t seem to be available for download from storage.googleapis.com, guess you extracted it from your phone after the OTA update - but how?

Sure :smiley:
First of all, you need root for this, so I fastboot booted a vanilla FP4 with the newest update already applied using a patched Magisk boot.img I already had (the version of the boot.img mostly doesn’t matter for this).
Then it’s only a matter of getting the image from the device:

foo@bar:~$ adb shell
FP4:/ $ getprop ro.boot.slot_suffix
_a
FP4:/ $ su
FP4:/ # dd if=/dev/block/by-name/boot_a of=/sdcard/Download/boot_a.img
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.759143 s, 126 M/s
FP4:/ # exit
FP4:/ $ exit
foo@bar:~$ adb pull /sdcard/Download/boot_a.img
/sdcard/Download/boot_a.img: 1 file pulled, 0 skipped. 34.6 MB/s (100663296 bytes in 2.771s)

Normally I would use shorter commands, this is quite verbose, but I hope it’s easier to understand this way. If you don’t understand some of the commands, just ask :slightly_smiling_face:

There’s also the possibility to extract the image directly to a PC using adb exec-out, but there are some major caveats involved.

2 Likes