-
public class RootBeerA simple root checker that gives an *indication* if the device is rooted or not. Disclaimer: **root==god**, so there's no 100% way to check for root.
-
-
Method Summary
Modifier and Type Method Description booleanisRooted()Run all the root detection checks. booleanisRootedWithoutBusyBoxCheck()booleanisRootedWithBusyBoxCheck()Run all the checks including checking for the busybox binary. booleandetectTestKeys()Release-Keys and Test-Keys has to do with how the kernel is signed when it is compiled.Test-Keys means it was signed with a custom key generated by a third-party developer. booleandetectRootManagementApps()Using the PackageManager, check for a list of well known root apps. booleandetectRootManagementApps(Array<String> additionalRootManagementApps)Using the PackageManager, check for a list of well known root apps. booleandetectPotentiallyDangerousApps()Using the PackageManager, check for a list of well known apps that require root. booleandetectPotentiallyDangerousApps(Array<String> additionalDangerousApps)Using the PackageManager, check for a list of well known apps that require root. booleandetectRootCloakingApps()Using the PackageManager, check for a list of well known root cloak apps. booleandetectRootCloakingApps(Array<String> additionalRootCloakingApps)Using the PackageManager, check for a list of well known root cloak apps. booleancheckForSuBinary()Checks various (Const. booleancheckForMagiskBinary()Checks various (Const. booleancheckForBusyBoxBinary()Checks various (Const. booleancheckForBinary(String filename)voidsetLogging(boolean logging)booleancheckForDangerousProps()Checks for several system properties for booleancheckForRWPaths()When you're root you can change the permissions on common system directories, this method checks if any of these patha Const.pathsThatShouldNotBeWritable are writable. booleancheckSuExists()A variation on the checking for SU, this attempts a 'which su' booleancheckForNativeLibraryReadAccess()Checks if device has ReadAccess to the Native LibraryPrecondition: canLoadNativeLibrary() ran before this and returned trueDescription: RootCloak automatically blocks read access to the Native Libraries, howeverallows for them to be loaded into memory. booleancanLoadNativeLibrary()Checks if it is possible to load our native library booleancheckForRootNative()Native checks are often harder to cloak/trick so here we call through to our native root checker -
-
Constructor Detail
-
RootBeer
RootBeer(Context context)
-
-
Method Detail
-
isRooted
boolean isRooted()
Run all the root detection checks.
-
isRootedWithoutBusyBoxCheck
@Deprecated() boolean isRootedWithoutBusyBoxCheck()
-
isRootedWithBusyBoxCheck
boolean isRootedWithBusyBoxCheck()
Run all the checks including checking for the busybox binary.Warning: Busybox binary is not always an indication of root, many manufacturers leave thisbinary on production devices
-
detectTestKeys
boolean detectTestKeys()
Release-Keys and Test-Keys has to do with how the kernel is signed when it is compiled.Test-Keys means it was signed with a custom key generated by a third-party developer.
-
detectRootManagementApps
boolean detectRootManagementApps()
Using the PackageManager, check for a list of well known root apps. @link {Const.knownRootAppsPackages}
-
detectRootManagementApps
boolean detectRootManagementApps(Array<String> additionalRootManagementApps)
Using the PackageManager, check for a list of well known root apps. @link {Const.knownRootAppsPackages}
- Parameters:
additionalRootManagementApps- - array of additional packagenames to search for
-
detectPotentiallyDangerousApps
boolean detectPotentiallyDangerousApps()
Using the PackageManager, check for a list of well known apps that require root. @link {Const.knownRootAppsPackages}
-
detectPotentiallyDangerousApps
boolean detectPotentiallyDangerousApps(Array<String> additionalDangerousApps)
Using the PackageManager, check for a list of well known apps that require root. @link {Const.knownRootAppsPackages}
- Parameters:
additionalDangerousApps- - array of additional packagenames to search for
-
detectRootCloakingApps
boolean detectRootCloakingApps()
Using the PackageManager, check for a list of well known root cloak apps. @link {Const.knownRootAppsPackages}and checks for native library read access
-
detectRootCloakingApps
boolean detectRootCloakingApps(Array<String> additionalRootCloakingApps)
Using the PackageManager, check for a list of well known root cloak apps. @link {Const.knownRootAppsPackages}
- Parameters:
additionalRootCloakingApps- - array of additional packagenames to search for
-
checkForSuBinary
boolean checkForSuBinary()
Checks various (Const.suPaths) common locations for the SU binary
-
checkForMagiskBinary
boolean checkForMagiskBinary()
Checks various (Const.suPaths) common locations for the magisk binary (a well know root level program)
-
checkForBusyBoxBinary
boolean checkForBusyBoxBinary()
Checks various (Const.suPaths) common locations for the busybox binary (a well know root level program)
-
checkForBinary
boolean checkForBinary(String filename)
- Parameters:
filename- - check for this existence of this file
-
setLogging
void setLogging(boolean logging)
- Parameters:
logging- - set to true for logging
-
checkForDangerousProps
boolean checkForDangerousProps()
Checks for several system properties for
-
checkForRWPaths
boolean checkForRWPaths()
When you're root you can change the permissions on common system directories, this method checks if any of these patha Const.pathsThatShouldNotBeWritable are writable.
-
checkSuExists
boolean checkSuExists()
A variation on the checking for SU, this attempts a 'which su'
-
checkForNativeLibraryReadAccess
boolean checkForNativeLibraryReadAccess()
Checks if device has ReadAccess to the Native LibraryPrecondition: canLoadNativeLibrary() ran before this and returned trueDescription: RootCloak automatically blocks read access to the Native Libraries, howeverallows for them to be loaded into memory. This check is an indication that RootCloak isinstalled onto the device.
-
canLoadNativeLibrary
boolean canLoadNativeLibrary()
Checks if it is possible to load our native library
-
checkForRootNative
boolean checkForRootNative()
Native checks are often harder to cloak/trick so here we call through to our native root checker
-
-
-
-