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
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! ๐โจ
Top comments (0)