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:
committed by
Gerrit Code Review
parent
b21cc64ca8
commit
f193f88e6d
+3
-2
@@ -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);
|
||||
|
||||
@@ -3861,59 +3861,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_text_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row2_medium_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3861,59 +3861,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_text_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row2_medium_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3855,59 +3855,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_header_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row3_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3861,59 +3861,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_text_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row2_medium_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3861,59 +3861,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_text_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row2_medium_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3861,59 +3861,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_text_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row2_medium_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3842,59 +3842,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_header_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row3_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3842,59 +3842,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_header_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row3_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3841,59 +3841,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_header_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row3_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3842,59 +3842,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_header_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row3_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3855,59 +3855,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_header_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row3_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3843,59 +3843,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_header_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row3_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -3869,59 +3869,5 @@
|
||||
<text>Swipe to Install</text>
|
||||
</object>
|
||||
</page>
|
||||
|
||||
<page name="fixsu">
|
||||
<object type="template" name="header" />
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row1_text_y%" placement="5"/>
|
||||
<text>Fix Superuser Permissions?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row2_text_y%" placement="5"/>
|
||||
<text>Root permissions appear to be lost.</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row3_text_y%" placement="5"/>
|
||||
<text>Fix root permissions now?</text>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%row4_text_y%" placement="5"/>
|
||||
<text>(Fixes permissions on su binary & app)</text>
|
||||
</object>
|
||||
|
||||
<object type="button">
|
||||
<highlight color="%highlight_color%" />
|
||||
<placement x="%col_center_x%" y="%row2_medium_y%" />
|
||||
<font resource="font" color="%button_text_color%" />
|
||||
<text>Do Not Fix</text>
|
||||
<image resource="main_button" />
|
||||
<action function="set">tw_page_done=1</action>
|
||||
</object>
|
||||
|
||||
<object type="slider">
|
||||
<placement x="%slider_x%" y="%slider_y%" />
|
||||
<resource base="slider" used="slider-used" touch="slider-touch" />
|
||||
<actions>
|
||||
<action function="set">tw_action=fixsu</action>
|
||||
<action function="set">tw_action_text1=Fixing Root Permissions</action>
|
||||
<action function="set">tw_action_text2=</action>
|
||||
<action function="page">singleaction_page</action>
|
||||
</actions>
|
||||
</object>
|
||||
|
||||
<object type="text" color="%text_color%">
|
||||
<font resource="font" />
|
||||
<placement x="%center_x%" y="%slider_text_y%" placement="4" />
|
||||
<text>Swipe to Fix Root</text>
|
||||
</object>
|
||||
</page>
|
||||
</pages>
|
||||
</recovery>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user