はじめに
このプラグインのインストール手順とフルマークダウンガイドを含むセットアップコマンドをコピーしてください。
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.
インストール
セクション:インストール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」のセクションBusyBox固有のチェックを追加します (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBox();detectRootManagementApps
「detectRootManagementApps」セクションroot管理アプリの存在を検出します (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootManagementApps();detectPotentiallyDangerousApps
「detectPotentiallyDangerousApps」セクションrootデバイスでよく見られる危険なアプリを検出します (Androidのみ)。
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」セクションデバイス上のBusyBoxバイナリが存在するかどうかを確認します (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForBusyBoxBinary();checkForSuBinary
「checkForSuBinary」セクションデバイス上の su バイナリが存在するかどうかを確認します (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForSuBinary();checkSuExists
「checkSuExists」セクションデバイス上の su バイナリが実行可能であるかどうかを検出します (Androidのみ)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkSuExists();checkForRWPaths
「checkForRWPaths」セクションデバイス上の世界書き込み可能なシステムパスを検出します (Androidのみ)
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専用。ルートを隠すことができるアプリケーションを検出します。
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
ディレクトリのパーミッションを確認します。Android での書き込み可能なディレクトリを検出して保護する必要がある (Android 限定)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();checkExecutingCommands
「checkExecutingCommands」セクション実行 which su Android での root 検出用のスタイル コマンドを実行 (Android 限定)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();checkInstalledPackages
「checkInstalledPackages」セクションAndroid での不審なインストールされたパッケージを検出 (Android 限定)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkInstalledPackages();checkforOverTheAirCertificates
「checkforOverTheAirCertificates」セクションAndroid での OTA 証明書を改ざんしているかどうかを検出 (Android 限定)。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkforOverTheAirCertificates();isRunningOnEmulator
エミュレータ上で実行されているかどうかAndroid用の一般的なエミュレータの指紋を検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRunningOnEmulator();simpleCheckEmulator
Android用の軽量エミュレータチェックを実行します。クリップボードにコピー
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckEmulator();simpleCheckSDKBF86
クリップボードにコピーQC参考電話機のビルドを検出します。
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckSDKBF86();simpleCheckQRREFPH
protectedTokenstargetLanguage
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”Android用のGenymotionエミュレータの指紋を検出します。
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”Android用のGoogle SDK エミュレータの指紋を検出します。
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
デバイス情報検出中に収集されたデバイス情報。
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 がアップストリームで変更された場合に再度同期を実行してください。