Description
Hi, I’m running into a limitation when trying to run a control-only instance of scrcpy-server. Here’s what I’m doing:
- I push scrcpy-server.jar version 3.2 to /data/local/tmp/
- I launch two separate processes:
1. Video streaming (scid=0):
adb shell CLASSPATH=/data/local/tmp/scrcpy-server.jar \
app_process / com.genymobile.scrcpy.Server 3.2 \
video=true audio=false control=false cleanup=false tunnel_forward=true
2. Control-only process (scid=1):
adb shell CLASSPATH=/data/local/tmp/scrcpy-server.jar \
app_process / com.genymobile.scrcpy.Server 3.2 \
video=false audio=false control=true cleanup=false tunnel_forward=true scid=1
Then I forward the control socket:
adb forward tcp:27180 localabstract:scrcpy_00000001
I connect via TCP using a Node.js script, sending a properly formed 10-byte buffer for INJECT_KEYCODE (e.g., keycode 66 for ENTER).
The connection succeeds, the socket exists in /proc/net/unix, but the device never reacts to any input, and there is no logcat output indicating the control message is being handled.
Observations:
- The same control payload works fine when sent to the main scrcpy socket (@scrcpy) in a standard single-process setup
- In the control-only process (video=false), the socket is created (@scrcpy_00000001), but control events are silently ignored
- It seems that without video=true, the Device and Controller classes do not fully initialize or call reader.start() to handle messages
Question:
Is it possible to run scrcpy-server in a control-only mode with video=false, and still have control commands handled via a separate scid socket?
If not, is this a design limitation, or could it be supported in future versions?
Would setting video=true but using minimal settings (e.g., max_size=1, bit_rate=1M) be a valid workaround?
Thanks in advance for clarifying this behavior. 🙏