For recording videos where I need mobile to display something, I use scrcpy. I tried to use other screen mirror application like samsung flow but they seems to be slow or the application comes with ads etc, and not secure, so I still use scrcpy. SCRCPY.exe is a small program to mirror phone screen on laptop/pc. Because I often forget how to use it since I don't need it everyday, I wanted to write about it so that I can come here and look what and how I get it working.
To run this application there are two things you have to do. First is that the developer mode with USB debugging must be enabled and second we have to install the scrcpy windows application.
The usual way to enable the debugger mode is to go the settings > About Phone> find the Build number section and then click 7 times on the build number.
This then turns on the developer mode which will be visible just below the About. Then you have to go into the developer mode and check on the USB debugging feature.
If you get message like adb failed, then it is likely that the developer mode with USB debugging is disabled.
To install the scrcpy windows application, go to the following github repository and download it.
Then unzip and put unzipped folder to some location like:
D:\scrcpy-win64-v3.1
Run the scrcpy.exe file and you should see cmd prompt screen like the following:
You should be able to screen the mobile screen on the PC/Laptop now.
The above picture was captured for the demonstration of how to use the online free MPU6050 calibration and testing tool.To rotate the mobile screen orientation, use ALT + Arrow Key.
scrcpy and ADB Wireless:
scrcpy relies on ADB: scrcpy uses ADB to connect to and control your Android device.
- Wireless ADB: You can establish a wireless ADB connection by connecting your device to the same Wi-Fi network as your computer and then using
adb connect DEVICE_IP:5555
. - ADB over TCP/IP: To enable ADB over TCP/IP, use the command
adb tcpip 5555
. - Disconnecting ADB: After using ADB wirelessly, remember to disconnect using
adb disconnect
. - Device Disconnecting: If your device disconnects frequently, ensure your ADB connection is stable and try different cables or ports
After using WiFi connection and if you get into problem use the following command to kill the adb server:
> adb kill-server
followed by,
> adb start-server
Additional adb commands: