绕过Android 对非SDK接口的限制

warning: 这篇文章距离上次修改已过969天,其中的内容可能已经有所变动。

原理见:http://weishu.me/2018/06/07/free-reflection-above-android-p/
使用方法:

//https://github.com/tiann/FreeReflection
implementation 'me.weishu:free_reflection:1.2.0'
然后在application的 attachBaseContext 方法中初始化
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0
Reflection.unseal(base)
}
注:好像有的系统会闪退
---------------------------------------
可以使用另一个库
//https://github.com/ChickenHook/RestrictionBypass
implementation 'com.github.ChickenHook:RestrictionBypass:2.2'

none
最后修改于:2021年08月02日 20:28

添加新评论