arg0 is never used in the native code, undocumented and breaks the documented usage.
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