Getting Started
このプラグインのインストール手順とフルマークダウンガイドを含むセットアップコマンドをコピーしてください。
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.
インストール
セクション「インストール」AI-Assisted セットアップを使用してプラグインをインストールできます。次のコマンドを使用して、Capgo スキルをAIツールに追加します。
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 セットアップを使用する場合は、次のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
bun add @capgo/capacitor-is-rootbunx cap syncインポート
「インポート」のセクションimport { IsRoot } from '@capgo/capacitor-is-root';API の概要
APIの概要isRooted
__CAPGO_KEEP_0__の概要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
__CAPGO_KEEP_0__の概要BusyBoxの特定のチェックを追加して、Android専用の検出を拡張します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBox();detectRootManagementApps
__CAPGO_KEEP_0__の概要Android専用のroot管理アプリケーションを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootManagementApps();detectPotentiallyDangerousApps
__CAPGO_KEEP_0__の概要rootedデバイス(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」セクションデバイス上のBusyBoxバイナリが存在するかどうかを確認します(Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForBusyBoxBinary();checkForSuBinary
「checkForSuBinary」セクションrootedデバイス(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
Android用のシステムパスが世界にアクセス可能であるかを検出します。コピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRWPaths();checkForDangerousProps
Android用のシステムプロパティが危険であるかを検出します。コピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForDangerousProps();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」セクションAndroid専用。SELinuxの強制実行状態を確認します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isSelinuxFlagInEnabled();isExistBuildTags
「isExistBuildTags」セクションAndroid専用。OSイメージにテストビルドタグが存在するかを検出します。
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」セクション知られているバイナリの場所 (Android 限定) を確認します。 su クリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistSUPath();checkDirPermissions
Android 限定で、保護すべき書き込み可能なディレクトリを検出します。クリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();checkExecutingCommands
Android 限定で、rootを検出するためのスタイルコマンドを実行します。クリップボードにコピー which su 「checkExecutingCommands」セクション
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();checkInstalledPackages
__CAPGO_KEEP_0__Detects suspicious installed packages (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkInstalledPackages();checkforOverTheAirCertificates
Section titled “checkforOverTheAirCertificates”__CAPGO_KEEP_2__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkforOverTheAirCertificates();isRunningOnEmulator
__CAPGO_KEEP_3__Detects common emulator fingerprints (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRunningOnEmulator();simpleCheckEmulator
Section titled “simpleCheckEmulator”__CAPGO_KEEP_5__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckEmulator();simpleCheckSDKBF86
Section titled “simpleCheckSDKBF86”Android用x86エミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckSDKBF86();simpleCheckQRREFPH
Section titled “simpleCheckQRREFPH”Android用のQC参考電話番号のビルドを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckQRREFPH();simpleCheckBuild
Section titled “simpleCheckBuild”Android用のビルドホストの異常を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckBuild();checkGenymotion
Section titled “checkGenymotion”Android用のGenymotionエミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGenymotion();checkGeneric
セクション「checkGeneric」Android用の汎用エミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGeneric();checkGoogleSDK
セクション「checkGoogleSDK」Android用のGoogle SDK エミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGoogleSDK();togetDeviceInfo
セクション「getDeviceInfo」検出中に収集されたデバイス情報を返します。
デバイスの詳細情報とメタデータを提供します。これは、デバイスの検出プロセス中に収集されました。デバッグやログの目的で便利です。
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」セクションエミュレータのヒューリスティクス (Android 限定) を組み込んだ BusyBox 検出の拡張
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上流で変更されたパブリック API の再同期を行う
Getting Started から続ける
「Getting Started から続ける」あなたが Getting Started ダッシュボードと API の計画と操作を行う場合、 Using @capgo/capacitor-is-root Using @capgo/capacitor-is-root API Overview 実装詳細については API の概要を参照してください。 概要 実装詳細については Introduction を参照してください。 API のキー 実装詳細については API のキー、 デバイス 実装詳細については Devices を参照してください。