https://github.com/anish-adm/trust_fall
A Flutter plugin for detecting the trust fall of the device(Jailbroken, root, emulator and mock location detection).
https://github.com/anish-adm/trust_fall
circleoftrust emulator-detector flutter jailbreak mock-location root-detection simulator-detector
Last synced: 11 months ago
JSON representation
A Flutter plugin for detecting the trust fall of the device(Jailbroken, root, emulator and mock location detection).
- Host: GitHub
- URL: https://github.com/anish-adm/trust_fall
- Owner: anish-adm
- License: mit
- Created: 2019-03-24T16:39:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-15T19:03:52.000Z (almost 5 years ago)
- Last Synced: 2025-06-08T19:04:16.986Z (about 1 year ago)
- Topics: circleoftrust, emulator-detector, flutter, jailbreak, mock-location, root-detection, simulator-detector
- Language: Java
- Homepage: https://pub.dartlang.org/packages/trust_fall
- Size: 183 KB
- Stars: 38
- Watchers: 1
- Forks: 42
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# trust_fall
A Flutter plugin for detecting the trust fall of the device(Jailbroken, root, emulator and mock location detection).
Uses [RootBeer](https://github.com/scottyab/rootbeer) for Android root detection and [DTTJailbreakDetection](https://github.com/thii/DTTJailbreakDetection) for iOS jailbreak detection.
Inspired by [jail-monkey](https://github.com/GantMan/jail-monkey) and [this blog article](http://blog.geomoby.com/2015/01/25/how-to-avoid-getting-your-location-based-app-spoofed/)
## Getting Started
In your flutter project add the dependency:
```yml
dependencies:
...
trust_fall: ^1.0.4
```
## Usage
#### Importing package
```
import 'package:trust_fall/trust_fall.dart';
```
#### Using it
Checks whether device JailBroken on iOS/Android?
```
bool isJailBroken = await TrustFall.isJailBroken;
```
Checks whether device is real or emulator
```
bool isRealDevice = await TrustFall.isRealDevice;
```
Can this device mock location - no need to root!
```
bool canMockLocation = await TrustFall.canMockLocation;
```
(ANDROID ONLY) Check if application is running on external storage
```
bool isOnExternalStorage = await TrustFall.isOnExternalStorage;
```
Check if device violates any of the above
```
bool isTrustFall = await TrustFall.isTrustFall;
```
# Note:
#### Mock location detection
* **Android** - Location permission needs to be granted in app in order to detect mock location properly
* **iOS** - For now we are checking if device is Jail Broken or if it's not real device. There is no strong detection of mock location in iOS *(Open the PR if you have better way for mock location detection in iOS)*
## ❗Since emulators are usually rooted, you might want to bypass these checks during development. Unless you're keen on constant false alarms ⏰