反馈BUG之前,先issue里面搜看看有没有别人已经反馈过,重复的不予处理!!
问题描述
最近下了一个不可描述APP,实机是能运行的,不过在VXP里则报如下错误
07-14 15:48:28.672 13477 13477 E test2:fake_dlfcn: /system/lib/libart.so not found in my userspace
07-14 15:48:28.750 602 602 E SELinux : avc: denied { find } for service=persistent_data_block pid=13477 uid=10195 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:persistent_data_block_service:s0 tclass=service_manager permissive=0
07-14 15:48:28.750 13477 13477 W MethodInvocationStub: Unable to build HookDelegate: BinderInvocationStub.
07-14 15:48:28.772 13477 13477 W MethodInvocationStub: The Hook(finishActivity, com.lody.virtual.client.hook.proxies.am.ActivityTaskManagerStub$3) you added has been in existence.
07-14 15:48:28.774 13477 13477 I TransactionHandlerStub: inject transaction handler.
07-14 15:48:28.775 13477 13477 I TransactionHandlerStub: executor's handler: android.app.TransactionHandlerProxy@820b2dd
07-14 15:48:28.786 13477 13477 I TransactionHandlerProxy: getActivityClient : android.os.BinderProxy@3a2307f
07-14 15:48:28.790 13477 13477 I TransactionHandlerProxy: restart process, return
07-14 15:48:28.794 13477 13477 I VClientImpl: Binding application com.test.data, (com.test.data)
07-14 15:48:28.808 13477 13477 W System.err: java.lang.reflect.InvocationTargetException
07-14 15:48:28.808 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)
07-14 15:48:28.808 13477 13477 W System.err: at mirror.RefStaticMethod.call(RefStaticMethod.java:119)
07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.(SpecialComponentList.java:77)
07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.isConflictingInstrumentation(SpecialComponentList.java:92)
07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationNoCheck(VClientImpl.java:322)
07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplication(VClientImpl.java:218)
07-14 15:48:28.808 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationForActivity(VClientImpl.java:213)
07-14 15:48:28.808 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:149)
07-14 15:48:28.808 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:146)
07-14 15:48:28.808 13477 13477 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
07-14 15:48:28.808 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
07-14 15:48:28.808 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
07-14 15:48:28.808 13477 13477 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
07-14 15:48:28.809 13477 13477 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
07-14 15:48:28.809 13477 13477 W System.err: at android.os.Looper.loop(Looper.java:214)
07-14 15:48:28.809 13477 13477 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)
07-14 15:48:28.809 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)
07-14 15:48:28.809 13477 13477 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
07-14 15:48:28.809 13477 13477 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
07-14 15:48:28.809 13477 13477 W System.err: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.PackageManager android.app.Application.getPackageManager()' on a null object reference
07-14 15:48:28.809 13477 13477 W System.err: at android.webkit.WebViewFactory.isWebViewSupported(WebViewFactory.java:111)
07-14 15:48:28.809 13477 13477 W System.err: at android.webkit.WebViewFactory.getUpdateService(WebViewFactory.java:474)
07-14 15:48:28.809 13477 13477 W System.err: ... 19 more
07-14 15:48:28.810 13477 13477 W System.err: java.lang.NullPointerException: null receiver
07-14 15:48:28.810 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)
07-14 15:48:28.810 13477 13477 W System.err: at mirror.RefMethod.call(RefMethod.java:63)
07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.(SpecialComponentList.java:77)
07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.env.SpecialComponentList.isConflictingInstrumentation(SpecialComponentList.java:92)
07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationNoCheck(VClientImpl.java:322)
07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplication(VClientImpl.java:218)
07-14 15:48:28.810 13477 13477 W System.err: at com.lody.virtual.client.VClientImpl.bindApplicationForActivity(VClientImpl.java:213)
07-14 15:48:28.810 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:149)
07-14 15:48:28.810 13477 13477 W System.err: at android.app.TransactionHandlerProxy.handleLaunchActivity(TransactionHandlerProxy.java:146)
07-14 15:48:28.810 13477 13477 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
07-14 15:48:28.810 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
07-14 15:48:28.810 13477 13477 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
07-14 15:48:28.810 13477 13477 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
07-14 15:48:28.810 13477 13477 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
07-14 15:48:28.810 13477 13477 W System.err: at android.os.Looper.loop(Looper.java:214)
07-14 15:48:28.810 13477 13477 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)
07-14 15:48:28.810 13477 13477 W System.err: at java.lang.reflect.Method.invoke(Native Method)
07-14 15:48:28.810 13477 13477 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
07-14 15:48:28.810 13477 13477 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
07-14 15:48:28.811 13477 13477 I VClientImpl: Xposed is enabled.
07-14 15:48:28.812 13477 13477 D NativeEngine: DexOrJarPath = /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk, OutputPath = null.
07-14 15:48:28.808 13477 13477 W m.test.data: type=1400 audit(0.0:360): avc: granted { execute } for path="/data/data/io.va.exposed/virtual/data/app/com.test.data/oat/arm/base.odex" dev="sda13" ino=2024095 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-14 15:48:28.815 13477 13477 D NativeEngine: DexOrJarPath = /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk, OutputPath = null.
07-14 15:48:28.817 13477 13477 W o.va.exposed:p: ClassLoaderContext classpath size mismatch. expected=0, found=1 (PCL[] | PCL[/data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk*3789797101])
07-14 15:48:28.817 13477 13477 W o.va.exposed:p: Found duplicate classes, falling back to extracting from APK : /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk
07-14 15:48:28.817 13477 13477 W o.va.exposed:p: NOTE: This wastes RAM and hurts startup performance.
07-14 15:48:28.817 13477 13477 W o.va.exposed:p: Found duplicated class when checking oat files: 'LMTT/ThirdAppInfoNew;' in /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk and /data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk
07-14 15:48:28.817 13477 13477 W o.va.exposed:p:
07-14 15:48:29.079 13477 13477 W o.va.exposed:p: JIT profile information will not be recorded: profile file does not exits.
07-14 15:48:29.079 13477 13477 W o.va.exposed:p: JIT profile information will not be recorded: profile file does not exits.
07-14 15:48:29.101 13477 13477 I ExposedBridge: com.test.data is not a Xposed module, do not init epic.force
07-14 15:48:29.102 13477 13477 D ExposedBridge: xposed installer's modules not exist, ignore.
07-14 15:48:29.102 13477 13477 I ExposedBridge: module:/data/user/0/io.va.exposed/virtual/data/app/de.robv.android.xposed.installer/base.apk is disabled, ignore
07-14 15:48:29.102 13477 13477 D ExposedBridge: xposed installer's modules not exist, ignore.
07-14 15:48:29.102 13477 13477 I ExposedBridge: module:/data/user/0/io.va.exposed/virtual/data/app/com.test.data/base.apk is disabled, ignore
07-14 15:48:29.104 13477 13477 I MultiDex: VM with version 2.1.0 has multidex support
07-14 15:48:29.104 13477 13477 I MultiDex: Installing application
07-14 15:48:29.104 13477 13477 I MultiDex: VM has multidex support, MultiDex support library is disabled.
07-14 15:48:29.102 13477 13477 W m.test.data: type=1400 audit(0.0:362): avc: granted { execute } for path="/data/data/io.va.exposed/virtual/data/app/com.test.data/lib/libnative-lib.so" dev="sda13" ino=2024087 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
07-14 15:48:29.113 13477 13477 I o.va.exposed:p: System.exit called, status: -1112314295
07-14 15:48:29.113 13477 13477 I AndroidRuntime: VM exiting with result code -1112314295, cleanup skipped.
07-14 15:48:29.126 1371 7490 I ActivityManager: Process io.va.exposed:p0 (pid 13477) has died: fore TOP
它在onCreate的时候 调用里 一个native静态方法,用于校验包的SHA值,
public class App extends MultiDexApplication {
@override
public void onCreate(){
super.onCreate();
....
sign.check(this);
}
}
看smali 和ida 的伪代码,它传入了一个Context 到 native 方法 然后尝试调用 PackageManager 时 传入的 Context 是NULL导致的?
希望大神帮忙。
v4 = ((int (__fastcall *)(JNIEnv *))(*a1)->GetObjectClass)(a1);
v5 = v4;
v6 = ((int (__fastcall *)(JNIEnv *, int, const char *, const char *))(*v2)->GetMethodID)(
v2,
v4,
"getPackageManager",
"()Landroid/content/pm/PackageManager;");
v7 = _JNIEnv::CallObjectMethod(v2, v3, v6);
复现步骤
(请分步骤描述如何复现这个BUG,非毕现BUG请给出如何能大概率复现的步骤)
环境
机型:K20Pro MIUI12 / Pixel 2XL ASOP10 / MEIZU 16s Android 9
系统版本:
ROM版本:
Xposed 插件以及插件版本:
VirtualXposed版本:0.18.2
补充
(别的需要描述的内容)
写完之后,请自己再读一遍自己写的,如果你自己都读不懂,就不用说修复了