Capacitor 是用于检测 Android 设备是否被 ROOT 或 iOS 设备是否被越狱的根插件。
isRooted- 执行默认的 ROOT/JAILBREAK 检测检查。isRootedWithBusyBox- 在 Android 设备上扩展默认检测,使用 BusyBox 特定的检查。detectRootManagementApps- 检测 Android 设备上已知的 ROOT 管理应用程序是否存在。detectPotentiallyDangerousApps- 检测 Android 设备上常见的 ROOT 设备中发现的潜在危险应用程序。
公共 API
Section titled “公共 API”| 方法 | 描述 |
|---|---|
isRooted | 执行默认的root/jailbreak检测检查。 |
isRootedWithBusyBox | 扩展默认检测,仅在Android上使用BusyBox特定的检查。 |
detectRootManagementApps | 检测是否存在已知的root管理应用程序(仅Android)。 |
detectPotentiallyDangerousApps | 检测常见于root设备上的潜在危险应用程序(仅Android)。 |
detectTestKeys | 检测Android上的debug/test构建标签。 |
checkForBusyBoxBinary | 检查设备上是否存在BusyBox二进制文件(仅Android)。 |
checkForSuBinary | 检查设备上是否存在 su 二进制文件(仅Android)。 |
checkSuExists | 检测设备上是否存在可执行的 su 二进制文件(仅Android)。 |
checkForRWPaths | 检测Android上的世界可写系统路径。 |
checkForDangerousProps | 检测Android上的危险系统属性。 |
checkForRootNative | 执行 RootBeer 原生检查 (仅限 Android)。 |
detectRootCloakingApps | 检测可以隐藏 root 的应用 (仅限 Android)。 |
isSelinuxFlagInEnabled | 检查 SELinux 强制执行状态 (仅限 Android)。 |
isExistBuildTags | 检测 OS 镜像上的测试构建标签 (仅限 Android)。 |
doesSuperuserApkExist | 检测是否安装了超级用户 APK (仅限 Android)。 |
isExistSUPath | 检查已知的二进制位置 (仅限 Android)。 su 检测应该被保护的可写目录 (仅限 Android)。 |
checkDirPermissions | 执行样式命令以检测 root (仅限 Android)。 |
checkExecutingCommands | 检测可疑的安装包 (仅限 Android)。 which su 检测 OTA 证书被篡改 (仅限 Android)。 |
checkInstalledPackages | Executes RootBeer native checks (iOS only). |
checkforOverTheAirCertificates | Detects applications that can hide root (iOS only). |
isRunningOnEmulator | 检测常见的模拟器指纹(仅限Android)。 |
simpleCheckEmulator | 轻量级模拟器检查(仅限Android)。 |
simpleCheckSDKBF86 | 检测x86模拟器指纹(仅限Android)。 |
simpleCheckQRREFPH | 检测QC参考手机构建(仅限Android)。 |
simpleCheckBuild | 检测构建主机异常(仅限Android)。 |
checkGenymotion | 检测Genymotion模拟器指纹(仅限Android)。 |
checkGeneric | 检测通用模拟器指纹(仅限Android)。 |
checkGoogleSDK | 检测Google SDK 模拟器指纹(仅限Android)。 |
togetDeviceInfo | 返回检测过程中收集的设备信息。 |
isRootedWithEmulator | 扩展默认检测模拟器指纹(仅限Android)。 |
isRootedWithBusyBoxWithEmulator | 扩展BusyBox检测模拟器指纹(仅限Android)。 |
getPluginVersion | 获取本机 Capacitor 插件版本。 |
真实来源
名为“真实来源”的部分此参考资料是从 src/definitions.ts 在 capacitor-is-root.
从@capgo/capacitor-is-root继续
名为“从@capgo/capacitor-is-root继续”的部分如果您正在使用 @capgo/capacitor-is-root 来规划原生插件工作,连接它 使用@capgo/capacitor-is-root 为原生能力在使用@capgo/capacitor-is-root Capgo 插件目录 在 Capgo 插件目录中管理产品工作流程 Capacitor 由 Capgo 提供 了解在 Capacitor 由 Capgo 提供中实现细节 添加或更新插件 了解添加或更新插件的实现细节 Ionic 企业插件替代品 了解 Ionic 企业插件替代品中的产品工作流程