iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
19.97k stars 3.57k forks source link

[BUG] ClassNotFoundException in recompiled app #3531

Open ardevd opened 7 months ago

ardevd commented 7 months ago

Information

  1. Apktool Version (apktool -version) - 2.9.3
  2. Operating System (Mac, Linux, Windows) - Linux
  3. APK From? (Playstore, ROM, Other) - Playstore
  4. Java Version (java --version) - 17.0.9

Stacktrace/Logcat

03-06 18:36:21.784  2822  2822 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Landroid/view/View$OnUnhandledKeyEventListener;
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:92)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:36)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at android.app.Activity.performLaunchActivity(ActivityThread.java:73)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:44)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:6)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:70)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:41)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Unknown Source:19)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:2)
03-06 18:36:21.784  2822  2822 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:58)
03-06 18:36:21.848  1743  3115 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2

Doing a apktool d and subsequent apktool b on a specific app results in a base.apk that is about half the size of the original (39M vs 61M). Hence, when the app is launched I get a ClassNotFoundException. apktool doesnt show any errors in decompilation or compilation either.

iBotPeaches commented 7 months ago

I assume Dropbox app based on stacktrace? Or can you link me to exact version/app you are referring?

ardevd commented 7 months ago

https://play.google.com/store/apps/details?id=com.jlr.jaguar.incontrolremote.appstore&hl=en&gl=US

I can share the apks if needed.

ardevd commented 6 months ago

Any news?

iBotPeaches commented 6 months ago

I downloaded the application and was surprised to find it over 200mb - for a remote...for a car. Thats about all the news at the moment.

7f37fbd25d27ee79c992b99a46a02061  Jaguar Remote_2.18.0_Apkpure.apk
ardevd commented 6 months ago

Yeah, it's enormous. But I'll be interested to see if the size reduces significantly when you assemble it again with apktool. I suspect it strips away quite a bit by mistake.