Restore dd dump of XA2 to another XA2

First of all I’m well aware of the fact that a dd dump and restore is not at all supported by Jolla.

I’ve successfully managed to backup the LVM of my XA2 running Sailfish using dd.
I also managed to do a successful restore.

My question is then does the data on the LVM partition contain any device specific or could I if I got a new XA2 (excact same model) and flashed it with SailfishOS restore the dd dump and make it work?

I’m aware because a friend of mine has a faulty XA2 which need to be replaced.

I’m aware of the SafishOS license issue which need to be addressed by writing to helpdesk.

I did something similar in the past to delete any data of a device and for backup purpose (on a J1 tough).

If you selectively backup & restore only some partitions and not all of them then you’d need to adapt fstab & co. which can be tricky. For a first try I would leave out the directories /bt_firmware, /dsp, /firmware, /odm, /opt.

LVM partition (userdata) should not have anything device-specific, it is the one that is flashed and created from generic repos. But why not to just flash SFOS from zero?

@sebix You should also add
/persist and /fimage to your list above?

But if I understood Louis right he meant the partititon 0p76 only (holding root and home).
And to my knowledge he should be good to go with that, even I did not do it to different device either.
What I would propose is to flash the new device with same firmware version that you used on the other one.

Someone else already did so and can confirm?

I don’t have a separate /fimage mount/partition on my device and the directory is empty? I also don’t know what /persist is for.

holds the flashed firmware
and is only there on X devices (with Android 8.1 I believe?)
holds stuff like

ls /persist/
alarm display pc speccfgaudio drm qti_fp timebms hlos_rfs rfs vppCEI_SN.txt lost+found secnvm wlan_mac.bindata misc sensors

This on XA2.

The /fimage is also present on other devices like the Jolla Phone and Tablet.

I’ll try to do a dd restore for my friend. If it does not work I’ll just reflash the device.

I’ll keep you updated.

@Louis any updates? Does it work? I did something similar with JollaC and worked fine.

Haven’t tried.

His new device turned out to be a single sim version of the XA2 while the old one was dual sim so I didn’t want to try in fear of soft-bricking it.
However if it worked on Jolla C it might work on Xperia XA2 too.