|
1 | | -# NativeModMenu |
2 | | -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. |
3 | | - |
4 | | -This version embeds a prebuilt `FloatingModMenu.dex` as a **HEX string** and dynamically loads it at runtime via JNI. |
5 | | - |
6 | | ---- |
7 | | - |
8 | | -## ✨ Key Differences from Original LGL Mod Menu |
9 | | - |
10 | | -- **No external dex file** |
11 | | - - The menu dex is embedded as HEX and loaded directly from memory. |
12 | | -- **In-memory class loading** |
13 | | - - Uses `dalvik.system.InMemoryDexClassLoader` |
14 | | -- **JNI-driven bootstrap** |
15 | | - - Menu initialization is triggered fully from native code |
16 | | -- **Cleaner injection surface** |
17 | | - - No file writes, no asset extraction |
18 | | -- **Compatible with existing LGL menu Java code** |
19 | | - |
20 | | ---- |
21 | | - |
22 | | -## 🧠 How It Works (High-Level) |
23 | | - |
24 | | -1. **Dex embedding** |
25 | | - - `FloatingModMenu.dex` is converted to a HEX string and stored in native code. |
26 | | -2. **HEX → ByteBuffer** |
27 | | - - HEX string is converted back into bytes at runtime. |
28 | | -3. **InMemoryDexClassLoader** |
29 | | - - Dex is loaded directly from memory. |
30 | | -4. **JNI native bindings** |
31 | | - - Native functions are registered to the Java menu class. |
32 | | -5. **Menu startup** |
33 | | - - Calls `FloatingModMenu.antik(Context)` to launch the floating menu. |
34 | | - |
35 | | ---- |
36 | | - |
37 | | -## 📂 Important Components |
38 | | - |
39 | | -### Embedded Dex |
40 | | -```cpp |
41 | | -static std::string DI = "HEX_CODE_OF_DEX"; |
42 | | -``` |
43 | | - |
44 | | -- This must be the **HEX-encoded** version of `FloatingModMenu.dex`. |
45 | | - |
46 | | ---- |
47 | | - |
48 | | -### JNI Native Interface |
49 | | - |
50 | | -Registered native methods: |
51 | | - |
52 | | -| Method | Description | |
53 | | -|------|------------| |
54 | | -| `Icon()` | Menu icon | |
55 | | -| `IconWebViewData()` | WebView icon data | |
56 | | -| `getFeatureList()` | Feature list | |
57 | | -| `settingsList()` | Settings list | |
58 | | -| `Changes(...)` | Feature toggle handler | |
59 | | -| `setTitleText(TextView)` | Title customization | |
60 | | -| `setHeadingText(TextView)` | Heading customization | |
61 | | - |
62 | | ---- |
63 | | - |
64 | | -### Dex Loading Logic |
65 | | - |
66 | | -Uses: |
67 | | -```java |
68 | | -InMemoryDexClassLoader(ByteBuffer[] dex, ClassLoader parent) |
69 | | -``` |
70 | | - |
71 | | -Loads: |
72 | | -```java |
73 | | -uk.lgl.modmenu.FloatingModMenu |
74 | | -``` |
75 | | - |
76 | | ---- |
77 | | - |
78 | | -## 🚀 Entry Point |
79 | | - |
80 | | -```cpp |
81 | | -void binJava(); |
82 | | -``` |
83 | | - |
84 | | -- Called after `JNI_OnLoad` |
85 | | -- Retrieves `Application` context via `ActivityThread` |
86 | | -- Starts menu initialization |
87 | | - |
88 | | ---- |
89 | | - |
90 | | -## 🔧 Requirements |
91 | | - |
92 | | -- Android 8.0+ (API 26+) |
93 | | -- ARMv7 / ARM64 |
94 | | -- JNI-based injection environment |
95 | | -- Prebuilt compatible `FloatingModMenu.dex` |
96 | | - |
97 | | ---- |
98 | | - |
99 | | -## ⚠️ Notes |
100 | | - |
101 | | -- This project modifies runtime behavior of apps. |
102 | | -- Usage may violate application Terms of Service. |
103 | | -- Intended for educational and research purposes. |
104 | | - |
105 | | ---- |
106 | | - |
107 | | -## 📜 Credits |
108 | | - |
109 | | -- Original concept: LGL Android Mod Menu |
110 | | -- Project Creation: Aniket |
111 | | -- In-memory dex loader: NepMods |
112 | | - |
| 1 | +# ========================================================== |
| 2 | +# NATIVE MOD MENU (NMM) |
| 3 | +# ========================================================== |
| 4 | +# A custom high-performance reimplementation of the LGL |
| 5 | +# Android Mod Menu with In-Memory Dex Loading. |
| 6 | +# ========================================================== |
| 7 | + |
| 8 | +[ DESCRIPTION ] |
| 9 | +NativeModMenu is a stealth-oriented implementation that loads |
| 10 | +the Java UI layer entirely from memory using InMemoryDexClassLoader. |
| 11 | +By embedding the FloatingModMenu.dex as a HEX string, it eliminates |
| 12 | +the need for shipping or extracting external .dex files on disk. |
| 13 | + |
| 14 | +[ CORE ARCHITECTURE ] |
| 15 | +- ZERO DISK FOOTPRINT: No external dex file or asset extraction. |
| 16 | +- MEMORY LOADING: Utilizes dalvik.system.InMemoryDexClassLoader. |
| 17 | +- JNI BOOTSTRAP: Menu initialization triggered via native code. |
| 18 | +- CLEAN INJECTION: Stealthier footprint for modern environments. |
| 19 | +- FULL COMPATIBILITY: Supports existing LGL Java-based menu code. |
| 20 | + |
| 21 | +[ TECHNICAL WORKFLOW ] |
| 22 | +1. DEX EMBEDDING: FloatingModMenu.dex is stored as a HEX string. |
| 23 | +2. BUFFER CONVERSION: HEX string is parsed into a ByteBuffer at runtime. |
| 24 | +3. DYNAMIC LOADING: InMemoryDexClassLoader loads the buffer directly. |
| 25 | +4. NATIVE BINDING: JNI registers functions to the Java menu class. |
| 26 | +5. EXECUTION: Calls 'FloatingModMenu.antik(Context)' to launch. |
| 27 | + |
| 28 | +[ JNI NATIVE INTERFACE ] |
| 29 | +The following methods are registered dynamically: |
| 30 | + |
| 31 | +- Icon() : Returns menu icon data. |
| 32 | +- IconWebViewData() : Returns WebView-based icon data. |
| 33 | +- getFeatureList() : Defines the menu features. |
| 34 | +- settingsList() : Defines the menu settings. |
| 35 | +- Changes(...) : Handles feature toggles and logic. |
| 36 | +- setTitleText(...) : Customizes the menu title. |
| 37 | +- setHeadingText(...) : Customizes the menu heading. |
| 38 | + |
| 39 | +[ SYSTEM REQUIREMENTS ] |
| 40 | +- OS : Android 8.0+ (API Level 26+) |
| 41 | +- ARCH : ARMv7, ARM64-v8a |
| 42 | +- RUNTIME : JNI-based injection environment |
| 43 | +- ASSET : Prebuilt compatible FloatingModMenu.dex |
| 44 | + |
| 45 | +[ ENTRY POINT ] |
| 46 | +- Function: void binJava() |
| 47 | +- Executed post JNI_OnLoad. |
| 48 | +- Context acquisition via ActivityThread. |
| 49 | + |
| 50 | +[ LEGAL & ETHICAL NOTICE ] |
| 51 | +This project is intended for educational and research purposes |
| 52 | +only. Modifying runtime behavior of applications may violate |
| 53 | +Terms of Service. Use responsibly. |
| 54 | + |
| 55 | +[ CREDITS ] |
| 56 | +- Original Concept : LGL Android Mod Menu |
| 57 | +- Project Lead : AntikMods |
| 58 | +- Dex Loader Logic : NepMods |
| 59 | +# ========================================================== |
0 commit comments