Skip to main content
Back to plugins
@capgo/capacitor-is-root
Tutorial
@capgo/capacitor-is-root

Is Root

Detect rooted Android or jailbroken iOS devices to enhance app security

Guide

Tutorial on Is Root

Using @capgo/capacitor-is-root

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

Install

bun add @capgo/capacitor-is-root
bunx cap sync

What This Plugin Exposes

  • isRooted - Performs the default root/jailbreak detection checks.
  • isRootedWithBusyBox - Extends the default detection with BusyBox specific checks (Android only).
  • detectRootManagementApps - Detects if known root management applications are present (Android only).
  • detectPotentiallyDangerousApps - Detects potentially dangerous applications commonly found on rooted devices (Android only).

Example Usage

isRooted

Performs the default root/jailbreak detection checks.

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

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

import { IsRoot } from '@capgo/capacitor-is-root';

await IsRoot.isRootedWithBusyBox();

detectRootManagementApps

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

import { IsRoot } from '@capgo/capacitor-is-root';

await IsRoot.detectRootManagementApps();

detectPotentiallyDangerousApps

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

import { IsRoot } from '@capgo/capacitor-is-root';

await IsRoot.detectPotentiallyDangerousApps();

Full Reference

Keep going from Using @capgo/capacitor-is-root

If you are using Using @capgo/capacitor-is-root to plan native plugin work, connect it with @capgo/capacitor-is-root for the implementation detail in @capgo/capacitor-is-root, Getting Started for the implementation detail in Getting Started, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins.