It's a solution that I think 'why didn't I write this?'
Very awesome work rom1v, and very much appreciate you explaining your usage of adb screenfetch and how you are able to arbitrarily run java code from /tmp. This opened up an entire new world for me.
But you might use it for other reasons, like typing text messages from your computer, or showing your device in a conference (e.g. to demo an app).
Only thing is I tried to compile the code base on a Macbook Pro and it took maybe 10+ minutes on my only attempt. I had to cancel it b/c my laptop was going into "jet" mode w/ the noise levels during a conference call. I'm going to try and compile it again and see how long it really takes for me.
On my laptop, after a new "git clone", the whole build takes 18s for me.
If I use the prebuilt server (https://github.com/Genymobile/scrcpy#prebuilt-server), so that it only compiles the client, it takes 0.8s.
This would let you control it right from your computer, instead of having to actually tap on your phone, which can be tedious, especially when typing.
And having such tool makes this way easier since you don't have to constantly reach for a phone and be wrapped in cables :)
And since it apparently handles keyboard support, typing on the phone would be a lot easier, too.
Or have "real world device" testing in your CI/CD pipeline.
Or to automate something else that's only available via an android app.
PS: I work for Browserstack
https://www.genymotion.com/cloud/ (albeit a bit different)
For devs, you could setup a device somewhere for automated testing.
There is UIAutomator, you can select components based on text, class, index, etc.
We use it to automate actions to configure Android devices (when there is no better way).
I'm an Android dev currently working on a team using NativeScript. My coworkers' latops have only 4GB RAM and they are unable to use an AVD for development. From now we are going to use scrpy :)
EDIT: yes, I do have hardware acceleration enabled.
This link should be a "Show HN"? I.e. it is about a tool you wrote.
> Blog posts […] can't be Show HNs.
For something a bit more old school, I’d like to insert a shameless plug here that we open sourced something similar several years ago. It’s focused on the enterprise side, so setting it up is unfortunately quite a bit more involved. Screen rendering is obviously far less advanced as well, though still decent enough. It’s compatible with (almost) all Android versions since 2.3 which has its own fun challenges!
Anyway, great project with a modern take!
Only downside is if you have swipe to unlock, I couldn't actually get the swipe up to trigger the password input screen.
Run adb tcpip 5555 and connect it using adb connect command
The solution would be to change the direction of the connection, and use "adb forward", but then scrcpy would try to connect before the server is started, so it would need to retry until connected (and the error would not be noticed on connect, but on first read, due to the tunnel).
Working over "adb connect" would be good, though.