最近刷了 Linage 17,发现只要路由上代理连接不稳定就会判定 Wifi 离线,自动关闭手机的Wlan,很是头疼,遂 Google,得出以下方案。
首先下载 adb 工具(win版)
解压,在 adb 文件夹内 按住 shift 右键 在此次打开 power shell 或者 cmd窗口

Android手机 开启 开发者模式 开启 adb 调试 usb连接至电脑
./adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204

复制 粘贴 按回车,至此完成
可能出现的状况 出现 android adb unauthorized
关闭 开发者模式,adb 调试,重新打开再试
你可以使用./adb devices
查看 adb是否连接成功。