패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.0.4

root

Android 기기의 루트 상태를 확인하고 Android(단일)에서 쉘 명령어를 실행하기 위한 Flutter 플러그인. 이 플러그인은 짧은 기간 동안만 사용하세요.

Android
30일 다운로드
1.6천
좋아요
36
Pub 점수
150

패키지 설치

flutter pub add root

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

루트 패키지는 안드로이드 기기의 루트 상태를 확인하고 안드로이드에서만 쉘 명령을 실행할 수 있는 플러터 플러그인입니다. 장치 무결성 검증이나 특정 작업 중 시스템 수준 명령을 실행하는 등의 단기적인 작업에 적합합니다. 이 플러그인은 네이티브 안드로이드 기능을 활용하여 신뢰할 수 있는 루트 감지 및 명령 실행을 제공합니다. iOS는 지원하지 않습니다. 개발자는 성능 또는 보안 문제를 방지하기 위해 주의해서 사용하고 짧은 프로세스에만 사용해야 합니다.

사용 사례

  • 안드로이드 기기가 루트되었는지 확인
  • 안드로이드에서 일시적인 쉘 명령 실행
  • 장치 보안 상태 확인
  • 시스템 수준 스크립트를 일시적으로 실행 중
  • 앱 시작 중 장치 무결성 검증

주요 기능

  • Android 루트 상태 감지
  • Android에서 쉘 명령을 실행합니다
  • 짧은 프로세스용으로 가볍다
  • 네이티브 Android API 사용
  • iOS 지원 없음

적합한 대상

  • 루트 확인이 필요한 안드로이드 전용 앱
  • 보안 민감 응용 프로그램
  • 임시 셸 액세스가 필요한 도구
  • 개발 디버깅 유틸리티
  • 장치 상태 검증하는 앱

고려 사항

  • 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.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.