Getting Started
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
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.
Ce contenu n'est pas encore disponible dans votre langue.
Install
Section titled “Install”bun add @capgo/capacitor-is-rootbunx cap syncImport
Section titled “Import”import { IsRoot } from '@capgo/capacitor-is-root';API Overview
Section titled “API Overview”isRooted
Section titled “isRooted”Performs the default root/jailbreak detection checks.
This is the recommended method for basic root/jailbreak detection. It runs a combination of the most reliable detection heuristics for the platform. Works on both Android and 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
Section titled “isRootedWithBusyBox”Extends the default detection with BusyBox specific checks (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBox();detectRootManagementApps
Section titled “detectRootManagementApps”Detects if known root management applications are present (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootManagementApps();detectPotentiallyDangerousApps
Section titled “detectPotentiallyDangerousApps”Detects potentially dangerous applications commonly found on rooted devices (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectPotentiallyDangerousApps();detectTestKeys
Section titled “detectTestKeys”Detects debug/test build tags (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectTestKeys();checkForBusyBoxBinary
Section titled “checkForBusyBoxBinary”Checks whether a BusyBox binary exists on the device (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForBusyBoxBinary();checkForSuBinary
Section titled “checkForSuBinary”Checks whether a su binary is present (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForSuBinary();checkSuExists
Section titled “checkSuExists”Detects if the su binary can be executed (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkSuExists();checkForRWPaths
Section titled “checkForRWPaths”Detects world writable system paths (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRWPaths();checkForDangerousProps
Section titled “checkForDangerousProps”Detects dangerous system properties (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForDangerousProps();checkForRootNative
Section titled “checkForRootNative”Executes RootBeer native checks (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkForRootNative();detectRootCloakingApps
Section titled “detectRootCloakingApps”Detects applications that can hide root (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.detectRootCloakingApps();isSelinuxFlagInEnabled
Section titled “isSelinuxFlagInEnabled”Checks the SELinux enforcement state (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isSelinuxFlagInEnabled();isExistBuildTags
Section titled “isExistBuildTags”Detects test build tags on the OS image (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistBuildTags();doesSuperuserApkExist
Section titled “doesSuperuserApkExist”Detects if superuser APKs are installed (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.doesSuperuserApkExist();isExistSUPath
Section titled “isExistSUPath”Checks for known su binary locations (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isExistSUPath();checkDirPermissions
Section titled “checkDirPermissions”Detects writable directories that should be protected (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkDirPermissions();checkExecutingCommands
Section titled “checkExecutingCommands”Executes which su style commands to detect root (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkExecutingCommands();checkInstalledPackages
Section titled “checkInstalledPackages”Detects suspicious installed packages (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkInstalledPackages();checkforOverTheAirCertificates
Section titled “checkforOverTheAirCertificates”Detects tampered OTA certificates (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkforOverTheAirCertificates();isRunningOnEmulator
Section titled “isRunningOnEmulator”Detects common emulator fingerprints (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRunningOnEmulator();simpleCheckEmulator
Section titled “simpleCheckEmulator”Performs a lightweight emulator check (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckEmulator();simpleCheckSDKBF86
Section titled “simpleCheckSDKBF86”Detects x86 emulator fingerprints (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckSDKBF86();simpleCheckQRREFPH
Section titled “simpleCheckQRREFPH”Detects QC reference phone builds (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckQRREFPH();simpleCheckBuild
Section titled “simpleCheckBuild”Detects build host anomalies (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.simpleCheckBuild();checkGenymotion
Section titled “checkGenymotion”Detects Genymotion emulator fingerprints (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGenymotion();checkGeneric
Section titled “checkGeneric”Detects generic emulator fingerprints (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGeneric();checkGoogleSDK
Section titled “checkGoogleSDK”Detects Google SDK emulator fingerprints (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.checkGoogleSDK();togetDeviceInfo
Section titled “togetDeviceInfo”Returns device information collected during detection.
Provides additional context and metadata about the device that was gathered during the root detection process. Useful for debugging and logging purposes.
import { IsRoot } from '@capgo/capacitor-is-root';
const deviceInfo = await IsRoot.togetDeviceInfo();console.log('Device info:', deviceInfo);isRootedWithEmulator
Section titled “isRootedWithEmulator”Extends the default detection with emulator heuristics (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithEmulator();isRootedWithBusyBoxWithEmulator
Section titled “isRootedWithBusyBoxWithEmulator”Extends the BusyBox detection with emulator heuristics (Android only).
import { IsRoot } from '@capgo/capacitor-is-root';
await IsRoot.isRootedWithBusyBoxWithEmulator();Type Reference
Section titled “Type Reference”DetectionResult
Section titled “DetectionResult”Result returned by root/jailbreak detection methods.
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
Section titled “DeviceInfo”Device information collected during detection.
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;}Source Of Truth
Section titled “Source Of Truth”This page is generated from the plugin’s src/definitions.ts. Re-run the sync when the public API changes upstream.