Code Monkey home page Code Monkey logo

addon-adb's Introduction

Home Assistant Community Add-on: Android Debug Bridge

GitHub Release Project Stage License

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture Supports i386 Architecture

GitHub Release Project Stage License

Discord Community Forum

Sponsor Frenck via GitHub Sponsors

Support Frenck on Patreon

The Android Debug Bridge server program.

Deprecation warning

This add-on is in a deprecated state!

This add-on was created at the time, that the best solution for communicating with an Android device from Home Assistant, was using an Android Debug Bridge.

However, the time has changed. Right now, the Home Assistant project recommends using built-in Python implementation, which renders this add-on obsolete.

Additionally, this add-on will become problematic to maintain in the future, as the packages used are stalled.

Therefore, this add-on is now deprecated.

About

The Android Debug Bridge (ADB) is a client-server program used in Android application development. This add-on provides the server program and can be used to get full local control over your Android (TV) devices.

📚 Read the full add-on documentation

Support

Got questions?

You have several options to get them answered:

You could also open an issue here GitHub.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved! 😍

Authors & contributors

The original setup of this repository is by Franck Nijhof.

For a full list of all authors and contributors, check the contributor's page.

We have got some Home Assistant add-ons for you

Want some more functionality to your Home Assistant instance?

We have created multiple add-ons for Home Assistant. For a full list, check out our GitHub Repository.

License

MIT License

Copyright (c) 2019-2021 Franck Nijhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

addon-adb's People

Contributors

bonanitech avatar dependabot[bot] avatar frenck avatar jefflirion avatar mcfrojd avatar renovate[bot] avatar sinclairpaul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

addon-adb's Issues

Can't use platform: androidtv, config check hangs (doesn't fail).

Config check hangs when - platform: androidtv is used. Custom component is in the correct directory. This error shows in logs. Looks like line 7 of androidtv.py?

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 67, in ban_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 99, in auth_middleware
return await handler(request)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 118, in handle
result = await result
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/config/core.py", line 21, in post
errors = await async_check_ha_config_file(request.app['hass'])
File "/usr/local/lib/python3.6/site-packages/homeassistant/config.py", line 812, in async_check_ha_config_file
check_ha_config_file, hass)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 374, in check_ha_config_file
platform = loader.get_platform(hass, domain, p_name)
File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 61, in get_platform
domain=domain, platform=platform_name))
File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 117, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 674, in exec_module
File "", line 781, in get_code
File "", line 741, in source_to_code
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/media_player/androidtv.py", line 7

^
SyntaxError: invalid syntax

Error with hassos 3.7

Since the upgrade to hassos 3.7 the adb add on fails to start with the error

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

This happens only after a full system reboot.

Restarting the add on after everything is running does not yield this error and add on starts just fine.

Expected behavior

With hassos 2 the adb plugin started without problems after a full system reboot

Actual behavior

After a full system reboot adb bridge reports running but its not really running and adb devices are not working and the error mentioned above is in the logs.

Steps to reproduce

Install the addon under hassos 3.7 and reboot the whole system

ModuleNotFoundError: No module named 'androidtv'

Hi,

I have added the Hass.io add-on, it seems to be successfully connecting to my Shield TV and now I'm trying to add the component to HA.
So I added the androidtv.py file in the correct folder and when I start HA this line of code is causing me the error:

from androidtv import AndroidTV

ModuleNotFoundError: No module named 'androidtv'

Do you have a solution for me? Thanks in advance!

[Errno 111] Connection refused. Is adb running on your computer?

Problem

I have two Amazon Fire TV sticks connected via wired LAN to FritzBox router. To connect them with HA, I installed and configured the ADB. The media_server entities are not showing, despite ADB shows the status connected. The ADB debugging is enabled on Fire-TV sticks and HA RSA key permanent accepted.

Steps to reproduce

HA restart:

configuration.yaml

