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

Which log has no errors, the HA log or the ADB server add-on log?

neither, on adb log only say “already connected to 192.168.1.42:5555” on every timeout reconnect, and on the HA log i don’t show any issue, but when restart the addon, back to normal, for a while , i think happens when mi tv box goes to standby and after a time go to play again

Try this as a custom component and post the HA log. It won’t fix the issue, but it will log a lot of info.

https://github.com/JeffLIrion/ha-androidtv

ok, let me do it

Hi, here is the log , the issue started at 16:52 , this is my log https://we.tl/t-U4kK0ACWaW

Thanks for posting the log. Unfortunately, I don’t know what the cause of the error is. Does it ever go back to a stable connection?

When it’s doing this, try using the androidtv.adb_command service to send the command echo hello and post the HA log results (just the relevant lines).

Random idea: try adding device_class: firetv to your config and let me know if the error still occurs.

hi, just now see the reply , let me do that and i post the log thanks

:tada: Release v0.5.1

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v3.1.4

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

:tada: Release v0.5.2

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v3.2.0

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

Hi,

After some recent update, I have noticed that my nvidia shield stoped respond to HA. Log for adb addon looks ok:

[a6-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: Arch Linux ARM  (armv7 / odroid-xu)
 Home Assistant version: 0.98.5
 Supervisor version: 187
-----------------------------------------------------------
 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.
[13:54:42] INFO: Starting the Android Debug Bridge server...
[13:54:43] INFO: Connecting to device: 192.168.0.230...
connected to 192.168.0.230:5555
[13:57:43] INFO: Connecting to device: 192.168.0.230...
already connected to 192.168.0.230:5555

So what can be wrong?
To be honest I can find the point when it stopped to work. My bad.

Never mind start working again.

:tada: Release v0.5.3

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v4.0.0

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

My nvidia shield keeps cycling between standby and playing despite it being in playing mode logs show no issues.

Exacly the same thing started happening to my configuration abourt a week ago.

Same here, I eventually got round to looking at it last night and after trying a few things it seems to work again. I restarted the add-on, turned network debugging off and back on, rebooted the Shied and then rebooted Hassio. No idea if any of that actually fixed the issue, and if so probably the on/off of the network debug but it seemed to be fine afterwards (at least last night anyway, I’ll report back if it stops working again). Perhaps worth a try?
Cheers

I restarted my nvidia shield, the addon and hassio with no luck. Haven’t tried to turn off and on the networking debug. I’ll try it that too.

Yeah, I’ve got the same issue as well. I set the scan_interval to 2 seconds a few weeks ago and thought I’d remove it as a test. After removing it, the component’s status doesn’t even update at all. It remains on Standby even if the Shield is playing.

Just as a side, seeing this in the logs of the add-on is rather disturbing as this suggests that the add-on attempts actual connectivity and realises that it is already connected. Seems rather unnecessary. I don’t know much about the ADB protocol, but if there is some or other network management messaging that should be used to maintain activity on the transport instead of attempting to connect every few seconds, then that should be used and thus, there should not be a need to “connect” every time.

[17:50:10] INFO: Connecting to device: 192.168.1.101

already connected to 192.168.1.101:5555

Sorry false alarm, back to the same behaviour last night. Not fixed :face_with_raised_eyebrow:

I think the bug being discussed is fixed in the upcoming release. In the meantime, you can use this custom component (HACS compatible): https://github.com/JeffLIrion/ha-androidtv

I’d also like to fix the ADB python library so that it works for newer devices, making the ADB add-on unnecessary. To do this, I need some logs. If you’re willing to help out, use the custom component and follow the Python ADB implementation instructions. Enable debug logging via the logger.set_level service with the parameters:

{"custom_components.androidtv.androidtv.adb_shell": "debug"}

When the device is on, it should constantly connect and then become unavailable. Please post the log from when this is happening.

I have some logs for you. It’s pretty verbose, would you prefer them in a GitHub issue or here?