Getting Started
__CAPGO_KEEP_0__
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_KEEP_7__
__CAPGO_KEEP_8__bun add @capgo/capacitor-is-rootbunx cap sync__CAPGO_KEEP_11__
インポートimport { IsRoot } from '@capgo/capacitor-is-root';API の概要
セクション「API の概要」isRooted
セクション「isRooted」__CAPGO_KEEP_0__ を使用した基本的な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
BusyBoxを使用した拡張検出 (Androidのみ)。コピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBox();detectRootManagementApps
isRootedWithBusyBox Extends the default detection with BusyBox specific checks (Android only).__CAPGO_KEEP_0__ (Android 限定)で知られているルート管理アプリケーションが存在するかどうかを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootManagementApps();detectPotentiallyDangerousApps
「detectPotentiallyDangerousApps」セクション__CAPGO_KEEP_0__ (Android 限定)で根化されたデバイスに一般的に見られる危険なアプリケーションを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectPotentiallyDangerousApps();detectTestKeys
「detectTestKeys」セクション__CAPGO_KEEP_0__ (Android 限定)でデバッグ/テストビルドのタグを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectTestKeys();checkForBusyBoxBinary
「checkForBusyBoxBinary」セクション__CAPGO_KEEP_0__ (Android 限定)でデバイスにBusyBoxバイナリが存在するかどうかを確認します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForBusyBoxBinary();checkForSuBinary
「checkForSuBinary」セクション__CAPGO_KEEP_0__を確認します (Android 限定)。 su __CAPGO_KEEP_0__をクリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForSuBinary();checkSuExists
__CAPGO_KEEP_0__が実行可能であるかどうかを検出します (Android 限定)。__CAPGO_KEEP_0__をクリップボードにコピー su __CAPGO_KEEP_1__のセクション
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkSuExists();checkForRWPaths
__CAPGO_KEEP_0__をクリップボードにコピー__CAPGO_KEEP_1__のセクション
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRWPaths();checkForDangerousProps
__CAPGO_KEEP_0__をクリップボードにコピー__CAPGO_KEEP_1__のセクション
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForDangerousProps();checkForRootNative
「checkForRootNative」セクションRootBeerのネイティブチェックを実行 (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRootNative();detectRootCloakingApps
「detectRootCloakingApps」セクションrootを隠すことができるアプリケーションを検出 (Androidのみ)。
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
__CAPGO_KEEP_1____CAPGO_KEEP_2__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.doesSuperuserApkExist();isExistSUPath
__CAPGO_KEEP_3____CAPGO_KEEP_4__ su __CAPGO_KEEP_0__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistSUPath();checkDirPermissions
__CAPGO_KEEP_6____CAPGO_KEEP_0__
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();checkExecutingCommands
__CAPGO_KEEP_8____CAPGO_KEEP_0__を実行します。 which su __CAPGO_KEEP_1__をクリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();checkInstalledPackages
__CAPGO_KEEP_3__を検出します (Androidのみ)。__CAPGO_KEEP_4__をクリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkInstalledPackages();checkforOverTheAirCertificates
__CAPGO_KEEP_6__を検出します (Androidのみ)。__CAPGO_KEEP_7__をクリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkforOverTheAirCertificates();isRunningOnEmulator
__CAPGO_KEEP_9__を検出します (Androidのみ)。__CAPGO_KEEP_10__をクリップボードにコピー
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
「checkGenymotion」セクションGenymotion エミュレータの指紋を検出します (Android 限定)。
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」セクションGoogle SDK エミュレータの指紋を検出します (Android 限定)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGoogleSDK();togetDeviceInfo
「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
「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
「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」を使用している場合 「Getting Started」を使用してダッシュボードと __CAPGO_KEEP_0__ の操作を計画する場合、接続してください。 to plan dashboard and API operations, connect it with 使用@capgo/capacitor-is-root for the native capability in 使用@capgo/capacitor-is-root APIの概要 for the implementation detail in APIの概要 導入 for the implementation detail in 導入 APIのキー for the implementation detail in APIのキー デバイス for the implementation detail in デバイス