Android examples for Android OS:Root
check Root Method
//package com.java2s; import java.io.File; public class Main { private static boolean checkRootMethod2() { String[] paths = { "/system/app/Superuser.apk", "/sbin/su", "/system/bin/su", "/system/xbin/su", "/data/local/xbin/su", "/data/local/bin/su", "/system/sd/xbin/su", "/system/bin/failsafe/su", "/data/local/su", "/su", "/su/bin/su", "/su/xbin/su" }; for (String path : paths) { if (new File(path).exists()) return true; }/*from w w w . ja va 2s .c o m*/ return false; } }