FLUTTER ECOSYSTEM

anish-adm/trust_fall

一个用于检测设备信任状态的 Flutter 插件(越狱、root、模拟器和伪造位置检测)。

trust_fall 项目封面
Stars
38
Forks
43
最近推送(UTC)
2021年8月15日
项目状态
未归档
Anish GitHub avatar
GITHUB User

Anish ↗

@rollouttechEdmonton
语言JavaDartRubyObjective-C

技术话题

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

trust_fall

A Flutter plugin for detecting the trust fall of the device(Jailbroken, root, emulator and mock location detection).

Uses RootBeer for Android root detection and DTTJailbreakDetection for iOS jailbreak detection. Inspired by jail-monkey and this blog article

Getting Started

In your flutter project add the dependency:

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 ⏰