Oculus Quest development on Chrome OS

in #oculus4 years ago (edited)

I have an Oculus Quest 2 device, Google Pixelbook (i5) and XiaoMi Mi A2 phone.
I have compiled example apps (provided by Oculus)[https://developer.oculus.com/downloads/package/oculus-mobile-sdk/] (1.40.0) in Android Studio, uploaded them via phone to the headset and run there.
I have encountered and circumvented some roadblocks along the way.

I have mostly followed the guide -
https://developer.oculus.com/documentation/native/android/

Here are my comments.

In the “System and Hardware Requirements” section:

Screenshot 2021-02-18 at 20.00.49.png

I have compiled it in “Linux(Beta)” of the Chrome OS.

In “Device Setup”:

Screenshot 2021-02-18 at 20.04.24.png

I use Bugjaeger app on my phone, its ADB works over Wi-Fi after initial handshake over the cable that came with the Quest, I had to set USB to be controlled by the connected device in the phone settings.

https://play.google.com/store/apps/details?id=eu.sisik.hackendebug&hl=en&gl=US

“Android Development Software Setup”

Screenshot 2021-02-18 at 20.20.22.png

I installed version 4.1.2 of the Android Studio built for Chrome OS, API for the Android 8.0 Oreo SDK Build Tools and NDK (Side by side) 17.2.4988734, no LLDB.


I have put these lines in the hidden .profile file in the home directory of the “Linux(Beta)”:

export JAVA_HOME="/opt/android-studio/jre"
export ANDROID_HOME="/home/teteabcmail/Android/Sdk"
export ANDROID_NDK_HOME="/home/teteabcmail/Android/Sdk/ndk/17.2.4988734"

export PATH=$PATH:/opt/android-studio/jre/bin
export PATH=$PATH:/home/teteabcmail/Android/Sdk/platform-tools
export PATH=$PATH:/home/teteabcmail/Android/Sdk/tools

and run source ~/.profile .


I have once seen this error “clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory”. Installing ncurses solved it:

sudo apt install libncurses5


After opening the example project in ~/ovr/VrSamples/VrCubeWorld_Framework/Projects/Android/
I was greeted with
“Task 'wrapper' not found in project ‘:VrSamples:VrCubeWorld_Framework:Projects:Android’

Solution has been found here - https://forums.oculusvr.com/developer/discussion/93964/android-studio-4-1-compatibility
I went to File -> Settings -> Build, Execution, Deployment -> Gradle selected "Specified location" for "Use Gradle from:" chose the project folder, pressed OK, then File -> Sync Project with Gradle files .


Then I’d get
“NDK not configured. Download it with SDK manager.” error. I copied
~/ovr/VrSamples/VrCubeWorld_Framework/Projects/Android/local.properties
to ~/ovr/local.properties , added this line:
ndk.dir=/home/teteabcmail/Android/Sdk/ndk/17.2.4988734
and resynced the project with gradle.


I had to create a new project for the Studio to generate a ~/.android/debug.keystore file then copy that file with another name into
~/ovr/VrSamples/VrCubeWorld_Framework/Projects/Android/android.debug.keystore
to get rid of the “Cause: error=2, No such file or directory” when building a debug version APK by pressing Build -> Build Bundle(s) / APK(s) -> Build APK(s).


Then I uploaded the file ~/ovr/VrSamples/VrCubeWorld_Framework/Projects/Android/build/outputs/apk/debug/vrcubeworldfw-debug.apk
to Google Drive and pushed it via Bugjaeger app to the Quest.

Screenshot_20210219-210151_2.jpg

Then I selected “Unknown sources” in the apps tab.

152030847_895561321287580_468405549033099022_o (1).jpg

Et regarde par ici!

151823351_895560064621039_2617792072474102148_o.jpg