flutter_root_checker 1.0.1
flutter_root_checker: ^1.0.1 copied to clipboard
An efficient flutter project to detect Android root devices and iOS Jailbreak devices. Prevent bypass with Frida
Flutter Root Checker #
Flutter Root Checker is a simple, elegant, and efficient library designed to detect rooted Android devices and jailbroken iOS devices. By leveraging commonly known files and processes associated with root access and jailbreaks, this library provides reliable detection mechanisms to secure your applications against unauthorized access and malicious tampering.
Key Features #
- Lightweight and Fast: The library performs root/jailbreak detection without impacting app performance.
- Effective Detection: Scans for known root/jailbreak files and processes to identify security risks.
- Bypass Resistance: Helps prevent bypassing by malicious scripts, such as those executed with Frida.
- Cross-Platform: Supports both Android and iOS out of the box.
Installation #
Add the library to your pubspec.yaml
:
dependencies:
flutter_root_checker: ^1.0.0
Run the command:
flutter pub get
Usage #
The library provides two static variables for detecting root or jailbreak status:
FlutterRootChecker.isAndroidRoot
: Detects if the Android device is rooted.
FlutterRootChecker.isIosJailbreak
: Detects if the iOS device is jailbroken.
Example #
import 'package:flutter_root_checker/flutter_root_checker.dart';
void main() {
if (FlutterRootChecker.isAndroidRoot) {
print("Root access detected on this Android device!");
} else if (FlutterRootChecker.isIosJailbreak) {
print("Jailbreak detected on this iOS device!");
} else {
print("Device is secure.");
}
}
Recommendations for Maximum Security #
To ensure your application is more resistant to tampering:
- Enable Code Obfuscation: Use the
--obfuscate
flag when building your application to minimize reverse-engineering risks:
flutter build apk --release --obfuscate --split-debug-info=<output-directory>
flutter build ipa --release --obfuscate --split-debug-info=<output-directory>
This process reduces the readability of your app's code, making it harder for attackers to analyze.
- Combine with Other Security Measures: Use additional security measures such as encrypted storage, secure communication protocols, and runtime integrity checks.
Contributions #
Contributions are welcome! Feel free to submit issues, feature requests, or pull requests to improve the library further.
License #
This project is licensed under the MIT License.
By using Flutter Root Checker, you're taking proactive steps to protect your application and user data from malicious attacks. Stay secure! 💪