forked from GantMan/jail-monkey
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jailmonkey.js
22 lines (20 loc) · 940 Bytes
/
jailmonkey.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { NativeModules, Platform } from "react-native";
const { JailMonkey } = NativeModules;
export default {
jailBrokenMessage: () => JailMonkey.jailBrokenMessage || "",
isJailBroken: () => JailMonkey.isJailBroken || false,
hookDetected: () => JailMonkey.hookDetected || false,
canMockLocation: () => JailMonkey.canMockLocation || false,
trustFall: () =>
JailMonkey.isJailBroken || JailMonkey.canMockLocation || false,
isOnExternalStorage: () => JailMonkey.isOnExternalStorage || false,
isDebuggedMode: () => JailMonkey.isDebuggedMode(),
isDevelopmentSettingsMode: () => {
// API only available on Android, return false for all other platforms.
if (Platform.OS !== "android") return Promise.resolve(false);
return JailMonkey.isDevelopmentSettingsMode();
},
AdbEnabled: () => JailMonkey.AdbEnabled || false,
getRootedCheckInfoBreakdown: () =>
JailMonkey.getRootedCheckInfoBreakdown || false,
};