-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
黑名单或深灰名单方法不生效 #4
Comments
我测试了这个方法,确实报 NoSuchMethodException,但是没有任何诸如:
之类的提示,我怀疑是不是真的没有这个方法。 另外,对于方法
结合 1、3,可以看出:深灰名单在 target api >= 28的时候表现为黑名单,< 28为浅灰名单。再对比1、2,3、4,说明本库是可以正常工作的。 之所以怀疑源码不是同步的,是因为我发现另外一个方法:
但是android p的模拟器上,并无这个方法,而是这个:
|
所以目前判断应该是rom上确实无此方法,源码同步上存在问题 |
这个也一样,AOSP源码上有,但是报NoSuchMethodException AssetManager.class.getDeclaredMethod("addAssetPaths", String[].class); |
AssetManager 这个类已经很久没有动过了,难道是黑名单有特殊的处理方式?但是 https://android.googlesource.com/platform/frameworks/base/+/android-p-preview-3/config/ 也没有任何黑名单列表,真是奇怪了。。 |
|
AssetManager深灰名单
|
若您想在 adb logcat 中显示 API 访问信息,您可通过以下命令更改 API 执行策略:
这个都不行。 |
AOSP代码中无android.content.res.ApkAssets类,但是dump出来,有android.content.res.ApkAssets类
极大的问题还是出在AOSP源码上 |
Google 在耍什么花招。。😅 |
的确是源码的问题,今天发布的源码里面,并无此方法:https://android.googlesource.com/platform/frameworks/base/+/android-9.0.0_r3/core/java/android/content/res/AssetManager.java 之前的一些疑点也得到了确认。 |
现象遇到类似问题: activityManagerNative = Class.forName("android.app.ActivityManagerNative");
Object amn = activityManagerNative.getMethod("getDefault").invoke(activityManagerNative); 报错: 解决方案从之前 Reflection.unseal(base); 换成 https://github.com/whulzz1993/RePublic 具体步骤: 把其中的核心代码
|
设备:Pixel DP3
源码:https://android.googlesource.com/platform/frameworks/base/+/android-p-preview-3/core/java/android/content/res/AssetManager.java#305
代码片段:
异常:
The text was updated successfully, but these errors were encountered: