A completely open-source solution, partly stimulated by TeamViewer's aggressive approach to classify personal users as commercial users. Btw, Chrome Remote Desktop is recommended for desktop remote control.
Optional for audio:
C:\repo\scrcpy-win64-v1.17\adb.exe disconnect C:\repo\scrcpy-win64-v1.17\adb.exe connect 10.0.0.6:5555 start C:\repo\scrcpy-win64-v1.17\scrcpy.exe --turn-screen-off --stay-awake cd C:\repo\sndcpy-with-adb-windows-v1.0\ start sndcpy
or hide the consoles with
Set objShell = CreateObject ("Wscript.Shell") objShell.Run "cmd /c C:\repo\scrcpy-win64-v1.17\adb.exe connect 10.0.0.6:5555", 0, false objShell.Run "cmd /c C:\repo\scrcpy-win64-v1.17\scrcpy.exe --turn-screen-off --stay-awake", 0, false Set objShell2 = CreateObject ("Wscript.Shell") objShell2.CurrentDirectory = "C:\repo\sndcpy-with-adb-windows-v1.0\" objShell2.Run "cmd /c sndcpy", 0, false
Note the directory is specified for sndcpy due to its implementation requirements.
VLC is required to play the sound on client. To suppress the 'Enter' input requirement, comment out the following line in
sndcpy.bat if you are using Windows
sndcpy if you are using Linux or alike.
Optional: Android adb tcp server auto start on boot
I use Magisk so to simply things I just put the following
.sh script to
/data/adb/service.d. Any equivalence will do.
setprop service.adb.tcp.port 5555 stop adbd start adbd
The port can be customized, but would result some apps to function abnormally, such as Brevent.