Grab's Android engineering team shares how they successfully enabled R8 full optimization for their 9M+ line codebase after multiple failed attempts over six years. The key innovations were: (1) AI-assisted debugging using custom MCP server tools to automate APK decompilation, stack trace deobfuscation, and parallel CI branch testing via GitLab CLI; (2) a progressive risk-based testing strategy that leveraged pattern recognition to fix root causes across the codebase rather than exhaustive regression testing; and (3) infrastructure improvements including a targeted Mainframer EC2 setup for local R8 builds and QA/production build configuration alignment. The results after ~10 weeks: 25% ANR reduction, 16% app size decrease (21.6MB), and 27% faster startup time.
Table of contents
IntroductionThe challenge at scaleUnderstanding R8 optimizationThree core challengesOur three-innovation solutionA lucky breakResultsWhat’s nextConclusionJoin usSort: