-
-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Connect to scrcpy server and send commands #1249
Comments
The whole thread #129 should help you. |
@rom1v i checked it and tried to repeat it but looks like it's little bit different from what i need. In example he run server separately on mobile but i need to run regular client + server + my script. When i tried to forward internal port and connect i receive empty string in response but connected succesfully, when i try to connect to same port as scrcpy do, i receive timeout, it looks like server can't handle multiple connections? |
I just realized that i don't need client running, i can get everything from server, i was trying to run server with
But i get "Aborted" all the time. Tried to play with arguments but no luck. I am on Android Q, Pixel 3a, is this something with access rights? How can i debug it? |
It turns out that server file removed after run and i had wrong params. Fixed now and server works. Thanks! |
(noob alert) can you tell me what were the wrong parameters? |
@rxydenxd in new versions of server there are more params, here is my final code |
copied your code
still no luck. how to find what parameters are right for me? |
@rxydenxd i was looking at source code of server and checking what arguments it takes. |
I guess it has something to do with this? |
@rxydenxd you are using python for getting this work? |
yes brother, i cant even get the adb part to work :(
|
https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#conflicts-between-adb-versions |
@rxydenxd you can check usage example here https://github.com/razumeiko/py-android-viewer |
Hi. First of all, thanks for such amazing app. It works really good.
I am writing python script which analyzes screen and depends on some events on the screen i need to send swipe events . My initial version was on ADB then socket to ADB server but it's slower than your version.
Currently i am using scrcpy to get live screen and i want to send events through scrcpy, i am trying to open socket connection to scrcpy server but no luck.
Is it accessible? Is it right server address:
127.0.0.1:27183
?Do i need to do any specific actions to open socket connection with your server? I tried to learn how you do it but it looks like you just open LocalSocket by name and that's it, maybe there is limit on number of connections?
Also if it's possible to reuse your connection, could you point please, quick example how to build request to do input action? swipe for example.
Thanks.
The text was updated successfully, but these errors were encountered: