diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index 68a8cc40..60ba4598 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -7,8 +7,12 @@ class RootAPI { Future hasRootPermissions() async { try { - bool? isRooted = await Root.isRooted(); - return isRooted != null && isRooted; + bool? isRooted = await Root.isRootAvailable(); + if (isRooted != null && isRooted) { + isRooted = await Root.isRooted(); + return isRooted != null && isRooted; + } + return false; } on Exception { return false; } diff --git a/pubspec.yaml b/pubspec.yaml index d0d23120..de64c8ba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,7 +54,10 @@ dependencies: path_provider: ^2.0.11 permission_handler: ^10.0.0 pull_to_refresh: ^2.0.0 - root: ^2.0.2 + root: + git: + url: https://github.com/gokul1630/root + ref: main share_extend: ^2.0.0 shared_preferences: ^2.0.15 skeletons: ^0.0.3