Apktool
Apktool copied to clipboard
feat: support aapt optimization
These options help reduce the apk size when using aapt2
, and --collapse-resource-names
may have side effects.
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.
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.
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
@iBotPeaches seems out of context question but can the build time be reduced for recompile? one Settings app take around 25min to compile on my Ryzen 7 4700U laptop with 40GB ram,
its due to languages addition done in app but is there a way can this be reduced? without those additional languages, it repack same apk in less than 4mins
@iBotPeaches seems out of context question but can the build time be reduced for recompile? one Settings app take around 25min to compile on my Ryzen 7 4700U laptop with 40GB ram,
2.10.x has performance improvements to add parallelization.
@iBotPeaches seems out of context question but can the build time be reduced for recompile? one Settings app take around 25min to compile on my Ryzen 7 4700U laptop with 40GB ram,
2.10.x has performance improvements to add parallelization.
i am always using latest compile binary with latest commits