Hass.io ADB addon -- help wanted!

I’m trying to create a Hass.io addon that will run an ADB server for use with the Fire TV and (in progress) Android TV components. Here’s what I have so far: https://github.com/JeffLIrion/hassio-adb-server-addon.

What I need help with

I haven’t managed to get the ADB binaries to install. Apparently, it should be possible to install android-tools via (source):

RUN apk --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ add android-tools

but that didn’t work for me. Any help with getting this to work would be much appreciated!

Addon master @frenck, if you get a chance could you please take a look at this. I think it should be easy for someone who knows what they’re doing – all I’m trying to do is install one Alpine Linux package (android-tools). Unfortunately, I don’t know what I’m doing so it has proven difficult for me!:rofl:

Update

I got it to install. I had to use a debian base image and install it using apt. I think that using the default Alpine Linux base image and installing via apk would minimize the size of the container, but I couldn’t get that to work.

@JeffLIrion Got myself an Nvidia Shield, will take a look.

2 Likes

Hi there,
any progress on installing ADB directly on an HASS.IO (Raspberry) ?
Thanks!

No progress on my end. A couple people have forked the repo, you can try what they’ve come up with.

https://github.com/MastaaK/hassio-adb-server-addon

Thanks. I’ll take a look at it
EDIT: it’s actually working with NoedelVreter addon! Of course, one needs to remove the 172.17.0.1 adb server address or replace with owns Hassio IP address to make it work. However, so far, I have only been able to use adb commands in the “run.sh” file, so it’s working only when I start the addon. Is there a way to launch adb command from a shell_command entity ? Or is everything “sandboxed” inside the addon ? (I am not very familiar yet with Hassio / docker / addon architecture).
Thanks !

I updated my repo to match that of NoedelVreter, with some minor changes.

The README mentions two custom components – Fire TV and Android TV – that are able to utilize this addon. The idea behind the addon is that components that utilize ADB could use this addon to send their commands. If you’d like to implement a new component, you could use either of those as a starting point.

https://github.com/JeffLIrion/hassio-adb-server-addon

Looks like it’s running. I got the following output on startup.

Starting up ADB…
Server started. Waiting for 30 seconds…
/run.sh: line 15: 12 Segmentation fault (core dumped) adb -a server nodaemon > /dev/null 2>&1
Saving newly generated private key.
Connecting to devices. connected to 192.168.1.97:5555
Done.

After a restart everything looks good.

Starting up ADB…
Found existing private key. Using it.
Server started. Waiting for 30 seconds…
Connecting to devices.
connected to 192.168.1.97:5555
Done.

Awesome! Credit where credit is due: NoedelVreter is the one who got it to work.

I’m not sure whether the line that caused the segmentation fault is actually necessary…

adb -a server nodaemon > /dev/null 2>&1

Told you guys I was going to look into it…

1 Like

Thanks Frank, working great for me.