Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker HA and adb container....Anyone have this setup?

Featured Replies

Its been a headache and a half and my last resort is posting on here hoping that someone has this setup and can perhaps provide some assistance.

 

Im using the docker home assistant container and been wanting to use an adb container to connect my android devices to use with the androidtv component. Im using the sorccu/adb from dockerhub. I can provide more info but here is a summary of what im dealing with.

 

When i pull the container and manually connect to my devices with the container console. HA is able to connect np after restart. Only issue is when the container restarts it doesnt remember the devices. My appdata gets backed up every night so, I tried editing the dockerfile and adding a script that would auto connect, however after doing this HA will not connect to it at all even though my android devices are connected. Here is some info of stuff i have setup

https://hastebin.com/tutiliripo.bash

 

https://www.home-assistant.io/components/androidtv/

 

https://androidtv.readthedocs.io/en/adb-setup-documentation/adb_setup.html

Edited by mkono87

So you mean your settings are not getting saved?

 

Does it get saved to appdata?

 

Most time you need to link the config directory to the "outside", then it gets saved, also while updates or restarts etc

  • Author
9 minutes ago, nuhll said:

So you mean your settings are not getting saved?

 

Does it get saved to appdata?

 

Most time you need to link the config directory to the "outside", then it gets saved, also while updates or restarts etc

This is the image im working with 

https://hub.docker.com/r/sorccu/adb/

 

I dont there is really a config folder to be mounted in this case.

If its not created for unraid you need to manually do it.

 

Thats how i did it on the apache container:

 

startet container, copied (cp) /etc/apache2/  to a temp folder reachable from outside, copied that to /mnt/user/appdata/apache2/

set link from /etc/apache2/ to /mnt/user/appdata/apache2/

 

Now u have the config files outside. (i dont know if that is the recommended way to do things, but it works)

 

Maybe you need to chmod 777 it.

Edited by nuhll

  • Author
If its not created for unraid you need to manually do it.

 

Thats how i did it on the apache container:

 

startet container, copied (cp) /etc/apache2/  to a temp folder reachable from outside, copied that to /mnt/user/appdata/apache2/

set link from /etc/apache2/ to /mnt/user/appdata/apache2/

 

Now u have the config files outside. (i dont know if that is the recommended way to do things, but it works)

 

Maybe you need to chmod 777 it.

I'm not sure you understand what I'm dealing with. There is no config folder needed for this container. the issue after building the container with the script injected using the Add and cmd. The container stops and says path doesn't exist

 

If. I run the container right from docker hub without modifying it and connect my android devices, home assistant can connect. But when I add a script to make it auto connect if the container restarts ha can't connect to it.

 

Sent from my Mi A2 using Tapatalk

 

 

 

I dont know your program, if it has no config file, than you cant do it that way, correct.

 

The docker page has some examples how to connect, how you try it?

 

From my understanding you should add these commands to the extra parameter.

Edited by nuhll

  • Author
6 hours ago, nuhll said:

I dont know your program, if it has no config file, than you cant do it that way, correct.

 

The docker page has some examples how to connect, how you try it?

 

From my understanding you should add these commands to the extra parameter.

See with this it connects on startup
```
#!/bin/sh

sleep 5

DEVICES="192.168.0.206"

echo "Connecting to devices."
for device in $DEVICES; do
   adb connect $device
done
echo "Done."

while true; do
  for device in $DEVICES; do
    adb connect $device > /dev/null 2>&1
  done
  sleep 60
done
```
```
Connecting to devices.
* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 192.168.0.206:5555
Done.
```

But HA is unable to connect to it. So I cant catch a break. Im wondering its something within docker (unraid) network settings or something. Both are set to bridge like all my other containers (well expect HA) and the ports are exposed. In theory this should be working
```
Mon Apr 01 2019 11:29:16 GMT-0400 (Eastern Daylight Time)
Could not connect to mike firetv at 192.168.0.206:5555 using ADB server at 192.168.0.50:5037
```

lol, try running both containers in br0 with their own ip adress.

  • Author
lol, try running both containers in br0 with their own ip adress.
Home assistant has to be run as host or it doesn't work properly with other containers. Been down that road in the past. Il try br0 when I have a chance. What's so funny?

Sent from my Mi A2 using Tapatalk

