Skip to content

Instantly share code, notes, and snippets.

@vcheckzen
Created June 27, 2024 18:02
Show Gist options
  • Save vcheckzen/1a49951a778ae364b4dd9127c1f77b4b to your computer and use it in GitHub Desktop.
Save vcheckzen/1a49951a778ae364b4dd9127c1f77b4b to your computer and use it in GitHub Desktop.
Android set NTP and CPD servers.
#!/bin/sh
# NTP
adb shell settings put global ntp_server ntp.aliyun.com
# CPD
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_use_https 1
adb shell settings put global captive_portal_detection_enabled 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment