TWRP for Fairphone 4

Yes, I was afraid that might happen, but the image only ended up being about 10-12 GB if I remember correctly. But this was on a fairly new phone, so my guess would be that although the drive was encrypted, most of the blocks on the device had not been written to yet, an so still contained 0s. Might do a retest of this in the near or far-ish future though.

1 Like

Do you have to run this with a rooted phone?
I got dd: /dev/block/by-name/metadata: Permisssion denied

Yes and no, I ran it from a Recovery with adb enabled, where I think you are root by default (?)

Anyways, it’s important to run it from recovery, when the partitions you are copying (userdata, metadata) are unmounted, or else the OS might write to the partition while you copy from it, making your copy unusable for anything. Not sure if that was a good explanation, but you should really take a look into the dd command and partition backups before doing this at all.

I can recommend the Arch wiki article on dd: dd - ArchWiki

I did it with TWRP 3.6.2, thanks for your help :slight_smile:

My image is 32GB, seems that I played a little more with my FP4 than you :wink:

1 Like

Ok I’ll test the dynDFE method.
I’ll report here my progress, so this post is to be updated :slight_smile:

1) find the zip file

Found two links for dynDFE v2, here and here. checked the md5sum, both files are the same.

# Disable Force Encryption V2
# By reikaze
# Based on Zackptg5's DFE script

On another link I found four versions for vayu, not sure if those ones are device-specific…

prin "    Disable Force Encryption V3"
prin "          For Android 13"
prin "         By Kamisato Rei"
prin "         Mod by alanndz"
prin "   Based on Zackptg5's DFE script"

2) backup my device

As you read above I did a full disk image with dd.

I want also to test two apps that I read about on this forum :slight_smile:
Namely Neo Backup and Swift Backup. I’d like to compare them to my old Titanium Backup.

3) flash the zip file

That’s where the fun will start…
… or not, the script failed :cry: .

[Image taken with my FP2]

Do I have to wipe before? (I was guessing first flash the zip, then wipe, but I may be wrong)
Is a factory reset enough, or do we have to select manually (several?) partitions to wipe?


Seems that in our case vendor partition is not writable, anything we can do to change that? :thinking:

So you have to format data before flashing the zip, correct?

Unfortunately it does not work anymore with


which is the latest I could find: it just hangs displaying the Fairphone logo.

Is there anything I can do to provide more information? I can compile something if that is required.

yes, you MUST format data before booting LeOS

you have flasched LeOS this way ??

Is decryption of that partition possible?

Yes it is, but it is not implemented yet, and that is not an easy process. So no right now it is not.

I just saw that for FP4 official LineageOS build is available.

Is there anyone here who can report if an official TWRP build is being worked on in the TWRP community?
Unfortunately there’s nothing on TeamWin’s Github for Fairphone 4 yet.

1 Like

For people who are using TWRP with the FP4, what is the download url for it?

Right there in the first post :point_down:

1 Like

Thanks! Has anybody confirmed whether it works with Lineage 20/Android 13?

Depends how you define “it works”…
It’ll boot, yes.
However it’ll not backup your data, because it cannot decrypt.

1 Like

As far as I’m concerned for some reason TWRP is mandatory for me to flash GApps over a fresh LOS install as LOS recovery will trhow an error when attempting.
It works pretty well for that specific usage :slight_smile:


So it would seem that if you remove any pin/password from your phone before going into TWRP, that you should be able to do a backup, then, right?

No, you would have to remove the encryption of the /data partition.
Even if you don’t set a password you’ll always end up with a encrypted /data partition, that’s been Androids default behavior for quite some time.

From the docs:

All devices launching with Android 10 and higher are required to use file-based encryption.