Skip to main content

ガイド

Is Rootのチュートリアル

デバイスでテスト

Download the Capgo app, then scan the QR code.

Root プラグインのプレビュー QR code

使用中 @capgo/capacitor-is-root

Capacitor Root デバイスを検出するプラグインです。

インストール

bun add @capgo/capacitor-is-root
bunx cap sync

このプラグインが公開するもの

  • isRooted - デフォルトの Root/Jailbreak 検出チェックを実行します。
  • isRootedWithBusyBox - デフォルトの検出に BusyBox を追加します (Android 限定)。
  • detectRootManagementApps - Android 限定で、Root マネージャー アプリケーションが存在するかどうかを検出します。
  • detectPotentiallyDangerousApps - Android 限定で、Root デバイスに一般的に見られる危険なアプリケーションを検出します。

使用例

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

Android専用のBusyBox特有のチェックを拡張します。

import { IsRoot } from '@capgo/capacitor-is-root';

await IsRoot.isRootedWithBusyBox();

detectRootManagementApps

知られているroot管理アプリケーションが存在する場合に検出します (Android専用)。

import { IsRoot } from '@capgo/capacitor-is-root';

await IsRoot.detectRootManagementApps();

detectPotentiallyDangerousApps

rootデバイスでよく見られる危険なアプリケーションを検出します (Android専用)。

import { IsRoot } from '@capgo/capacitor-is-root';

await IsRoot.detectPotentiallyDangerousApps();

フルリファレンス

使用中の@capgo/capacitor-is-rootから続けてください。

あなたが使用している場合 @capgo/capacitor-is-rootを使用 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-is-rootを接続 @capgo/capacitor-is-root Capacitor-はcapgo/capacitor-is-rootの実装詳細のために Getting Started Capacitor-の実装詳細のために Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Capacitorプラグインの実装詳細のためにプラグインの追加または更新 フッター