ba0gu0 / 520apkhook

将安卓远控Apk附加进普通的App中,运行新生成的App时,普通App正常运行,远控正常上线。Attach the Android remote control APK to a regular app. When the newly generated app is launched, the regular app operates as normal while the remote control goes online seamlessly.
983 stars 237 forks source link

java.lang.ClassNotFoundException: Didn't find class #28

Closed luchaxi closed 7 months ago

luchaxi commented 1 year ago

D doAttachBaseContext 初始化成功! 2023-08-30 17:34:50.341 29504-29504 520ApkBox ...pplication pid-29504 D 获取到dex 中的Application Class 2023-08-30 17:34:50.342 29504-29504 520ApkBox ...pplication pid-29504 D 加载Dex失败: java.lang.ClassNotFoundException: com.metasploit.stage.MainActivity 2023-08-30 17:34:50.342 29504-29504 System.err pid-29504 W at com.jingdong.app.mall.a520apkbox.MainApplication.bindRealApplication(MainApplication.java:229) 2023-08-30 17:34:50.342 29504-29504 System.err pid-29504 W at com.jingdong.app.mall.a520apkbox.MainApplication.onCreate(MainApplication.java:188) 2023-08-30 17:34:50.343 29504-29504 System.err pid-29504 W Caused by: java.lang.ClassNotFoundException: Didn't find class "com.metasploit.stage.MainActivity" on path: DexPathList[[zip file "/data/app/com.jingdong.app.mall.a520apkbox-1/base.apk"],nativeLibraryDirectories=[/data/app/com.jingdong.app.mall.a520apkbox-1/lib/arm, /data/app/com.jingdong.app.mall.a520apkbox-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]

luchaxi commented 1 year ago

first launch package: com.jingdong.app.mall.a520apkbox 2023-08-30 18:48:13.133 22411-22411 AppActiveReceiver pid-22411 D receive app active broadcast for: com.jingdong.app.mall.a520apkbox, install from: null 2023-08-30 18:48:13.252 24356-24356 520ApkBox ...pplication pid-24356 D dex文件解压完成. 2023-08-30 18:48:13.253 24356-24356 520ApkBox ...pplication pid-24356 D [/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex] 2023-08-30 18:48:13.330 24381-24381 dex2oat pid-24381 I /system/bin/dex2oat -j6 --dex-file=/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex --oat-fd=47 --oat-location=/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex --compiler-filter=speed 2023-08-30 18:48:13.333 24381-24381 dex2oat pid-24381 E Failed to read magic number from dex file: '/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex': Success 2023-08-30 18:48:13.337 24356-24356 art pid-24356 W Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg & --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --non-interactive --runtime-arg -Xms64m --runtime-arg -Xmx512m -j6 --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex --oat-fd=47 --oat-location=/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex --compiler-filter=speed) because non-0 exit status 2023-08-30 18:48:13.337 24356-24356 art pid-24356 W Unable to open '/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex' : No such file or directory 2023-08-30 18:48:13.337 24356-24356 art pid-24356 W Could not get realpath for /data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex: No such file or directory 2023-08-30 18:48:13.337 24356-24356 System pid-24356 E Unable to load dex file: /data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex 2023-08-30 18:48:13.338 24356-24356 System pid-24356 E java.io.IOException: Failed to open dex files from /data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex because: Unable to open '/data/user/0/com.jingdong.app.mall.a520apkbox/files/DexFiles/classes.dex' : No such file or directory at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:373) at dalvik.system.DexFile.(DexFile.java:150) at dalvik.system.DexFile.loadDex(DexFile.java:221) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:369) at dalvik.system.DexPathList.makeElements(DexPathList.java:314) at dalvik.system.DexPathList.makePathElements(DexPathList.java:281) at java.lang.reflect.Method.invoke(Native Method) at com.jingdong.app.mall.a520apkbox.ClassLoaderUtils.loadDex(ClassLoaderUtils.java:36) at com.jingdong.app.mall.a520apkbox.MainApplication.attachBaseContext(MainApplication.java:100) at android.app.Application.attach(Application.java:191) at android.app.Instrumentation.newApplication(Instrumentation.java:1009) at android.app.Instrumentation.newApplication(Instrumentation.java:993) at android.app.LoadedApk.makeApplication(LoadedApk.java:805) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5504) at android.app.ActivityThread.-wrap2(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:165) at android.app.ActivityThread.main(ActivityThread.java:6375) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802) 2023-08-30 18:48:13.339 24356-24356 520ApkBox ...pplication pid-24356 D dex文件加载完成. 2023-08-30 18:48:13.348 24356-24356 520ApkBox ...pplication pid-24356 D doAttachBaseContext 初始化成功! 2023-08-30 18:48:13.412 24356-24356 520ApkBox ...pplication pid-24356 D 获取到dex 中的Application Class 2023-08-30 18:48:13.413 24356-24356 520ApkBox ...pplication pid-24356 D 加载Dex失败: java.lang.ClassNotFoundException: com.metasploit.stage.MainActivity 2023-08-30 18:48:13.413 24356-24356 System.err pid-24356 W at com.jingdong.app.mall.a520apkbox.MainApplication.bindRealApplication(MainApplication.java:229) 2023-08-30 18:48:13.413 24356-24356 System.err pid-24356 W at com.jingdong.app.mall.a520apkbox.MainApplication.onCreate(MainApplication.java:188) 2023-08-30 18:48:13.414 24356-24356 System.err pid-24356 W Caused by: java.lang.ClassNotFoundException: Didn't find class "com.metasploit.stage.MainActivity" on path: DexPathList[[zip file "/data/app/com.jingdong.app.mall.a520apkbox-1/base.apk"],nativeLibraryDirectories=[/data/app/com.jingdong.app.mall.a520apkbox-1/lib/arm, /data/app/com.jingdong.app.mall.a520apkbox-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] 2023-08-30 18:48:13.426 1661-3849 ActivityManager pid-1661 I Start proc 24393:com.jingdong.app.mall.a520apkbox:black/u0a222 for content provider com.jingdong.app.mall.a520apkbox/top.niunaijun.blackbox.core.system.SystemCallProvider caller=com.jingdong.app.mall.a520apkbox 2023-08-30 18:48:13.427 3701-4100 PowerKeeper.Event pid-3701 D notifyAMProcStart processName: 10222 reason: com.jingdong.app.mall.a520apkbox:black, pid:0 2023-08-30 18:48:13.474 24393-24393 520ApkBox ...pplication pid-24393 D []

ba0gu0 commented 7 months ago

这个是运行时候的错误,貌似是远控的dex文件解压失败。

换个环境试一下,这个不在边上,解决起来很难。