assert(getprop("ro.product.device") == "cedric" || getprop("ro.build.product") == "cedric" || abort("E3004: This package is for device: cedric; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: motorola/cedric_retail/cedric:8.1.0/OPP28.85-19-4-2/3447de:user/release-keys");
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
run_program("/tmp/install/bin/backuptool.sh", "backup", "/dev/block/platform/soc/7824900.sdhci/by-name/system", "ext4");
ui_print("Patching system image unconditionally...");
show_progress(0.800000, 0);
block_image_update("/dev/block/platform/soc/7824900.sdhci/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
ui_print("Patching vendor image unconditionally...");
show_progress(0.100000, 0);
block_image_update("/dev/block/platform/soc/7824900.sdhci/by-name/oem", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
  abort("E2001: Failed to update vendor image.");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore", "/dev/block/platform/soc/7824900.sdhci/by-name/system", "ext4");
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.100000, 10);
set_progress(1.000000);
