1. 程式人生 > 其它 >雷電4 設定代理不生效

雷電4 設定代理不生效

進入安裝目錄D:\Program Files\leidian\LDPlayer4
powershell
.\adb
cmd
adb

如果出現

adb shell
error: more than one device and emulator

碰到這種情況,首先要查一下,是不是真的有多個裝置或模擬器。

adb devices
List of devices attached
emulator-5554 device
127.0.0.1:5555 device
發現還真是多個裝置,那就需要為ADB命令指定裝置的序列號了。
adb -s emulator-5554 shell

也就是如上所示,給命令加上-s的引數就可以了!

如果實際上只有一個裝置或模擬器,並且查到有offline的狀態;
那就說明是ADB本身的BUG所導致的,就需要用如下的方法處理下了:
adb kill-server
taskkill /f /im adb.exe
第一條命令是殺ADB的服務,第二條命令是殺ADB的程序!
如果第一條沒有用,才考慮用第二條命令再試試看的!

最後執行這句命令
設定代理
.\adb -s 127.0.0.1:5555 shell settings put global http_proxy 192.168.0.72: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


或者沒有delete命令時
adb shell settings put global http_proxy :0