Skip to content

[Bug] Wine crashes on Android 9/API 28: missing ASurfaceTransaction_create #151

Open

Description

@TDAHzeirenses

Device and app

  • Device: Amazon Fire HD 10 (KFTRWI, 9th generation), MediaTek MT8183 / Mali-G72 MP3
  • Android: 9, API 28
  • GameHub Lite: 5.1.8 (versionCode 65)
  • ABI: arm64-v8a

Steps to reproduce

  1. Import a local Windows installer.
  2. Open its game details and press Play Now (the configured executable is .../GameHub/Install/AOE3/setup.exe).

Expected

Wine starts and runs the selected installer.

Actual

gamehub.lite:wine crashes while creating WineActivity, before the Windows installer starts:

E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: gamehub.lite:wine, PID: 11865
E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "ASurfaceTransaction_create" referenced by ".../lib/arm64/libwinemu.so"
    at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
    at java.lang.System.loadLibrary(System.java:1669)
    at com.winemu.core.gamepad.GamepadServerManager.<clinit>(Unknown Source:10)
    ...
    at com.xj.winemu.WineActivity.onCreate(...)

The GameHub Wine log identifies the same local executable path and reports Android 9 / SDK 28. The Android NDK reference says ASurfaceTransaction_create is available since API 29: https://developer.android.com/ndk/reference/group/native-activity#ASurfaceTransaction_create

Could the native engine either guard/dynamically resolve this API and provide a fallback for API 28, or gracefully disable the optional gamepad server on older Android? If Android 10+ is required, please raise/document the effective minimum API because the installed APK advertises minSdk 26.

I have the full local logs and can provide the relevant files if maintainers need them. I have intentionally omitted unrelated device logcat entries and device identifiers here.

Activity

  1. TDAHzeirenses commented on Nov 3, 2026

    @TDAHzeirenses
    Author

    Additional research: Android documents this NDK symbol as API 29+, and notes that native symbols are eagerly resolved when a library loads; direct strong references to unavailable APIs can prevent the whole .so from loading on older Android. It recommends dlopen/dlsym or weak API references for newer APIs: https://developer.android.com/ndk/guides/sdk-versions

    A concrete Android 9-safe pattern exists in GameNative's public native renderer: it checks the device API level, loads libandroid.so, resolves the SurfaceControl/SurfaceTransaction functions with dlsym, and returns “unavailable” below API 29 or when symbols are missing, allowing the rest of the app to continue: https://github.com/utkarshdalal/GameNative/blob/master/app/src/main/cpp/asurfacerenderer/ASurfaceRendererContext.cpp

    This is a reference implementation rather than a drop-in libwinemu.so replacement; the failing library here still needs its strong reference removed/guarded, or its optional GamepadServerManager load skipped on API 28.

  2. TDAHzeirenses commented on Nov 3, 2026

    @TDAHzeirenses
    Author

    Relevant lines from GameHub's own Wine log (device serials and unrelated system/app logs are excluded):

    Device Manufacturer: Amazon
    Device Model       : KFTRWI
    Android Version    : 9
    Android SDK        : 28
    App VersionName    : 5.1.8
    App VersionCode    : 65
    21:26:39.492 D/cpt-cjs: wine page ... isLocalGame=true ... exePath=/storage/emulated/0/GameHub/Install/AOE3/setup.exe ...
    

    The crash logcat timestamp for that launch is 21:26:39.980 and the process dies immediately after the failed native library load. The complete local collection remains available if maintainers request more detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions