A custom reimplementation of the LGL Android Mod Menu that loads the Java UI entirely from memory using InMemoryDexClassLoader, without shipping a separate .dex file on disk.
This version embeds a prebuilt FloatingModMenu.dex as a HEX string and dynamically loads it at runtime via JNI.
- No external dex file
- The menu dex is embedded as HEX and loaded directly from memory.
- In-memory class loading
- Uses
dalvik.system.InMemoryDexClassLoader
- Uses
- JNI-driven bootstrap
- Menu initialization is triggered fully from native code
- Cleaner injection surface
- No file writes, no asset extraction
- Compatible with existing LGL menu Java code
- Dex embedding
FloatingModMenu.dexis converted to a HEX string and stored in native code.
- HEX → ByteBuffer
- HEX string is converted back into bytes at runtime.
- InMemoryDexClassLoader
- Dex is loaded directly from memory.
- JNI native bindings
- Native functions are registered to the Java menu class.
- Menu startup
- Calls
FloatingModMenu.antik(Context)to launch the floating menu.
- Calls
static std::string DI = "HEX_CODE_OF_DEX";- This must be the HEX-encoded version of
FloatingModMenu.dex.
Registered native methods:
| Method | Description |
|---|---|
Icon() |
Menu icon |
IconWebViewData() |
WebView icon data |
getFeatureList() |
Feature list |
settingsList() |
Settings list |
Changes(...) |
Feature toggle handler |
setTitleText(TextView) |
Title customization |
setHeadingText(TextView) |
Heading customization |
Uses:
InMemoryDexClassLoader(ByteBuffer[] dex, ClassLoader parent)Loads:
uk.lgl.modmenu.FloatingModMenuvoid binJava();- Called after
JNI_OnLoad - Retrieves
Applicationcontext viaActivityThread - Starts menu initialization
- Android 8.0+ (API 26+)
- ARMv7 / ARM64
- JNI-based injection environment
- Prebuilt compatible
FloatingModMenu.dex
- This project modifies runtime behavior of apps.
- Usage may violate application Terms of Service.
- Intended for educational and research purposes.
- Original concept: LGL Android Mod Menu
- Project Creation: Aniket
- In-memory dex loader: NepMods