搜索插件、代码仓与 APP 分类

插件详情v1.0.4

root_access

Flutter 插件,用于在 Android 设备上请求 root 权限。此插件仅适用于 Android。

Android
近 30 天下载
112
喜欢数
19
Pub 分数
160

安装插件

flutter pub add root_access

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

root_access 包是一个专为 Android 设备设计的 Flutter 插件,可让应用程序请求并管理 root 访问权限。它提供了一个简单的接口来检查 root 状态,并通过系统级交互启动 root 访问请求。该插件非常适合需要提升权限以执行系统修改、文件访问或设备自定义等任务的高级 Android 应用程序。由于仅支持 Android,因此不支持 iOS。开发者在使用 root 权限时应了解安全影响以及用户同意的要求。

适合场景

  • 系统级文件操作
  • 设备自定义工具
  • 高级应用管理
  • 依赖根的实用工具
  • 安全测试

主要特点

  • 仅限 Android 的兼容性
  • 简单的根访问请求 API
  • 根状态检查
  • 原生 Android 集成
  • 安全的权限处理

适合对象

  • 开发高级 Android 应用的开发者
  • 需要系统级访问权限的工具
  • 用于已root设备管理的应用程序
  • 自定义ROM工具
  • 系统诊断

使用建议

  • 需要具有 root 访问权限的 Android 设备
  • 仅限 Android 平台
  • 用户必须手动授予根权限
  • 潜在的安全风险
  • 在没有适当防护措施的情况下,不适用于生产应用

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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!

所属分类

源码仓库

使用此插件的项目

暂无相关数据。