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

It's easy to lose track of time when you're trying to chase down elusive tech quirks. Thank you very much for dedicating so much time and effort to this pursuit.

I did look at the specs of the different onn boxes. The 4k is wifi 5, the others wifi 6. The 4k and plus have 2GB ram, pro has 3GB. Storage: 4k:8GB, Plus:16GB, Pro:32GB. The processors are all fairly similar.

I'm just beginning to learn a little of this stuff as it relates to ADBTuner. It was only this past week when I learned how to use a json editor in very most basic terms. :laughing: I have no idea how to create these configuration json files for ADBT. I'm interested to see what commands can be used and how much may carry over from the AH4C setup. (which I know even less about).

Been testing today with the goal of reliable tuning using DTV App and Onn 4K boxes. I pulled one of my Onn 4K (O4K) out of mothballs, put into production to test with the newer Onn 4K Plus (O4KP) boxes.

General Findings

  • On my network, the O4K Boxes (WiFi5) had at least 2-3 times greater network latency than the O4KP Boxes (WiFi6).
  • From cold start, the DTV App launches in about half the time on the O4KP versus the O4K.
  • Once stream has started, the DTV app video quality is about the same on O4K and O4KP.
  • When the O4K is in standby by or Doze (deep sleep), the wake up command introduces a good bit of network latency which I don't see on the O4KP boxes.
  • The O4K has another latency spike once the DTV App is open, likely as it tries to start the preview video for last channel tuned.
  • If the DTV app is left open, or tuning fails leaving the app in limbo, it will not reliably respond to Deep Links. In fact, it made one of my O4KP boxes stop responding to physical remote commands.

Comments

Right off the bat, I will be the first to admit my WiFi testing is not scientific. Comparing WiFi5 to WiFi 6 is not direct, and everyone has a different RF environment in their homes.

Less interesting is the latency difference, but the impact activity seems to have on latency. The O4K would, lightly, blip when resuming from sleep and during DTV app start up. I suspect this is the CPU at play. The O4KP does not seem to be bothered by the activity. As observed during reboots, app launches and overall UI responsiveness, the O4KP CPU is noticeably faster. I've also noticed in previous testing my O4K boxes are not predictable, don't always act the same. I suspect this is also CPU related, thermal throttle as the O4K boxes can get warm. Granted, they are a few years old.

Testing and Results

I focused most of my testing on DirectTV App quirks. As mentioned earlier, the app can get set into a "wonky" state. It just stops responding to ADB and will leave the tuner open in ADBTuner. This is not ideal. I found restarting the DTV App fresh at each tune is the best hope for response to deep link. This does mean tuning is not as fast as leaving the app open, but I could not find a predictable way to do this, at least on the O4K boxes.

Next I worked around the little latency blips I experienced. I realized the O4K needs a small delay from sleep to home screen, before launching the DTV app. Coming out of sleep, the load of launching the DTV app added enough latency to periodically fail ADBTuner connection. Sometimes this was a failed tune, other times a tuner left open. Adding just a few second delay between the ADBTuner pre-tune and tuning commands, via custom config, did the trick. This even seems to work around resume from Doze/Deep sleep.

Lastly, I worked to keep tuners from being locked in ADBTuner. I found powering down the device at end of tune would not only save power, but make the device less "busy" for the next time the device was called to tune. And it cuts down CPU time, both on the O4K and my LinkPi.

In attempt to simulate worst case scenarios, I tested the O4K box while my other four tuners were live. I also put the O4K into deep sleep to test slow, wake response. During my few hours of testing, the O4K worked pretty well. Tuning was was in the 12 second range.

Recommendations

In case you skipped to this section in TLDR fashion, here is what I recommend.

  • Open a fresh copy of the DTV app at each tune.
  • Disable any unnecessary network settings on O4K to limit CPU and Network Load.
  • Power down the O4K when tuning completes.
  • Use the awesome ADBTuner custom configs for better control (see sample below).

ADBTuner Custom Config for Onn 4K

{
    "name": "DirecTV App - Onn 4K",
    "author": "spammedeeper",
    "version": "0.1",
    "description": "Reliable Tuning of DTV out of Doze",
    "uuid": "94634da2-badb-4a16-b150-add7075870ac",
    "global_options": {
        "wait_for_video_playback_detection": true,
        "use_fixed_delay": false,
        "fixed_delay_seconds": 0,
        "check_for_and_clear_whos_watching_prompts": false
    },
    "pre_tune_commands": [
        "input keyevent 3",
        "sleep 2"
    ],
    "tune_commands": [
        "am start -W -a android.intent.action.VIEW -S -d '||TARGET_URL_OR_IDENTIFIER||' '||TARGET_PACKAGE_NAME||'"
    ],
    "post_tune_commands": [
        "input keyevent 3",
        "input keyevent 26"
    ]
}

Few tidbits on the config above:

  • This config was tested specifically on Onn 4K (2023), but also works with Onn 4K Plus.
  • The Pre Tune sleep value can be 1 or 2 seconds. You will need to test. When you get to 3 seconds, you may start getting close to the Channels DVR timeout.
  • In the Tune Commands line, the -S switch is what closes the app right before opening the app again. This is faster than closing DTV app in the Pre Tune section.
  • Key Event 3 is HOME, Key Event 26 is POWER (button)

General Settings to Change

The following list contains settings I changed, trying to limit any unnecessary network latency and CPU activity on my O4K. They helped a tiny bit, nothing major, but they are how I tested.

  • Apps Only Mode for Home Screen (Profile Setting)
  • Turn off HDMI CEC under Display & Sound
  • Turn off Casting Support
  • Turn off Scanning Always Available in Network & Internet
  • Turn Cast controller to Never under System.
  • Turn Off Scan for nearby devices under System
  • Turn off Mobile data always active under Dev Options
  • Turn all Animations (three of them) to Animation off under Dev Options
  • Turn ON Disable USB audio routing under Developer Options

Wrap Up

I think there is value in exploring this Onn 4K and DirecTV combo in ADBTuner. I know many users have Onn 4K boxes, which are perfectly fine for 1080P video. And DirecTV Genre Packs can be attractive if they offer the channels you need.

My goal with any Channels playground project is reliable tuning. Most of my television viewing is by recording, so I don't mind slower tuning speeds. When I do watch live TV, it's not to channel flip, so again speed is not a big deal for me. If you are looking for a more cable like experience, need turning response, Android TV with YouTube TV or AH4C/Osprey Boxes with DirecTV are better experiences.

Where this project focused on making best use of Onn 4K boxes, I have mentioned the Plus boxes many times. They are noticeably faster then the standard Onn 4K and an excellent value at $30, but they are not the only choice. I hear the Google Streamer is nice, as is the Onn 4K Pro, both more expensive. If I make more time, maybe I'll do some DTV testing on some of these boxes, along with my dormant NVIDIA Shields. Maybe test out this "Ethernet" the kids keep talking about. /s

Anyhow, I hope this info helps. I've been taking notes throughout the day. Happy to continue testing or answer any questions.

Happy Streaming.

2 Likes

So if I'm reading all of these posts correctly, the DTV situation is as follows:

  1. The app cannot be left open because it will stream video forever.
  2. The app cannot be left running in the background because sometimes, not always, it will fail to load the next deeplink.
  3. Standard "compatibility mode" in ADBTuner can be reliable, but it may be too slow on some device resulting in time outs.

Is this correct?

Perhaps a configuration that just starts the stream after 10 seconds (well 10 seconds + tuner reservation time, + the built in 5 seconds wake up time for sleeping devices) would be a reasonable compromise?

The stream might include some of the app opening sequence, but I guess it's better than nothing if you are using a slower device?

{
    "name": "DTV Test",
    "author": "",
    "version": "0",
    "description": "Loads content via deep link URLs (where supported) and starts the stream after a fixed amount of time.",
    "uuid": "fe98787d-799d-46a4-8178-ddfa5c0b3dcf",
    "global_options": {
        "wait_for_video_playback_detection": false,
        "use_fixed_delay": true,
        "fixed_delay_seconds": 10,
        "check_for_and_clear_whos_watching_prompts": true
    },
    "pre_tune_commands": [
        "input keyevent KEYCODE_MEDIA_STOP",
        "am force-stop '||TARGET_PACKAGE_NAME||'",
        "sleep 2"
    ],
    "tune_commands": [
        "am start -W -a android.intent.action.VIEW -d '||TARGET_URL_OR_IDENTIFIER||' '||TARGET_PACKAGE_NAME||'"
    ],
    "post_playback_start_commands": [],
    "post_tune_commands": [
        "am force-stop '||TARGET_PACKAGE_NAME||'",
        "input keyevent KEYCODE_HOME"
    ]
}

Somewhat related, I pushed an update (20250831-1) to the development version this morning.

In this update, the default Compatibility Mode configuration now navigates to the Home Screen after closing the app. This should help in situations where quitting the app might bring another app to the foreground that is playing video.

