summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2018-07-20 19:22:33 +0200
committerEthan Yonker <dees_troy@teamw.in>2018-07-20 20:45:16 +0200
commitfa67cbf18bc43ff8cda34b91acdb43feb1214777 (patch)
tree651c1743cda4e2787cd08b15fea839b30c42fe46 /twrp.cpp
parent3.2.2 (diff)
downloadandroid_bootable_recovery-fa67cbf18bc43ff8cda34b91acdb43feb1214777.tar
android_bootable_recovery-fa67cbf18bc43ff8cda34b91acdb43feb1214777.tar.gz
android_bootable_recovery-fa67cbf18bc43ff8cda34b91acdb43feb1214777.tar.bz2
android_bootable_recovery-fa67cbf18bc43ff8cda34b91acdb43feb1214777.tar.lz
android_bootable_recovery-fa67cbf18bc43ff8cda34b91acdb43feb1214777.tar.xz
android_bootable_recovery-fa67cbf18bc43ff8cda34b91acdb43feb1214777.tar.zst
android_bootable_recovery-fa67cbf18bc43ff8cda34b91acdb43feb1214777.zip
Diffstat (limited to 'twrp.cpp')
-rw-r--r--twrp.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/twrp.cpp b/twrp.cpp
index c46d6555d..c6b9fda7f 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -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