Fixed some issues for compatibility with recent Apktool versions
The command patchapk did not work for me using Apktool 2.12.0 – however, I also found some bugs that would have prevented the command to do its job regardless the Apktool version.
- Apktool now tells its version number using the
versioncommand instead of the-versioncommand line argument, resulting in an early crash since version detection fails. - Apktool produces weird mangled paths for Smali code, I added code to detect this.
- Command line arguments for Apktool were passed in a buggy way, I fixed this as well.
See individual commit messages for more details.
Now that I looked at #743, it has addressed some of the same issues – although in a different way. Extracting the version number from the banner seems to be a recipe for another similar issue where Apktool changes regarding UI not intended for machine consumption breaks Objection. The handling of command line arguments passed during decode seems to be basically the same.
Thanks, I would appreciate if you can maybe base of that PR (i.e. remove duplicate changes). I just haven't had time to fully test all the changes made in that PR hence why it isn't merged yet. Fortunately the issue regarding Apktool versioning is only present in one specific version of apktool (iBotPeaches was nice enough to quickly push out a patch https://github.com/iBotPeaches/Apktool/issues/3909).