TWRP for Fairphone 4

Hello friends!

I’m currently doing some tests with linux-based alternatives OS on my FP4, Ubuntu Touch and Sailfish OS.
I wanted to try TWRP backup and restore, and share here my experience :slight_smile:
NOTE: those two OS are not encrypted so it’s ok for me.

On my FP2 I have a long and successful story of using TWRP to switch between alternative OSes.
It consists of backup and restore of 3 partitions : Boot/System/Data

Here on FP4 partitions are slightly different (A/B device), I found here that one can do:

  • Data Backup: select only the Data partition.
  • System Backup: select partitions
    • Boot
    • DTBO
    • Super which contains the logical system, system_ext, odm, product, and vendor partitions

I tried with Ubuntu Touch, however I have those red error message:

failed to mount '/system_ext' (Block device required)
failed to mount '/product' (Block device required)

and I’m only able to backup Data

NOTE that this could be already useful, in this case the restore process is:

  • Erase the previous OS
  • Fresh install of UT
  • TWRP restore of /Data partition, and reboot :slight_smile:

I then tried with SailfishOS and, even if there is no red messages, backing up of Super partition failed at 67% (4215Mo of 6264Mo).
Looking at the recovery.log, there is this error message:

Backing up Super (system system_ext product vendor)...
I:Reading '/dev/block/by-name/super', writing '/external_sd/TWRP/BACKUPS/xxx super.emmc.win'
I:Error writing destination fd (Operation not permitted)
Backup Failed. Cleaning Backup Folder.

Searching for a solution, I found here that this could be due to a FAT32 SD Card (and indeed my SD card is formatted in FAT32 filesystem)
I tried again on Internal Storage… and it worked :smiley:

[BACKUP COMPLETED IN 80 SECONDS]

I have now a full backup of SailfishOS 4.5.0.24.
In the backup folder (total size 7.73 Go), the file super.emmc.win is 6.00 Go big!

Could you try again? it could be the same issue :wink:

2 Likes

You are right, that might very well be the case, but I don’t think I have time to test that any time soon.

super isn’t really all that interesting to me since we have factory images now and I can just get it from there, data still can’t be decrypted so at least for Android backups TWRP isn’t all that useful at the moment.

But there will come a time when I switch my FP4 to proper Linux, so I’m closely following your discoveries :nerd_face:

1 Like

Hey you! That sounds awesome. Is there any update if accessing userdata with TWRP will be possible in the nearer future?

1 Like