刷国外的安卓系统,原生的,有时候是比较干净或者为了一些游戏应用必须为之。
但是你会发现,刚装好,连上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_detection_enabled 0
老安卓系统
adb shell settings put global captive_portal_server connect.rom.miui.com
如果还有其它问题请留言。