Tutorial: How To Enable Private DNS in Chromecast with Google TV

What we need:

  1. Android Phone (No PC required).
  2. Remote ADB Shell app from PlayStore.
  3. DNS-over-TLS (DoT) Address.
  4. Google TV is connected to the same Wi-Fi network.

Steps:

  1. Activate ADB from Google TV. Tap Menu button on the remote and go to Settings / Device Preferences / About / Status / Build and click on it seven times until you see "You are developer now" notification.
  2. Go back to Menu and go to Settings / Device Preferences / Developer Options and turn on USB debugging.
  3. Grab your phone and install Remote ADB Shell from Google PlayStore.
  4. Run the app and type the IP of your Google TV. Usually like 192.168.1.x .
  5. Allow the connection from Google TV remote, you'll see a popup on the TV.
  6. Copy and paste the codes steps 7 and 8, one at a time.
  7. settings put global private_dns_mode hostname
  8. settings put global private_dns_specifier 1dot1dot1dot1.cloudflare-dns.com
    1. Replace 1dot1dot1dot1.cloudflare-dns.com with any DoT address from the service provider of your choice.
  9. Use the command adb shell settings get global private_dns_mode to check that the private DNS server is set up correctly.
  10. Deactivate Developer Options by going to Settings / Device Preferences / Developer Options and click Enable developer options toggle.


Disable Private DNS:

  1. Follow steps 1 to 6 and type / copy paste:
  2. settings put global private_dns_mode off
  3. Deactivate Developer Options by going to Settings / Device Preferences / Developer Options and click Enable developer options toggle.

Troubleshooting:

Remote ADB Shell cannot connect?

Try to select "MTP" from Select USB Configuration, the default value is "Charging".
Some user reports claim this step is required for Mi Box to enable port 5555 otherwise ADB connection will fail. This change might be required if you connect your Box to your PC with a USB Cable.

ADB Shell throws permission errors?

Go to Settings / Device Preferences / Developer Options
and select Revoke USB debugging authorizations and try again.

Reference: Reddit