We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

[xa2] Full-backup in terminal

asked 2019-04-03 14:42:46 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2019-04-04 07:53:31 +0200

zagrimsan gravatar image

Searching for a way, to make a full-backup of my xa2. Most howto's are not for the XA2 which I was reading.

So, flash the phone, make a complete backup and later some full-backups, no need for incremental.

What i have done, is to save /dev/mmcblk0p71 and 76 with dd. 0p71 has 850MB, 0p76 has 20GB.

anything else?

In android i used twrp to make fullbackups, is the something similar in sailfish for recovery?

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted
4

answered 2019-04-03 15:14:56 +0200

Levone1 gravatar image

updated 2019-04-03 15:28:37 +0200

@ralooyar made a very thorough guide here - https://together.jolla.com/question/176959/complete-flashable-image-of-the-os-as-backup/ - if you're up to the challenge. Personally, I just do what you're doing. Just make sure that the 2 partitions you dumped are system and userdata. You can confirm by running ls -al /dev/block/platform/soc.0/ 7824900.sdhci/by-name in terminal, (exact directories might be different for you, just check in file manager). Once you have those 2 partitions backed up, you only need boot and oem, which you can use from your original Sailfish zip.

When you have the 4 partitions backed up, no need for recovery, just use fastboot to flash each one, when you want to restore. Mind that all of your data will be wiped, and all of the data you had before will return - even downloads, pictures, etc. Dumping userdata makes an exact copy of all the info on your device. Also it will take at least 20 mins. to flash the 20g partition.

Note: I don't have XA2, but I'm pretty sure it works the same. Check the flash script in your original zip for sure...

edit flag offensive delete publish link more

Comments

1

Sublte difference for XA2:

XA2 stores the alien-dalvik's system image (a squashfs called system.img), in /opt, which is yet another partition ( <- that's the p71 he's backing up)

But that one should be fetchable from the Store App, so no real need to backup.

p79 is the 'system' partition on XA2 (the one that contains the 'recovery' image. Again, not critical, it's also included in the ZIP from Jolla)

Also small correction: 'oem' is the one that you need to download separately from Sony, so it's definitely NOT in Jolla's ZIP.

DrYak ( 2019-04-03 19:39:37 +0200 )edit

@DrYak - thanks for clarifying. I actually thought of that after I typed, but felt too lazy at the moment to change it, figuring it would be figured out...

Levone1 ( 2019-04-03 20:16:55 +0200 )edit

I copied the partitions and got files of similar size (850M and 20G) but the files seem to be completely empty (just zeroes). Is there something i overlooked? The /dev/block tree doesn't exist either when booting with hybrid-recovery.img

lambda ( 2019-04-15 01:51:18 +0200 )edit

What was your dd command? If you did, for example, dd if=/dev/block/mmcblk0p52 of=/media/sdcard/system.img, then you would end up with an img file on your sd card. What are you looking at that's showing 'all zeroes'?

Levone1 ( 2019-04-15 05:36:00 +0200 )edit

I started an ssh server and called ssh root@10.42.66.66 "dd if=/dev/mmcblk0p71" > xa2p71.img on my machine. Also tried with p76, same result p23 and p25 are just some ELF executables. When I restarted the phone, the stock android wiped my user partition that was luckily pretty empty. I ended up flashing SFOS without backup - now everything is working :)

lambda ( 2019-04-15 13:04:51 +0200 )edit
0

answered 2019-04-03 22:47:32 +0200

tom gravatar image

thanks for these tips. Only not a misunderstanding: p76 is the only important one to save, the rest should be in my install-files, right? For dummy-users means: flash the "normal install"-way (https://jolla.com/sailfishx-linux-instructions-xa2/) and put the p76 back. Or do i miss something here?

edit flag offensive delete publish link more

Comments

depends - personally, I tend to modify my system pretty drastically, so I would want to have that dumped too. If your main concern is userdata, and aystem is unmodified, then you can just flash the stock system img when restoring. I'm just not sure what kind of issues you might have if you did modify system files, and then you try to restore your userdata with an unmodified system ...

Levone1 ( 2019-04-04 00:28:53 +0200 )edit

What separate system are you refering to ?

DrYak ( 2019-04-04 13:26:37 +0200 )edit

I don't know what p76 is, (on my xc it's p51 and p52), but I had assumed that tom was referring to userdata partition, and thinking that if he has userdata backed up, then he could just use the default system img for system. I was just saying that for me, my system files are modded, so I need to have that backup also, for it to be restored back to the same state.

Levone1 ( 2019-04-04 15:55:45 +0200 )edit
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2019-04-03 14:42:46 +0200

Seen: 761 times

Last updated: Apr 03 '19