NativeScript-Jailbreak-Detector
A Nativescript plugin that makes detection of root and jailbreak hassle free.
Contributors
Supported Platforms
- iOS
- Android
Installation
tns plugin add nativescript-jailbreak-detector
iOS
Does not need any configuration.
Android
Does not need any configuration.
Usage
Typescript
;if new JailbreakDetector.isRooted
iOS
JailbreakDetector
contains isJailBroken()
method for IOS.
;;; if isIOS && new JailbreakDetector.isJailBroken
Note: isRooted() will call isJailBroken() internally for IOS devices so there is no need to check for platform before using isRooted() even on IOS.
Android
This plugin uses rootbeer package to find out is the device is rooted or not. Hence it exposes all the other helper methods too.
;; // All the available methodsjailDetector.isRooted;jailDetector.checkForBusyBoxBinary;jailDetector.checkForDangerousProps;jailDetector.checkForMagiskBinary;jailDetector.checkForRootNative;jailDetector.checkForRWPaths;jailDetector.checkForSuBinary;jailDetector.checkSuExists;jailDetector.detectPotentiallyDangerousApps;jailDetector.detectRootCloakingApps;jailDetector.detectRootManagementApps;jailDetector.detectTestKeys;jailDetector.isRootedOrBusyboxInstalled;jailDetector.isSelinuxFlagInEnabled;
Demo
# install required dependencies for demo and cd src && npm run postclone# iOS npm run demo.ios# Android npm run demo.android