From 884bb2bc2458ed6eb1bacad4ef8f451238f01a42 Mon Sep 17 00:00:00 2001 From: nkk71 Date: Sun, 3 Sep 2017 22:23:19 +0300 Subject: Fix 'No OS' on System_Image restore after wipe * When you format the system partition, it will remain in a mounted state. * Subsequently restoring a system_image (even though successfully) the Update_System_Details() function will not correctly update the system partition details. * Reproducible by: 1- Advanced wipe: System 2- Restore: System_Image 3- Reboot -> No OS prompt * eg: [ ~ # twrp get tw_min_system tw_min_system = 50 ~ # twrp get tw_backup_system_size tw_backup_system_size = 8 ~ # mount -o ro /system ~ # du -sh /system 3.5G /system ] Change-Id: I99f75274816788dd38eccdd387f7ac691e1f3fab --- partitionmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/partitionmanager.cpp b/partitionmanager.cpp index f70159c6d..9b1c1c926 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -999,6 +999,7 @@ int TWPartitionManager::Run_Restore(const string& Restore_Name) { } } TWFunc::GUI_Operation_Text(TW_UPDATE_SYSTEM_DETAILS_TEXT, gui_parse_text("{@updating_system_details}")); + UnMount_By_Path("/system", false); Update_System_Details(); UnMount_Main_Partitions(); time(&rStop); -- cgit v1.2.3