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

I hate to do it because I would rather identify and fix the root cause, but I just pushed an update in which ADBTuner will attempt to reconnect to the streaming endpoint a few times if that connection temporarily fails after starting to stream (FBE200).

@Fofer and @cyberskier when you have a free moment if you can update and test it will be much appreciated as always.

I just updated, and gave it a whirl. Maybe it is doing something on the backend without fixing the root cause, but to me, the end user, it seems to be working just like the first two encoders. :+1: :+1: I got two channels working on other devices, to force things thereafter to the FBE200, and I tried about 5 or 6 channels from the guide, and they all loaded fast. Perhaps there was a slight hitch after it first came in, but I'm not sure about that, and wouldn't even see it if I weren't looking for it. Thank you for this! I really appreciate all the effort you've put into this, and sharing it with the community.

3 Likes

I wouldn’t use the words loudly proclaimed. What I stated was exactly the truth and fact. I am assuming that something you did to the docker since then and revisiting those settings have now corrected the issue. Or maybe just uninstalling and reinstalling cleared an error I made. In any case it is working now. And I do loudly proclaim my extreme gratitude to you for this docker and your hard work. Thank you very much.

I'm also going to do an appreciation post to @turtletank for putting in an amazing effort deploying ADBTuner. It's been a really solid application given all a the variabilities in hardware configurations. It a has been really solid for me especially since I returned an old FireTV stick that I borrowed from a friend that was running Android OS 6. I picked up a Onn 4k box that that has been working just fine.

It's the Channels community that really makes the already great Channels app better. Thanks @turtletank !

2 Likes

Just wanted to say how fantastic I think this project is! Being in Canada it seems I can’t use it (I can’t find an app with deep links support :man_facepalming:), and have to use the original method, but wow, the ease of setup here is great (tested with Haystack)!

Thank you @turtletank and all that have contributed!

1 Like

The application is greqt!
@turtletank did a great job making this easy to use.
I'm working out different issues with my setup but I think it is worth the time and effort.
I'm now really enjoying Philo and Hulu Live tv much more with the additional of those missing channels.
I want to thank the community for all the hard work and efforts.
This product is great especially with such good community support.

Sure thing and wow! I updated just now and have done some limited testing, but can already see it's working much better, channel surfing pretty quickly and have yet to see a "connection to tuner was lost" error screen. This is still tuning faster, almost immediately. Seems faster than tuning to TVE channels in some cases! Incredible. Thanks so much for this, @turtletank. ADBTuner feels like a game-changer.

My statement there was meant to be a joke and there was quite a bit of hyperbole in my word choice there. I apologize if it didn't read that way.

@cyberskier and @Fofer Thanks again for testing that and I'm glad we were able to get something in place to address that issue we were seeing with the FBE200.

Thank you everyone for the kind words and thank you for all of the constructive criticism, feedback, log files, and other things you have done to help. Much appreciated.

Have you made any progress on Fubo by chance?

I know on iOS it's fubotv://media/station/1201230001?referrer=ios_app&action=play&content=sports (I just got the channel number from url in safari), problem is I can't seem to get com.fubo.firetv.screen to launch, it just says sh: /system/bin/sh: com.fubo.firetv.screen: not found

I got further!
./adb shell am start -a android.intent.action.VIEW -d "fubotv://media/station/129560?referrer=android_app" com.fubo.firetv.screen/tv.fubo.mobile.presentation.onboarding.dispatch.controller.DispatchActivity
Launches Fubo, but ADBTuner does not with that as the app for some reason. ADBTuner just seems to see the com.fubo.firetv.screen part.

I haven't been able to get Fubo to work.
I have a few channels working with CC4C which works perfectly.
Keep us posted!

Had a weird issue this morning where the NBC app didn't launch, even though the tuner log showed that it force stopped and then started the app. So my Onn stick just sat there on the home screen. Fortunately I caught it early enough to where I could delete the recording and restart it from the guide (British Open).

Hate to say it but this might be a case where you have to do a pidof command on the app to make sure it's running after you launch it. Or maybe wait a second after the force stop before you start it. I don't think you really need the force stop anyway because you're doing that as part of shutting it down from a prior recording, and the stick is not being used by anything else.

@GTFan, Can you share docker logs from when this happened? That would be a big help.

The "tuner" is locked until after force quit happens so it should not affect the tuning of another "channel." If it did, that's a bug and I will fix that.

In recent builds, and for channels in compatibility mode, the force stop is only triggered when tuning is complete. When tuning, the "-S" switch is added to am start when the app is loaded instead. This uses built in Android functionality to ensure the app is loaded fresh.

The "compatibility mode" feature I included, which is required for the NBC app, is intentionally very aggressive in closing apps because there are a lot of apps that don't behave well. Some apps ignore the MEDIA_STOP and MEDIA_PAUSE commands and just keep streaming. Some apps, like Philo, crash if you try to load content via am start while other content is already loaded.

There are a lot of compromises in this and I'm doing what I can to find a good middle ground between fast tuning and reliable tuning. I assure you there will be improvements on this as time goes on.

