Search code examples
androidusbreverse-engineering

Capture USB traffic on Android Device


I bought a car (Chery Tiggo 5x) that uses an app (QDrive) installed in my phone to connect to its screen. However the app is very poorly made and there is a bug. When I have a map on my phone, whenever I drive faster than 20 km/h the screen goes black and I have to click "Navigate" on my phone again so that the command to mirror screen is once again sent.

My question is: how can I inspect the USB traffic between the phone and the car?

I would like to see which command is made and disable it through reverse engineering. The app is quite big and chaotic and I am having trouble finding the exact command simply through reverse engineering.


Solution

  • Though they can get a little expensive, my suggestion would be a hardware bus analyzer. This little device goes between the host and the device, capturing all traffic and then sends that information to a laptop or desktop computer. You could then see all of the USB traffic between the two devices. As for the Android and the vehicle, neither know there is the analyzer attached.

    Please note that these can be quite expensive though. The one I used for the research for my book is the Beagle from www.Totalphase.com (no affiliation) and can run you up to 400 USD. Is this worth the efforts?

    Here is a screen shot I took as an example. I shows the timing between packets, the type of packets, the content of each packet, etc. These are wonderful machines, but again, a bit expensive if you don't have the real need for it.

    Without something like this hardware, I don't program for Andriod, so I am at a loss. Maybe there is a software "snoop" that you can install and have it catch all traffic. For example, I just Googled "USB Snoop" and a few links look promising, though unknown if they work on the Andriod.