Home Assistant Community Add-on: ADB - Android Debug Bridge

Well I have a daughter which is asking to watch the very same movie every now and then haha.

But I guess a similar command might allow to open a playlist

In the ADB add-on log I get:

Error: could not install smartsocket listener: Address already in use
ADB server didn’t ACK

  • daemon not running. starting it now on port 5037 *
  • failed to start daemon *
    error: cannot connect to daemon
    [20:21:08] INFO: Connecting to device: 192.168.1.xx…
    connected to 192.168.1.xx:5555

When I press any button nothing happens…

Im looking to get the screen state as a sensor?
Is it possible to know if lets say that the android is in sleep mode or something?

Anyone knows why this occurs:
" Error: could not install smartsocket listener: Address already in use
ADB server didn’t ACK

  • daemon not running. starting it now on port 5037 *
  • failed to start daemon *
    error: cannot connect to daemon
    [20:21:08] INFO: Connecting to device: 192.168.1.xx…
    connected to 192.168.1.xx:5555"

I tried everything, my remote seems to be creating the shield state as shield_3 (how can I delete shield, shield1, shield2 so that it starts from scratch), maybe that is why it’s having this issue…

Used the code from @mcfrojd github replaced entity: media_player.shield and entity_id: media_player.shield to entity: media_player.shield_3 and entity_id: media_player.shield_3 but none of my buttons work when pressed (no error shows up but nothing happens).

What version of hassio are you running?
First of all you need to get the adb addon to run without errors.
Try to stop all your other addons, restart adb and check the log, maybe one other addon uses a port that adb needs.
I run adb on port 8037 because the port 5037 was used of another addon.

I think the appended “_3” is because the previous Android TV integration created entries in the device registry. Try going to Configuration > Entity Registry and deleting the media_player.shield* entries, then restart.

  • When the device is completely off (no power supply and hence no ADB connection), the state is unavailable.
  • When the device is asleep but not totally off and the ADB connection is intact, the state is off.
  • When the device is in screensaver mode, the state is idle.
  • Otherwise, the state is standby, playing, or paused.

Some of this might not hold true for the current release’s component, but it will hold true in the next release.

1 Like

How would I go about changing the port?

2019-03-24%2021_32_15-Home%20Assistant

Ok I tried that before but it didn’t fix the error. Going to try again. Funny my buttons with shortcuts work ( YouTube, Netflix, emby) but none of the others. Trying to figure it out now…

After changing the port to 8037 I still get the error I posted earlier but now I also get this error when I press any button including the shortcut buttons that worked earlier:

Failed to call service androidtv/adb_command. ERROR: connecting to 127.0.0.1:5555 [Errno 111] Connection refused. Is adb running on your computer?

What does your mediaplayer settings look like?
This is mine:

---
############################################################################
## Control Nvidia Shield TV
## Use adb-addon from Community Addons
############################################################################
media_player:
  - platform: androidtv
    host: 192.168.111.11
    name: Shield
    adb_server_ip: 127.0.0.1
    adb_server_port: 8037
    apps:
      "org.xbmc.kodi": "Kodi"
      "com.netflix.ninja": "Netflix"
      "com.spotify.tv.android": "Spotify"
      "com.google.android.tvlauncher": "Homescreen"
      "com.google.android.youtube.tv": "Youtube"
      "tv.twitch.android.app": "Twitch"
      "se.svt.android.svtplay": "SVT Play"
      "se.tv4.tv4playtab": "TV4 Play"

Is it possible to start Kodi live tv with adb?

yes just like that but with my shields ip in host.

I keep getting:

error: could not install smartsocket listener: Address already in use

  • daemon not running. starting it now on port 5037 *
  • daemon started successfully *
    connected to 192.168.1.35:5555

Even though it’s 8037 now…

1 Like

Did you try stop all other addons and restart adb.
If you still get that same error message i have no idea.

So all seems working now but for some reason I can see the remote only on my Windows PC, I get this error on my phones and tablets:

https://imgshare.io/image/2019-03-26-8-49-51.HZFaO

Something to do with layout-card but like I said it’s all good on my Windows PC, this error only shows up on my mobile devices.

Ok, might be a cache error, missing custom card or something.
But that problem has nothing to do with the ADB add-on, so you have to try to get help in another thread.

1 Like

Yup, checking into it, thanks for your help @mcfrojd!

1 Like

Another issue that occurs randomly. I keep losing the media_player.shield after some restarts, how can I get it back? Sometimes I have to reboot/restart several times until it shows up…

some times when i restart my homeassitant by turning it off and on or either by rebooting hassio from its system
i get this error

[09:08:02] INFO: Starting the Android Debug Bridge server…
error: could not install smartsocket listener: Address already in use
[09:08:04] INFO: Starting the Android Debug Bridge server…
error: could not install smartsocket listener: Address already in use
[09:08:05] INFO: Starting the Android Debug Bridge server…
error: could not install smartsocket listener: Address already in use

after restarting adb addon
[09:09:12] INFO: Starting the Android Debug Bridge server…
error: could not install smartsocket listener: Address already in use
ADB server didn’t ACK

  • failed to start daemon *
    error: cannot connect to daemon
  • daemon not running. starting it now on port 5037 *
    [09:09:14] INFO: Connecting to device: xxx.xxx.xxx.xxx…
    connected to xxx.xxx.xxx.xxx:5555
    [09:10:44] INFO: Connecting to device: xxx.xxx.xxx.xxx…
    already connected to xxx.xxx.xxx.xxx:5555