summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 98ba462c2..b3c6adc36 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -38,6 +38,7 @@
#include "partitions.hpp"
#include "data.hpp"
#include "twrp-functions.hpp"
+#include "fixPermissions.hpp"
#ifdef TW_INCLUDE_CRYPTO
#ifdef TW_INCLUDE_JB_CRYPTO
@@ -1553,6 +1554,22 @@ int TWPartitionManager::Decrypt_Device(string Password) {
return 1;
}
+int TWPartitionManager::Fix_Permissions(void) {
+ int result = 0;
+ if (!Mount_By_Path("/data", true))
+ return false;
+
+ if (!Mount_By_Path("/system", true))
+ return false;
+
+ Mount_By_Path("/sd-ext", false);
+
+ fixPermissions perms;
+ result = perms.fixPerms(true, false);
+ ui_print("Done.\n\n");
+ return result;
+}
+
//partial kangbang from system/vold
#ifndef CUSTOM_LUN_FILE
#define CUSTOM_LUN_FILE "/sys/devices/platform/usb_mass_storage/lun%d/file"
@@ -1827,4 +1844,4 @@ int TWPartitionManager::Partition_SDCard(void) {
Update_System_Details();
ui_print("Partitioning complete.\n");
return true;
-} \ No newline at end of file
+}