Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 2.25 KB

README.md

File metadata and controls

55 lines (37 loc) · 2.25 KB

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: