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:
Followed instructions in PC part of this guide, and verified that it all works.
The script has to be placed in the same directory where ALVR Launcher.exe is.
ADB executable has to be globally available, if it's not put a path to it into adbpath.txt, e.g.: C:\ADB.
You have to run adb devices from the command prompt to obtain your device id and then create a file called adbdevice.txt and put the id string inside - use notepad, no extra spaces, no extra lines.
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.
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:
ALVR Launcher.exe
is.adbpath.txt
, e.g.:C:\ADB
.adb devices
from the command prompt to obtain your device id and then create a file calledadbdevice.txt
and put the id string inside - use notepad, no extra spaces, no extra lines.Note:
adbpath.txt
andadbdevice.txt
must be placed whereALVR USB Connection.bat
/ALVR Launcher.exe
is!Hopefully something similar could be implemented into the dashboard directly.