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