twrpRepacker: support vendor_boot and recovery_ab
Change-Id: Ic4d108eb04430550fe0c88f2849463128be5a418
diff --git a/data.cpp b/data.cpp
index fa299c1..0078524 100644
--- a/data.cpp
+++ b/data.cpp
@@ -805,6 +805,16 @@
#else
mConst.SetValue("tw_uses_initramfs", "0");
#endif
+#if defined BOARD_USES_RECOVERY_AS_BOOT || defined BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT
+ mConst.SetValue("tw_include_install_recovery_ramdisk", "1");
+#else
+ mConst.SetValue("tw_include_install_recovery_ramdisk", "0");
+#endif
+#ifdef BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT
+ mConst.SetValue("tw_is_vendor_boot", "1");
+#else
+ mConst.SetValue("tw_is_vendor_boot", "0");
+#endif
#ifdef TW_NO_SCREEN_TIMEOUT
mConst.SetValue("tw_screen_timeout_secs", "0");
mConst.SetValue("tw_no_screen_timeout", "1");
@@ -812,6 +822,15 @@
mPersist.SetValue("tw_screen_timeout_secs", "60");
mPersist.SetValue("tw_no_screen_timeout", "0");
#endif
+#ifdef BOARD_BOOT_HEADER_VERSION
+ mConst.SetValue("tw_boot_header_version", BOARD_BOOT_HEADER_VERSION);
+#endif
+
+ if (GetIntValue("tw_is_vendor_boot") == 1 && GetIntValue("tw_boot_header_version") == 3)
+ mConst.SetValue("tw_is_vendor_boot_header_v3", "1");
+ else
+ mConst.SetValue("tw_is_vendor_boot_header_v3", "0");
+
mData.SetValue("tw_gui_done", "0");
mData.SetValue("tw_encrypt_backup", "0");
mData.SetValue("tw_sleep_total", "5");