Real-Time Android Device Control and Mirroring Over Wi-Fi with Scrcpy

#dev

Take control of your Android device wirelessly with Scrcpy and easy-to-follow tutorial.

Scrcpy is an application that provides display and control of Android devices using Android Debug Bridge (adb).

This blog will cover a step by step tutorial for controlling an android device from a PC over Wi-Fi.

Requirement#

  • Android Version >= 11

Steps#

  1. [PC] Install scrcpy. For linux, run apt install scrcpy.

  2. [PC] Download the Android SDK Platform Tools from here. This is a command-line tool that allows us to use adb.

  3. [PC] Extract and open the downloaded file. Then open terminal in same directory (in platform-tools folder).

  4. [Android] Enable Developers options (skip if already enabled): Go to Settings -> About phone/device then click Build number 7 times.

  5. [Android] Enable Wireless debugging from Developers options (available in Settings). You are required to connect to a Wi-Fi Network.

  6. [Android] Click Pair device with pairing code inside Wireless debugging menu. A modal will appear with Wi-Fi pairing code and IP address & Port.

  7. [PC] Run ./adb pair [IP address & Port] [Wi-Fi pairing code]. Once paired, your device will appear in Paired Devices section of Wireless debugging menu.

  8. [PC] Run ./adb connect [IP address & Port]. Note that Port for connecting is different from Port for pairing. You can find the IP address & Port for connecting in Wireless debugging menu. Once connected, connected to [IP address & Port] will be displayed in terminal.

  9. [PC] Run scrcpy. An application will run where you can see and control your connected Android device. Also, check here for optional parameters with scrcpy to configure for your use case.

  10. Done.