updater-script for flashing raw partition image 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 device.

1) Do I need to format partition before I write raw image at first place?

2) Is this script okay if I assume no formatting 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 Parittion 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 to I know the filesystem type "EMMC" or "MTD" or what?

Thanks.
Seems like write_raw_image works only from filesystem and does what dd does.
Proper way would be to just extract the images

package_extract_file("aboot.img", "/dev/block/mmcblk0p5");
package_extract_file("modem.img", "/dev/block/mmcblk0p1");