2014年5月8日 星期四

Android partition backup

Partition info can be found in "/dev/block/...". But it is not readable, most of devices have readable info in "/dev/block/platform/msm_sdcc.1/by-name".

Backup:
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/sdcard/Backup/recovery-backup.img

Restore:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/recovery
dd if=/sdcard/Backup/recovery-backup.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery