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 --- gui/action.cpp | 5 ++-- gui/devices/1024x600/res/ui.xml | 54 ---------------------------------------- gui/devices/1024x768/res/ui.xml | 54 ---------------------------------------- gui/devices/1080x1920/res/ui.xml | 54 ---------------------------------------- gui/devices/1280x800/res/ui.xml | 54 ---------------------------------------- gui/devices/1920x1200/res/ui.xml | 54 ---------------------------------------- gui/devices/2560x1600/res/ui.xml | 54 ---------------------------------------- gui/devices/320x480/res/ui.xml | 54 ---------------------------------------- gui/devices/480x800/res/ui.xml | 54 ---------------------------------------- gui/devices/480x854/res/ui.xml | 54 ---------------------------------------- gui/devices/540x960/res/ui.xml | 54 ---------------------------------------- gui/devices/720x1280/res/ui.xml | 54 ---------------------------------------- gui/devices/800x1280/res/ui.xml | 54 ---------------------------------------- gui/devices/800x480/res/ui.xml | 54 ---------------------------------------- 14 files changed, 3 insertions(+), 704 deletions(-) (limited to 'gui') diff --git a/gui/action.cpp b/gui/action.cpp index 78e862526..36f400613 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -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); diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml index bbcaae1f5..569a5bd1f 100755 --- a/gui/devices/1024x600/res/ui.xml +++ b/gui/devices/1024x600/res/ui.xml @@ -3861,59 +3861,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml index 97b98c049..6f8797a74 100644 --- a/gui/devices/1024x768/res/ui.xml +++ b/gui/devices/1024x768/res/ui.xml @@ -3861,59 +3861,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml index 5ba884b13..beaf37325 100644 --- a/gui/devices/1080x1920/res/ui.xml +++ b/gui/devices/1080x1920/res/ui.xml @@ -3855,59 +3855,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml index 66861f2cb..115a391eb 100644 --- a/gui/devices/1280x800/res/ui.xml +++ b/gui/devices/1280x800/res/ui.xml @@ -3861,59 +3861,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml index d1a7829ac..fb615c135 100644 --- a/gui/devices/1920x1200/res/ui.xml +++ b/gui/devices/1920x1200/res/ui.xml @@ -3861,59 +3861,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml index 23b7c3e02..9ce330a44 100644 --- a/gui/devices/2560x1600/res/ui.xml +++ b/gui/devices/2560x1600/res/ui.xml @@ -3861,59 +3861,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml index 893c90cfd..dbee885a7 100644 --- a/gui/devices/320x480/res/ui.xml +++ b/gui/devices/320x480/res/ui.xml @@ -3842,59 +3842,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml index 690028106..bb90e70b4 100644 --- a/gui/devices/480x800/res/ui.xml +++ b/gui/devices/480x800/res/ui.xml @@ -3842,59 +3842,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml index 09c507767..08c3ddcfe 100644 --- a/gui/devices/480x854/res/ui.xml +++ b/gui/devices/480x854/res/ui.xml @@ -3841,59 +3841,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml index f636e2e0e..e03704eef 100644 --- a/gui/devices/540x960/res/ui.xml +++ b/gui/devices/540x960/res/ui.xml @@ -3842,59 +3842,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml index 316b20e78..c9a4c0a69 100644 --- a/gui/devices/720x1280/res/ui.xml +++ b/gui/devices/720x1280/res/ui.xml @@ -3855,59 +3855,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml index b85084142..9b7a06315 100755 --- a/gui/devices/800x1280/res/ui.xml +++ b/gui/devices/800x1280/res/ui.xml @@ -3843,59 +3843,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml index cbd3b7da0..9c391b33e 100755 --- a/gui/devices/800x480/res/ui.xml +++ b/gui/devices/800x480/res/ui.xml @@ -3869,59 +3869,5 @@ Swipe to Install - - - - - - - - Fix Superuser Permissions? - - - - - - Root permissions appear to be lost. - - - - - - Fix root permissions now? - - - - - - (Fixes permissions on su binary & app) - - - - - - - Do Not Fix - - tw_page_done=1 - - - - - - - tw_action=fixsu - tw_action_text1=Fixing Root Permissions - tw_action_text2= - singleaction_page - - - - - - - Swipe to Fix Root - - -- cgit v1.2.3