Make fixing su perms automatic

In 4.3+ with SELinux, su perms will be lost on every reboot so
users will get the prompt to fix su perms in TWRP every time. Make
fixing the su perms automatic instead of nagging the user.

Change-Id: Ia8a2652018db5e1f6ffc5fec2a4ac0db3a8f32bb
This commit is contained in:
Dees Troy
2013-09-12 09:11:32 -05:00
committed by Gerrit Code Review
parent b21cc64ca8
commit f193f88e6d
15 changed files with 6 additions and 709 deletions
+3 -2
View File
@@ -603,6 +603,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
}
if (function == "togglestorage") {
LOGERR("togglestorage action was deprecated from TWRP\n");
if (arg == "internal") {
DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 0);
} else if (arg == "external") {
@@ -1290,8 +1291,8 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
if (simulate) {
simulate_progress_bar();
} else {
if (!TWFunc::Fix_su_Perms())
op_status = 1;
LOGERR("Fixing su permissions was deprecated from TWRP.\n");
LOGERR("4.3+ ROMs with SELinux will always lose su perms.\n");
}
operation_end(op_status, simulate);