Add info that flashing AB zip will flash to the inactive slot
Also inform user, that a reboot is required to switch slots
Change-Id: I7d609ee3d231e5d38d9145962e979e012d9a0ac8
diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml
index e26ccb7..006e4ce 100755
--- a/gui/theme/common/languages/en.xml
+++ b/gui/theme/common/languages/en.xml
@@ -723,5 +723,7 @@
<string name="unmount_system">Unmounting System...</string>
<string name="unmount_system_err">Failed unmounting System</string>
<string name="fbe_wipe_msg">WARNING: {1} wiped. FBE device should be booted into Android and not Recovery to set initial FBE policy after wipe.</string>
+ <string name="flash_ab_inactive">Flashing A/B zip to inactive slot: {1}</string>
+ <string name="flash_ab_reboot">To flash additional zips, please reboot recovery to switch to the updated slot.</string>
</resources>
</language>
diff --git a/twinstall.cpp b/twinstall.cpp
index 16911c8..2b6f9c7 100755
--- a/twinstall.cpp
+++ b/twinstall.cpp
@@ -441,6 +441,7 @@
} else {
if (Zip.EntryExists(AB_OTA)) {
LOGINFO("AB zip\n");
+ gui_msg(Msg(msg::kHighlight, "flash_ab_inactive=Flashing A/B zip to inactive slot: {1}")(PartitionManager.Get_Active_Slot_Display()=="A"?"B":"A"));
// We need this so backuptool can do its magic
bool system_mount_state = PartitionManager.Is_Mounted_By_Path(PartitionManager.Get_Android_Root_Path());
bool vendor_mount_state = PartitionManager.Is_Mounted_By_Path("/vendor");
@@ -455,6 +456,7 @@
PartitionManager.UnMount_By_Path("/vendor", true);
if (!system_mount_state)
PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), true);
+ gui_warn("flash_ab_reboot=To flash additional zips, please reboot recovery to switch to the updated slot.");
} else {
if (Zip.EntryExists("ui.xml")) {