TWRP for Fairphone 4

Hey,
since I flashed /e/os on my FP4, I cant boot into twrp anymore.
Any ideas, why this is the case?
I would like to use TWRP to root my device using Magisk, since the usual method doesnt work on /e/os

Because installing /e/ overwrites the recovery partitions :point_down:

And besides, please don’t flash TWRP to your device, just boot it with fastboot boot twrp.img

What problems do you have with the usual way, it apparently still works

Edit: To be slightly more precise, since you are flashing your whole phone anyway, you can just take the boot.img from the /e/ release, patch that with Magisk and flash it to your device. If you need help with that, please head over to the root topic :pray:

2 Likes

Hey!
Thanks for answering!

Using Magisk to flash the Stock ROM boot.img works fine. I did that, when /e/os was not released yet. It doesnt work with the /e/os provided boot.img. Many guides in their forum suggested to use TWRP instead to flash the Magisk.zip directly, since it doesnt require to modify the boot.img using the install step.

I did not try to flash it. I tried to boot it using fastboot boot downloaded-twrp-name-that-is-really-long.img, however it stayed in the boot screen where it showed “Fairphone”.

1 Like

Have you tried flashing a modified boot.img with fastboot? :thinking: Flashing Magisk through TWRP will modify the boot.img anyway. Could you maybe link one of their guides, I don’t really get the point.

Ah, sorry, misunderstood you there :see_no_evil:
Someone with /e/ actually running will have to test if booting TWRP still works…

Magisk will just crash if I attempt to modify the boot image using the app. So using TWRP seems to be my only choice.

Interesting, let my try that :smiley:
This is definitly root discussion territory now :point_right: FP4 Root Access is possible, maybe a bit risky

It instantly worked for me. Can you try it with another phone or do you want me to send you the patched img somehow?

@hirnsushi send me a boot img. And it worked (at least magisk shows that its installed), when I flashed it.
However, a direct install still doesnt work. Its really odd.

After the initial install of /e/os, what did you do? I only locked the critical bootloader again. Do you think that may be a reason?

I downloaded the e/os zip, patched the boot.img and then just followed the regular installation instructions with the patched boot.img. I also didn’t locked the bootloader after that

Edit: Meaning I just did this

  • Boot your FP4 in bootloader mode, and plug it to your computer
  • On your computer, download the zip file from the link provided above. Unzip the folder and browse into it
  • Flash /e/ with the following commands:

with the patched boot.img instead of the regular one

Interesting. Did you unlock your bootloader (again) before the install?
As my phone was already unlocked, I skipped it and only unlocked the critical part.

I didn’t unlock anything specifically for e/os, I’d already unlocked everything I needed to flash a rooted stock image about a week ago. I didn’t change anything since then

OK, so do I understand correctly that I can back up and restore my FP4 with this, but not my data folder? What folders would I have to additionally copy via USB to have a full backup of my phone?

Or asked differently: Does this guide work with this TWRP version on FP4?

Funktioniert das nicht mehr?

adb backup -all
adb restore backup.ab

oder

adb backup -apk -shared -all -f <filepath>/backup.ab
adb restore <filepath>/backup.ab

Also ganz ohne TWRP und root…

All user data is on the so-called userdata partition which is always encrypted on FP4, and TWRP currently cannot decrypt it and see the data to back it up. So you can only “back up” system partitions that contain the Android system but that’s probably not what you’re looking for.

2 Likes

That guide won’t work for a full backup, all the interesting parts of the system (apart from the A/B partitions) are inside the super partition. Without access to encrypted data in TWRP you can’t back up that partition. Edit 2: super isn’t encrypted :man_facepalming:
I backed up all the partitions I could on a running phone using dd, but that won’t produce a complete set of partitions you can use to flash your phone back to normal, since you can’t completely back up those special partitions from userspace.

Edit: Too slow :smiley:

1 Like

Can we back up the super partition in TWRP? :thinking:
/data doesn’t work, sure, but the super partition would be more interesting. The amount of partitions I can choose from in TWRP doesn’t really match the partitons actually on device…

Not so. It’s good to see two consecutive posts saying the same.

It has been said many times, elsewhere, and clearly can do with repeating / emphasising :slight_smile:

1 Like

With no local data, like I have, a backup does no really makes sense.
The only backup I use is app setting backups.

If I have to recover my phone, I have to install the apps, recover the settings, that’s it.

It’s my kind of using dates. My security. I know… :wink:
I hope I get no shitstorm yet… :wink:

super is not encrypted so sure. Not 100% sure how well the backup from TWRP itself is but you can definitely just use dd from the command line to just make a 1:1 image of the partition that you should be able to flash back via fastboot.
The dd image will also be the full size of the partition, and not just the system data it contains, maybe it’s possible to use the img2simg tool to shrink it down and convert it into a sparse image.

So do I understand it correctly that the guide I linked to doesn’t work for FP4? If that is the case, it should be mentioned in the guide.

Do I also understand correctly that a full backup and restore is not possible at all?