Enable USB debugging on your phone#
Settings-About phone-Version number, continuously click to enable developer mode, enter developer options and turn on USB debugging.
Configure adb on Windows#
Extract to the root directory of the C drive (non-beginners can choose freely)
Modify system environment variables
Add adb directory
Start operation#
Connect your phone to the computer, then enter the following commands in the terminal:
adb shell settings put global captive_portal_use_https 1
adb shell settings put global captive_portal_http_url http://204.ustclug.org
adb shell settings put global captive_portal_https_url https://204.ustclug.org
adb shell settings put global captive_portal_mode 0
After completion, switch your phone to airplane mode and then back, everything should be OK.