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

Mine have been behaving these days but I'm going to get the latest build anyway and report back if I get a reauth prompt. I have mine all set to the same priority so all 4 devices get exercised randomly.

So doing a "deep dive" on this now that I'm aware that DEFAULT_ADB_ALLOWED_CONNECTION_TIME exists.

Lets take a look at the Android source:

This "security" feature is most certainly a thing. It was added in Android 10.
https://cs.android.com/android/_/android/platform/frameworks/base/+/9e7b06efe38977cc083964700f2459b175380c69

 public static final long DEFAULT_ADB_ALLOWED_CONNECTION_TIME = 604800000;

        /**
         * When the user first connects their device to a system a prompt is displayed to allow
         * the adb connection with an option to 'Always allow' connections from this system. If the
         * user selects this always allow option then the connection time is stored for the system.
         * This setting is the time in ms within which a subsequent connection from an always
         * allowed system is allowed to reconnect without user interaction.
         ...
         */

From the above, the default for this is 7 days. Note: this is 7 days from the last successful connection, not 7 days from the initial connection.

A configuration option for this was added to the UI in 2020, I'm not sure what version of Android that corresponds with. Perhaps this explains the assumption that it's Android 12 related even though it existed prior to that.
https://cs.android.com/android/_/android/platform/packages/apps/Settings/+/3d8974723a2f6b11eafbcbac0229d363021de877

Implementation:
https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java

The public keys are actually being stored in a secure Android KeyStore. If keys exist in /data/misc/adb/adb_keys they are automatically added to this keystore as needed.

With every connection, the stored "last connection time" attribute is updated for the associated key within the KeyStore. In addition, there is a background process that runs once a day to update the "last connection time" for any persistent connections.

Now with all this being said, I'm still unsure how to explain how I was able to take an Onn device out of the closet that hadn't been used in six months and connect without a prompt. :man_shrugging:

AH4C shells out to the cli version of adb which maintains an active connection. ADBTuner closes connections after each action. This probably explains why the popups were more common in ADBTuner even though the issue should technically affect both.

TLDR;
Hopefully this configuration change does help with devices that aren't used at least once a week. I think there might be some other things that might be causing failed authorizations, but this is a good start. Thanks @tmm1 for the heads up.

2 Likes

Just catching up after adding some more channels via this tool. ADBTuner is awesome.

Is this configuration change (the adb shell command tmm1 suggested above) something we're meant to enter manually if we're having authorization issues, or is it now incorporated into ADBTuner?

The current version ADBTuner will automatically set this configuration option on all connected devices.

2 Likes

The Deep Link to MSNBC is (randomly) back to working for me on my FireStick 4K. I still have the sim screen however. Before now I was getting a different channel loaded on the FireStick from the NBC app.

Anyone using linkpi and hls stream?

My adbtuner seems to get stuck trying to load the stream if I use hls, no issues when using .ts

Ok so im poking around this feed trying to understand it all... a few questions before i get the encoder etc
1 will this work with Optimum TV and or Fios TV
2 Is this replacing the missing NBC and Paramount channels??
3 do i still use Reg TVE in channels for unbroken channels??
4 Where do i get a channel list to import into this if any??

Thanks for any feedback

I have been working on this for 4 hours. Trying to decode the AndroidManifest.xml. Looking for the app name, and the deep link URL. I am having no luck.

Same here. On a Chromecast 4K configured with the MSNBC link it was loading NBC News Now with a darkened screen. Now it is correctly pulling up the MSNBC stream, but still with the darkened screen like @turtletank mentioned:

1 Like

Do you have "compatibility mode" enabled for that channel in ADBTuner? That app likely needs to be restarted between channels.

HLS is not supported by ADBTuner. An active video stream is used to track if a channel is being currently viewed and you wouldn't have that with HLS video segments.

2 Likes

@turtletank I found the Deep Link list for NBC News app. But I can't get it to go to MSNBC. But using some of these URLs I was able to get it to launch on my Onn Google TV stick.

<data android:scheme="nbcnews"/> <data android:host="tab"/> <data android:host="brand"/> <data android:host="video"/> <data android:host="playlist"/> <data android:host="show"/> <data android:pathPattern="/..*"/>

What is the full app package name you are using? For com.nbcuni.nbc.androidtv the deep link is nbctve://live/msnbc.

@turtletank It's "com.zumobi.msnbc" . That's the "NBC News" App.

To tune MSNBC with the NBC News App package (com.zumobi.msnbc), use the following URL:

nbcnews://brand/msnbc

I just dusted off my ADBTuner setup, tested the above, still works.

EDIT: Forgot to tag @xmguy

@spammedeeper That's what I have. But it doesn't work. Launches the app. But goes to NBC News Now. Even though it's linked to my Spectrum subscription.

Well, to directly copy mine, try this:

-Change the Provider Name to: NBC News
-Remove the alternate package

Didn't work. :frowning:

Biggest thing I’d like to know is how to find the URLs needed for the commands? The Manifest doesn’t seem to have all the info needed.

The manifest provides the structure of URLs that the application will attempt to process. It won't tell you what the specific link you are looking for is, nor is it guaranteed that any of the defined URL formats will actually work.

<intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data android:scheme="nbcnews"/>
    <data android:host="story"/>
    <data android:host="item"/>
    <data android:host="slideshow"/>
    <data android:host="video"/>
    <data android:host="tab"/>
    <data android:host="playlist"/>
    <data android:host="section"/>
    <data android:pathPattern="/..*"/>
</intent-filter>

From com.zumobi.msnbc (current version 11.x) it appears it will attempt to process links such as:

nbcnews://story/<something>
nbcnews://item/<something>
nbcnews://slideshow/<something>
nbcnews://video/<something>
nbcnews://tab/<something>
nbcnews://playlist/<something>
nbcnews://section/<something>

From here you need to either:

  1. Guess (ex. nbcnews://video/msnbc) (note: does NOT work)
  2. Check if the provider's website uses similar URLs that might provide a hint.
  3. Dig further into the decompiled APK for clues.
  4. Other things: review Android logs, check into any other apps that might use the deep links internally, etc..

I spent some time on this and as far as I'm concerned com.zumobi.msnbc currently does not support deep links for live tv. Everything just gets directed to the main section/tab which is NBC News NOW.

If you do find something that does work, please share as it might be helpful as an alternative to the standard NBC app which has the "dark video" issue at the moment.

2 Likes