1.问题分析
经常使用谷歌的手机测试,发现它连接WiFi后总会提示"无法连接互联网",后来发现它是先去访问了谷歌的服务器,由于墙的原因访问不了,所以就提示"无法连接"(导致WiFi自动连接失效)
2.解决方法
替换验证网络是否连接的服务器地址,原本是
http://clients3.google.com/generate_204,替换成国内验证服务器
adb shell settings put global captive_portal_use_https 1
adb shell settings put global captive_portal_http_url http://204.ustclug.org
adb shell settings put global captive_portal_https_url https://204.ustclug.org
adb shell settings put global captive_portal_mode 0