(Android) Transformers — Bytecode in Disguise!
summary
Drops an implemented recipe: during the Android build a Gradle Transform rewrites bytecode with ASM so every URL.openConnection becomes an invokevirtual→invokestatic to a companion SDK that returns a decorated HttpURLConnection which records timings and sends them to Firebase Performance Monitoring. Earlier builds required ugly Ant/Gradle task reflection hacks; now the official Transform API is used. Attention to incremental builds, skipping the companion library, and full method-delegating decorators keeps instrumentation fast and correct.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:20Firebase Performance Monitoring
- 3:58HTTP Data Collection
- 6:22Class Changes
- 10:50Gradle Plugin
- 16:58ASM
- 18:26JVM
- 23:06Instrumentation
- 29:57One Weird Trick
- 37:44Questions
related talks
43m(Android) Transformers - bytecode in disguise!
34m(Android) Transformers - Bytecode in Disguise!
39mBytecode Transformations: Exploring new AGP APIs for instrumenting your app
40mIntroduction to Bytecode Instrumentation with AGP 8
38mArtifact Transforms
26mBuild-Time Auto-Instrumentation in Android
45mImpact of Framework Choice on your Application: A Reverse Engineering Perspective
34mAndroid or the ART of Optimizing Java Code
