summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/action.cpp')
-rw-r--r--gui/action.cpp20
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));