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

AndResGuard is promoting some bad practices #233

Closed
wojtek-kalicinski opened this issue Feb 25, 2018 · 7 comments
Closed

AndResGuard is promoting some bad practices #233

wojtek-kalicinski opened this issue Feb 25, 2018 · 7 comments
Assignees

Comments

@wojtek-kalicinski
Copy link

I like the idea of having a toolbox that lets you further optimize your APK, but some of the "optimizations" offered by AndResGuard go against good practices:

  1. there are good reasons why some files in the APK are not compressed, such as resources.arsc or native libraries (*.so/dll), so they can be read directly from APK at runtime. By offering/suggesting adding compression to them you in fact prevent optimization and degrade the experience at runtime. Ideally AndResGuard should not compress resources.arsc or at least add an explanation in the manual of why it's not a good idea.

  2. recompressing the APK with 7zip makes little sense for APKs distributed via Play, as it might prevent some optimizations such as File-by-file patches, which greatly reduce download size for updates. Also the initial download from Play is compressed anyway, so this andresguard feature would only affect the APK size on disk and to a small degree. At the very least you shouldn't guide developers who distribute on Play to use 7zip recompression

@simpleton
Copy link
Collaborator

simpleton commented Feb 25, 2018

Totally agree!

  1. I'll disable resource.asrc and native libraries compression by default and show a warning when the developer enable them.

  2. I'll turn off the recompressing flag in Readme file and add notes for developers who distribute their APK on GooglePlay. You know, the Play is not available in China mainland. So this flag is still useful for the developers release their APK by themselves or some third-party Store which didn't support patching update.

Feel free to contact me if there's any other harmful behavior.

@simpleton simpleton self-assigned this Feb 25, 2018
@wojtek-kalicinski
Copy link
Author

Awesome, thank you very much for the prompt response!

@hydraxman
Copy link

hydraxman commented Apr 11, 2019

great discussion, mark this!

@850636558myj
Copy link

对于发布于Google Play的APP,建议不要使用7Zip压缩,因为这个会导致Google Play的优化Patch算法失效 这个优化算法有什么作用,没了会有什么影响呢?

@simpleton
Copy link
Collaborator

simpleton commented Sep 21, 2019 via email

@850636558myj
Copy link

升级后的包也是我们自己上传的 ,升级包会变大是什么意思呢? 我们上传上去之后,gp还会帮我们压缩一次么?

@yangpeiyong
Copy link

升级后的包也是我们自己上传的 ,升级包会变大是什么意思呢? 我们上传上去之后,gp还会帮我们压缩一次么?

使用google play升级apk的时候,会比较手机已经安装的apk和play上最新的apk差异,只会下发一个比较小的patch来升级apk。

imknown added a commit to imknown/AndroidLowLevelDetector that referenced this issue Dec 10, 2019
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

No branches or pull requests

5 participants