はじめから始める
インストール手順とフルマークダウンガイドのセットアッププロンプトをコピーしてください。このプラグインの
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 Setupを使用してプラグインをインストールできます。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のセクションAndroidのみで知られているroot管理アプリケーションが存在するかを検出します。
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のセクションAndroidのみでデバッグ/テストビルドのタグを検出します。
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
__CAPGO_KEEP_1____CAPGO_KEEP_2__ su __CAPGO_KEEP_3__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForSuBinary();checkSuExists
__CAPGO_KEEP_5____CAPGO_KEEP_6__ su __CAPGO_KEEP_7__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkSuExists();checkForRWPaths
__CAPGO_KEEP_9____CAPGO_KEEP_10__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRWPaths();checkForDangerousProps
checkForDangerousPropsAndroidのみで危険なシステムプロパティを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForDangerousProps();checkForRootNative
checkForRootNativeAndroidのみでRootBeerのネイティブチェックを実行します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRootNative();detectRootCloakingApps
detectRootCloakingAppsAndroidのみでrootを隠すことができるアプリケーションを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootCloakingApps();isSelinuxFlagInEnabled
isSelinuxFlagInEnabledAndroidのみでSELinuxの強制実行状態を確認します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isSelinuxFlagInEnabled();isExistBuildTags
isExistBuildTagsAndroidのみでOSイメージに検出されるテストビルドタグ
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistBuildTags();doesSuperuserApkExist
doesSuperuserApkExistAndroidのみでスーパーユーザーAPKがインストールされているかを検出
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.doesSuperuserApkExist();isExistSUPath
isExistSUPathAndroidのみで知られているバイナリの場所を確認 su コピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistSUPath();checkDirPermissions
Androidのみで書き込み可能なディレクトリを検出して保護する必要があるかを検出コピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();checkExecutingCommands
「checkExecutingCommands」セクション実行 which su Android専用: root検出用のスタイルコマンドを実行します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();checkInstalledPackages
「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
「simpleCheckQRREFPH」セクションAndroid用のQC参考携帯電話のビルドを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckQRREFPH();simpleCheckBuild
「simpleCheckBuild」セクションAndroidのみで、ビルドホストの異常を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckBuild();checkGenymotion
タイトル:GenymotionのチェックAndroidのみで、Genymotionエミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGenymotion();checkGeneric
タイトル:一般的なチェックAndroidのみで、一般的なエミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGeneric();checkGoogleSDK
タイトル:Google SDKのチェックAndroidのみで、Google SDK エミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGoogleSDK();togetDeviceInfo
タイトル:デバイス情報の取得デバイス情報の収集
デバイスのルート検出プロセス中に収集されたデバイスに関する追加のコンテキストとメタデータを提供します。デバッグおよびログ目的で便利です。
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
エミュレータのヒューリスティクス (Android 限定) を使用して BusyBox 検出を拡張します。クリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBoxWithEmulator();「isRootedWithBusyBoxWithEmulator」セクション
「Type Reference」セクションDetectionResult
「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
「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.tspublic API がアップストリームで変更された場合に再度 Sync を実行してください。
Getting Started から続けてください
「Getting Started から続けてください」セクションCapgo を使用している場合 スタートガイド APIと連携するためにダッシュボードとAPIの運用を計画する capgo/capacitor-is-rootを使用する capgo/capacitor-is-rootのnative capabilityについて APIの概要 APIの実装詳細について 導入 __CAPGO_KEEP_0__の実装詳細について APIのキー APIの実装詳細について デバイス __CAPGO_KEEP_0__の実装詳細について