How to detect rooting and how to request super access in android programatically -


i need know if device rooted or not , want know how l can request super user access. , again want know if have been granted access. plz tell me if possible. grateful...

try this:

    public static boolean isrooted() {     boolean rooted = false;           string binaryname = "su";          string[] places = {"/sbin/", "/system/bin/", "/system/xbin/", "/data/local/xbin/",                 "/data/local/bin/", "/system/sd/xbin/", "/system/bin/failsafe/", "/data/local/"};          (string : places) {             if (new file(where + binaryname).exists()) {                 rooted = true;                 break;             }         }       return rooted; } 

be careful on emulator running, appears rooted device (you can see code above).

if has been useful you, please vote up


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

excel vba - VBA Proxy auto-configuration for http requests -

sql server 2008 - split ssrs expression between 2 words -