Native support for Fire TV


As per the error message, the key file does not exist at the specified path. My guess is that in your docker container you mounted /volume1/docker/homeassistant/config at /config, and thus the proper adbkey would be:

adbkey: "/config/custom_components/media_player/android/adbkey"

Also, I would suggest not putting the adbkey files in the custom_components folder. Rather, I suggest creating an android or .android folder in your configuration directory and putting them there.


thanks @JeffLIrion and @Dixey that seems to have done the trick!


all working well - except the logs are flooded with this error:

Update encountered an exception; will attempt to re-establish the ADB connection in the next update


First, try setting get_sources to false. If the issue still persists, try setting get_source to false. See the third example configuration in the README for more details:

Explanations of the configuration variables can be found here:


This is pretty great, and 90% what I want.

The last 10% isn’t covered by a media_player object, but by a remote. Any chance you could convert this to use a adb client that connects to an adb server so this media_player doesn’t dominate the connection? Id like to be able to mkae a lovelace remote for my shield tv (which btw works quite well with this firetv implementation out of the box, you might want to broaden the scope of this project)


I’ll leave it to someone else to modify the component or the python-firetv package so that it can send the ADB commands to another server, or possibly run the commands using the adb binaries on its own system.

Regarding Android TV support, there is the pull request:

I also modified the python-firetv package and created a python-androidtv package (, and I submitted a pull request to a1ex4’s repo. I don’t have an Android TV, but I thought that might be helpful.


Running into the above issue while trying to get this working, anyone have any ideas?


Cannot get this to work…

Error message:
Couldn't connect to host:, error: Broken pipe
Could not connect to Fire TV at using adbkey='/config/android/adbkey'

My setup:
- platform: firetv
host: !secret firetv_host
adbkey: “/config/android/adbkey”

I don’t know why the preformatted text is not working…

Config files are in /config/android after I allowed USB-Connection on Fire Tv.

adb devices shows my attached Fire Tv. It says “device” after the ip.

Things I tried.

  • Restart HassIO
  • Restart FireTV Stick
  • Hard Reboot HassIO

Any advice?


Reboot your firetv/firestick. Seriously. :slight_smile:

Also, reboot the laptop you used to ADB connect to the firestick. ADB won’t normally release what you connected to and the firestick can only handle one ADB connection at a time.


Did it three times already…


Is your adbkey file (not folder) located at /config/android/adbkey/adbkey? If so, then that’s what should be in your configuration.


@JeffLIrion Thanks for this plugin.

My adb files are located at /config/android/. My mistake. Fixed it in my previous post.

Restarting my computer (the one is used to connect to the FireTv Stick via adb connect) fixed it. Thanks Dixey!


  1. Restarted my computer
  2. Restarted Fire Tv Stick
  3. Restarted HassIO
  4. FireTV is working as expected


This was not software/hardware acumen, it was painfully reliving my recent past.


I am really sorry that I have awakened these painful memories. I feel you.


tried both and still getting floods of the same in the log :frowning:


Try this component, which I’ve submitted as a pull request to HA:


no errors, just going to give it a whirl testing.

Any idea how i’d be able to tell an amazon fire cube to switch sources on the tv?

I have 2 sources configured and can use alexa on the fire cube to switch, wondering if i can do the same via HA. not really played with ADB much.


Here, the sources are apps on your Fire TV. I don’t have a Fire Cube, so I can’t play around with that, nor do I know if it’s possible.


ok cool - will have a play and report back - thanks again for your help (and building this!)


hey buddy, still bunch of these still in the logs with the latest version:

[custom_components.media_player.firetv] Failed to execute an ADB command; will attempt to re-establish the ADB connection in the next update

and confirming this in my configuration.yaml:

  get_sources: false
  get_source: false

Going to roll back to just one device and check its not one specific device.