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 / third-party-sdks-and-hardening

Third-Party SDKs and Hardening Patches

Overview

This area is a set of smali patch diffs under patches/ that trim or harden bundled Android libraries and SDKs while keeping the app buildable against their public APIs. The routing is mostly by dex shard and package prefix: base AndroidX support-library patches live in patches/smali__androidx__*.diff, broad second-dex SDK patches live in patches/smali_classes2__*.diff, Google protobuf is isolated in patches/smali_classes3__com__google__*.diff, Umeng/UC/Nirvana/GSY patches live under patches/smali_classes4__com__*.diff, Kotlin lives in patches/smali_classes6__*.diff, and media/identifier/crypto/logging libraries live in patches/smali_classes7__*.diff. patches/removal-mitm-proxy.diff is the one covered diff that targets first-party settings UI rather than a third-party package.

The largest behavioral removals are push and analytics SDK stubs. patches/smali_classes2__cn__jpush__android__api__JPushInterface.smali.diff collapses JPush's public interface from a full push, notification, in-app message, alias/tag, geofence, lifecycle, wake-reporting, and permission API into a near-empty class. Its companion diffs keep binary symbols but prevent work: patches/smali_classes2__cn__jpush__android__local__ActionHelper.smali.diff replaces dynamic plugin loading, background executors, callback dispatch, and notification/message handlers with a singleton shell whose methods return without side effects; patches/smali_classes2__cn__jpush__android__helper__Logger.smali.diff turns JPush logging entry points into no-ops; patches/smali_classes2__cn__jpush__android__data__JPushConfig.smali.diff removes vendor channel app-key/secret fields and leaves setters inert; and patches/smali_classes2__cn__jpush__android__api__TagAliasCallback.smali.diff removes the callback method declaration. Smaller Jiguang/JPush synthetic bridge patches (patches/smali_classes2__cn__jiguang__common__app__helper__d.smali.diff, patches/smali_classes2__cn__jiguang__common__app__helper__f.smali.diff, patches/smali_classes2__cn__jiguang__aw__k.smali.diff, patches/smali_classes2__cn__jiguang__ax__m.smali.diff, and patches/smali_classes2__cn__jiguang__ag__*.smali.diff) return null, empty strings, zeroes, or false instead of reading signing metadata, process names, package version codes, or cellular identities. Together these patches disable remote push behavior and reduce device/app/environment collection through the Jiguang stack.

Umeng analytics is similarly neutered. patches/smali_classes4__com__umeng__commonsdk__UMConfigure.smali.diff replaces a large common-SDK initializer with a short stub, removing reflection-based initialization of analytics, push, share, error, crash/APM, visual tracking, ZID, and OAID-related services. patches/smali_classes4__com__umeng__analytics__MobclickAgent.smali.diff keeps common app-facing tracking methods such as onEvent, page start/end, resume/pause, profile sign-in/off, kill-process, and debug toggles but makes them return immediately. This preserves call sites while preventing event upload, session/page tracking, profile identifiers, location/OpenGL/session config, custom error reporting, and pre-property storage.

Crash and telemetry endpoints are blocked rather than fully removed in the UC crash stack. patches/smali_classes4__com__uc__crashsdk__a__d.smali.diff rewrites both https://errlog.umeng.com and https://errlogos.umeng.com to http://127.0.0.1, so crash upload attempts loop back locally instead of leaving the device. patches/smali_classes4__com__uc__crashsdk__export__CrashApi.smali.diff, patches/smali_classes4__com__uc__crashsdk__b.smali.diff, and patches/smali_classes4__com__uc__crashsdk__a__g.smali.diff mainly normalize static null/false field initializers in CrashSDK state holders. patches/smali_classes4__com__nirvana__tools__logger__UaidTracker.smali.diff leaves Nirvana UAID tracking disabled by keeping its tracker-enable flag false.

