So here's the workaround (no root required):
1. Fully shielded network check function, the simplest and fastest, but there is no way to prompt the WiFi login:
adb shell "settings put global captive_portal_detection_enabled 0"
2. Replace the Google server with a domestic server:
adb shell "settings put global captive_portal_server xn--yet824cpd.xn--fiqs8s"
This server is built by me, that is, this station: HTTP//Little fox. China/I wrote a simple 204 page on the server, the URL is http://xn--yet824cpd.xn--fiqs8s/generate_204 Just use this URL to replace Google's URL, you can normally access and detect network status. However, because my server speed is not fast, so the exclamation point will still show a little while, but should soon disappear.
Original URL:
Http://www.noisyfox.cn/45.html
Solutions for the exclamation mark on Android 5.0 network icons