Use this plugin to check if the android device running the app is rooted.
cordova plugin add https://github.com/trykovyura/cordova-plugin-root-detection.git
rootdetection.isDeviceRooted(successCallback, failureCallback);
successCallback
failureCallback
Android only.
MIT License