ADBTuner: A "channel tuning" application for networked Google TV / Android TV devices

I don't know if it's an ADBTuner glitch, a Channels DVR glitch, or something else, but I'm seeing & showing up expanded to & in the Live TV guide. For example, the Philo channel Heroes & Icons shows up at Heroes & Icons. I don't have any channels in my other sources with & to compare.

For the ADBTuner channels, I also see the same & expansion in program titles, and I don't see that in program titles for other sources. I don't think ADBTuner has anything to do with how the program data is processed, but maybe it's some kind of problem for custom channels in general.

For those using ADBTUNER with XFINITY Stream they changed the call sign for SHOWTIME .. in my case Pacific time changed to PSHwH

A long shot, but has anybody gotten the PBS app to work with ADBTuner? I can manually launch it with adb navigation commands (home, left, select, etc), but that's pretty fragile. I'm a long-time software developer, but I don't have any significant experience in the Android development ecosystem, so I'm not sure how to dig in.

Why do I want to get the PBS app working? I live in the Seattle area, and my house happens to have great OTA reception for most channels. But we have two PBS stations: Seattle and Tacoma. They have differences in programming, so we support them both. I can't receive the Tacoma station on my antenna. (I have tried a lot of antenna tricks. :frowning: )

Have you tried the vlc-bridge-pbs Docker container? You can install it individually, or via Project One-Click in OliveTin:

No, I wasn't aware of vlc-brdige-pbs. I'll give it a look.

FYI, I can get the PBS app to launch by giving com.pbs.video/com.pbs.video.StartupActivity for the ADBTuner package name. (I realize that that's both a package name and an intent (or something), but it seems to work through some lucky accident.) I can also get the app launched similarly in adb:

$ adb shell am start com.pbs.video/com.pbs.video.StartupActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.pbs.video/.StartupActivity }

That part is possible with any app -- the important question, with ADBTuner anyway, is does the app support deeplinks? If it doesn't, then you'd need to use the ah4c project where you can do remote control emulation via bash scripting.

If the vlc-bridge-pbs project gives you the stations you're looking for -- that's the easiest way. And if you get OliveTin up-and-running, all known channels-related extensions are easily installed -- both the container config, and the CDVR custom channels setup are done for you.

1 Like

Man, that was easy. Thanks for the pointer. I set up vlc-bridge-pbs individually, but I'll also have a look at the OliveTin stuff. Maybe I'm not watching enough TV.

1 Like

As @bnhf suggested, nobody ever tried this approach (ah4c or ADBTuner) because there is a better way.

To be thorough, I did just check and the PBS app does support deep links, but not for live TV. PBS being as awesome as they usually are have their deep link structure documented.
https://docs.pbs.org/space/RES/3965277/OTT+Deep+Link+Templates+and+Guidance

1 Like

I'm not sure what the real intersection is between the PBS livestream and deep linking. (I'm not trying to argue or disagree. I'm really saying I'm not sure.)

The web URL for the livesteam is a constant: https://player.pbs.org/ga-livestream-portalplayer/. There can be other goop tacked on the end, but it's not needed.

But if you just open that URL in incognito mode, it gives the expected error about not knowing what station interests you. I think they normally get that info from the browser referrer link and something from cookies, or if you go to pbs.org directly and login they know who you are. And, of course, we all know they apply geographic restrictions based on your source IP address.

I know I'm probably getting far afield from the "it just works" intent of ADBTuner. I'm just trying to be lucky. :slight_smile: vlc-bridge-pbs doesn't provide CC, which is a must-have in my house.

1 Like

The application itself has to know what to do with the URL. https://player.pbs.org is not a URL it is prepared to handle. Per the application manifest (AndroidManifest.xml) in the decompiled apk file it supports URLs such as:

www.pbs.org/video/
www.pbs.org/show/
www.pbs.org/launchApp
pbsvideo://video.pbs.org/video/
pbsvideo://video.pbs.org/profile_callback
...

These things match up to the documentation provided by PBS which states:
Note: Currently we do not support deep linking to the Live TV feed.

In other words there is no magic URL that will open the live stream in the Android TV app.

Unfortunately this makes it a bad candidate for ADBTuner. With ah4c you can open the app and then use remote commands to click the appropriate button in app to start the stream. That will be the best bet and the app should remember that you had captions on.

1 Like

Has anybody got this to work with Max to open a TNT hockey or basketball game?

@turtletank, thanks for providing this awesome app to the community. I have 2 HDMI video encoders and 2 GCCTV dongles working perfectly. It works well with Channels DVR and Windows Media center. Good work and thank you!

Yup, the deeplinks are event specific, but it does work. See my above posts on it.

I have a problem getting the latest :stable version working with 1 of 4 devices ; working = Nvidia Shield 2015 (non-pro), Onn TV 4K, Onn TV 4K Pro ; not working = Nvidia Shield 2019 - The NS19 exits a second after tuning the desired channel in YTTV - I've performed a factory reset and still have the same problem - (I've been moving equipment - using Onn TV boxes as clients and getting wired devices to use for the encoders) - any thoughts?

EDIT: nevermind - just noticed I forgot to put the port number 8090 into the LinkPi address - now it's working...

Got two questions. My system has been running perfectly, but it's been a while. Should I bother trying to update my docker-compose?
Second question, How do I go by converting my current running copy to a portainer copy without messing anything up? :slight_smile:

You can export your channel list into a file, create a new Portainer stack per the May 11 post by bhnf and then re-import the channel list - you will have to re-enter the encoder setup, but that is easy

ADBTuner has been working great for quite some time for me but lately I've been seeing recordings failed. It seemed intermittent but now I saw what was going on.

Here is my configuration:
2 Mecool devices
1 Chromecast
1 Onn
Provider is YTTV

I thought my second Mecool device was the source of the problem so I used the excellent feature of setting the tuner priority to that device to 4 so that it would pick that tuner last. That seemed to fix this issue at least until I had to record 4 channels at the same time (something I don't think I've ever done IRL). Well, I had a failed recording but this time on the Chromecast device.

After trying recording on each device individually while watching the tuning happening by viewing the video output of the encoder, I noticed that Channels gave up on the channel tuning if the ADB device took too long to tune. In the failed recording case, the YTTV app displayed two different YTTV logo screens before it successfully tuned to the selected channel. This delay in tuning caused Channels to give up waiting for a stream and responds with:

In a normal working tuning case I do not see those two YTTV logo screens before the video streams starts. The extra delay of the YTTV app displaying those logos is causing Channles to abort the tuning.

ADBTuner has been a game changer now that TVE has gone the way is has. Any ideas of how to get around this issue?

EDIT: I now see that long tuning with the two YTTV logos before streaming starts (but Channels tuning timeout) happens the first tuning after a device reboot. Then every other tuning on that device is fast and Channels does not timeout.

Any chance you can get me the docker logs from when this happens? That would provide some more insight.

I have found that it's helpful to disable automatic app updates and to configure the device so it never sleeps.

1 Like

I think I know how to disable sleep if that is the same as setting the display to not sleep. Could you give me a hint of where to find the disable automatic updates? I can't seem to find it.

Here is a container log for a case where the device was rebooted and the first tune attempt failed.

