Skip to content

Instantly share code, notes, and snippets.

@sharunkumar
Created February 7, 2020 07:08
Show Gist options
  • Select an option

  • Save sharunkumar/b6195cbbd26a0039ec87fbd3829aa6b3 to your computer and use it in GitHub Desktop.

Select an option

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
@IsHacker003
Copy link
Copy Markdown

What if I want to make the dns read-only , I mean such that it can't be changed from mobile at least

You can't, you will need root for that.

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