mkono87 Posted March 31, 2019 Share Posted March 31, 2019 (edited) 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 March 31, 2019 by mkono87 Quote Link to comment
NewDisplayName Posted April 1, 2019 Share Posted April 1, 2019 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 Quote Link to comment
mkono87 Posted April 1, 2019 Author Share Posted April 1, 2019 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. Quote Link to comment
NewDisplayName Posted April 1, 2019 Share Posted April 1, 2019 (edited) 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 April 1, 2019 by nuhll Quote Link to comment
mkono87 Posted April 1, 2019 Author Share Posted April 1, 2019 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 Quote Link to comment
NewDisplayName Posted April 1, 2019 Share Posted April 1, 2019 (edited) 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 April 1, 2019 by nuhll Quote Link to comment
mkono87 Posted April 1, 2019 Author Share Posted April 1, 2019 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 ``` Quote Link to comment
NewDisplayName Posted April 1, 2019 Share Posted April 1, 2019 lol, try running both containers in br0 with their own ip adress. Quote Link to comment
mkono87 Posted April 1, 2019 Author Share Posted April 1, 2019 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 Quote Link to comment
NewDisplayName Posted April 1, 2019 Share Posted April 1, 2019 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... Quote Link to comment
mkono87 Posted April 1, 2019 Author Share Posted April 1, 2019 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 bridgeSent from my Mi A2 using Tapatalk Quote Link to comment
NewDisplayName Posted April 1, 2019 Share Posted April 1, 2019 Im not sure about host, but bridge cant access the host. Or atleast cant access other bridges, what ever, just try br0. 1 Quote Link to comment
mkono87 Posted April 1, 2019 Author Share Posted April 1, 2019 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 Quote Link to comment
mkono87 Posted April 2, 2019 Author Share Posted April 2, 2019 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. Quote Link to comment
NewDisplayName Posted April 2, 2019 Share Posted April 2, 2019 Did u try to add the parameters to the "extra field" in the docker container? like its descriped on the docker page? Quote Link to comment
mkono87 Posted April 2, 2019 Author Share Posted April 2, 2019 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. Quote Link to comment
NewDisplayName Posted April 2, 2019 Share Posted April 2, 2019 (edited) https://github.com/sorccu/docker-adb pattern 1, 2, 3 or 4 I cant help much because i really dont know the app. Edited April 2, 2019 by nuhll Quote Link to comment
mkono87 Posted April 2, 2019 Author Share Posted April 2, 2019 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. Quote Link to comment
NewDisplayName Posted April 2, 2019 Share Posted April 2, 2019 i only know 2 ways for persistent settings 1. extra paremters and 2. config files Quote Link to comment
mkono87 Posted April 3, 2019 Author Share Posted April 3, 2019 i only know 2 ways for persistent settings 1. extra paremters and 2. config filesThis 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 Quote Link to comment
NewDisplayName Posted April 4, 2019 Share Posted April 4, 2019 (edited) 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 April 4, 2019 by nuhll Quote Link to comment
Tolumi Adamson Posted June 9, 2019 Share Posted June 9, 2019 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? Quote Link to comment
mkono87 Posted June 9, 2019 Author Share Posted June 9, 2019 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. Quote Link to comment
AaronA Posted July 11, 2019 Share Posted July 11, 2019 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? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.