niklashigi / apk-mitm

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

Failed to encode patched APK file #103

Open cosmincc opened 2 years ago

cosmincc commented 2 years ago

The tool decodes the resources of the base APKs, but it can't encode them back. This could be solved by using --no-res flag in apktool to skip the resources as in some cases (ie. Revolut) the resources are in a separate APK and that breaks the re-encoding of the base APK. Logs: encoding-aapt.failed.log encoding-aapt2.failed.log decoding.log

CasparNuel commented 2 years ago

It would be usefull to have some way to pass parameters to APKTool through apk-mitm. Currently we are not able to pass parameters like --no-res (same as -r). The use of the no resources option speeds up the process AND avoids errors like the apk-mitm brut.androlib.AndrolibException during the packaging process.

Is it possible to manually pass parameters to the apktool executable when starting an apk-mitm command?

jonathanklee commented 2 years ago

Indeed, I would love to pass the -r options to apktool.