homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

How to install latest android-tools/adb inside Homebridge Docker container? #559

Closed SawkeeReemo closed 2 months ago

SawkeeReemo commented 3 months ago

Current Situation

For months I have been trying to use the homebridge-adb plugin to control my NVIDIA Shield Pro. For some reason, it simply will not work with the Shield as I never receive a notification on the Shield to approve the connection. I’ve been getting support from the dev over there for a while, but what it seems to boils down to is that apt doesn’t have access to the latest version of android-tools (etc).

Some users found that you can get the latest/upgraded version of android-tools by installing snapd and then pulling it through that. I installed snapd inside the Homebridge container, and ran snap install android-adb --edge per that user’s instructions.

But I was met with this error: error: cannot communicate with server: Post "http://localhost/v2/snaps/android-adb": dial unix /run/snapd.socket: connect: no such file or directory

Does anyone know how to make this work? Or bonus points if you know how to make ADB work with Homebridge and end my months long battle.

Logs

`error: cannot communicate with server: Post "http://localhost/v2/snaps/android-adb": dial unix /run/snapd.socket: connect: no such file or directory`

Configuration

This is not a configuration issue. I have no other issues with Homebridge.

Environment

Process Supervisor

hb-service

Additional Context

No response

NorthernMan54 commented 3 months ago

Would this be easier to do if you removed the docker container from the equation ?

taw123 commented 3 months ago

As a quick and dirty you could try mounting the container to your local filesystem and manipulate it there to your hearts content though as stated removing docker from the equation would in many ways be a bit simpler)

Alternatively you MAY be able to get away with just exec'ing into the container and revising as you need there. BE AWARE though of course your next pull will nuke any changes you make INSIDE the container (ice not part of your persistent storage).

SawkeeReemo commented 3 months ago

As a quick and dirty you could try mounting the container to your local filesystem and manipulate it there to your hearts content though as stated removing docker from the equation would in many ways be a bit simpler)

Alternatively you MAY be able to get away with just exec'ing into the container and revising as you need there. BE AWARE though of course your next pull will nuke any changes you make INSIDE the container (ice not part of your persistent storage).

Yeah. I think I’m just going to look into installing this directly into Ubuntu instead of through docker. I’ve just always used docker mainly because outside of very rare occurrences like this, it’s just easier to deal with updates and rebuilds and stuff. And having management tools like Portainer help a lot as well.

I may be speaking completely out of place here, but the folks who build the Homebridge docker image might want to consider including the updated version of adb-tools, etc. Lots of Android TV users out there, and no way to update the docker container that doesn’t get nuked on every update. (That I’ve found anyways.)

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 months ago

This issue has been closed as no further activity has occurred.