Skip to content

Stop gamescope from loading libandroid.so (payload 20261023.1) - #2227

Open
utkarshdalal wants to merge 1 commit into
masterfrom
gamescope-payload-no-libandroid
Open

utkarshdalal wants to merge 1 commit into
masterfrom
gamescope-payload-no-libandroid

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Description

Gamescope sessions preload libgndrm_shim.so into every process, and that shim pulled in libandroid.so without using it. On device libandroid.so loads ~215 system libraries, and they look up their own dependencies through our LD_LIBRARY_PATH, so they bind to imagefs libraries with the same name. That is how Samsung (libcrypto.so, #2223) and Xiaomi HyperOS (libjpeg.so, #2225) ended up with "CANNOT LINK EXECUTABLE gamescope", and 5 more shared names (libexpat libpng libvulkan libxml2 libz) were waiting for the next OEM.

This bumps the payload to 20261023.1, which has the libraries from GameNative/gamenative-drm#9:

  • libgndrm_shim.so no longer depends on libandroid.so
  • the ICD shim gets AHardwareBuffer_* from libnativewindow.so, whose dependency tree shares no names with imagefs

Everything else is byte-identical to 20261023 (the gamescope A43 build from #2224), so this also covers the payload bump in #2224. The archive is uploaded and matches on both downloads.gamenative.app and the r2.dev fallback.

Once this is verified on devices, the gamescope_system_libs links from #2223 and #2225 can go.

Recording

Device testing pending.

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Bumps the gamescope payload to 20261023.1 so libgndrm_shim.so no longer preloads libandroid.so into every process.

The old shim pulled in libandroid.so, whose ~215 system libraries could bind to imagefs libraries with the same name through LD_LIBRARY_PATH. That caused CANNOT LINK EXECUTABLE gamescope on Samsung (libcrypto.so) and Xiaomi HyperOS (libjpeg.so) devices, with more name collisions waiting. The new payload gets AHardwareBuffer_* from libnativewindow.so, whose dependency tree shares no names with imagefs. Everything else is byte-identical to 20261023 and also carries the gamescope A43 build. Once verified on devices, the gamescope_system_libs links from the earlier Samsung and Xiaomi fixes can go.

Written for commit 73deca4. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Updates
    • Updated the Gamescope component version used by the app. The app now uses the newer version when locating the corresponding archive and checking readiness. This update does not change any other user-facing functionality. No additional interface or feature changes are included.

Rebuilds libgndrm_shim.so without libandroid.so and has the ICD shim load
AHardwareBuffer from libnativewindow.so (GameNative/gamenative-drm#9), so
OEM libraries pulled in by libandroid.so no longer bind to imagefs libraries
with the same name. Also carries the gamescope A43 build from 20261023.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d9be78ad-4be1-459d-8c64-48602f59c8e2
📥 Commits

Reviewing files that changed from the base of the PR and between 56e8981 and 73deca4.

📒 Files selected for processing: 1
  • app/src/main/java/app/gamenative/display/GamescopePayload.kt

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

GamescopePayload.VERSION changes from 20261022.13 to 20261023.1. The archive name and readiness check continue to derive from this version.

Changes: Gamescope payload

Layer / File(s) Summary
Update payload version
app/src/main/java/app/gamenative/display/GamescopePayload.kt
GamescopePayload.VERSION changes to 20261023.1. The archive name and readiness check continue to derive from this constant.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: joshuatam

Merge Risk: ⚪ Minimal · up to 73dec

No actionable merge-blocking risk is established by the reviewed change.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: stopping gamescope from loading libandroid.so by updating the payload.
Description check Passed The description explains the cause, payload changes, affected devices, validation status, and checklist items. The recording is not attached, but the description explicitly states that device testing …
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the cause, payload changes, affected devices, validation status, and checklist items. The recording is not attached, but the description explicitly states that device testing is pending, so the description is mostly complete.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Turn on auto-fix | Re-trigger cubic

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant