Legal Device

A Flutter plugin for detecting the legality of the device(Jailbroken, root, emulator).

Getting Started

In your flutter project add the dependency:

  legal_device: ^1.0.5


Importing package

import 'package:legal_device/legal_device.dart';

Using it

Checks whether device JailBroken on iOS/Android?

bool isJailBroken = await legalDevice.isJailBroken;

Checks whether device is real or emulator

bool isRealDevice = await legalDevice.isRealDevice;

(ANDROID ONLY) Check if application is running on external storage

bool isOnExternalStorage = await legalDevice.isOnExternalStorage;

Check if device violates any of the above

bool isLegalDevice = await legalDevice.isLegalDevice;

❗Since emulators are usually rooted, you might want to bypass these checks during development. Unless you're keen on constant false alarms ⏰