通过 adb 修改 Android 系统时区、NTP 服务器、Captive Portal 服务器

时区与 NTP 服务器

在 Adb Shell 中执行以下命令:

1
2
3
setprop persist.sys.timezone Asia/Shanghai  # 中国时区
settings put global ntp_server ntp1.aliyun.com # NTP 服务器
reboot # 重启联网自动校时

NTP 服务器列表:Public NTP Server

Captive Portal 服务器

在 Adb Shell 中执行以下命令:

1
2
3
4
5
6
# 删除默认的地址
settings delete global captive_portal_https_url
settings delete global captive_portal_http_url
# 添加新的地址
settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
settings put global captive_portal_https_url http://connect.rom.miui.com/generate_204

所有 Captive Portal 服务器汇总:检测网络联通性&generate_204服务汇总与评测