Scrcpy (Screen Copy) is a tool for displaying and controlling Android devices from a computer.
Benefits:
- ✅ No root required
- ✅ Low latency (35~70 ms)
- ✅ High quality (up to 1920×1080 or higher)
- ✅ Works over USB and Wi-Fi
⚠️ Main Issue: “Connection refused”
When attempting to start wireless mode directly with:
scrcpy --tcpip=192.168.x.x
The error occurs: failed to connect to '192.168.x.x:5555': Connection refused.
Reason: By default, the Android debugging daemon (adbd) listens only on the USB interface. Port 5555 is closed until the device is explicitly switched to TCP/IP mode.
🔧 3 Connection Methods (From Simple to Advanced)
Method 1: Automatic Connection
The simplest method, requiring a USB cable only for initialization.
- Connect the phone to the PC via USB.
- Ensure USB debugging is enabled (and “Allow” is tapped on the phone screen on first connection).
- Run the command without specifying an IP address:
scrcpy --tcpip - What happens: Scrcpy automatically switches the device to TCP/IP mode, detects its Wi-Fi IP address, and connects.
- Once connected, unplug the USB cable. The mirroring continues over Wi-Fi.
Method 2: Classic Manual (via ADB)
- Connect the device via USB.
- Switch
adbdto listen on the network:(Expected output:adb tcpip 5555restarting in TCP mode port: 5555) - Unplug the USB cable.
- Connect to the device using its IP address (find it in phone Wi-Fi settings or via
adb shell ip route):adb connect 192.168.x.x:5555 - Start the mirroring:
scrcpy
Method 3: Fully Wireless (Android 11+)
If no USB cable is available, but the phone and PC are on the same Wi-Fi network.
- On phone: Settings → Developer options → Wireless debugging (enable).
- Tap “Pair device with pairing code”. The screen shows an IP address, port, and a 6-digit code.
- On PC, initiate pairing (use the IP and port from step 2):
adb pair 192.168.x.x:PORT # Enter the 6-digit code from the phone screen - Go back to the “Wireless debugging” menu on the phone. It shows a different IP and port for actual connection (not for pairing).
- Connect:
adb connect 192.168.y.y:PORT - Run
scrcpy.
🚨 Typical Errors
Error 1: failed to authenticate to 192.168.x.x:5555
Symptom: The command executes, but the connection is dropped immediately.
Reason: A system prompt is waiting on the phone screen: “Allow USB debugging from this computer?” with an RSA key fingerprint. Until “Allow” is tapped (and ideally “Always allow” is checked), adbd rejects the authentication.
Solution: Unlock the phone screen and confirm the prompt.
Error 2: error: protocol fault (couldn't read status message): Success during adb pair
Symptom: Error when attempting to pair.
Reason: Mode conflict. The adb pair command works only with the “Wireless debugging” feature (Android 11+). If adb tcpip 5555 was previously run, the device is already in classic mode and does not accept the pairing protocol.
Solution: Use either Method 1/2 (classic tcpip) OR Method 3 (pair). Do not mix them.
💡 Recommendations
For maximum comfort, these flags are used when launching:
| Flag | Description | Example |
|---|---|---|
--max-size 1024 | Limits resolution (saves Wi-Fi bandwidth) | scrcpy --max-size 1024 |
--bit-rate 2M | Limits bitrate (default is 8M) | scrcpy --bit-rate 2M |
--turn-screen-off | Turns off the phone screen during mirroring (saves battery) | scrcpy --turn-screen-off |
--stay-awake | Prevents the phone from sleeping while running | scrcpy --stay-awake |
--no-audio | Disables audio forwarding (if only the screen is needed) | scrcpy --no-audio |
Combo for weak Wi-Fi:
scrcpy --max-size 800 --bit-rate 1M --turn-screen-off --stay-awake