[HOWTO] Backup and Restore Data on Android Devices

I use TWRP on a device which is currently running Android 13 (Ljneage 4 microG, and IodéOS) and which previously ran Android 12. TWRP has / had no problems decrypting the data partition in either Android version - it works just fine

I believe that whether or not it works depends on device, Android version, and TWRP version. Only way to find out us to try it on your device

1 Like

I totally agree with that :+1:
For some devices, OrangeFox Recovery may work.


Android 12.1 Branch

  • Android 12 Encryption Support

This is only in the Android 12 branch of TWRP

In which TWRP branch is your device?

<Ooohps - the link doesn’t work, goes into a 404.>
The older one, I mean.^^

The programmer has changed the name of his project to Open Android Backup. It can be found here: https://www.openandroidbackup.me/


Yes that’s what I’m finding. Running Android 12 with /e on Motorola G7. I get the familiar error with TWRP of:
ERROR: 255. Backup failed

Do you know if it’s possible to run the latest TWRP on this phone or do I have to stick to the older “river” version?


Sorry - I don’t know anything about that device. Maybe have a look at the XDA Development forums for it


Just installed TWRP 3.7-11 for Motorola G7 ocean on my G7 river.
Appears to run okay. Will try backup later. Hoping that decryption on data works. Will get back


Right. Having installed the above and carried out a number of tests I’m back where I started i.e .unable to backup. I have reverted to the original TWRP designed for the Motorola G7 river. I have only the single user so the problem seems decryption of data. This statement seems to sum up my dilemma:

I want to upgrade OTA and eventually move to /e T but I must backup first which is probably sensible!

Any ideas where I go to get a backup anyone?


On my rooted device I use this module for backup
and this for restore

Thanks so much bege. This looks good

Two things Am I right I could use this in conjunction with TWRP i.e. backup with TWRP everything except data. Then backup up data with script and then restore first with TWRP and then with script?

Using this with a Motorola G7. What are the chances of a brick? I would think it would error out but not damage the partition?


I am not a specialist for Android, just an advanced user. I did not restore the system with TWRP since I use these scripts. But I expect that it works as you write. These scripts work without TWRP. Data backup and restore run in the running system. Therefore I think they cannot alter or damage the partition.
I use them on a Fairphone 3.
The only drawbacks I experienced are that some apps crash after data restore with the script. But on my device I simply clear the respective app data and restore it from my regular app data backups.

Okay thanks again