{"id":13724283,"url":"https://github.com/GantMan/jail-monkey","last_synced_at":"2025-05-07T18:30:37.498Z","repository":{"id":38611458,"uuid":"63785877","full_name":"GantMan/jail-monkey","owner":"GantMan","description":"A React Native library for identifying if a phone is rooted or mocking locations","archived":false,"fork":false,"pushed_at":"2025-03-03T04:27:38.000Z","size":3171,"stargazers_count":645,"open_issues_count":57,"forks_count":153,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-06T16:09:55.579Z","etag":null,"topics":["android","jailbreak","mock-locations","react","react-native","trust"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GantMan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-20T13:59:01.000Z","updated_at":"2025-05-04T16:45:42.000Z","dependencies_parsed_at":"2024-04-18T05:24:15.832Z","dependency_job_id":"9414842f-dce4-4309-982e-d8cb1ba4c571","html_url":"https://github.com/GantMan/jail-monkey","commit_stats":{"total_commits":171,"total_committers":42,"mean_commits":4.071428571428571,"dds":0.7543859649122807,"last_synced_commit":"7c2dea62bb5e2704ccc87c906e5ad0c939f04aba"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GantMan%2Fjail-monkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GantMan%2Fjail-monkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GantMan%2Fjail-monkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GantMan%2Fjail-monkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GantMan","download_url":"https://codeload.github.com/GantMan/jail-monkey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252721000,"owners_count":21793745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","jailbreak","mock-locations","react","react-native","trust"],"created_at":"2024-08-03T01:01:53.545Z","updated_at":"2025-05-07T18:30:37.436Z","avatar_url":"https://github.com/GantMan.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# WARNING:  I don't have the devices to test anymore, so testing is done by those submitting PRs bona fide.\n\n![Jail Monkey](./_art/JailMonkey.jpg)\n\n[![Version](https://img.shields.io/npm/v/jail-monkey.svg)](https://www.npmjs.com/package/jail-monkey) [![Downloads](https://img.shields.io/npm/dm/jail-monkey.svg)](https://npmcharts.com/compare/jail-monkey?minimal=true)\n\n## Can you ever really trust a phone?\n\n# Why?\nAre 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:\n* Identify if a phone has been jail-broken or rooted for iOS/Android.\n* Detect mocked locations for phones set in \"developer mode\".\n* **(ANDROID ONLY)** Detect if the application is running on external storage such as an SD card.\n\n# Use\n```javascript\nimport JailMonkey from 'jail-monkey'\n\nif (JailMonkey.isJailBroken()) {\n  // Alternative behaviour for jail-broken/rooted devices.\n}\n```\n\n![Circle of Trust](./_art/trust.jpg)\n\n# API\n\nMethod | Returns | Description\n---|---|---\n`isJailBroken` | `boolean` | is this device jail-broken/rooted.\n`canMockLocation` | `boolean` | Can this device fake its GPS location.\n`trustFall` | `boolean` | Checks if the device violates either `isJailBroken` or `canMockLocation`.\n`isDebuggedMode` | `Promise\u003cboolean\u003e` | Is the application is running in debug mode. Note that this method returns a Promise.\n\n## iOS Only APIs\n\nMethod | Returns | Description\n---|---|---\n`jailBrokenMessage` | `string` | Returns the reason for jailbroken detection. Will return an empty string on Android.\n\n## Android Only APIs\n\nMethod | Returns | Description\n---|---|---\n`hookDetected` | `boolean` | Detects if there is any suspicious installed applications.\n`isOnExternalStorage` | `boolean` | Is the application running on external storage (ie. SD Card)\n`AdbEnabled` | `boolean` | Is Android Debug Bridge enabled.\n`isDevelopmentSettingsMode` | `Promise\u003cboolean\u003e` | Whether user has enabled development settings on their device. Note that this method returns a Promise.\n`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.\n\n```\ntype RootedDetectionMethods = {\n  rootBeer: {\n    detectRootManagementApps: boolean;\n    detectPotentiallyDangerousApps: boolean;\n    checkForSuBinary: boolean;\n    checkForDangerousProps: boolean;\n    checkForRWPaths: boolean;\n    detectTestKeys: boolean;\n    checkSuExists: boolean;\n    checkForRootNative: boolean;\n    checkForMagiskBinary: boolean;\n  },\n  jailMonkey: boolean;\n}\n```\n\nOn iOS all of the Android only methods will return `false` or `Promise\u003cfalse\u003e` where appropriate.\n\n### :exclamation: Since emulators are usually rooted, you might want to bypass these checks during development.  Unless you're keen on constant false alarms :alarm_clock:\n\n# Install\n\n```bash\nnpm i jail-monkey --save\nreact-native link # Not required as of React Native 0.60.0\n```\nfor iOS:\n```bash\ncd ios \u0026\u0026 pod install\n```\n\nIf you use `rnpm`, you may have trouble as `rnpm` does not link Android properly after 0.29.0!\n\nNote: 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\n\n# Additional Info\nThis 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.\n\nSpecial thanks to this fantastic blog article:  http://blog.geomoby.com/2015/01/25/how-to-avoid-getting-your-location-based-app-spoofed/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGantMan%2Fjail-monkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGantMan%2Fjail-monkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGantMan%2Fjail-monkey/lists"}