コンテンツにジャンプ

はじめから始める

GitHub

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

Androidのみで知られているroot管理アプリケーションが存在するかを検出します。

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

root化されたデバイス上でよく見られる危険なアプリケーションを検出します (Androidのみ)。

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

Androidのみでデバッグ/テストビルドのタグを検出します。

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

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

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

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

コピー

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

実行 which su Android専用: root検出用のスタイルコマンドを実行します。

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

Android専用: 不審なインストール済みパッケージを検出します。

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

Android用のQC参考携帯電話のビルドを検出します。

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

Androidのみで、ビルドホストの異常を検出します。

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

Androidのみで、Genymotionエミュレータの指紋を検出します。

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

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

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

Androidのみで、Google SDK エミュレータの指紋を検出します。

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

デバイス情報の収集

デバイスのルート検出プロセス中に収集されたデバイスに関する追加のコンテキストとメタデータを提供します。デバッグおよびログ目的で便利です。

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

クリップボードにコピー

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

「isRootedWithBusyBoxWithEmulator」セクション

「Type Reference」セクション

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.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__の実装詳細について