Home

Awesome

rootbeer

This repository contains Xamarin.Android bindings for the original rootbeer library.

🔒📌 Note: I highly encourage you to install BreachDetector instead, which will allow you to work in a cross platform way.

Build status NuGet


RootBeer image

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 name="Setup"> Setup </a>

Download the package from NuGet.

Install-Package RootBeer

Root checks

These are the current checks/tricks we are using to give an indication of root.

Code checks

Native checks

We call through to our native root checker to run some of its own checks. Native checks are typically harder to cloak, so some root cloak apps just block the loading of native libraries that contain certain keywords.

Disclaimer and limitations!

Authors love root! both Scott and Mat (the creators and main contributors) use rooted devices. But they appreciate sometimes you might want to have a indication your app is running on a rooted handset. Plus they wanted to see if they could beat the root cloakers. So that's what this library gives you, an indication of root.

Remember root==god, so there's no 100% way to check for root.

<img src="https://raw.githubusercontent.com/scottyab/rootbeer/master/art/rootbeerjesus.png" width=200 />

Root cloakers

The Rootbeer lib shows an indication of root when testing with the following root cloak apps. However Rootbeer is defeated when using a combination of the root cloakers activated at the same time.

Tested cloakers:

Usage

using Com.Scottyab.Rootbeer;

var rootBeer = new 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.

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:

Contributing

Yes please :)

Thanks

Other libraries

If you dig this, you might like:

Licence

This binding library is licensed under MIT.