Root 检测
使用多种方法进行高级 Android root 检测 🔒
Capacitor Is Root 插件为 Android 设备提供全面的 root 和越狱检测以及模拟器检测。此插件通过识别可能构成安全风险的受损设备和模拟环境来帮助增强应用安全性。
Root 检测
使用多种方法进行高级 Android root 检测 🔒
模拟器检测
识别模拟环境和测试框架 🛡️
安全验证
多种检测技术以提高准确性 ✅
专注于 Android
专门用于 Android 安全评估的检测 🤖
npm install @capgo/capacitor-is-rootnpx cap syncisRooted() - 使用默认方法执行全面的 root 检测isRootedWithBusyBox() - 包括 BusyBox 检查的扩展检测detectRootManagementApps() - 识别已安装的 root 管理应用程序checkForSuBinary() - 检查系统路径中是否存在 su 二进制文件isRunningOnEmulator() - 检测常见的 Android 模拟器指纹插件采用多种检测方法:
import { IsRoot } from '@capgo/capacitor-is-root';
// 基本 root 检测const rootResult = await IsRoot.isRooted();if (rootResult.isRooted) { console.log('Device is rooted'); // 适当处理已 root 的设备}
// 使用 BusyBox 的扩展 root 检测const extendedResult = await IsRoot.isRootedWithBusyBox();if (extendedResult.isRooted) { console.log('Device is rooted (extended check)');}
// 检查模拟器const emulatorResult = await IsRoot.isRunningOnEmulator();if (emulatorResult.isEmulator) { console.log('Running on emulator');}
// 检测 root 管理应用const rootAppsResult = await IsRoot.detectRootManagementApps();if (rootAppsResult.hasRootApps) { console.log('Root management apps detected');}查看完整文档以获取详细的实施指南和高级安全模式。