Mobile apps · Tool

R8 and ProGuard

Tools that shrink an Android release build by removing unused code and renaming what is left, making the app smaller, a little faster and harder to reverse-engineer.

Android building blocks · Free · updated

How it works

R8 is the Android build's code shrinker. With isMinifyEnabled switched on for release builds, it removes classes and methods nothing uses, optimises the rest, renames classes and members to short meaningless names (obfuscation), and converts the result into the DEX format Android runs. isShrinkResources then drops unused images and layouts. ProGuard, from Guardsquare, is the older tool R8 replaced, and its rule syntax lives on in proguard-rules.pro files.

Code reached only through reflection, or JSON parsed by field name, can be removed or renamed by mistake, so libraries ship keep rules and apps add their own; testing the release build, not only debug, catches this. R8 writes a mapping.txt file that turns obfuscated crash stack traces back into readable ones, and Play Console can use it to show readable crash reports. Obfuscation slows reverse engineering but does not stop it.

R8 and ProGuard pricing

Free

Free. R8 ships with the Android Gradle plugin, and ProGuard is open source (GPL 2.0).

Approximate, checked September 2026.What the other tools cost

More in Mobile apps

Android building blocks

All 34 Mobile apps terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.