# @capgo/capacitor-is-root 中文文档

规范地址：https://npmcn.com/package/%40capgo/capacitor-is-root/

版本：8\.2\.5
npm 元数据更新时间：2026-10-18T13:38:59.705Z
中文译文更新时间：2026-11-09T03:15:50.640Z
软件包许可：MPL-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40capgo/capacitor-is-root
原文对照：https://npmcn.com/package/%40capgo/capacitor-is-root/?lang=original
项目主页：https://capgo.app/docs/plugins/is-root/
源码仓库：https://github.com/Cap-go/capacitor-is-root

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：171 kB，30 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- peer 依赖：@capacitor/core \>=8\.0\.0
- 首次发布：2025-09-23T00:12:22.102Z
- 最新版本发布：2026-10-18T13:38:59.304Z
- 近 30 天下载量：55403（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：30（近 12 个月 27 个）

## 中文简介

Capacitor的监狱破损/ Root检测插件。 检测Android root, iOS 越狱, 以及模拟器( 当请求时) .

## 安装

```sh
npm install @capgo/capacitor-is-root
```

也可以使用：`pnpm add @capgo/capacitor-is-root`、`yarn add @capgo/capacitor-is-root`、`bun add @capgo/capacitor-is-root`

## README

# @ capgo/ 电容- is- root

从您的 Capacitor app 中检测出植入式Android 设备, 和 jabroken iPhone, 这样您就可以保护已损坏设备的付款、内容和账户 .