For a "simple" setup, anyone found anything better than the original HDMI for channels candidate? ( https://amzn.to/3SWso5n )

1 Like

Yeah we're out of town for a couple of days so I'll get back with you on that. I'll have to pull the latest image too since you've made some other changes.

Thanks for all your excellent support here, it really helps.

1 Like

ADBTuner tunes so quickly, and even this early, feels robust and stable. So I'm tinkering with other Android TV apps to "tune into" and stream from, into the Channels UI on AppleTV. I'm just manually sending adb commands, found a full listing here:

So for example, using adb -s [IP address] shell input keyevent 22 while watching the TikTok app, skips to the next video. And keyevent 21 skips back to the previous one. Of course this is really only of practical use when you're watching "live," i.e. not in the buffer. But the point I'm trying to make is, this same sort of control can be used to navigate to, or within, other apps too. This includes live TV apps that aren't deep-linkable, and apps that play video that wouldn't be considered live TV at all.

Anyway, my feature request is that ADBTuner gets a virtual remote control (like a mini widget, or pulldown menu) we can use to send the most common adb commands manually for content and/or navigation when troubleshooting, streaming or something else. And if we could save favorites and/or string together and assign multiple ADB commands as "tuning macros," that would open up more avenues too.

Just thinking out loud, I appreciate how great ADBTuner is right out of the gate. This development is liberating and exciting. Once again the future feels bright!

1 Like

I agree, not sure how ADBTuner does it but I'm glad it does haha.

Current Fubo Progress:

shell am start -a android.intent.action.VIEW -d "fubotv://al/v1/al1%3Fv%3D1%26a%3Dgoto%26d%3Dpage%26pn%3Depg" com.fubo.firetv.screen/tv.fubo.mobile.presentation.onboarding.dispatch.controller.DispatchActivity

Opens to the EPG, but for the life of me I can't get to a live stream for ADBTuner to work it's magic.

I wish I could help, but I don't have a Fubo TV account and I'm pretty sure I'm permanently banned because i used more than one free trial. :grinning:

I would look into using URLs that contain https://link.fubo.tv. Perhaps seeing if there are links in the web UI somewhere that go to a specific channel and using whatever path they have specified there.

$ adb shell dumpsys package com.fubo.firetv.screen
Activity Resolver Table:
  Schemes:
      fubotv:
        c823270 com.fubo.firetv.screen/tv.fubo.mobile.presentation.onboarding.dispatch.controller.DispatchActivity filter 27a266e
          Action: "android.intent.action.VIEW"
          Category: "android.intent.category.DEFAULT"
          Category: "android.intent.category.BROWSABLE"
          Scheme: "fubotv"
          Authority: "app_open": -1
          Authority: "al": -1
      http:
        c823270 com.fubo.firetv.screen/tv.fubo.mobile.presentation.onboarding.dispatch.controller.DispatchActivity filter ccc110f
          Action: "android.intent.action.VIEW"
          Category: "android.intent.category.DEFAULT"
          Category: "android.intent.category.BROWSABLE"
          Scheme: "https"
          Scheme: "http"
          Authority: "link.fubo.tv": -1
          Authority: "link.fubo.tv": -1
          Path: "PatternMatcher{PREFIX: /}"
          Path: "PatternMatcher{PREFIX: /}"
          AutoVerify=true
      https:
        c823270 com.fubo.firetv.screen/tv.fubo.mobile.presentation.onboarding.dispatch.controller.DispatchActivity filter ccc110f
          Action: "android.intent.action.VIEW"
          Category: "android.intent.category.DEFAULT"
          Category: "android.intent.category.BROWSABLE"
          Scheme: "https"
          Scheme: "http"
          Authority: "link.fubo.tv": -1
          Authority: "link.fubo.tv": -1
          Path: "PatternMatcher{PREFIX: /}"
          Path: "PatternMatcher{PREFIX: /}"
          AutoVerify=true

Edit: Also, can Fubo be added to the Live tab in Google TV? If so you can run adb logcat on that device and see what commands are run when you load the channel from the Live tab.

To some extent you're circling back to what the androidhdmi-for-channels extension (sullrich fork) is really good at, particularly live TV apps that aren't deep-linkable. I use ah4channels everyday, and although the tuning isn't super speedy, it works well for me with the DTV app (no deep link support).

As far as the "adb remote" you're talking about, that's available now for FireTV users, with Amazon's excellent "Fire TV" app which will connect via WiFi to any FireTV device and act as a remote when needed. Much, much better than trying to juggle multiple RF remotes for special navigation.

One other item worth mentioning that ah4channels works well for, is creating custom channels that are tied to special functions. E.G., I have a "channel" that does nothing but force an exit of the DTV app if things go pear-shaped, and another to reboot my FireStick if things go fully off-the-rails. Neither are needed much, but when they are it's great to be able to make those things happen right from the EPG.

I'm using one of the remote control apps from the iOS App Store to control both of my Fire devices plus my Onn box, all of which are connected to HDMI encoders, since they're in a utility room with my networking gear. I have a one-line FFMPEG command which I enter, specifying streamer IP address, duration of recording, and a file name. I then just use the remote app to hit "play" for a piece of content that normally wouldn't be in Channels (using VLC as I navigate the menu). But it would be nice if this could be easily automated within Channels.