androidnetwork-programminghttprequestadb

How to intercept network from Android Application without Android Studio?


I want to see the existing network traffic when running an Android application. My expectation is to get some components from HTTP Request such as endpoint URL, headers (if any), request body, and response body.

example

I've seen in some tutorials, that they use adb tool and Android Studio to be able to integrate Network Interceptor. Is it possible to do it only with adb tool ?


Solution

  • I have once used Charles Proxy to intercept my physical device packets, it worked well with some apps but not all of them, I think that some apps implements some kind of an extra layer of security to prevent such a thing. I have not tried it on the emulator.

    Edit: To add to this answer, I think What Charles Proxy (or any intercepting app) is doing, is to stand in the middle of the streamline, between the server and the application, and receive the application's requests, log them, than reroute them to the server, receive the response back from the server and reroute it to the app. This technique is considered a security problem, known as Man In the Middle Attack, so some apps apply a security measure to prevent it, known as Certificate Pinning , which consists of :

    hard-coding a specific certificate or set of certificates into your app, ensuring that it only communicates with the intended server and not a malicious one that has been spoofed.

    Source