The Android Emulator and Charles Proxy: A Love Story

Setup

Get Charles

“Android

As of Android N, you need to add configuration to your app in order to have it trust the SSL certificates generated by Charles SSL Proxying. This means that you can only use SSL Proxying with apps that you control.

<network-security-config> 
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<applicationandroid:networkSecurityConfig="@xml/network_security_config" ... >
...
</application>
</manifest>

Urls instead of IP Addresses***

NOTE: THESE INSTRUCTIONS ARE OUT OF DATE. See the asterisked (***) section below for more current instructions.

***UPDATE:

As with all things, setting up an HTTP proxy with your Android Emulator has changed a bit. Here’s is an amended guide to setting up URLs with Charles Proxy:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mark Dappollone

Mark Dappollone

Director, Mobile Product Engineering at Anywhere Real Estate