Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support aapt optimization #3558

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

zjns
Copy link

@zjns zjns commented Mar 30, 2024

These options help reduce the apk size when using aapt2, and --collapse-resource-names may have side effects.

@iBotPeaches
Copy link
Owner

At the moment, I don't really see a need for this. Apktool challenge is reading and understanding these sparse/collapsed applications. I don't understand a use-case where users would be disassembling and reassembling an application with intention to sparse/chunk/collapse.

I'd be interested in hearing what is leading you to this need.

@zjns
Copy link
Author

zjns commented Mar 31, 2024

Basically, most apps now perform the --shorten-resources-names optimization when they are compiled. It's default behavior when shrinkResouces flag enabled. When the app is large, shortening the resource path name can indeed reduce the size of the apk. As for the other two flags, there is really no need for them.

@iBotPeaches
Copy link
Owner

I'm more worried about the flag in general when used with Apktool. This optimize feature works very well at stripping things that Apktool has to piece back together. Its a challenge in of itself to just disassemble and reassemble after an optimize command.

For this to go into the core - we'd need a few tests and samples to ensure a few things

  • basic build -> optimize
  • optimized build -> optimize

Copy link
Owner

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At moment - going to hold on this for reasons mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants