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
This commit is contained in:
Ethan Yonker
2019-01-11 22:49:52 -06:00
parent 9a4d7403d9
commit 53796e7333
12 changed files with 821 additions and 22 deletions

View File

@@ -916,7 +916,12 @@ void DataManager::SetDefaultValues()
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);
}