diff --git a/gui/action.cpp b/gui/action.cpp index c6eac6993..8e1a9ec55 100755 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -963,7 +963,7 @@ int GUIAction::checkpartitionlist(std::string arg) while (end_pos != string::npos && start_pos < List.size()) { part_path = List.substr(start_pos, end_pos - start_pos); LOGINFO("checkpartitionlist part_path '%s'\n", part_path.c_str()); - if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MAGISK") { + if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MODULE") { // Do nothing } else { count++; @@ -992,7 +992,7 @@ int GUIAction::getpartitiondetails(std::string arg) while (end_pos != string::npos && start_pos < List.size()) { part_path = List.substr(start_pos, end_pos - start_pos); LOGINFO("getpartitiondetails part_path '%s'\n", part_path.c_str()); - if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MAGISK") { + if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MODULE") { // Do nothing } else { DataManager::SetValue("tw_partition_path", part_path); @@ -1412,9 +1412,9 @@ int GUIAction::wipe(std::string arg) } else { skip = true; } - } else if (wipe_path == "MAGISK") { - if (!PartitionManager.Wipe_Magisk_Modules()) { - gui_err("pb_magisk_wipe_err=Failed to wipe magisk modules"); + } else if (wipe_path == "MODULE") { + if (!PartitionManager.Wipe_Module()) { + gui_err("pb_module_wipe_err=Failed to wipe module"); ret_val = false; break; } else { diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index a0cf1b090..c4a64361d 100644 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -916,8 +916,8 @@ -- Substratum Overlays Wipe Complete! Show free SD card space in MB An assert failed. Please check the output above for more details. - Magisk Modules - -- Magisk Modules Wipe Complete! + Module magisk-ksu + -- Module Wipe Complete! Preserving Logs... Copy Logs After Flash Include DMESG in Logs diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 8f5c2e1ed..41617129d 100755 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1599,20 +1599,14 @@ int TWPartitionManager::Wipe_Substratum_Overlays(void) { return true; } -int TWPartitionManager::Wipe_Magisk_Modules(void) { - string magisk_dir = "/data/adb/modules"; - string magisk_dir2 = "/data/adb/post-fs-data.d"; - string magisk_dir3 = "/data/adb/service.d"; +int TWPartitionManager::Wipe_Module(void) { + string module_dir = "/data/adb"; if (!Mount_By_Path("/data", true)) return false; - if (TWFunc::Path_Exists(magisk_dir)) TWFunc::removeDir(magisk_dir, false); + if (TWFunc::Path_Exists(module_dir)) TWFunc::removeDir(module_dir, false); - if (TWFunc::Path_Exists(magisk_dir2)) TWFunc::removeDir(magisk_dir2, false); - - if (TWFunc::Path_Exists(magisk_dir3)) TWFunc::removeDir(magisk_dir3, false); - - gui_msg("magisk_done=-- Magisk Modules Wipe Complete!"); + gui_msg("module_done=-- Module Wipe Complete!"); return true; } @@ -2729,11 +2723,11 @@ void TWPartitionManager::Get_Partition_List(string ListType, substratum.Mount_Point = "SUBSTRATUM"; substratum.selected = 0; Partition_List->push_back(substratum); - struct PartitionList magisk; - magisk.Display_Name = gui_parse_text("{@pb_wipe_magisk_modules}"); - magisk.Mount_Point = "MAGISK"; - magisk.selected = 0; - Partition_List->push_back(magisk); + struct PartitionList module; + module.Display_Name = gui_parse_text("{@pb_wipe_module}"); + module.Mount_Point = "MODULE"; + module.selected = 0; + Partition_List->push_back(module); for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { if ((*iter)->Wipe_Available_in_GUI && !(*iter)->Is_SubPartition) { struct PartitionList part; diff --git a/partitions.hpp b/partitions.hpp index dbf89c6e7..6720c4ee4 100755 --- a/partitions.hpp +++ b/partitions.hpp @@ -349,7 +349,7 @@ class TWPartitionManager int Factory_Reset(); // Performs a factory reset int Wipe_Dalvik_Cache(); // Wipes dalvik cache int Wipe_Substratum_Overlays(); // Wipe substratum overlays - int Wipe_Magisk_Modules(); // Wipe magisk modules + int Wipe_Module(); // Wipe modules magisk/ksu int Wipe_Rotate_Data(); // Wipes rotation data -- int Wipe_Battery_Stats(); // Wipe battery stats -- /data/system/batterystats.bin int Wipe_Android_Secure(); // Wipes android secure