
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
jail-monkey
Advanced tools
A React Native module for identifying jail-broken, rooted, or mock locations on iOS and Android
Are users claiming they are crossing the globe in seconds and collecting all the Pokeballs? Some apps need to protect themselves in order to protect data integrity. JailMonkey allows you to:
import JailMonkey from 'jail-monkey'
if (JailMonkey.isJailBroken()) {
// Alternative behaviour for jail-broken/rooted devices.
}
Method | Returns | Description |
---|---|---|
isJailBroken | boolean | is this device jail-broken/rooted. |
canMockLocation | boolean | Can this device fake its GPS location. |
trustFall | boolean | Checks if the device violates either isJailBroken or canMockLocation . |
isDebuggedMode | Promise<boolean> | Is the application is running in debug mode. Note that this method returns a Promise. |
Method | Returns | Description |
---|---|---|
jailBrokenMessage | string | Returns the reason for jailbroken detection. Will return an empty string on Android. |
Method | Returns | Description |
---|---|---|
hookDetected | boolean | Detects if there is any suspicious installed applications. |
isOnExternalStorage | boolean | Is the application running on external storage (ie. SD Card) |
AdbEnabled | boolean | Is Android Debug Bridge enabled. |
isDevelopmentSettingsMode | Promise<boolean> | Whether user has enabled development settings on their device. Note that this method returns a Promise. |
androidRootedDetectionMethods | RootedDetectionMethods | Returns an object with the results of all the Android rooted detection methods for more granular detection, this can be helpful if some devices are giving false positives. |
type RootedDetectionMethods = {
rootBeer: {
detectRootManagementApps: boolean;
detectPotentiallyDangerousApps: boolean;
checkForSuBinary: boolean;
checkForDangerousProps: boolean;
checkForRWPaths: boolean;
detectTestKeys: boolean;
checkSuExists: boolean;
checkForRootNative: boolean;
checkForMagiskBinary: boolean;
},
jailMonkey: boolean;
}
On iOS all of the Android only methods will return false
or Promise<false>
where appropriate.
npm i jail-monkey --save
react-native link # Not required as of React Native 0.60.0
for iOS:
cd ios && pod install
If you use rnpm
, you may have trouble as rnpm
does not link Android properly after 0.29.0!
Note: On Android you should include location.isFromMockProvider()
from your location provider to compliment JailMonkey.canMockLocation()
. Most react-native location libraries already have this check built in
This has been made public to help keep it up to date. As detection measures get better or out-dated, please send updates to this project so it can be the best method of detection.
Special thanks to this fantastic blog article: http://blog.geomoby.com/2015/01/25/how-to-avoid-getting-your-location-based-app-spoofed/
FAQs
A React Native module for identifying jail-broken, rooted, or mock locations on iOS and Android
The npm package jail-monkey receives a total of 38,611 weekly downloads. As such, jail-monkey popularity was classified as popular.
We found that jail-monkey demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.