GuidePublished: 5 min read

How to Control an Android TV or Google TV with ADB

Turn on ADB on an Android TV, Google TV or Fire TV, connect over your network, and control it with remote keys, typed text and a live screen from your browser.

Android TV, Google TV and Amazon Fire TV all run Android, so the same ADB tools you use on a phone work on a television. Once ADB is on, you can press remote keys from your keyboard, type into search boxes, open apps, take screenshots and install APKs, all from your computer. This guide covers the setup and the everyday ways to control the TV.

What you need

  • A TV or streaming box running Android TV, Google TV or Fire OS
  • A computer on the same home network as the TV
  • Either Android platform-tools (adb) or ADBKit in Chrome or Edge with the small ADBKit agent

Most TVs cannot use a USB cable to a computer. Their USB ports are made for flash drives and keyboards, not for debugging. So with a TV you almost always connect over the network.

Step 1: Turn on Developer options

The menu names differ a little between brands, but the idea is the same as on a phone: find the build number and select it seven times.

Android TV and Google TV (Sony, TCL, Philips, Xiaomi, Chromecast with Google TV and others):

  1. Open Settings › System › About. On older Android TV versions it is Settings › Device Preferences › About.
  2. Scroll to Android TV OS build (or Build) and press OK on it seven times.
  3. A message tells you that you are now a developer.

Fire TV:

  1. Open Settings › My Fire TV › About.
  2. Select the device name (for example "Fire TV Stick 4K") seven times.
  3. Developer options now appears under My Fire TV.

Step 2: Turn on ADB debugging

Open the new Developer options menu and switch on USB debugging (Fire TV calls it ADB debugging). Some models also show a separate Network debugging switch. If you see it, turn it on too.

On Fire TV and on most Android TV and Google TV devices, the TV now accepts ADB connections over the network on port 5555. You do not need the adb tcpip step that a phone needs, because there is no cable to start from. Some newer Google TV models also offer Wireless debugging with a pairing code, which works the same way as on an Android 11 phone.

Step 3: Find the TV's IP address

  • Android TV / Google TV: Settings › Network & Internet, then select the connected network. The IP address is listed there.
  • Fire TV: Settings › My Fire TV › About › Network.

It looks like 192.168.1.42. Giving the TV a fixed address in your router (a DHCP reservation) saves you from looking it up again after a restart.

Step 4: Connect and allow the computer

With platform-tools:

adb connect 192.168.1.42:5555
adb devices

The TV shows an Allow USB debugging? dialog with your computer's key fingerprint. Use the remote to tick Always allow from this computer and select OK. Until you do, adb devices lists the TV as unauthorized.

With ADBKit, start the ADBKit agent on your computer, open the workspace, choose TCP/IP, type the TV's address and click Connect. Accept the same dialog on the TV, and the TV screen appears in your browser tab.

Step 5: Control the TV

From the browser

In ADBKit, click the TV screen once to give it the keyboard, then:

  • Arrow keys move the focus like the D-pad on the remote
  • Enter selects (the OK button)
  • Esc goes back
  • Typing letters enters text into a search box or login field

TV apps are built for the remote, not for touch, so the arrow keys work better than clicking. Mouse clicks are sent as touches, and many TV apps ignore them or react only in some places. The Home, Back and volume buttons under the screen work the same as on a phone.

From the command line

Every remote button has a key code you can send with adb shell input keyevent:

adb shell input keyevent KEYCODE_DPAD_DOWN
adb shell input keyevent KEYCODE_DPAD_CENTER
adb shell input keyevent KEYCODE_HOME
adb shell input keyevent KEYCODE_MEDIA_PLAY_PAUSE

To type into a focused search box:

adb shell input text "lofi%smusic"

%s stands for a space. The Android TV ADB commands list has the full set of remote keys, app launch commands and power controls.

Screenshots and recordings

Screenshots work as usual with adb exec-out screencap -p > tv.png, or with one click in ADBKit. Expect a black picture while protected video plays. Netflix, Disney+ and most paid streaming apps block screen capture of their video, on a TV just like on a phone, and mirroring shows black there for the same reason. Menus, settings and your own apps capture normally.

Turn it off when you are done

An open ADB port on a TV is an open door for anyone on the same network who can get past the authorization dialog. When you finish:

  • Switch off USB debugging / ADB debugging in Developer options, or
  • Where your TV offers it, use Revoke USB debugging authorizations in Developer options to forget every computer you allowed

Do not leave ADB on if the TV sits on a shared or public network, such as in a hotel, an office or a shop display.

Troubleshooting

  • failed to connect or Connection refused: ADB debugging is off, the TV went to sleep, or you have the wrong IP. Wake the TV, check the address and try again.
  • unauthorized: the dialog on the TV was dismissed or timed out. Run adb disconnect, connect again and accept it with the remote.
  • The dialog never appears: some TVs only show it while the home screen is open. Press Home on the remote, then reconnect.
  • The connection drops after a while: many TVs cut the network in standby. Turn off network standby or "quick start" power saving if you need the TV reachable all the time.

For installing your own apps on the TV, continue with installing APKs on Android TV and Fire TV.