commit c23c7b52174adf21af5c121c05b4de56d33cb167 Author: Nathan Freitas nathan@freitas.net Date: Fri Jan 13 19:02:55 2012 -0500
added multiple root-detect options --- .../android/service/TorServiceUtils.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/org/torproject/android/service/TorServiceUtils.java b/src/org/torproject/android/service/TorServiceUtils.java index fa27c58..faf7989 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"};