shroudedcode / apk-mitm

🤖 A CLI application that automatically prepares Android APK files for HTTPS inspection
https://npm.im/apk-mitm
MIT License
3.6k stars 337 forks source link

ClassNotFoundException #151

Closed ardevd closed 3 months ago

ardevd commented 3 months ago

Applying the latest version of apk-mitm to an app seemingly succeeds but when the app launches it crashes after a few seconds with the following stack trace. Is something being accidentially stripped out? The patched base.apk is 39Mb while the original is 61Mb.

03-06 14:23:38.555 31087 31087 E AndroidRuntime: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:558)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
03-06 14:23:38.555 31087 31087 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    ... 1 more
03-06 14:23:38.555 31087 31087 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Landroid/view/View$OnUnhandledKeyEventListener;
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:60)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:6)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at android.app.Activity.performLaunchActivity(ActivityThread.java:58)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:37)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:37)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:91)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:97)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Unknown Source:10)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:11)
03-06 14:23:38.555 31087 31087 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:95)
03-06 14:23:38.619  1743 31356 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
ardevd commented 3 months ago

This seems to be an apktool issue.