RootBeer - Root Detection Library for Android
A tasty root checker library and sample app. We've scoured the internets for different methods of answering that age old question... Has this device got root?
A tasty root checker library and sample app. We've scoured the internets for different methods of answering that age old question... Has this device got root?
RootBeer is an open source root detection library for android developed by Scott and myself, it is currently used by thousand of android apps including many banking applications.
Use Cases
While some people can get very heated about it, sometimes you simply just need to know if the device you're running on is rooted device. This can include the following use cases:
- Disabling applications
- Protecting & deleting IP / sensitive information
- Offering additional functionality
Usage
Using rootbeer is simple, simply add the library to your project using either maven or jitpack.
dependencies {
implementation 'com.scottyab:rootbeer-lib:0.0.8'
}
Then you can use the very user friendly methods we created in order to detect if a device is rooted. For more information please view the readme.
RootBeer rootBeer = new RootBeer(context);
if (rootBeer.isRooted()) {
//we found indication of root
} else {
//we didn't find indication of root
}
Sample Application
A sample application is available on the Google Play Store that can be used to test the root detection:
And here it is in action:
Feedback
Scott and I both welcome feedback, and we're espeiclaly grateful if you can submit a pull request with any code changes you have. If you wish to raise any issues or please do so via github.