finds.dev← search

// the find

singwhatiwanna/dynamic-load-apk

★ 6,005 · Java · NOASSERTION · updated Jul 2024

DL : dynamic load framework in android

DL is an Android plugin framework from 2014 that lets a host app load and run uninstalled APKs at runtime. It solves the two hard problems — resource access and Activity lifecycle management — without relying on reflection for the lifecycle piece. Aimed at Android apps that need dynamic module delivery without Play Store updates.

The proxy-Activity pattern with a DLPlugin interface is clean: lifecycle calls get forwarded through a real registered Activity, so no reflection overhead on the hot path. The AssetManager reflection trick for loading plugin resources is the right approach given the constraints of the era — it's the same technique larger frameworks settled on. Plugins can still run standalone as installed APKs, which makes debugging significantly less painful than frameworks that require the host to test anything. Three host-call modes (none, interface-based, full) give plugin developers a reasonable isolation spectrum.

This project is a historical artifact — last meaningful activity was around 2016, the 2024 git push was cosmetic. Android's plugin ecosystem moved to official solutions: Play Feature Delivery, App Bundles, and eventually Google's own Dynamic Feature Modules, all of which don't require hacking AssetManager internals. The addAssetPath API it relies on is hidden, flagged as 'not for application use' since API 1, and has been progressively locked down; on Android 9+ with stricter greylist enforcement it will break silently or crash. Service and BroadcastReceiver support is incomplete — the README admits it. Anyone looking at this today should use it as a reference for how the problem was historically solved, not as a dependency.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →