root_detector 0.0.4
root_detector: ^0.0.4 copied to clipboard
A new flutter plugin project.
Root Detector #
A simple library to check root access in device.
These are the current checks/tricks we are using to give an indication of root.
- isRoot
- isRootedWithBusyBox (only Android)
Setup #
Android #
No action for setup in Android section.
IOS #
Add "Cydia" in LSApplicationQueriesSchemes key of info.plist. Otherwise canOpenURL will always return false.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>cydia</string>
</array>
Usage #
The first step you need to install this dependency into pubspec.yaml in your Flutter project.
dependencies:
root_detector: // recommended to use lastest version
checkIsRoot #
try {
final result = await RootDetector.isRooted; // type data is bool
return result;
} on PlatformException catch(e){
// TODO: handling your error, whenever have error from native code
}
isRootedWithBusyBox #
try {
final result = await RootDetector.isRootedWithBusyBox; // type data is bool
return result;
} on PlatformException catch(e){
// TODO: handling your error, whenever have error from native code
}