-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
FirefoxReality build
These steps assume the use of Android Studio. If you don't want to install Android Studio, command line instructions are also provided.
- clone https://github.com/MozillaReality/FirefoxReality/, checkout the upstream
servo
branch - follow these steps
- modify this line to use the desired nightly version
- select your flavor (oculus or googlevr) in the "Build Variants" panel (docked at the bottom left of Android Studio)
- follow the appropriate build steps for the target platform
Follow the above steps, and add to the user.properties
file: servoViewLocal=<path/to/servo>/target/armv7-linux-androideabi/release/servoview.aar
(where <path/to/servo> is an absolute path to your servo working directory), and replace release
with debug
as appropriate
If you wish to have WebVR support, flip the dom.webvr.enabled
pref, and build servo with ./mach build --android --features googlevr
or --features oculusvr
. Once the build completes, run ./mach package --android -f googlevr
or -f oculusvr
Pressing the Android Studio "Play" button will build, install and run the apk. But if you want to open a specific URL or only use the command line, you can do (without Android Studio):
- Build and install the APK:
./gradlew --no-daemon assembleGooglevrArmDebug installGooglevrArmDebug
(changeGoogle
toOculus
andDebug
toRelease
when necessary) - run
adb shell am force-stop org.mozilla.vrbrowser && adb shell am start -a android.intent.action.VIEW -d "[URL]" org.mozilla.vrbrowser/org.mozilla.vrbrowser.VRBrowserActivity
to launch with a particular[URL]
value as the home page.
Firefox Reality will launch using the gecko backend, so be sure to switch to Servo mode in the app before testing Servo behaviour. To do so, in Firefox Reality, go the Developer Options panel in the Settings, and toggle the Servo option (it's persistent across sessions). Then a new button will be added to the navigation bar. Clicking that button will reload the current page with Servo. The Servo button will only show up for whitelisted urls. You can change the whitelist here.
- edit Servo files
- run
./mach build --android
- rebuild Firefox Reality
- reinstall Firefox Reality
- launch Firefox Reality