From c23c7b52174adf21af5c121c05b4de56d33cb167 Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Fri, 13 Jan 2012 19:02:55 -0500 Subject: [PATCH] added multiple root-detect options --- src/org/torproject/android/service/TorServiceUtils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/torproject/android/service/TorServiceUtils.java b/src/org/torproject/android/service/TorServiceUtils.java index fa27c584..faf7989f 100644 --- a/src/org/torproject/android/service/TorServiceUtils.java +++ b/src/org/torproject/android/service/TorServiceUtils.java @@ -24,7 +24,13 @@ public class TorServiceUtils implements TorServiceConstants { try { // Check if Superuser.apk exists - //File file = new File("/system/app/Superuser.apk"); + File fileSU = new File("/system/app/Superuser.apk"); + if (fileSU.exists()) + return true; + + fileSU = new File("/system/bin/su"); + if (fileSU.exists()) + return true; //Check for 'su' binary String[] cmd = {"which su"};