-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script2 and adb #8
Comments
Can you share the configuration settings? |
Absolutely. Here is my configuration...
Checking the log after flipping the switch shows that the script runs and it shows the exact same output as when running in the shell, however the Shield doesn't power off. I think it's an issue with the 'adb shell..." line of the script when running with Script2. |
Where is adb located? I'm shooting in the dark a bit here. But i noticed in my scripts I |
Thanks for the point in the right direction. I ended up with this script, which works perfectly with Script2. This will be useful for anyone wanting to use adb and a script to remotely control an Android device.
This script opens a shell as the default pi user, and passes in the commands to it. Ensuring everything works as it should. |
Ok, so here is the complete solution for anyone that wants to control their Nvidia Shield (or any Android device) through HomeBridge with Script2.
HomeBridge Config Extract
shield-wake.sh
shield-sheep.sh
shield-state.sh
|
Glad you figured it out and thanks for the write up. I'm sure it will help others. |
No problem - hope it helps others. Yeah, I have it setup the same way. Homebridge runs as the homebridge user. I gave it access to this script, and sudo without password permissions - however I think this one is due to the fact the adb launches its own shell. |
I'm trying to get script2 to work with a adb (android debugger) shell script I have to remotely start a Nvidia Shield. This script works fine when executed in the shell, however doesn't work when executing with script2. When checking the logs, everything looks correct, however the shield doesn't start. Note again that the script works when fired in the shell.
Any help would be gratefully received!
The text was updated successfully, but these errors were encountered: