Use magiskboot to repack the boot partition
Set TW_INCLUDE_REPACKTOOLS := true
Must also have:
AB_OTA_UPDATER := true
Use magiskboot and provide GUI options to allow users to repack
their existing boot image to install TWRP (or kernels) so we can
stop having to provide installation zips for AB devices. There is
also an option to try to fix a recovery bootloop if the kernel
has been patched to always boot the ramdisk for root, etc.
You will need to pull the below repo into external/magisk-prebuilt
https://github.com/TeamWin/external_magisk-prebuilt
Change-Id: I74196cc6f095a7576d61886dc96cbc18deba9b04
diff --git a/data.cpp b/data.cpp
index 9225535..cd03d78 100755
--- a/data.cpp
+++ b/data.cpp
@@ -916,7 +916,12 @@
mData.SetValue("tw_app_install_status", "0"); // 0 = no status, 1 = not installed, 2 = already installed
#endif
- mData.SetValue("tw_enable_adb_backup", "0");
+ mData.SetValue("tw_enable_adb_backup", "0");
+
+ if (TWFunc::Path_Exists("/sbin/magiskboot"))
+ mConst.SetValue("tw_has_repack_tools", "1");
+ else
+ mConst.SetValue("tw_has_repack_tools", "0");
pthread_mutex_unlock(&m_valuesLock);
}