diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2015-10-27 03:51:58 +0100 |
---|---|---|
committer | Dees Troy <dees_troy@teamw.in> | 2015-11-05 20:07:21 +0100 |
commit | 1673e3d4ea240fa49e0771c19848bcbde6f85faf (patch) | |
tree | a2c23f5f1930d6d87842ac2154438054fb066e5e /gui | |
parent | twrp: fb2png: do not pack relocations for executables (diff) | |
download | android_bootable_recovery-1673e3d4ea240fa49e0771c19848bcbde6f85faf.tar android_bootable_recovery-1673e3d4ea240fa49e0771c19848bcbde6f85faf.tar.gz android_bootable_recovery-1673e3d4ea240fa49e0771c19848bcbde6f85faf.tar.bz2 android_bootable_recovery-1673e3d4ea240fa49e0771c19848bcbde6f85faf.tar.lz android_bootable_recovery-1673e3d4ea240fa49e0771c19848bcbde6f85faf.tar.xz android_bootable_recovery-1673e3d4ea240fa49e0771c19848bcbde6f85faf.tar.zst android_bootable_recovery-1673e3d4ea240fa49e0771c19848bcbde6f85faf.zip |
Diffstat (limited to '')
-rw-r--r-- | gui/action.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index aafcd2ed4..86907a54f 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1798,6 +1798,7 @@ int GUIAction::mountsystemtoggle(std::string arg) { int op_status = 0; bool remount_system = PartitionManager.Is_Mounted_By_Path("/system"); + bool remount_vendor = PartitionManager.Is_Mounted_By_Path("/vendor"); operation_start("Toggle System Mount"); if (!PartitionManager.UnMount_By_Path("/system", true)) { @@ -1819,6 +1820,20 @@ int GUIAction::mountsystemtoggle(std::string arg) } else { op_status = 1; // fail } + Part = PartitionManager.Find_Partition_By_Path("/vendor"); + if (Part) { + if (arg == "0") { + Part->Change_Mount_Read_Only(false); + } else { + Part->Change_Mount_Read_Only(true); + } + if (remount_vendor) { + Part->Mount(true); + } + op_status = 0; // success + } else { + op_status = 1; // fail + } } operation_end(op_status); |