If you are using SCRCPY you’ve probably seen the huge list of commands that are available to customise the way runs on your system and how you interact with it. As these commands are time-consuming to enter manually, it’s far easier to create a batch file .bat file that allows you to automate command actioning on SCRCPY.
Although it might not seem like it, SCRCPY is a very customisable piece of software. You can change or adjust screen resolution settings, how it launches, frame rates, touch interactions, connections, etc. The only problem with making these changes is that they require some basic Command Prompt knowledge to use and extra time to enter. Thankfully a large portion of the commands available for SCRCPY can be automated in a .bat file. A shortcut that you can use to launch SCRCPY with everything already active.
For instance, I have created a .bat file for SCRCPY that does the following on launch: Start SCRCPY with the screen off, keep the screen awake, show touches, and launch a specific device. This saves me having to enter a ton of different commands every single time I want to open SCRCPY, it also allows me to use multiple devices with their own configuration. Check out both of the links below if you want a little more help with commands and multiple device usage.
Note: if you prefer video guides check out our SCRCPY YouTube Playlist.
How do you create a batch file that will automatically run SCRCPY commands? SCRCPY batch file .bat creation.
To begin, you’ll need to head on over to the SCRCPY GitHub page. Here you’ll find all of the commands you can use to make SCRCPY run exactly how you want it to. Keep in mind some of these commands aren’t compatible when strung together so there is a little bit of trial and error involved. Now that you have a list of all the commands available for SCRCPY you can string together a custom .bat file.
- First, open File Explorer, then navigate to the SCRCPY folder. When you are in the correct location right-click and select New > Text document.
- Call this file whatever you want then remove the .txt ending and replace it with .bat. Accept the prompt that appears to confirm the extension change.
- Now that you have a .bat file ready, you can start entering the SCRCPY commands you want to use. To do this, right-click the .bat file you created and select Edit. This will open Notepad.
- Now in the Notepad file type scrcpy, then paste in the commands you want to use. For example, it should look something like the following:
scrcpy -S --turn-screen-off --stay-awake --show-touches --render-expired-frames --serial R58RDFG5MYDX
- Once you have entered a string of commands Save the notepad file, then double-click the file to run SCRCPY with your chosen commands. If you see the command window open then close quickly, you’ve got an error or one of the commands doesn’t like the other commands. This is where trial and error comes into play. I generally add one command at a time to test where a problem may arise.
The most important thing to remember when coping the commands in is to not include scrcpy between each command. You don’t want your string looking like this:
scrcpy -S scrcpy --turn-screen-off scrcpy --stay-awake scrcpy --show-touches scrcpy --render-expired-frames
If you plan on using multiple devices, finish your string with --serial (insert device number here). This will allow you to make a different shortcut for each of the devices you want to use SCRCPY with.