Knowledge Base updated: 2026-11-19
Knowledge Base Index
1. Orientation
This repository is a reverse-engineered GameHub Android APK workspace focused on auditing, patching, and slimming a decompiled app. The highest-level flow is: inspect decompiled APK artifacts, apply targeted .diff patches, and preserve the patched lightweight APK resources under lite_resources/.
Main parts:
- Patch pipeline — top-level scripts, rule lists, reports, and
patches/*.diffdescribe how changes are applied and why. - APK resource shell —
lite_resources/res/**plus manifest/resource diffs define the app UI assets, values, layouts, media, and network/security metadata. - App startup and shared services — app/splash, locale, HTTP/user/common UI helpers, payment/share touchpoints, and operation utilities.
- Landscape launcher — the main launcher shell, onboarding flow, game detail/media views, settings/account screens, and related dialogs.
- Input/device features — key mapping, PC/NVIDIA streaming, virtual controller integration, OTA/firmware/device dialogs, and Windows/Wine emulation.
- Third-party SDK hardening — patches for bundled SDKs and libraries such as push, analytics, crash, SSO, media, AndroidX, and identifier providers.
Critical state is stored as repository artifacts rather than live services:
patches/*.diffholds the intended code/resource modifications.lite_resources/**holds the lightweight decompiled APK resource subset and surviving smali snippets.- Top-level analysis and rule files document removal/security/API rationale used by the patching workflow.
2. Architecture diagrams
flowchart TD
subgraph Repo[gamehub-oss]
Scripts[autopatcher.sh\nconversion_rules.txt\nfiles_to_remove.txt]
Reports[Security/API/Bloat reports]
Patches[patches/*.diff]
Lite[lite_resources/**]
end
subgraph APK[Patched GameHub APK surface]
Manifest[Manifest + apktool metadata]
Resources[res layouts/values/assets]
Startup[App startup + splash]
Common[Common services + user]
Launcher[Landscape launcher]
Mapping[Input mapping]
Device[Streaming/OTA/device]
WinEmu[Windows/Wine emulation]
SDKs[Third-party SDKs]
end
Reports --> Scripts
Scripts --> Patches
Patches --> Manifest
Patches --> Resources
Patches --> Startup
Patches --> Common
Patches --> Launcher
Patches --> Mapping
Patches --> Device
Patches --> WinEmu
Patches --> SDKs
Resources --> Lite
Startup --> Launcher
Common --> Launcher
Launcher --> Mapping
Launcher --> Device
Launcher --> WinEmu
flowchart LR
Rules[conversion_rules.txt\nfiles_to_remove.txt] --> Auto[autopatcher.sh]
Analysis[Analysis reports] --> Auto
Auto --> PatchSet[patches/*.diff]
PatchSet --> Decompiled[APK files/resources]
Decompiled --> Lite[lite_resources/**]
flowchart TD
App[App / Splash] --> Locale[Locale + base config]
App --> Router[Launcher router]
Router --> Guide[Onboarding guide]
Router --> Main[Launcher main]
Main --> Game[Game detail + media]
Main --> Settings[Settings/account/share]
Main --> Mapping[Input mapping]
Main --> Device[Streaming + OTA]
Main --> WinEmu[Wine/WinEmu]
3. Glossary
- GameHub — the Android product represented by the decompiled APK and patch set.
- Landscape launcher /
llauncher— the TV/landscape-oriented launcher UI package and its prefixed layouts. - WinEmu / Wine — Windows game/emulation feature surfaces, dialogs, and environment configuration.
- PC stream / NvStream — PC/NVIDIA streaming integration and related network/device checks.
- Mapping — key/touch/gamepad input remapping subsystem for controller overlays and HID modes.
4. Codebase-wide invariants
- Patch ownership is encoded by filename: APK paths are flattened into double-underscore diff names under
patches/, e.g.patches/smali_classes5__com__xj__mapping__utils__ConfigUtil.smali.diffandpatches/res__layout__llauncher_activity_new_launcher_main.xml.diff. - The lightweight checked-in APK subset lives under
lite_resources/, with resource assets inlite_resources/res/**and remaining smali snippets in numbered dex folders such aslite_resources/smali_classes4/**,lite_resources/smali_classes5/**, andlite_resources/smali_classes10/**. - Launcher layout resources use the
llauncher_prefix, evidenced by paths such aspatches/res__layout__llauncher_activity_new_launcher_main.xml.diffandpatches/res__layout__llauncher_dialog_fragment_button_mapping.xml.diff. - Decompiled app-feature patches are grouped by original dex shard in the patch filename, such as
smali_classes4__...for core/common app surfaces andsmali_classes5__...for launcher, mapping, OTA, and WinEmu feature surfaces.
5. Routing table
-
BLOAT_REMOVAL_ANALYSIS.md -> docs/repository-patch-pipeline.md
-
COMPREHENSIVE_SECURITY_ANALYSIS_REPORT.md -> docs/repository-patch-pipeline.md
-
GAMEHUB_API_ANALYSIS.md -> docs/repository-patch-pipeline.md
-
broad changes to patch application/removal workflow -> docs/repository-patch-pipeline.md
-
lite_resources/res/**-> docs/apk-resources-and-manifest.md -
lite_resources/README.md -> docs/apk-resources-and-manifest.md
-
patches/AndroidManifest.xml.diff-> docs/apk-resources-and-manifest.md -
patches/apktool.yml.diff-> docs/apk-resources-and-manifest.md -
patches/res__*.diff-> docs/apk-resources-and-manifest.md -
patches/res__layout*__*.diff-> docs/apk-resources-and-manifest.md -
patches/res__values*__*.diff-> docs/apk-resources-and-manifest.md -
patches/res__xml__*.diff-> docs/apk-resources-and-manifest.md -
manifest, network security, apktool, resource ID, value, media, or layout-only changes -> docs/apk-resources-and-manifest.md
-
lite_resources/smali_classes4/com/xj/app/**-> docs/app-startup-core.md -
patches/smali_classes4__com__xj__app__*.diff-> docs/app-startup-core.md -
patches/smali_classes4__com__xj__base__language__*.diff-> docs/app-startup-core.md -
patches/smali_classes4__com__xj__adb__wifiui__http__*.diff-> docs/app-startup-core.md -
app startup, splash, application singleton, locale, or base HTTP config changes -> docs/app-startup-core.md
-
patches/smali_classes4__com__xj__common__*.diff-> docs/common-services-and-user.md -
patches/smali_classes4__com__xiaoji__module__operations__*.diff-> docs/common-services-and-user.md -
patches/smali_classes4__com__xiaoji__egggame__wxapi__*.diff-> docs/common-services-and-user.md -
patches/res__layout__comm_*.diff-> docs/common-services-and-user.md -
patches/res__layout__pay_*.diff-> docs/common-services-and-user.md -
shared user/session, preview, permission dialog, common tab/list, operation config, logging, payment, or WeChat/share changes -> docs/common-services-and-user.md
-
patches/smali_classes5__com__xj__landscape__launcher__LandscapeLauncherAppKt.smali.diff-> docs/landscape-launcher-shell.md -
patches/smali_classes5__com__xj__landscape__launcher__launcher__*.diff-> docs/landscape-launcher-shell.md -
patches/smali_classes5__com__xj__landscape__launcher__router__*.diff-> docs/landscape-launcher-shell.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__main__*.diff-> docs/landscape-launcher-shell.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__main__**.diff-> docs/landscape-launcher-shell.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__menu__*.diff-> docs/landscape-launcher-shell.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__compatible__*.diff-> docs/landscape-launcher-shell.md -
patches/smali_classes5__com__xj__landscape__launcher__view__popup__*.diff-> docs/landscape-launcher-shell.md -
patches/res__layout__llauncher_activity_new_launcher_main.xml.diff-> docs/landscape-launcher-shell.md -
patches/res__layout__llauncher_popup_*.diff-> docs/landscape-launcher-shell.md -
patches/res__layout__llauncher_view_*.diff-> docs/landscape-launcher-shell.md -
patches/res__layout__llauncher_dialog_compatible.xml.diff-> docs/landscape-launcher-shell.md -
patches/res__layout__llauncher_promotional_dialog.xml.diff-> docs/landscape-launcher-shell.md -
launcher router, main screen, left menu, home/me cards, compatibility, or promotional popup changes -> docs/landscape-launcher-shell.md
-
patches/smali_classes5__com__xj__landscape__launcher__ui__guide__*.diff-> docs/launcher-onboarding-guide-flow.md -
patches/res__layout__llauncher_activity_guide_*.diff-> docs/launcher-onboarding-guide-flow.md -
patches/res__layout-sw600dp__llauncher_activity_guide_*.diff-> docs/launcher-onboarding-guide-flow.md -
patches/res__layout__llauncher_dialog_fragment_requeest_ble_permission.xml.diff-> docs/launcher-onboarding-guide-flow.md -
first-run guide, permission prompt, avatar/info setup, keypad guide, USB/BLE/contact/notification guide changes -> docs/launcher-onboarding-guide-flow.md
-
lite_resources/smali_classes5/com/xj/landscape/launcher/ui/gamedetail/**-> docs/launcher-game-detail-and-media.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__gamedetail__*.diff-> docs/launcher-game-detail-and-media.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__dialog__NewsDetailDialog*.diff-> docs/launcher-game-detail-and-media.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__dialog__QrLoginHelper.smali.diff-> docs/launcher-game-detail-and-media.md -
patches/smali_classes5__com__xj__landscape__launcher__data__mock__*.diff-> docs/launcher-game-detail-and-media.md -
patches/res__layout__llauncher_dialog_news_detail.xml.diff-> docs/launcher-game-detail-and-media.md -
patches/res__layout__llauncher_dialog_download_game_info.xml.diff-> docs/launcher-game-detail-and-media.md -
patches/res__layout__llauncher_v4_search_activity.xml.diff-> docs/launcher-game-detail-and-media.md -
patches/res__layout__llauncher_item_cardline_album.xml.diff-> docs/launcher-game-detail-and-media.md -
game detail, video playback, news detail, QR login, mock launcher data, search, or album card changes -> docs/launcher-game-detail-and-media.md
-
patches/smali_classes5__com__xj__landscape__launcher__ui__setting__*.diff-> docs/launcher-settings-account-share.md -
patches/smali_classes5__com__xj__landscape__launcher__ui__setting__tab__*.diff-> docs/launcher-settings-account-share.md -
patches/smali_classes5__com__xj__landscape__launcher__vm__SettingItemViewModel.smali.diff-> docs/launcher-settings-account-share.md -
patches/smali_classes5__com__xj__landscape__launcher__utils__OneKeyAliHelper.smali.diff-> docs/launcher-settings-account-share.md -
patches/smali_classes5__com__xj__landscape__launcher__utils__share__*.diff-> docs/launcher-settings-account-share.md -
patches/smali_classes5__com__xj__landscape__launcher__view__popup__SelectAndSingleInputDialog.smali.diff-> docs/launcher-settings-account-share.md -
patches/res__layout__dialog_*input*.diff-> docs/launcher-settings-account-share.md -
patches/res__layout__edit_pro_file_name_dialog.xml.diff-> docs/launcher-settings-account-share.md -
settings, about/help, setting view model, account login helper, share login, or select/input dialog changes -> docs/launcher-settings-account-share.md
-
patches/smali_classes5__com__xj__mapping__*.diff-> docs/input-mapping-controls.md -
patches/smali_classes5__com__xj__mapping__**.diff-> docs/input-mapping-controls.md -
patches/res__layout__map_key_oper_guide_layout.xml.diff-> docs/input-mapping-controls.md -
patches/res__layout__dialog_hid_model_popup.xml.diff-> docs/input-mapping-controls.md -
patches/res__layout__dialog_no_support_model_popup.xml.diff-> docs/input-mapping-controls.md -
patches/res__layout__xja_dialog_advanced_features.xml.diff-> docs/input-mapping-controls.md -
patches/res__layout__llauncher_dialog_fragment_button_mapping.xml.diff-> docs/input-mapping-controls.md -
patches/res__layout__llauncher_dialog_fragment_mapping_mode.xml.diff-> docs/input-mapping-controls.md -
keyboard edit service, HID mode, key mapping config, touch/GTouch utilities, gesture/canvas/keyboard view, or mapping dialog changes -> docs/input-mapping-controls.md
-
patches/smali_classes4__com__xj__winemu__*.diff-> docs/windows-emulation-module.md -
patches/smali_classes5__com__xj__winemu__*.diff-> docs/windows-emulation-module.md -
patches/smali_classes5__com__xj__winemu__**.diff-> docs/windows-emulation-module.md -
patches/res__layout__winemu_*.diff-> docs/windows-emulation-module.md -
patches/res__layout__wiemu_*.diff-> docs/windows-emulation-module.md -
patches/res__layout__env_params_input_dialog_layout.xml.diff-> docs/windows-emulation-module.md -
Wine activity, Windows emulator environment setting, imported game editing, reinstall dependency, WinEmu dialog, or env parameter changes -> docs/windows-emulation-module.md
-
patches/smali_classes4__com__streaming__*.diff-> docs/streaming-ota-and-device-integration.md -
patches/smali_classes5__com__xj__module_pcstream__*.diff-> docs/streaming-ota-and-device-integration.md -
patches/smali_classes5__com__xj__ota__*.diff-> docs/streaming-ota-and-device-integration.md -
patches/smali_classes3__com__jieli__jl_bt_ota__*.diff-> docs/streaming-ota-and-device-integration.md -
patches/res__layout__pc_stream_*.diff-> docs/streaming-ota-and-device-integration.md -
patches/res__layout__popup_firmware_list.xml.diff-> docs/streaming-ota-and-device-integration.md -
patches/res__layout__llauncher_dialog_fragment_device_pop.xml.diff-> docs/streaming-ota-and-device-integration.md -
patches/res__layout__llauncher_dialog_fragment_scan_device_pop.xml.diff-> docs/streaming-ota-and-device-integration.md -
patches/res__layout__llauncher_dialog_fragment_radiator_temp.xml.diff-> docs/streaming-ota-and-device-integration.md -
PC stream, NvHTTP/NVIDIA streaming, virtual controller, OTA repository, Bluetooth OTA auth/logging, firmware list, scan/device popup, or radiator temperature changes -> docs/streaming-ota-and-device-integration.md
-
patches/smali__androidx__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes2__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes3__com__google__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes4__com__umeng__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes4__com__uc__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes4__com__nirvana__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes4__com__shuyu__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes7__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/smali_classes6__*.diff-> docs/third-party-sdks-and-hardening.md -
patches/removal-mitm-proxy.diff-> docs/third-party-sdks-and-hardening.md -
push, analytics, crash, SSO, identifier, Google/Glide/Aria/protobuf/media, AndroidX/library, anti-debug/logging, or MITM removal changes -> docs/third-party-sdks-and-hardening.md