合规检测器-基于工信部最新标准
下面是我基于工信部文件
整理出来已经hook
了的方法,如有其他的可以提个issue
。
包名 | 方法名 |
---|---|
android.telephony.TelephonyManager | getDeviceId,getImei,getSubscriberId |
android.net.wifi.WifiInfo | getMacAddress |
java.net.NetworkInterface | getHardwareAddress |
android.provider.Settings.Secure | getString(AndroidId) |
LocationManager | getLastKnownLocation,requestLocationUpdates |
待新增 |
maven { url 'https://jitpack.io' }
def checkerV = "v1.0.1"
基于pine,适配4.4-12.1
版本,感谢大佬的无私奉献。
debugImplementation "com.github.simplepeng.HeGuiChecker:checker-pine:$checkerV"
releaseImplementation "com.github.simplepeng.HeGuiChecker:checker-no-op:$checkerV"
基于SandHook,已适配4.4-11
版本,感谢大佬的无私奉献。
debugImplementation "com.github.simplepeng.HeGuiChecker:checker:$checkerV"
releaseImplementation "com.github.simplepeng.HeGuiChecker:checker-no-op:$checkerV"
因为SandHook
的限制的,targetSdk>28
初始化会闪退,所以在测试的时候:
请设置targetSdk = 28
请设置targetSdk = 28
请设置targetSdk = 28
pine
则不需要,所以更推荐pine版本
。
或者:配置一个productFlavors
或许会更方便。
后记:但是我看SandHook
的PR
里有人提交了修复,等大佬合并吧。
基于ContentProvider
自动初始化,无需引入初始化代码
输出:
显示:
当然你也可以关闭输出
或显示
HeGuiChecker.SHOW_LOG = false
HeGuiChecker.SHOW_TOAST = false
或者在同意授权后
不再显示任何信息
HeGuiChecker.allow(true)
- v1.0.1:基于
pine
重写 - v1.0.0:首次上传