From b206c132c684f01198688d7e56da781d7d8157c2 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Tue, 5 Jan 2021 23:54:18 +0100 Subject: [PATCH] ors: Refresh the system details after sideload and wipe system * Thus resolve the 'No OS installed' warnings upon system reboot if only adb shell twrp actions were used on the device Change-Id: Id4fd915ce25cef8a2fdef6fda1750ca1b3ed13b7 (cherry picked from commit 0c6a6266fba8960f1b96a08c837ac61f2b7f9310) --- openrecoveryscript.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp index cad1f790..7d1db06f 100755 --- a/openrecoveryscript.cpp +++ b/openrecoveryscript.cpp @@ -156,6 +156,7 @@ int OpenRecoveryScript::run_script_file(void) { PartitionManager.Wipe_By_Path("/cache"); } else if (strcmp(value, "system") == 0 || strcmp(value, "/system") == 0 || strcmp(value, PartitionManager.Get_Android_Root_Path().c_str()) == 0) { PartitionManager.Wipe_By_Path("/system"); + PartitionManager.Update_System_Details(); } else if (strcmp(value, "dalvik") == 0 || strcmp(value, "dalvick") == 0 || strcmp(value, "dalvikcache") == 0 || strcmp(value, "dalvickcache") == 0) { PartitionManager.Wipe_Dalvik_Cache(); } else if (strcmp(value, "data") == 0 || strcmp(value, "/data") == 0 || strcmp(value, "factory") == 0 || strcmp(value, "factoryreset") == 0) { @@ -389,6 +390,7 @@ int OpenRecoveryScript::run_script_file(void) { ret_val = 1; // failure } PartitionManager.Unlock_Block_Partitions(); + PartitionManager.Update_System_Details(); sideload = 1; // Causes device to go to the home screen afterwards pid_t sideload_child_pid = GetMiniAdbdPid(); if (sideload_child_pid != 0) {