Several identity and SSO paths are privacy hardening patches. patches/smali_classes2__com__cmic__sso__sdk__view__LoginAuthActivity.smali.diff rewrites the CMIC/Unicom disclaimer URL from https://opencloud.wostore.cn/authz/resource/html/disclaimer.html?fromsdk=true to http://127.0.0.1, preventing that SDK UI from fetching the remote carrier disclaimer. The repackage identifier libraries in patches/smali_classes7__org__repackage__com__zui__opendeviceidlibrary__OpenDeviceId.smali.diff, patches/smali_classes7__org__repackage__com__vivo__identifier__IdentifierIdClient.smali.diff, patches/smali_classes7__org__repackage__com__meizu__flyme__openidsdk__b.smali.diff, and patches/smali_classes7__org__repackage__a__a__a__a__a.smali.diff keep static debug/initialized fields at their default false/null values; these patches are compatibility-preserving and do not by themselves replace every identifier read with a stub. patches/smali_classes4__com__nirvana__tools__logger__UaidTracker.smali.diff is the clearer tracker disablement in this group.

Google, Glide, Aria, protobuf, and miscellaneous library patches are mostly initializer normalization and debug hardening. patches/smali_classes2__com__google__android__gms__common__internal__GmsClientSupervisor.smali.diff, patches/smali_classes2__com__google__android__gms__common__GooglePlayServicesUtilLight.smali.diff, and patches/smali_classes3__com__google__protobuf__ExtensionRegistryLite.smali.diff remove explicit = null/= false initializers without changing the runtime default values. patches/smali_classes2__com__bumptech__glide__util__pool__StateVerifier.smali.diff and patches/smali_classes2__com__bumptech__glide__util__pool__GlideTrace.smali.diff keep Glide debug verification/tracing disabled. patches/smali_classes2__com__arialyy__aria__orm__SqlHelper.smali.diff and patches/smali_classes2__com__arialyy__aria__orm__DBConfig.smali.diff keep Aria's main temp-dir, DB debug, DB name, and save-in-SD-card fields at default values.

Media-related hardening prevents optional native or unsafe network/media behavior from starting. patches/smali_classes2__com__coder__ffmpeg__jni__FFmpegConfig.smali.diff removes System.loadLibrary calls for ffmpeg-org and ffmpeg-command, so code paths that require those JNI libraries should be considered disabled. patches/smali_classes7__tv__danmaku__ijk__media__exo2__ExoSourceManager.smali.diff keeps the deprecated sSkipSSLChain flag false, which avoids the Exo/IJK code path that would skip SSL chain validation. patches/smali_classes7__tv__danmaku__ijk__media__exo2__CacheHelper.smali.diff, patches/smali_classes4__com__shuyu__gsyvideoplayer__utils__GSYVideoType.smali.diff, patches/smali_classes2__com__mainli__blur__BitmapBlur.smali.diff, and patches/smali_classes7__org__jcodec__common__tools__Debug.smali.diff mostly keep cache, render, blur, and debug flags at JVM defaults.

The AndroidX and other framework-library patches are low-level compatibility/debug changes. patches/smali__androidx__recyclerview__widget__RecyclerView.smali.diff, patches/smali__androidx__recyclerview__widget__DefaultItemAnimator.smali.diff, patches/smali__androidx__recyclerview__widget__ViewInfoStore.smali.diff, patches/smali_classes2__androidx__viewpager__widget__ViewPager.smali.diff, patches/smali__androidx__loader__app__LoaderManagerImpl.smali.diff, and patches/smali__androidx__appcompat__widget__VectorEnabledTintResources.smali.diff leave debug/cache booleans false. patches/smali__androidx__core__view__ViewCompat.smali.diff, patches/smali__androidx__core__view__KeyEventDispatcher.smali.diff, patches/smali__androidx__core__view__WindowInsetsCompat$Impl20.smali.diff, patches/smali__androidx__core__view__WindowInsetsCompat$BuilderImpl20.smali.diff, and patches/smali__androidx__core__graphics__TypefaceCompatApi21Impl.smali.diff normalize reflective method/field/constructor caches to their JVM defaults. patches/smali__androidx__media3__exoplayer__audio__DefaultAudioSink.smali.diff keeps failOnSpuriousAudioTimestamp false. patches/smali_classes6__kotlin__time__DurationJvmKt.smali.diff, patches/smali_classes7__org__slf4j__helpers__Util.smali.diff, and patches/smali_classes7__org__bouncycastle__pqc__crypto__newhope__NewHope.smali.diff are similar false/null default normalizations for Kotlin time, SLF4J helper state, and BouncyCastle statistical-test state. patches/smali_classes7__org__bouncycastle__pqc__jcajce__provider__mceliece__BCMcEliecePrivateKey.smali.diff is different: it merges exception handling around PrivateKeyInfo.getEncoded() so encoding failures still fall through to the existing null return.

