Frezrik / Jiagu

Android apk jiagu
Apache License 2.0
239 stars 99 forks source link

Attempt to register dex file with multiple class loaders #9

Closed ghost closed 2 years ago

ghost commented 2 years ago

Getting this error when I run app as 32-bit on a 64-bit device. Tried to change libart path to /apex/com.android.art/lib/libart.so, still same.

Any change to support it? because I can't or won't support 64-bit natively, since ARM translation handles well, I needed my code to universally support all devices without headache

08-10 11:59:54.881 D/NDK_JIAGU(19286): [-]loadDex
08-10 11:59:54.884 D/NDK_JIAGU(19286): app name: com.frezrik.jiagu.MyApp
08-10 11:59:54.913 D/NDK_JIAGU(19286): [+]Elements size:1, dex File size: 1
08-10 11:59:54.914 W/NDK_JIAGU(19286): hook
08-10 11:59:54.915 D/AndroidRuntime(19286): Shutting down VM
08-10 11:59:54.915 E/AndroidRuntime(19286): FATAL EXCEPTION: main
08-10 11:59:54.915 E/AndroidRuntime(19286): Process: com.frezrik.jiagu, PID: 19286
08-10 11:59:54.915 E/AndroidRuntime(19286): java.lang.InternalError: Attempt to register dex file /data/user/0/com.frezrik.jiagu/Anonymous-DexFile@2168524540.jar with multiple class loaders
08-10 11:59:54.915 E/AndroidRuntime(19286):     at dalvik.system.DexFile.defineClassNative(Native Method)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at dalvik.system.DexFile.defineClass(DexFile.java:294)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:287)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at dalvik.system.DexPathList$Element.findClass(DexPathList.java:773)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at dalvik.system.DexPathList.findClass(DexPathList.java:533)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:205)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at com.frezrik.jiagu.util.ApplicationHook.hook(ApplicationHook.java:34)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at com.frezrik.jiagu.StubApp.invoke2(StubApp.java:55)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at com.frezrik.jiagu.StubApp.attach(Native Method)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at com.frezrik.jiagu.StubApp.attachBaseContext(StubApp.java:30)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.app.Application.attach(Application.java:351)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.app.Instrumentation.newApplication(Instrumentation.java:1159)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.app.LoadedApk.makeApplication(LoadedApk.java:1261)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6768)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.app.ActivityThread.access$1300(ActivityThread.java:250)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1962)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.os.Handler.dispatchMessage(Handler.java:106)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.os.Looper.loop(Looper.java:250)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at android.app.ActivityThread.main(ActivityThread.java:7755)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at java.lang.reflect.Method.invoke(Native Method)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
08-10 11:59:54.915 E/AndroidRuntime(19286):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)