Skip to content

Simple to use root checking Android library and sample app

License

Notifications You must be signed in to change notification settings

usefulness/rootbeer

 
 

Repository files navigation

rootbeer

Build Project Maven Central

Usage

val rootBeer = RootBeer(context)
if (rootBeer.isRooted) {
    //we found indication of root
} else {
    //we didn't find indication of root
}

You can also call each of the checks individually as the sample app does. It is advisable to call isRooted() from a background thread as it involves disk I/O.

False positives

Manufacturers often leave the busybox binary in production builds and this doesn't always mean that a device is root. We have removed the busybox check we used to include as standard in the isRooted() method to avoid these false positives.

If you want to detect the busybox binary in your app you can use checkForBinary(BINARY_BUSYBOX) to detect it alone, or as part of the complete root detection method:

rootBeer.isRootedWithBusyBoxCheck();

The following devices are known the have the busybox binary present on the stock rom:

  • All OnePlus Devices
  • Moto E
  • OPPO R9m (ColorOS 3.0,Android 5.1,Android security patch January 5, 2018 )

Dependency

Available on maven central, to include using Gradle just add the following:

dependencies {
    implementation 'io.github.usefulness:rootbeer-core:{{ version }}'
}

Thanks

Other libraries

If you dig this, you might like:

About

Simple to use root checking Android library and sample app

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Kotlin 72.2%
  • C++ 25.8%
  • Other 2.0%