Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Proguard: The open source optimizer for Java bytecode

Proguard: The open source optimizer for Java bytecode

In this talk, I explain the mechanism of proguard. How it works internally. And I talk about the benefit of using it on your android application

Souleymane Sidibe

March 24, 2018
Tweet

More Decks by Souleymane Sidibe

Other Decks in Programming

Transcript

  1. Proguard • By Guard Square • First release 2002 •

    Written in… java • For Java based app(Java *E, Android, etc)
  2. Proguard • Last version !-> 6.0 • ./gradlew buildEnvironment |

    grep proguard • Source code is on sourceforge.
  3. Proguard. Quèsaco? Input Jars Output Jars Shrink Optimize Obfuscate Preverify

    • Looks at all possible entry points • Calculates the map of reachable code • Remove dead code
  4. Proguard. Quèsaco? Input Jars Output Jars Shrink Optimize Obfuscate Preverify

    • Renames classes and members that are not entry points
  5. Proguard. Quèsaco? Input Jars Output Jars Shrink Optimize Obfuscate Preverify

    • I don’t know ☹ • Generate mapping files
  6. Why should we use Proguard? • More compact code •

    The obfuscation • Smaller app • Avoid 64k methods limit