adb push returned with value 1
scrcpy 1.25 https://github.com/Genymobile/scrcpy adb: error: 42214-byte write failed: Invalid argument ERROR: "adb push" returned with value 1 ERROR: Server connection failed
That's an error from adb, not scrcpy.
What if you execute manually adb push scrcpy-server /data/local/tmp/scrcpy-server.jar? (on Windows, double-click open_a_terminal_here.bat and execute this command).
$ scrcpy
scrcpy 3.2 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO: --> (tcpip) 127.0.0.1:4444 device Generic_Android_x86_64
adb: error: connect failed: closed
ERROR: "adb push" returned with value 1
ERROR: Server connection failed
$ adb push ./scrcpy-server /data/local/tmp/scrcpy-server.jar
./scrcpy-server: 1 file pushed, 0 skipped. 76.2 MB/s (90888 bytes in 0.001s)
$ scrcpy
scrcpy 3.2 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO: --> (tcpip) 127.0.0.1:4444 device Generic_Android_x86_64
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 25.5 MB/s (90888 bytes in 0.003s)
[server] INFO: Device: [unknown] QEMU Generic Android-x86_64 (Android 13)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 25.0.3-arch1.1
INFO: Trilinear filtering enabled
INFO: Texture: 1032x1912
thank you for the suggestion, it works! somehow package scrcpy on arch linux doesn't have scrcpy-server (or maybe get deleted, I don't know it previously worked just fine), I tried manually download pre-built version of the server in the releases page and tested it.
eh, actually it have:
$ pacman -Ql scrcpy (1 results) [0/0]
scrcpy /usr/
scrcpy /usr/bin/
scrcpy /usr/bin/scrcpy
scrcpy /usr/share/
scrcpy /usr/share/applications/
scrcpy /usr/share/applications/scrcpy-console.desktop
scrcpy /usr/share/applications/scrcpy.desktop
scrcpy /usr/share/bash-completion/
scrcpy /usr/share/bash-completion/completions/
scrcpy /usr/share/bash-completion/completions/scrcpy
scrcpy /usr/share/icons/
scrcpy /usr/share/icons/hicolor/
scrcpy /usr/share/icons/hicolor/256x256/
scrcpy /usr/share/icons/hicolor/256x256/apps/
scrcpy /usr/share/icons/hicolor/256x256/apps/scrcpy.png
scrcpy /usr/share/licenses/
scrcpy /usr/share/licenses/scrcpy/
scrcpy /usr/share/licenses/scrcpy/LICENSE
scrcpy /usr/share/man/
scrcpy /usr/share/man/man1/
scrcpy /usr/share/man/man1/scrcpy.1.gz
scrcpy /usr/share/scrcpy/
scrcpy /usr/share/scrcpy/scrcpy-server
scrcpy /usr/share/zsh/
scrcpy /usr/share/zsh/site-functions/
scrcpy /usr/share/zsh/site-functions/_scrcpy
something goes wrong, but I'm not sure