summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/action.cpp5
-rwxr-xr-xgui/devices/1024x600/res/ui.xml54
-rw-r--r--gui/devices/1024x768/res/ui.xml54
-rw-r--r--gui/devices/1080x1920/res/ui.xml54
-rw-r--r--gui/devices/1280x800/res/ui.xml54
-rw-r--r--gui/devices/1920x1200/res/ui.xml54
-rw-r--r--gui/devices/2560x1600/res/ui.xml54
-rw-r--r--gui/devices/320x480/res/ui.xml54
-rw-r--r--gui/devices/480x800/res/ui.xml54
-rw-r--r--gui/devices/480x854/res/ui.xml54
-rw-r--r--gui/devices/540x960/res/ui.xml54
-rw-r--r--gui/devices/720x1280/res/ui.xml54
-rwxr-xr-xgui/devices/800x1280/res/ui.xml54
-rwxr-xr-xgui/devices/800x480/res/ui.xml54
-rw-r--r--twrp.cpp8
15 files changed, 6 insertions, 709 deletions
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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 @@
<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>
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);