I am trying to get a Charles Log from an android device, and it is not working. The android device's browser will not connect to the internet after I set up the Wifi with the Proxy. I have listed the steps I did to set up Charles Proxy on my computer and configuring the android device to use charles proxy.
I am totally grateful for any help, but I just want to point out a couple of things:
*I have the correct the Wifi network & IP address for the Android device proxy settings ( see Step 18 below).
*As far as I know I do not use a VPN or a Firewall on the android device. How can I double check this?
*I have tried the steps below with 2 versions of Charles Proxy.
charles Proxy: 4.2.7
charles Proxy: 3.12.3
I removed and reinstalled the program each time.
*Chrome and Firefox on the android device will not connect to the internet with the proxy set up.
See the list below for the step and Thank you so much!!!
System: MacOS 10.10.5 Android: 6.0.1
On Android device:
To manually add the security certificate to the Android device: 30: On Mac desktop – Charles Proxy > Menu Help > SSL Proxying > Save Certificate 31. Saved certificate to desktop. 32. Copied certificate to android device / downloads folder (not on SD card) via USB cable.
On android device: 33. Found charles proxy certificate file, long clicked.
In dialog box: renamed certificate Charles Proxy Certificate
Clicked VPN & Apps
Clicked save.
NB: Here I am not asked to re-enter my device PIN
Open Chrome App. Get the error message “err_proxy_connection_failed” or "err_connection_timed_out"
Android Device: notification that a third party might be watching.
I check if the certificate is installed: Settings > Security > Trusted Credentials > User > the XYZ Charles Proxy security certificate is installed.
I have also done Steps 30 to 38 with the certificate with a crt and a pem suffix.
I have tried the following variations: *Setting up the Proxy on Android device without USB connection to mac *Setting up the Proxy on Android device while connected to mac via USB *Setting up the proxy on Android device before opening Charles Proxy and after.
I have no idea what to try next! Hope you can help and thank you for reading this far. :)
Google Chrome: Go to Settings > Click "Show Advanced Settings" > Network section > Change Proxy Settings... > Connections > LAN Settings. Under Proxy Server, uncheck the box next to "Use a proxy server for your LAN"
It is likely that your browser's proxy settings have been changed to use Charles and then, for some reason, not changed back. First try starting and quiting Charles normally to see if that corrects the problem.
From Android 10, it requires extra config in order to intercept the HTTPS traffic from Android devices.
Add to res/xml/network_security_config.xml
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
<certificates src="system" />
</trust-anchors>
</debug-overrides>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<domain-config>
<!-- Make sure your URL Server here -->
<domain includeSubdomains="true">your_test_url</domain>
<trust-anchors>
<certificates src="user"/>
<certificates src="system"/>
</trust-anchors>
</domain-config>
Add to AndroidManifest.xml
<manifest>
<application android:networkSecurityConfig="@xml/network_security_config">
</application>
</manifest>
If you've still struggled, let check out the Full Documentation and Sample Project at https://docs.proxyman.io/debug-devices/android-device#sample-android-project
I even bought Charles and have the same problem. I tried it with different devices and tried it in two different Wifi's. Nothing. Get the same error as Ana. And yes, I have set up network-security-config.
I am using Charles Proxy with my windows machine. I have followed This blog for details
The steps can be concluded as follows.
network_security_config.xml content should be as follows
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With