Is there any plugin in Flutter to check if the device is rooted or not. I'm a beginner in Mobile App Development and as far as I know there are some system directories that need to be searched for su binary.
Asked
Active
Viewed 7,666 times
1 Answers
5
There seems to be no plugin for this at this point at https://pub.dartlang.org.
You might be able to create a plugin using native android code and Flutter Platform Channels (Platform Channels -- It's the flexible system used by Flutter that allows you to call platform-specific APIs whether available in Java or Kotlin code on Android, or in ObjectiveC or Swift code on iOS.)
- For native android code to check if the device is rooted : Determine if running on a rooted device
- About Flutter Platform channels : https://flutter.io/platform-channels/
Hope this helps!
-
I will look into it, thanks! – mohdahmed108 Sep 22 '18 at 13:27
-
8There is a package https://pub.dartlang.org/packages/trust_fall – Ammar Hussein Apr 07 '19 at 04:24
-
The problem with `trust_fall` is it is not *null-safe*. Another alternative would be [root_access](https://pub.dev/packages/root_access), but that only works on Android. – Eray Erdin Dec 27 '21 at 20:48