assert(getprop("ro.product.device") == "A6020" || getprop("ro.build.product") == "A6020" || 
       getprop("ro.product.device") == "A6020a40" || getprop("ro.build.product") == "A6020a40" || 
       getprop("ro.product.device") == "A6020a41" || getprop("ro.build.product") == "A6020a41" || 
       getprop("ro.product.device") == "A6020a46" || getprop("ro.build.product") == "A6020a46" || 
       getprop("ro.product.device") == "A6020l36" || getprop("ro.build.product") == "A6020l36" || 
       getprop("ro.product.device") == "A6020l37" || getprop("ro.build.product") == "A6020l37" || 
       getprop("ro.product.device") == "K32c36" || getprop("ro.build.product") == "K32c36" || 
       getprop("ro.product.device") == "k5" || getprop("ro.build.product") == "k5" || 
       getprop("ro.product.device") == "k5_plus" || getprop("ro.build.product") == "k5_plus" || 
       getprop("ro.product.device") == "vibe_k5" || getprop("ro.build.product") == "vibe_k5" || abort("E3004: This package is for device: A6020,A6020a40,A6020a41,A6020a46,A6020l36,A6020l37,K32c36,k5,k5_plus,vibe_k5; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: google/coral/coral:10/QQ3A.200605.001/6392402: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/bootdevice/by-name/system", "ext4");
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore", "/dev/block/bootdevice/by-name/system", "ext4");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
ui_print("Copying device specific files.");
run_program("/sbin/sh", "/tmp/install/bin/move_files.sh");
unmount("/system");
set_progress(1.000000);
