How to Remove "No Network" Flag When You Are Using AOSP-like System in China
As is known to all, Google was blocked in China since 2014. And many AOSP(abbr. of Android Open Source Project) based Android distributions such as LineageOS use an Google.com domain in order to test if current device is connected to the internet. Here shows a method to fix it.
Android 7+
adb shell "settings put global captive_portal_http_url http://www.google.cn/generate_204"
adb shell "settings put global captive_portal_https_url https://www.google.cn/generate_204"
Android 6.x
adb shell "settings put global captive_portal_server http://www.google.cn/generate_204"
Or just disable network checking
adb shell settings put global captive_portal_detection_enabled 1
What’s more
Show all available options:
adb shell settings --user current list global
Translated from 如何消除原生 Android 原生网络连接显示 x 或者惊叹号