Manual steps to enable Charles:
Go to Wifi settings -> edit -> Proxy -> manual -> enter the “Proxy hostname” (IP address) -> enter the “Proxy port” (8888).
Automate with ADB command:
With this ADB command you can configure Proxy on device from the terminal. Change to use your IP address.
adb shell settings put global http_proxy 192.168.xx.xxx:8888
To remove the proxy setting enter below ADB command:
adb shell settings put global http_proxy :0
Note: you can create an alias to make the adb command shorter.
alias proxy='adb shell settings put global http_proxy 192.168.86.219:8888'
Thanks for reading. I started to publish my daily notes. Let me know if I’m wrong somewhere or if there’s something that could do differently or better. I’m open to your feedback 🙌🏻