DEV Community

Cover image for How to Detect Rooted or Jailbroken Devices in Flutter Using mobile_root_checker Plugin
Mehmet ร‡elik
Mehmet ร‡elik

Posted on

How to Detect Rooted or Jailbroken Devices in Flutter Using mobile_root_checker Plugin

Detect Rooted or Jailbroken Devices in Flutter with mobile_root_checker ๐Ÿ”

In today's mobile world, app security is more crucial than ever. If your app handles sensitive data โ€” whether it's finance, health, or private communication โ€” allowing it to run on rooted (Android) or jailbroken (iOS) devices can open the door to vulnerabilities.

That's why I built mobile_root_checker, a Flutter plugin to help you detect rooted or jailbroken devices before they can harm your app integrity.


๐Ÿ” What is Root/Jailbreak Detection?

  • Rooted devices on Android and jailbroken devices on iOS have elevated privileges, allowing users (or malicious apps) to bypass OS-level protections.
  • This can lead to:
    • Code injection
    • Man-in-the-middle attacks
    • Data theft
    • Insecure app modifications

๐Ÿš€ Introducing: mobile_root_checker

mobile_root_checker is a lightweight and open-source Flutter plugin to detect root/jailbreak status at runtime.

โœ… Features

  • Detect rooted Android devices
  • Detect jailbroken iOS devices
  • Easy Flutter integration (no native code required)
  • Supports all major Android and iOS versions

๐Ÿ“ฆ Installation

Add the dependency to your pubspec.yaml:

dependencies:
  mobile_root_checker: ^1.0.0

Then run:

flutter pub get

Enter fullscreen mode Exit fullscreen mode

import 'package:mobile_root_checker/mobile_root_checker.dart';

void main() async {
final isRooted = await RootChecker.isDeviceRooted();

if (isRooted) {
print("โš ๏ธ Device is rooted or jailbroken!");
// Block or restrict app functionality here
} else {
print("โœ… Device is secure.");
}
}



๐Ÿ“ฑUse Cases
| App Type             | Why Use Root Detection?                |
| -------------------- | -------------------------------------- |
| ๐Ÿ’ณ Banking / Finance | Prevent fraud or memory tampering      |
| ๐Ÿ” Messaging         | Stop interception or app modifications |
| ๐ŸŽฎ Games             | Avoid cheating via rooted tools        |
| ๐Ÿข Enterprise Apps   | Protect internal company data          |

โš™๏ธ How It Works

On Android:

    Looks for su binary

    Checks common root management apps

    Scans system properties and execution paths

On iOS:

    Detects jailbreak indicators like Cydia

    Probes system directories and access violations

๐Ÿ”— Resources

    ๐Ÿ“ฆ Pub.dev: mobile_root_checker

    ๐Ÿ’ป GitHub: github.com/CelkMehmett/mobile_root_checker

๐Ÿค Contributions Welcome

I'm open to issues, suggestions, and PRs!
Future roadmap ideas:

    โœ… Emulator detection

    โœ… SafetyNet / DeviceCheck integration

    โœ… Web & Desktop fallbacks (no-op)

๐Ÿ“„ License

Licensed under the MIT License โ€” free to use, modify, and share.
๐Ÿ‘‹ Final Words

Mobile security isn't a luxury โ€” it's a necessity.
Add root/jailbreak detection today and protect your app tomorrow.

Letโ€™s build safer Flutter apps together! ๐Ÿ”โœจ

Enter fullscreen mode Exit fullscreen mode

Top comments (0)