Sample Header Ad - 728x90

updater-script for flashing raw partition image

1 vote
1 answer
4114 views
I created the image with the following commands
dd if=/dev/block/mmcblk0p1 of=/mnt/sdcard/modem.img
dd if=/dev/block/mmcblk0p5 of=/mnt/sdcard/aboot.img
Now, I want to create a flashable zip to flash these images to another copy of the device. 1) Do I need to format the partition before I write the raw image in the first place? 2) Is this script okay if I assume no formatting is needed?
ui_print("Updating modem.img ...");
   write_raw_image("aboot.img", "/dev/block/mmcblk0p5");
   write_raw_image("modem.img", "/dev/block/mmcblk0p1");
   ui_print("Finished!");
   ui_print();
If it needs formating, I use the Partition Table app to identify the partitions. It shows for /dev/block/mmcblk0p1 mount point and filesystem type ("vfat") but for /dev/block/mmcblk0p5 this info is absent. 3) How do I know the filesystem type "EMMC" or "MTD" or what?
Asked by Yaroslav Mytkalyk (131 rep)
Nov 30, 2013, 07:01 PM
Last activity: Mar 14, 2022, 04:54 AM