GameHub Lite - ReVanced Patches - WORK IN PROGRESS

November 29, 2025 · View on GitHub

ReVanced-based patches for transforming GameHub into GameHub Lite.

Overview

This is an alternative to the diff-based patching system in the parent directory. It uses the ReVanced Patcher framework for bytecode-level modifications.

When to Use Which Approach

ApproachBest For
Diff-based (../patch.sh)Quick patching, full control, simpler maintenance
ReVanced (this)Integration with ReVanced Manager, portable patches

Available Patches

PatchDescription
Disable JPushDisables JPush push notification SDK
Disable All TelemetryRemoves Umeng, Firebase, and all analytics
Remove Tracking ResourcesRemoves tracking permissions from manifest
Remove Tracking SDKsDeletes tracking native libraries and assets
GameHub LiteComplete transformation (includes all above)

Quick Start

Prerequisites

  1. Java 17+

    # macOS
    brew install openjdk@17
    
    # Ubuntu
    sudo apt install openjdk-17-jdk
    
  2. GitHub Token (for downloading ReVanced dependencies)

    export GITHUB_ACTOR=your-username
    export GITHUB_TOKEN=your-token
    

Apply Patches

# 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

Using ReVanced CLI Directly

# 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

Using ReVanced Manager

  1. Build the patches: ./gradlew build
  2. Copy build/libs/gamehub-lite-patches.jar to your device
  3. Open ReVanced Manager
  4. Select GameHub APK
  5. Load the patches JAR
  6. Select patches and apply

Project Structure

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

Development

Building Patches

# Full build
./gradlew build

# Clean build
./gradlew clean build

Adding New Patches

  1. 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"
        }
    }
    
  2. 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")
        }
    }
    

Testing Patches

# 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.apk

Limitations

The ReVanced approach has some limitations compared to diff-based patching:

  1. Package Removal: ReVanced can't easily delete entire SDK packages (Umeng, JPush). The bytecode patches disable initialization, but dead code remains.

  2. Resource Changes: Limited support for bulk resource modifications. The diff-based approach handles PNG→WebP conversion and bulk deletions better.

  3. Build Complexity: Requires Gradle, GitHub authentication, and understanding of the ReVanced API.

  4. Update Resilience: Fingerprints may break with GameHub updates if method signatures change.

Comparison with Diff-Based Approach

FeatureDiff-BasedReVanced
APK size reductionBetter (-56%)Moderate
SDK removalCompleteDisabled only
MaintenanceSimplerMore complex
PortabilityScript-basedJAR-based
Manager integrationNoYes
Update resilienceGoodFingerprint-dependent

Troubleshooting

Build Fails with Authentication Error

Ensure GitHub credentials are set:

export GITHUB_ACTOR=your-username
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx

Or add to gradle.properties:

gpr.user=your-username
gpr.key=ghp_xxxxxxxxxxxx

Patch Not Found

Ensure the fingerprint matches the target method. Use jadx to inspect the APK:

jadx GameHub-5.1.0.apk -d jadx-output

APK Won't Install

  • Uninstall existing GameHub first
  • Check signature: patched APKs use a different signature