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:
- A stock version of Chromium for Android was built using the official guide @ 3333b9d62d44b68615a6f40c429d7f93cbc71781 from 4/13/2020.
- 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'smapping
asstandard
. Without this, Stadia doesn't detect the controller. - Modifying
third_party/blink/renderer/core/dom/document_or_shadow_root.h
to perform the equivalent ofdocument.pointerLockElement = document.fullscreenElement
. This hack gets around the fact that the Pointer Lock API doesn't work as Stadia expects on mobile devices.
- Modifying
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.
- 4/19/2020 - Pull in upstream changes. Fixes XBox controller support and improves fullscreen UI.
- 1/ 4/2020 - Pull in upstream changes. Remove localstorage hack. Remove controller mapping hack since the changes were merged upstream.
- 12/ 9/2019 - Improve support for PS4 controllers on older OSes.
- 12/ 4/2019 - Remove user-agent spoofing since this was causing a login issue for some people: #4
- 12/ 3/2019 - Added support for PS4 Dualshock controllers by updating the mapping to work around #5
- 12/ 2/2019 - Delete standalone 32-bit apk and make the main apk 32-bit. Workaround infinite loading issue by spoofing localStorage write.
- 12/ 1/2019 - Fixed an issue where holding the trigger buttons on the Stadia controller causes a pop up due to loss of pointerlock.