From f193f88e6d54c186bd425c7f77dab3e6782b046b Mon Sep 17 00:00:00 2001 From: Dees Troy Date: Wed, 11 Sep 2013 14:56:20 +0000 Subject: 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 --- twrp.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'twrp.cpp') diff --git a/twrp.cpp b/twrp.cpp index 5e1956f23..57e1657b3 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -249,14 +249,12 @@ int main(int argc, char **argv) { // Device doesn't have su installed DataManager::SetValue("tw_busy", 1); if (gui_startPage("installsu") != 0) { - LOGERR("Failed to start decrypt GUI page.\n"); + LOGERR("Failed to start SuperSU install page.\n"); } } else if (TWFunc::Check_su_Perms() > 0) { // su perms are set incorrectly - DataManager::SetValue("tw_busy", 1); - if (gui_startPage("fixsu") != 0) { - LOGERR("Failed to start decrypt GUI page.\n"); - } + LOGINFO("Root permissions appear to be lost... fixing. (This will always happen on 4.3+ ROMs with SELinux.\n"); + TWFunc::Fix_su_Perms(); } sync(); PartitionManager.UnMount_By_Path("/system", false); -- cgit v1.2.3