Cordova Jailbreak/Root Detection Plugin for Apache Cordova

Usage no npm install needed!

<script type="module">
  import cordovaPluginEbwIroot from '';


version Android iOS License BuyMeCoffee

Cordova Jailbreak/Root Detection Plugin

Use this plugin to add an extra layer of security for your app by detecting if the device was rooted (on android) or jailbreaked (on iOS).


cordova plugin add cordova-plugin-ebw-iroot



To avoid errors like

-canOpenURL: failed for URL: "cydia://package/com.example.package" - error: "This app is not allowed to query for scheme cydia"

don’t forget to add "cydia" in LSApplicationQueriesSchemes key of info.plist. Otherwise canOpenURL will always return false.


Usage in Javascript

// available => iOS + Android
IRoot.isRooted(successCallback, failureCallback);

// available => Android
IRoot.isRootedWithBusyBox(successCallback, failureCallback);
  • successCallback(result:boolean) is called with true if the device is Jailbroken/rooted, otherwise false.
  • failureCallback(error:string) is called if there was an error determining if the device is Jailbroken/rooted.


Based on:


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


  1. Cyanogenmod.superuser

If the Cyanogenmod ROM is installed, the cyanogenmod.superuser activity may be in the package. This can be detected by listing the activities within

  1. Su

Execute su and then id to check if the current user has a uid of 0 or if it contains (root). shell@android:/ $ su shell@android:/ # id uid=0(root) gid=0(root) groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),1028(sdcard_r)

  1. Busybox

If a device has been rooted, more often then not Busybox has been installed as well. Busybox is a binary that provides many common linux commands. Running Busybox is a good indication that a device has been rooted. root@android:/ # busybox df Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 958500 32 958468 0% /dev tmpfs 958500 0 958500 0% /mnt/secure tmpfs 958500 0 958500 0% /mnt/asec tmpfs 958500 0 958500 0% /mnt/obb

  1. Check library