Restoring a TWRP backup to a different device

Hi,

I have a Samsung S9 that has been running eOS susccesfully for a while. It now has a hardware problem with a broken speaker, so I have bought another S9 and have managed to install eOS on this new device.

I would now like to transfer the image from the old phone to the new (most importantly apps and logins). My plan was to do this using TWRP. So I have backed up my old phone to an SD card and my idea is to restore that backup on the new Samsung S9. However, when i insert the SD card and boots TWRP in the new phone, the backup does not show when in Restore on TWRP. I know the backup is there, as it is visible when using TWRP on the old phone.
I am stuck. What am I doing wrong?

Thanks in advance

Kristian

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

Hi,

The TWRP backup path includes the device serial#, maybe it’s the issue…
Take a backup of your new device, it should create a TWRP/BACKUPS/xxxxxx new path. Then move your old backup to this dir.

Other issue I can see (to be confirmed): the old backup tree may need a owner/permissions adjustment.

1 Like

Hi,
I am able to see the backup path allright, the actual backup files are just not listed. When i do the backup and attempting to backup “data” it returns an error “unable to mount ‘/data’ (Invalid Argument)” - maybe that is an indication of the problem?
Thanks

You may need help from a Samsung specialist… I’m not, sorry :frowning:

1 Like

Please can I ask you to confirm on which device this is happening .

One half way measure might be to backup and restore the old device; then backup and restore the new device to check if both TWRP systems are fully functional.

I believe that by default the restore is not intended to transfer. I have never tried to transfer a TWRP backup to a new device. In addition to the serial mentioned by @smu44 there exists Internal Storage/TWRP/.twrps.

The file is not fully readable in a text editor, but I expect it will contain a cross reference to its related backups.

Once you had successful backup and restore on the new device, you might experiment with bringing your “old device” .twrps and overwrite the .twrps on the new. The business of accurately spoofing the old device is likely critical.

When i do the backup on the old device, it returns an error “unable to mount ‘/data’ (Invalid Argument)” when trying to backup “data”.
When I afterwards boot TWRP on the new device (after inserting the SD with the backup from the old device), TWRP on the new device can see the path to the backups but cannot see the backup files.
I’ll try and do what you suggest and backup the new device as well.
Thanks

This would make me a little unsure if the backup was sound.

TWRP is known to produce errors in Android 10 with encryption. It would be a leap of faith to think that the backup worked ok but TWRP produced a false error. If TWRP was actually unable to mount the data partition then it could not read it and one would expect zero backup.

I do not see that error when I do a backup on Samsung A3 in Android 10 with encryption disabled.

Is the old device encrypted and Android 10?

If course if you were to follow my path and restore an unsound backup to the working old device there might be the risk of corrupting the old device data partition.

The error is mentioned in this thread https://forum.xda-developers.com/t/failed-to-mount-data-invalid-argument.3855949/ in case that gives you any insight.

1 Like

I finally found out that the cause of the problem is that my old (and the new) Samsung S9 running Android 10 and eOS is encrypted. TWRP does not work with encrypted devices. Apparently there is no solution to this.

1 Like

Well if the system is still fully functional you may have the option to turn encryption off. I never had occasion to do this, perhaps check with care!

I find the switch is to turn encryption on found in

Settings > Security > Encryption and credentials

I would guess a toggle exists; but it may contain some warning or caveat, idk.

1 Like

One solution I use on Xiaomi devices to “decrypt” Data is:

  • remove lock (pattern, password, pin, …)
  • let device settle for 30mn
  • reboot, settle again

This will also remove any fingerprint, fingerprint-enabled apps will require re-enrollment.
Also, I never took time to verify if the reboot & settle is mandatory, but it can’t hurt :wink:


Not sure about the .twrps file : I could restore a TWRP backup without this file.
But this was on same device, after installing another ROM and going back to /e/ …

2 Likes

On a Samsing S9 there is no encryption/decryption toggle, so I have given up and done a manual migration . Tedious it is :slight_smile:

1 Like