(!less_than_int(1625732060, getprop("ro.build.date.utc"))) || abort("Can't install this package (2021年 07月 08日 星期四 16:14:20 CST) over newer build (" + getprop("ro.build.date") + ").");
getprop("ro.product.device") == "CX6600" || abort("This package is for \"CX6600\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Target: Leadcore/full_CX6600/CX6600:6.0.1/MRA58K/shilingyun07081611:userdebug/test-keys");
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/comip-mmc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
ui_print("Verifying the updated system image...");
if range_sha1("/dev/block/platform/comip-mmc.1/by-name/system", "20,0,6427,32768,32770,32817,32819,65536,65538,98304,98306,98353,98355,131072,131074,163840,163842,163889,163891,164361,180174") == "c98ea435e78e3d0cc393854864e0b79d666b8485" then
if range_sha1("/dev/block/platform/comip-mmc.1/by-name/system", "30,6427,6939,32256,32768,32770,32817,32819,33331,65024,65536,65538,66050,97792,98304,98306,98353,98355,98867,130560,131072,131074,131586,163328,163840,163842,163889,163891,164361,180174,180224") == "28e3bc1f45e0f27e3b6175ee16b2050a03ebdcc4" then
ui_print("Verified the updated system image.");
else
  abort("system partition has unexpected non-zero contents after OTA update");
endif;
else
  abort("system partition has unexpected contents after OTA update");
endif;
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/comip-mmc.1/by-name/ramdisk");
show_progress(0.200000, 10);
ui_print("Writing kernel ...");
package_extract_file("kernel", "/dev/block/platform/comip-mmc.1/by-name/kernel");
ui_print("Writing lc6600_project.dtb ...");
package_extract_file("lc6600_project.dtb", "/dev/block/platform/comip-mmc.1/by-name/lcboot");
ui_print("Writing u-boot.bin ...");
package_extract_file("u-boot.bin", "/dev/block/mmcblk0boot0");
ui_print("Writing modemdsp0.bin ...");
package_extract_file("modemdsp0.bin", "/dev/block/platform/comip-mmc.1/by-name/modemdsp");
ui_print("Writing modemarm.bin ...");
package_extract_file("modemarm.bin", "/dev/block/platform/comip-mmc.1/by-name/modemarm");
