Skip to content
A wrapper plugin for rootbeer library. This library is used to detect root on Android Devices.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/android
www
LICENSE
README.md
package.json
plugin.xml

README.md

Cordova RootBeer

This is a simple wrapper plugin for RootBeer library by @scottyab for android. You can access 13 functions of the library.

Link to Scott's library .

Installation

Cordova:

cordova plugin add cordova-plugin-android-rootbeer

Ionic:

ionic cordova plugin add cordova-plugin-android-rootbeer

Functions

Syntax

window.cdvRootBeer.isRooted(successCallback, errorCallback);

Success Callbacks

The responses on successCallbacks are either true or false. NB, these are string values not boolean values. e.g.

window.cdvRootBeer.isRooted(function(res){
// res will be true for rooted device.
// res will be false for non-rooted device.
}, errorCallback)
Methods True False
checkForBusyBoxBinary true false
checkForSuBinary true false
checkSuExists true false
checkForRWPaths true false
checkForDangerousProps true false
checkForRootNative true false
detectRootCloakingApps true false
detectRootManagementApps true false
detectPotentiallyDangerousApps true false
detectTestKeys true false
isSelinuxFlagInEnabled true false
isRooted true false
isRootedWithoutBusyBoxCheck true false

Method Description


checkForBusyBoxBinary: This essentially checks for busybox binary in known locations like /bin , /xbin & /sbin.


checkForSuBinary : Checks for su binary in known locations.


checkSuExists : Checks for native root in a different manner.


checkForRWPaths : Checks if paths are writable . Especially important if you have /system is rw.


checkForDangerousProps: Checks for dangerous props in build. Custom ROMs include some props which enable ease of rooting. Especially ro.debuggable.


checkForRootNative : Yet another root check. Checks for root natively, which is harder against root cloaks.


detectRootCloakingApps : Detects Root cloaking apps like rootcloak, & hide my root .Also Xposed and Substrate which are frameworks which help in cloaking.


detectRootManagementApps: Detects Root management Apps like SuperSU, Superuser (noshufou),Superuser (koush)


detectPotentiallyDangerousApps : Detect apps like Lucky Patcher ,ROM Manager & App Quarantine. The list is quite limited though.


detectTestKeys : Detects if ROM build has test-keys


isSelinuxFlagInEnabled : Checks if SE Linux is Enforcing. Thats it.


isRooted: IsRooted is amalgamation of the methods above.

  • detectRootManagementApps
  • detectPotentiallyDangerousApps
  • checkForSuBinary
  • checkForBusyBoxBinary
  • checkForDangerousProps
  • checkForDangerousProps
  • detectTestKeys
  • checkSuExists
  • checkForRootNative

isRootedWithoutBusyBoxCheck : Same as above , just without busybox check. Some phone manufacturers bundle busybox with their firmware.

Issues

Post the issues related to this library here . Do provide the device details as below.

  • Device name & manufacturer
  • Android version
  • Custom OS version (Lineage , MIUI , Exodus, DU)
You can’t perform that action at this time.