Custom launcher • native code injection • full APK build pipeline
UnityRP2.0 is a modding project for a Unity-based Android game. It ships a custom launcher with an in-game MOD menu, native code injection, and a complete APK build pipeline.
The build is powered by ApkForge — a toolkit for APK decompilation, modification, and repackaging.
⚠️ Before you use this: this project modifies a third-party game via APK decompilation and native code injection. Make sure you have the right to do so under your jurisdiction and the original game's terms of use.
UnityRP2.0/
│
├── build_config.json # ApkForge build configuration
├── keystore.json # APK signing credentials (see Security below)
├── UnityRP.keystore # Keystore file
│
├── OriginalGame/ # Source APK
│ └── LAC (1.9.4).apk
│
├── src/main/
│ ├── AndroidManifest.xml
│ ├── java/UNITY/ONLINE/ # Kotlin launcher code
│ │ ├── MainActivity.kt
│ │ ├── GameActivity.kt
│ │ ├── RobustDownloadService.kt
│ │ └── ... (12 more files)
│ │
│ ├── cpp/ # Native C++ injection code
│ │ ├── main.cpp
│ │ ├── CMakeLists.txt
│ │ ├── And64InlineHook/
│ │ ├── Dobby/
│ │ ├── KittyMemory/
│ │ ├── ShadowHook/
│ │ ├── ByteHook/
│ │ └── Il2cpp_Resolver_Android/
│ │
│ └── res/ # Resources (images, layouts)
│
├── tools/
│ ├── ApkForge/
│ ├── apktool/
│ ├── baksmali/
│ ├── smali/
│ └── Download_Dependencies/
│
└── build.bat / build.sh / build.ps1 / build.py
| Tool | Version |
|---|---|
| Python | 3.8+ |
| Java JDK | 8+ |
| Android SDK | d8, apksigner, zipalign |
| CMake + Ninja | for native code compilation |
-
Place the game APK in
OriginalGame/:OriginalGame/LAC (1.9.4).apk -
Run the build using any method:
# Windows build.bat # Linux/macOS ./build.sh # Python (cross-platform) python build.py
-
Get the modded APK from
ModdedGame/.
- ✅ Game start with OBB validation
- ✅ OBB file download and verification
- ✅ Internet connection monitoring
- ✅ Permission management
- ✅ Error reporting to Telegram (with user consent)
- ✅ Performance monitoring
ObbManager— validates OBB integrity, managesmain.*.obbandUnityBuild4.txtRobustDownloadService— resumable downloads with retry logic (5 attempts), pause/resume, and progress tracking
Overlay with real-time graphics and performance tweaks:
| Category | Settings |
|---|---|
| Performance | FPS Limit, VSync |
| Graphics | Anti-Aliasing, Anisotropic Filtering |
| Shadows | Distance, Quality, Dynamic Shadows |
| Render Distance | Far Clip Plane |
| Post Processing | Motion Blur, Bloom, Ambient Occlusion, Color Grading, Depth of Field |
| Scene | Lighting, Water |
| Resolution | 720p, 1080p, 1440p |
C++ library loaded by the launcher, built on top of several open-source hooking and reverse-engineering frameworks:
- Hooking: Dobby, ShadowHook (android-inline-hook), ByteHook (bhook), GlossHook
- Memory manipulation: KittyMemory, And64InlineHook
- IL2CPP access: Il2cpp_Resolver_Android for runtime manipulation
- Unity class resolution: UnityResolve.hpp
LoggingService— background log capture with smart filteringTelegramLogger— error reporting to Telegram (requires user consent, with rate limiting)PerformanceMonitor/PerformanceOverlay— real-time FPS/memory tracking
On first launch, the launcher asks the user for consent before sending any anonymous diagnostic reports. Nothing is sent without consent. If granted, reports may include:
- device model, Android version, app version
- crash stack traces
- app log lines relevant to the error
No personal data is collected. Consent can be reset via ConsentManager.resetConsent().
{
"version": { "code": 2, "name": "2.0.2" },
"app": { "name": "UNITY ONLINE", "package_id": "UNITY.ONLINE" },
"build": { "type": "Debug", "target_dex_index": 13 },
"abi": { "keep_only": ["arm64-v8a"], "remove_others": true }
}{
"keystore_path": "UnityRP.keystore",
"keystore_alias": "release",
"keystore_password": "********",
"key_password": "********"
}
⚠️ Security: keep your real keystore and passwords out of the public repository. Use.gitignoreand a local config — never commit real credentials.
The bot token and chat ID are not stored in the repository. See telegram_config.properties.example — copy it to assets/telegram_config.properties and fill in your own values locally.
The C++ library is built via CMake. All source code is in src/main/cpp/:
cpp/
├── main.cpp # Entry point
├── CMakeLists.txt # Build configuration
├── Dobby/ # Hooking framework
├── KittyMemory/ # Memory manipulation
├── And64InlineHook/ # ARM64 inline hooks
├── android-inline-hook/ # ShadowHook
├── bhook/ # ByteHook
├── GlossHook/ # Hook utilities
├── Il2cpp_Resolver_Android/ # IL2CPP resolver
└── UnityResolve.hpp/ # Unity resolution
Supported ABI: arm64-v8a only (configured in build_config.json).
tools/Download_Dependencies/ is a Gradle project for downloading external libraries:
cd tools/Download_Dependencies
# On Windows:
downloadDependencies.bat
# Or manually:
gradlew downloadDependenciesKotlin/Java code — place .kt files in src/main/java/UNITY/ONLINE/
Native code — place .cpp/.hpp files in src/main/cpp/, then add them to CMakeLists.txt:
file(GLOB_RECURSE YOUR_SOURCES "${CMAKE_SOURCE_DIR}/YourFolder/*.cpp")
target_sources(UNITYONLINE PRIVATE ${YOUR_SOURCES})Resources — images in res/drawable/, layouts in res/layout/
Build pipeline — edit in build_config.json:
"pipeline": [
"_print_header",
"_find_files",
"_run_apktool_decompile",
// add or remove steps here
"_sign_apk",
"_print_final_summary"
]- Decompile — apktool extracts smali, resources, and manifest from the original APK
- Compile — your Kotlin/Java code is compiled to classes, then to DEX, then to smali
- Build Native — CMake compiles C++ code to
libUNITYONLINE.so - Merge — your smali code, resources, and native library are merged into the decompiled APK
- Rebuild — apktool reassembles the APK
- Sign — zipalign + apksigner signs the APK
- Output — ready-to-install APK in
ModdedGame/
| File | Purpose |
|---|---|
MainActivity.kt |
Main launcher activity |
GameActivity.kt |
Game starter with MOD menu overlay |
RobustDownloadService.kt |
OBB download with pause/resume |
ObbManager.kt |
OBB integrity verification |
StatusManager.kt |
Internet/OBB status monitoring |
PermissionManager.kt |
Runtime permission handling |
ConsentManager.kt |
User consent tracking |
ConsentDialog.kt |
Consent dialog UI |
TelegramLogger.kt |
Error reporting to Telegram |
TelegramSubscribeDialog.kt |
Telegram subscription prompt |
LoggingService.kt |
Background log capture |
PerformanceMonitor.kt |
FPS/memory monitoring |
PerformanceOverlay.kt |
Performance overlay in game |
MainScreen.kt |
Launcher UI components |
| Component | Purpose | Source |
|---|---|---|
main.cpp |
Native entry point, loads hooking frameworks | — |
Dobby/ |
Hooking library (ARM64 support) | jmpews/Dobby |
KittyMemory/ |
Memory reading/writing, pattern scanning | MJx0/KittyMemory |
And64InlineHook/ |
ARM64 inline hooking | Rprop/And64InlineHook |
android-inline-hook/ |
ByteDance's ShadowHook | bytedance/android-inline-hook |
bhook/ |
ByteDance's ByteHook | bytedance/bhook |
GlossHook/ |
Hook utilities | XMDS/GlossHook |
Il2cpp_Resolver_Android/ |
IL2CPP runtime access | KING-UTKARSH/Il2cpp_Resolver_Android |
UnityResolve.hpp/ |
Unity class resolution utilities | issuimo/UnityResolve.hpp |
| Tool | Purpose | Source |
|---|---|---|
| ApkForge | APK decompile/modify/repack pipeline | All1eexx/ApkForge |
| apktool | APK decompilation & rebuilding | iBotPeaches/Apktool |
| smali/baksmali | Dex assembler/disassembler | JesusFreke/smali |
- Fork the repository
- Create a feature branch
- Make your changes
- Test the build
- Submit a pull request
This project wouldn't be possible without these open-source tools and libraries:
- ApkForge
- Apktool
- smali
- And64InlineHook
- android-inline-hook (ShadowHook)
- bhook (ByteHook)
- Dobby
- GlossHook
- Il2cpp_Resolver_Android
- KittyMemory
- UnityResolve.hpp
Please check each project's license terms before redistributing or building on top of this repository.
MIT License — see LICENSE for details.