Android device: set Wifi Proxy with ADB command

Andres Sandoval
1 min readJul 10, 2020

Every time we configure Charles we need to manually configure device wifi proxy settings.

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

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'

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 🙌🏻