Oculus VR Hello World for Android Developers

$ adb shell getprop ro.build.version.release
$ adb shell getprop ro.build.version.sdk

Install and Run the Oculus hello_xr Sample App

Get your Oculus ready

  • Enable Developer Mode on your Oculus.
  • Connect your Oculus to your laptop (depending on your laptop you might need a USB 2.0 to USB C cable). Put the headset on and select “Allow” to trust the connected device.

Installing the Oculus sample app APK

  • You can download the APK I built from here and install it directly:
  • Install the APK using adb install, or SideQuest. Skip ahead below to the Run section if you don’t want to build the sample app.

Building from Android Studio

  • Clone my repo (I have applied all the manual steps that the hello_xr sample project required, so you don’t have to):
  • In Android Studio, choose File -> Open… and select the OculusHelloXR folder for the repo you just cloned.
  • Let the Gradle build finish and then click the play button to run the app.
Android Studio “Run app” option
  • You might see an “Error while Launching activity”. Don’t worry — this is benign, everything will still work! You just need to put on your headset and launch the app from the Oculus Apps menu (see next section).
Error messages when launching from Android Studio

Launching an APK from an unknown source

  • Select the “Unknown Sources” at the top right in your Apps menu, and select the “Hello XR” app to launch it.
Unknown Sources in the Oculus Apps menu
  • Now you’ll be able to look at some cubes in the sample app. Your controllers will each directly manipulate one of them. Enjoy!
Android Studio screenshot of the hello_xr sample app


Error while Launching activity

Error messages when launching from Android Studio
$ adb install -r -t app/build/outputs/apk/debug/app-debug.apk
Performing Streamed Install

App shows loading dots forever

adb shell setprop debug.xr.graphicsPlugin OpenGLES

Behind The Scenes


Random Fact

$ adb shell getprop

[ro.product.manufacturer]: [Oculus]
[ro.product.model]: [Quest 2]
[ro.product.name]: [hollywood]

[ro.build.branch]: [releases-oculus-10.0-v34]
[ro.build.characteristics]: [nosdcard]
[ro.build.date]: [Fri Oct 29 17:01:08 PDT 2021]

[ro.build.fingerprint]: [oculus/hollywood/hollywood:10/QQ3A.200805.001/20169900217500000:user/release-keys]
[ro.build.flavor]: [hollywood-user]
[ro.build.host]: [sandcastle180.ftw5.facebook.com]
[ro.build.id]: [QQ3A.200805.001]
[ro.build.product]: [hollywood]
$ adb shell
hollywood:/ $




Machine Learning & Android — https://stackoverflow.com/cv/dj

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

I failed in Many Interviews, But found nice Android Interview Questions

Build Dlib C++ for Android

Difference between HashMap and HashSet in Java

hashmap vs hashset java

Intents in Android

Simplify Android Viewmodels by using these kotlin extenstions

Shared SearchView with TabsLaout and Collapsing Toolbar in Android

Learning Flutter by Building a Discord Client

Setup Map on an Android Application in smart way

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dan Jarvis

Dan Jarvis

Machine Learning & Android — https://stackoverflow.com/cv/dj

More from Medium

How to fix the black screen issue on Android when using Vuforia Engine in Unity

How I made an App that Translates Cat Sounds to Human Language

Android 12 & Material You

Journal of an Independent Mobile App Developer: Part 1