HDMI for Channels

-n component
Specify the component name with package name prefix to create an explicit intent, such as com.example.app/.ExampleActivity.

In my testing it's required on the 2023 onn streamer and the Chromecast with Google TV. It's not necessary on the Fire TV and some other devices.

I use -n when launching an app ..

adb -s %device% shell am start -n com.xfinity.cloudtvr.tenfoot/com.xfinity.common.view.LaunchActivity

no, seems to be everyone perpetuating this in scripts:
"-n com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity"

I find it is not necessary at least on a fire stick, and errors out. Maybe other devices need it.

I use the -n and I only have firesticks ...

adb -s 192.168.50.161 shell am start -n com.xfinity.cloudtvr.tenfoot/com.xfinity.common.view.LaunchActivity
Starting: Intent { cmp=com.xfinity.cloudtvr.tenfoot/com.xfinity.common.view.LaunchActivity }

Ahh, I see now. FWIW I also do not use -n

1 Like

I'm working on using the DirecTV app on a Fire Stick 4K Max with the URayCoder HEVC as the capture device. I'm able to change channels using a series of adb input commands, which is OK -- but I'm hoping someone's figured out a better way.

Also, I haven't been able to work out how to launch the DirecTV app from the Fire Stick home screen. What tools or adb commands are you all using to figure out how to launch a particular app, and for determining what options there might be for changing channels?

1 Like

This command will display only the log entries related to app launch events.
adb logcat | grep "ActivityManager: START.*cmp="

1|kara:/ $ logcat | grep "ActivityManager: START.*cmp="
06-18 10:12:03.832   482   482 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000100 cmp=com.amazon.tv.settings.v2/.system.FallbackHome} from uid 0
06-18 10:12:03.983   482   482 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000100 cmp=com.amazon.tv.settings.v2/.system.FallbackHome} from uid 0
06-18 10:12:07.516   482  1180 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x4000000 cmp=com.amazon.tv.launcher/.ui.HomeActivity_vNext} from uid 10154
06-18 15:27:21.665   482  1161 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.xfinity.cloudtvr.tenfoot cmp=com.xfinity.cloudtvr.tenfoot/com.xfinity.common.view.LaunchActivity} from uid 10196
06-18 15:27:23.507   482  1161 I ActivityManager: START u0 {cmp=com.xfinity.cloudtvr.tenfoot/com.xfinity.cloudtvr.view.BrowseActivity (has extras)} from uid 10195

Thanks @Edwin_Perez, that worked. I tried executing the command a couple of times on a Fire Stick that I'd been experimenting on for a few hours, and it just seemed to hang (very large log file perhaps?) -- but after rebooting the Fire Stick it ran quickly.

For the next person looking to launch the DirecTV app through adb, the command is:
adb shell am start -n com.att.tv/tv.youi.clientapp.AppActivity

How about individual channels?

I have spent ages playing with this, and cant figure out how to launch specific channels on android in dtv or fubo.

Yeah you're asking how people are getting the stream links to launch individual channels and I don't know either.

Depends if the Interface supports changing by Channel ,,, I do it by keystrokes down the guide then select the channel Number... but I use a different way and not the scripts posted here. I pass the channel number to the script. I use XFINITY Stream... and also to Change Channels in the HDHomeRun APP.

So I cannot really help you with these Scripts. Sorry.

@Elliot I'm not sure yet if there's a way to launch an individual channel with a single command in the DTV app, but it's possible there is not. In the meantime, with the DTV app running, the following allows for channels changes:

adb shell "input keyevent 20; sleep 3; input keyevent 22 22 22 22; input keyevent 20; sleep 3; input keyevent 66; sleep 2"
adb shell input text "HBO\ West\ HD"
adb shell "input keyevent 85; sleep 3; input keyevent 20 20 66"

These 3 commands will bring up the search box, input the channel name, and switch to it. The important thing here is to make sure the "channel name" you use has been tested to match exactly one channel. Sleep numbers may need to be tweaked for your environment.

I just starting working on this yesterday, so I've only been testing from the command line thus far...

EDIT (23 Jun 23): I've updated the above adb commands to reflect the latest sequences I'm using. I found these adjusted strings to produce the most reliable results for the DTV app on a FireTV Stick 4K Max (with Ethernet adapter).

4 Likes

@tmm1 I have a tuning script that runs fine from the command line on the androidhdmi-for-channels proxy host, but when executed as a channel change from the Channels DVR server it doesn't seem that enough time is allowed for the script to run. Based on this log output, it appears the script is run 4 times in about 5 seconds -- eventhough the error message suggests 17 or 18 seconds were allowed:

2023/06/19 08:38:15 Finished running /root/androidhdmi-for-channels/bmitune.sh in 18.012945869s
2023/06/19 08:38:17 Finished running /root/androidhdmi-for-channels/bmitune.sh in 17.840828269s
2023/06/19 08:38:19 Finished running /root/androidhdmi-for-channels/bmitune.sh in 17.88160747s
2023/06/19 08:38:20 Finished running /root/androidhdmi-for-channels/bmitune.sh in 17.529491871s

EDIT (23 Jun 23): This turned out to be the result of not having my Custom Channels - Stream Format set to MPEG-TS.

I've been toying around with Paramount+ and this is how I got it tuning live channels with that streamer with the windows .bat scripts I mentioned before which can be found are here The network URLs can be found by tuning in on the Paramount+ website.

In this example I am using Golazo and just a network I called test.

if "%p1%"=="test" (
    c:\platform-tools\adb -s %ip% shell am start -a android.intent.action.VIEW -d pplus://www.paramountplus.com/live-tv/stream/golazo/
    sleep 7
    c:\platform-tools\adb -s %ip% shell input keyevent 66;
    goto END
)

I had to use a keyevent to select the profile the app seems to demand you specify even if you only have one profile. Also, if you don't specify the network in the adb url (just pplus://www.paramountplus.com/live-tv/stream/) it appears it will go to the nearest geolocated CBS affiliate.

Anyway... maybe somebody has a better way with Paramount Plus.

I followed cyoungers' excellent example and had two Onn devices set up with YouTubeTV on a URayCoder 4-channel encoder.

This afternoon, however one of the devices now shows unauthorized:

192.168.1.192:5555     unauthorized
192.168.1.204:5555     device

Is there a way to keep them authorized? Do I need to ping them periodically?

1 Like

That's interesting. Once authorized I have not see a device become unauthorized. What happens when you adb connect to the device?

It results in “failed to authenticate to…” message. After that, it shows up in the list of devices with that unauthorized listing next to it.

When this has happened to me, I check the device's video output and see something like this on-screen:

1 Like

That screen may be there. Once I got the access setup and everything working, I moved them out to the shop to get them out of the way. Maybe there was an update to that unit that rebooted it. I’ll be back out there tomorrow to take a look.

Pretty sure it was waiting for authorization to debug. I've seen this a few times where I authorized it once and it worked for awhile and then would get a “failed to authenticate to…” message. I was pretty sure I selected the "always allow" checkbox.

I've not seen it happen for about a week now.