sigmaxipi / chromium-for-stadia

Quick hack to get Google Stadia running on unsupported Android devices
155 stars 19 forks source link

chromium-for-stadia

This is a quick hack to get Google Stadia running on unsupported AOSP devices like the Oculus Quest.

The ChromiumForStadia.apk was created using the following steps:

  1. A stock version of Chromium for Android was built using the official guide @ 3333b9d62d44b68615a6f40c429d7f93cbc71781 from 4/13/2020.
  2. The changes in chromiumForStadia.diff were made to the stock source. The core changes are:
    • Modifying chrome/android/java/AndroidManifest.xml. This allows the app to show up on Android TV devices.
    • Modifying FullscreenHtmlApiHandler.applyEnterFullscreenUIFlags. This fakes {navigationUI: "hide"} and avoids https://bugs.chromium.org/p/chromium/issues/detail?id=933436#c7.
    • Modifying device/gamepad/gamepad_platform_data_fetcher_android.c to mark any controller's mapping as standard. Without this, Stadia doesn't detect the controller.
    • Modifying third_party/blink/renderer/core/dom/document_or_shadow_root.h to perform the equivalent of document.pointerLockElement = document.fullscreenElement. This hack gets around the fact that the Pointer Lock API doesn't work as Stadia expects on mobile devices.

With these changes, going to stadia.google.com in this app and enabling Desktop Mode will allow you to stream Stadia to the browser on Android devices. You can also use unsupported USB & Bluetooth controllers with the browser. You can test your gamepad at html5gamepad.com/.

This app was tested on a Pixel 4 & Oculus Quest using an ASUS Bluetooth Gamepad, PS4 Dualshock, X-Box One controller, and the official Stadia controller via USB C.

Note that this app is not officially supported by Google nor Oculus and may unexpectedly break at any point. This reddit post has some more notes on how to get Stadia working in the browser without using a custom app. The app was just meant to streamline those instructions.

Release notes