R8 shrinking, obfuscation, and optimization
WHAT IT TESTS: what R8 does and why. OUTLINE: shrinking removes unused code/resources, obfuscation renames symbols to short opaque names, optimization inlines and simplifies; shrinking also strips unreachable code that could be exploited.
WHAT IT TESTS: whether you understand the three jobs R8 performs and their security angle. ANSWER OUTLINE: shrinking (tree-shaking) removes unused classes, methods, and fields reachable from no entry point; obfuscation renames remaining symbols to short, meaningless names to hinder reverse engineering and shrink the dex; optimization inlines methods, removes dead branches, and simplifies code for speed and size.
Read the original → interview
- #r8
- #code-shrinking
- #obfuscation
- #android
- #security
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.