[![Capgo - Build Capacitor apps with AI, ship updates instantly](https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-is-root)](https://capgo.app/?ref=plugin_is_root)

**队长**:在几分钟内将修正推给您的 Capacitor 用户,在没有Mac的情况下构建已签名的iOS和Android apps,并在一击中回滚.

## [\*免费开始\*](https://capgo.app/register/?ref=plugin_is_root)

14天无限自由审判. 不需要信用卡

> 🤖 **建筑与AI编码代理?** 安装 [Capgo 技能](https://capgo.app/skills/?ref=plugin_is_root) 所以克劳德代码,代码,光标,副驾驶,或双子座CLI知道如何安装和使用 `@capgo/capacitor-is-root` 在您的电容应用程序中: `npx skills add Cap-go/capgo-skills`。然后问你的经纪人: _添加@capgo/capor-is-root到我的Capacitor应用上,并把它接上_ [代理设置指南](https://capgo.app/agents/?ref=plugin_is_root) • 妇女 [主机磁共振](https://capgo.app/docs/ai/mcp/?ref=plugin_is_root)

![@capgo/capacitor-is-root for Capacitor apps](https://raw.githubusercontent.com/Cap-go/capacitor-is-root/main/assets/github-social-preview.png)

检测 **机器人根**, (中文(简体) ), **iOS 越狱**,以及 **模拟环境** (当你选择加入) 从你的控制器应用. `@capgo/capacitor-is-root` 暴露一个跨平台的入站点加上颗粒Android检查,这样你就可以调谐银行,fintech,企业,以及其他安全敏感产品的风险.

## 主要特点

-   **一张支票**数字 : `isRooted()` 运行两个平台的默认根或越狱检查.
-   **iOS 越狱检查**:在应用沙盒外寻找越狱文件并进行测试.
-   **Android 根 Beer 检查**数字 : `checkForSuBinary()`, (中文(简体) ), `checkForDangerousProps()`, (中文(简体) ), `checkForRWPaths()`, (中文(简体) ), `detectTestKeys()` 还有更多.
-   **Android上的应用检测**数字 : `detectRootManagementApps()`, (中文(简体) ), `detectPotentiallyDangerousApps()` 财务报告和审定财务报表 `detectRootCloakingApps()`。 。 。 .
-   **忙碌的框意识**数字 : `isRootedWithBusyBox()` 在Android上添加 BusyBox检查.
-   **平台**: iOS和Android. 互联网档案馆的存檔,存档日期2013-12-21. Android使用"根比尔". 网络上没有意义.

## 它检测到什么

| 信号 | 平台 | 如何检查 |
| --- | --- | --- |
| 根/ 越狱 | Android 和 iOS 软件 | `isRooted()` (建议默认) |
| 模拟器 | 只有机器人 | `isRunningOnEmulator()`, (中文(简体) ), `isRootedWithEmulator()`, (中文(简体) ), `isRootedWithBusyBoxWithEmulator()`,或个人 `simpleCheck*` 编号 : `check*` 模拟器助手 |
| 更深的根信号 | 只有机器人 | RootBeer支持的助手和内部检查(见下文) |

打开 **iOS系统**, (中文(简体) ), `isRooted()` 是支持的跨平台 API。 模拟器构建总是报告不中断监狱(`false`) (中文(简体) ).

打开 **机器人**,大多数方法只有Android. `isRooted()` 组合 [根比尔](https://github.com/scottyab/rootbeer) capgo内部检查很紧张 模拟检测是 **没有** 默认部分 `isRooted()`; 使用 `isRootedWithEmulator()` 或者说 `isRunningOnEmulator()` 当你想要那个信号时.

## 为什么应用它

-   **减少欺诈和虐待** 在损坏的设备上,攻击者可以钩上API或绕过本地控制.
-   **支持遵守和风险政策** 这需要知道当一个设备 扎根, 监狱破裂,或运行在一个模拟器.
-   **门敏感流量** (支付,PII,高价值行动) 带有明确的设备信任决定,而不是假设OS沙盒完好无损.

此插件与服务器侧验证、 证书针和您自己的威胁模型对等 。 这是一个客户端的信号,而不是一个独立的安全边界.

## 引擎盖底下的是什么

### iOS系统 `isRooted()`

仅在物理设备上运行( 模拟器返回) `false`) (中文(简体) ). 检查按顺序进行; 任何正结果返回断层 :

1.  已知越狱 **路径和应用程序** (Cydia, MobileSubstrate, SSH, Frida, Cycript, 和相关路径).
2.  **限制文件读取** (可以打开可疑路径 `fopen`) (中文(简体) ).
3.  **在沙盒外写作** (测试在下面写) `/private/`) (中文(简体) ).
4.  **`cydia://` 網址** 通过 `canOpenURL`。 。 。 .
5.  **可疑的符号链接** 下级 `/Applications` 财务报告和审定财务报表 `/var/stash/...`。 。 。 .

如果没有一个触发器 **总分** 运行( 阈值) **3个**) (中文(简体) ). 点来自URL/Cydia检查,隐藏的越狱文件,捆绑的plix异常,可疑过程(例如MobileCydia,Cydia,afpd), `/etc/fstab` 大小、 符号链接检查、 缺少可执行路径、 端口27042 的Frida、 已装入图像的FridaGadget 以及调试器附件(`P_TRACED`) (中文(简体) ). 基于分叉的检查是存在的,但目前总是返回虚假的.

### 机器人 `isRooted()`

回返 `true` 若为 **无论是** 根比尔 `isRooted()` **或者说** 队长 `InternalRootDetection.isRooted()` 报告指标:

| 内部检查 | 它要找的东西 |
| --- | --- |
| `isExistBuildTags` | `ro.build.tags` 包含 `test-keys` |
| `doesSuperuserApkExist` | 磁盘上已知的超级用户 APK 路径 |
| `isExistSUPath` | `su` 共同地点下的二进制 |
| `checkDirPermissions` | 可写系统 dirs 或可读 `/data` |
| `checkExecutingCommands` | `which su` 样式命令执行 |
| `checkInstalledPackages` | 黑名单软件包, 只使用根的应用程序, Cydia 底盘 |
| `checkforOverTheAirCertificates` | 失踪 `/etc/security/otacerts.zip` |

**不包括模拟器** 默认 `isRooted()`。 。 。 . `isRootedWithEmulator()` 添加 `isRunningOnEmulator()` (用于包括Genymotion和Google SDK图像在内的普通模拟器的模型,板子,制造商,指纹,和产品heuristics).

### 仅可选的 Android API

当您需要更精细的遥测或自定义策略( 检测方法返回) 时使用此选项 `{ result: boolean }`:

-   **组合 :** `isRootedWithBusyBox()`, (中文(简体) ), `isRootedWithBusyBoxWithEmulator()`
-   **根比尔 :** `detectRootManagementApps()`, (中文(简体) ), `detectPotentiallyDangerousApps()`, (中文(简体) ), `detectTestKeys()`, (中文(简体) ), `checkForBusyBoxBinary()`, (中文(简体) ), `checkForSuBinary()`, (中文(简体) ), `checkSuExists()`, (中文(简体) ), `checkForRWPaths()`, (中文(简体) ), `checkForDangerousProps()`, (中文(简体) ), `checkForRootNative()`, (中文(简体) ), `detectRootCloakingApps()`, (中文(简体) ), `isSelinuxFlagInEnabled()`
-   **内部( 单独曝光 ):** `isExistBuildTags()`, (中文(简体) ), `doesSuperuserApkExist()`, (中文(简体) ), `isExistSUPath()`, (中文(简体) ), `checkDirPermissions()`, (中文(简体) ), `checkExecutingCommands()`, (中文(简体) ), `checkInstalledPackages()`, (中文(简体) ), `checkforOverTheAirCertificates()`
-   **模拟助手 :** `isRunningOnEmulator()`, (中文(简体) ), `simpleCheckEmulator()`, (中文(简体) ), `simpleCheckSDKBF86()`, (中文(简体) ), `simpleCheckQRREFPH()`, (中文(简体) ), `simpleCheckBuild()`, (中文(简体) ), `checkGenymotion()`, (中文(简体) ), `checkGeneric()`, (中文(简体) ), `checkGoogleSDK()`
-   **除错元数据 :** `togetDeviceInfo()` 返回在 Android 上构建和收集的 OS 字段

## 限制( 读此)

所有检测是 **高压**. 固执地攻击者在被植入或被囚禁的装置上可以隐藏二进制、钩子本地代码或结果. **假阳性与假阴性是可能的.** 处理 `result: true` 作为您应用政策的风险信号, 而不是妥协的证据, 永远不能替代服务器侧认证和授权.

## 快速使用

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

// Cross-platform root / jailbreak check
const { result } = await IsRoot.isRooted();
if (result) {
  console.warn('Device may be rooted or jailbroken');
}

// Android: include emulator in the same pass as root checks
const emulatorAware = await IsRoot.isRootedWithEmulator();

// Android: emulator only
const { result: onEmulator } = await IsRoot.isRunningOnEmulator();
```

以下生成完整的 API 引用 `src/definitions.ts`。 。 。 .

## 文档

这里有最完整的医生: [capego.app/docs/插件/is-rout/](https://capgo.app/docs/plugins/is-root/)

## 兼容性

| 插件版本 | 电容兼容性 | 维护 |
| --- | --- | --- |
| 联合国 | 联合国 | ✅ |
| 页:1 | 页:1 | 应要求 |
| 页:1 | 页:1 | ❌ |
| 页:1 | 页:1 | ❌ |

> **说明:** 此插件的主要版本沿用了Capacitor的主要版本. 使用匹配您的 Capacitor 安装的版本( 如 Capacitor 8 的插件 v8) 。 只有最新的主要版本得到积极维护.

## 安装

您可以使用我们的 AI 辅助设置安装插件 。 使用以下命令将 Capgo 技能添加到您的 AI 工具 :

```bash
npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins
```

然后使用下列提示:

```text
Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-is-root` plugin in my project.
```

如果您更喜欢手动设置,请通过运行以下命令来安装插件,并遵循下面的平台特定指令:

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

### 安卓包能见度(API 30+)

当您的应用目标为 Android 11( API 30) 或更高时, 包过滤限制其它应用 `PackageManager` 除非它们被宣布为 `<queries>` 元素或自动可见(例如,您自己的软件包、共享您的UID的应用程序以及某些预先安装的系统软件包)。 此插件传送到 `<queries>` 其 RootBeer 和内部安装的包装检查所需的条目, 以及清单合并将它们添加到您的应用程序中。 您不需要重复这些声明, 除非您用自己的包查看来扩展检测范围 .

`detectPotentiallyDangerousApps()` 不添加 `<queries>` 对于 RootBeer 危险应用软件包的条目,该插件会省略(ROM管理器和盗版应用程序). 除非主机应用程序声明,否则这些安装无法被看到。 显示插件的插件已经从该列表中宣告了我们要检测的选中软件包( 例如) `com.ramdroid.appquarantine` 以及EdXposed经理.

内部安装的包装检查也离开 `org.adblockplus.android` 未申报的,即使列于 `ROOT_ONLY_APPLICATIONS`Adblock Plus是当今的普通应用,所以让它可见就可以算入根入入根入根入根入根.

## iOS系统

不需要配置 。 可以选择的是,插件还可以通过由"越狱"包管理者注册的URL计划来检测出一次越狱. iOS 只回答您的应用程序中宣布的策略, 所以添加您想要检查的选项到 `Info.plist`数字 :

```xml
<key>LSApplicationQueriesSchemes</key>
<array>
  <string>cydia</string>
  <string>sileo</string>
  <string>zbra</string>
  <string>filza</string>
</array>
```

未申报的计划会被忽略. 其他的检查(有根有根和根无根的越狱档案,沙盒完整性,被注入的库)不需要这样的设置.

## API 密码

-   [`isRooted()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isrooted)
-   [`isRootedWithBusyBox()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isrootedwithbusybox)
-   [`detectRootManagementApps()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectrootmanagementapps)
-   [`detectPotentiallyDangerousApps()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectpotentiallydangerousapps)
-   [`detectTestKeys()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detecttestkeys)
-   [`checkForBusyBoxBinary()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkforbusyboxbinary)
-   [`checkForSuBinary()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkforsubinary)
-   [`checkSuExists()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checksuexists)
-   [`checkForRWPaths()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkforrwpaths)
-   [`checkForDangerousProps()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkfordangerousprops)
-   [`checkForRootNative()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkforrootnative)
-   [`detectRootCloakingApps()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectrootcloakingapps)
-   [`isSelinuxFlagInEnabled()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isselinuxflaginenabled)
-   [`isExistBuildTags()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isexistbuildtags)
-   [`doesSuperuserApkExist()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-doessuperuserapkexist)
-   [`isExistSUPath()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isexistsupath)
-   [`checkDirPermissions()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkdirpermissions)
-   [`checkExecutingCommands()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkexecutingcommands)
-   [`checkInstalledPackages()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkinstalledpackages)
-   [`checkforOverTheAirCertificates()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkforovertheaircertificates)
-   [`isRunningOnEmulator()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isrunningonemulator)
-   [`simpleCheckEmulator()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-simplecheckemulator)
-   [`simpleCheckSDKBF86()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-simplechecksdkbf86)
-   [`simpleCheckQRREFPH()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-simplecheckqrrefph)
-   [`simpleCheckBuild()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-simplecheckbuild)
-   [`checkGenymotion()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkgenymotion)
-   [`checkGeneric()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkgeneric)
-   [`checkGoogleSDK()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-checkgooglesdk)
-   [`togetDeviceInfo()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-togetdeviceinfo)
-   [`isRootedWithEmulator()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isrootedwithemulator)
-   [`isRootedWithBusyBoxWithEmulator()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-isrootedwithbusyboxwithemulator)
-   [`getPluginVersion()`](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-getpluginversion)
-   [接口](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-interfaces)

用于检测植入(Android)或jailbroken(iOS)设备的电源插件.

此插件提供了全面的检测方法, 以识别设备是否已经存在 对安全敏感应用可能很重要.

大多数方法都是只使用Android,并使用各种休克来检测根存取. 基础 `isRooted()` 方法在Android和iOS上都有作用.

### 是旋转 ()

```typescript
isRooted() => Promise<DetectionResult>
```

执行默认的根/断壁检测检查.

这是建议的基本根/断膜检测方法. 它为平台运行了最可靠的检测热能组合. 工作在Android和iOS两个方面.

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

**自:** 1.0.0 (单位:千美元)

* * *

### 以 BusyBox () 旋转

```typescript
isRootedWithBusyBox() => Promise<DetectionResult>
```

用 BusyBox 特定检查(仅限Android)来延长默认检测.

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 探测到RootManagementApps ()

```typescript
detectRootManagementApps() => Promise<DetectionResult>
```

检测是否存在已知的根管理应用程序(只有Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检测到可能具有危险性的 Apps ()

```typescript
detectPotentiallyDangerousApps() => Promise<DetectionResult>
```

检测到在植入装置上通常发现的潜在危险应用(仅安卓).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检测 Keys ()

```typescript
detectTestKeys() => Promise<DetectionResult>
```

检测调试/测试构建标记(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查BusyBoxBinary ()

```typescript
checkForBusyBoxBinary() => Promise<DetectionResult>
```

检查设备上是否存在 BusyBox 二进制( 只有Android) .

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查SuBinary ()

```typescript
checkForSuBinary() => Promise<DetectionResult>
```

检查是否 `su` 二进制存在(只有Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查Suexists ()

```typescript
checkSuExists() => Promise<DetectionResult>
```

检测是否 `su` 二进制可以被执行(只有Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查RWPaths ()

```typescript
checkForRWPaths() => Promise<DetectionResult>
```

检测出世界可写系统路径( 只有Android) .

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查危险Props ()

```typescript
checkForDangerousProps() => Promise<DetectionResult>
```

探测到危险的系统属性(仅Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 选中此项( C)

```typescript
checkForRootNative() => Promise<DetectionResult>
```

执行RootBeer本土检查(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 探测到 RootCloaking Apps ()

```typescript
detectRootCloakingApps() => Promise<DetectionResult>
```

检测能隐藏root(只有Android)的应用程序.

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 已忽略

```typescript
isSelinuxFlagInEnabled() => Promise<DetectionResult>
```

检查 SELinux 执行状态(只有Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 已存在 BuildTags ()

```typescript
isExistBuildTags() => Promise<DetectionResult>
```

检测测试在OS图像上构建标记(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### does SuperuserApkExist () (中文(简体) )

```typescript
doesSuperuserApkExist() => Promise<DetectionResult>
```

检测是否安装了超级用户APK(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 存在SUPath( )

```typescript
isExistSUPath() => Promise<DetectionResult>
```

检查已知 `su` 二进制位置( 只有Android) .

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查

```typescript
checkDirPermissions() => Promise<DetectionResult>
```

检测到应当被保护的可写目录( 只有Android) .

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查执行命令( C)

```typescript
checkExecutingCommands() => Promise<DetectionResult>
```

执行 `which su` 样式命令以检测根(只有Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 已安装的套件( C)

```typescript
checkInstalledPackages() => Promise<DetectionResult>
```

检测出已安装的可疑软件包( 只有Android) .

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查过航空器证书( C)

```typescript
checkforOverTheAirCertificates() => Promise<DetectionResult>
```

探测器篡改了OTA证书(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### isRunning On模拟器( )

```typescript
isRunningOnEmulator() => Promise<DetectionResult>
```

检测出常见的仿真器指纹(只有Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 简单的检查模拟器( )

```typescript
simpleCheckEmulator() => Promise<DetectionResult>
```

执行轻量级模拟器检查(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 简单检查SDKBF86 ()

```typescript
simpleCheckSDKBF86() => Promise<DetectionResult>
```

检测出x86仿真指纹(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 简单检查QREFPH ()

```typescript
simpleCheckQRREFPH() => Promise<DetectionResult>
```

检测QC参考电话构建(仅Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 简单检查构建 ()

```typescript
simpleCheckBuild() => Promise<DetectionResult>
```

探测器构建主机异常(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查Genymotion ()

```typescript
checkGenymotion() => Promise<DetectionResult>
```

检测出Genymotion模拟器指纹(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查Generic ()

```typescript
checkGeneric() => Promise<DetectionResult>
```

检测出通用仿真器指纹(仅Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 检查 GoogleSDK ()

```typescript
checkGoogleSDK() => Promise<DetectionResult>
```

检测出谷歌SDK模拟器指纹(仅限Android).

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 获取DeviceInfo ()

```typescript
togetDeviceInfo() => Promise<DeviceInfo>
```

返回检测时收集的设备信息.

提供关于原设备的额外上下文和元数据 在根检测过程中收集。 用于调试 和伐木目的.

**回返情况:** `Promise<[DeviceInfo](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-deviceinfo)>`

**自:** 1.0.0 (单位:千美元)

* * *

### is Rooted With Emotor () 自动调试器

```typescript
isRootedWithEmulator() => Promise<DetectionResult>
```

以模拟器heuristics(只有Android)扩展默认检测.

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 以 BusyBox With Emotor () 旋转

```typescript
isRootedWithBusyBoxWithEmulator() => Promise<DetectionResult>
```

以模拟器heuristics(仅限Android)扩展 BusyBox 检测.

**回返情况:** `Promise<[DetectionResult](https://npmcn.com/package/%40capgo/capacitor-is-root/#readme-detectionresult)>`

* * *

### 获取 PluginVersion ()

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

获取本地 Capacitor 插件版本 .

**回返情况:** `Promise<{ version: string; }>`

**自:** 1.0.0 (单位:千美元)

* * *

### 接口

#### 检测结果

以根/断壁检测方法返回结果.

| Prop | 类型 | 说明 | 自兹 |
| --- | --- | --- | --- |
| **`result`** | `boolean` | `true` 当相关的休眠检测出 根/断壳器. `false` 当找不到根/断裂指标时. | 1.0.0 (单位:千美元) |

#### 设备信息

探测时收集的设备信息.

### 贷项

此插件的灵感来自 [https://github.com/WuglyakBolgoink/cordova-plugin-iroot 页面存档备份,存于互联网档案馆](https://github.com/WuglyakBolgoink/cordova-plugin-iroot)

## 常见问题

### @capgo/capacitor-is-root 是什么？

Capacitor的监狱破损/ Root检测插件。 检测Android root, iOS 越狱, 以及模拟器\( 当请求时\) \.

### 如何安装 @capgo/capacitor-is-root？

在项目目录运行 npm install @capgo/capacitor-is-root，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：@capacitor/core（\>=8\.0\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @capgo/capacitor-is-root 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @capgo/capacitor-is-root 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @capgo/capacitor-is-root 可以商用吗？

@capgo/capacitor-is-root 使用 MPL-2\.0 许可。弱 Copyleft：可以商用，也可以和闭源代码一起使用；但如果分发时修改了 MPL 授权的文件，这些文件的修改需以 MPL 开源。以上为概括，不构成法律意见，请以许可原文为准。

### @capgo/capacitor-is-root 的下载量有多少？

根据 npm 官方下载统计，@capgo/capacitor-is-root 在 2026/10/09 – 2026/11/07 这 30 天内被下载 55,403 次，日均约 1,847 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @capgo/capacitor-is-root 还在维护吗？

最新版本 8\.2\.5 发布于 2026/10/18（21 天前）；至今共发布 30 个版本，其中过去 12 个月发布了 27 个；首次发布于 2025/09/23。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

