Documentation
¶
Overview ¶
Command xrusb answers ONE question: will Android let an ordinary application submit an isochronous USB transfer?
Why everything depends on it ¶
A head is followed from the headset's camera — the VITURE Beast publishes no orientation, and go-xrkit/xrkit/headflow recovers the yaw from its pictures. cmd/xrcam established that on this phone both of Android's own routes to that camera are shut: camera2 enumerates no external device, and every UVC streaming endpoint is isochronous, which UsbDeviceConnection cannot submit at all.
usbfs is what is left — the kernel's own interface, reached by ioctl on the descriptor UsbDeviceConnection hands out. It is plain syscalls, so a CGO-free Go process can do it on paper. Whether SELinux permits it is undocumented.
⛔ AND A UVC IMPLEMENTATION IS WORTHLESS IF THE ANSWER IS NO. Descriptor parsing, probe/commit negotiation, frame assembly, MJPEG decoding — days of it, all resting on one ioctl nobody has tried. So this tries the ioctl, in four steps, and says which one the kernel stopped at.
APP=./cmd/xrusb host/build.sh && adb install -r host/out/xrhost.apk
adb shell am start -n org.goxrkit.androidhost/org.goxrkit.android.XrDemoActivity \
--ez capture false --es args '-wait 5m'
adb shell run-as org.goxrkit.androidhost cat files/usb.txt
⚠ IT PUTS A DIALOG IN FRONT OF SOMEBODY. Opening a USB device asks the user, naming the device and this application. The transcript says so, and a refusal is reported as a decision rather than as a failure.