twrpRepacker: override slot back after flashing
and move updating partition details to the function
Change-Id: I6f27ab1191246b6a23e625b0e3459db9024691c7
diff --git a/twrpRepacker.cpp b/twrpRepacker.cpp
index 8ca1409..5a59fc6 100755
--- a/twrpRepacker.cpp
+++ b/twrpRepacker.cpp
@@ -216,7 +216,6 @@
else
PartitionManager.Override_Active_Slot("A");
DataManager::SetProgress(.25);
- PartitionManager.Update_System_Details();
if (!Backup_Image_For_Repack(part, REPACK_ORIG_DIR, Repack_Options.Backup_First, gui_lookup("repack", "Repack")))
return false;
if (TWFunc::copy_file(REPACK_NEW_DIR "ramdisk.cpio", REPACK_ORIG_DIR "ramdisk.cpio", 0644)) {
@@ -261,6 +260,11 @@
}}
TWFunc::removeDir(REPACK_NEW_DIR, false);
gui_msg(Msg(msg::kWarning, "repack_overwrite_warning=If device was previously rooted, then root has been overwritten and will need to be reinstalled."));
+ string Current_Slot = PartitionManager.Get_Active_Slot_Display();
+ if (Current_Slot == "A")
+ PartitionManager.Override_Active_Slot("B");
+ else
+ PartitionManager.Override_Active_Slot("A");
return true;
}