Is Root Capgo Repository
このプラグインのインストールステップとフルマークダウンガイドまでの全てのステップを含む設定コマンドをコピーしてください。
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の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-rootbunx cap syncインポート
「インポート」のセクションimport { IsRoot } from '@capgo/capacitor-is-root';APIの概要
「APIの概要」のセクションisRooted
「isRooted」のセクションデフォルトの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
「isRootedWithBusyBox」のセクションAndroid専用のBusyBox固有のチェックを拡張します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBox();detectRootManagementApps
「detectRootManagementApps」セクションAndroid専用の知られているroot管理アプリケーションが存在するかを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootManagementApps();detectPotentiallyDangerousApps
「detectPotentiallyDangerousApps」セクションAndroid専用のrootデバイスでよく見られる危険なアプリケーションを検出します。
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」セクションデバイス上のAndroid専用のBusyBoxバイナリが存在するかどうかを確認します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForBusyBoxBinary();checkForSuBinary
「checkForSuBinary」セクションAndroid専用のバイナリが存在するかどうかを確認します。 su クリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForSuBinary();checkSuExists
Android専用のバイナリが実行可能であるかどうかを検出します。クリップボードにコピー su 「checkForRWPaths」セクション
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkSuExists();checkForRWPaths
Android専用のBusyBoxバイナリが存在するかどうかを確認します。クリップボードにコピー
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」セクションOS イメージ (Android 限定) におけるテスト ビルド タグを検出します。
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
「checkDirPermissions」セクションAndroid でのみ検出する、書き込み可能なディレクトリを保護する必要があるもの。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();checkExecutingCommands
セクション「checkExecutingCommands」実行 which su スタイルコマンドを実行して、Android でのみ root を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();checkInstalledPackages
セクション「checkInstalledPackages」Android でのみ、疑わしいインストールされたパッケージを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkInstalledPackages();checkforOverTheAirCertificates
セクション「checkforOverTheAirCertificates」Android でのみ、OTA セールスを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkforOverTheAirCertificates();isRunningOnEmulator
エミュレータを実行しているかどうかを確認するAndroid用の一般的なエミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRunningOnEmulator();simpleCheckEmulator
軽量のエミュレータチェックを実行します。コピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckEmulator();simpleCheckSDKBF86
コピーQC参考電話のビルドを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckSDKBF86();simpleCheckQRREFPH
エミュレータを実行しているかどうかを確認するAndroid用の一般的なエミュレータの指紋を検出します。
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”Genymotionエミュレータの指紋を検出します (Android用)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGenymotion();checkGeneric
Section titled “checkGeneric”一般的なエミュレータの指紋を検出します (Android用)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGeneric();checkGoogleSDK
Section titled “checkGoogleSDK”Google SDK エミュレータの指紋を検出します (Android用)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGoogleSDK();togetDeviceInfo
「togetDeviceInfo」セクションデバイス情報を収集したものを返します。
デバイスの追加情報とメタデータを提供します。これは、root検出プロセス中に収集されたものです。デバッグやログの目的で便利です。
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」セクションBusyBox検出を拡張して、エミュレータのヒューリスティック (Android 限定) を使用します。
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がアップストリームで変更されたときに再度Syncを実行してください。
続けてGetting Started
「続けてGetting Started」Capgoを使用している場合 Getting Started APIを使用してダッシュボードとAPIの操作を計画する Capacitorを使用して@capgo/capacitor-is-rootを接続する for the native capability in Using @capgo/capacitor-is-root, CapacitorのAPI機能の詳細 CapacitorのAPI機能の詳細 Capacitorの__CAPGO_KEEP_0__機能の詳細 Capacitorの__CAPGO_KEEP_0__機能の詳細 API Keys API __CAPGO_KEEP_0__ 実装詳細についての情報は、デバイスのページで確認できます。