老生常谈,新手机重新配置用,不去掉部分情况下在有无线网的时间仍然会跑移动数据;旧方法在Android10上同样生效。
环境:Windows
参考:原生安卓WiFi信号去叹号去叉教程5.0-Android P
事前准备
下载adb
adb shell
,打开终端(3c toolbox等软件里有)直接从settings开始输入即可;不过有root直接找相关软件不是更方便吗(
https://developer.android.com/studio/releases/platform-tools
(可能无法访问,有空附上云盘链接)
手机打开USB调试并授权
开发者选项里,不了解请自行百度,打开后连接电脑并同意USB调试。
启动ADB
由于大部分人很少使用ADB,就不进行PATH配置了。解压下载好的压缩包,在根目录shift+右击选择“在此处打开Powershell窗口”即可,如图。
因为未配置环境变量,所以每条命令前需要加上 .\
。
需要的命令
.\
删除变量&关闭检测
.\adb shell settings delete global captive_portal_mode
.\adb shell settings put global captive_portal_mode 0
执行上述两条命令中,可能会出现
*daemon not running; starting now at tcp:5037
*daemon started successfully
证明adb已经成功连接上手机(TCP端口不一定相同),无影响。
执行.\adb shell settings get global captive_portal_mode
,返回结果应为0
。
删除并修改验证服务器
这里修改为小米的验证服务器,在国内应该是延迟最低的。
.\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
测试
完成后,断开手机和计算机的连接,打开飞行模式稍等后关闭,WiFi图标上的叹号/叉号即消失。
楼主,其实安卓有国内网站的,只要把com改成cn就是安卓中国了,还望采纳