Project Description
Android build tool AAPT crunched PNGs are sometimes larger than the source PNGs. This patch project tries to fix it.

At the time of writing this, the Android build tool AAPT includes a feature of 'crunching' PNG files (reducing PNG file size). However, it doesn't always work and sometime it produces PNG files that are larger than the original PNG.

This project is a proxy AAPT which replaces the original AAPT, and patches this issue for Windows by:
  1. Running the original AAPT
  2. Compare the source PNGs with the crunched PNGs, and replacing the crunched PNGs with the smaller source if needed.

To use this patch (needed to be done for every build-tools versions, and new version downloaded over time):
  1. Replace AAPT - repeat for all build-tools versions
    1. Go to {android-sdk}\build-tools\XXX\ (XXX is the build tools version).
    2. Rename "aapt.exe" => "aapt-original.exe"
    3. Copy "aapt.exe" from this project.
  2. Clean the all the projects (in Eclipse: "Projects" => "Clean" => "Clean All Projects" => "OK").

Note: This patch was tested only with Eclipse+ADT. If you've tried it on another setup, please let the community know

Last edited Feb 28, 2015 at 9:59 AM by shporer, version 7