redo fix permissions in c++ for faster changes
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 98ba462..b3c6adc 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 @@
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 @@
Update_System_Details();
ui_print("Partitioning complete.\n");
return true;
-}
\ No newline at end of file
+}