For testing purposes, I added a new default configuration named Deep Links - Compatibility Mode - Show Tuning Process. It does exactly what the name suggests. It runs the provided commands and then immediately starts streaming to the playback device.

2 Likes

Another excellent post @spammedeeper. Good detail and thorough. I have not tried DTV but if I get some free time I will try it out with my ONN 4K Pro boxes. I'm a little short on tuners right now. My 4 x ccwgtv boxes no longer work since they upgraded to android 14 and I'm holding out buying more for now. I want to see if they upgrade the ONN 4K Pro (rumors) but not sure how long I can wait. I've offloaded my TCM recording to TVE which has worked good for the oldies for the grandparents. I like using YTTV for the quick tuning and very reliable recording with ADBTuner. It may cost a little more but I would rather pay a little more than be getting asked why something is not working!

Hats off to @turtletank and @spammedeeper for all their work!

I apologize if you have answered this already, but have you tried using the default deep link configuration with Fubo? It seems to work fine in my testing.

Thanks for all the support you have been providing in this thread. Quick question, when you say "keep tuners available" here what are you referring to? There should be nothing on the Android side that could keep a tuner locked within ADBTuner. In a worst case scenario, a failed tuning attempt, the tuner might stay locked for 20-40 seconds after the tune fails, but putting the Android device to sleep shouldn't change this. If I'm missing something, please let me know. I would like to fix the bug if there is one!

Happy to assist. I will write up a how to on building a custom config later today.

As to tuners locks, I found during testing that shutting down the app, or making the device sleep, seemed to more reliably release the tuner. This is not something I tested for specifically, more something I noticed in the hours of testing. On that note, the most current dev build has been pretty stable for me.

I wasn't able to get the standard deep link to work with Fubo. I came up with a custom config that works most of the time. I think it's something with the ONN 4k pro box. I actually started using the Fubo Bridge which to my surprise still has most of the channels in the clear. So for now at least, I only need ADB Tuner for a few channels.
I expect this to change.

Thanks for all your work on this project. It is truly amazing in my view.

1 Like

Wow, @spammedeeper! Thank you so very much for your extensive testing and write-up! First off, when it comes to important things, such as this, I'm not a TLDR guy. I not only read your entire post, I also printed it so that I can have it with me and refer to it more easily as I do more testing today. (I easily forget stuff, and have to look things up over and over.)

Based upon your previous recommendations, yesterday, I made some changes to the general settings on my O4K boxes. Specifically, turning off the animations and using apps only mode. Today, I will implement the rest of your suggested settings changes.

I have updated the ADBTuner to the latest development image which includes @turtletank 's changes to compatibility mode, and new configuration for "compatibility mode - show tuning process". I also have added your new custom config DTV for Onn 4K. I look forward to trying all of these things out today.

It is the new DTV offerings which triggered my jump from YTTV. By changing providers, I can save nearly $40 monthly and still have the programming I value.

You do have me thinking about upgrading to the onn 4K Plus or Pro models. However, the ability to continue using my existing older Onn 4K boxes is a welcome cost minimizing bonus.

2 Likes

@turtletank Thank You so much for your amazing ADBTuner resource for Channels users. Now that I have updated to the latest development version, I will be testing your new configuration modes today. I'm wondering, for the new default compatibilty mode, will the changes be automatically applied to the channels which already have that configuration selected? Or, do I need to make any edits to those channel settings?

Considering the ever changing landscape of steaming TV, we all need to be flexible. Channels DVR allows much more customization than any pIatform I can think of. Running the YouTube TV app with ADBTuner was very solid, even on my older onn 4K boxes. I'm excited to see how far we all can run with this program. I have a few channels from Peacock and Paramount Plus through ADBTuner. But, the ability to use DirecTV as a provider is a very big deal for me and my budget.

Thank you everyone who is helping with this endeavor. Ther are some amazing minds and helpful souls in this community. I appreciate every one of you.

I just pushed another update to the development version (20250831-2). Now with Tuner Sharing!

I was looking to implement a fix for players like Kodi that aggressively reconnect if the stream doesn't start immediately and what I ended up with is effectively a tuner sharing feature.

So with this change, if you try to stream a channel that is in use, the existing stream will be shared and cleaned up when all clients stop streaming. This should help conserve tuner resources and allow client apps to retry without reserving another tuner.

Please let me know if you run into any issues. You can use the tag "20250831-1" instead of "development" to temporarily rollback if necessary.

@Bossmann I think you were using Kodi at one point. If you could test in this new build and let me know if the issues with Kodi are resolved it would be appreciated.

3 Likes

