alvr-org / ALVR

Stream VR games from your PC to your headset via Wi-Fi
MIT License
5.3k stars 475 forks source link

Integrate ADB script for initiating a USB connection #567

Open zarik5 opened 3 years ago

jacklul commented 3 years ago

I'm posting a script I've been using to simplify launching: ALVR USB Connection.bat (I might update it, so check from time to time)

Alternatively this: https://github.com/jacklul/ALVR-USB (based on AtlasTheProto/ADBForwarder from the wiki)

It waits for specific ADB device (in this case - headset) to become connected, runs the adb forward tcp:port commands and then launches ALVR. In case for some reason the ADB connection is lost it will wait for device to be connected again - this process kills ADB server and restarts the script while keeping ALVR (and any running game) open, when device gets plugged back in it should reconnect automatically on the headset.

Requirements:

Note: adbpath.txt and adbdevice.txt must be placed where ALVR USB Connection.bat/ALVR Launcher.exe is!

Hopefully something similar could be implemented into the dashboard directly.

ckiee commented 3 years ago

I think we could use the mozdevice crate.

mittorn commented 3 years ago

Maybe use udev rule for this? It also may enable adb tcp which useful for sidequest

Meister1593 commented 7 months ago

i may work on this soon after https://github.com/alvr-org/ALVR/pull/1973