Skip to content

Instantly share code, notes, and snippets.

@bzkdjc
Forked from sharunkumar/adb-dns.bat
Created June 24, 2022 05:19
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 bzkdjc/ac9f91e8032bc3abe7fef566191b7707 to your computer and use it in GitHub Desktop.
Save bzkdjc/ac9f91e8032bc3abe7fef566191b7707 to your computer and use it in GitHub Desktop.
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment