[Android] Android code to determine whether the access permissions (ROOT two)

[Android]Whether the Android code access permissions to determine ROOT

Method is simple, direct and stickup code


   /**
     * Determine the current mobile phone have ROOT permissions
     * @return
     */
    public boolean isRoot(){
        boolean bool = false;

        try{
            if ((!new File("/system/bin/su").exists()) && (!new File("/system/xbin/su").exists())){
                bool = false;
            } else {
                bool = true;
            }
            Log.d(TAG, "bool = " + bool);
        } catch (Exception e) {
} return bool; }

This paper from the Ray-Ray blog

This paper addresses

Thank you for your recommendation and collection

Your support of our power!!

Posted by Julian at November 23, 2013 - 12:34 AM