I started using Autopy [0] for writing scripts to automate games on Windows, and then discovered that scrcpy lets me do the same for Android. I've used it for solving picross puzzles and right now I'm working on a solver for the Zachtronics solitaire games.