assert(getprop("ro.product.device") == "c0" || getprop("ro.build.product") == "c0" || 
       getprop("ro.product.device") == "p4notewifi" || getprop("ro.build.product") == "p4notewifi" || 
       getprop("ro.product.device") == "p4notewifiww" || getprop("ro.build.product") == "p4notewifiww" || 
       getprop("ro.product.device") == "n8013" || getprop("ro.build.product") == "n8013" || 
       getprop("ro.product.device") == "GT-N8013" || getprop("ro.build.product") == "GT-N8013" || 
       getprop("ro.product.device") == "n8010" || getprop("ro.build.product") == "n8010" || 
       getprop("ro.product.device") == "GT-N8010" || getprop("ro.build.product") == "GT-N8010" || abort("E3004: This package is for device: c0,p4notewifi,p4notewifiww,n8013,GT-N8013,n8010,GT-N8010; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: samsung/p4notewifixx/p4notewifiww:4.4.2/KOT49H/N8010XXUDNE4: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/dw_mmc/by-name/SYSTEM", "ext4");
ui_print("Patching system image unconditionally...");
show_progress(0.900000, 0);
block_image_update("/dev/block/platform/dw_mmc/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/platform/dw_mmc/by-name/SYSTEM", "ext4");
package_extract_file("boot.img", "/dev/block/platform/dw_mmc/by-name/BOOT");
show_progress(0.100000, 10);
set_progress(1.000000);
