[BREAKGLASS] A React Native library for identifying if a phone is rooted or mocking locations
Go to file
2020-11-24 10:08:30 +11:00
_art optimized images 2016-10-18 11:08:19 -05:00
android Upgrade rootbeer package to latest (0.0.8) 2020-11-10 12:30:15 +11:00
ExampleProject optimized images 2016-10-18 11:08:19 -05:00
JailMonkey Update JailMonkey.m 2020-10-21 16:16:12 -03:00
JailMonkey.xcodeproj code moved to static lib 2016-07-20 10:08:20 -05:00
.gitignore Improvement in general 2019-07-25 10:13:12 -04:00
.npmignore create npm ignore file 2016-09-25 17:57:50 -05:00
index.js Merge branch 'master' into feature/isDebugged 2019-03-15 08:34:10 +01:00
jail-monkey.podspec Use correct React dependency in podspec 2020-11-24 10:08:30 +11:00
jailmonkey.d.ts Correct types for those calls that refer to a method that returns a boolean rather than a promise 2020-06-09 15:49:02 +10:00
jailmonkey.js Improvement in general 2019-07-25 10:13:12 -04:00
jailmonkey.js.flow Correct types for those calls that refer to a method that returns a boolean rather than a promise 2020-06-09 15:49:02 +10:00
LICENSE Create LICENSE 2017-08-11 14:09:15 -05:00
package.json v2.3.3 2020-09-24 15:39:22 +10:00
README.md Upgrade rootbeer package to latest (0.0.8) 2020-11-10 12:30:15 +11:00
yarn.lock Bump minimist from 1.2.0 to 1.2.5 2020-09-24 04:47:13 +00:00

WARNING: I don't have the devices to test anymore, so testing is done by those submitting PRs bona fide.

Jail Monkey

Can you ever really trust a phone?

Why?

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:

  • Identify if a phone has been jail-broken or rooted for iOS/Android.
  • Detect mocked locations for phones set in "developer mode".
  • (ANDROID ONLY) Detect if the application is running on external storage such as an SD card.

Use

import JailMonkey from 'jail-monkey'

// is this device JailBroken on iOS/Android?
JailMonkey.isJailBroken()

// Can this device mock location - no need to root!
JailMonkey.canMockLocation()

// Check if device violates any of the above
JailMonkey.trustFall()

// (ANDROID ONLY) Check if application is running on external storage
JailMonkey.isOnExternalStorage()

// (ANDROID ONLY) Check if the phone has some malicious apps installed
JailMonkey.hookDetected()

// Check if the application is running in debug mode
JailMonkey.isDebugged()

Circle of Trust

Since emulators are usually rooted, you might want to bypass these checks during development. Unless you're keen on constant false alarms

Install

npm i jail-monkey --save
react-native link

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

Additional Info

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/