Mocha-L / QuJing

曲境是一个xposed模块,可支持在PC浏览器上动态监控(hook)安卓APP的函数调用和查看堆栈信息,及反射调用(invoke)等功能。
GNU Affero General Public License v3.0
655 stars 108 forks source link

作者你好 我发现了找不到类的原因了 大家可以尝试一下 #3

Closed HuRuWo closed 3 years ago

HuRuWo commented 3 years ago

Snipaste_2021-03-17_15-15-30

我在调试的时候 发现这个classloader是错误的

dalvik.system.PathClassLoader[DexPathList[[zip file "/system/app/webview/webview.apk"],nativeLibraryDirectories=[/system/app/webview/lib/arm, /system/app/webview/webview.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /system/lib, /vendor/lib]]]

并不是当前应用的classloader

HuRuWo commented 3 years ago

`2021-03-17 15:53:41.322 6584-6584/? E/LogXutils: gatherInfodalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sinovatech.unicom.ui-bUxzf0ek37AOrk-5gZFsrA==/base.apk"],nativeLibraryDirectories=[/data/app/com.sinovatech.unicom.ui-bUxzf0ek37AOrk-5gZFsrA==/lib/arm, /data/app/com.sinovatech.unicom.ui-bUxzf0ek37AOrk-5gZFsrA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]]

2021-03-17 15:53:41.322 6584-6584/? E/LogXutils: com.sinovatech.unicom.ui

2021-03-17 15:53:41.353 6584-6584/? E/LogXutils: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sinovatech.unicom.ui-bUxzf0ek37AOrk-5gZFsrA==/base.apk"],nativeLibraryDirectories=[/data/app/com.sinovatech.unicom.ui-bUxzf0ek37AOrk-5gZFsrA==/lib/arm, /data/app/com.sinovatech.unicom.ui-bUxzf0ek37AOrk-5gZFsrA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]]

2021-03-17 15:53:41.875 6584-6584/? E/LogXutils: gatherInfodalvik.system.PathClassLoader[DexPathList[[zip file "/system/app/webview/webview.apk"],nativeLibraryDirectories=[/system/app/webview/lib/arm, /system/app/webview/webview.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /system/lib, /vendor/lib]]]

2021-03-17 15:53:41.875 6584-6584/? E/LogXutils: com.sinovatech.unicom.ui`

我分析出来了 就是classloader不应该在 gatherInfo 这个函数里面重新赋值

private void gatherInfo(XC_LoadPackage.LoadPackageParam loadPackageParam) {
        packageName = loadPackageParam.packageName;
        isFirstApplication = loadPackageParam.isFirstApplication;
        classLoader = loadPackageParam.classLoader;
        Log.e("LogXutils","gatherInfo"+classLoader.toString());
        processName = loadPackageParam.processName;
        appInfo = loadPackageParam.appInfo;
    }

应该删掉

 classLoader = loadPackageParam.classLoader;

这行代码

HuRuWo commented 3 years ago

Snipaste_2021-03-17_16-03-13

Mocha-L commented 3 years ago

@HuRuWo 多谢你深度使用和对qujing的优化,你提的这个修改建议我会近期确认和修改,gayhub有你更美。 thx!