Thanks for the ideas everybody, I'm trying again with a clearer head. Inching closer and closer to getting it working! I started over from scratch, edited all the files as discussed above, built the app again, and ran only the new one. Now I'm not getting that same "connection refused" error on CDVR client interface, it's actually tuning into the HDMI output (!)
But it's still not changing the channel to MSNBC :-/
I checked the file permissions (see screenshot, I also clicked the gear menu to "apply to enclosed items...") and also ran chmod +x on (all three) .sh files.
I can confirm the app is now referencing the proper location of the executable at /Volumes/Channels-DVR/androidhdmi-for-channels/prebmituneb.sh instead of /opt/opendct -- but it is still giving the error "Failed to run pre script: fork/exec /Volumes/Channels-DVR/androidhdmi-for-channels/prebmituneb.sh: no such file or directory"
Thanks, you may be on to something there. When I try that command I get this "not found" response. Even though androidhdmi-for-channels is definitely running, as I can see activity in the separate Terminal window when I try to tune in and out of MSNBCvia the CDVR client?
My M3U is:
#EXTM3U
#EXTINF:-1 channel-id="msnbc" channel-number="100.1" tvc-guide-placeholders="86400", MSNBC
http://10.0.1.21:7654/play/tuner/msnbc
and my bmitune.sh is this:
#!/bin/bash
HOME="input keyevent KEYCODE_HOME; sleep 1"
PRIME1="input keyevent 19 19 19 19; sleep 1; input keyevent 21 21 21; sleep 1; input keyevent 22; sleep 1; input keyevent 23; sleep 1"
PRIME2="input keyevent 19; sleep 1"
PRIME3="input keyevent --longpress 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67"
SEARCH1="input keyevent 66; sleep 2"
SEARCH2="input keyevent 66"
#MSNBC
if [ $1 = "136" ];then
adb shell $HOME
adb shell $PRIME1
adb shell $PRIME2
#adb shell $PRIME3
adb shell input text "stream\ msnbc\ on\ YouTube\ TV"
adb shell $SEARCH1
adb shell $SEARCH2
fi
Any other guesses or clues appreciated.