redo fix permissions in c++ for faster changes
This commit is contained in:
+18
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user