Correctly decompiled & recompiled APK crashes on start-up
See original GitHub issueInformation
-
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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:17 (7 by maintainers)
Top Results From Across the Web
apk crashed on launch when re-signed with debug key
normally I use apktool to decompile and recompile and then use testsign.jar to resign the apk with the debug keys or uber apk...
Read more >Crash when decompiling and rebuilding with apktool
I'm trying to decompile the instagram apk with apktool. Right now for leaning I'm literally just decompiling, recompiling and resigning ...
Read more >Android App suddenly crashes when compiling in Release ...
Your very first message indicates that you were doing a release build. The reason it crashed was because you didn't have a proguard.cfg...
Read more >How to Make Your Malicious Android App Be More Convincing.
First check if you can run apktool properly by running the command: apktool ... apktool will now decompile app.apk to /pathtoyourfolder/folder.
Read more >Crashes | Android Developers
An Android app crashes whenever there's an unexpected exit caused by an ... and confirming that the parameters you passed were correct, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@giacomoferretti Can you atleast link to the relevant guides to modify the app so we can search further?