assert(is_substring("Tate", file_getstring("/proc/product_name")));
ui_print("");
ui_print("TeamWin Recovery Project v2.8.7.0");
ui_print("for Kindle Fire HD 7 (Tate)");
ui_print("");
ui_print("");
ui_print("Checking sha1sum of recovery image...");
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/cache", "/cache");
package_extract_dir("cache", "/cache");
assert(apply_patch_check("/cache/kfhd7-twrp-2.8.7.0-recovery.img", "cbd85cd0b1af63e84f48d29869a89bedfba324f8", "cbd85cd0b1af63e84f48d29869a89bedfba324f8"));
delete("/cache/kfhd7-twrp-2.8.7.0-recovery.img");
ui_print("Check passed.");
ui_print("");
ui_print("");
ui_print("Attempting to Write Recovery...");
package_extract_file("cache/kfhd7-twrp-2.8.7.0-recovery.img", "/dev/block/platform/omap/omap_hsmmc.1/by-name/recovery");
show_progress(0.100000, 0);
ui_print("");
ui_print("Done!");
