Escaping from a 'It Kinda Works' ProGuard Setup
summary
ProGuard is used to shrink, optimize and obfuscate Android apps — examples include DroidKaigi’s app reducing classes/methods by ~40% and halving dex size, and Ameblo shrinking ~23k classes to a ~6MB dex. Concrete fixes for ProGuard issues are covered: add -dontwarn javax.annotation and keepnames for OkHttp’s PublicSuffixDatabase (because a .gz resource expects the original classpath), add keep rules for Gson/Jackson to preserve annotated methods and constructors, and inspect the results with APK Analyzer.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 3:26ProGuard basics
- 6:20ProGuard with OKHttp
- 12:52Gson reflection pitfalls
- 19:12Proper keep annotations
- 21:49AAPT auto-rules traps
- 26:58Summary
related talks
33mHow ProGuard Works
37mEffective ProGuard keep rules for smaller applications
27mFrom ProGuard to R8: Take Care of Your Bytecode
41mShrink, Secure & Optimize Your App With R8
36mPractical obfuscation guide
45mGoing Beyond Obfuscation: Advanced Techniques for Protecting Android Apps
34mSecuring Android: Tackling Advanced Threats and Enhancing App Security
37mThe Art of Hiding Sensitive Info in Plain Sight
