LG V35 ThinQ WIFI去除感叹号


LGV35 安卓10(30d) 可用

原生安卓 Wi-Fi 去叉教程 – 知乎 (zhihu.com)

关于 android 5.0-7.1.2 网络图标上的感叹号及其解决办法 – 狐狸的小小窝 (noisyfox.io)

这个方法失效了

下载晨钟酱的搞机工具箱,里面有此功能

1. adb shell settings delete global captive_portal_http_url
2. adb shell settings delete global captive_portal_https_url
3. adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204
4. adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204

原理大概是这个,查看值可知使用的是miui的服务

adb shell "settings get global captive_portal_http_url"
  [SED]:
  adb shell "settings get global captive_portal_http_url"
  [RTN]:
  http://connect.rom.miui.com/generate_204
adb shell "settings get global captive_portal_https_url"
  [SED]:
  adb shell "settings get global captive_portal_https_url"
  [RTN]:
  https://connect.rom.miui.com/generate_204

去除叹号

1.完全屏蔽网络检查功能,最简单快速,但是就没有办法提示wifi登录:

adb shell "settings put global captive_portal_detection_enabled 0"

2.用国内的服务器替换掉google的服务器:

adb shell "settings put global captive_portal_server noisyfox.cn"

这个服务器是我自己建的,也就是本站:http://noisyfox.cn/ 我在服务器上写了个简单的204页面,网址是 http://noisyfox.cn/generate_204 只要用这个网址替换掉google的网址,就可以正常访问并检测网络状态了。不过由于本人的服务器速度并不快,所以感叹号还是会显示一小会儿的,不过应该很快就会消失。

恢复默认值

对于第一条指令,恢复默认只需要执行:

adb shell "settings put global captive_portal_detection_enabled 1"

或者

adb shell "settings delete global captive_portal_detection_enabled"

第二条指令的恢复直接delete即可:

adb shell "settings delete global captive_portal_server"

经过靠谱的确认,该修改方式具有持久性,重启依旧有效,除非刷机或者清除数据。

如何建立自己的服务器

  1. 对于apache服务器,如果你的服务器安装了rewrite模块,那么只需要在网站的.htaccess中加入以下代码:
<IfModule mod_rewrite.c>;
  RewriteEngine On
  RewriteCond %{REQUEST_URI} /generate_204$
  RewriteRule $ / [R=204]
</IfModule>;
  1. 对于nginx,直接加入以下设置即可:
location /generate_204 { return 204; }
  1. 如果以上方法都无效,那么就要利用代码中的一个小trick来完成,直接在网站的根目录下建立一个叫做“generate_204”的空文件即可,因为安卓的源码中写了如果返回的内容为空那么也会当成204(毕竟一个空的页面怎么想都不可能是登录页面嘛!)。

查看设置

adb shell "settings get global captive_portal_server"


[SED]:
adb shell "settings get global captive_portal_server"
[RTN]:
noisyfox.cn

发表评论