Open a0ab1d3564 opened 3 years ago
Can we replace the communication layer from ADB sockets to anything else? assuming we can keep scrcpy-server running on the device with all AID_SHELL
privileges?
Can we replace the communication layer from ADB sockets to anything else?
Yes, by replacing here with a normal socket (and somehow tell it where to connect)
Is there any progress at this time?
First of all let me thank everyone working on this project, it's Amazing! I have a question I hope it's not repeated, is it possible to use a raw TCP/UDP sockets instead of relying on ADB?
From what I've understood in https://github.com/Genymobile/scrcpy/blob/master/DEVELOP.md: 1- scrcpy-server is moved to the device using ADB to get
AID_SHELL
which has some privileges scrcpy-server needed to work. 2- ADB is used to establish a connection between the scrcpy-server and scrcpy-client.If it's possible to add scrcpy-server with the same privileges to the device as core service or init.d service with the same privileges using custom ROM or rooted device with Magisk module, can we change the connection from ADB to a custom made server which use raw TCP/UDP sockets to communicate between scrcpy-server and scrcpy-client?
What I'm thinking about is to make scrcpy-server connect to the custom server and scrcpy-client connect to the same server, and the server act as a relay without ADB involvement.
I just want to know if that a possible and where I can start to change the communication layer to remove ADB involvement.
A better Idea
Can we abstract the communication layer between scrcpy-server and scrcpy-client which will make it easy to impalement different ways for transfer data in the network for example: (Wifi Direct) #839, (Bluetooth) #2335, (Websockers) #313 or even using USB Tethering (without ADB), or to solve some requests like #100.