ZA
ZacSweers/blackmirror
BlackMirror
Terrible reflection hacks around classloaders in Android. Sample app from a talk given at Droidcon NYC 2018.
Slides: https://speakerdeck.com/gdglviv/zac-sweers-breaking-the-android-classloader
Core project is blackmirror, which has the BlackMirror classloader implementation and some other utilities for working with classloaders and dex files
Examples:
app- The main sample appneighbor- A simple sibling app with some simple code, used as the target for the main app to run code out of.initprovider:simple- demonstrating automatic initialization via init provider (beforeApplication#onCreate())initprovider:pluginized- demonstrating automatic initialization via pluginized init provider (beforeApplication#onCreate())samples:logging- Simple logging of class loading via Timbersamples:timing- Simple timing of class loading, reported via Timbersamples:swapper- Different examples of trying to swap what classes are loaded. Does not work for different reasonssamples:hello- SimpleHellointerface with asayHellomethod. Used in the next two samplessamples:assets- Example loading dex files from assets, in this caseHelloimplssamples:resources- Example loading dex files from resources, in this caseHelloimplssamples:spy- Examples for reading other apps' dex files and running other apps' code