手机连接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
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://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
如果手机访问不了网络,或网页打开开不了,可能是手机时间上不对,通过下面方法可解决:
- 关闭手机自动校准时间,手动将时间改对
- adb shell "settings put global ntp_server pool.ntp.org"
也可以改为国内时间服务:cn.pool.ntp.org