Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repacked APK crash on runtime #49

Closed
entwildfire opened this issue Jul 11, 2023 · 1 comment
Closed

Repacked APK crash on runtime #49

entwildfire opened this issue Jul 11, 2023 · 1 comment

Comments

@entwildfire
Copy link

Hi, thank you for your great library and your good support.
I am using ARSCLib v1.2.0 to add an XML file, edit resources.arsc, edit manifest of multiple APKs. there is no problem in all APKs except one of them, when I repack this specific APK, even without any edit, just decompile and build, the app crash on runtime as follows:

 E  FATAL EXCEPTION: main
    Process: a.a.myapplication, PID: 2683
    java.lang.RuntimeException: Unable to instantiate application android.support.multidex.MultiDexApplication package a.a.myapplication: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/data/app/~~jiNlAldBI9zriYWq2RGs0w==/a.a.myapplication-t3lmIin-UCSOuRv7-T9tfQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~jiNlAldBI9zriYWq2RGs0w==/a.a.myapplication-t3lmIin-UCSOuRv7-T9tfQ==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
    	at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1573)
    	at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1502)
    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7553)
    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400)
    	at android.os.Handler.dispatchMessage(Handler.java:106)
    	at android.os.Looper.loopOnce(Looper.java:226)
    	at android.os.Looper.loop(Looper.java:313)
    	at android.app.ActivityThread.main(ActivityThread.java:8757)
    	at java.lang.reflect.Method.invoke(Native Method)
    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/data/app/~~jiNlAldBI9zriYWq2RGs0w==/a.a.myapplication-t3lmIin-UCSOuRv7-T9tfQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~jiNlAldBI9zriYWq2RGs0w==/a.a.myapplication-t3lmIin-UCSOuRv7-T9tfQ==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
    	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    	at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
    	at androidx.core.app.CoreComponentFactory.instantiateApplication(CoreComponentFactory.java:52)
    	at android.app.Instrumentation.newApplication(Instrumentation.java:1232)
    	at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1565)
    	at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1502) 
    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7553) 
    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400) 
    	at android.os.Handler.dispatchMessage(Handler.java:106) 
    	at android.os.Looper.loopOnce(Looper.java:226) 
    	at android.os.Looper.loop(Looper.java:313) 
    	at android.app.ActivityThread.main(ActivityThread.java:8757) 
    	at java.lang.reflect.Method.invoke(Native Method) 
    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) 
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)  

There is no difference in dex files, and the class "android.support.multidex.MultiDexApplication" not exists in the original APK too, the resources.arsc binary files have some small differences, but I don't find any difference when opening them in android studio.
The class "android.support.multidex.MultiDexApplication" is in the manifest application tag:

<application
        android:theme="@ref/0x7f1101d2"
        android:label="@ref/0x7f10001c"
        android:icon="@ref/0x7f0d0000"
        android:name="android.support.multidex.MultiDexApplication"
        android:debuggable="true"
        android:allowBackup="true"
        android:largeHeap="true"
        android:supportsRtl="true"
        android:fullBackupContent="@ref/0x7f130000"
        android:usesCleartextTraffic="true"
        android:roundIcon="@ref/0x7f0d0001"
        android:appComponentFactory="androidx.core.app.CoreComponentFactory"
        android:dataExtractionRules="@ref/0x7f130001"
        android:requestLegacyExternalStorage="true">
@REAndroid
Copy link
Owner

How can I reproduce this issue ?

@REAndroid REAndroid closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants