非ROOT设备使用这个方法在本机上完结所有更改Captive Portal的操作,解决Pixel在国内连接WiFi时显示感叹号的问题。

接下来依次输入以下命令
adb shell settings delete global captive_portal_https_url
adb shell settings delete global captive_portal_http_url
adb shell settings put global captive_portal_http_url http://captive.v2ex.co/generate_204
adb shell settings put global captive_portal_https_url https://captive.v2ex.co/generate_204
改完后切换一次飞行模式后关闭,让网络重新连接即可。
上述v2ex地址也可以改成小米的
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
当然,你也可以选择关闭Captive Portal检测
adb shell settings put global captive_portal_mode 0
改回默认模式
adb shell settings put global captive_portal_mode 1