简介
简介Capacitor 是用于检测安卓设备是否被 ROOT 或 iOS 设备是否被越狱的根插件。
核心功能
核心功能isRooted- 执行默认的 ROOT/JAILBREAK 检测检查。isRootedWithBusyBox- 扩展默认检测,针对安卓设备进行 BusyBox 特定检查。detectRootManagementApps- 检测是否存在已知的 ROOT 管理应用程序 (安卓设备仅限)。detectPotentiallyDangerousApps- 检测安卓根设备上常见的危险应用程序 (安卓设备仅限)。
公共 API
公共 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设备上的世界可写系统路径(仅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 Checks for known |
checkInstalledPackages | Detects writable directories that should be protected (Android only). |
checkforOverTheAirCertificates | 检测 OTA 证书的篡改 (仅限 Android)。 |
isRunningOnEmulator | 检测常见的模拟器指纹 (仅限 Android)。 |
simpleCheckEmulator | 在 Android 上执行轻量级模拟器检查。 |
simpleCheckSDKBF86 | 检测 x86 模拟器指纹 (仅限 Android)。 |
simpleCheckQRREFPH | 检测 QC 参考手机构建 (仅限 Android)。 |
simpleCheckBuild | 检测构建主机异常 (仅限 Android)。 |
checkGenymotion | 检测 Genymotion 模拟器指纹 (仅限 Android)。 |
checkGeneric | 检测通用模拟器指纹 (仅限 Android)。 |
checkGoogleSDK | 检测 Google SDK 模拟器指纹 (仅限 Android)。 |
togetDeviceInfo | 返回检测过程中收集的设备信息。 |
isRootedWithEmulator | 在 Android 上扩展默认检测以使用模拟器 heuristics。 |
isRootedWithBusyBoxWithEmulator | 在 Android 上扩展 BusyBox 检测以使用模拟器 heuristics。 |
getPluginVersion | 获取本地 Capacitor 插件版本。 |
真实来源
标题:真实来源此参考资料是从 src/definitions.ts 在 capacitor-is-root.