diff options
author | big biff <bigbiff@teamw.in> | 2018-12-24 16:08:07 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.omnirom.org> | 2018-12-24 16:08:07 +0100 |
commit | 09ee3ea4227fd7046b5b0d54dc83371e218786d1 (patch) | |
tree | 5f2fc1a1e59572d5c66d335eb59bb63aa8f277bf /gui | |
parent | Merge "Add option to use ro.serialno for generating device id" into android-9.0 (diff) | |
parent | twrp: use ANDROID_ROOT environment variable (diff) | |
download | android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.gz android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.bz2 android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.lz android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.xz android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.zst android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.zip |
Diffstat (limited to 'gui')
-rw-r--r-- | gui/action.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index fb05d77b4..d708dd467 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1819,14 +1819,14 @@ int GUIAction::checkpartitionlifetimewrites(std::string arg) int GUIAction::mountsystemtoggle(std::string arg) { int op_status = 0; - bool remount_system = PartitionManager.Is_Mounted_By_Path("/system"); + bool remount_system = PartitionManager.Is_Mounted_By_Path(PartitionManager.Get_Android_Root_Path()); bool remount_vendor = PartitionManager.Is_Mounted_By_Path("/vendor"); operation_start("Toggle System Mount"); - if (!PartitionManager.UnMount_By_Path("/system", true)) { + if (!PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) { op_status = 1; // fail } else { - TWPartition* Part = PartitionManager.Find_Partition_By_Path("/system"); + TWPartition* Part = PartitionManager.Find_Partition_By_Path(PartitionManager.Get_Android_Root_Path()); if (Part) { if (arg == "0") { DataManager::SetValue("tw_mount_system_ro", 0); @@ -1910,9 +1910,9 @@ int GUIAction::checkforapp(std::string arg __unused) DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed or do not install goto exit; } - if (PartitionManager.Mount_By_Path("/system", false)) { - string base_path = "/system"; - if (TWFunc::Path_Exists("/system/system")) + if (PartitionManager.Mount_By_Path(PartitionManager.Get_Android_Root_Path(), false)) { + string base_path = PartitionManager.Get_Android_Root_Path(); + if (TWFunc::Path_Exists(PartitionManager.Get_Android_Root_Path() + "/system")) base_path += "/system"; // For devices with system as a root file system (e.g. Pixel) string install_path = base_path + "/priv-app"; if (!TWFunc::Path_Exists(install_path)) @@ -2007,9 +2007,9 @@ int GUIAction::installapp(std::string arg __unused) sync(); } } else { - if (PartitionManager.Mount_By_Path("/system", true)) { - string base_path = "/system"; - if (TWFunc::Path_Exists("/system/system")) + if (PartitionManager.Mount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) { + string base_path = PartitionManager.Get_Android_Root_Path(); + if (TWFunc::Path_Exists(PartitionManager.Get_Android_Root_Path() + "/system")) base_path += "/system"; // For devices with system as a root file system (e.g. Pixel) string install_path = base_path + "/priv-app"; string context = "u:object_r:system_file:s0"; @@ -2034,7 +2034,7 @@ int GUIAction::installapp(std::string arg __unused) } sync(); sync(); - PartitionManager.UnMount_By_Path("/system", true); + PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), true); op_status = 0; } else { LOGERR("Error making app directory '%s': %s\n", strerror(errno)); |