Fix Gamescope startup on Samsung Android 16
Root cause
Gamescope prepends its payload and imagefs libraries to LD_LIBRARY_PATH. On Samsung Android 16, libgndrm_shim pulls in the system libandroid.so and then /system/lib64/libsqlite.so, but that SQLite library binds to the imagefs OpenSSL libcrypto rather than the matching system BoringSSL library. The Android linker therefore terminates Gamescope before Wine starts.
Evidence
The SM-S921B report ends at 0 seconds with:
CANNOT LINK EXECUTABLE ".../gamescope": cannot locate symbol "OpenSSL_add_all_algorithms" referenced by "/system/lib64/libsqlite.so"
No Wine process or game module is created.
Fix
In app/src/main/java/com/winlator/xenvironment/components/BionicProgramLauncherComponent.java:517, expose the matching system libcrypto through a private Gamescope library directory and prepend it to Gamescope LD_LIBRARY_PATH. This restores the compatibility handling previously added for the same Samsung dependency chain without changing Wine launches.
Verification
Static validation: git diff --check passes. Android build and device launch were not run in this support workspace.
Summary by CodeRabbit
- Improvements
- Gamescope now uses the system’s
libcrypto.sowhen it is available, making it accessible through Gamescope’s library search path. - If the system library is unavailable, Gamescope continues using its bundled libraries as before.
- Gamescope now uses the system’s