搜尋套件、儲存庫與 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!

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。