1 minute ago, mkono87 said:

Home assistant has to be run as host or it doesn't work properly with other containers. Been down that road in the past. Il try br0 when I have a chance. What's so funny?

Sent from my Mi A2 using Tapatalk
 

 

I had many problems with bridge/br0, until i swapped all of them to br0.

 

its a "security" thing that bridged cant talk to host...

  • Author
 
I had many problems with bridge/br0, until i swapped all of them to br0.
 
its a "security" thing that bridged cant talk to host...
Not sure how that's possible as HA is host and all my other dockers such as influxdb, mariadb, mqtt ect are all bridge

Sent from my Mi A2 using Tapatalk

Im not sure about host, but bridge cant access the host. Or atleast cant access other bridges, what ever, just try br0.

  • Author
Im not sure about host, but bridge cant access the host. Or atleast cant access other bridges, what ever, just try br0.
Will try that thanks dude

Sent from my Mi A2 using Tapatalk

  • Author
18 minutes ago, nuhll said:

does it work?

Unfortunately not. I ended up giving up and just made turn have unraid not turn off the container while appdata backup is in progress. So really I would only have to worry about reconnecting devices when the entire server is restarted.

Did u try to add the parameters to the "extra field" in the docker container? like its descriped on the docker page?

  • Author
1 minute ago, nuhll said:

Did u try to add the parameters to the "extra field" in the docker container? like its descriped on the docker page?

No you mean the dockerhub page? I didnt see anything like that.

  • Author
1 minute ago, nuhll said:

https://github.com/sorccu/docker-adb

 

pattern 1, 2, 3 or 4

 

I cant help much because i really dont know the app.

No I have no tried it. As I was able to get it to connect manually, I didnt think i needed it. Figured it was script causing issues.

i only know 2 ways for persistent settings 1. extra paremters and 2. config files

  • Author
i only know 2 ways for persistent settings 1. extra paremters and 2. config files
This was taken from a docker-compose. Can it be used is extra parameters/post arguments?

command: sh -c "/usr/bin/adbscript.sh & adb -a -P 5037 server nodaemon"

Sent from my Mi A2 using Tapatalk

No u cant add shell commands, i mean something liket his:

 

Server

-v /dev/bus/usb:/dev/bus/usb -p 5037:5037

 

Client

adb -H x.x.x.x -P 5037 devices

 

(look at the page) (maybe remove adb) (maybe add name, dont know if that is needed)

Edited by nuhll

  • 2 months later...
On 3/31/2019 at 10:24 PM, mkono87 said:

Its been a headache and a half and my last resort is posting on here hoping that someone has this setup and can perhaps provide some assistance.

 

Im using the docker home assistant container and been wanting to use an adb container to connect my android devices to use with the androidtv component. Im using the sorccu/adb from dockerhub. I can provide more info but here is a summary of what im dealing with.

 

When i pull the container and manually connect to my devices with the container console. HA is able to connect np after restart. Only issue is when the container restarts it doesnt remember the devices. My appdata gets backed up every night so, I tried editing the dockerfile and adding a script that would auto connect, however after doing this HA will not connect to it at all even though my android devices are connected. Here is some info of stuff i have setup

https://hastebin.com/tutiliripo.bash

 

https://www.home-assistant.io/components/androidtv/

 

https://androidtv.readthedocs.io/en/adb-setup-documentation/adb_setup.html

 

Hi mkono87,

 

I was wondering if you could take me through how you set up your sorccu/adb docker? I've set mine up but no matter what I do, I cannot get Home Assistant to see it? I was hoping I could get some pointers?

  • Author
4 minutes ago, Tolumi Adamson said:

 

Hi mkono87,

 

I was wondering if you could take me through how you set up your sorccu/adb docker? I've set mine up but no matter what I do, I cannot get Home Assistant to see it? I was hoping I could get some pointers?

Sure Id be glad to try to help out but won't be available till tonight (after 9est) you on discord? Send me a pm on here and il send you my username. 

  • 1 month later...

 

On 6/10/2019 at 5:53 AM, mkono87 said:

Sure Id be glad to try to help out but won't be available till tonight (after 9est) you on discord? Send me a pm on here and il send you my username. 

 

Is your ADB still running, and do you have instructions on how to set it up on unraid?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.