9

Is it possible to export all phone data (phone settings, installed apps, app data...) and import it to another device (different model) in one shot?

What I'm looking for is a way to "mirror" all data in a device to another device (e.g. when I buy a new phone, or when I have to repair my current phone and use a spare phone in the meantime), avoiding losing time restoring manually all phone settings, reinstalling every app from the Play Store, restoring app data with Titanium Backup, configuring all icons and widgets on my home launcher, and so on... I'd like to switch on the new device and find it the same (except for hardware differences).

I'm thinking about PCs with Linux OS. If I take apart the main hard drive from a PC and put it in a new PC, most of the time it works flawlessly (and I find exactly everything I had before).

I always root my phones and install LineageOS.

So I'm thinking: I could

  • nandroid backup the /data partition from the first phone with TWRP
  • unroot the new phone and install the same LineageOS ROM in the /system partition (obviously not the same file, but the same nightly for this new device)
  • restoring the old /data partition to this new phone

Do you think it could work? Or are there limitations I don't know about?

5
  • On the first glance, I don't see why this won't work. Can you test it?
    – Grimoire
    Sep 29, 2017 at 10:26
  • No, sadly I don't have a spare device to try right now. I'm wondering if the data partition contains only user app data, or even some device specific settings that could prevent boot on another different device.
    – sigi_tm
    Sep 30, 2017 at 13:37
  • You hit the nail right on the head. What I know is that, in case of a clean flash, the /data partition is populated by entirely new content. I'm now researching this topic further, so please be patient.
    – Grimoire
    Sep 30, 2017 at 15:54
  • 2
    I had a thorough look at the content inside /data, and I'm of the opinion that this may be doable. There appear to be at least two important aspects that may be overlooked, though: if the old phone has mods installed on the /system partition, and these mods make use of /data (such as SuperSU), the same mods should be installed on the new device. Furthermore, /data contains info about Bluetooth, NFC and Wi-Fi technologies, plus about some of the device's sensors, so care should be exerted in buying a phone with possibly the same typology of technologies, otherwise /data will be…
    – Grimoire
    Sep 30, 2017 at 16:24
  • … will be populated with some useless information. Next, the partition contains logs and such, which should be wiped manually when the migration has been performed. @Izzy, Master of Backup and Restore, what is your take on all of this?
    – Grimoire
    Sep 30, 2017 at 16:26

2 Answers 2

3

Encrypted open source backup solution for Android is called SeedVault by Calyx Institute and has been included as a built-in backup solution from LineageOS 18.1.

  1. To use it, navigate to Settings -> System -> Backup, and “Change backup provider” to Seedvault. You can then click “Seedvault Backup” to configure, schedule, and encrypt backups!
  2. Backups created with Seedvault can be uploaded on your NextCloud instance, an external USB drive or kept on your local storage.

0

On older devices that did not encrypt their storage, I have successfully done that. Both devices were running the same version of CyanogenMod 11 at the time – on different hardware, but both systems were signed with the same key.

Using TWRP recovery I made a backup of the /data partition, extracted that from one device and copied it to the other via MTP (both while still in recovery). Migration was seamless, even the authentication token generated the same code on both devices.

Instead of using TWRP, any other way to copy the /data partition from one device to the other should work just as well.

Some app data may also be in internal shared storage (/sdcard), so you will need to copy that over as well.

Since /data holds all user apps and the private data of both user and system apps, your new device will feel just like the old one – I had all my apps, app settings and system settings on the new phone.

Caveats to this method, though:

  • Newer devices encrypt their /data partition, so you can no longer access it from recovery. You might be able to do this with the OS running, but there is a risk of copying files that may be in use, or of the OS interfering in some way.
  • I have no experience with moving data to a newer OS version. On a cold system, maybe you’re lucky and Android will think it’s just been upgraded from an older version, causing it to upgrade data as needed. This is more likely to work if you can copy the data to the new device in recovery mode, not with the OS running.
  • If the devices are running different OS distributions with different signatures, this might be an issue – I have no experience with that. Note that unofficial builds of LineageOS will have a different signature than official ones, and signatures will differ between unofficial builds by different authors (or even across builds by the same author if the author is not being careful). LineageOS has instructions on moving to a build with a different key, but I have not tried these.

All in all, if your new device is still in “virgin” state (i.e. no data on it yet), you can try various ways of copying data from the old device. As long as the old device remains usable, you can always wipe the new device and start over.

You must log in to answer this question.

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