Also here's the complete log from an attempt to record a channel. It looks to me like it times out and shuts down. I didn't stop it in Channels DVR even when I saw it was recording only pre-roll:
2026/09/27 18:13:23 [PREROLL] tuner= channel=WPBAD-8037961156532819105 answered at once with the pre-roll
2026/09/27 18:13:23 Attempting network tune for device http://192.168.99.15:8090/stream0 192.168.99.35:5555 WPBAD-8037961156532819105
2026/09/27 18:13:23 [EXECUTE] Running [./scripts/firetv/xfinity/prebmitune.sh 192.168.99.35:5555 WPBAD-8037961156532819105]
2026/09/27 18:13:24 [EXECUTE] Stdout: 'already connected to 192.168.99.35:5555
prebmitune.sh is exiting for 192.168.99.35:5555 with exit code 0
'
2026/09/27 18:13:24 [EXECUTE] Stderr: '+ streamerIP=192.168.99.35:5555
+ streamerNoPort=192.168.99.35
+ adbTarget='adb -s 192.168.99.35:5555'
+ mkdir -p 192.168.99.35
+ trap finish EXIT
+ main
+ adbConnect
+ adb connect 192.168.99.35:5555
+ local -i adbMaxRetries=2
+ local -i adbCounter=0
+ true
+ adb -s 192.168.99.35:5555 shell input keyevent KEYCODE_WAKEUP
+ local adbEventSuccess=0
+ [[ 0 -eq 0 ]]
+ break
+ finish
+ echo 'prebmitune.sh is exiting for 192.168.99.35:5555 with exit code 0'
'
2026/09/27 18:13:24 [EXECUTE] Finished running ./scripts/firetv/xfinity/prebmitune.sh in 1.125366128s
2026/09/27 18:13:24 [HOLD] tuner=192.168.99.35:5555 hold until the app is seen playing, showing the pre-roll
2026/09/27 18:13:24 [PREROLL] tuner= channel=WPBAD-8037961156532819105 stream ready in 1.237s; pre-roll carries on under the hold
2026/09/27 18:13:24 [EXECUTE] Running [./scripts/firetv/xfinity/bmitune.sh WPBAD-8037961156532819105 192.168.99.35:5555]
2026/09/27 18:15:43 [IO] io.Copy: write tcp 172.23.0.2:7654->192.168.99.61:50162: write: broken pipe
2026/09/27 18:15:43 [IOINFO] Successfully copied 48390260 bytes
2026/09/27 18:15:43 [IOINFO] Transfer speed: 2.748693631911477 Mbits/second
2026/09/27 18:15:43 Performing Close() for 192.168.99.35:5555
2026/09/27 18:15:43 [EXECUTE] Running [./scripts/firetv/xfinity/stopbmitune.sh 192.168.99.35:5555 WPBAD-8037961156532819105]
2026/09/27 18:15:43 [EXECUTE] Stdout: 'Current PID for this script is 189
Not a special channel (exit nor reboot)
Starting: Intent { act=android.intent.action.VIEW dat=https://www.xfinity.com/... cmp=com.xfinity.cloudtvr.tenfoot/com.xfinity.common.view.LaunchActivity }
bmitune.sh is exiting for 192.168.99.35:5555 with exit code 0
'
2026/09/27 18:15:43 [EXECUTE] Stderr: '+ dvr=192.168.99.61:8089
+ channelNameID=WPBAD-8037961156532819105
++ echo WPBAD-8037961156532819105
++ awk -F- '{print $2}'
+ channelID=8037961156532819105
++ echo WPBAD-8037961156532819105
++ awk -F- '{print $1}'
+ channelName=WPBAD
+ specialID=WPBAD
+ streamerIP=192.168.99.35:5555
+ streamerNoPort=192.168.99.35
+ adbTarget='adb -s 192.168.99.35:5555'
+ packageName=com.xfinity.cloudtvr.tenfoot
+ packageAction=com.xfinity.common.view.LaunchActivity
+ m3uName=xfinity.m3u
++ grep -B1 /play/tuner/WPBAD-8037961156532819105 /opt/m3u/xfinity.m3u
++ awk -F 'channel-id="' 'NF>1 {split($2, a, "\""); print a[1]}'
+ m3uChannelID=816
++ curl -s http://192.168.99.61:8089/api/v1/channels
++ jq -r '.[] | select(.id == "816") | .number'
+ channelNumber=816
+ [[ true == '' ]]
+ speedMode=true
+ read -a autoCropChannels
+ trap finish EXIT
+ main
+ updateReferenceFiles
+ mkdir -p 192.168.99.35
+ [[ -f 192.168.99.35/stream_stopped ]]
+ echo 0
+ [[ -f 192.168.99.35/last_channel ]]
+ echo 0
+ echo 189
+ echo 'Current PID for this script is 189'
+ matchEncoderURL
+ case "$streamerIP" in
+ encoderURL=http://192.168.99.15:8090/stream0
+ encoderStreamNumber=stream0
+ encoderIP=192.168.99.15:8090/stream0
+ encoderIP=192.168.99.15
+ specialChannels
+ '[' WPBAD = exit ']'
+ '[' WPBAD = reboot ']'
+ [[ -f 192.168.99.35/adbCommunicationFail ]]
+ echo 'Not a special channel (exit nor reboot)'
+ tuneChannel
+ adb -s 192.168.99.35:5555 shell am start -n com.xfinity.cloudtvr.tenfoot/com.xfinity.common.view.LaunchActivity https://www.xfinity.com/stream/live/WPBAD/8037961156532819105/WPBAD
+ echo -e '#!/bin/bash\n\nwhile true; do sleep 235m; adb -s 192.168.99.35:5555 shell input keyevent KEYCODE_DPAD_DOWN; done'
+ chmod +x ./192.168.99.35/keep_watching.sh
+ [[ -n 235m ]]
+ nohup ./192.168.99.35/keep_watching.sh
+ printf '%s\n'
+ grep -qx 816
+ :
+ finish
+ echo 'bmitune.sh is exiting for 192.168.99.35:5555 with exit code 0'
Terminated
'
2026/09/27 18:15:43 [EXECUTE] Finished running ./scripts/firetv/xfinity/bmitune.sh in 2m19.617921793s
2026/09/27 18:15:44 [PLAYBACK] start on a moving keyframe after 2m20.261s
2026/09/27 18:15:49 [EXECUTE] Stdout: 'Streaming stopped for 192.168.99.35:5555
Sleep initiated for 192.168.99.35:5555
192.168.99.35/stream_stopped written with epoch stop time
'
2026/09/27 18:15:49 [EXECUTE] Stderr: '+ dvr=192.168.99.61:8089
+ streamerIP=192.168.99.35:5555
+ streamerNoPort=192.168.99.35
+ channelNameID=WPBAD-8037961156532819105
+ adbTarget='adb -s 192.168.99.35:5555'
+ packageName=com.xfinity.cloudtvr.tenfoot
+ m3uName=xfinity.m3u
++ awk -F 'channel-id="' 'NF>1 {split($2, a, "\""); print a[1]}'
++ grep -B1 /play/tuner/WPBAD-8037961156532819105 /opt/m3u/xfinity.m3u
+ m3uChannelID=816
++ curl -s http://192.168.99.61:8089/api/v1/channels
++ jq -r '.[] | select(.id == "816") | .number'
+ channelNumber=816
+ [[ true == '' ]]
+ speedMode=true
+ read -a autoCropChannels
+ printf '%s\n'
+ grep -qx 816
+ main
+ [[ -n croppedChannel ]]
+ matchEncoderURL
+ case "$streamerIP" in
+ encoderURL=http://192.168.99.15:8090/stream0
+ encoderStreamNumber=stream0
+ encoderIP=192.168.99.15:8090/stream0
+ encoderIP=192.168.99.15
+ bmituneDone
+ bmitunePID=189
++ pgrep -f 192.168.99.35/keep_watching.sh
+ keepWatchingPID=209
++ pgrep -P 209
+ keepWatchingCPID=210
+ [[ -n '' ]]
+ ps -p 189
+ [[ -n 235m ]]
+ kill 209 210
+ rm ./192.168.99.35/keep_watching.sh
+ [[ -n '' ]]
+ rm ./192.168.99.15/stream0.sh
rm: cannot remove './192.168.99.15/stream0.sh': No such file or directory
+ adbStop
+ [[ true == \t\r\u\e ]]
+ stop='input keyevent KEYCODE_BACK; input keyevent KEYCODE_HOME'
+ adb -s 192.168.99.35:5555 shell input keyevent 'KEYCODE_BACK;' input keyevent KEYCODE_HOME
+ sleep 2
+ echo 'Streaming stopped for 192.168.99.35:5555'
+ adbSleep
+ sleep='input keyevent KEYCODE_SLEEP'
+ adb -s 192.168.99.35:5555 shell input keyevent KEYCODE_SLEEP
+ echo 'Sleep initiated for 192.168.99.35:5555'
+ date +%s
+ echo '192.168.99.35/stream_stopped written with epoch stop time'
'
2026/09/27 18:15:49 [EXECUTE] Finished running ./scripts/firetv/xfinity/stopbmitune.sh in 5.857724056s
2026/09/27 18:15:49 [GIN-debug] Request: 192.168.99.61 GET /play/tuner/WPBAD-8037961156532819105, latency: 2m26.696604735s, status: 200





