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

I don't think anyone can really answer this. Will it work forever? No. Will it work for a few years? Probably.

However, any purchased HDMI hardware could most certainly be repurposed to a non-android solution if that becomes a necessity.

If you use tuner sharing in Channels DVR and load the channels through Channels DVR I believe this should work.

I have quite the problem here. I have ADBTuner set up just fine with the latest version/container running through Docker Desktop for windows (also using the latest version of Docker Desktop for Windows). I'm using a LinkPi Encoder box along with an Onn Google TV 4k (these are also up-to-date with the latest updates/firmware). From what I can tell I also have all of these things properly set up from reading through all the forums here and following the instructions on the docker hub adbtuner page (device is in developer mode, not connected to any other adb devices, device is set to always have the screen on and not go to sleep, device was approved for an adb connection, etc.)

When I go to my ADBTuner webpage, it will show that the endpoint connection was successful, the onn device is running Android 12, and it's available. So finally getting to my main point here, when I select a channel to play in "Channels", here is what I typically get first:


followed by:

You'll notice that it says pressing play to try again, and after like tons of times doing this, everything finally seems to work and the channel will play. But what is weird here is, while I'm getting these tuner failure messages and connection lost messages, my ADBTuner webpage will show the little blue icon at the top that it's locked into whatever channel I had selected on "Channels". And what's even weirder is, I'll login to my settings for the LinkPi Encoder box and the preview will actually show the channel playing on the onn Google TV 4k device. Here are some examples of what my logs look like on channels when these error messages are displaying:

2024/08/27 12:48:27.464578 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: 901 Tuner Unreachable: Timeout after 20.01s connecting to: http://127.0.0.1:5592/stream/22
2024/08/27 12:48:57.350845 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: 901 Tuner Unreachable: Timeout after 27.32s connecting to: http://127.0.0.1:5592/stream/22
2024/08/27 12:51:19.573926 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: 901 Tuner Unreachable: Timeout after 20s connecting to: http://127.0.0.1:5592/stream/22
2024/08/27 12:51:34.254659 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: GET: http://127.0.0.1:5592/stream/22: 404 Not Found
2024/08/27 12:51:47.067588 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: GET: http://127.0.0.1:5592/stream/22: 404 Not Found
2024/08/27 12:52:02.100969 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: GET: http://127.0.0.1:5592/stream/22: 404 Not Found
2024/08/27 12:52:26.702101 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: GET: http://127.0.0.1:5592/stream/22: 404 Not Found
2024/08/27 12:54:18.205539 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: 901 Tuner Unreachable: Timeout after 20.01s connecting to: http://127.0.0.1:5592/stream/22
2024/08/27 12:54:31.349617 [ERR] Could not start stream for M3U-ADBTuner ch52 Discovery Family: M3U: GET: http://127.0.0.1:5592/stream/22: 404 Not Found
2024/08/27 12:55:43.116533 [ERR] Could not start stream for M3U-ADBTuner ch50 Story TV: M3U: 901 Tuner Unreachable: Timeout after 28.51s connecting to: http://127.0.0.1:5592/stream/20
2024/08/27 12:56:11.330325 [ERR] Could not start stream for M3U-ADBTuner ch50 Story TV: M3U: 901 Tuner Unreachable: Timeout after 22.57s connecting to: http://127.0.0.1:5592/stream/20

And here are examples of what I'm getting in the logs of my adbtuner container in docker:
2024-08-27 15:16:08 2024-08-27 19:16:05.188 - server - No tuners available.
2024-08-27 15:16:08 2024-08-27 19:16:08.247 - server - No tuners available.
2024-08-27 15:16:08 2024-08-27 19:16:08.443 - uvicorn.access - 172.17.0.1:41962 - "GET /stream/12 HTTP/1.1" 404
2024-08-27 15:16:27 2024-08-27 19:16:27.097 - server - No tuners available.
2024-08-27 15:16:27 2024-08-27 19:16:27.098 - uvicorn.access - 172.17.0.1:60332 - "GET /stream/12 HTTP/1.1" 404
2024-08-27 15:16:51 2024-08-27 19:16:51.594 - server - No tuners available.
2024-08-27 15:16:51 2024-08-27 19:16:51.595 - uvicorn.access - 172.17.0.1:54392 - "GET /stream/12 HTTP/1.1" 404
2024-08-27 15:17:17 2024-08-27 19:17:17.523 - server - No tuners available.
2024-08-27 15:17:18 2024-08-27 19:17:17.524 - uvicorn.access - 172.17.0.1:59780 - "GET /stream/12 HTTP/1.1" 404
2024-08-27 15:17:40 2024-08-27 19:17:40.660 - server - No tuners available.
2024-08-27 15:17:40 2024-08-27 19:17:40.661 - uvicorn.access - 172.17.0.1:34014 - "GET /stream/11 HTTP/1.1" 404
2024-08-27 15:19:01 2024-08-27 19:19:01.514 - uvicorn.access - 172.17.0.1:40256 - "GET / HTTP/1.1" 200
2024-08-27 15:19:07 2024-08-27 19:19:03.319 - uvicorn.access - 172.17.0.1:40254 - "GET /js/main.js?t=1724786335 HTTP/1.1" 200
2024-08-27 15:19:07 2024-08-27 19:19:03.392 - uvicorn.access - 172.17.0.1:40256 - "GET /css/style.css?t=1724786335 HTTP/1.1" 200
2024-08-27 15:19:20 2024-08-27 19:19:20.137 - lib.adb - ADB: Connecting to device (attempt 1).
2024-08-27 15:19:20 2024-08-27 19:19:20.158 - lib.adb - ADB: Connecting to device (attempt 1).
2024-08-27 15:19:21 2024-08-27 19:19:21.666 - lib.adb - ADB: Connected.
2024-08-27 15:19:21 2024-08-27 19:19:21.695 - lib.adb - ADB: Connected.
2024-08-27 15:19:21 2024-08-27 19:19:21.697 - lib.adb - ADB: 192.168.1.31 - settings list global
2024-08-27 15:19:21 2024-08-27 19:19:21.697 - lib.adb - ADB: 192.168.1.31 - settings list global
2024-08-27 15:19:22 2024-08-27 19:19:22.066 - root - adb_allowed_connection_time=0, adb_enabled=1, adb_wifi_enabled=0
2024-08-27 15:19:22 2024-08-27 19:19:22.117 - lib.adb - ADB: 192.168.1.31 - pm list packages -3
2024-08-27 15:19:22 2024-08-27 19:19:22.394 - root - adb_allowed_connection_time=0, adb_enabled=1, adb_wifi_enabled=0
2024-08-27 15:19:22 2024-08-27 19:19:22.413 - lib.adb - ADB: 192.168.1.31 - dumpsys display
2024-08-27 15:19:24 2024-08-27 19:19:24.061 - uvicorn.access - 172.17.0.1:60732 - "GET /admin/tuner/installed-packages?=1724786343678 HTTP/1.1" 200
2024-08-27 15:19:24 2024-08-27 19:19:24.554 - lib.adb - ADB: 192.168.1.31 - getprop ro.build.version.release
2024-08-27 15:19:24 2024-08-27 19:19:24.658 - lib.adb - ADB: Android Version: 12.0.
2024-08-27 15:19:38 2024-08-27 19:19:38.236 - httpx - HTTP Request: GET http://192.168.1.26:8090/stream0 "HTTP/1.0 200 OK"
2024-08-27 15:19:38 2024-08-27 19:19:38.563 - uvicorn.access - 172.17.0.1:40254 - "GET /admin/tuner/metadata?
=1724786343676 HTTP/1.1" 200
2024-08-27 15:20:06 2024-08-27 19:20:06.660 - server - No tuners available.
2024-08-27 15:20:06 2024-08-27 19:20:06.661 - uvicorn.access - 172.17.0.1:60656 - "GET /stream/11 HTTP/1.1" 404

What's even stranger about all of this is, I decided to remove the tuner from my ADBTuner webpage, and then re-add it, and right after I do that, everything works flawlesly. But then usually after 15 minutes or something, it goes right back to all these errors again. I'm at a complete loss here for what's going on. I've reset/powered off/restarted/unplugged etc. just about every device imaginable including my router and still no luck. I'm really hoping someone else on here has experienced this problem and figured out a fix or knows what exactly is going on. Really appreciate any help that can be provided. Thanks!

I'm not certain if you may be having the same problem I had when I set up my LinkPi and ADBTuner. The LinkPi comes with RTSP streams configured as default. Here's a link to my post with how I managed to get my hardware communicating properly: :smiley:

1 Like

Post your config for the linkpi, adbtuner, and channels and we can all take a look

I have mine set up exactly how you describe as well. I have just the one port LinkPi so only one onn Google TV 4k plugged into it. But my settings are exactly the same as yours including having MPEG-TS in the Channels source settings. The only minor difference I see...not really sure if it makes a difference...is that it looks like you have a sub stream turned on where as I do not:

Here are my linkpi configurations...I tried to attach as many screen captures as possible:












Here are my channels configurations:

And finally, my ADBTuner configurations:



One thing I do notice about the ADBTuner configs is the streaming endpoint address does not have /live in it but includes a port which I remember reading a post somewhere in this forum about doing it that way for the ADBTuner settings. But maybe that actually is the problem? I should also point out that for all the channels I have listed under my ADBTuner configurations, I have compatibility mode selected.

2 Likes

I turned the sub-stream off after reviewing my settings later. It works fine without it.

