Enable Android Nougat ‘Charles’ing SSL network

If you have worked with backend network on your App, you probably have used Charles Web Debugging Proxy tool. It’s a very convenient way to intercept the network and perform the needed tracing or even changing it.

It also works with secured SSL network, provided you download the needed certificate, usually from http://www.charlesproxy.com/getssl/

Unfortunately, beginning Android 7 (SDK v24) onwards, the SSL network is no longer viewable directly. This is actually a newly introduced security feature in Android 7 so that the SSL network in your App is more secured, and not intercepted by 3rd party.

Enable SSL Proxy for Nougat

However, if for your own debug you would like to intercept your SSL network, what must you do? Below are two simple steps.

Update AndroidManifest.xml

Update your AndroidManifest.xml application section with networkSecurityConfig.xml

<application android:name=”AppName” 
android:icon=”@mipmap/ic_launcher”
android:label=”@string/app_name”
android:networkSecurityConfig=”@xml/network_security_config”>

Add network_security_config.xml file

--

--