~/talk

(Android) Transformers - bytecode in disguise!

Talkat Android Makers 2019 · on Tuesday, 2019-04-23· [android]

Firebase Performance Monitoring uses build‑time bytecode rewriting to intercept HTTP calls: a Gradle plugin hooks the Android Transform API, an ASM-based transformer scans class files, replaces specific invokevirtual calls (e.g. invokevirtual→invokestatic) and redirects them to a companion runtime. The static helper wraps URLConnection and InputStream with decorators that time and measure traffic. The implementation is open as a sample, supports incremental builds, and the approach proves practical (used in production for Firebase monitoring).

AI-written summary · about

  1. 0:00Start
  2. 3:08How can you build a no-code HTTP data collector SDK?
  3. 10:55Transform Gradle plugin - MyTransform class
  4. 12:22Transforminvocation interface - defines inputs and ouputs
  5. 15:33But first, a little bit about the JVM
  6. 20:31Instrumentation Visitor skeleton
  7. 23:30javap -c verbose SomeClass.class (3)
  8. 27:08Bytecode change-one weird trick
  9. 32:41Tips for transforms
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.