repacker: override slot for flashing images instead of using bootctrl

Bootctrl is being unreliable during repacking. This overrides the slot
while repacking recovery in boot.

Change-Id: I0a04357af4e5f24591792bcfb27ccbd10b0a813b
This commit is contained in:
bigbiff
2021-07-31 19:02:26 -04:00
parent 76224bde3d
commit 74a46278c3
3 changed files with 9 additions and 6 deletions
+6
View File
@@ -3047,6 +3047,12 @@ void TWPartitionManager::Remove_Partition_By_Path(string Path) {
}
}
void TWPartitionManager::Override_Active_Slot(const string& Slot) {
LOGINFO("Overriding slot to '%s'\n", Slot.c_str());
Active_Slot_Display = Slot;
DataManager::SetValue("tw_active_slot", Slot);
}
void TWPartitionManager::Set_Active_Slot(const string& Slot) {
if (Slot != "A" && Slot != "B") {
LOGERR("Set_Active_Slot invalid slot '%s'\n", Slot.c_str());