跳过内容

@capgo/capacitor-is-root

Capacitor 是根设备检测插件,用于检测安卓设备是否被根化或 iOS 设备是否被越狱。

Capacitor 是根设备检测插件,用于检测安卓设备是否被根化或 iOS 设备是否被越狱。

核心功能

核心功能部分
  • isRooted - 执行默认的root/jailbreak检测检查。
  • isRootedWithBusyBox - 扩展了默认检测,使用BusyBox特定检查(仅限Android)。
  • detectRootManagementApps - 检测是否存在已知的root管理应用程序(仅限Android)。
  • detectPotentiallyDangerousApps - 检测根设备上常见的危险应用程序(仅限Android)。
方法描述
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.tsCapgo-capacitor-is-root.