Introducing a new way to review your PRs.

Read the announcement

slickdaddyy / gamehub-oss

privacy oriented gamehub

View on GitHub

13 documents · Updated Nov 19, 2026

docs / streaming-ota-and-device-integration

Streaming, OTA, and Device Integration

Overview

This area is a set of APK patch routes for PC/NVIDIA streaming, virtual controller input, OTA firmware lookup, Bluetooth OTA support, and the dialogs used by device/firmware/radiator selection. The covered files are patch diffs: smali paths are encoded into filenames such as patches/smali_classes4__com__streaming__nvstream__http__NvHTTP.smali.diff, and resource layout paths are encoded as filenames such as patches/res__layout__popup_firmware_list.xml.diff. Each diff maps an original/... file to its lite/... replacement and is applied by filename routing rather than by normal source imports.

The NVIDIA streaming HTTP layer is touched through patches/smali_classes4__com__streaming__nvstream__http__NvHTTP.smali.diff. That patch changes the static boolean field m from an explicit false initializer to an uninitialized boolean declaration; on Android this still defaults to false, so the lite variant preserves the disabled initial state while changing the field declaration emitted in smali. The same pattern appears in virtual controller binding through patches/smali_classes4__com__streaming__binding__input__virtual_controller__VirtualControllerElement.smali.diff, where static boolean n is left with the VM default instead of = false. These two patches affect the streaming stack at the state-flag level rather than changing request handling or controller event mapping code directly.

The PC streaming network check is routed through patches/smali_classes5__com__xj__module_pcstream__view__PcStreamCheckNetDialog$onCreateDialog$3$1.smali.diff. Inside the dialog's click/callback code, the host passed to com/streaming/nvstream/jni/StreamingBridge.testClientConnectivity(Ljava/lang/String;II)I is changed from landscape-api.vgabc.com to raw.githubusercontent.com, with the same integer arguments around it. This means the dialog's connectivity result depends on reachability of GitHub raw content rather than the original vendor API host; the native StreamingBridge call remains the final authority on whether the check succeeds.

OTA firmware lookup is routed through patches/smali_classes5__com__xj__ota__data__repository__BaseOTARepository.smali.diff. The repository constructor stores the caller's BaseViewModel in vm, then initializes URL_GET_FIRMWARE; the patch changes that base URL from https://www.xiaoji.com/firmware/update/x1/ to http://127.0.0.1. Firmware-list retrieval therefore targets a local endpoint in the lite build instead of the vendor HTTPS endpoint.

Bluetooth OTA support is patched separately under the Jieli library namespace. patches/smali_classes3__com__jieli__jl_bt_ota__impl__RcspAuth.smali.diff changes the volatile static native-library state mIsLibLoaded from explicitly false to the default boolean value. patches/smali_classes3__com__jieli__jl_bt_ota__util__JL_Log.smali.diff does the same for the logging flag b, while leaving logging flag a explicitly true. These patches keep auth and logging state at their default values while changing how those defaults are declared in the smali.

The PC streaming UI layout patches are visual shell changes. patches/res__layout__pc_stream_list_title_menu_dialog.xml.diff and patches/res__layout__pc_stream_desc_focus_dialog.xml.diff keep the same root ShapeConstraintLayout, focus settings, IDs, and child views, but change the root background color from #ff191a1c to #ff111827. The title-menu dialog still exposes @id/common_focus_cl and @id/recyclerView; the description focus dialog still exposes @id/common_focus_cl, @id/back_iv, and @id/title_tv.

Firmware and device dialog layouts also keep their binding IDs while hiding close icons or restyling backgrounds. patches/res__layout__popup_firmware_list.xml.diff changes the firmware popup root background to #ff111827, keeps @id/rv_type as the focusable RecyclerView for firmware choices, and changes @id/closeIv from @mipmap/llanuncher_guide_close_gry to @android:color/transparent. patches/res__layout__llauncher_dialog_fragment_device_pop.xml.diff keeps the large device image @id/iv_device_popup and changes the close icon @id/closeIv to transparent. patches/res__layout__llauncher_dialog_fragment_scan_device_pop.xml.diff keeps the scan dialog's device name, device image, and connect button IDs (@id/tv_device_name, @id/iv_device, @id/btn_connect) while also making @id/closeIv transparent. patches/res__layout__llauncher_dialog_fragment_radiator_temp.xml.diff changes the radiator temperature dialog background to #ff111827, makes @id/closeIv transparent, and keeps the visible temperature container @id/cl_radiator_temp with its image/title chain.

Coupling

  • If the connectivity host in patches/smali_classes5__com__xj__module_pcstream__view__PcStreamCheckNetDialog$onCreateDialog$3$1.smali.diff is changed, verify StreamingBridge.testClientConnectivity still accepts that host form and still represents the same user-facing network check; the smali patch only swaps the string and does not adapt error handling or port parameters.
  • If firmware update routing in patches/smali_classes5__com__xj__ota__data__repository__BaseOTARepository.smali.diff changes away from http://127.0.0.1, also check patches/res__layout__popup_firmware_list.xml.diff; the popup still presents @id/rv_type as the firmware list, so an unreachable or schema-incompatible firmware endpoint will surface as an empty or broken selection dialog rather than as a layout failure.
  • If device dialog close behavior is changed in code, verify the layouts that now use transparent close drawables: patches/res__layout__popup_firmware_list.xml.diff, patches/res__layout__llauncher_dialog_fragment_device_pop.xml.diff, patches/res__layout__llauncher_dialog_fragment_scan_device_pop.xml.diff, and patches/res__layout__llauncher_dialog_fragment_radiator_temp.xml.diff. The views still exist as @id/closeIv, but the affordance is intentionally invisible.
  • If generated binding or data-binding expectations change, keep the IDs in the layout diffs stable. The PC streaming layouts preserve @id/common_focus_cl, @id/recyclerView, @id/back_iv, and @id/title_tv; the device and firmware dialogs preserve @id/rv_type, @id/iv_device_popup, @id/tv_device_name, @id/iv_device, @id/btn_connect, and @id/cl_radiator_temp.

Risks

  • patches/smali_classes5__com__xj__module_pcstream__view__PcStreamCheckNetDialog$onCreateDialog$3$1.smali.diff makes PC stream connectivity depend on raw.githubusercontent.com. If that host is blocked or rate-limited in the user's network, the dialog can report streaming connectivity failure even when the original vendor host or the target PC stream path would have worked.
  • patches/smali_classes5__com__xj__ota__data__repository__BaseOTARepository.smali.diff changes firmware lookup to http://127.0.0.1. If no local service is running with the expected firmware response, firmware discovery breaks and patches/res__layout__popup_firmware_list.xml.diff will have no usable firmware entries to present.
  • patches/res__layout__popup_firmware_list.xml.diff, patches/res__layout__llauncher_dialog_fragment_device_pop.xml.diff, patches/res__layout__llauncher_dialog_fragment_scan_device_pop.xml.diff, and patches/res__layout__llauncher_dialog_fragment_radiator_temp.xml.diff keep clickable close views but make their drawables transparent. If no other dismissal hint exists, users may not discover how to close these popups even though code can still bind @id/closeIv.