public boolean detectRootCloakingApps ( String [ ] additionalRootCloakingApps ) { // Create a list of package names to iterate over from constants any others provided ArrayList < String > packages = new ArrayList <> ( Arrays . asList ( Const . knownRootCloakingPackages ) ) ; if ( additionalRootCloakingApps != null && additionalRootCloakingApps . length > 0 ) { packages . addAll ( Arrays . asList ( additionalRootCloakingApps ) ) ; } return isAnyPackageFromListInstalled ( packages ) ; }
Using the PackageManager check for a list of well known root cloak apps .