去除洋垃圾和海外原生系统状态栏网络检测服务的叹号和叉号
服务器端nginx响应配置文件代码:
location =/generate_204{
# Used for load balancer health checks 返回手机状态检查值
return 204 "OK";
}
域名需要ssl证书且使用https://地址进行联网状态验证
先删除默认的地址:
adb shell settings delete global captive_portal_https_url
adb shell settings delete global captive_portal_http_url
删除(删除默认用 HTTPS )
adb shell settings delete global captive_portal_https_url
adb shell settings delete global captive_portal_http_url
删除变量:(删除以后默认启用)
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
自建状态检测服务器地址:
adb shell settings put global captive_portal_http_url http://qylx.uno/generate_204
adb shell settings put global captive_portal_https_url https://qylx.uno/generate_204
另附其他状态检测服务器地址:
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_http_url http://developers.google.cn/generate_204
adb shell settings put global captive_portal_https_url https://developers.google.cn/generate_204
删除(删除默认用 NTP 服务器 )
adb shell settings delete global ntp_server
设置一个可用的 NTP 服务器(此处为 Apple 公司在亚洲的 NTP 服务器)
adb shell settings put global ntp_server time.asia.apple.com
确保「Use network-provided time 使用网络提供时间」和「Use network-provided timezone 使用网络提供的时区」2 个选项已启用,然后重新开关一次飞行模式应该就可以了。
参考:
(类)原生 Android 网络去叉/叹号 Android 5.0+
如何消除原生Android网络状态上的惊叹号
修改 Android 探测网络状态所用的服务提供者
关于 android 5.0-7.1.2 网络图标上的感叹号及其解决办法
comment 评论区
star_outline 咱快来抢个沙发吧!