To make the partition table, format the partitions and copy all data to the sdcard, this script can be used.