patches/removal-mitm-proxy.diff removes the app's MITM proxy setting from smali_classes4/com/xj/winemu/settings/models/PcGameSettingsKt.smali by commenting out the block that adds R$string.pc_setting_item_61 with callback class com/xj/winemu/settings/models/p. The setting and callback code may still exist elsewhere, but this patch removes the visible settings entry from the PC game settings model.

Coupling

  • If any JPush API call sites are restored or newly added, verify the stubs in patches/smali_classes2__cn__jpush__android__api__JPushInterface.smali.diff, patches/smali_classes2__cn__jpush__android__local__ActionHelper.smali.diff, patches/smali_classes2__cn__jpush__android__helper__Logger.smali.diff, and patches/smali_classes2__cn__jpush__android__data__JPushConfig.smali.diff: they preserve only enough surface for linkage, not enough behavior for push, callbacks, registration, tags, or vendor-channel config.
  • If analytics, crash, or APM behavior is expected by product code, check both Umeng files together: patches/smali_classes4__com__umeng__commonsdk__UMConfigure.smali.diff prevents module initialization, while patches/smali_classes4__com__umeng__analytics__MobclickAgent.smali.diff makes the public analytics calls no-ops.
  • If crash upload/network diagnostics are changed, review patches/smali_classes4__com__uc__crashsdk__a__d.smali.diff with the UC crash state patches; endpoint loopback to http://127.0.0.1 is the privacy boundary, and replacing it with a remote URL re-enables crash telemetry.
  • If media playback code starts using FFmpeg JNI, update patches/smali_classes2__com__coder__ffmpeg__jni__FFmpegConfig.smali.diff or the native packaging together; this patch removes library loading, so downstream native calls will fail if invoked.
  • If the MITM proxy UI is renamed or moved, keep patches/removal-mitm-proxy.diff aligned with the settings builder block in smali_classes4/com/xj/winemu/settings/models/PcGameSettingsKt.smali; the hardening depends on not registering the pc_setting_item_61 entry, not on deleting the callback class.

Risks

  • patches/smali_classes2__cn__jpush__android__api__TagAliasCallback.smali.diff removes an abstract interface method. If any remaining class implements or invokes TagAliasCallback.gotResult, linkage or invocation can fail at runtime even though the SDK has been stubbed.
  • patches/smali_classes2__com__coder__ffmpeg__jni__FFmpegConfig.smali.diff removes System.loadLibrary for ffmpeg-org and ffmpeg-command; if a feature reaches FFmpeg native methods after this patch, the likely consequence is UnsatisfiedLinkError rather than a graceful no-op.
  • patches/smali_classes4__com__uc__crashsdk__a__d.smali.diff sends crash upload URLs to plain HTTP loopback. If a local service binds on 127.0.0.1 and accepts those paths, crash payloads could be delivered locally instead of simply failing closed.
  • patches/smali_classes2__com__cmic__sso__sdk__view__LoginAuthActivity.smali.diff replaces a required carrier disclaimer URL with loopback. If the SSO activity still renders that page, users may see a blank/error page and the carrier auth flow may fail before login.