media_player:
  - platform: androidtv
    name: ATV1
    host: 192.168.178.12
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037
    exclude_unnamed_apps: true

  - platform: androidtv
    name: ATV2
    host: 192.168.178.13
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037
    exclude_unnamed_apps: true

ADB configuration

Screenshot 2020-11-23 at 14 05 52

ADB log

ADB - Android Debug Bridge
-----------------------------------------------------------
 Hass.io Add-on: ADB - Android Debug Bridge
 The Android Debug Bridge server program
-----------------------------------------------------------
 Add-on version: 0.6.3
 You are running the latest version of this add-on.
 System: HassOS 4.17  (amd64 / intel-nuc)
 Home Assistant Core: 0.118.2
 Home Assistant Supervisor: 2020.11.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adb.sh: executing... 
[cont-init.d] adb.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[12:56:28] INFO: Starting the Android Debug Bridge server...
[12:56:29] INFO: Connecting to device: 192.168.178.12...
connected to 192.168.178.12:5555
[12:56:29] INFO: Connecting to device: 192.168.178.13...
connected to 192.168.178.13:5555

HA log

Logger: homeassistant.components.androidtv.media_player
Source: components/androidtv/media_player.py:227
Integration: androidtv (documentation, issues)
First occurred: 1:53:54 PM (2 occurrences)
Last logged: 1:53:54 PM

Could not connect to ATV1 at 192.168.178.12:5555 using ADB server at 127.0.0.1:5037
Could not connect to ATV2 at 192.168.178.13:5555 using ADB server at 127.0.0.1:5037

Logger: androidtv.adb_manager.adb_manager_async
Source: /usr/local/lib/python3.8/site-packages/androidtv/adb_manager/adb_manager_async.py:410
First occurred: 1:53:54 PM (2 occurrences)
Last logged: 1:53:54 PM

Couldn't connect to 192.168.178.12:5555 via ADB server 127.0.0.1:5037, error: ERROR: connecting to 127.0.0.1:5037 [Errno 111] Connection refused. Is adb running on your computer?
Couldn't connect to 192.168.178.13:5555 via ADB server 127.0.0.1:5037, error: ERROR: connecting to 127.0.0.1:5037 [Errno 111] Connection refused. Is adb running on your computer?

Is this a bug or a gap in my configuration?

This adb server's $ADB_VENDOR_KEYS is not set

Problem/Motivation

I try to setup my Philips Android TV 55OLED903 by adb-addon and ran in that issue with the following configuration:

This is my homeassistant config:

- platform: androidtv
  name: livingroom_androidtv
  device_class: androidtv
  host: 192.168.176.40
  adb_server_ip: 127.0.0.1
  adb_server_port: 5037
  adbkey: "/config/.androidkeys/adbkey"

This is my adb-addon config:

{
  "devices": [
    "192.168.176.40"
  ],
  "reconnect_timeout": 90,
  "keys_path": "/config/.androidkeys"
}

I confirm that the adbkey is being created by the addon, but the current behaviour is:

RuntimeError: ERROR: 'FAIL' 00a7device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

While the adb-addon says:

[01:39:05] INFO: Connecting to device: 192.168.176.40...
already connected to 192.168.176.40:5555

I get no confirmation dialog on my TV screen.
I disabled LAN and connected the TV by wi-ifi as mentioned in the Android TV documentation.

Any hints for me?

Thanks, Thomas

volume_set does not work

Problem/Motivation

volume_set does not work, the other related volume services do.

Expected behavior

volume_set should change the volume

Actual behavior

volume_set does nothing

Steps to reproduce

Call service volume_set like:

entity_id: media_player.bedroom_1_tv_adb
volume_level: 0.6

Proposed changes

Make volume_set work

Androidtv RuntimeError: ERROR: 'FAIL' 0006closed

Problem/Motivation

Edit: I think I created this issue in the wrong place it should be under the component not the ADB addon, sorry about this, but I don't see where I can change this..

I have a problem with the androidtv component not wanting to load when Hass is (re)started
When it works it is awesome! But the androidtv component won't start most of the time.

The error from the log:

