原生安卓解决WiFi网络受限以及修改NTP服务器

解决网络受限

  1. 通过ADB命令的方式
1
adb shell settings delete global captive_portal_https_url
1
adb shell settings delete global captive_portal_http_url

再修改新的地址:

1
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate\_204
1
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate\_204

上面的不行再试试下面的

1
2
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 https://connect.rom.miui.com/generate_204

运行后断开手机连接,关闭 WiFi 重新打开就解决问题了。

  1. 修改NTP服务器
    执行以下命令后重启手机:
1
adb shell setprop persist.sys.timezone Asia/Shanghai
1
adb shell settings put global ntp_server ntp1.aliyun.com