Backups, bootloader, root

A big point any alternative Android I have seen lacks, is a comprehensive backup solution comparable to the iPhone-way of backing up on one device -> restoring on another device => everything gets transferred.
So what I’ve done until now was TWRP and oandbackup (and file synchronization). TWRP is comprehensive (except for data on the internal and external storage), but device specific. And oandbackup only works for some apps and doesn’t cover the rest of the apps, most settings,… So even both together are far from ideal and both of them are not available with a locked bootloader.
Now I have set up my FP3 following the tutorial (and locked the bootloader) and I have transferred some of my stuff from my S5 (LineageOS with microG), but halfway through, I realized that even none of my far from ideal backup process is available that way.
So I’m trying to make up my mind regarding two things now:

  1. Even with my TWRP + oandbackup backup process I don’t feel prepared for a device failure or theft. So I can’t imagine using the FP3 even without that. Is there any reasonable alternative to produce backups on a device with a locked bootloader? How do you do it? Or is there no way around unlocking the bootloader until something better comes up?
  2. Isn’t it one of the most important features for /e/ then to come up with a comprehensive backup solution that works with locked bootloaders? One promising suggestion I have found is this one, which looks a lot like a better version of oandbackup:

How realistic is an implementation of this? Are there alternative plans?

To me, /e/ is the most promising open smartphone OS project that I came across in the last 5 years or more so thank you very much!

5 Likes

Invite you to join the following discussion:

1 Like

I’ll take part in the discussions, thanks!

Personally I do not insist on having a locked bootloader, but that is /e/'s general advice towards users according to the tutorials. And I do understand the end goal of enabling people to use /e/ with locked BL, but for now that also means locking them in on a system without a backup (correct me, if I’m wrong).

So to me it looks like my two points from above lead to

  1. Short-term: There’s no way around an unlocked bootloader, if I want backups. Additionally I have to decide right now when setting up, because I’d loose all app data, if I’d unlock the BL later on. Maybe an unlocked bootloader with encrypted storage is the better general advice for the time being?
  2. Long-term: Either way, a powerful backup solution for /e/ is critical, either to
    • Elevate users with locked BLs from their backup-less state
    • Enable users with unlocked BLs to lock without loosing all app data and backup functionality

P.S.: OMG, seedvault does look so awesome, check the video: https://calyxinstitute.org/projects/seedvault-encrypted-backup-for-android WANT

1 Like

As the second /e/ build for the Fairphone 3 is out, I took the opportunity to check whether my theoretical backup and restore procedure with an unlocked bootloader works with /e/ in practice, too. (It did work with the stock Fairphone OS, but better safe than sorry.)

  • Made sure I kept the install file for the initial 20200428 build.
  • Made a copy of the whole Internal Storage (because).
  • Made a TWRP backup of my installation of the 20200428 build, including the data partition.
  • Updated /e/ successfully to the 20200514 build.

Had a look which slot was active (Fairphone 3 is an A/B device), just to be sure to only mess up one slot if in doubt :slight_smile: .

  • Installed the /e/ 20200428 build to the same slot where the 20200514 build was installed before, including wiping the data partition according to the install instructions.
  • Booted /e/ and set up the screen lock (= the decryption method) the same way it was before.
  • Restored the data partition with TWRP.
  • Copied the whole Internal Storage back to the phone.

This worked, the 20200428 build was back with all my stuff as if nothing happened.
The only cleanup left to do was to set my own custom ringtone again.
The ringtone gets set back to a fallback generic one by the OS because the OS is up and running earlier than when my custom ringtone comes back later with the Internal Storage copy.

  • Updated successfully to the 20200514 build again, so this restore didn’t break OTA updates.

(If somebody finds out how to simply restore everything including the OS out of a TWRP backup, please do tell. I ran into a bootloop trying this, just as I did with the stock OS.)

5 Likes

Good to hear that this works! So before trying stuff or updating the OS, with an unlocked bootloader, with the FP3 we can do it just like with any other phone and custom ROM before - apart from needing a laptop to boot TWRP.

Just to be clear: What I wanted to discuss here ultimately goes further - a comprehensive backup solution that doesn’t need you to turn off the device, is independet from OS version and device type as far as possible, can be automated, doens’t need root and/or an unlocked bootloader,…

I will have to track back from my general conviction to run an unlocked bootloader, there’s a legitimate concern about temporary access to the phone with malicious intent …

(Source)

… while I’m still pretty certain the data would be safe if the phone simply got lost or stolen, but we’ll have to see, it seems I didn’t drill down on this enough. Sorry.

2 Likes

Thanks for the update! That’s bad, but still… Running an OS without a backup solution is not an alternative.

1 Like

I am also looking for a way to fully backup my FP3, so that I can fully recover everything of the moment of backup (potentially even on a new device). Is there any update on this goal?

