刷国外安卓android系统能连上wifi但提示无法访问互联网

刷国外的安卓系统,原生的,有时候是比较干净或者为了一些游戏应用必须为之。

但是你会发现,刚装好,连上wifi,却提示你 无法访问网络,其实没毛病。

因为国外版本总是以谷歌服务器为检测,要知道,在大陆这谷歌是打不开的,所以自动检测后,误判为你没网络。

http://www.google.com/generate_204

其实安卓5.0以上系统的网络检测机制是通过访问一个网页,假如返回网页状态码为204那么网络是正常的,如果是200状态码,表示这是一个登录页。

那么,我们就通过adb修改一下可访问的检测网页来实现。这里我们以小米的为例。

安卓7系统以上有效

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 http://connect.rom.miui.com/generate_204

如果不行,换这个

adb shell settings put global captive_portal_use_https 1
adb shell settings put global captive_portal_http_url http://204.ustclug.org
adb shell settings put global captive_portal_https_url https://204.ustclug.org
adb shell settings put global captive_portal_mode 0

或者禁用检测机制

adb shell settings put global captive_portal_detection_enabled 0

额外修改dns为中国常用

adb shell setprop net.eth0.dns1 114.114.114.114

adb shell setprop net.eth0.dns2 223.5.5.5

老安卓系统

adb shell settings put global captive_portal_server connect.rom.miui.com

如果还有其它问题请留言。

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注