Apktool: Correctly decompiled & recompiled APK crashes on start-up
Information
-
Apktool Version (
apktool -version
) - v2.4.1 -
Operating System (Mac, Linux, Windows) - MacOS
-
APK From? (Playstore, ROM, Other) - Playstore/Manufacturer
Stacktrace/Logcat
2020-07-25 17:43:03.503 26542-26542/? E/LoadedApk: Unable to instantiate appComponentFactory
java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.AppComponentFactory" on path: DexPathList[[zip file "/data/app/dji.go.v5-2ay_BUceLK5SA17Q8TVPcw==/base.apk"],nativeLibraryDirectories=[/data/app/dji.go.v5-2ay_BUceLK5SA17Q8TVPcw==/lib/arm64, /data/app/dji.go.v5-2ay_BUceLK5SA17Q8TVPcw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.LoadedApk.createAppFactory(LoadedApk.java:256)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:855)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:950)
at android.app.LoadedApk.getResources(LoadedApk.java:1188)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2499)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2491)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6508)
at android.app.ActivityThread.access$1600(ActivityThread.java:231)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1974)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7707)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Steps to Reproduce
Download the APK here: https://www.dji.com/nl/downloads/djiapp/dji-fly (click on Download for Android)
- Run
apktool d APKHERE
- Run
apktool b APKDIRECTORY
- Sign the APK
- Install the APK, make sure you’ve got an
arm64-v8a
chipset. - Start the app, it’ll first paint & crash.
Just run apktool, without changing anything, decode + recompile & it fails.
Frameworks
None
APK
DJI Fly: https://www.dji.com/nl/downloads/djiapp/dji-fly
Questions to ask before submission
-
Have you tried
apktool d
,apktool b
without changing anything? Yes -
If you are trying to install a modified apk, did you resign it? Resigned the APK. I’ve tried to use
--no-src
, etc etc. -
Are you using the latest apktool version? Yes, v2.4.1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 17 (7 by maintainers)
I have similar situation where I resigned the apk before using apktool, installed it without problem. But when I apktool d, apktool b, it crashes.