Using scrcpy with Bazzite
Post 007 of #100DaysToOffload is centered around Android weirdness!
Call of Duty: Mobile has an event this season that is a crossover with the Gundam franchise. I wanted to check out all the big stompy robots so I re-installed this massive game. I have enjoyed COD:M in the past but I've found it difficult to play because I my eyesight is poor and my phone screen is definitely small compared to my monitors.
I know that COD:M can be played officially on PC with GameLoop but that requires Windows as it has baked in anti-cheat and you are also dealing with other players in PC lobbies. I wanted to play mobile touch or mobile controller but be able to see my screen better.
While watching a video about the release, I noticed that Gundam Explained was using scrcpy to show off the game for his YouTube video. I wondered if I could do the same and use scrcpy to give me a bigger screen to play on given my Pixel 7 Pro doesn't have any sort of video output options.
Installing scrcpy in Bazzite was relatively simple. There is a script baked right in: ujust install-scrcpy
. In my case, I had a distrobox container named fedora
, where I tend to export things I install by way of DNF. This ujust script installed scrcpy into that container and did a little bit of setup.
On my phone, I already had developer mode enabled with debugging turned on. If you don't already have that set up, you can do it by opening settings, then About Phone, and then tap on the Build Number at the bottom of the screen several times. It'll pop up a notification when developer mode is enabled. You'll also need to enable debugging by searching for Developer Options in Settings, and once on that screen, tap the toggle for USB Debugging. It also helps to enable the Stay Awake option in the developer options menu as well.
The next step is to plug your phone in with USB. You should see a notification about USB Debugging pop up. Normally at this point, running any adb commands would ask to allow access for your computer but something is a bit off in Bazzite. I was getting errors with scrcpy that no device was found and listing devices in adb lead to empty results.
It turns out I needed to restart adb (and I need to do this each time I want to use scrcpy for some reason). To do that, I jump into the distrobox container where scrcpy is installed and run adb kill-server && adb start-server
. Then adb list-devices
will show my phone and I can start scrcpy from this same container.
I am still playing with the various options for my setup with scrcpy. I mostly want only the display to be streamed to my computer while the audio and controls are handled by the phone. Over time I hope to find reasonable enough settings that I get good picture quality and no input lag.
One other bonus tip that I learned during this process: I am able to use my phone as a webcam with Bazzite. After plugging in the phone, if I search for “USB” in the settings and choose the option for “USB controlled by”, there is a list of “Use USB for” options. I was tinkering with this while trying to get scrcpy to talk to my phone. I noticed the “Webcam” option, enabled it, fired up GNOME Camera and was immediately staring at a non-flattering picture of myself right on my desktop!