Skip to content

Instantly share code, notes, and snippets.

@binarycraft007
Forked from tonyseek/android-captive.sh
Created November 16, 2024 08:25
Show Gist options
  • Select an option

  • Save binarycraft007/0e004e6b0761466110b46d86abb73d0f to your computer and use it in GitHub Desktop.

Select an option

Save binarycraft007/0e004e6b0761466110b46d86abb73d0f 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
## I don't have any devices running Android OS now. These settings may have been outdated but I cannot verify it.
adb shell settings put global captive_portal_fallback_url http://g.cn/generate_204
adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204
adb shell settings put global captive_portal_other_fallback_urls http://www.qualcomm.cn/generate_204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment