Android 7.0以后的的版本:
adb shell "settings put global captive_portal_http_url http://www.google.cn/generate_204"
adb shell "settings put global captive_portal_https_url https://www.google.cn/generate_204"
android 7.0 之前的版本:
adb shell "settings put global captive_portal_serverhttp://www.google.cn/generate_204"
還可以可以輸入如下命令, 禁止檢測(cè)網(wǎng)絡(luò)連接狀態(tài):
adb shell settings put global captive_portal_detection_enabled 1
輸入如下的命令查看所支持的所有選項(xiàng):
adb shell settings list global