0.0.8 • Published 2 years ago

cordova-plugin-android-rootbeer v0.0.8

Weekly downloads
26
License
Apache-2.0
Repository
github
Last release
2 years ago

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)
MethodsTrueFalse
checkForBusyBoxBinarytruefalse
checkForSuBinarytruefalse
checkSuExiststruefalse
checkForRWPathstruefalse
checkForDangerousPropstruefalse
checkForRootNativetruefalse
detectRootCloakingAppstruefalse
detectRootManagementAppstruefalse
detectPotentiallyDangerousAppstruefalse
detectTestKeystruefalse
isSelinuxFlagInEnabledtruefalse
isRootedtruefalse
isRootedWithoutBusyBoxChecktruefalse

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)