Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Use Charles Proxy after update the phones to Android 9

I updated my test devices (Samsung galaxy Note 9 and galaxy S9+) to Android 9. Now I am not able to use Charles proxy to grep any traffic. I have updated my Charles Proxy to the latest version 4.2.8 (MAC) And I have configured proxy on Wifi setting like old days.

Note: Charles Proxy was working fine before update (Android 8.0 for S9+, 8.1 for Note 9)

like image 730
William Tse Avatar asked Mar 14 '19 10:03

William Tse


People also ask

Does Charles Proxy work on Android?

Configuring Your Android Device to use the Charles Proxy. Use the following steps to configure your Android device to use Charles proxy: Go to Settings > Wifi. Press and hold down the power key on the Wifi Network device you are currently connected to.

How do I configure my browser to trust Charles root certificate?

In Charles go to the Help menu and choose "SSL Proxying > Install Charles Root Certificate". Keychain Access will open. Find the "Charles Proxy..." entry, and double-click to get info on it. Expand the "Trust" section, and beside "When using this certificate" change it from "Use System Defaults" to "Always Trust".

How do I enable Charles proxy on Android devices?

On Android N or higher, ad calls are visible in Charles proxy only when the following steps are performed: Update the Google Play services on the mobile device. Enable Network Tracing on the mobile device. Install Charles SSL certificate on your device, and set up proxy.

Why are my ad calls not visible in Charles proxy?

On Android N or higher, ad calls are visible in Charles proxy only when the following steps are performed: Update the Google Play services on the mobile device. Enable Network Tracing on the mobile device.

What is Charles proxy and how does it work?

Charles Proxy sits between your app and the Internet. All networking requests and responses will be passed through Charles Proxy, so you’ll be able to inspect and even change data midstream to test how your app responds. How Does Charles Proxy Work With Mobile Devices?

How do I set up Charles proxy for Tealium for Android?

This article describes the steps required to set up your Android device to proxy network requests through Charles, which is helpful for troubleshooting or debugging your implementation of Tealium for Android. Use the following steps to configure Charles Proxy: Go to Proxy > Proxy Settings. In the Proxies tab enter 8888 in the HTTP Proxy Port field.


2 Answers

SSL Certificates | Charles

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.

Add a file res/xml/network_security_config.xml to your app:

<network-security-config> 
  <debug-overrides> 
    <trust-anchors> 
      <!-- Trust user added CAs while debuggable only -->
      <certificates src="user" /> 
    </trust-anchors> 
  </debug-overrides> 
</network-security-config>

Then add a reference to this file in your app's manifest, as follows:

<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
    <application android:networkSecurityConfig="@xml/network_security_config" ... >
        ...
    </application>
</manifest>

After you have reinstalled charles proxy, recreate the certificate.

like image 166
futabooo Avatar answered Sep 29 '22 02:09

futabooo


If you have root access to your phone you can do the same that was done here and add the charles proxy certificate to the system trusted certificates of the phone

like image 27
fuomag9 Avatar answered Sep 29 '22 02:09

fuomag9