The goal of the Firefox Reality project is to create a full-featured browser exclusively for standalone AR and VR headsets.
Firefox Reality supports Chinese (China), Chinese (Taiwan), English, French, German, Italian, Japanese, Russian, and Spanish for user interface, voice search, and text entry. Localization is provided by Mozilla's amazing community of volunteer localizers.
For more info on localization, how it works in the Firefox Reality project, and how to correctly edit localizable text in the application, please see the localization wiki page.
git clone [email protected]:MozillaReality/FirefoxReality.git cd FirefoxReality
Clone the third-party repo.
If you're developing for the Oculus, Snapdragon VR, or VIVE, you need to clone the repo with third-party SDK files.
git clone [email protected]:MozillaReality/FirefoxReality-android-third-party.git third_party
This repo is only available to Mozilla employees. If you have access to the relevant SDK but not this repo, you can manually place them here:
third_party/ovr_mobile/for Oculus (should contain a
third_party/wavesdk/for Vive (should contain a
buildfolder, among other things)
The repo in
third_party can be updated like so:
pushd third_party && git fetch && git checkout master && git rebase origin/master && popd
Fetch Git submodules.
You may need to set up two-factor authentication for the command line.
git submodule update --init --recursive
You can build for different devices:
oculusvr: Samsung Gear VR & Oculus Go
wavevr: VIVE Focus
For testing on a non-VR device:
noapi: Runs on standard Android phones without a headset
Building for Oculus Mobile, and WaveVR requires access to their respective SDKs which are not included in this repo.
The command line version of
gradlew requires JDK 8 from Oracle. If you see an error that Gradle doesn't understand your Java version, check which version of you're using by running
java -showversion or
java -version. You're probably using JDK 9 or 10, which won't work.
Open the project with Android Studio then build and run it. Depending on what you already have installed in Android Studio, the build may fail and then may prompt you to install dependencies. Just keep doing as it suggests. To select the device to build for, go to
Tool Windows > Build Variants and select a build variant corresponding to your device.
If you want to build FirefoxReality for WaveVR SDK:
mkdir -p third_party/wavesdk cp /path/to/the/sdk/2.0.32/SDK/libs/wvr_client.aar third_party/wavesdk cp ./extra/wavesdk/build.gradle ./third_party/wavesdk
Make certain to set the build flavor to
wavevrDebug in Android Studio before building the project.
You might be interested in building this project against local versions of some of the dependencies. This could be done either by using a local maven repository (quite cumbersome), or via Gradle's dependency substitutions (not at all cumbersome!).
Currently, the substitution flow is streamlined for some of the core dependencies via configuration flags in
local.properties. You can build against a local checkout of the following dependencies by specifying their local paths:
dependencySubstitutions.geckoviewTopobjdir=/path/to/topobjdir). See Bug 1533465.
Do not forget to run a Gradle sync in Android Studio after changing
local.properties. If you specified any substitutions, they will be reflected in the modules list, and you'll be able to modify them from a single Android Studio window.
You can enable a dev applicationID sufix to install both dev and production builds simultaneously. You just need to add this property to your
Local release builds can be useful to measure performance or debug issues only happening in release builds. Insead of dealing with release keys you can make the testing easier just adding this property to your
Note: the release APKs generated with a debug keystore can't be used for production.
ETC2 compression is used to improve performance and memory usage. Raw assets are placed in the
uncompressed_assets folder. You can generate the compressed textures using the compressor utility in
tools/compressor. You need to set up etc2comp and make it available on your PATH before running the script. Run this command to generate the compressed assets:
cd tools/compressor npm install npm run compress
You can enable OpenXR API for Oculus by adding this property to your
Device supports , but APK only supports armeabi-v7a[...]
Enable USB Remote Debugging on the device.
Firefox > Web Developer > WebIDE > Performancegets stuck with greyed out "stop and show profile"
Restart FxR and close and re-open the WebIDE page.
Tool Windows > Build Variantslist is empty
Android Studio > Check for Updates….
File > Sync Project with Gradle Files.
pro hand -p true -s false SIGILL
adb shell am start -a android.intent.action.VIEW -d "https://aframe.io" org.mozilla.vrbrowser/org.mozilla.vrbrowser.VRBrowserActivityto load a URL from the command line
adb shell am start -a android.intent.action.VIEW -n org.mozilla.vrbrowser/org.mozilla.vrbrowser.VRBrowserActivity -e homepage "https://example.com"to override the homepage
adb shell setprop debug.oculus.enableVideoCapture 1to record a video on the Oculus Go. Remember to run
adb shell setprop debug.oculus.enableVideoCapture 0to stop recording the video.
Sharing > Record Video
disableCrashRestart=truein the gradle
user.propertiesto disable app relaunch on crash.
To compile with Servo support, create a file called
user.properties in the top-level project directory and add
enableServo=1. Then to enable Servo in Firefox Reality, go the Developer Options panel in the Settings, and toggle the Servo option. Then a new button will be added to the navigation bar. Clicking that button will reload the current page with Servo.