Skip to main content
プラグインに戻る
@capgo/capacitor-is-root
チュートリアル
by github.com/Cap-go

rootであるかどうかを検出する

rootであるかどうかを検出するAndroidデバイスまたはiOSデバイスを脱獄したiOSデバイスを検出してアプリのセキュリティを強化する

ガイド

Is Rootチュートリアル

Using @capgo/capacitor-is-root

Capacitor Is Rootプラグイン (rooted Androidまたはjailbroken iOSデバイスを検出)

インストール

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

- BusyBox に特有のチェックを追加してデフォルトの検出を拡張します (Android 限定)。

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

await IsRoot.isRootedWithBusyBox();

detectRootManagementApps

- Android 限定で、知られている root 管理アプリケーションが存在するかどうかを検出します。

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

await IsRoot.detectRootManagementApps();

detectPotentiallyDangerousApps

- Android 限定で、root デバイスでよく見られる危険なアプリケーションを検出します。

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

await IsRoot.detectPotentiallyDangerousApps();

フル リファレンス

@capgo/capacitor-is-root

Capgoを使用している場合 Capgoを使用してnativeプラグインの作業を計画する場合、@capgo/capacitor-is-root @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-is-root nativeプラグインの実装詳細については、@capgo/capacitor-is-root for the implementation detail in @capgo/capacitor-is-root, Getting Startedの実装詳細については、 Capgoプラグインディレクトリ Capgo Plugin Directory Capgo Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and __CAPGO_KEEP_0__ プラグイン __CAPGO_KEEP_1__