Community Add-on: ADB - Android Debug Bridge

Tags: #<Tag:0x00007fd073df6ee8> #<Tag:0x00007fd073df6d80>


Thanx, it works!!!

And thanx to @teachingbirds for the remote code (from Github)!


It works here with this config

service: media_player.androidtv_key
    entity_id: media_player.shield_tv
    key: 'KEYCODE_ENTER'

Make sure to use media_player.androidtv_key as service.


I cannot get Plex to start. What intent do you use? i use


i cannot get it to work.


I have this entities:
Where can I add it, can’t find where hassio stores all the other entities…


See my previous comment if you just want it to work without messing around too much. In short, the intent you want is (including the leading semicolon)

; am start -a android.intent.action.MAIN -c android.intent.category.LEANBACK_LAUNCHER -n

The better way is in my followup comment but requires a modified (here).

Really, you should use one of those methods for every app if you’re launching via an activity. The “-n” flag doesn’t really get handled the way I thought it did and the fact that it works for most apps is just luck.

127|once:/ $ pm list packages | sed -e "s/package://" | while read x; do cmd package resolve-activity --brief $x | tail -n 1 | grep -v "No activity found"; done
y --brief $x | tail -n 1 | grep -v "No activity found"; done                  <

So the HD HomeRun package is com.silicondust.view/.App But im not sure how to find out what to send to it, to go to a specific channel?

Or can I use the inbuilt android TV Channels thing and send intents to that? Im not sure how to find the intents either for that…


I’ve been looking into doing the Live Channels and honestly can’t figure it out. The best I’ve gotten is opening the app with


I can get it to go to channel 1 with


but no other channels seem to work.

You can also open (and close) the program guide with


That’s as far as I was able to get. I think the other way would be to just have a script that opens the app, types in the channel number, and hits enter.

  alias: "NASA Live Channel"
  - service: script.live_channels
  - delay:
      milliseconds: 250
  - service: media_player.androidtv_key
      entity_id: media_player.shield_tv
      key: 13
  - service: media_player.androidtv_key
      entity_id: media_player.shield_tv
      key: 11
  - service: media_player.androidtv_key
      entity_id: media_player.shield_tv
      key: 10
  - service: media_player.androidtv_key
      entity_id: media_player.shield_tv
      key: 66

The script.live_channels just opens up the live channels app. I use a modified custom component to send the ADB command to start, but any way that gets the app opened should work.


Amazing job. Thank you for sharing this. I use most of your config for the shield and it works very well.


Anyone else having issues after 0.88 with loading the custom component?


Checking the config with addon I get this. Dont know how to solve it though.

Failed config
General Errors:
- Platform not found: media_player.androidtv
- Platform not found: media_player.androidtv


Yeah same for me after 0.88.0


Here is the migration guide for custom components:
Hope it helps, I plan to upgrade to 0.88 soon.


I havent upgraded yet. Just checked with addon to see what issues I would get. Fixed all but mentioned adb addon.


Tried to follow the guide and changed the directory to custom_components/androidtv/ but still doesn’t work. Something I have missed?


I have just recently updated to 0.87.1 and moved the component to this structure:
also added an empty file to the same folder.

The media player entity was created as before but its state was unknown. A restarted hassio host and after just sent an intent to start kodi and the media player state with attributes became available again.

I am using the latest from here:
(changed 7 days ago)


Thanks! Downloaded the latest version and now everything seems to work again!


You downloaded the latest Androidtvpy. What else did you do to get it working with 88.0?


I also did this


I did this but I’m still getting the error. I have also updated it to the most recent version.


Thanks! Works great!