·
8 commits
to master
since this release
Patch & Patch Generation (GameHub v5.1.0)
The files needed to contribute to the project and patch GameHub 5.1.0 yourself are now released.
- Completely reworked the initial patching approach.
- Revanced patch is a work in progress, feel free to contribute to this if you are comfortable with revanced.
- Easy update patches after modifications
- Work on macOS/Linux. (maybe windows?)
Read the README file for a full explanation.
FAQ
- Does this work with GameHub version not 5.1.0
- no.
How It Works
The patcher uses a multi-step process:
- Decompile - Uses apktool to decompile the original APK to smali bytecode
- Delete - Removes telemetry SDKs, unused assets, and tracking libraries
- Patch - Applies unified diff patches to modify smali code
- Add - Copies new files (resources, additional smali)
- Rebuild - Reassembles the APK using apktool
- Sign - Signs with a debug keystore for installation
Patch Contents
| Category | Count | Description |
|---|---|---|
| Deletions | 3,385 | Telemetry SDKs, tracking code, unused assets |
| Additions | 2,856 | New resources, modified assets, new features |
| Modifications | 223 | Smali code patches for behavior changes |
Removed Components
- Native libraries: libumeng-spy.so, libcrashsdk.so, libalicomphonenumberauthsdk_core.so, etc.
- SDKs: Umeng Analytics, JPush, Firebase Analytics, Tencent login
- Assets: Splash video, auth videos, emoji font (saves ~30MB)
- Permissions: Location, contacts, phone state, ad tracking
Added Features
- Custom splash/intro video from community CDN
- Local game ID copy functionality
- Offline mode improvements
- News page integration with community API
For Developers
Regenerating Patches
If you've modified the Lite APK and want to update the patches:
./generate-patches.sh [path/to/original.apk] [path/to/lite.apk]This will:
- Decompile both APKs
- Generate diff patches for modified files
- Copy new files to patches directory
- Create deletion and addition lists
Patch Directory Structure
patches/
├── files_to_delete.txt # List of files to remove
├── files_to_add.txt # List of files to add
├── files_to_patch.txt # List of files to modify
├── diffs/ # Unified diff patches
│ ├── AndroidManifest.xml.patch
│ ├── smali/...
│ └── res/...
├── new_files/ # New files to add
│ ├── res/...
│ └── smali_classes10/... # Robot language files to add
└── stats.txt # Patch statistics (ignored and generated on patch-generation)