Setting up developer tools for Quest 2

  1. Jump through the Facebook hoops outlined here.
  2. Enable developer mode on the Quest2 via the Phone App.
    In case you have forgotten about the Phone App, it’s called Oculus, needs you to log into your FB account and to pair with the Quest 2 it needs to be on the same WiFi network and have location information enabled. And FB wonders why people don’t trust it.
  3. Follow the rest of the basic environment and project setup instructions
  4. Connect the Quest 2 to your Mac with a USB-C cable.
    Some USB-C cables can be finicky. If the connection doesn’t work, changing the cable and/or the USB-C port on your mac may fix things.
  5. In the Quest2: You should get a dialog box asking “Allow USB debugging?”
  6. In the Quest2: You should also get a dialog box asking if you want to let the host access files on this device

After stage 2 you should have the android debugger (adb) available on your mac and after stage 5 you should be able to do from a Mac terminal:

adb devices

And you should see your Quest 2’s serial number as a device. If you see “unauthorized” next to it, make sure you check “Always allow” in the Quest 2’s “Allow USB debugging?” dialog. You should now get just “device” next to the Quest 2’s serial number when you list devices.

You can now start talking to your Quest 2 as an Android device. For example:

adb shell getprop

Should get the android version, which is 10 in my case.

On your Android Studio, the Quest 2 should show up as a device.

Hurray! The Quest 2 shows up as a physical device in Android Studio.
adb kill-server

is a useful command if adb’s connection to the Quest 2 “goes bad”

A note on JDK on macOS

From a note here we learn that the project JDK and the JDK that the IDE uses, on macOS will often be different. I had to make sure JDK11 was available on my machine and JAVA_HOME was set

One thought on “Setting up developer tools for Quest 2

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.