Third-party captive portal detection endpoints used by stock Android were unreliable in China. Hosting our own check is a durable fix.

One-shot adb setup

adb shell settings put global captive_portal_detection_enabled 1
adb shell settings put global captive_portal_use_https 1
adb shell settings put global captive_portal_https_url https://204p-1p.api.zhis.ltd

The URL should return a response Android treats as “no portal required” when the network is open. Adjust the hostname if you mirror the service elsewhere.