ReVanced-based patches for transforming GameHub into GameHub Lite.
This is an alternative to the diff-based patching system in the parent directory. It uses the ReVanced Patcher framework for bytecode-level modifications.
| Approach | Best For |
|---|---|
Diff-based (../patch.sh) |
Quick patching, full control, simpler maintenance |
| ReVanced (this) | Integration with ReVanced Manager, portable patches |
| Patch | Description |
|---|---|
Disable JPush |
Disables JPush push notification SDK |
Disable All Telemetry |
Removes Umeng, Firebase, and all analytics |
Remove Tracking Resources |
Removes tracking permissions from manifest |
Remove Tracking SDKs |
Deletes tracking native libraries and assets |
GameHub Lite |
Complete transformation (includes all above) |
-
Java 17+
# macOS brew install openjdk@17 # Ubuntu sudo apt install openjdk-17-jdk
-
GitHub Token (for downloading ReVanced dependencies)
export GITHUB_ACTOR=your-username export GITHUB_TOKEN=your-token
# Using the helper script
./apply-patches.sh path/to/GameHub-5.1.0.apk
# With custom output
./apply-patches.sh GameHub-5.1.0.apk -o GameHub-Lite.apk
# List available patches
./apply-patches.sh -l# Build patches first
./gradlew build
# Apply with ReVanced CLI
java -jar tools/revanced-cli.jar patch \
--patch-bundle build/libs/gamehub-lite-patches.jar \
--out GameHub-Lite.apk \
GameHub-5.1.0.apk- Build the patches:
./gradlew build - Copy
build/libs/gamehub-lite-patches.jarto your device - Open ReVanced Manager
- Select GameHub APK
- Load the patches JAR
- Select patches and apply
revanced/
├── patches/
│ └── src/main/kotlin/app/revanced/patches/gamehub/
│ ├── shared/
│ │ └── Fingerprints.kt # Method fingerprints
│ ├── telemetry/
│ │ ├── DisableTelemetryPatch.kt
│ │ └── DisableAllTelemetryPatch.kt
│ └── misc/
│ ├── RemoveTrackingResourcesPatch.kt
│ └── GameHubLitePatch.kt
├── gradle/
│ ├── libs.versions.toml # Dependency versions
│ └── wrapper/
├── tools/ # ReVanced CLI (auto-downloaded)
├── output/ # Patched APKs
├── settings.gradle.kts
├── gradle.properties
├── apply-patches.sh # Helper script
└── README.md
# Full build
./gradlew build
# Clean build
./gradlew clean build-
Create a fingerprint in
shared/Fingerprints.kt:internal val myFingerprint = fingerprint { accessFlags(AccessFlags.PUBLIC) returns("V") custom { method, classDef -> classDef.type == "Lcom/example/MyClass;" && method.name == "myMethod" } }
-
Create a patch:
val myPatch = bytecodePatch( name = "My Patch", description = "Does something useful", ) { compatibleWith("com.xiaoji.egggame"("5.1.0")) execute { myFingerprint.method.addInstructions(0, "return-void") } }
# Build and apply in one step
./gradlew build && ./apply-patches.sh ../apk/GameHub-5.1.0.apk
# Install on device
adb install output/GameHub-Lite.apkThe ReVanced approach has some limitations compared to diff-based patching:
-
Package Removal: ReVanced can't easily delete entire SDK packages (Umeng, JPush). The bytecode patches disable initialization, but dead code remains.
-
Resource Changes: Limited support for bulk resource modifications. The diff-based approach handles PNG→WebP conversion and bulk deletions better.
-
Build Complexity: Requires Gradle, GitHub authentication, and understanding of the ReVanced API.
-
Update Resilience: Fingerprints may break with GameHub updates if method signatures change.
| Feature | Diff-Based | ReVanced |
|---|---|---|
| APK size reduction | Better (-56%) | Moderate |
| SDK removal | Complete | Disabled only |
| Maintenance | Simpler | More complex |
| Portability | Script-based | JAR-based |
| Manager integration | No | Yes |
| Update resilience | Good | Fingerprint-dependent |
Ensure GitHub credentials are set:
export GITHUB_ACTOR=your-username
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxOr add to gradle.properties:
gpr.user=your-username
gpr.key=ghp_xxxxxxxxxxxxEnsure the fingerprint matches the target method. Use jadx to inspect the APK:
jadx GameHub-5.1.0.apk -d jadx-output- Uninstall existing GameHub first
- Check signature: patched APKs use a different signature
- OG patcher (diff-based) - Simpler alternative
- ReVanced Patcher - Framework documentation
- ReVanced Patches - Example patches