Have you verified that you have the correct play url entered as your streaming endpoint in ADBTuner? Yours looks to be http://192.168.1.26/live/stream0

After reviewing all of your screen captures of settings, I don't think that your Streaming Endpoint in ADBTuner is correct. Try using http://192.168.1.26/live/stream0 as it shows in your LinkPi "play url" tab under "Main URL"

I did try that format as well and unfortunately no luck. Same results.

I tried that format as well but no luck…same results.

That's a bummer. There's a lot of very helpful folks in this group. It took a bit of support to get my setup running well. I hope you get it figured out.

My setup is working and it is mostly the same, except on the Video tab, I have "full frame deinterlace" and "NTSC compatible" turned on and I use 16000 kbits/s - one thing that I noticed is that the google tv capture boxes need to be able use their hard-coded DNS servers - when I wrote a Unifi router rule to block DNS queries, except those going through my AdGuard DNS servers, I couldn't get a stream from the boxes - not sure if that helps...
EDIT: one other thing that I have noticed is that sometimes, if I change a setting on the LinkPi, then sometimes it doesn't work at all until I perform 1 or 2 resets or power cycles

In your custom source configuration within Channels DVR, can you try using the IP address of the device that is running ADBTuner (http://192.168.1.xx:5592/channels.m3u) instead of referencing it via localhost (127.0.0.1)? I don't know that this is the problem, but your configuration is unusual in this regard so it's worth a shot.

I changed the IP address to the format you suggested, I also turned on "full frame deinterlace" and "NTSC compatible" under the video tab of my LinkPi config and changed the bit rate to 16000 kbits/s as JT-DFW suggested above and things seem to work a little better, but it's still hit or miss. One moment, everything will play just fine, both on my iphone or through my FireTV Cube. Then moments later, it's right back to the tuner unreachable and m3u link not found errors. It almost seems like at certain times, Channels DVR is just failing to talk with the tuner since my logs are showing tuner unreachable errors and timing out after 20 some seconds. I wonder if it's possible I just need a new router? I have a Netgear Nighthawk AC1900 R7000 router and I've had it for probably 2-3 years now. I have roughly like 20 devices connected to this router daily. I have my LinkPi encoder box connected to the router through hard wire ethernet. One thing that is interesting is that there's always been an orange light on the router for this connection while it's a white light for my PC connection. From my reading, it seems the orange light means the connection works, but it just works at a slower speed. I just wonder if maybe this is the reason for the problems and at the end of the day I just need to get a new router. And finally, I do have “compatibility mode” checked for all the channels I have loaded in ADBTuner. Do you think it’s possible turning off “compatibility mode” would help? Really appreciate everyone's input with this and various tips. Thanks!

I know nothing about LinkPi interface, but if it has settings for it's network double check those.
Also try a different cable to router and even a different port before marking the router as needing replacement. This is just my suggestions.

An orange led for your Ethernet connection to the LinkPi indicates the there is only a 10/100 Mbps connection established. The LinkPi supports up to gigabit (1000 Mbps). It should show a white led for that connection. I'd definitely try a different cable and/or port on your router, as @TerryD suggested.

Lets factor adbtuner out of the equation and see if Channels can successfully communicate with linkpi reliably.

Create a custom channel, mpeg-ts and text for the data entry

edit the info below to match your setup. I used this to troublehsoot a an issue with one of my devices. Navigate to 31001 on the channels app (or whatever channel is auto assigned if u you dont use my channel #.) With the android device remote in hand, tune to some channel on the android ui and just let it run and see if you have any issues.

Also IMHO i wouldnt set the bitrate so high. I have mine at 8000kbps. Any higher and i had issues with linkpi and cpu utilization as well as channels bufferring (i am running 5 devices so that may have been the cause). In any case, for troublshooting i would back that down.

#EXTM3U
#EXTINF:-1 channel-id="LinkPiHDMI3" channel-number="31001" tvg-name="LinkPiHDMI3" tvc-guide-placeholders="false" tvc-guide-title="LinkPi HDMI 3" tvc-guide-description="LinkPiHDMI3" ,LinkPi HDMI3
http://192.168.12.16:8090/stream2

Does the Streaming Endpoint URL work in VLC? If you don't have VLC, download it and open a Network Stream to your LinkPi "stream0", see if you get video.

I created the custom channel and when I select it in my channels app, it loads instantly showing the main menu of my onn Google TV 4k device. I then select whatever on the onn device and it loads the video full-screen like normal and plays perfectly fine. I let it sit for a bit too and there were no drop-outs or anything. I also tried different ethernet ports on my router and still get the orange light. As for the cable I'm using, I've only had it for a couple months...got it at the same time I got the LinkPi box. It's an onn 25ft CAT6 cable. Still at a loss here for what is going on.

Yup...works just fine in VLC