消除 已连接但无法访问互联网
因为手机刷的类原生系统联网时会向外网测试网络是否联通(懂得都懂),导致出现‘已连接但无法访问互联网’字样和时间同步问题,所以记录一下。
1.WIFI小叉叉消除
每次使用原生安卓,基本上都会碰到这个问题,因为这个WIFI可用性的测试点用的是Google的,但是Google因为一些原因被屏蔽了,所以无法访问测试点,导致显示网络连接受限
我们只要输入下面4行命令即可
//删除旧的监测点
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_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
2.时间同步问题
因为时间同步的服务器也是在国外的,所以我们也需要将其修改为国内NTP服务器,我们只需要在adb中输入以下内容即可
//设置中国时区
adb shell setprop persist.sys.timezone Asia/Shanghai
//设置NTP服务器
adb shell settings put global ntp_server ntp1.aliyun.com
文|心灵导师安德烈