@capgo/capacitor-is-root 사용 중
Capacitor는 루팅된 Android 기기 또는 탈옥된 iOS 기기를 감지하는 Is Root 플러그인입니다.
설치
bun add @capgo/capacitor-is-root
bunx cap sync
bunx cap sync 플러그인의 네이티브 code를 네이티브 프로젝트에 복사합니다. 플러그인을 업그레이드할 때마다 다시 실행하세요.
가져오기
import { IsRoot } from '@capgo/capacitor-is-root';
API 한눈에 보기
| 메서드 | 설명 |
|---|---|
isRooted |
기본적인 root/jailbreak 탐지 검사를 수행합니다. |
isRootedWithBusyBox |
BusyBox 전용 검사를 통해 기본 탐지 기능을 확장합니다 (Android 전용). |
detectRootManagementApps |
알려진 root 관리 앱의 존재 여부를 탐지합니다 (Android 전용). |
detectPotentiallyDangerousApps |
루팅된 기기에서 흔히 발견되는 위험한 앱을 탐지합니다 (Android 전용). |
detectTestKeys |
debug/test 빌드 태그를 탐지합니다 (Android 전용). |
checkForBusyBoxBinary |
기기에 BusyBox binary가 존재하는지 확인합니다 (Android 전용). |
checkForSuBinary |
다음 항목을 확인합니다: su binary가 존재하는지 확인합니다 (Android 전용). |
checkSuExists |
다음 항목을 탐지합니다: su binary 실행 가능 여부를 탐지합니다 (Android 전용). |
checkForRWPaths |
world writable 시스템 경로를 탐지합니다 (Android 전용). |
checkForDangerousProps |
위험한 시스템 속성을 감지합니다 (Android 전용). |
checkForRootNative |
RootBeer 네이티브 체크를 실행합니다 (Android 전용). |
detectRootCloakingApps |
루트를 숨길 수 있는 앱을 감지합니다 (Android 전용). |
isSelinuxFlagInEnabled |
SELinux 강제 적용 상태를 확인합니다 (Android 전용). |
isExistBuildTags |
OS 이미지에서 테스트 빌드 태그를 감지합니다 (Android 전용). |
doesSuperuserApkExist |
superuser APK 설치 여부를 감지합니다 (Android 전용). |
isExistSUPath |
알려진 su 바이너리 위치를 확인합니다 (Android 전용). |
checkDirPermissions |
보호해야 할 쓰기 가능 디렉토리를 감지합니다 (Android 전용). |
checkExecutingCommands |
실행 which su 루트 감지를 위한 셸 명령어 (Android 전용). |
checkInstalledPackages |
설치된 의심스러운 패키지를 감지합니다 (Android 전용). |
checkforOverTheAirCertificates |
변조된 OTA 인증서 감지 (Android 전용). |
isRunningOnEmulator |
일반적인 에뮬레이터 핑거프린트 감지 (Android 전용). |
simpleCheckEmulator |
에뮬레이터 간단 검사 수행 (Android 전용). |
simpleCheckSDKBF86 |
x86 에뮬레이터 핑거프린트 감지 (Android 전용). |
simpleCheckQRREFPH |
QC 레퍼런스 폰 빌드 감지 (Android 전용). |
simpleCheckBuild |
빌드 호스트 이상 징후 감지 (Android 전용). |
checkGenymotion |
Genymotion 에뮬레이터 지문을 감지합니다(Android 전용). |
checkGeneric |
일반 에뮬레이터 지문을 감지합니다(Android 전용). |
checkGoogleSDK |
Google SDK 에뮬레이터 지문을 감지합니다(Android 전용). |
togetDeviceInfo |
감지 과정에서 수집된 기기 정보를 반환합니다. |
isRootedWithEmulator |
에뮬레이터 휴리스틱으로 기본 감지 기능 확장 (Android 전용). |
isRootedWithBusyBoxWithEmulator |
에뮬레이터 휴리스틱으로 BusyBox 감지 기능 확장 (Android 전용). |
예시
isRooted()
기본적인 root/jailbreak 탐지 검사를 수행합니다.
import { IsRoot } from '@capgo/capacitor-is-root';
const { result } = await IsRoot.isRooted();
if (result) {
console.log('Device is rooted/jailbroken');
} else {
console.log('Device is not rooted/jailbroken');
}
isRootedWithBusyBox()
BusyBox 전용 검사를 통해 기본 탐지 기능을 확장합니다 (Android 전용).
import { IsRoot } from '@capgo/capacitor-is-root';
const result = await IsRoot.isRootedWithBusyBox();
console.log(result);
detectRootManagementApps()
알려진 root 관리 앱의 존재 여부를 탐지합니다 (Android 전용).
import { IsRoot } from '@capgo/capacitor-is-root';
const result = await IsRoot.detectRootManagementApps();
console.log(result);
detectPotentiallyDangerousApps()
루팅된 기기에서 흔히 발견되는 위험한 앱을 탐지합니다 (Android 전용).
import { IsRoot } from '@capgo/capacitor-is-root';
const result = await IsRoot.detectPotentiallyDangerousApps();
console.log(result);
detectTestKeys()
debug/test 빌드 태그를 탐지합니다 (Android 전용).
import { IsRoot } from '@capgo/capacitor-is-root';
const result = await IsRoot.detectTestKeys();
console.log(result);
checkForBusyBoxBinary()
기기에 BusyBox 바이너리가 있는지 확인합니다 (Android 전용).
import { IsRoot } from '@capgo/capacitor-is-root';
const result = await IsRoot.checkForBusyBoxBinary();
console.log(result);
위 표에는 31개의 핵심 메서드가 나열되어 있습니다. Listener 및 버전 헬퍼, 각 메서드의 전체 계약(contract)은 다음 문서에 설명되어 있습니다. GitHub 리포지토리.
전체 레퍼런스
@capgo/capacitor-is-root 사용법에 이어서
사용 중이라면 @capgo/capacitor-is-root 사용 중 네이티브 플러그인 작업을 계획하려면, 이를 다음 항목과 연결하세요: @capgo/capacitor-is-root @capgo/capacitor-is-root의 구현 세부 사항은 시작하기 Getting Started의 구현 상세 내용은 Capgo 플러그인 디렉토리 Capgo Plugin Directory의 제품 워크플로우에 맞춰, Capgo의 Capacitor 플러그인 Capgo의 Capacitor Plugins 구현 세부 사항 및 플러그인 추가 또는 업데이트 플러그인 추가 또는 업데이트의 구현 세부 사항은.