(!less_than_int(1772202511, getprop("ro.build.date.utc"))) || abort("Can't install this package (Fri Feb 27 14:28:31 UTC 2026) over newer build (" + getprop("ro.build.date") + ").");
assert(getprop("ro.product.device") == "vision" || getprop("ro.build.product") == "vision" || abort("This package is for device: vision; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: htc_wwe/htc_vision/vision:4.4.4/KTU84P/1227136:user/release-keys");
ifelse(is_mounted("/system"), unmount("/system"));
show_progress(0.750000, 0);
ui_print(" ##################################### ");
ui_print("");
ui_print("        _      ___    ___   ___        ");
ui_print("       /_\    / _ \  / __| | _ \       ");
ui_print("      / _ \  | (_) | \__ \ |  _/       ");
ui_print("     /_/ \_\  \___/  |___/ |_|         ");
ui_print("");
ui_print("      www.unlegacy-android.org         ");
ui_print(" ##################################### ");
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/msm_sdcc.2/by-num/p25", 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/msm_sdcc.2/by-num/p25", "18,0,32767,32768,32770,32801,32803,33219,65535,65536,65538,65954,89316,98304,98306,98337,98339,98755,106430") == "77b8d6e6b965ae5511e2e48322f28f16d8590d40" then
if range_sha1("/dev/block/platform/msm_sdcc.2/by-num/p25", "20,32767,32768,32770,32801,32803,33219,65535,65536,65538,65954,89316,89828,97792,98304,98306,98337,98339,98755,106430,106431") == "fdb9dd380883dfa269968c0938961a4ba39b7434" 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/msm_sdcc.2/by-num/p22");
show_progress(0.200000, 10);
