進入安裝目錄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.56.1:8888
or
adb shell settings put global http_proxy 192.168.56.1: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