summaryrefslogtreecommitdiffstats
path: root/openrecoveryscript.cpp
diff options
context:
space:
mode:
authorCaptain Throwback <captainthrowback@gmail.com>2018-07-27 16:05:24 +0200
committerCaptain Throwback <captainthrowback@hotmail.com>2018-08-24 18:47:45 +0200
commit9d6feb53115e2dcc49a644400da4d62a16c1c3c6 (patch)
treec5d5778cd617d8d60231cebf87f16527a7f47313 /openrecoveryscript.cpp
parentMerge AOSP android-9.0.0_r3 (diff)
downloadandroid_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.gz
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.bz2
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.lz
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.xz
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.zst
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.zip
Diffstat (limited to 'openrecoveryscript.cpp')
-rw-r--r--openrecoveryscript.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index d7e4a2332..86c90a662 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -147,8 +147,8 @@ int OpenRecoveryScript::run_script_file(void) {
// Wipe
if (strcmp(value, "cache") == 0 || strcmp(value, "/cache") == 0) {
PartitionManager.Wipe_By_Path("/cache");
- } else if (strcmp(value, "system") == 0 || strcmp(value, "/system") == 0) {
- PartitionManager.Wipe_By_Path("/system");
+ } else if (strcmp(value, PartitionManager.Get_Android_Root_Path().c_str()) == 0 || strcmp(value, PartitionManager.Get_Android_Root_Path().c_str()) == 0) {
+ PartitionManager.Wipe_By_Path(PartitionManager.Get_Android_Root_Path());
} 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) {
@@ -667,14 +667,14 @@ void OpenRecoveryScript::Run_CLI_Command(const char* command) {
int OpenRecoveryScript::remountrw(void)
{
- bool remount_system = PartitionManager.Is_Mounted_By_Path("/system");
+ bool remount_system = PartitionManager.Is_Mounted_By_Path(PartitionManager.Get_Android_Root_Path());
int op_status;
TWPartition* Part;
- if (!PartitionManager.UnMount_By_Path("/system", true)) {
+ if (!PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) {
op_status = 1; // fail
} else {
- Part = PartitionManager.Find_Partition_By_Path("/system");
+ Part = PartitionManager.Find_Partition_By_Path(PartitionManager.Get_Android_Root_Path());
if (Part) {
DataManager::SetValue("tw_mount_system_ro", 0);
Part->Change_Mount_Read_Only(false);