问题产生的原因:海外机器会使用wifi向服务器发送请求,用于校验wifi状态
解决办法:修改校验服务器地址
1. 确认电脑上装了adb
2. 挨个执行以下命令
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
3. 执行完,切为飞行模式,再切换回来就好了
另外,如果app访问不了网络,或网页打开有问题,可能是手机时间不对,两种解决方法:
设备获取时间的服务器
1. adb shell "settings put global ntp_server pool.ntp.org"
2. 关闭自动校准时间,手动将时间改对