Skip to content

Simple library to check device is rooted or not in Flutter

License

Notifications You must be signed in to change notification settings

mz185/root_detector

 
 

Repository files navigation

Root Detector

A library to check devices using root access or simply root/jailbreak checking.

These are the current checks/tricks we are using to give an indication of root.

And there are some parameters when checking root:

Params Description
busyBox By default busyBox is false, And when the value is true then it checks root with busyBox which is usually used on some android devices
ignoreSimulator By default ignoreSimulator is false , And when the value is true then it checks root with busyBox which is usually used on some android devices

Setup

  • Android

No config needed on Android

  • iOS

Add this code in the Info.plist file whose position is in the /ios/Runner/ folder

<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(
   busyBox: true, // by default is false
   ignoreSimulator: true, // by default is false
 ); // type data is bool
 return result;
} on PlatformException catch(e){
  // TODO: handling your error, whenever have error from native code
}

More example in github.

Credit

About

Simple library to check device is rooted or not in Flutter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 28.1%
  • Swift 27.4%
  • Kotlin 27.3%
  • Ruby 13.0%
  • Objective-C 4.2%