Log Details (ERROR)
Sun Mar 24 2019 22:59:14 GMT+0100 (Midden-Europese standaardtijd)
Error while setting up platform androidtv
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/androidtv/media_player.py", line 115, in setup_platform
    device_class=config[CONF_DEVICE_CLASS])
  File "/config/deps/lib/python3.7/site-packages/androidtv/__init__.py", line 34, in setup
    return AndroidTV(host, adbkey, adb_server_ip, adb_server_port)
  File "/config/deps/lib/python3.7/site-packages/androidtv/androidtv.py", line 59, in __init__
    self.device_properties = self.get_device_properties()
  File "/config/deps/lib/python3.7/site-packages/androidtv/androidtv.py", line 146, in get_device_properties
    properties = self.adb_shell('getprop')
  File "/config/deps/lib/python3.7/site-packages/androidtv/basetv.py", line 122, in _adb_shell_pure_python_adb
    return self._adb_device.shell(cmd)
  File "/config/deps/lib/python3.7/site-packages/adb_messenger/command/transport/__init__.py", line 23, in shell
    conn.send(cmd)
  File "/config/deps/lib/python3.7/site-packages/adb_messenger/connection.py", line 77, in send
    return self._check_status()
  File "/config/deps/lib/python3.7/site-packages/adb_messenger/connection.py", line 83, in _check_status
    raise RuntimeError("ERROR: {} {}".format(repr(recv), error))
RuntimeError: ERROR: 'FAIL' 0006closed

I am running hassio 0.90.1 with the ADB addon (0.3.0)
The ADB is able to connect because the log is showing this a lot:

[22:51:29] INFO: Connecting to device: 192.168.178.117...
already connected to 192.168.178.117:5555
[22:51:29] INFO: Connecting to device: 192.168.178.118...
already connected to 192.168.178.118:5555

Expected behavior

I would like to control my sony bravia android tv

Actual behavior

Sometimes the component works, but then after I restart Hass it sometimes wont start the component and gives me an error in the log. I can continue to restart Hass until I get lucky after a few tries and the component will work. This is a bit annoying :p

Steps to reproduce

I have no idea actually..

Proposed changes

I have no idea..

I am also running a custom component Sony Bravia PSK (https://community.home-assistant.io/t/sony-bravia-tv-component-with-pre-shared-key/30698)
This let me control my tv with a pre shared key. Could this stand in the way of the androidtv component? When I comment out the sony custom component in my configuration.yaml there is no change in the androidtv issue

Hopefully someone can help me with this. :)

Home Assistant Community
Using Home Assistant for some weeks now and it works great 😎 I have a Sony Bravia TV and I have used the braviatv platform, but that was not working very well for me. After some days the state card wasn’t updating anymore and I got a lot of errors in the log. Only a restart of HASS would fix that problem. I think this was caused by the PIN/cookie method which isn’t working fine (at least not in my setup). That’s why I have made a custom component which is using a Pre-Shared Key to...

Get information from source

Here I have the same TV integrated with AndroidTV (ADB), and with Bravia PSK. The Android integration shows the name of the App and an image of what is currently being displayed. Just do not inform the name of the video title.

https://prnt.sc/ry0ei5
https://prnt.sc/ry0f6y

Is it possible to get information about what is being displayed, as well as when integrating the Bravia PSK addon?

Lightshot
Captured with Lightshot
Lightshot
Captured with Lightshot

ERROR keys_path

Problem/Motivation

devices:
  - 192.168.0.130
  - 192.168.0.132
reconnect_timeout: 90
log_level: info
keys_path: /config/.androidkeys
media_player:
  - platform: androidtv
    name: Android TV
    device_class: androidtv
    host: 192.168.0.132
    adbkey: "/config/.androidkeys"
    exclude_unnamed_apps: true
    apps:
      "kodi": "Kodi"
      "tunein": "TuneIn Radio"     
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037

log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: ADB - Android Debug Bridge
 The Android Debug Bridge server program
