Skip to content

Instantly share code, notes, and snippets.

@iamtalhaasghar
Last active September 14, 2025 14:47
Show Gist options
  • Save iamtalhaasghar/8272c891e34665782e352054cee678ae to your computer and use it in GitHub Desktop.
Save iamtalhaasghar/8272c891e34665782e352054cee678ae to your computer and use it in GitHub Desktop.
set custom private dns on smart tv

It works the best with DNS-over-TLS and I've done it on an Android TV and Shield TV Pro.

You need to enable developer options first (Android settings on TV > About > scroll down to Build and click on that several times). A new "developer options" section will show, and here you need to enable USB debugging. After that run some commands over ADB from a PC/Mac. To get the ADB executable see here: https://www.xda-developers.com/install-adb-windows-macos-linux/.

Basically after you enable debugging, you connect using the IP of the TV and allow the connection on the TV:

adb connect 192.168.x.x

to disable private dns

adb shell settings put global private_dns_mode off

to enable private dns with hostname

adb shell settings put global private_dns_mode hostname

adb shell settings put global private_dns_specifier Your--Device-bxxxxx.dns.nextdns.io

This will override and DNS from the network settings. After setting this up you can turn of developer options.

ref: https://www.reddit.com/r/nextdns/comments/18dd4ok/setup_on_android_tv/

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