scrcpy Wireless Connector: Automate Your Android Screen Mirroring

scrcpy Wireless Connector: Automate Your Android Screen Mirroring

This blog will introduce you to a simple Windows script that automates the process of connecting your Android device wirelessly over Wi-Fi and launching scrcpy to mirror your device’s screen.

It’s specifically tested and optimized for Windows users, so if you're running Windows, this solution is just for you!


What is scrcpy and Why Is It Useful?

scrcpy is a powerful and efficient tool that allows you to display and control your Android device on your computer. It’s widely used by developers, testers, and anyone who needs to interact with their Android device on a larger screen. You can control your Android device with your computer’s keyboard and mouse, making it perfect for debugging or simple control tasks.

While USB mirroring is effective, it’s not always convenient. Constantly plugging and unplugging your device can be a hassle. This is where the Wi-Fi connection comes in. My script allows you to seamlessly mirror your device without the need for USB cables.


Who Can Benefit From This Script?

  • Developers : Quickly mirror Android apps or devices for testing without worrying about cables.

  • Testers : Perform Android device testing wirelessly, making it more efficient and cleaner.

  • Tech Enthusiasts : Enjoy the convenience of controlling your Android device from your PC without the mess of wires.

  • Anyone who regularly uses scrcpy and wants to streamline the process of connecting their device.


How This Script Reduces Setup Hassles

The script provides automated process to connect your device wirelessly and launch scrcpy without manual intervention. Here’s how:

  • No Manual Configuration : The script takes care of checking ADB, retrieving the device’s IP and enabling ADB over Wi-Fi automatically.

  • Instant Setup : Skip all the manual steps, and in just a few seconds, you’ll be connected over Wi-Fi and ready to mirror.

  • Effortless Experience : Instead of copying commands and troubleshooting USB connections, you can focus on the task at hand.


Set Up scrcpy and the Script on Windows

Now, let's walk through the entire process to download and install scrcpy, set up the environment, and use the script to get your Android device connected over Wi-Fi.


Step 1: Download and Install scrcpy

  1. Visit the official GitHub page : Scrcpy.

  2. Download the latest Windows release (look for the .zip file under "Assets").

  3. Extract the zip file to a folder on your PC, e.g., C:\scrcpy.

This will give you everything you need to run scrcpy, including the ADB tool.


Step 2: Add scrcpy to the Windows PATH

To make using scrcpy easier, we’ll add it to your system’s environment variable. This step ensures you can run scrcpy from any location without navigating to its folder.

Here’s how to add scrcpy to your PATH:

  1. Right-click on 'This PC' or 'My Computer' and select Properties.

  2. Go to Advanced system settings and click Environment Variables.

  3. Under System Variables, scroll down and select Path, then click Edit.

  4. In the Edit Environment Variable window, click New and add the path where you extracted scrcpy (e.g., C:\scrcpy).

  5. Click OK to save the changes.

Screenshot showing how to add scrcpy to the system PATH


Step 3: Download the Script

Next, download the scrcpy-Wireless-Connector.bat script, which you can find in the GitHub repository. Once downloaded, move the script into the scrcpy folder you just created.

Screenshot showing the script file in the scrcpy folder


Step 4: Connect Your Device via USB and Run the Script

Now that everything is set up, follow these steps to use the script:

  1. Connect your Android device to your PC via USB.

  2. Enable Developer Options and USB Debugging on your Android device (if you haven’t done this already).

    • Developer Options : Go to Settings > About phone > Tap Build number 7 times.

    • USB Debugging : Go to Settings > Developer options > Turn on USB debugging.

  3. Run the Script :

  • Open Command Prompt or PowerShell and navigate to the scrcpy folder.

  • Type the script name (e.g., scrcpy-Wireless-Connector.bat) and press Enter.

  • Alternatively, double-click the script file to run it.

GIF showing the script running and device screen being mirrored


Troubleshooting Tips

While this script automates the process, you might run into some common issues:

  • ADB not found : If you get an error stating that ADB is not found, make sure scrcpy is properly added to your system’s PATH.

  • Device not detected : Ensure your Android device is connected and USB Debugging is enabled.

  • Wi-Fi connection fails : Double-check that both your PC and Android device are connected to the same Wi-Fi network.

If you're still stuck, feel free to check the README file for further troubleshooting steps.


Conclusion

The script automates everything connecting your device, enabling ADB over Wi-Fi, and launching scrcpy so you can instantly mirror and control your Android device on your PC.

Whether you're a developer, tester, or just someone who enjoys a clean, wireless setup, this script will save you time and make your workflow much smoother.

Feel free to experiment with the script, and if you have any questions, don’t hesitate to reach out or contribute to the project!