Skip to content

Instantly share code, notes, and snippets.

@sharunkumar
Created February 7, 2020 07:08
Show Gist options
  • Save sharunkumar/b6195cbbd26a0039ec87fbd3829aa6b3 to your computer and use it in GitHub Desktop.
Save sharunkumar/b6195cbbd26a0039ec87fbd3829aa6b3 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
@myjunkjp
Copy link

exactly what I needed. Thanks

@ManuelGotzen
Copy link

great simple batch. thx

@VnmHnnS
Copy link

VnmHnnS commented Nov 17, 2023

Thank ♥

@ManuelGotzen
Copy link

Ya we'come

@1x12HD
Copy link

1x12HD commented Dec 27, 2023

Much appreciated!

@markettepigeon
Copy link

Be careful because on second generation Firesticks (Fire TV 4K MAX) the commands that allow you to change the DNS completely block your internet connection on all your connections.

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