Remove SuperSU

Change-Id: I2ca7580bbde5a8903b9ba5c1513ddba887e8d49e
This commit is contained in:
Ethan Yonker
2018-07-20 13:45:16 -05:00
parent fac1b3835c
commit fa67cbf18b
41 changed files with 24 additions and 869 deletions
-18
View File
@@ -366,24 +366,6 @@ int main(int argc, char **argv) {
#ifndef TW_OEM_BUILD
// Disable flashing of stock recovery
TWFunc::Disable_Stock_Recovery_Replace();
// Check for su to see if the device is rooted or not
if (DataManager::GetIntValue("tw_mount_system_ro") == 0 && PartitionManager.Mount_By_Path("/system", false)) {
// read /system/build.prop to get sdk version and do not offer to root if running M or higher (sdk version 23 == M)
string sdkverstr = TWFunc::System_Property_Get("ro.build.version.sdk");
int sdkver = 23;
if (!sdkverstr.empty()) {
sdkver = atoi(sdkverstr.c_str());
}
if (TWFunc::Path_Exists("/supersu/su") && TWFunc::Path_Exists("/system/bin") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su") && sdkver < 23) {
// Device doesn't have su installed
DataManager::SetValue("tw_busy", 1);
if (gui_startPage("installsu", 1, 1) != 0) {
LOGERR("Failed to start SuperSU install page.\n");
}
}
sync();
PartitionManager.UnMount_By_Path("/system", false);
}
#endif
// Reboot