picone / ZhihuXposed

知乎的Xposed插件
GNU Lesser General Public License v3.0
90 stars 4 forks source link

Hook classloader可能会影响正常hook函数的加载 #11

Closed kotori2 closed 4 years ago

kotori2 commented 5 years ago

(手抖按到了回车 按理来讲应该放在最后hook的,但是貌似放在最后依旧会产生报错,或许需要根据堆栈判断白名单

11-08 22:14:42.093 24831 24873 E EdXposed: error occur when generating dex. dexDir=null
11-08 22:14:42.093 24831 24873 E EdXposed: java.lang.NullPointerException: ClassLoader.loadClass returned null for de.robv.android.xposed.XposedBridge$AdditionalHookInfo
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.lang.Class.getDeclaredMethodInternal(Native Method)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.lang.Class.getPublicMethodRecursive(Class.java:2079)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.lang.Class.getMethod(Class.java:2066)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.lang.Class.getMethod(Class.java:1693)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.elderdrivers.riru.edxp.yahfa.dexmaker.DynamicBridge.hookMethod(DynamicBridge.java:6219)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.elderdrivers.riru.edxp.yahfa.config.YahfaHookProvider.hookMethod(YahfaHookProvider.java:19)
11-08 22:14:42.093 24831 24873 E EdXposed:      at de.robv.android.xposed.XposedBridge.hookMethodNative(XposedBridge.java:458)
11-08 22:14:42.093 24831 24873 E EdXposed:      at de.robv.android.xposed.PendingHooks.hookPendingMethod(PendingHooks.java:23)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.elderdrivers.riru.edxp.art.ClassLinker.onPostFixupStaticTrampolines(ClassLinker.java:22)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.ZHObjectAllRegistry.registerAllSubTypes(ZHObjectAllRegistry.java:119)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.bangcle.andjni.JniLib.cL(Native Method)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.ZHObjectAllRegistry.getRegistry(Unknown Source:15)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.ZHObjectRegistryCenter$InnerDeserializer.registerAllSubTypes(ZHObjectRegistryCenter.java:47)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.bangcle.andjni.JniLib.cV(Native Method)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.ZHObjectRegistryCenter$InnerDeserializer.init(Unknown Source:15)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.bangcle.andjni.JniLib.cV(Native Method)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.ZHObjectRegistryCenter.apply(Unknown Source:18)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.f.<clinit>(JsonUtils.java:45)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.f.a(Unknown Source:0)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.net.cache.Result.fromJsonCache(Result.java:108)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.net.cache.f.a(JacksonAdapter.java:28)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.net.cache.c.a(BaseFileCacheAdapter.java:75)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.appconfig.a.b(AppConfig.java:65)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.appconfig.a.a(AppConfig.java:55)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.appconfig.a.a(AppConfig.java:93)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.app.j.a.b(ApmSwitch.java:140)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.app.j.a.a(ApmSwitch.java:134)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.app.j.a.a(ApmSwitch.java:126)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.i.a(OkHttpGlobalEventListener.java:61)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.i.<init>(OkHttpGlobalEventListener.java:52)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.bangcle.andjni.JniLib.cL(Native Method)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.api.util.i$a.create(Unknown Source:18)
11-08 22:14:42.093 24831 24873 E EdXposed:      at okhttp3.internal.b.j.<init>(Transmitter.java:83)
11-08 22:14:42.093 24831 24873 E EdXposed:      at okhttp3.z.a(RealCall.java:64)
11-08 22:14:42.093 24831 24873 E EdXposed:      at okhttp3.x.a(OkHttpClient.java:401)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.app.util.dg.a(OfficeNetChecker.java:101)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.app.util.dg.lambda$xAd4wVXG2unlvx9ixM_3cquKe9s(Unknown Source:0)
11-08 22:14:42.093 24831 24873 E EdXposed:      at com.zhihu.android.app.util.-$$Lambda$dg$xAd4wVXG2unlvx9ixM_3cquKe9s.subscribe(Unknown Source:0)
11-08 22:14:42.093 24831 24873 E EdXposed:      at io.reactivex.e.e.f.a.a(SingleCreate.java:39)
11-08 22:14:42.093 24831 24873 E EdXposed:      at io.reactivex.ac.subscribe(Single.java:3438)
11-08 22:14:42.093 24831 24873 E EdXposed:      at io.reactivex.e.e.f.t$a.run(SingleSubscribeOn.java:89)
11-08 22:14:42.093 24831 24873 E EdXposed:      at io.reactivex.ab$a.run(Scheduler.java:578)
11-08 22:14:42.093 24831 24873 E EdXposed:      at io.reactivex.e.g.m.run(ScheduledRunnable.java:66)
11-08 22:14:42.093 24831 24873 E EdXposed:      at io.reactivex.e.g.m.call(ScheduledRunnable.java:57)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-08 22:14:42.093 24831 24873 E EdXposed:      at java.lang.Thread.run(Thread.java:919)