# 查询状态 adb shell settings get global captive_portal_server # 启用 adb shell settings delete global captive_portal_server # 禁用(不会主动判断当前网络是否需要登录,需要手动打开网页触发登录页面) adb shell settings put global captive_portal_server 0
修改服务器地址
1 2 3 4 5 6
# 查询当前地址 adb shell settings get global captive_portal_server # 恢复默认地址(原生ROM为Google) adb shell settings delete global captive_portal_server # 设置地址到MIUI adb shell settings put global captive_portal_server connect.rom.miui.com
# 查询状态 adb shell settings get global captive_portal_server # 删除(恢复默认) adb shell settings delete global captive_portal_server # 禁用(不会主动判断当前网络是否需要登录,需要手动打开网页触发登录页面) adb shell settings put global captive_portal_server 0
设置HTTPS开关
1 2 3 4 5 6
# 查询HTTPS开关状态 adb shell settings get global captive_portal_use_https # 启用HTTPS(直接删除则默认使用HTTPS) adb shell settings delete global captive_portal_use_https # 禁用HTTPS(写1启用 写0禁用) adb shell settings put global captive_portal_use_https 0
修改服务器地址
1 2 3 4 5 6
# 查询当前地址 adb shell settings get global captive_portal_server # 恢复默认地址(原生ROM为Google) adb shell settings delete global captive_portal_server # 设置地址到MIUI adb shell settings put global captive_portal_server connect.rom.miui.com
# 查询状态 adb shell settings get global captive_portal_server # 启用 adb shell settings delete global captive_portal_server # 禁用(不会主动判断当前网络是否需要登录,需要手动打开网页触发登录页面) adb shell settings put global captive_portal_server 0
设置HTTPS开关
1 2 3 4 5 6
# 查询HTTPS开关状态 adb shell settings get global captive_portal_use_https # 启用HTTPS(直接删除则默认使用HTTPS) adb shell settings delete global captive_portal_use_https # 禁用HTTPS(写1启用 写0禁用) adb shell settings put global captive_portal_use_https 0
修改服务器地址
1 2 3 4 5 6
# 恢复默认地址 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
7.1.2 - 9.0
此版本服务器地址判断逻辑相比7.1.1没有更改,但是检测开关变了。
打开检测开关
1 2 3 4 5 6
# 查看当前状态 adb shell settings get global captive_portal_mode # 启用检测 adb shell settings delete global captive_portal_mode # 关闭检测 adb shell settings put global captive_portal_mode 0
设置服务器地址
1 2 3 4 5 6
# 恢复默认地址 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