原生安卓去除网络叉号
时间:2019-01-16 14:22:48
收藏:0
阅读:2906
适用于Android7.0+,需要使用ADB调试,相关教程自己查找
- 检测开关
删除变量:(删除以后默认启用) adb shell settings delete global captive_portal_mode 关闭检测: adb shell settings put global captive_portal_mode 0 查看当前状态: adb shell settings get global captive_portal_mode
- 服务器地址相关
删除(删除默认用HTTPS) 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
下面了解一下相关知识:
Captive Portal是安卓5引入的一种检测网络是否正常连接的机制,通过HTTP返回的状态码是否是204来判断是否成功。如果连接超时(根本就连接不上)就在WiFi图标和信号图标上加一个标志“叉号”。
默认访问的是谷歌自家的验证服务器,然而由于GFW的原因,即使你连接上了网络也连不上这个服务器。国内的修改版ROM通常都改成了高通中国的地址。
评论(0)