-----------------------------------------------------------
 Add-on version: 0.7.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 5.12  (armv7 / raspberrypi3)
 Home Assistant Core: 2021.3.3
 Home Assistant Supervisor: 2021.03.4
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adb.sh: executing... 
[23:00:16] FATAL: 
[23:00:16] FATAL: It seems like you have configured the "keys_path"
[23:00:16] FATAL: option, unfortunately, the path specified could
[23:00:16] FATAL: not be found.
[23:00:16] FATAL: 
[23:00:16] FATAL: Please double check the add-on configuration.
[23:00:16] FATAL: 
[cont-init.d] adb.sh: exited 1.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[23:00:17] INFO: Starting the Android Debug Bridge server...
[23:00:35] INFO: Connecting to device: 192.168.0.132...
connected to 192.168.0.132:5555
[23:02:19] INFO: Connecting to device: 192.168.0.132...
already connected to 192.168.0.132:5555

88.1 reports wrong keys for custom component

Problem/Motivation

Since I updated to Home Assistant 0.88.1 I can't use the custom component for FireTv which I used with this addon. Logs show:

2019-02-28 14:56:50 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support. Please remove [adb_server_ip], [adb_server_port]. (See /config/configuration.yaml, line 120). 2019-02-28 14:56:51 WARNING (SyncWorker_3) [root] Couldn't connect to host: 192.168.0.7:5555, error: Broken pipe 2019-02-28 14:56:51 WARNING (SyncWorker_3) [homeassistant.components.media_player.firetv] Could not connect to Fire TV at 192.168.0.7:5555 2019-02-28 21:27:33 WARNING (SyncWorker_9) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support. Please remove [adb_server_ip], [adb_server_port].

My configuration.yaml is as follows, which is the same as described in the readme of this addon.

`media_player:

  • platform: firetv
    name: Fire_TV
    host: 192.168.0.7
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037`

So the newest version doesn't support the recommended keys.
Any idea on how to solve this?

ADB through Ethernet adapter

[question/support-request]

Maybe not specific for this add-on, but I wondered if you know how to setup the ADB through an Ethernet adapter.

The reason I want to have this setup is for my Xiaomi Mi Box, which only has one USB port and no separate Ethernet port. Therefore I am using an adapter which provides multiple USB ports, as well as an Ethernet port.

If I enable USB debugging however, as required for this add-on, the Ethernet and USB ports won't work.

Not working on HA 0.88

After upgrading home assistant to version 0.88, the andoridtv component no longer works. Even changing the folder structure in /config/custom_components/androidtv/media_player.py does not solve the problem.

No route to host error

Problem/Motivation

ADB server not connecting to firestick 4k. It was working very wel for a few months. I didn't change setup.

Expected behavior

A Working ADB Add-on

Actual behavior

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: ADB - Android Debug Bridge
 The Android Debug Bridge server program
-----------------------------------------------------------
 Add-on version: 0.6.1
 There is an update available for this add-on!
 Latest add-on version: null
 Please consider upgrading as soon as possible.
 System: Resin OS 2.3.0+rev1  (armv7 / raspberrypi3)
 Home Assistant Core: 0.108.9
 Home Assistant Supervisor: 219
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adb.sh: executing... 
[cont-init.d] adb.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:19:10] INFO: Starting the Android Debug Bridge server...
[10:19:10] INFO: Connecting to device: 192.168.2.52...
unable to connect to 192.168.2.52:5555: No route to host

Steps to reproduce

I don't know. This is my config:

devices:
  - 192.168.2.52
reconnect_timeout: 90
log_level: debug

Tried turning off an on debug on the device, re-install and restart Add-on.

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Device unauthorized even after accepting the confirmation

Problem/Motivation

I added the addon and it works fine with my Shield. For my FireTV, even after accepting the permission prompt, I see the following error:

