npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@capgo/capacitor-is-root

v8.1.0

Published

Jailbreak/Root Detection Plugin for Capacitor

Readme

@capgo/capacitor-is-root

Jailbreak/Root Detection Plugin for Capacitor

Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/is-root/

Install

npm install @capgo/capacitor-is-root
npx cap sync

API

Capacitor Is Root Plugin for detecting rooted (Android) or jailbroken (iOS) devices.

This plugin provides comprehensive detection methods to identify if a device has been rooted or jailbroken, which can be important for security-sensitive applications.

Most methods are Android-only and use various heuristics to detect root access. The basic isRooted() method works on both Android and iOS.

isRooted()

isRooted() => Promise<DetectionResult>

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.

Returns: Promise<DetectionResult>

Since: 1.0.0


isRootedWithBusyBox()

isRootedWithBusyBox() => Promise<DetectionResult>

Extends the default detection with BusyBox specific checks (Android only).

Returns: Promise<DetectionResult>


detectRootManagementApps()

detectRootManagementApps() => Promise<DetectionResult>

Detects if known root management applications are present (Android only).

Returns: Promise<DetectionResult>


detectPotentiallyDangerousApps()

detectPotentiallyDangerousApps() => Promise<DetectionResult>

Detects potentially dangerous applications commonly found on rooted devices (Android only).

Returns: Promise<DetectionResult>


detectTestKeys()

detectTestKeys() => Promise<DetectionResult>

Detects debug/test build tags (Android only).

Returns: Promise<DetectionResult>


checkForBusyBoxBinary()

checkForBusyBoxBinary() => Promise<DetectionResult>

Checks whether a BusyBox binary exists on the device (Android only).

Returns: Promise<DetectionResult>


checkForSuBinary()

checkForSuBinary() => Promise<DetectionResult>

Checks whether a su binary is present (Android only).

Returns: Promise<DetectionResult>


checkSuExists()

checkSuExists() => Promise<DetectionResult>

Detects if the su binary can be executed (Android only).

Returns: Promise<DetectionResult>


checkForRWPaths()

checkForRWPaths() => Promise<DetectionResult>

Detects world writable system paths (Android only).

Returns: Promise<DetectionResult>


checkForDangerousProps()

checkForDangerousProps() => Promise<DetectionResult>

Detects dangerous system properties (Android only).

Returns: Promise<DetectionResult>


checkForRootNative()

checkForRootNative() => Promise<DetectionResult>

Executes RootBeer native checks (Android only).

Returns: Promise<DetectionResult>


detectRootCloakingApps()

detectRootCloakingApps() => Promise<DetectionResult>

Detects applications that can hide root (Android only).

Returns: Promise<DetectionResult>


isSelinuxFlagInEnabled()

isSelinuxFlagInEnabled() => Promise<DetectionResult>

Checks the SELinux enforcement state (Android only).

Returns: Promise<DetectionResult>


isExistBuildTags()

isExistBuildTags() => Promise<DetectionResult>

Detects test build tags on the OS image (Android only).

Returns: Promise<DetectionResult>


doesSuperuserApkExist()

doesSuperuserApkExist() => Promise<DetectionResult>

Detects if superuser APKs are installed (Android only).

Returns: Promise<DetectionResult>


isExistSUPath()

isExistSUPath() => Promise<DetectionResult>

Checks for known su binary locations (Android only).

Returns: Promise<DetectionResult>


checkDirPermissions()

checkDirPermissions() => Promise<DetectionResult>

Detects writable directories that should be protected (Android only).

Returns: Promise<DetectionResult>


checkExecutingCommands()

checkExecutingCommands() => Promise<DetectionResult>

Executes which su style commands to detect root (Android only).

Returns: Promise<DetectionResult>


checkInstalledPackages()

checkInstalledPackages() => Promise<DetectionResult>

Detects suspicious installed packages (Android only).

Returns: Promise<DetectionResult>


checkforOverTheAirCertificates()

checkforOverTheAirCertificates() => Promise<DetectionResult>

Detects tampered OTA certificates (Android only).

Returns: Promise<DetectionResult>


isRunningOnEmulator()

isRunningOnEmulator() => Promise<DetectionResult>

Detects common emulator fingerprints (Android only).

Returns: Promise<DetectionResult>


simpleCheckEmulator()

simpleCheckEmulator() => Promise<DetectionResult>

Performs a lightweight emulator check (Android only).

Returns: Promise<DetectionResult>


simpleCheckSDKBF86()

simpleCheckSDKBF86() => Promise<DetectionResult>

Detects x86 emulator fingerprints (Android only).

Returns: Promise<DetectionResult>


simpleCheckQRREFPH()

simpleCheckQRREFPH() => Promise<DetectionResult>

Detects QC reference phone builds (Android only).

Returns: Promise<DetectionResult>


simpleCheckBuild()

simpleCheckBuild() => Promise<DetectionResult>

Detects build host anomalies (Android only).

Returns: Promise<DetectionResult>


checkGenymotion()

checkGenymotion() => Promise<DetectionResult>

Detects Genymotion emulator fingerprints (Android only).

Returns: Promise<DetectionResult>


checkGeneric()

checkGeneric() => Promise<DetectionResult>

Detects generic emulator fingerprints (Android only).

Returns: Promise<DetectionResult>


checkGoogleSDK()

checkGoogleSDK() => Promise<DetectionResult>

Detects Google SDK emulator fingerprints (Android only).

Returns: Promise<DetectionResult>


togetDeviceInfo()

togetDeviceInfo() => Promise<DeviceInfo>

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.

Returns: Promise<DeviceInfo>

Since: 1.0.0


isRootedWithEmulator()

isRootedWithEmulator() => Promise<DetectionResult>

Extends the default detection with emulator heuristics (Android only).

Returns: Promise<DetectionResult>


isRootedWithBusyBoxWithEmulator()

isRootedWithBusyBoxWithEmulator() => Promise<DetectionResult>

Extends the BusyBox detection with emulator heuristics (Android only).

Returns: Promise<DetectionResult>


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version.

Returns: Promise<{ version: string; }>

Since: 1.0.0


Interfaces

DetectionResult

Result returned by root/jailbreak detection methods.

| Prop | Type | Description | Since | | ------------ | -------------------- | --------------------------------------------------------------------------------------------------------------------------- | ----- | | result | boolean | true when the associated heuristic detects root/jailbreak artifacts. false when no root/jailbreak indicators are found. | 1.0.0 |

DeviceInfo

Device information collected during detection.

Credits

This plugin was inspired by the work in https://github.com/WuglyakBolgoink/cordova-plugin-iroot