1

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?

Denis Loh
  • 2,194
  • 2
  • 24
  • 38
  • Yes it is possible but you'll need to have a rooted phone to issue shell commands inside your android app – riteshtch Feb 14 '16 at 17:25
  • What device do you need? http://www.ironlab.io allows debugging on real devices in the cloud. They are in free beta now. – Schultz9999 Apr 16 '16 at 23:10

0 Answers0