可以使用命令设置和删除代理
设置代理ip:
IP是电脑的ip,port是抓包工具设置的端口
adb shell settings put global http_proxy ip:port
移除代理设置:
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