Is device unlocking also required for “adb backup”? When I tried “adb backup”, the “okay” button to start the process was disabled on the phone.

Thank you for the reply! Yes, I already read about it but which backup solution is more reliable?

And a more concrete question: Is TWRP + syncopoli (for the internal storage) reliable? (I saw it worked for you but “adb backup” is also working for some people :wink:.)

It is working for some people :slight_smile: .
There can be no 100% reliable method, because there is no 100% reliability in the way most software is made. This also applies to TWRP (just feed your favourite internet search engine with “createtarfork() process ended with error 255”.)

So the real question is … what’s your Plan B if TWRP fails?

You got the Internal Storage covered as long as you confirm it got successfully copied to your computer or wherever.
You can install the OS from scratch (better download and keep the OS install files matching your backups).

Apart from the /data/media folder (= Internal Storage) that leaves the rest of the data partition. This holds e.g. your contacts, your SMS/MMS messages, your call history, data saved there by Apps.

There are tools like MyPhoneExplorer to sync contacts, messages and call history to a computer.
Google is constantly tightening some screws, so it isn’t as convenient to restore messages as it was some time ago, and I don’t know whether in recent Android the call history can be restored at all to a phone, but at least this data is not lost.

Apps are covered by their availability in Stores, of course.
If you want to quicken the install or if you need a particular version of an App for some feature or compatibility issue, you could extract the respective App APKs (with e.g. SAI, since there are split APKs around which standard APK extractors don’t handle correctly).

App data in the data partition but not in Internal Storage is a problem.
You would have to rely on sync/backup/export functionality of every single App which you consider important. Well … let’s hope TWRP works :slight_smile: .

Yes, I would like reliability similar to copied files. So that I can, in the worst case, manually restore.

(just feed your favourite internet search engine with “createtarfork() process ended with error 255”.)

Thanks for the pointer. This is very scary: Such error numbers without additional descriptions were already bad practice 20 years ago and even worse: they seem to use for every problem the same error code 255 (additional users, profiles, dual apps and/or their data, encryption and compression problems).

So this backup program is really considered to be best practice to backup android phones in the year 2020?

Google is constantly tightening some screws

Isn’t /e/ in a position to change this situation again?

Apps are covered by their availability in Stores, of course.

It is not only that. Installing all apps and configuring them takes for me days, I would like to avoid wasting my time like that.

App data in the data partition but not in Internal Storage is a problem.

Why? Wouldn’t it be possible for /e/ to make all partitions “normal”. Why do they work so differently?

Background: With Linux I am able to do a full backup+restore with “cp” or “rsync” for more than 10 years. Coming back to a working installation from any situation is simply creating encrypted partitions and copy the data to it, and then installing the bootloader. I do not understand why Android, sharing the same kernel, made the situation so much worse?

I won’t be the judge of that.
But TWRP worked great for me on the Fairphone 2 and 3 up until now.

Everybody would like to avoid that, and usually it shouldn’t be necessary (even if advisable when upgrading Android to a new major version).
We are talking about a Plan B here. It’s good to have one, even if it’s a pain.

It’s always amazing what people can achieve if they try hard enough.

/e/ is Android, and Android is what it is. I don’t have much technical insight, I’m just dealing with reality :wink: .

I backup system and data partitions using TWRP, which takes care of installed apps and their settings, as well as settings and data for system apps. I am not bothered about internal storage, since most of my documents and data - at least all of the stuff I care about - lives in (and is synced with) the cloud. My external SD card mostly contains music, which I copy over as required from my home PC.

Thanks for raising the subject: you reminded me it’s time to take an up-to-date backup :slight_smile:

To their defense: it is a common problem in the Android eco-system, e.g. Nextcloud Talk simply shows a black screen on non-working video calls and gives absolute no clue about what went wrong. And I better do not start talking about DAVx⁵.

But TWRP worked great for me on the Fairphone 2 and 3 up until now.

Good to know. Have you even been able to migrate from Fairphone 2 to 3?

Are there some good tutorials how to set it up for Fairphone 3? (I already have /e/ installed but the device is not rooted.)

It’s always amazing what people can achieve if they try hard enough.

I sign that :wink:

Hello. I’m pretty new to my FP3, but already had the great “fun” to lose all my data with the present /e/ update. Having read this thread I tried to install TWRP (I found s.th. like twrp original and a twrp manager). None of them worked (probably because the FP3 does not allow the apps to geht root access?). So how do i manage to get a complete backup? Beside the system i have an SD card for pics,music etc. Funny that the Android folder from the main storage seems to get mirrored to the SD (but didn’t help me, when the system broke down w the last /e/-update)

Hello, I know there is a way to boot TWRP for FP3 without installing it, so you could go into this direction.

But does the backup/restore feature works on the FP3, no idea.