Native support for Android TV / Android devices

I am not sure what I did - but i was able to get this to work, so please disregard.

Hi,

I am trying to make media_player entity by standard androidtv integration

media_player:
  - platform: androidtv
    name: Samsung Tablet
    host: 192.168.1.71

But I am unable to get media_player.samsung_tablet entity.
Any hints?

What do you have in your logs ?

[13:57:47] INFO: Starting the Android Debug Bridge server...
[13:57:48] INFO: Connecting to device: 192.168.1.71...
unable to connect to 192.168.1.71:5555: Connection refused

And why on port 5555? In configuration I do have:

image

What did you put in you config.yaml for the android tv platform ? :slight_smile:

media_player:
  - platform: androidtv
    name: Tablet A
    host: 192.168.1.71
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037
  - platform: androidtv
    name: Tablet B
    host: 192.168.1.72
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037

(of course both devices do have Connection refused error)

USB debugging activated and key confirmed? :wink:

1 Like

Activated on both. Also ports opened on routers (most probably completely unnecessarily).
But… what key?:slight_smile:

You have to accept the connection between your hassio instance and your android device.

Please try :

  1. revoke all debug authorizations on your android device (developer mode)
  2. restart your android devices
  3. restart HASSIO
  4. when hassio is restarted, you should have a confirmation on your android devices to accept the connection.

Done. No confirmation on Android.

But still, isn’t it important that:

  1. it is trying to connect on port 5555 and
  2. what is most mystic to me, that I have no entity media_player.tablet_a?
1 Like

And in the addon config ? Can you show us ? :slight_smile:

Are you sure about the IPs ? Are they fixed ? :slight_smile:

100%
And I see them on router as active

Can you manage to connect through ADB ? I mean with a cmd line and the ADB debug tool (outside of hassio) ?

You can try with adb tool (https://forum.xda-developers.com/attachment.php?attachmentid=4623157&d=1540039037) and the cmd : adb connect 192.168.1.71

after first execution adb connect 192.168.1.71

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
unable to connect to 192.168.1.71:5555

second

empty host name

third

unable to connect to 192.168.1.71:5555

Ping
image

Are you sure you had this on your android device ?

image
but no RSA key

The integration should have generated one for you. Did you already have a key ?

Could you please tell me in which step I should get it?