DEV Community


Posted on • Updated on

Debug android 9 with mitmproxy instead of Charles

I used Charles.
I decided to stop to use it because

  • linux version's UI is not good
  • Not open source
  • Not command line


you can download tar file from
unpack it you can see

  • mitmdump
  • mitmproxy
  • mitmweb

You should move it to any location you want.



default 8080 port is used.

Set up your android

Connect your android and the mitmproxy

  1. Open wifi setting screen for your android
  2. Select your wifi connection setting
  3. Tap pencil icon(edit button)
  4. Change proxy setting to Manual
  5. input your computer's local IP address as Proxy hostname
  6. input 8080 as Proxy port

Now you can open a browser and access any web site then you can see log on the mitmproxy.

Certification for andorid applications

see also :

Let you access via any browser via mitmproxy.
you can install certification for each device.

If you device's android version is less than 9(Pie).
You are lucky you can see all of logs for each apps.

Set up your android application for Pie

see also :

add xml resource file into res/xml/network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- SECURITY RISK -  This app's network data can now be intercepted!!! -->
            <!-- Trust preinstalled CAs -->
            <certificates src="system" />
            <!-- Additionally trust user added CAs -->
            <certificates src="user" />

Add an attributes into <applicaiton> tag in AnroidManifest.xml




  • some android devices has a bug about wifi proxy.
  • not only android 9 sometimes it is needed to add network_security_config.xml

Top comments (0)