question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why is setprop `debug.xr.graphicsPlugin` required on Android?

See original GitHub issue

For running the hello_xr sample code, various docs (e.g. here and here) require this manual config step:

Before running hello_xr, make sure to specify the graphic plugin to use with one of the following adb commands:

adb shell setprop debug.xr.graphicsPlugin OpenGLES
adb shell setprop debug.xr.graphicsPlugin Vulkan

To make it simpler to run the sample app, could we set a fallback default in main.cpp to avoid needing to run the adb shell setprop step? We can output a log to let the developer know that a fallback was chosen for them.

If a different graphics plugin is required for different device models (e.g. Oculus Quest 2 vs Hololens), then we could check the ro.product.name or ro.product.name system property and choose a fallback value based on the device?

I could probably create a pull request if I am given some guidance on what you would like implemented here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rpavlikcommented, Dec 15, 2021

So the Gradle builds that are in this tree actually do have a fallback, and a configuration for each graphics plugin: ./gradlew buildVulkanDebug for example will build an APK that defaults to Vulkan if you don’t setprop. There’s even binaries for it in the latest release: https://github.com/KhronosGroup/OpenXR-SDK-Source/releases/tag/release-1.0.20 - see the two APK files. Does that meet your needs?

I don’t have control over either of the docs you linked, unfortunately. Pico has not yet submitted their runtime’s conformance tests, so their system is not officially OpenXR conformant. I’d like to get in touch with them and work with them to help fix that and their instructions but do not have a current contact. They have re-joined the working group, however, so I’m hopeful this will be cleared up soon.

The blog post is (as far as I know) still relatively accurate for Oculus, as I don’t think they are yet using the unified cross-vendor loader for Android, but hopefully soon there will be no need for separate Oculus instructions.

0reactions
dajcommented, Jun 26, 2022

Nice, thanks for all the detailed answers! Feel free to close this issue (I left it open in case you want to use it for any of your own tracking).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oculus VR Hello World for Android Developers | by Dan Jarvis
Once you enable Developer Mode, all the usual Android development tools seem to be ... adb shell setprop debug.xr. ... graphicsPlugin` required on...
Read more >
4 Pico OpenXR Development — OpenXR Mobile SDK 0.1 ...
The loader library can be found in /OpenXR/Libs/Android/ in this SDK package. On Android, the loader ... graphicsPlugin OpenGLES adb shell setprop debug.xr....
Read more >
How to run hello_xr on Oculus Quest | Gayan Ediriweera
This post describes how to get the OpenXR native sample application known as hello_xr running on Oculus Quest and Quest 2 hardware.
Read more >
Optimize, Develop, and Debug with Vulkan Developer Tools
Our guides show you how to build the validation layers for use with the Android NDK, giving you the tools necessary to build...
Read more >
KhronosGroup OpenXR-SDK-Source Statistics & Issues - Codesti
Why is setprop `debug.xr.graphicsPlugin` required on Android? closed, 5, 2021-11-23, 2022-09-21, 2022-06-26. `android-jni-wrappers` error "use of undeclared ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found