Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Overrides the captive portal settings of Android in the People's Republic China Mainland
#!/usr/bin/env sh
adb shell settings put global captive_portal_fallback_url
adb shell settings put global captive_portal_http_url
adb shell settings put global captive_portal_https_url
adb shell settings put global captive_portal_other_fallback_urls
Copy link

jacoblyw commented Oct 29, 2021

Not in China, but I had the "no internet" WiFi icon when the tablet came back from having the screen repaired. Internet worked, but automatic connections to WIFi didn't.

And then [recently] I started getting "open captive portal" messages

connect with adb shell:
adb shell

use superuser:

Check what setting is set (just out of curiosity):
settings get global captive_portal_server

I didn't bother with any of the fallback or http/https settings, I just did the following setting:
settings put global captive_portal_server ""

and it worked! That's a relief!

Thanks to everyone for pointing me in the right direction. (I also got some hints on the URL to use on, but I don't have enough reputation to post there.)

Copy link

escape0707 commented Oct 30, 2021

@jacoblyw That seems to be a quite scammy website. I highly suggest you to flash your whole system, including recovery and boot loader if you could.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment