Mobile Development 10 min read

Understanding JD's Aura Android Plugin Framework: Architecture, Benefits, Implementation, and Management

The article explains the evolution, advantages, challenges, and current status of Android plugin technology, then details JD's Aura plugin framework—including its layered architecture, class and resource loading mechanisms, management tools, upgrade process, and future considerations—for large‑scale mobile app development.

JD Retail Technology
JD Retail Technology
JD Retail Technology
Understanding JD's Aura Android Plugin Framework: Architecture, Benefits, Implementation, and Management

Plugin technology has been part of Android development since around 2012 and has gradually matured, with many companies offering their own solutions; JD's Aura framework, launched in 2014, has evolved into a comprehensive, production‑grade plugin system used across dozens of JD applications.

Pluginization brings clear benefits such as module decoupling, collaborative independent development, significantly faster compilation, dynamic release of individual features, mitigation of the 65536 method‑count limit, and reduced APK size, which directly improves download conversion rates.

At the same time, it introduces challenges: compatibility with Android’s private‑API restrictions (especially from Android 9 onward), increased integration complexity requiring custom Gradle plugins and modifications to build tools, and the need to handle the fragmented Android ecosystem.

The Android plugin landscape has progressed from early projects like AndroidDynamicLoader (2012) to frameworks such as DroidPlugin, Small, Atlas, Replugin, and VirtualAPK; however, Google’s move to block private APIs in Android P threatened many solutions, though most frameworks now rely on gray‑list APIs and continue to function, albeit with ongoing risk.

Aura is JD’s self‑developed plugin framework that now supports over 70 business plugins in JD Mall and is also used in JD Daojia, the Thailand version, and other apps. It provides a full stack of compilation, integration, and dynamic upgrade processes, dramatically simplifying development. The framework consists of three layers (see image): the system layer (hooks ClassLoader and AssetManager), the framework layer (Aura core plus a common library shared by host and plugins), and the plugin layer (business and common plugins).

Implementation-wise, Aura replaces the system PathClassLoader with a custom DelegateClassLoader via reflection, creates a dedicated ClassLoader for each plugin, and prioritizes plugin classes before falling back to the host. For resources, a shared public resource set is maintained, public.xml ensures consistent IDs, each plugin receives a unique packageId (typically 0x21‑0x7E), and the host’s AssetManager.addAssetPath method is invoked to load plugin assets.

Plugin management is complex because packageIds must be reordered and common resources removed; JD therefore provides a Gradle plugin (AuraPlugin) and a management platform that handles compilation, versioning, and host integration in a unified workflow.

Plugin upgrades are independent of the host, allowing rapid bug fixes or feature releases; Aura’s upgrade service can target host versionName, versionCode, and system API level, enabling fine‑grained rollout control.

Future considerations include keeping pace with Android version changes to minimize private‑API usage, improving compatibility across various ROMs, and aligning Aura’s build process with Google’s official App Bundle dynamic‑feature model, which shares similar packageId handling and dependency stripping.

In summary, the Aura plugin framework aims to deliver a stable, efficient development engine with comprehensive tooling and platform support, continuously evolving to meet diverse business scenarios while simplifying developers’ focus on business logic.

mobile developmentAndroidPlugin ArchitectureGradleAura FrameworkDynamic Modules
JD Retail Technology
Written by

JD Retail Technology

Official platform of JD Retail Technology, delivering insightful R&D news and a deep look into the lives and work of technologists.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.