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

Optimize / Reduce final Demo APK File size #3159

Open
cpholguera opened this issue Feb 17, 2025 · 5 comments
Open

Optimize / Reduce final Demo APK File size #3159

cpholguera opened this issue Feb 17, 2025 · 5 comments
Assignees

Comments

@cpholguera
Copy link
Collaborator

cpholguera commented Feb 17, 2025

The Android Demo APKs are currently 8.29 MB, which is too large for such a simple app. Reducing the APK size is important to ease storage and improve user experience. We should investigate possible optimizations, such as removing unnecessary resources and optimizing images.

Note that using ProGuard may not be suitable because these are educational demos intended for practicing reverse engineering.

@shwetd19
Copy link

Hey @cpholguera I am thinking of this approach

Potential fix for this issue : To reduce the 8.29 MB APK size, we could:

  1. Audit and remove unused resources (e.g., drawables, layouts) with Android Studio's "Remove Unused Resources" tool.
  2. Optimize images by compressing PNGs/JPEGs with tools like TinyPNG or converting to WebP format.
  3. Enable minification and resource shrinking in build.gradle (minifyEnabled true, shrinkResources true) to strip unused code and resources.

This should slim down the APK significantly while keeping functionality intact.

@cpholguera
Copy link
Collaborator Author

Thanks for the suggestions @shwetd19, @javier-ruiz-b is currently looking into this. Let's see which approach actually works. We don't really have any resources apart from the ones that are by default there / added by Android Studio.

@javier-ruiz-b
Copy link
Collaborator

Hello @shwetd19, steps 1 and 2 sound pretty good. As for the 3rd, @cpholguera has already commented that ProGuard / minification does not make much sense. It would also increase build times significantly.

@shwetd19
Copy link

shwetd19 commented Feb 23, 2025

Got it @javier-ruiz-b , if you say so I can raise the PR for this, but it'll contain lots of changes as per I think..

@cpholguera
Copy link
Collaborator Author

Thanks @shwetd19, however this was already assigned to @javier-ruiz-b who's currently working on it. Thanks for offering anyway!

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

No branches or pull requests

3 participants