text
stringlengths
0
1.11k
Testing your app on a real headset prior to releasing it to users is an imperative step in the software development lifecycle. This section describes how to set up the Meta Quest headset for testing and debugging the app on a real headset.
In general, connecting the headset through a USB cable is the basic way to test the app on the real headset. In addition, you can use Android Debug Bridge (ADB) to perform advanced-level testing and debugging activities for Android apps or connect the headset via Meta Quest Developer Hub.
Test Connection through USB
You must set the headset into developer mode and connect it to the computer with a USB cable.
Put on the Meta Quest headset and sign into the developer account you want to use for development.
On the headset, go to Settings > System > Developer, and then turn on the USB Connection Dialog option. (Alternatively, you can open the Meta Quest Mobile App, select the headset from the list, and then turn on the Developer Mode option
Connect the headset to the computer using a USB-C cable and put on the headset again.
Click Allow when prompted to allow access to data.
To verify the connection, open the Unity project, and then on the menu, go to File > Build Settings.
In the Platform list, select Android, and then click Switch Platform. If the target platform is already set to Android, skip to the next step.
In the Run Device list, select the Meta headset. If you don’t see the Meta headset in the list, click Refresh.
Connect Headset From Build Settings
Click Build And Run to run the app on the Meta headset.
Connect Headset via Meta Quest Developer Hub
Meta Quest Developer Hub is a standalone companion development tool that positions the headset in the development workflow. For more information, see the Set Up section.
Enable Android Debug Bridge Debugging
Android Debug Bridge (ADB) is a command-line utility that lets you perform a variety of actions such as install and debug apps, copy files, or run several shell commands on the headset. It is included with the Android SDK tools installation and located inside the /Android/SDK/platform-tools/ folder.
Connect device with USB.
If you’re developing on Windows, download the OEM USB driver. If you’re developing on macOS, skip to step 3 as you don’t need any additional USB drivers.
a. Extract the oculus-adb-driver-2.0 zip file, go to the /oculus-go-adb-driver-2.0/usb_driver/ folder, and double-click the android_winusb.inf file.
Open Terminal on your computer and run the following command to check the connected device:
adb devices
Output:
List of devices attached
1PASH9BB939351 device
Install APK via ADB
When you build an app in Unity, it creates a .apk file, which is an Android executable file. You can install the .apk file manually on your headset for testing and debugging purposes by using ADB commands.
Open any Unity project that can build and go to File > Build Settings.
In the Platform list, select Android, and click Switch Platform. If the target platform is already set to Android, skip to the next step.
Click Build.
Open Terminal on your computer and run the following command to install the app: adb install -r <build_path>
Sample command:
adb install -r /Users/username/Unity-Sample-Projects/ballgame/playgame.apk
Output:
Performing Streamed Install
Success
Put on the headset, go to Library > Unknown Sources, and then run the app.
Additional Documentation for Using ADB
ADB is a versatile tool that lets you perform several debugging activities. There are a variety of ADB commands that you can run on your headset based on your requirement. For more information about learning ADB in detail and using its commands, go to Android Debug Bridge in the Android documentation.
ADB Troubleshooting
Computer is unable to detect the Oculus device.
There can be many reasons why your computer is unable to detect the headset. To begin with:
Ensure that you have turned on the developer mode in the Meta Quest companion app on your mobile.
Check if the issue is caused due to a faulty USB cable. Connect the device by using a secondary USB cable. If you do not have the secondary USB cable, connect any other Android device to verify if the issue is with the USB cable.
Ensure that your computer has all the necessary permissions to access your headset. Typically, when you connect your device with the computer over a USB cable, you see a prompt to permit your computer to access the device. By mistake, if you have denied permission, disconnect the USB cable, restart the device, and then connect the cable again. When prompted for permission, click Allow.
Terminal returns an error: adb command not found.
Begin by verifying whether adb is correctly installed. Go to /Android/SDK/platform-tools/ folder and check for the adb tool. If the tool is missing, download the standalone Android SDK Platform-Tools package.
Check whether you’ve set the environment variables correctly.
You can run adb from the /Android/SDK/platform-tools/ folder by prefixing ./ to the adb command. For example, instead of adb devices, use ./adb devices.
Build and Run an App
To set up, test, build a simple Unity project and run it on your headset, follow the Hello VR on Meta Quest Headset tutorial.Use Meta Quest Developer Hub and Meta Quest Link
ODH
Unity
All-In-One VR
Quest
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).
Haz clic aquí para ver la página del índice de la documentación para tu plataforma de preferencia.
Meta Quest Developer Hub (MQDH) is a development app that helps you develop apps for the Meta Quest line of headsets. With it you can:
Use either a cable or WIFI connection between your headset and the computer
Disable the proximity sensor and Boundary (Guardian) for an uninterrupted testing workflow
View the device logs to help with debugging
Capture screenshots and record videos of what you see in the headset (see Record a Video for more information.)
Deploy apps directly to your headset from your computer
Upload apps to the developer dashboard for store distribution
Share your VR experience by casting the headset display to the computer
Download the latest Meta Quest tools and SDKs you need to build apps
Meta Quest Link is a feature of Meta Quest headsets that turn them into PC VR headsets. With this feature, you can connect your development PC via to the headset via cable or airlink over WiFi. When connected, you can debug your app running on your headset from within your development environment.
Set Up
Setting up MQDH with the Meta Quest headset is quick and easy. It’s a cross-platform desktop tool, that runs on the macOS and Windows operating systems. Before you begin the setup process, get your Meta Quest headset and a USB-C cable.