パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.0.4

root

AndroidデバイスのRoot状態を確認し、Android(のみ)でシェルコマンドを実行するためのFlutterプラグイン。このプラグインは、短時間のプロセスでのみ使用してください。

Android
30日間ダウンロード
1620
いいね数
36
Pub ポイント
150

パッケージをインストール

flutter pub add root

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

ルートパッケージは、Androidデバイスのルート状態を確認し、Androidでのみシェルコマンドを実行できるFlutterプラグインです。デバイスの整合性を検証する、または特定のタスク中にシステムレベルのコマンドを実行するなど、短期間の操作に適しています。このプラグインはネイティブなAndroid機能を利用しており、信頼性の高いルート検出とコマンド実行を提供します。iOSはサポートしていません。開発者は慎重に使用し、パフォーマンスやセキュリティ上の問題を避けるために、短時間のプロセスにのみ使用してください。

用途

  • Androidデバイスがルートされているか確認する
  • Androidで一時的なシェルコマンドを実行する
  • デバイスのセキュリティ状態を確認する
  • システムレベルのスクリプトを一時的に実行しています
  • アプリ起動中にデバイスの整合性を検証する

主な機能

  • Android の root 状態を検出します
  • Androidでシェルコマンドを実行する
  • 短いプロセス向けに軽量
  • ネイティブな Android API を使用します
  • iOS 対応なし

適している対象

  • rootチェックを必要とするAndroid専用アプリ
  • セキュリティに敏感なアプリケーション
  • 一時的なシェルアクセスが必要なツール
  • 開発デバッグユーティリティ
  • デバイス状態の検証を行うアプリ

注意事項

  • Androidでのみ動作します
  • 長時間実行されるプロセスには適していません
  • シェル出力の取り扱いに注意が必要です
  • アクセス制限のあるルート化されていないデバイスでは失敗する可能性があります
  • Android プラットフォームに限定

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

root plugin

CodeFactor

A Flutter Plugin to check Android device Root status and Run shell commands in android(only).
This plugin is based on Topjohnwu libsu and Stericson Root Tools.

Usage

To use this plugin, add root as a dependency in your pubspec.yaml file.
 root: ^2.0.4
import it
import 'package:root/root.dart';
Declare a async method to check root status
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.
 
issues
  • Please file the issues you found. Thank you.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。