Real-Time Android Device Control and Mirroring Over Wi-Fi with Scrcpy
#devTake 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#
-
[PC] Install scrcpy. For linux, run
apt install scrcpy
. -
[PC] Download the Android SDK Platform Tools from here. This is a command-line tool that allows us to use
adb
. -
[PC] Extract and open the downloaded file. Then open terminal in same directory (in
platform-tools
folder). -
[Android] Enable Developers options (skip if already enabled): Go to
Settings
->About phone/device
then clickBuild number
7 times. -
[Android] Enable Wireless debugging from Developers options (available in Settings). You are required to connect to a Wi-Fi Network.
-
[Android] Click Pair device with pairing code inside Wireless debugging menu. A modal will appear with Wi-Fi pairing code and IP address & Port.
-
[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. -
[PC] Run
./adb connect [IP address & Port]
. Note thatPort
for connecting is different fromPort
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. -
[PC] Run
scrcpy
. An application will run where you can see and control your connected Android device. Also, check here for optional parameters withscrcpy
to configure for your use case. -
Done.