Hassio and adb

hi

i m trying to wake up my nvidia shield via adb command.

I installed android tools via ssh on pi by doing :

apk add android-tools

i created a script :

adb kill-server 
adb start-server 
sleep 1 
adb connect 192.168.1.38:5555
sleep 10
adb shell input keyevent KEYCODE_WAKEUP
sleep 1 
adb kill-server

when i execute it in the terminal via ssh it work

But when i create a shel command with the same script it doesnt work

What am i missing ?

Thanks in advance

Darkouz

Because hassio is based on docker, you can’t just ssh in and install software. Check out https://home-assistant.io/hassio/run_local/ for the options available to make that work with hassio.

Yes that’s what I thought, I created a addons with the same script.
In the docker file I installed adb

When I start the add-on it work. But non I don’t know what to do. Cause I need to restart the add-on to execute the script.

I’m new to hassio and docker. Should I create a component to toggle the add-on ?

There are services available for hassio that you can use. One those services can start an addon.

service: hassio.addon_start
data:
  addon: [ADDONNAME]

Hi there,
I also would love to have adb on my hassio, but I have not been able to do it so far.
Would you mind sharing your add-on configuration file (dockerfile, config.json and run.sh) if it works for you ?
Thank you !