Tue Feb 05 2019 07:56:44 GMT-0500 (Eastern Standard Time)
Error while setting up platform androidtv
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/media_player/androidtv.py", line 191, in setup_platform
    adb_server_port=config[CONF_ADB_SERVER_PORT])
  File "/config/deps/lib/python3.6/site-packages/androidtv/__init__.py", line 230, in __init__
    self.properties = self.device_info()
  File "/config/deps/lib/python3.6/site-packages/androidtv/__init__.py", line 325, in device_info
    properties = self._adb_shell('getprop')
  File "/config/deps/lib/python3.6/site-packages/androidtv/__init__.py", line 479, in _adb_shell_pure_python_adb
    return self._adb_device.shell(cmd)
  File "/config/deps/lib/python3.6/site-packages/adb_messenger/command/transport/__init__.py", line 20, in shell
    conn = self.create_connection(timeout=timeout)
  File "/config/deps/lib/python3.6/site-packages/adb_messenger/device.py", line 45, in create_connection
    self.transport(conn)
  File "/config/deps/lib/python3.6/site-packages/adb_messenger/command/transport/__init__.py", line 15, in transport
    connection.send(cmd)
  File "/config/deps/lib/python3.6/site-packages/adb_messenger/connection.py", line 77, in send
    return self._check_status()
  File "/config/deps/lib/python3.6/site-packages/adb_messenger/connection.py", line 83, in _check_status
    raise RuntimeError("ERROR: {} {}".format(repr(recv), error))
RuntimeError: ERROR: 'FAIL' 00a7device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

Interestingly, in the addon log, I see successful connections for both my devices:

INFO: Connecting to device: 192.168.2.28...
already connected to 192.168.2.28:5555
INFO: Connecting to device: 192.168.2.225...
already connected to 192.168.2.225:5555

Is there a way to manually kill server in the addon and try again?

androidtv.adb_command is missing in services

I have issue after updating HA to 0.1 version.
the service "androidtv.adb_command" is missing.
What could cause this ?
this is my system info:

arch aarch64
dev false
docker true
hassio true
os_name Linux
python_version 3.7.4
timezone Asia/Jerusalem
version 0.100.1
virtualenv false

User key '/root/.android/adbkey' does not exist

Problem/Motivation

Not starting, getting this in log, no matter if keys_path is configured:

[20:52:01] INFO: Starting the Android Debug Bridge server...
adb I 05-07 12:52:01  1005  1005 adb_auth_host.cpp:416] adb_auth_init...
adb I 05-07 12:52:01  1005  1005 adb_auth_host.cpp:262] User key '/root/.android/adbkey' does not exist...
adb I 05-07 12:52:01  1005  1005 adb_auth_host.cpp:109] generate_key(/root/.android/adbkey)...
[12:52:02] TRACE: bashio::config.has_value: keys_path
[12:52:02] TRACE: bashio::config: keys_path
[12:52:02] TRACE: bashio::jq: /data/options.json if (.keys_path == null) then
            null
        elif (.keys_path | type == "string") then
            .keys_path // empty
        elif (.keys_path | type == "boolean") then
            .keys_path // false
        elif (.keys_path | type == "array") then
            if (.keys_path == []) then
                empty
            else
                .keys_path[]
            end
        elif (.keys_path | type == "object") then
            if (.keys_path == {}) then
                empty
            else
                .keys_path
            end
        else
            .keys_path
        end
[12:52:02] TRACE: bashio::fs.file_exists: /data/adbkey
[12:52:03] INFO: Starting the Android Debug Bridge server...
adb I 05-07 12:52:03  1025  1025 adb_auth_host.cpp:416] adb_auth_init...
...

Expected behavior

ADB server is started

Actual behavior

ADB server is not started, getting errors

Steps to reproduce

Pi 3, hassio 89.1, addon-adb 0.4.0, install and start.

{
  "log_level" : "trace",
  "devices": [
    "192.168.1.2"
  ],
  "reconnect_timeout": 90
}

Proposed changes

Launching App

Problem/Motivation

(Why the issue was filed)

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

ADB Bridge DAta/TMP Folder 893.4GB

Problem/Motivation

My tmp folder under Data in ADB addon is 893.4gb

Expected behavior

Addon is running usually but it's filled up my hard drive.

Actual behavior

Hard drive is full up but addon still functioning. I'm running Core on docker on an Ubuntu 18.04 server. No other issues that I can see.

Steps to reproduce

Only installed the addon a couple of days ago, using it to monitor my Shield and one Amazon Fire Stick 4k. No automations being used, only Media Player.

Proposed changes

I don't sorry, just hoping for some help.

Crash adb addon when sending command

Problem/Motivation

If i send a command unsupported like: shell top -m 10 the the android device in HA stop responding to any further command. I have to restart the adb addon

(Why the issue was filed)

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Connection refused

I try to connect my android tv box using ADB - Android Debug Bridge in hass.io but i get the folloing error on log file

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...

Hass.io Add-on: ADB - Android Debug Bridge
The Android Debug Bridge server program

Add-on version: 0.5.2
You are running the latest version of this add-on.
System: HassOS 2.12 (aarch64 / raspberrypi3-64)
Home Assistant version: 0.98.2
Supervisor version: 185

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adb.sh: executing...
[cont-init.d] adb.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:10:59] INFO: Starting the Android Debug Bridge server...
[22:10:59] INFO: Connecting to device: 192.168.2.44...
unable to connect to 192.168.2.44:5555: Connection refused
[22:12:30] INFO: Connecting to device: 192.168.2.44...
unable to connect to 192.168.2.44:5555: Connection refused
[22:14:00] INFO: Connecting to device: 192.168.2.44...
unable to connect to 192.168.2.44:5555: Connection refused
[22:15:30] INFO: Connecting to device: 192.168.2.44...
unable to connect to 192.168.2.44:5555: Connection refused

any Idea, on what i am doing wrong?

Failed to call service androidtv/send_command. Service not found.

Everything worked as expected until I upgraded the supervisor to 0.117, now the androidtv services are just vanished.

In the addon logs, no errors

Add-on version: 0.6.3
You are running the latest version of this add-on.
System: HassOS 4.15 (armv7 / raspberrypi4)
Home Assistant Core: 0.117.0
Home Assistant Supervisor: 2020.10.0

Status is always 'Paused'

Problem/Motivation

Even when playing a video, the status is paused on the FireTV 4k

Expected behavior

It should say it's playing a video when it's playing a video.

Actual behavior

It just says 'Paused' all the time.

Steps to reproduce

Play a video. HA will still say the FireTV is paused.

Proposed changes

I don't know if this is a FireTV limitation or now. But it would be nice to be able to run automations based on the state. For example, turn the lights off when state changes to playing, and turn then on when it's stopped or paused.

port 5555

I am not sure where port 5555 is coming from ?. The device is Android 11 and in wifi debug settings the port changes when I initiate pairing

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: ADB - Android Debug Bridge
 The Android Debug Bridge server program
-----------------------------------------------------------
 Add-on version: 0.7.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 5.10  (amd64 / qemux86-64)
 Home Assistant Core: 2021.1.5
 Home Assistant Supervisor: 2021.01.7
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adb.sh: executing... 
[cont-init.d] adb.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[14:56:08] INFO: Starting the Android Debug Bridge server...
[services.d] done.
[14:56:08] INFO: Connecting to device: 192.168.6.6...
unable to connect to 192.168.6.6:5555: Connection refused

androidtv does not generate unique IDs

Problem/Motivation

I'm a newbie so please sorry if I am doing wrong...
I get this message in core log
2021-03-01 21:40:52 ERROR (MainThread) [homeassistant.components.media_player] Platform androidtv does not generate unique IDs. ID 1234567890 already exists - ignoring media_player.kingtv

(Why the issue was filed)
I made the configuration in ADB debug bridge:

devices:

  • 192.168.31.154
  • 192.168.31.150
    reconnect_timeout: 90
    log_level: debug

Expected behavior

I don't see how to generate the good ID so that I would not get this message in log.

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.