# Intercept and edit HTTP traffic from (almost) any Android app

DevFeed: [Intercept and edit HTTP traffic from (almost) any Android app](<https://devfeed.tech/articles/intercept-and-edit-http-traffic-from-almost-any-android-app-19076.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/inspect-any-android-apps-http/>)

Author: HTTP Toolkit; Tim Perry

Published: 2021-03-24T17:00:00Z

Content type: tutorial

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [LineageOS](<https://devfeed.tech/topics/lineageos.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [APK](<https://devfeed.tech/topics/apk.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [dev-tools](<https://devfeed.tech/topics/dev-tools.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [apk](<https://devfeed.tech/tags/apk.md>), [debug](<https://devfeed.tech/tags/debug.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [http](<https://devfeed.tech/tags/http.md>), [interception](<https://devfeed.tech/tags/interception.md>), [sdk](<https://devfeed.tech/tags/sdk.md>)

## AI overview

A step-by-step guide to intercepting and editing HTTP traffic from Android apps using a normal Android emulator, Android Studio, APK installation, and HTTP Toolkit. It explains why HTTPS traffic is difficult to inspect and describes emulator configuration requirements.

## Source excerpt

HTTP is used by almost all Android apps to request data, load content, and send changes to backend servers. If you can see and edit these requests & responses then you can understand, debug, and change how any app works, but Android makes this hard to do. By default, almost all apps will use HTTPS but won't trust user-installed certificates. This means that you can't see their traffic with simple proxy tools, and you can't manually trust HTTPS debugging proxies without either editing and rebuilding the entire app, or setting up your own rooted device. Fortunately, there's a quick & easy way around this: you can manually install official APKs into a normal Android emulator, which provides enough access that tools like HTTP Toolkit can capture all traffic for most apps for you totally automatically, and allow you to edit responses in just a couple of clicks. Let's walk through how to do that, step-by-step: Setting up the emulator To get started, you'll need an emulator. It is possible to create and start one using the Android SDK directly (see this article) but it's easiest to just install Android Studio, create an empty project, and use the developer tools provided there (if you're not familiar with these developer tools at all, there's an detailed official guide). To create an interceptable Android emulator, you should create an AVD, that: Can be any device model, though things may be smoother with a popular device like a Pixel 4. Uses an image matching your computer's architecture (ARM64 on M1/M2 Macs, x86_64 on most other computers) since the performance will be far better. Uses a relatively recent stable Android version - Android 7 to 13 should be fine. Uses a 'Google APIs' or 'Android Open Source Project' target image. The 'Google Play' target includes extra restrictions and is not easily interceptable. Once you've created your emulator, start it, and then we need to install the target app. Since we don't have Google Play, you can't do that from the normal app s