assert(getprop("ro.product.device") == "yellowstone" || getprop("ro.build.product") == "yellowstone" || abort("E3004: This package is for device: yellowstone; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: google/tango/yellowstone:4.4.2/KOT49H.161129/161129002: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);
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/sdhci-tegra.3/by-name/APP", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/sdhci-tegra.3/by-name/LNX");
show_progress(0.200000, 10);
ui_print("Patching DTB image unconditionally...");
package_extract_file("dtb.img", "/dev/block/platform/sdhci-tegra.3/by-name/DTB");
set_progress(1.000000);
