概述
概述部分Capacitor 是根设备检测插件,用于检测安卓设备是否被根化或 iOS 设备是否被越狱。
核心功能
核心功能部分isRooted- 执行默认的root/jailbreak检测检查。isRootedWithBusyBox- 扩展了默认检测,使用BusyBox特定检查(仅限Android)。detectRootManagementApps- 检测是否存在已知的root管理应用程序(仅限Android)。detectPotentiallyDangerousApps- 检测根设备上常见的危险应用程序(仅限Android)。
Public API
标题:公共API| 方法 | 描述 |
|---|---|
isRooted | 执行默认的root/jailbreak检测检查。 |
isRootedWithBusyBox | 扩展了默认检测,使用BusyBox特定检查(仅限Android)。 |
detectRootManagementApps | 检测是否存在已知的root管理应用程序(仅限Android)。 |
detectPotentiallyDangerousApps | 检测根设备上常见的危险应用程序(仅限Android) |
detectTestKeys | 检测检测到debug/test构建标签(仅限Android)。 |
checkForBusyBoxBinary | 检查设备上是否存在BusyBox二进制文件(仅限Android)。 |
checkForSuBinary | 检查是否存在 su 二进制文件(仅限Android)。 |
checkSuExists | 检测是否可以执行 su 二进制文件(仅限Android)。 |
checkForRWPaths | 检测系统路径(仅限Android)。 |
checkForDangerousProps | 检测危险的系统属性(仅限Android)。 |
checkForRootNative | 执行RootBeer本地检查(仅限Android)。 |
detectRootCloakingApps | 检测可以隐藏root的应用程序(仅限Android)。 |
isSelinuxFlagInEnabled | 检查SELinux执行状态(仅限Android)。 |
isExistBuildTags | 检测操作系统映像上的测试构建标签(仅限Android)。 |
doesSuperuserApkExist | 检测是否安装了超级用户APK(仅限Android)。 |
isExistSUPath | 检查已知 su 二进制位置(仅限Android)。 |
checkDirPermissions | 检测应保护的可写目录(仅限Android)。 |
checkExecutingCommands | 执行 which su 样式命令以检测根(仅限Android)。 |
checkInstalledPackages | 检测可疑安装的包(仅限Android)。 |
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 | 扩展默认检测以使用模拟器 heuristics(仅限 Android)。 |
isRootedWithBusyBoxWithEmulator | 扩展 BusyBox 检测以使用模拟器 heuristics(仅限 Android)。 |
getPluginVersion | 获取本机 Capacitor 插件版本。 |
真实来源
标题:真实来源此参考来源于 src/definitions.ts 在 Capgo-capacitor-is-root.