はじめから始める
インストール手順とこのプラグインのフルマークダウンガイドを含むセットアッププロンプトをコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-is-root`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/is-root/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」のセクションCapgoのAI-Assistedセットアップを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-is-root` plugin in my project.Manual Setupを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の説明を参照してください:
bun add @capgo/capacitor-is-rootbunx cap syncインポート
「インポート」のセクションimport { IsRoot } from '@capgo/capacitor-is-root';APIの概要
「APIの概要」のセクションisRooted
「isRooted」のセクションデフォルトのroot/jailbreak 検出チェックを実行します。
基本的なroot/Jailbreak検出の推奨方法です。 両方のAndroidとiOSで動作します。
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
「isRootedWithBusyBox」セクションBusyBox特有のチェックを追加してデフォルトの検出を拡張 (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBox();detectRootManagementApps
「detectRootManagementApps」セクションroot管理アプリの存在を検出 (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootManagementApps();detectPotentiallyDangerousApps
「detectPotentiallyDangerousApps」セクションrootデバイスでよく見られる危険なアプリを検出 (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectPotentiallyDangerousApps();detectTestKeys
「detectTestKeys」セクションDetects debug/test build tags (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectTestKeys();checkForBusyBoxBinary
「checkForBusyBoxBinary」セクションAndroid用にBusyBoxバイナリがデバイスに存在するかを確認します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForBusyBoxBinary();checkForSuBinary
「checkForSuBinary」セクションAndroid用に su バイナリが存在するかを確認します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForSuBinary();checkSuExists
「checkSuExists」セクションAndroid用に su バイナリが実行可能であるかを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkSuExists();checkForRWPaths
セクション「checkForRWPaths」Androidのみで、世界にアクセス可能なシステムパスを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRWPaths();checkForDangerousProps
セクション「checkForDangerousProps」Androidのみで、危険なシステムプロパティを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForDangerousProps();checkForRootNative
セクション「checkForRootNative」AndroidのみでRootBeerのネイティブチェックを実行します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRootNative();detectRootCloakingApps
セクション「detectRootCloakingApps」Androidのみで、rootを隠すことができるアプリケーションを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootCloakingApps();isSelinuxFlagInEnabled
「isSelinuxFlagInEnabled」セクションSELinuxの実行状態を確認します (Android専用)
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isSelinuxFlagInEnabled();isExistBuildTags
「isExistBuildTags」セクションOSイメージ (Android専用) にテストビルドタグを検出します
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistBuildTags();doesSuperuserApkExist
「doesSuperuserApkExist」セクションAndroid専用) にスーパーユーザー APK がインストールされているかどうかを検出します
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.doesSuperuserApkExist();isExistSUPath
「isExistSUPath」セクション有名なパスを確認します su 二進形式の場所(Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistSUPath();checkDirPermissions
セクション「checkDirPermissions」書き込み可能なディレクトリを検出します(Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();checkExecutingCommands
セクション「checkExecutingCommands」コマンドを実行してrootを検出します(Androidのみ)。 which su コピーする
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();checkInstalledPackages
不審なインストールされたパッケージを検出します(Androidのみ)。コピーする
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkInstalledPackages();checkforOverTheAirCertificates
「checkforOverTheAirCertificates」セクションAndroid用にOTA証明書の改ざんを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkforOverTheAirCertificates();isRunningOnEmulator
「isRunningOnEmulator」セクションAndroid用に一般的なエミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRunningOnEmulator();simpleCheckEmulator
「simpleCheckEmulator」セクションAndroid用に軽量のエミュレータチェックを実行します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckEmulator();simpleCheckSDKBF86
「simpleCheckSDKBF86」セクションAndroid用にx86エミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckSDKBF86();simpleCheckQRREFPH
__CAPGO_KEEP_0__Android用のクォリティーコントロール参照電話の検出
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckQRREFPH();simpleCheckBuild
__CAPGO_KEEP_2__Android用のビルドホスト異常の検出
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckBuild();checkGenymotion
__CAPGO_KEEP_4__Android用のGenymotionエミュレータの指紋検出
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGenymotion();checkGeneric
__CAPGO_KEEP_6__Android用の汎用エミュレータの指紋検出
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGeneric();checkGoogleSDK
「checkGoogleSDK」セクションGoogle SDK エミュレータの指紋を検出します (Android 限定)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGoogleSDK();togetDeviceInfo
「togetDeviceInfo」セクション検出中に収集されたデバイス情報を返します。
デバイスの詳細情報とメタデータを提供します。これは、root検出プロセス中に収集されたものです。デバッグやログの目的で便利です。
import { IsRoot } from '@capgo/capacitor-is-root';
const deviceInfo = await IsRoot.togetDeviceInfo();console.log('Device info:', deviceInfo);isRootedWithEmulator
「isRootedWithEmulator」セクションデフォルトの検出にエミュレータのヒューリスティクスを拡張します (Android 限定)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithEmulator();isRootedWithBusyBoxWithEmulator
「isRootedWithBusyBoxWithEmulator」セクションBusyBox検出にエミュレータのヒューリスティクスを拡張します (Android 限定).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBoxWithEmulator();型式参照
型式参照のセクションDetectionResult
検出結果のセクションroot/jailbreak 検出メソッドによって返される結果
export interface DetectionResult { /** * `true` when the associated heuristic detects root/jailbreak artifacts. * `false` when no root/jailbreak indicators are found. * * @since 1.0.0 */ result: boolean;}DeviceInfo
デバイス情報のセクション検出中に収集されたデバイス情報
export interface DeviceInfo { /** * Arbitrary key/value device metadata populated by the native implementation. * Contents vary by platform and detection methods used. * * @since 1.0.0 */ [key: string]: any;}真実の源
真実の源のセクションこのページはプラグインから生成されています src/definitions.ts. upstream の API が変更されたときに、再度 sync を実行してください。
Getting Started から続けてください。
Getting Started から続けてください。Getting Started から続けてください。 Getting Started から続けてください。 to plan dashboard and API operations, connect it with Using @capgo/capacitor-is-root for the native capability in Using @capgo/capacitor-is-root, API Overview for the implementation detail in API Overview, あなたが「Getting Started から続けてください。」を使用している場合 あなたが「Getting Started から続けてください。」を使用している場合 API キー API キーと デバイス デバイスの実装詳細