Skip to content

Instantly share code, notes, and snippets.

@astrataro
Forked from tonyseek/android-captive.sh
Last active October 24, 2018 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astrataro/8611b8c76b194ccebb8aa9dfcf590a4e to your computer and use it in GitHub Desktop.
Save astrataro/8611b8c76b194ccebb8aa9dfcf590a4e to your computer and use it in GitHub Desktop.
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_http_url http://dl.google.com/generate_204"
adb shell "settings put global captive_portal_https_url https://dl.google.com/generate_204"
adb shell "settings put global captive_portal_fallback_url https://www.qualcomm.cn/generate_204"
adb shell "settings put global captive_portal_other_fallback_urls https://connect.rom.miui.com/generate_204,https://captive.v2ex.co/generate_204,https://developers.google.cn/generate_204,https://www.google.cn/generate_204"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment