I cannot use adb connect
to connect via wifi to my device (nexus 5, android 6), but since i\'m developping a cordova plugin using usb OTG, I really need to connect
I ran into this same issue on not being able to connect via Wi-Fi but was using the snap version of scrcpy
. I kept seeing messages like adb server version (40) doesn't match this client (39); killing...
when I would run adb
or scrcpy
commands but it still worked, until I tried to connect over Wi-Fi.
$ scrcpy
INFO: scrcpy 1.16
adb server version (40) doesn't match this client (39); killing...
* daemon started successfully
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1
I believe this means it was unable to push the server app to the device.
Running the commands to setup Wi-Fi using the adb built into the snap, scrpy.adb solved this for me.
$ scrcpy.adb tcpip 5555
$ scrcpy.adb connect 192.168.1.25:5555
connected to 192.168.1.25:5555
$ scrcpy
INFO: scrcpy 1.16
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 0.6 MB/s (33622 bytes in 0.051s)
[server] INFO: Device: XXXXX XXXXXXX (Android 9)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6.0 NVIDIA 390.25
INFO: Trilinear filtering enabled
INFO: Initial texture: 1440x2560