How to use the QR code reader package on Quest 3?

Hi there. I am trying to launch and use the com.oculus.os.qrcodereader package, which I assume is the one being used during the initial setup for WiFi setup on Quest 3. It listens to the android.intent.action.GET_BARCODE intent, but it crashes immediately from inside some native code in libqrcodereader_jni.so.

I am a Unity developer and do not have a lot of experience with native Android applications, so I’m struggling to figure out how to approach this. Has anyone had success with launching this activity and reading a QR code?

Here’s some more context from logcat:

11-22 10:49:20.208  4767  4767 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-22 10:49:20.208  4767  4767 F DEBUG   : Build fingerprint: 'oculus/eureka/eureka:12/SQ3A.220605.009.A1/49743630046900510:user/release-keys'
11-22 10:49:20.208  4767  4767 F DEBUG   : Revision: '0'
11-22 10:49:20.208  4767  4767 F DEBUG   : ABI: 'arm64'
11-22 10:49:20.208  4767  4767 F DEBUG   : Timestamp: 2023-11-22 10:49:19.967584949+0100
11-22 10:49:20.208  4767  4767 F DEBUG   : Process uptime: 0s
11-22 10:49:20.208  4767  4767 F DEBUG   : Diagnostic-Collection-Type: Tombstone Proto
11-22 10:49:20.208  4767  4767 F DEBUG   : Has-Diagnostic-Summary: Yes
11-22 10:49:20.208  4767  4767 F DEBUG   : Debugging: No
11-22 10:49:20.208  4767  4767 F DEBUG   : Has-Waited-For-Debugger: No
11-22 10:49:20.208  4767  4767 F DEBUG   : Last-Activity-Time: 408951
11-22 10:49:20.208  4767  4767 F DEBUG   : Process-Runtime: 113477
11-22 10:49:20.208  4767  4767 F DEBUG   : Waiting-To-Kill: 
11-22 10:49:20.208  4767  4767 F DEBUG   : Killed-By-AM: No
11-22 10:49:20.208  4767  4767 F DEBUG   : Removed: No
11-22 10:49:20.208  4767  4767 F DEBUG   : Wanted-ANR-Ui: No
11-22 10:49:20.208  4767  4767 F DEBUG   : Killed: No
11-22 10:49:20.208  4767  4767 F DEBUG   : OOM-Score-Adj: 0
11-22 10:49:20.208  4767  4767 F DEBUG   : Wanted-Error-Ui: No
11-22 10:49:20.208  4767  4767 F DEBUG   : Kill-Time: 0
11-22 10:49:20.208  4767  4767 F DEBUG   : State: TOP 
11-22 10:49:20.208  4767  4767 F DEBUG   : Foreground: Yes
11-22 10:49:20.208  4767  4767 F DEBUG   : Cmdline: com.oculus.os.qrcodereader
11-22 10:49:20.208  4767  4767 F DEBUG   : pid: 4479, tid: 4721, name: RenderThread  >>> com.oculus.os.qrcodereader <<<
11-22 10:49:20.208  4767  4767 F DEBUG   : uid: 10033
11-22 10:49:20.208  4767  4767 F DEBUG   : tagged_addr_ctrl: 0000000000000001
11-22 10:49:20.208  4767  4767 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-22 10:49:20.208  4767  4767 F DEBUG   :     x0  0000000000000000  x1  0000000000001271  x2  0000000000000006  x3  00000076e99b22c0
11-22 10:49:20.208  4767  4767 F DEBUG   :     x4  6e68726d64737764  x5  6e68726d64737764  x6  6e68726d64737764  x7  7f7f7f7f7f7f7f7f
11-22 10:49:20.208  4767  4767 F DEBUG   :     x8  00000000000000f0  x9  000000000000117f  x10 ffffff00fffffbdf  x11 ffffff80fffffbdf
11-22 10:49:20.208  4767  4767 F DEBUG   :     x12 00000076e99b0c00  x13 0000000000000033  x14 00000076e99b1f18  x15 00000001d8155b29
11-22 10:49:20.208  4767  4767 F DEBUG   :     x16 000000779371adc0  x17 00000077936f88f0  x18 00000076e8cf4000  x19 000000000000117f
11-22 10:49:20.208  4767  4767 F DEBUG   :     x20 0000000000001271  x21 00000000ffffffff  x22 b40000768dbea0f0  x23 b40000768dbea000
11-22 10:49:20.208  4767  4767 F DEBUG   :     x24 0000000000000000  x25 00000076e99b2cc0  x26 b4000076e35de030  x27 00000077a8313cc0
11-22 10:49:20.208  4767  4767 F DEBUG   :     x28 00000076e98ba000  x29 00000076e99b2340
11-22 10:49:20.208  4767  4767 F DEBUG   :     lr  00000077936b4d70  sp  00000076e99b22a0  pc  00000077936b4da0  pst 0000000000001000
11-22 10:49:20.208  4767  4767 F DEBUG   : backtrace:
11-22 10:49:20.208  4767  4767 F DEBUG   :       #00 pc 000000000008ada0  /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) (BuildId: 8f3ced1030354b4f7518626f8f58e9ec)
11-22 10:49:20.208  4767  4767 F DEBUG   :       #01 pc 00000000000443f0  /system/lib64/libqrcodereader_jni.so (XrRenderThread::createInstance(_JavaVM*, _jobject*)+2208) (BuildId: d6cb4d2d51fd4d41ebb151057edac70c)
11-22 10:49:20.208  4767  4767 F DEBUG   :       #02 pc 0000000000043b24  /system/lib64/libqrcodereader_jni.so (XrRenderThread::initRuntime()+28) (BuildId: d6cb4d2d51fd4d41ebb151057edac70c)
11-22 10:49:20.208  4767  4767 F DEBUG   :       #03 pc 0000000000043158  /system/lib64/libqrcodereader_jni.so (RenderThread::mainLoop(AppState)+132) (BuildId: d6cb4d2d51fd4d41ebb151057edac70c)
11-22 10:49:20.208  4767  4767 F DEBUG   :       #04 pc 0000000000043600  /system/lib64/libqrcodereader_jni.so (void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (RenderThread::*)(AppState), RenderThread*, AppState> >(void*)+112) (BuildId: d6cb4d2d51fd4d41ebb151057edac70c)
11-22 10:49:20.208  4767  4767 F DEBUG   :       #05 pc 00000000000dfdb0  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: 8f3ced1030354b4f7518626f8f58e9ec)
11-22 10:49:20.208  4767  4767 F DEBUG   :       #06 pc 000000000008c3dc  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8f3ced1030354b4f7518626f8f58e9ec)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: failed to open /data/tombstones/tombstone_12.pb
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: java.io.FileNotFoundException: open failed: ENOENT (No such file or directory)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:342)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:229)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at com.android.server.os.NativeTombstoneManager.handleProtoTombstone(NativeTombstoneManager.java:151)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at com.android.server.os.NativeTombstoneManager.handleTombstone(NativeTombstoneManager.java:120)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at com.android.server.os.NativeTombstoneManager.access$500(NativeTombstoneManager.java:68)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at com.android.server.os.NativeTombstoneManager$TombstoneWatcher.lambda$onEvent$0$NativeTombstoneManager$TombstoneWatcher(NativeTombstoneManager.java:564)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at com.android.server.os.NativeTombstoneManager$TombstoneWatcher$ExternalSyntheticLambda0.run(Unknown Source:4)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at android.os.Handler.handleCallback(Handler.java:938)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at android.os.Looper.loopOnce(Looper.java:214)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at android.os.Looper.loop(Looper.java:304)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
11-22 10:49:20.224  1070  1253 W NativeTombstoneManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)
11-22 10:49:20.225  1070  4800 W ActivityTaskManager:   Force finishing activity com.oculus.os.qrcodereader/.ScannerActivity