Community Hass.io Add-on: ADB - Android Debug Bridge

hassio-repository
hassio-addon
Tags: #<Tag:0x00007fd075b3aa18> #<Tag:0x00007fd075b3a8b0>

#102

My player has DNLA_DMR which would be the best way to go??


#103

Not sure what to do with that, I did try one where I had to create a android tv folder in custom components folder is this the same?


#104

Check this if it’s set your problem,
Jeff Lirion is working on this component
Thanks to him for this


#105

@Molodax is right, the state detection logic is the same. Hopefully he’s also right that the community will help to develop and improve it. I created an issue for this: How to help with state detection!

Pull requests are welcome!


#106

Thanks but I am not sure how or where to install,


#107

you need to copy this files in your custom_components/androidtv/


and after doing this restart your homeassitant
it will take time to download dependencies so wait for sometime when loading.


#108

Thanks appreciate the help


#109

Sorry but could i get an explanation for dummys version.

My Hassio is running on a Ubuntu 18.0.4 LTS server
I have installed ADB - Android Debug Bridge add-on and that is working fine.
I even got the multiremote nVidia part working.

Now i would like to get a list of my apps/intents on my nVidia Shield so i could control them?

Is it possible to connect from my mac to my nVidia Shield via ADB?
I have the latest platform-tools installed on my mac.
I tried to issued the following commands:

$ adb kill-server
$ adb start-server
$ adb connect 192.168.1.155:5037
failed to connect to '192.168.1.155:5037': Connection refused
$ adb devices
List of devices attached

#110

Try this


#111

You should be able to run the exact same commands I did but replace <device_ip_address> with the IP address of your Shield TV (not Hassio IP address). Port should be 5555 but you don’t need to specify it if you do tcpip 5555 first.


#112

please download androidtv dependencies in your
if on hassio
/deps/lib/python3.7/site-packages/androidtv

test and help androidtv community to work for it.
more than 90% state changes are solved.
Please check


#113

Hi tboyce1, all i get is this.
(I was trying to connect to my nVidia in the first place the ip is …155.)

$ adb kill-server
$ adb tcpip 5555
* daemon not running; starting now at tcp:5037
* daemon started successfully
error: no devices/emulators found
$ adb connect 192.168.1.155:5555
failed to authenticate to 192.168.1.155:5555

I found this on Stackoverflow. I think i need to find a usb cable and connect my mac with nVidia Shield.


#114

I never had to do that. Can you try with just 192.168.1.155 without the port since it knows to use 5555 already?


#115

$ adb connect 192.168.1.155
missing port in specification: tcp:192.168.1.155


#116

Odd, mine doesn’t require that.

Anyway, after trying to connect again, I got the same error. I had to go into developer options, disable network debugging, revoke USB debugging authorizations, and turn network debugging back on. Then it would give me the option to allow the connection when I tried the adb commands again.

Also, I think you might need to stop the ADB addon before connecting since, as far as I know, you can only have one ADB connection to a single device at a time.

Then, run adb disconnect before starting the addon and accept the connection again.


#117

Hi and thank you a zillion, i got it working.

My problem was that i had HA connected to my shield already via ADB :sleeping:
So i did the following:

  1. Turned off ADB add-on in HA
  2. Disabled network debugging
  3. Rewoked USB debugging authorizations
  4. Enabled network debugging
  5. Connected via ADB from my computer to my nVidia (this time it asked if i want to allow connection)
$ adb kill-server (just to ensure the server is not running)
$ adb tcpip 5555
$ adb connect 192.168.1.155:5555
$ adb shell

  1. Run your command
$ 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
  1. Got a list of my applications on my nVidia :+1:
  2. Disconnected from my nVidia
$ exit
$ adb disconnect

#118

:tada: Release v0.3.0

Full Changelog

Changed

  • Upgrades add-on base image to 3.0.0
  • Enables support for ARMv7
  • Workaround Docker issue by reinstating legacy tags
  • Rewrite add-on onto Bashio
  • Updates documentation for ARMv7
  • Removes custom log format override
  • Removes custom media component now HA supports it natively

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck


#119

Anyone that have figured out how to start apps on the shield now after hassio 0.90 & ADB 0.3.0?
Netflix, kodi, youtube and so on…
The old way with intents dont seem to work any more.

I get the “key presses” working by changeing

          tap_action:
            action: call-service
            service: media_player.androidtv_key
            service_data:
              entity_id: media_player.shield
              key: KEYCODE_DPAD_UP

to

          tap_action:
            action: call-service
            service: androidtv.adb_command
            service_data:
              entity_id: media_player.shield
              command: UP

But non of my old intents from https://gist.github.com/mcfrojd/9e6875e1db5c089b1e3ddeb7dba0f304 seems to work as an command in the service androidtv.adb_command

Tried the media_player.select_source to but that one would not do it either.


#120

can’t get it to work either… :’(


#121

Provide the full ADB shell command. For the service androidtv.adb_command, the command parameter will be (source):

am start -a android.intent.action.VIEW -d YOUR_INTENT