Capacitor - Live Updates for Capacitor Apps

はじめから始める

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

Android専用のBusyBox固有のチェックをデフォルトの検出に拡張します。

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

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

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

Android専用のrootデバイスでよく見られる危険なアプリケーションを検出します。

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

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

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

デバイス上のBusyBoxバイナリが存在するかどうかを確認します (Android専用)。

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

デバイス上の su バイナリが存在するかどうかを確認します (Android専用)。

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

バイナリが実行可能であるかどうかを検出します (Android専用)。 su クリップボードにコピー

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

クリップボードにコピー

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

Android専用のSELinuxの強制実行状態を確認します。

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

Android 限定で、知られている su バイナリの場所を確認します。

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

Android での書き込み可能なディレクトリを検出して保護する (Android 限定).

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

実行 which su Android でのスタイル コマンドを実行して root を検出する (Android 限定).

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

Android での疑わしいインストール パッケージを検出する (Android 限定).

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

Android での OTA 証明書を改ざんしているか検出する (Android 限定).

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

エミュレータのヒューリスティック (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;
}

検出時に入手したデバイス情報

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

ソース オブ トゥルース

このページはプラグインの

公開 __CAPGO_KEEP_0__ がアップストリームで変更された場合に再度 Sync を実行してください。 src/definitions.ts. Re-run the sync when the public API changes upstream.

Getting Started から続けて

ソース オブ トゥルース

Capgoを使用している場合 Getting Started ダッシュボードとAPIの操作を計画するには、 Capgoの@capgo/capacitor-is-rootを使用 Capgoの@capgo/capacitor-is-rootのネイティブ機能について API Overview for the implementation detail in API Overview, Capgoのキーの実装詳細について Capgoのキーの実装詳細について、 API Keys for the implementation detail in API Keys, and Getting Started デバイスの実装詳細について。