From ProGuard to R8: Take Care of Your Bytecode
summary
The talk explains differences between ProGuard and R8 for Android bytecode shrinking: ProGuard reduces APK size but often breaks apps when reflection, generated metadata, JNI, serializers or annotations aren’t accounted for, requiring manual keep rules. R8 (used in Android Studio 3.2+) is presented as a faster (~3×) shrinker that produces slightly smaller binaries while supporting ProGuard rules; the talk also advises always publishing the mapping file for deobfuscation and thoroughly testing builds because incorrect keep rules can still cause runtime failures.
AI-written summary · about
chapters (8)
- 0:00ProGuard and R8 intro
- 1:10What ProGuard and R8 are
- 4:26Why use ProGuard
- 7:15ProGuard rules
- 10:03ProGuard vs R8
- 13:34ProGuard rule examples
- 17:55Transition to R8
- 20:43R8 benefits
related talks
36mPractical obfuscation guide
41mShrink, Secure & Optimize Your App With R8
37mEffective ProGuard keep rules for smaller applications
33mHow ProGuard Works
28mEscaping from a 'It Kinda Works' ProGuard Setup
41mDigging into D8 and R8
55mCompilers. Dalvik. ART. And everything in between
34mSecuring Android: Tackling Advanced Threats and Enhancing App Security
