Change SD-Card
After LX13 runs nice and smooth I decided to move the installed System from a slow 8 GB test SD Card to the real 32 GB final SD Card. I had to reinstall all or find something else. I decided to find something else.
All the System is on the sd Card. So I simply had to clone the sd Card with the f2fs. My Windows PC can't do that so an Ubuntu Virtual Machine running in VMware Player was the choice. I had to connect the USB Card Reader to the VM. VMware can do this. Now to the Details.
start the ubuntu and become root by su command. give a Password to root by "su passwd root" if you are in Trouble with that.
Install f2fs-tools.
apt-get install f2fs-tools
Insert the original SD Card in a Card Reader and connect it to the ubuntu machine.
lsblk -o NAME,FSTYPE,SIZE,LABEL
gives you a guess which device could be the sdcard. in my case it is sdd1.
at first the original sd Card Needs to be mounted to copy all the files later.
Lets assume the Mount Point is /mnt.
mount -t f2fs /dev/sdd1 /mnt
now copy all files from the original sd Card to a temporary place preserving all permissions. tar can do the Job.
i wanted to copy to a file in temp Folder.
tar cvpfz /tmp/andro6.tar.gz /mnt/
or without an absolute path in the tar file
cd /mnt
tar cvpfz /tmp/andro6-relpath.tar.gz ./
I ended up with a tar Archive containing all permissions and the absolute path of all files on the Card including /mnt.
Perhaps a tar Guru can comment to do a better way not to have the leading /mnt in the path.
now unmount the original sdcard and remove it.
umount /dev/sdd1
insert the new Card and Format it with f2fs
mkfs.f2fs /dev/sdd1
Mount the new Card
mount -t f2fs /dev/sdd1 /mnt
Change the current dir in your terminal to /.
at first i changed to /mnt and untared. but i ended up with a mnt on my sdcard containing all files.
so i changed to / since my sd Card is in /mnt. this is again a place where a tar Guru could give some better ideas.
i dont't want to break your ubuntu by untaring an Android file System to the wrong place. it worked for me but
your System might break.
cd /
tar xvpzf /tmp/andro6.tar.gz
or if you have the tar file without absolute paths
cd /mnt
tar xvpzf /tmp/andro6-relpath.tar.gz
after all is untared your new sd Card should contain all the necessary files.
unmount the sdcard and install it in your phone.
umount /dev/sdd1
mine booted, created the Cache for one app and worked fine.
P.S. it seems to be a good way to do a backup of the System.