실전 cordova-plugin-iroot 대안 Capacitor 앱의 경우 @capgo/capacitor-is-root. Cordova를 대체합니다 IRoot Promise 기반 콜백 IsRoot 호출, 동일한 고수준 isRooted() 그리고 isRootedWithBusyBox() 엔트리포인트를 유지하면서, Cordova 플러그인이 문서화하지 않았던 세밀한 Android RootBeer 체크와 선택적 에뮬레이터 시그널을 추가합니다. 이 가이드는 검증 가능한 npm 사실, 설치 단계, 사용법, 그리고 Cordova에서 Capacitor로 전환하기 위한 API 맵을 다룹니다.
왜 cordova-plugin-iroot를 Capacitor에 두어야 하는가
cordova-plugin-iroot npm의 버전은 3.2.1입니다. 레지스트리 modified 타임스탬프는 2025년 10월 21일 (버전 3.2.1 출시됨 2025년 10월 21일, 그리고 3.2.0 켜짐 2025년 10월 10일). 소스는 다음 위치에 있습니다: WuglyakBolgoink/cordova-plugin-iroot. README에는 두 가지 JavaScript 호출만 문서화되어 있습니다:
IRoot.isRooted(successCallback, failureCallback)iOS 및 Android에서IRoot.isRootedWithBusyBox(successCallback, failureCallback)Android에서
README는 Android의 RootBeer 및 Shmoopi Anti-Piracy 스타일 검사, iOS의 탈옥 휴리스틱을 언급하며, 다음을 요구합니다: cydia 에서 LSApplicationQueriesSchemes iOS에서.
Capacitor 코드베이스에서 Cordova 플러그인은 여전히 다음을 의미합니다:
cordova plugin add cordova-plugin-iroot그리고 전역IRoot네임스페이스- 성공/실패 콜백 대신
async/await - Android 개별 체크 튜닝을 위한 타입 지정된 인터페이스 부재
@capgo/capacitor-is-root npm 최신 버전은 8.2.8 와 함께 modified 의 날짜 2026년 11월 12일. README는 Capacitor 8을 대상으로 하며, isRooted(), Android의 BusyBox 변형, RootBeer 헬퍼, 에뮬레이터 헬퍼를 다룹니다. Capgo는 사람이 매일 50개 이상의 풀 리퀘스트를 검토, 테스트 및 병합하는 오픈소스 주기로 수정 사항을 배포합니다.
설치
bun add @capgo/capacitor-is-root
bunx cap sync
iOS: 에 의존하는 경우 cydia:// 스타일의 탈옥 감지를 유지하려면 cydia 하위 LSApplicationQueriesSchemes 에서 Info.plistCordova README에 설명된 대로 하세요. Capgo README에는 iOS 신호가 나열되어 있습니다 isRooted() 가 기기에 실행됩니다.
Android: 기본 검사에는 추가 manifest 항목이 필요하지 않습니다. 리스크 모델이 필요할 때만 세분화된 헬퍼를 호출하세요.
사용 예시
import { IsRoot } from '@capgo/capacitor-is-root';
export async function enforceDeviceTrust() {
const { result } = await IsRoot.isRooted();
if (result) {
showRootedDeviceWarning();
return;
}
// Optional deeper audit on Android
const { result: suBinary } = await IsRoot.checkForSuBinary();
if (suBinary) {
showRootedDeviceWarning();
}
}
Android에서 BusyBox 인식 감지를 사용하려면 IsRoot.isRootedWithBusyBox() 이전과 동일한 방식으로 IRoot.isRootedWithBusyBox.
Cordova에서 Capacitor로 마이그레이션
Cordova code 호출 IRoot.isRooted(onSuccess, onError) 성공 콜백에서 boolean을 읽습니다. Capacitor code await IsRoot.isRooted() 읽기 { result: boolean }.
// Before (Cordova)
IRoot.isRooted(
(isRooted) => {
if (isRooted) blockLogin();
},
(err) => console.error(err),
);
// After (Capacitor)
import { IsRoot } from '@capgo/capacitor-is-root';
const { result } = await IsRoot.isRooted();
if (result) blockLogin();
API 매핑 테이블
cordova-plugin-iroot (IRoot) |
@capgo/capacitor-is-root |
|---|---|
isRooted(success, failure) |
isRooted() 반환합니다 { result: boolean } |
isRootedWithBusyBox(success, failure) (Android) |
isRootedWithBusyBox() 반환합니다 { result: boolean } |
| README에 체크별 API 없음 | checkForSuBinary(), detectRootManagementApps(), detectPotentiallyDangerousApps(), checkForRootNative(), 및 기타 Android 헬퍼 플러그인 문서 |
| 콜백 에러 문자열 | Capacitor의 Promise 거부 |
| Cordova 플러그인 설치 | bun add @capgo/capacitor-is-root 및 bunx cap sync |
Capgo는 다음과 같은 Android 전용 에뮬레이터 헬퍼를 추가합니다 isRunningOnEmulator() 그리고 다음과 같은 점수화 변형 isRootedWithEmulator() Cordova README에 대응 항목이 없습니다. 정책이 루팅된 하드웨어와 에뮬레이터를 다르게 취급해야 할 때 매핑하세요.
링크 및 다음 단계
- 플러그인 문서: https://capgo.app/docs/plugins/is-root/
- 마케팅 페이지: /plugins/capacitor-is-root/
- npm: https://www.npmjs.com/package/@capgo/capacitor-is-root
- GitHub: https://github.com/Cap-go/capacitor-is-root/
- Cordova 업스트림: https://github.com/WuglyakBolgoink/cordova-plugin-iroot
루트 체크는 네이티브 바이너리에 포함되어 있으므로, 플러그인을 교체한 후 스토어용 빌드를 계획하세요. Capgo 빌드 을(를) 클라우드 빌드에 사용하고, Capgo Live Update 사용하기 은(는) 로직이 JavaScript에 남아 있는 경우에만 사용하세요. 플랫폼 전환 전체 과정은 Cordova에서 Capacitor로의 마이그레이션 가이드가.