Full dd backup of rootfs and /home as flashable images

[OT]
By the way, one can also clone the root partition + unencrypted home into the PC in a readable way (I don’t know how to open images)
Again, keep in mind A WRONG MANIPULATION/COMMND CAN RUIN YOUR PHONE or at least YOUR OS !!!

  • Turn off the phone
  • Hold upper Vol key while plugging to the computer
  • cd to the directory where you unpacked SFOS when you flashed it
  • fastboot boot ./hybris-recovery.img # boot your phone in recovery mode
  • Wait some seconds
  • telnet 10.42.66.66 # Connect to your phone
  • Choice #3
  • Agree you void the warranty
  • Enter your device lock
  • cryptsetup luksOpen /dev/sailfish/home myhome # myhome or any name you want
  • Input your lock code again
  • chroot /rootfs
  • mount /dev/mapper/myhome /home
  • 2 x CTRL-D # exit chroot, exit shell
  • Choice 5
  • accept, device lock
  • Open another terminal
  • mkdir /mnt/sfos # Create a dir tou mount your phone part in.
  • sshfs -o idmap=user,allow_other root@10.42.66.66:/ /mnt/sfos # mount the partition
  • rsync -vaHE --force --delete --recursive /mnt/sfos/rootfs/ /home/some_user/the_place_where_you_want_to_backup/ # Clone it (rsync options could be optimized)
  • fusermount -u /mnt/sfos # unmount yout partition, disconnect
  • Return to the previous terminal
  • Hit ENTER to quit sshd
  • chroot /rootfs
  • umount /home
  • CTRL-D
  • cryptsetup luksClose myhome
  • CTRL-D
  • Choose 6 to exit
  • Hold Vol Up + Power to reboot your phone
    [/OT]
2 Likes