assert(getprop("ro.product.device") == "heroltebmc" || getprop("ro.build.product") == "heroltebmc" || 
       getprop("ro.product.device") == "herolteskt" || getprop("ro.build.product") == "herolteskt" || 
       getprop("ro.product.device") == "heroltektt" || getprop("ro.build.product") == "heroltektt" || 
       getprop("ro.product.device") == "heroltelgt" || getprop("ro.build.product") == "heroltelgt" || 
       getprop("ro.product.device") == "heroltexx" || getprop("ro.build.product") == "heroltexx" || 
       getprop("ro.product.device") == "herolte" || getprop("ro.build.product") == "herolte" || abort("E3004: This package is for device: heroltebmc,herolteskt,heroltektt,heroltelgt,heroltexx,herolte; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: samsung/heroltexx/herolte:8.0.0/R16NW/G930FXXU2ERD5:user/release-keys");
ui_print("                                         ");
ui_print("            _____            _     _     ");
ui_print("           |  __ \          (_)   | |    ");
ui_print("   ___ _ __| |  | |_ __ ___  _  __| |    ");
ui_print("  / __| '__| |  | | '__/ _ \| |/ _\`|    ");
ui_print(" | (__| |  | |__| | | | (_) | | (_| |    ");
ui_print("  \___|_|  |_____/|_|_ \___/|_|\__,_|  _ ");
ui_print("     /\             | |         (_)   | |");
ui_print("    /  \   _ __   __| |_ __ ___  _  __| |");
ui_print("   / /\ \ | '_ \ / _\`| '__/ _ \| |/ _\`|");
ui_print("  / ____ \| | | | (_| | | | (_) | | (_| |");
ui_print(" /_/    \_\_| |_|\__,_|_|  \___/|_|\__,_|");
ui_print("                                         ");
ui_print("***********************************************");
ui_print(" ROM version      : 7.13");
ui_print(" Android version  : 11");
ui_print(" Security patch   : 2021-12-05");
ui_print(" Build date       : Tue Jan 11 21:02:43 UTC 2022");
ui_print("***********************************************");
ui_print(" Device           : herolte");
ui_print(" Manufacturer     : samsung");
ui_print("***********************************************");
ui_print("                                         ");
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/155a0000.ufs/by-name/SYSTEM", "ext4");
ui_print("Patching system image unconditionally...");
show_progress(0.900000, 0);
block_image_update("/dev/block/platform/155a0000.ufs/by-name/SYSTEM", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
run_program("/tmp/install/bin/e2fsck_static", "-fy", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
run_program("/tmp/install/bin/resize2fs_static", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
run_program("/tmp/install/bin/e2fsck_static", "-fy", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM", "ext4");
package_extract_file("boot.img", "/dev/block/platform/155a0000.ufs/by-name/BOOT");
show_progress(0.100000, 10);
set_progress(1.000000);
