From ff4f958182e710c64143d876b8ccc40259d2bea8 Mon Sep 17 00:00:00 2001 From: Chaosmaster Date: Sun, 26 Jan 2020 15:38:11 +0100 Subject: [PATCH] Add option to automatically unmount system before installing ZIP This adds the option to automatically unmount the system partition before installing a ZIP-file. This option is enabled by default, This is usefull on SAR-devices where system is mounted as system_root and ZIPs (i.e. Magisk) try to unmount system instead of system_root and fail to install. Change-Id: Id94ae658964679e23aa7fa137e07edf74ee073df --- data.cpp | 1 + gui/theme/common/landscape.xml | 3 +++ gui/theme/common/languages/en.xml | 3 +++ gui/theme/common/portrait.xml | 3 +++ gui/theme/common/watch.xml | 3 +++ twinstall.cpp | 12 +++++++++++- variables.h | 1 + 7 files changed, 25 insertions(+), 1 deletion(-) diff --git a/data.cpp b/data.cpp index 088dbda6..b1e8404b 100755 --- a/data.cpp +++ b/data.cpp @@ -783,6 +783,7 @@ void DataManager::SetDefaultValues() #else mPersist.SetValue(TW_NO_SHA2, "1"); #endif + mPersist.SetValue(TW_UNMOUNT_SYSTEM, "1"); #ifdef TW_NO_SCREEN_TIMEOUT mConst.SetValue("tw_screen_timeout_secs", "0"); diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 8244c461..230b72f7 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -2937,6 +2937,9 @@ + + + diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index 4a0ac7fd..3769da50 100755 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -719,5 +719,8 @@ Include Kernel Log Use SHA2 for hashing Error changing bootloader boot slot to {1} + Unmount System before installing a ZIP + Unmounting System... + Failed unmounting System diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index e014cc53..83704146 100755 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -3150,6 +3150,9 @@ + + +