Skip to content

Steam android client#1298

Closed
utkarshdalal wants to merge 5 commits intomasterfrom
steam-android-client
Closed

Steam android client#1298
utkarshdalal wants to merge 5 commits intomasterfrom
steam-android-client

Conversation

@utkarshdalal
Copy link
Copy Markdown
Owner

@utkarshdalal utkarshdalal commented Apr 26, 2026

Description

Fixed padding on devices with notch/camera cutout

Recording

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

Adds “real Steam” launch on Android by bridging Proton’s lsteamclient.dll to the native libsteamclient.so via a JNI bootstrap, so games can start through the actual Steam client. Includes proper Steam IPC setup, app id propagation, and session lifecycle management.

  • New Features

    • Introduced libsteambootstrap.so and SteamBootstrap to dlopen libsteamclient.so, set IPC endpoints, and optionally log in using the stored refresh token; includes start/stop lifecycle.
    • Wired real‑Steam mode in BionicProgramLauncherComponent: sets WINESTEAMCLIENTPATH{,64}, Steam3Master, SteamClientService, SteamGameId/SteamAppId, and other required env vars, then bootstraps the native client before Wine starts.
    • Switched real‑Steam launch to run steam.exe with the game’s exe path and correct working directory (replaces -applaunch flow).
    • Copies bundled steam.exe into the Wine prefix during Steam extraction to ensure the launcher exists.
  • Bug Fixes

    • Prevented Wine subprocess hangs by always draining stderr in execShellCommand.
    • Expanded recoverable Steam login errors in SteamService (AccessDenied, Expired, Revoked).
    • Added Steam debug channels to wine_debug_channels.json for better diagnostics.

Written for commit 35a93af. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Enhanced Steam integration with improved IPC support for real-Steam launches
    • Added Steam AppId configuration for better game compatibility
  • Bug Fixes

    • Expanded login failure handling to detect additional credential issues
    • Fixed potential deadlocks in subprocess execution by parallel stderr draining
  • Documentation

    • Added third-party component notices for proprietary Steam integration libraries

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR introduces native Steam IPC bootstrapping for real Steam support via a proprietary libsteambootstrap.so JNI shim library. It refactors the game launch flow to invoke executables directly rather than through Steam's -applaunch parameter, extracts and propagates Steam AppID, and implements lifecycle management with startup and shutdown hooks integrated into the launcher.

Changes

Cohort / File(s) Summary
Steam Bootstrap Infrastructure
.gitignore, THIRD_PARTY_NOTICES, app/src/main/cpp/steambootstrap/CMakeLists.txt, app/src/main/java/app/gamenative/SteamBootstrap.kt
New JNI-based Steam IPC bootstrap component: C library build config, Kotlin singleton wrapper for native initialization/shutdown, and documentation of proprietary licensing and contractual interface surface.
Wine Configuration
app/src/main/assets/wine_debug_channels.json
Updated debug channel list to include steam and steamclient channels; removed explorerframe.
Real-Steam Launch Flow
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
Refactored game launch to resolve exe paths directly instead of using -applaunch; added AppID extraction and SteamAppId environment variable setup; integrated SteamBootstrap.stop() on shutdown; added steam.exe extraction from assets.
Launcher Component Enhancements
app/src/main/java/com/winlator/xenvironment/components/BionicProgramLauncherComponent.java
Added Steam bootstrap environment variable setup for real-Steam mode; hardened execShellCommand with parallel stderr draining; introduced configurable steamAppId field.
Steam Service Updates
app/src/main/java/app/gamenative/service/SteamService.kt
Expanded login failure classification to trigger user data clearing for additional EResult cases: AccessDenied, Expired, and Revoked (in addition to existing CachedCredentialInvalid).

Sequence Diagram

sequenceDiagram
    participant App as GameNative App
    participant XServer as XServerScreen
    participant Launcher as BionicProgramLauncher
    participant Bootstrap as SteamBootstrap
    participant Native as libsteambootstrap.so
    participant Steam as libsteamclient.so

    App->>XServer: Launch real-Steam game
    XServer->>XServer: Extract game exe path from steamapps/common
    XServer->>XServer: Extract AppId from container
    XServer->>Launcher: Set steamAppId & environment
    Launcher->>Bootstrap: start(libsteamclient path, env, token)
    Bootstrap->>Native: Load libsteambootstrap.so
    Bootstrap->>Native: nativeInit(IPC endpoints, token, etc)
    Native->>Steam: dlopen() libsteamclient.so
    Native->>Steam: Invoke entry points with refresh token
    Native-->>Bootstrap: Return success code (0)
    Bootstrap-->>Launcher: Initialization complete
    Launcher->>Launcher: Execute game with wine/proton
    
    Note over App: Game runs with Steam access
    
    App->>XServer: Shutdown game
    XServer->>Bootstrap: stop()
    Bootstrap->>Native: nativeShutdown()
    Native->>Steam: Clean up resources
    Native-->>Bootstrap: Return
    Bootstrap-->>XServer: Shutdown complete
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • #210: Modifies XServerScreen shutdown flow and BionicProgramLauncherComponent with launcher integration changes
  • #973: Updates SteamService.kt's shouldClearUserDataForLoggedOnFailure to handle additional EResult failure cases
  • #1012: Refactors getWineStartCommand in XServerScreen.kt and impacts game launch path resolution logic

Suggested reviewers

  • phobos665

🐰 Whisker-twitching with glee,
Steam bootstraps from native code free,
No -applaunch today—
Direct exe paths now lead the way,
Gaming streams pure as can be!

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains significant misalignment between the stated title/initial description and the auto-generated summary; the description claims 'fixed padding on devices with notch' but the actual changes implement Steam Android client bootstrap integration. Update the description to accurately reflect the actual changes (Steam bootstrap, libsteambootstrap.so, real-Steam launch flow) rather than notch padding fixes, and ensure the title matches the description.
Docstring Coverage ⚠️ Warning Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Steam android client' is vague and does not clearly convey the main changes; it lacks specificity about what was added or fixed. Consider a more descriptive title such as 'Add Steam bootstrap integration for native libsteamclient support' or 'Implement real Steam launch via libsteambootstrap.so bridge'.
✅ Passed checks (2 passed)
Check name Status Explanation
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steam-android-client

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 and usage tips.

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