explaingit

jz-darkal/androidhttpcapture

4,591JavaAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

An Android app that intercepts and records all HTTP and HTTPS network traffic on your device so you can inspect request headers, response bodies, and JSON data for debugging and testing.

Mindmap

mindmap
  root((AndroidHttpCapture))
    What it does
      Record network traffic
      Inspect HTTP and HTTPS
    Features
      Header and body capture
      Response modification
      HAR file export
    Extras
      DNS and ping tools
      Custom host entries
      Web console logs
    Setup
      Install certificate
      Android security settings
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Debug an Android app by recording every API request it makes and inspecting the full request and response data.

USE CASE 2

Test how an Android app handles error states by intercepting responses and modifying them on the fly before they reach the app.

USE CASE 3

Export captured network traffic as a HAR file to analyze request timings and payloads in other tools.

Tech stack

JavaAndroidNettybrowsermob-proxy

Getting it running

Difficulty · moderate Time to first run · 30min

Requires manually installing a CA certificate on the Android device, newer Android versions may restrict this to user-installed trust stores, limiting HTTPS capture.

MIT license, use freely for any purpose, including commercial, with no restrictions beyond keeping the copyright notice.

In plain English

AndroidHttpCapture is an Android app that records all the network requests your phone makes, letting you see exactly what data is being sent and received. Think of it as a window into your phone's internet traffic. The project description calls it the Android equivalent of Fiddler, which is a well-known tool desktop developers use to inspect web traffic. The main feature is HTTP and HTTPS capture. When you browse a page through the app, every request the page makes gets recorded: the headers, cookies, and body of both the request going out and the response coming back. If the response is JSON data, the app formats it to make it readable. You can filter and search through captured traffic, and export it all as a HAR file, which is a standard format that other analysis tools can open. Beyond basic capture, the app includes a few other tools. You can modify responses on the fly to test how an app behaves when it receives different data. You can configure custom host entries, which is useful for pointing a domain at a different server during testing. There are network diagnostic tools for DNS lookups, ping, and traceroute. The app also shows console log output from web pages loaded inside it, which helps when debugging hybrid apps that mix web content with native Android code. Setting up HTTPS capture requires installing a certificate on your device, the same approach Fiddler uses on desktop. Without the certificate, HTTPS traffic cannot be read. Newer Android versions may require you to install the certificate manually through the security settings. The app is built on top of two open-source libraries: Netty, a networking framework, and browsermob-proxy, a tool for intercepting browser traffic. Both were modified to work on Android. The project is released under the MIT license and is intended for debugging, testing, and educational use only. The disclaimer makes clear it should not be used to inspect traffic without authorization.

Copy-paste prompts

Prompt 1
I want to debug the API calls my Android app makes using AndroidHttpCapture. Walk me through installing the HTTPS certificate on my device and filtering traffic to show only requests from my app's domain.
Prompt 2
How do I use AndroidHttpCapture to replace a server response with custom JSON data so I can test how my Android app handles a specific error condition?
Prompt 3
I've exported a HAR file from AndroidHttpCapture. How do I analyze it to find the slowest requests and check whether any sensitive data is being sent in plain text?
Open on GitHub → Explain another repo

← jz-darkal on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.