通过 ADB 命令修改安卓手机的联网测试网址,首先连接手机并启用 USB 调试。使用以下命令修改测试 URL:
adb shell settings put global captive_portal_http_url
http://www.google.cn/generate_204adb shell settings put global captive_portal_https_url
https://www.google.cn/generate_204验证修改成功:
adb shell settings get global captive_portal_http_url
adb shell settings get global captive_portal_https_url
重启手机,确保设置生效。这样,手机的联网测试将使用谷歌中国的 URL。