• Stars
    star
    567
  • Rank 78,634 (Top 2 %)
  • Language
    Java
  • License
    MIT License
  • Created over 8 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A React Native library for identifying if a phone is rooted or mocking locations

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

Jail Monkey

Version Downloads

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'

if (JailMonkey.isJailBroken()) {
  // Alternative behaviour for jail-broken/rooted devices.
}

Circle of Trust

API

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.

iOS Only APIs

Method Returns Description
jailBrokenMessage string Returns the reason for jailbroken detection. Will return an empty string on Android.

Android Only APIs

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.

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 # 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

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/

More Repositories

1

ReactStateMuseum

A whirlwind tour of React state management systems by example
JavaScript
1,522
star
2

nsfw_model

Keras model of NSFW detector
Python
1,297
star
3

react-native-siren

The React Native port of the popular Siren / Harpy Pod and hopefully Gradle
JavaScript
156
star
4

learn-tfjs

The code for the book Learning TensorFlow.js by Gant Laborde - Published by O'Reilly Media
HTML
139
star
5

drawer-example

Demonstrating the react-navigation drawer for my blog post on medium
JavaScript
124
star
6

rps_tfjs_demo

Training a Rock Paper Scissors model in the browser via TFJS - Learn along style
JavaScript
86
star
7

fun-machine-learing

The most interesting and fun machine learning links!
71
star
8

nicornot

Using machine learning to identify if someone is Nic Cage or not
JavaScript
62
star
9

tictactoe-ai-tfjs

Train your own TensorFlow.js Tic Tac Toe
JavaScript
50
star
10

enjoytheshow

Real-time facial expression gathering
JavaScript
35
star
11

mobile-commander

A collection of useful React Native commands
Shell
33
star
12

Public_Speaking_Hits

A Helpful list of quick and useful public speaking lines
31
star
13

RedAlert

iOS Alerts and ActionSheets with ease
Ruby
24
star
14

motion-egg

Awesome little gem to add an easter egg to your RubyMotion app
Ruby
23
star
15

PackingPeanut

App persistent data for RubyMotion Android
Ruby
21
star
16

RNImagePreview

Using a simple cocoapod for image previews in React Native
Objective-C
15
star
17

WaveFun

Just messing around with React Native animation
JavaScript
15
star
18

tfjs-runway

Packages tfjs models for shipping with websites
TypeScript
14
star
19

yesyoucam

BluePotion Camera Library
Ruby
11
star
20

useless-things

The abandoned storage space of things that should have never been
JavaScript
9
star
21

ReactNative_MNIST

React Native implementation of the MNIST model in BrainJS
Objective-C
9
star
22

Food101

Machine Learning with React Native to identify food
Objective-C
8
star
23

ReactNativeGraphQLExample

I said I'd make it. Here's my GraphQL React Native Example
8
star
24

GantMan

My profile readme
7
star
25

home_splash

Simple beginner's Rails project to help illustrate some basics.
Ruby
6
star
26

TensorFlow-Data-and-Deployment-Specialization

Jupyter Notebook
6
star
27

rn-textables

A react native version of Textables
JavaScript
6
star
28

ignite-source-map

A CLI to parse source-map files and stack traces into usable output
JavaScript
5
star
29

timewarp

The timewarp filter with TensorFlow.js
HTML
5
star
30

RubyMotion-Intro

Presentation of Intro to RubyMotion
Ruby
5
star
31

RN_TF_Lite

React Native Tensorflow Lite - Code and example
Objective-C
4
star
32

over-armour

Rage Against the Crash
JavaScript
4
star
33

irrigate

Yeoman generator for Infinite Red app structure
JavaScript
4
star
34

ignite-redux-logger

Ignite plugin for redux-logger
JavaScript
4
star
35

WinGif

The delights of a gif on React Native Windows
C#
4
star
36

WackAMole

Basics for teaching components, flatlist, and animation
JavaScript
4
star
37

contact_solution

Contact Solution is your refreshing prescription for RubyMotion Android contacts data.
Ruby
3
star
38

packlist-components

Components for React Museum Apps - separated for clarity
JavaScript
3
star
39

workshop-app

Basic workshop app (agenda/conf)
JavaScript
3
star
40

solidarity-envinfo

Create and enforce envInfo results with Solidarity
JavaScript
3
star
41

wrong_way

Checking for people going the wrong way - uses AI-LAB and React
JavaScript
3
star
42

quickmirrorme

A simple website that is a webcam mirror
JavaScript
3
star
43

reform

Server for Proselyte model conversions
JavaScript
2
star
44

blightcam

Detect people or vehicles on blighted property - Demo
JavaScript
2
star
45

cryptex

Fun idea with blaze pose. Might finish it, might not.
HTML
2
star
46

ML_Octave

Octave/Matlab code for Machine Learning Exercises
MATLAB
2
star
47

CoffeeBoard

Sinatra project for my Raspberry Pi
Ruby
2
star
48

Pneumonia-classifier

99% accurate pneumonia classifier
Jupyter Notebook
2
star
49

multiverse

Snapshot builds of React apps and host them in folders
JavaScript
2
star
50

RSM-Context

Created with CodeSandbox
JavaScript
1
star
51

HuntClue

There are two errors in this React Native app that stop it from working
Java
1
star
52

ai_sort

Use AI to sort you into your house
HTML
1
star
53

rm-loop-speed

Testing loop speeds in RubyMotion
Ruby
1
star
54

simple-tfjs-transfer

Mobilenet with K-nearest-neighbors classifier transfer learning example
JavaScript
1
star
55

GreenRune

Website to Generate Greenrune Glyphs
JavaScript
1
star
56

adventure-bingo

Simple adventure-bingo game.
Ruby
1
star
57

BasicAppSyncExample

Using AWS AppSync
JavaScript
1
star
58

Siraj-week3-hw

Solution to week 3 homework
Jupyter Notebook
1
star
59

HelloWorld

The good old "Hello World" application for RubyMotion
Ruby
1
star
60

JQueryUI-Days-From-Now

Add number of days from now display with any jQuery UI datepicker.
1
star
61

crawfish

Simple RN app for finding crawfish prices near you.
JavaScript
1
star
62

model-convert

yup
JavaScript
1
star
63

transfer_trek

JavaScript
1
star
64

MachineLearningTraining

Notebooks for Fun ML by Gant
Jupyter Notebook
1
star
65

socialboard

The web app for the SocialBoard.io site
Ruby
1
star
66

tts_ruby

Ruby stuff from Tech Talent South Fulltime Class
Ruby
1
star
67

riddikulus

Sort drawings into their Hogwarts house
Jupyter Notebook
1
star
68

10-20-30-Running

RubyMotion source for 10-20-30 running app
Ruby
1
star
69

RSM-graphql-appsync

Created with CodeSandbox
JavaScript
1
star
70

furry_destroyer

A flash game I made 10+ years ago, still funny
ActionScript
1
star
71

greenrune_lab

Build your own Greenrune images in this WYSIWYG
CSS
1
star
72

basics

React Native Basics
JavaScript
1
star
73

Fashion-GAN

Create Fashion GAN from FASHION-MNIST
Jupyter Notebook
1
star