I set-up remote debugging with these commands:
adb tcpip 5555
When I connect to the adb service with adb connect <ip>:5555
I am able to read the logcat from my computer.
However, I want to write a small android app for my tablet (device A) which analyzes the logcat of my smartphone (device B). How do I connect to the remote adb and read the logs programatically?
I expect that I have to create a TCP socket to the server. But then I don't know how to continue.
EDIT
As I found out with Wireshark, it actually is possible. The connection seems to be a basic TCP socket connection with a command response handling. ADB sends a 4 letter command with the command shell:logcat -v long.
So, is there a documentation about how this socket connection works?