A solution I found recently is scrcpy
(scrcpy github page). It lets your pc connect to your phone and you can control your phone through it. It works through adb
without any need to install an apk on your android phone beforehand. It streams your phone's screen to your pc, taking into account the rotation, and it allows to send clicks and touches with the mouse and write in text fields directly through your pc's keyboard, although you can only write ascii characters that way.
Since this only needs adb
, it works as long as you achieve an adb
connection with your phone, so that includes USB cable and Wifi connection for truly remote control. I don't know how you could do it over the network without being on the same LAN, though.