Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

antivm

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

AntiVm

Android 端环境检测库,可以检测当前的设备是否被 Root,是否有 Xposed 等勾子程序,当前 App 是否运行在模拟器,是否被双开。

打算在后续加入更多检测项。


使用方法

pascal
compile 'com.github.rarnu:antivm:1.0.0'

在你的项目中只需要访问以下方法即可:

pascal
AntiVM.init()       // 在程序启动时执行初始化
AntiVM.isEmulator() // 是否运行在模拟器内
AntiVM.isRooted()   // 设备是否被 Root
AntiVM.isHooked()   // 设备是否被 Hook
AntiVM.isInVM()     // 是否运行于虚拟机环境(双开,分身等)

编译 NDK 代码

如果需要自行修改并编译 NDK 部分代码,请先参考 fpccmd 项目,并编译其可执行程序。

执行以下命令以完成编译:

pascal
$ fpccmd AA antivm.ppr          # ?????? ARM ????????????
$ fpccmd AI antivm.ppr          # ?????? x86 ????????????