summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2012-10-10 03:01:03 +0200
committerbigbiff bigbiff <bigbiff@teamw.in>2012-10-10 03:01:03 +0200
commita0f8a59aa10dbbeac965129c91cf1c693137d97e (patch)
tree28902a82dd78b48f3fb257fb82fb143f4a9ced66 /partitionmanager.cpp
parentAdd reboot system button after sideload, backup, and restore (diff)
downloadandroid_bootable_recovery-a0f8a59aa10dbbeac965129c91cf1c693137d97e.tar
android_bootable_recovery-a0f8a59aa10dbbeac965129c91cf1c693137d97e.tar.gz
android_bootable_recovery-a0f8a59aa10dbbeac965129c91cf1c693137d97e.tar.bz2
android_bootable_recovery-a0f8a59aa10dbbeac965129c91cf1c693137d97e.tar.lz
android_bootable_recovery-a0f8a59aa10dbbeac965129c91cf1c693137d97e.tar.xz
android_bootable_recovery-a0f8a59aa10dbbeac965129c91cf1c693137d97e.tar.zst
android_bootable_recovery-a0f8a59aa10dbbeac965129c91cf1c693137d97e.zip
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
+}