Class PermissionDetector

  • All Implemented Interfaces:
    RootDetector

    public class PermissionDetector
    extends java.lang.Object
    implements RootDetector
    After the device is rooted, the super user may change permission of some files.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] NOT_WRITABLE_PATH  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double isRooted​(android.content.Context context)
      Detect the device is rooted.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NOT_WRITABLE_PATH

        public static final java.lang.String[] NOT_WRITABLE_PATH
    • Constructor Detail

      • PermissionDetector

        public PermissionDetector()
    • Method Detail

      • isRooted

        public double isRooted​(android.content.Context context)
        Description copied from interface: RootDetector
        Detect the device is rooted.
        Specified by:
        isRooted in interface RootDetector
        Parameters:
        context - The application context
        Returns:
        0 - 1 How likely the device is rooted, 0 - not likely, 0.5 - likely, 1 - Very likely