Back in the days before forced encryption, I was able to back up my entire filesystem (or rather, the /data partition, including all non-system apps and app-private storage) using TWRP and restore it. I even migrated my data from one phone to another using this method.

Nowadays, modern devices have their data partition encrypted by default. The one in question is a Fairphone 4, which has no official TWRP support yet (and the unofficial one to date does not support access to an encrypted /data partition) – so no way to simply back up the data partition from TWRP, and I am looking for a replacement.

Environment constraints and requirements:

  • Must back up and restore the entire /data filesystem transparently, without changing or even looking at the data – including user apps, app data (system and user); internal shared storage is optional
  • Device runs LineageOS and is rooted with Magisk
  • Must work without Google services
  • Backup must be stored on the device itself (internal storage, SD card or external USB storage), a Linux PC via USB or a server under my control
  • Any extra software needed for this (recovery, backup tools, server software) must be FOSS

Any options?

  • "TWRP does not support that" - huh? maybe not on your 10 yrs old Nexus S because they simply forgot, but TWRP works fine even on FBE + metadata encryption. btw ever heard about Migrate? ;)
    – alecxs
    Commented Feb 5, 2023 at 19:20
  • @alecxs the old Nexus S (btw, how did you know I had one?) and the OnePlus One did not encrypt their data partitions, so that was never an issue until I got the FairPhone 4. I didn’t get to try out TWRP on the FP4 as they don’t seem to support it. Great to hear that TWRP can decrypt /data, but that won’t help me until my device is supported.
    – user149408
    Commented Feb 5, 2023 at 20:02
  • As for Migrate, it seems it works in a manner similar to Seedvault, NeoBackup and others: it backs up apps with settings, data and APK (the latter only for user apps), not on the filesystem level as TWRP does.
    – user149408
    Commented Feb 5, 2023 at 20:05
  • ...and here’s where I got the TWRP info from: forum.fairphone.com/t/twrp-for-fairphone-4/79634 Issue is that TWRP doesn’t officially support the FP4 yet, and the unofficial builds so far can’t decrypt the FP4’s /data – things look different on fully supported devices.
    – user149408
    Commented Feb 5, 2023 at 20:17
  • guess they are working on it. fstab looks like FBEv2 metadata encryption
    – alecxs
    Commented Feb 5, 2023 at 20:42

1 Answer 1


Not a complete answer yet (better ones are encouraged), but here are some pointers.

  • LineageOS 19 and up includes Seedvault, which claims to restore apps and settings, and some report it even works for transferring data to another phone. It is also available as a standalone app. It can back up to internal storage, USB storage or cloud storage (which can be self-hosted). I am not sure, though, how selective it is about the data it backs up, so the first requirement may not be fulfilled.

  • On a rooted device, you can install an SSH server such as SimpleSSHD. In order to get full access, the SSH server must support root mode – SimpleSSHD allows this by setting the su binary as the login shell. You can then access the entire device via SFTP, mount it on a PC and run the tools of your choice on it. Caveat – I found SFTP to be about an order of magnitude slower than MTP (~500 kB/s vs. ~5M/s), thus a full backup takes long. You’ll want to limit your backup to what has actually changed. One way to do that is to mirror files with Unison – that way only the first backup (and full restores) will take long. As the data will not be compressed, you will need the equivalent of your phone’s storage in available space somewhere.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .