TWRP for Fairphone 5

I yet need to receive my FP5 and there is already an unofficial TWRP… This is awesome.

@rob87 Well… fastboot boot [img_file] is for testing and is indeed loaded into memory.
Flashing can be done using: fastboot flash recovery [img_file], which I do not recommend yet, since I didn’t test it myself :lollipop: … (WARNING: This might and will override your recovery)

1 Like

Indeed be careful with such advice without the device in your hands or definitive sources.
There might not be a recovery partition to flash to (as the Fairphone 3 has shown, for example).

5 Likes

Hence my warning… :sweat_smile: . But still sharing it.

The More You Know The More You Realize You Don’t Know.

FP5 does not have a recovery partition. You have two boot partitions A/B and the recovery is installed onto those boot partitions. Simply flashing with fastboot flash basically works but will overwrite the whole boot partition resulting in a device which just boots into TWRP.

1 Like

I’ve honestly not really looked into how to install TWRP permanently. I assume it requires patching the ramdisk in the boot partition (like on Fairphone 3 like others mentioned). But from searching around a bit I think these instructions should apply to Fairphone 5 (haven’t tried myself though): _includes/fastbootabinstall.html - twrpme - Gitiles

So in short, there should be an “Advanced” > “Flash Current TWRP” option, or “Install Recovery Ramdisk” option that will permanently install TWRP.

3 Likes

there is no such option when booting TWRP. Just “Install TWRP App” but that’s not really effective. AFAIK the App only searches and applies updates for TWRP.

I’m lurking on the fp5 and glad to see we already got a twrp.
What is the status of root on the FP5 ? I see there’s a “Fairphone 5 rooten” thread but my german is unfortunately way too rusty to figure it out :slight_smile:

I think the summary for now is:
someone is planning to root the FP5 using Magisk. But no one up to now has confirmed that it really works.

My FP5 is rooted. Fairphone’s instructions for unlocking work. The Magisk instructions for installing Magisk also work. :person_raising_hand:

4 Likes

Nice ! So same procedure as FP4, patching the boot.img using magisk, booting on patched boot.img then installing Magisk on the system?

We will open a topic once confirmed, could we keep that seperated from the TWRP topic please?

Is there a way to install a GSI system through TWRP on the SUPER partition system of the Fairphone?
Thanks in advance.

Will support for “Encrypted userdata” be available soon? Because without this function, twrp is relatively useless.

1 Like

Hopefully soon, but I can’t promise anything yet :slight_smile:

6 Likes

I’m happy to announce that you can now find TWRP builds directly on twrp.me! Currently there’s no change in supported features or known issues but userdata decryption is nearly ready if everything goes well!

Initial post has been update to point there :slight_smile:

9 Likes

That would be awesome :smiley:
Could you tell us a little more about your strategy to make it working? Is it similar to FP4 decryption or not?

This is the patchset that seems to work but I need to test it in-depth again because it was depending on a patchset which was only semi-recently merged into TWRP.

https://gerrit.twrp.me/c/android_device_fairphone_FP5/+/6952

The general approach would be the same for FP4 but I couldn’t make it work last time I tried.

3 Likes

Thanks for all your efforts into bringing TWRP to the FP5, Luca!

I’m currently trying to get a working build of LineageOS and wanted to use TWRP to do some backups beforehand.

Unfortunately I haven’t managed to disable AVB using fastboot yet and couldn’t boot the TWRP image file. Both fastboot commands seem to be stuck at “Sending xyz.img”. I’ve already tried to use different USB cables. I do not get an error message, it just seems to be somehow stuck. “fastboot devices” correctly lists my FP5 when connected.

Do I have to sign the TWRP image before booting?

EDIT:
The solution was to put an old USB hub between the pc and the phone… That’s so stupid. Found here: https://xdaforums.com/t/yet-again-fastboot-is-stuck-on-sending-boot-img.4166479/
TWRP is booting fine using “fastboot boot” now.

2 Likes

Hi llluuuzzziii,
did you manage to install TWRP permanently ? Or did you just boot from it ? Or did you do something else ?

@All : I did not manage to install TWRP permanently on my FP5 but I managed to fastboot boot into TWRP . Is this sufficient for me to install Magisk or to do a backup of my phone from TWRP ?

Thanks Luca and everyone for their efforts. I spent a long time getting this recovery to work – after the unlocked bootloader warning, the phone remained on the Fairphone logo. The issue was that my A/B boot slot was set to ‘b’. One fastboot set_active other later, the recovery booted right up! Sadly, I bricked my phone shortly after, so I cannot test any further for now…