コンテンツにジャンプ

はじめから始める

GitHub

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-root
bunx cap sync
import { IsRoot } from '@capgo/capacitor-is-root';

デフォルトの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');
}

BusyBox特有のチェックを追加してデフォルトの検出を拡張 (Androidのみ)。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBox();

root管理アプリの存在を検出 (Androidのみ)。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootManagementApps();

rootデバイスでよく見られる危険なアプリを検出 (Androidのみ)。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectPotentiallyDangerousApps();

Detects debug/test build tags (Android only).

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectTestKeys();

Android用にBusyBoxバイナリがデバイスに存在するかを確認します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForBusyBoxBinary();

Android用に su バイナリが存在するかを確認します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForSuBinary();

Android用に su バイナリが実行可能であるかを検出します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkSuExists();

Androidのみで、世界にアクセス可能なシステムパスを検出します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRWPaths();

Androidのみで、危険なシステムプロパティを検出します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForDangerousProps();

AndroidのみでRootBeerのネイティブチェックを実行します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRootNative();

Androidのみで、rootを隠すことができるアプリケーションを検出します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootCloakingApps();

SELinuxの実行状態を確認します (Android専用)

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isSelinuxFlagInEnabled();

OSイメージ (Android専用) にテストビルドタグを検出します

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistBuildTags();

Android専用) にスーパーユーザー APK がインストールされているかどうかを検出します

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.doesSuperuserApkExist();

有名なパスを確認します su 二進形式の場所(Androidのみ)。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistSUPath();

書き込み可能なディレクトリを検出します(Androidのみ)。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();

コマンドを実行してrootを検出します(Androidのみ)。 which su コピーする

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();

コピーする

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkInstalledPackages();

Android用にOTA証明書の改ざんを検出します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkforOverTheAirCertificates();

Android用に一般的なエミュレータの指紋を検出します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRunningOnEmulator();

Android用に軽量のエミュレータチェックを実行します。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckEmulator();

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();

Google SDK エミュレータの指紋を検出します (Android 限定)。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGoogleSDK();

検出中に収集されたデバイス情報を返します。

デバイスの詳細情報とメタデータを提供します。これは、root検出プロセス中に収集されたものです。デバッグやログの目的で便利です。

import { IsRoot } from '@capgo/capacitor-is-root';
const deviceInfo = await IsRoot.togetDeviceInfo();
console.log('Device info:', deviceInfo);

デフォルトの検出にエミュレータのヒューリスティクスを拡張します (Android 限定)。

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithEmulator();

BusyBox検出にエミュレータのヒューリスティクスを拡張します (Android 限定).

import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBoxWithEmulator();

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;
}

検出中に収集されたデバイス情報

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 キーと デバイス デバイスの実装詳細