scrcpy is a powerful tool that allows users to seamlessly display and control connected Android devices on their computer. Here are the steps to set up scrcpy in a wireless environment:
-
Ensure the device and computer are on the same network: First, make sure both your Android device and computer are connected to the same Wi-Fi network. This is a basic requirement for wireless connectivity.
-
Enable Developer Mode and USB Debugging on the Android device: In the device's settings, navigate to 'About Phone', tap 'Build Number' seven times to enable Developer Mode. Return to the main settings menu, locate 'Developer Options', and enable 'USB Debugging'.
-
Connect the device to the computer using a USB cable: During initial setup, connect the Android device to the computer via a USB cable to pair for wireless debugging.
-
Find the device's IP address: In the device's 'Settings', go to 'About Phone', select 'Status Information' to view the IP address.
-
Perform wireless pairing via ADB: Open the command prompt or terminal on the computer, enter the following command to enable TCP/IP mode and specify the port (typically 5555):
shadb tcpip 5555
Then disconnect the USB cable and connect to the device using its IP address:
shadb connect <device IP address>:5555
- Launch scrcpy: Once connected wirelessly via ADB, simply enter in the command line:
shscrcpy
Your Android device screen should now display on the computer.
- Adjust settings (optional): scrcpy allows adjusting various settings via command-line parameters, such as resolution and bitrate, to optimize performance and visual experience.
For example: Previously, when working from home, I needed to frequently check information on my phone but didn't want to pick up the phone each time. After using scrcpy in wireless mode, I can easily operate the phone directly on the computer screen, significantly boosting my work efficiency.
This completes the process of setting up scrcpy in a wireless environment.