As I asked here: TCP listening on port (tcpip) without root and usb cable on android < 11
I am trying to listen on a specific port (without root or usb cable) for running commands through adb. Someone, in the comments of the previous question, suggested that I could open a ServerSocket on port 5555. I am asking because I am not sure how I would need to replicate the adb server, more specifically how to handle the strings that I would receive on the socket.
So, as mentioned in the title, I would like to take a peek at the source of the command tcpip an replicate, if possible, the behaviour without needing root.