FLUTTER ECOSYSTEM

zaher-neon/root_plus

Root Plus、このFlutterプラグインを使って、簡単にRootアクセスを要求し、Rootコマンドを実行できます。

root_plus のプロジェクト画像
Stars
1
Forks
0
最終プッシュ(UTC)
2025/07/19
プロジェクト状態
公開中
NEON GitHub avatar
GITHUB User

NEON ↗

NEON stands for: Napping? Eating? Outdoors? Nah, just coding.

言語DartKotlin

技術トピック

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 4 件
  • flutter{"sdk":"flutter"}
  • plugin_platform_interface^2.0.2
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^5.0.0

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

Root Plus - Run Root Commands Easily

Package Version Flutter Version Package License

A Flutter plugin to request root access and execute privileged commands on rooted Android devices.

Features

  • Request root access
  • Execute single or multiple root commands
  • Get command output and error streams
  • Simple, clean API

Installation

Change NDK Version to 27.0.12077973 or Newer:

android {
    ndkVersion = "27.0.12077973"
    ...
}

Install Plugin:

flutter pub add root_plus

Usage Guide

1. Import the package
import 'package:root_plus/root_plus.dart';
2. Request Root Access

Check if root access is available:

bool hasRoot = await RootPlus.requestRootAccess();

if (hasRoot) {
  print('Root access granted!');
  
} else {
  print('Root access denied or device not rooted');
}
3. Execute Commands
Single Command:
try {
  String result = await RootPlus.executeRootCommand('pm list packages');
  print('Installed packages: $result');
  
} on RootCommandException catch (e) {
  print('Command failed: ${e.message}');
}
Multiple Commands (using \n):
try {
  String result = await RootPlus.executeRootCommand("echo Hello\necho World\npm list packages");
  print('Commands output: $result');
  
} on RootCommandException catch (e) {
  print('Error executing commands: ${e.message}');
}
Exceptions

All methods may throw RootCommandException with these properties:

  • code: Error type (e.g., "COMMAND_FAILED")
  • message: Human-readable error message
  • details: Additional error details (often the command output)

Requirements

  • Rooted Android Phone
  • Tested on Android 15, I didn't tested on other android versions.

Warning

⚠️ Use with caution! Root access gives complete control over the device. Incorrect commands can brick your device.

Author

Developed by Zaher