The updates to the default compatibility mode (added "home" command after closing the app) will go into effect immediately after updating ADBTuner. If you want to try the new "show tuning process" option you will have to select that manually for each channel.

2 Likes

Happy to help! Let me know if you have any questions. You’re right, the Onn 4K Plus boxes are nice, but I would love to get your existing Onn Stack working, if anything, until holiday sales time. Good Luck!

1 Like

Your three comments are spot on. I will say your recommendation of closing app in both pre and post time does work well. I used a very similar config during my testing. For reference adding the switch -S to the am start command in tune commands will stop them start the app in the same line. Saves a bit of time on initial tuning by avoiding an extra command to stop app in pre tune. Leaving the force stop in post tune is a good idea.

One of the biggest challenges with the DirecTV app is its need to start a video on launch, either in the home preview page or, if set, resuming the last tuned channels. When this happens, the network becomes busy and may not accept the deep link. This is more prevalent in slower devices.

If I manually open the DTV app with remote, wait for preview to start, then manually send the deep link intent command via ADB shell, the tuning works well.

Trying to replicate this small delay between app open, preview start and then sending deep link is challenging in custom config. I did try to open the app in pre tune, then allow a sleep before sending the tune with deep link. Adding any type of sleep in pre tune only delayed the pre tune commands, no tune commands, which I found odd.

I will test more again today to see if I can get pretune delays dialed in with the info you provided above.

@turtletank It would be nice if we could "view only" your default and compatibility configurations without having to download. Maybe in some future update. Thanks for all your great work on ADBTuner!

Doesn’t work. Just opens app

As I am making these changes to the General Settings (as above), I noticed a few small things to clarify which may be helpful for others following along:

I am unable to find this setting. I do see that under Settings/Apps/See all apps/Show system apps, scrolling down to Google Cast, there is a "disable" option. Is this what you mean?

This setting is under subcategory System/Cast

This setting is under subcategory System/Devices

1 Like

Yes, this is the setting. And thanks for the update on others. I’ll look at updating in my post.

This is the approach I've been writing about. Ideally, if @turtletank has a function implemeted for this, detecting active audio is the most reliable (and fastest) way to know the app is ready to accept a deeplink.

@Rockies , I'm sure that you have looked at these already. For those of us who aren't familiar with json editing and viewing, I offer the following: :slightly_smiling_face:

Default, Recommended mode:

{
    "name": "Deep Links (default, recommended)",
    "author": "ADBTuner",
    "version": "1.0.1",
    "description": "Loads content via deep link URLs (where supported). Recommended for most content.",
    "uuid": "8ec77d65-30d6-46a3-8045-282571cff8d8",
    "global_options": {
        "wait_for_video_playback_detection": true,
        "use_fixed_delay": false,
        "fixed_delay_seconds": 0,
        "check_for_and_clear_whos_watching_prompts": true
    },
    "pre_tune_commands": [
        "input keyevent KEYCODE_MEDIA_STOP"
    ],
    "tune_commands": [
        "am start -W -a android.intent.action.VIEW -d '||TARGET_URL_OR_IDENTIFIER||' '||TARGET_PACKAGE_NAME||'"
    ],
    "post_playback_start_commands": [],
    "post_tune_commands": [
        "input keyevent KEYCODE_MEDIA_STOP",
        "input keyevent KEYCODE_MEDIA_PAUSE"
    ]
}

Compatibility Mode (newly updated)

{
    "name": "Deep Links - Compatibility Mode",
    "author": "ADBTuner",
    "version": "1.0.2",
    "description": "Loads content via deep link URLs (where supported). Adds workarounds to help support apps that don't behave as expected. This should only be used if the default doesn't work correctly.",
    "uuid": "bb353259-17e0-4b38-a328-8629fb1ec2ca",
    "global_options": {
        "wait_for_video_playback_detection": true,
        "use_fixed_delay": true,
        "fixed_delay_seconds": 12,
        "check_for_and_clear_whos_watching_prompts": true
    },
    "pre_tune_commands": [
        "input keyevent KEYCODE_MEDIA_STOP",
        "am force-stop '||TARGET_PACKAGE_NAME||'",
        "sleep 2"
    ],
    "tune_commands": [
        "am start -W -a android.intent.action.VIEW -d '||TARGET_URL_OR_IDENTIFIER||' '||TARGET_PACKAGE_NAME||'"
    ],
    "post_playback_start_commands": [],
    "post_tune_commands": [
        "am force-stop '||TARGET_PACKAGE_NAME||'",
        "input keyevent KEYCODE_HOME"
    ]
}