DEV Community

Cover image for Mirroring an Android Phone to a Mac
Alizamin Jafarli
Alizamin Jafarli

Posted on AI-assisted

Mirroring an Android Phone to a Mac

Sometimes you want to see and control your Android phone's screen right on your Mac, wirelessly. Here's the whole setup in a few steps.

What you need

  • adb and scrcpy installed (brew install android-platform-tools scrcpy on Mac)
  • Developer Options + USB debugging enabled on the phone
  • Phone and Mac on the same Wi-Fi network

Connect over Wi-Fi

  1. Plug the phone in via USB once, then switch adb to wireless mode:
   adb tcpip 5555
Enter fullscreen mode Exit fullscreen mode
  1. Find the phone's IP (Settings → About phone → Status, or adb shell ip addr), then connect:
   adb connect <phone-ip>:5555
Enter fullscreen mode Exit fullscreen mode
  1. Confirm it's attached:
   adb devices -l
Enter fullscreen mode Exit fullscreen mode

Note: If adb connect times out, it's usually a stale/wrong IP — phones often switch Wi-Fi networks or get a new DHCP lease. Re-check the IP on the phone and retry.

Mirror the screen

With the device connected, launch scrcpy pointed at that address:

scrcpy -s <phone-ip>:5555
Enter fullscreen mode Exit fullscreen mode

A window opens mirroring the phone's screen in real time, and you can control it with mouse/keyboard.

Keep the screen awake

By default the phone's screen can still lock mid-session. Add these flags:

scrcpy -s <phone-ip>:5555 -w --screen-off-timeout=3600
Enter fullscreen mode Exit fullscreen mode
  • -w keeps the device awake while scrcpy runs
  • --screen-off-timeout=3600 extends the phone's timeout to an hour for the session

💛 Enjoyed this post? Support this blog by donating to a cause you care about.

Top comments (0)