Android application for streaming Microsoft Kinect v1 data on USB host capable phones (no root required), using libusb and libfreenect through JNI.
- Real-time
RGB + depthorIR + depthpreview - Depth and IR tuning controls (range, color style, inversion, contrast/brightness)
- Output overlay composition
- VR preview mode (fullscreen landscape, stereoscopic side-by-side)
- Ultralytics YOLO object detection on output preview (normal and VR)
- Snapshot capture to gallery
- USB auto-reconnect flow for mobile use
- Microsoft Kinect v1 with original external power supply
- Powered USB hub (recommended for stable current delivery)
- USB-C OTG adapter
- Android device with USB host support
Kinect must be externally powered. Do not power it from the phone.
- Android Studio / Android SDK
- JDK 17
- SDK Platform 35
- Android NDK (for native build)
- Windows PowerShell (for helper scripts in
scripts/)
app/src/main/java/com/codex/kinectotg/MainActivity.kt: app UI, USB lifecycle, preview pipelineapp/src/main/java/com/codex/kinectotg/UltralyticsYoloDetector.kt: ONNX Runtime YOLO inferenceapp/src/main/cpp/kinect_jni.cpp: native bridge and frame conversionthird_party/libusb,third_party/libfreenect: native USB and Kinect stack
- Set Android SDK path:
$env:ANDROID_HOME="C:\Users\<you>\AppData\Local\Android\Sdk"
$env:ANDROID_SDK_ROOT=$env:ANDROID_HOME- Verify device visibility:
.\scripts\check-phone.ps1- Build and install debug APK:
.\scripts\build-and-install.ps1- Connect Kinect to powered hub.
- Power on hub.
- Connect hub to phone via OTG.
- Open
Kinect OTGand pressConnect. - Accept USB permission prompts.
- Target ABI is
arm64-v8a. - Target profile validated on Redmi Note 13 Pro 5G / Android 15.
- Device kernels that restrict required USB transfer behavior may block direct Kinect streaming even with granted permissions.
- Reconnect OTG adapter and USB hub
- Verify Kinect power supply and LEDs
- Check
adb devicesoutput
Run:
.\scripts\run-logcat.ps1Inspect runtime logs for USB transfer and native initialization errors.
- Use a different OTG adapter/cable
- Keep Kinect as the only device on the hub
- Ensure hub PSU is adequate and stable under load
This repository vendors upstream third-party code under third_party/. Licenses for those components remain with their respective projects.