Connect your device through usb and enable adb over TCP/IP:
adb tcpip 5555
- Connect the device to the same Wi-Fi as your computer
- Get your device IP address (in Settings → About phone → Status)
- Connect to your device:
adb connect DEVICE_IP:5555
- Run
scrcpy
To switch back to USB mode: adb usb
.
Performance is not the same as over USB.
Default bit-rate is 8Mbps. To change it:
scrcpy --bit-rate 2M --max-size 800