从shell设置Android代理
设置代理:
adb shell settings put global http_proxy ip:port
如:
adb shell settings put global http_proxy 172.16.21.14:8888
移除代理(需三条指令全部执行,部分机型可能需要重启手机才能完全移除代理):
adb shell settings delete global http_proxy
adb shell settings delete global global_http_proxy_host
adb shell settings delete global global_http_proxy_port
adb reboot