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.

  1. Connect the phone to the PC via USB.
  2. Ensure USB debugging is enabled (and “Allow” is tapped on the phone screen on first connection).
  3. Run the command without specifying an IP address:
    scrcpy --tcpip
    
  4. What happens: Scrcpy automatically switches the device to TCP/IP mode, detects its Wi-Fi IP address, and connects.
  5. Once connected, unplug the USB cable. The mirroring continues over Wi-Fi.

Method 2: Classic Manual (via ADB)

  1. Connect the device via USB.
  2. Switch adbd to listen on the network:
    adb tcpip 5555
    
    (Expected output: restarting in TCP mode port: 5555)
  3. Unplug the USB cable.
  4. 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
    
  5. 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.

  1. On phone: Settings → Developer options → Wireless debugging (enable).
  2. Tap “Pair device with pairing code”. The screen shows an IP address, port, and a 6-digit code.
  3. 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
    
  4. Go back to the “Wireless debugging” menu on the phone. It shows a different IP and port for actual connection (not for pairing).
  5. Connect:
    adb connect 192.168.y.y:PORT
    
  6. 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:

FlagDescriptionExample
--max-size 1024Limits resolution (saves Wi-Fi bandwidth)scrcpy --max-size 1024
--bit-rate 2MLimits bitrate (default is 8M)scrcpy --bit-rate 2M
--turn-screen-offTurns off the phone screen during mirroring (saves battery)scrcpy --turn-screen-off
--stay-awakePrevents the phone from sleeping while runningscrcpy --stay-awake
--no-audioDisables 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