You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bool _status = false;
Future<void> checkRoot() async {
bool result = await Root.isRooted();
setState(() {
_status = result;
});
}
later you can use _status in your code to let app know the root status.
Declare a async method to check Su on System
bool _status = false;
Future<void> checkRoot() async {
bool result = await Root.isRootAvailable();
setState(() {
_status = result;
});
}
later you can use _status in your code to let app know the root status.
Declare a async method to run shell commands
use this function only for short period of processes, don't use for long processes else app may crash
String _result;
Future<void> setCommand() async {
String res = await Root.exec(cmd: "cat /proc/version");
setState(() {
_result = res;
});
}
later you can use the _result in your code to let know the output of the given shell command.