原因
自Android 5.0起,谷歌引入了Captive Portal机制, 用于检测WiFi网络认证是否正常。 该机制默认检测访问的是谷歌服务器,需要科学才能正常访问谷歌服务器,如若没有WiFi就会出现网络受限的情况, WiFi图标上会出现一个感叹号标志,导致系统不能访问网络了。
1>使用ADB 工具,无需要root权限 ,输入下列命令
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://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_https_url http://connect.rom.miui.com/generate_204
2>切换一下飞行模式,再关闭飞行模式
参考