scrcpy - madBeavis/PimpMyAtv GitHub Wiki

Foreward

Scrcpy is a program used to monitor and interact with ATVs or phones. It is a program you run on your PC. Beyond having ADB setup and enabled on your device (madroms for ATVs come with this on), nothing else is required or installed on the device.

TeamViewer is an alternative that has been discussed, but I have never used it so can't comment or advise further. The same goes for AirDroid.

For folks that are on the newer side and setting up ATVs, I have been told to recommended that you use a keyboard, mouse and monitor. You will also find that a regular mouse connected to the ATV will not interact with pogo, so you need scrcpy anyways.

I only outline the method I use, which is connecting to one ATV at a time. This is the KISS (keep it simple stupid) approach, if you want to connect to and monitor multiple devices at a time, I will leave it to you to exercise some googlefoo to accomplish such.

Get the program

The program can be found at their github. Scroll down and find the appropriate version for your computer OS, i.e. windows, mac or linux. You may or may not have to install adb depending on your OS.

This is one program I generally recommend keeping updated, new versions typically seem to yield improvements. I would recommend keeping a copy of older versions in case they bork a new one, so you can always revert if older version is more stable with your setup. Their releases page has the current and historic versions.

Usage

The most basic usage is one ATV at a time. For that I use batch files on my windows laptop and bash files on the mint laptop i run MAD on. FYI, the program doesn't run well without any options.

You will need to use adb to connect to the ATV. The roms come configured for it already, so you just need to issue the appropriate command.

There are various options, but just a few for getting going:

  1. -m1024 sets the max resolution. The lower the resolution, the higher the performance and stability.
  2. -b4m sets the bit rate 4 mega bits per second, the default is -b8m
  3. --window-title=atv056 sets the window title so you can know which ATV you are observing
  4. --render-driver=opengl sets the render driver to opengl, seems more stable on my windows laptop, default on mint. Try it with or without, go with what works better
  5. --max-fps=30 sets a limit for frames per second for the session. According to scrcpy docs, it may not be supported before Android 10

A full example commands is as follows: scrcpy --tcpip=192.168.8.103 -b8m -m1024 --window-title=atv003 --render-driver=opengl --max-fps=30

Batch file

The link to example Windows batch files are here. A basic bash file or two for linux is here.

Pogo settings

Some of us have had success with setting pogo to utilize native refresh rate. Find it in advanced settings in the app.

Problems / Troubleshooting

ATVs aren't exactly highend devices, particularly the s905w based ones. You will have disconnects and the display may stutter or freeze. Don't be surprised scrcpy gets worse when pogo is in the foreground. A device may struggle with scrcpy right after flashing, but tends to clear up in time.

If things get wonky and the prior hasn't helped enough, don't be afraid try some of the following troubleshooting steps:

  • adb kill-server to restart the adb server on your computer
  • Reboot device so you can get in to do what you need prior to pogo starting
  • Pause the device in madmin
  • Middle click to put pogo to the background, then re-open pogo
  • Verify your video drivers are up to date
  • Try a different version of scrcpy
  • Did you fix the ip address for your devices? Hard to connect to something that can change, silly to look at router and if it can't connect to MAD you can't run a job to get ip. Just fix your ip addresses.
  • if you did not specify -m followed by a value, things won't work for ATVs. Set a reasonable value and try again.

Random Hints/Tips

  • Read the github page for scrcpy, plenty of options not covered here
  • You can use the clipboard to copy from say Windows to the ATV to enter passwords using Ctrl-V key combo
  • Drag apk onto the scrcpy window to install that apk to the device
  • --print-fps will show fps in the console
  • --record=file.mp4 will record the scrcpy window to a mp4 file