Expand use_aapt2 cli arg for which aapt version we use for badge dumping #703
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes newer apk patching that aapt cannot handle
There are various reasons aapt dump badging may fail with newer APKs. Given google has moved on to aapt2 for nearly everything we should be using it instead of aapt for dumping I would assume. I don't know if there is ever a negative for using aapt2 dump badging but this was a simple call. We already have a --use-aapt2 command used for when we call apktool lets just hijack that arg to also decide if we use it for badge dumping. This should resolve a few of the bugs were people may not have been able to patch apks due to
Unable to determine launchable activity
without manually specifying the target class.If someone thinks aapt2 might be more likely to fail during dumping for some reason we could add a second use-aapt2 flag just for this but that seems like overkill.