Search packages, repositories and app categories

Package detailsv1.0.4

root_access

Flutter plugin to request root access in Android device. This plugin is Android exclusive only.

Android
30-day downloads
112
Likes
19
Pub points
160

Install package

flutter pub add root_access

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The root_access package is a Flutter plugin designed exclusively for Android devices, enabling apps to request and manage root access. It provides a straightforward interface to check root status and initiate root access requests through system-level interactions. This plugin is ideal for advanced Android applications requiring elevated permissions for tasks like system modifications, file access, or device customization. Since it's Android-only, it does not support iOS. Developers should be aware of the security implications and user consent requirements when using root privileges.

Use cases

  • System-level file operations
  • Device customization tools
  • Advanced app management
  • Root-dependent utilities
  • Security testing

Key features

  • Android-only compatibility
  • Simple root access request API
  • Root status checking
  • Native Android integration
  • Secure permission handling

Suitable for

  • Developers building advanced Android apps
  • Tools requiring system-level access
  • Apps for rooted device management
  • Custom ROM utilities
  • System diagnostics

Considerations

  • Requires Android device with root access
  • Limited to Android platform
  • User must manually grant root permissions
  • Potential security risks
  • Not suitable for production apps without proper safeguards

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

pub package Tests

Root access Plugin

A Flutter plugin for requesting root access in Android apps.

This plugin is based on RootTools by Stericson.
This plugin is only for Android platform.

Usage

Import the root_access plugin

Follow the plugin installation instructions.

Use the plugin
import 'package:root_access/root_access.dart';

Define a bool variable and assign a value

bool _rootStatus = false;

The RootAccess class provides a getter to get root access and status

bool rootStatus = await RootAccess.requestRootAccess;

Declare an async method to retrieve root access

Future<void> initRootRequest() async {
    bool rootStatus = await RootAccess.requestRootAccess;
    setState(() {
      _rootStatus = rootStatus;
    });
  }

Later you can use _rootStatus in your code to let app know the status of root access. If it's false then root access is not granted in access prompt dialog and if it's true then root access has been granted to the app.

Example

See the example application source for a complete sample app using the Root Access plugin.

Issues and feedback

Please file issues to send feedback or report a bug. Thank you!

Categories

Source repository

Projects using this package

No data available yet.