Summary
2024-06-10 17:44:43.159 - server - Available Tuners:
2024-06-10 17:44:43.159 - server - Name: Port2-YTTV Priority: 1
2024-06-10 17:44:43.159 - server - Name: Port1-YTTV Priority: 2
2024-06-10 17:44:43.159 - server - Name: Port3-YTTV Priority: 2
2024-06-10 17:44:43.159 - server - Name: Port4-YTTV Priority: 2
2024-06-10 17:44:43.159 - server - Using first available tuner (by priority).
2024-06-10 17:44:43.160 - server - Reserved Tuner: Name: Port2-YTTV Priority: 1
2024-06-10 17:44:43.160 - server - Using tuner id: 3 for stream.
2024-06-10 17:44:43.160 - uvicorn.access - 192.168.0.11:35518 - "GET /stream/129 HTTP/1.1" 307
2024-06-10 17:44:43.163 - server - Tuner: Tuning to MSNBC on Port2-YTTV
2024-06-10 17:44:43.165 - lib.adb - ADB: Connecting to device (attempt 1).
2024-06-10 17:44:43.283 - lib.adb - ADB: Connected.
2024-06-10 17:44:43.283 - lib.adb - ADB: 192.168.0.29 - dumpsys display
2024-06-10 17:44:43.517 - lib.adb - ADB: 192.168.0.29 - getprop ro.build.version.release
2024-06-10 17:44:43.665 - lib.adb - ADB: Android Version: 11.0.
2024-06-10 17:44:43.666 - lib.adb - ADB: 192.168.0.29 - pm list packages -3
2024-06-10 17:44:44.045 - lib.adb - ADB: 192.168.0.29 - pidof com.google.android.youtube.tvunplugged
2024-06-10 17:44:44.367 - lib.adb - ADB: Stopping media playback.
2024-06-10 17:44:44.367 - lib.adb - ADB: 192.168.0.29 - input keyevent KEYCODE_MEDIA_STOP
2024-06-10 17:44:48.854 - root - Using https://tv.youtube.com/watch/q6bWEVqhP8o to load channel.
2024-06-10 17:44:48.854 - lib.adb - ADB: 192.168.0.29 - am start -a android.intent.action.VIEW -d "https://tv.youtube.com/watch/q6bWEVqhP8o" com.google.android.youtube.tvunplugged
2024-06-10 17:44:53.956 - server - Tuner: Waiting for playback start. Status: unknown
2024-06-10 17:44:59.215 - lib.adb - Checking for profile screen
2024-06-10 17:45:01.497 - lib.adb - On screen text: "batt wa".
2024-06-10 17:45:03.286 - lib.adb - Checking for profile screen
2024-06-10 17:45:06.014 - lib.adb - Checking for profile screen
2024-06-10 17:45:10.031 - lib.adb - Checking for profile screen
2024-06-10 17:45:11.249 - lib.adb - Failed to get status from media_session.
2024-06-10 17:45:12.646 - lib.adb - Checking for profile screen
2024-06-10 17:45:13.878 - lib.adb - Failed to get status from media_session.
2024-06-10 17:45:17.040 - lib.adb - Detected 100.0% black pixels. Assuming HDCP is active and video is playing.
2024-06-10 17:45:17.040 - server - Tuner: Tuning completed in 33.88 seconds. Display was on, application (com.google.android.youtube.tvunplugged) was closed.
2024-06-10 17:45:17.040 - lib.adb - ADB: Closing connection - 192.168.0.29
2024-06-10 17:45:17.041 - server - http disconnect
2024-06-10 17:45:17.044 - lib.adb - ADB: Connecting to device (attempt 1).
2024-06-10 17:45:17.103 - root - Tuner: Stream open (attempt 1).
2024-06-10 17:45:17.118 - lib.adb - ADB: Connected.
2024-06-10 17:45:17.118 - lib.adb - ADB: Stopping media playback.
2024-06-10 17:45:17.118 - lib.adb - ADB: 192.168.0.29 - input keyevent KEYCODE_MEDIA_STOP
2024-06-10 17:45:17.160 - httpx - HTTP Request: GET http://192.168.0.168/4.ts "HTTP/1.1 200 OK"
2024-06-10 17:45:19.299 - lib.adb - ADB: 192.168.0.29 - input keyevent KEYCODE_MEDIA_PAUSE
2024-06-10 17:45:20.569 - lib.adb - ADB: Closing connection - 192.168.0.29
2024-06-10 17:45:20.570 - server - Released tuner ID: 3
2024-06-10 17:45:20.570 - server - Tuner: Cleanup complete. Port2-YTTV (MSNBC)

1 Like

Good morning all! I have been using ADBTuner on 3 encoders with great success for a while now. I see a recurring issue with the Firesticks wanting to reauthenticate ADB before they will go back to the home screen. I have set them to remember ADB authorization when it pops up but some weeks later both Firesticks and one Tivo will ask for authorization again. Is it something I did or just something to live with?