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

Yeah I see that now, thanks didn't put two and two together when I was reading it. What's weird is that my ONN has been fine with NBC for many months now except for the usual crashes on startup, this dimming behavior just started today.

Might have something to do with me rebooting the ONN recently.

Those who are seeing frequent ADB approval popups, do you have any other programs (ex. ah4c) connecting to the same Android device?

1 Like

Did some testing today. Seems this is not specific to NBC App, but other Android Apps as well. What people have noticed is videos will start dim, then only return to full brightness after the SeekBar is touched. The SeekBar is the progress scrub bar at the bottom of the video.

Seems launching the NBC App via ADB brings up video puts video into a dimmed state as if the SeekBar was active. You can manually clear this by opening the live guide for a moment, then exiting. This brings the video back to normal brightness.

From this Reddit Thread, you can see it is not just NBC Apps, but by comments, many Android apps:

https://www.reddit.com/r/revancedapp/comments/1bb44sw/youtube_screen_becomes_dim_and_on_screen_buttons/

Since the NBC App does not have any Accessibility Options, I assume the next best step would be to (possibly) modify the Activity to set a SeekBar brightness to max. The link below has some ideas, but I'm not a programmer, so I will leave to you more experienced types.

1 Like

I don't use other programs like ah4c only ADBTuner. However it's funny you should mention this because I do use Remote ATV (https://apkcombo.com/remote-for-android-tv/tech.simha.androidtvremote/) to click the reauth prompt on the android box. Lately I had thought about other apps that also talk ADB to the device and this was the only one I use. I typically keep this app open in the sidebar in case I need it and wondered if the device I have selected in the pulldown (in this case Onn4k) was also the one that happend to get the reauth popup.


This could totally be a red herring and I have no hard testing to prove that there is a relationship between this app and getting reauths on a particular ADB device. It is very intermittent. I just started to quit the app after I use it and not leave it running all of the time.

2 Likes

Thanks for the follow up. It hasn't been easy to find a repeatable test case on this one. I do see this on my two Chromecasts, but it only happens every couple of months or so. Usually after a device reboot. I'm testing with an Onn device as well and haven't seen it yet.

I do know that things can get wonky if you have multiple ADB connections from different clients active at the same time.

The mechanism behind this is pretty straightforward and is similar to SSH authentication. If you choose the "always allow" option when asked to approve the connection that client's public key is written to /data/misc/adb/adb_keys on the Android device. Presuming the public/private key pair hasn't changed the ADB server should just allow the connection, but this doesn't appear to always be the case.

If you have the ability to do so, can you pull the key file from your android device and check if there is anything unusual in it? You don't need to share the contents of the file, but if you could take a look that would be great.

adb pull /data/misc/adb/adb_keys

In this file there should be one (long) line for each client device. If you have a ton of entries in this file it might indicate that something is causing the key pair to change which would require a new approval. If you do have a lot of entries I would suggest clearing it (settings->system->developer options->revoke usb debugging authorizations) and keeping an eye on it going forward.

From ADBTuner's side, as soon as I get a chance, I will add some more verbose logging around ADB connections to see if we identify the problem and find a good workaround.

1 Like

I use ah4c. I originally posted something here, and deleted it because I posted in the wrong thread... but ironically these responses have indicated this is indeed an issue. I am idiot; how do I check if the ADB keys changed on the android device like you were saying in the other post? I want to solve this, or I'm going to have to reverse engineer the scripts to use IR or something instead of ADB due to this being a complete pain in the ass every month or so.

2 Likes

I'm getting this issue too. But even worse the NBC TVE URLs aren't working anymore. Only my local NBC works. The rest send me to NBC Now. I am linked to my Spectrum provider.

1 Like

I spent some time looking at the NBC app this morning.

The actual deep links seen to be loading content correctly for me. Ex. nbctve://live/msnbc loads MSNBC as expected. To anyone not seeing the content loading at all, are you using this url format?

As for the unusually dark content, this is a bug in the application itself and I wasn’t able to find any reasonable workarounds.

Deep linked content is loading behind the application’s user interface as if it was being displayed behind a menu (live guide) even though it isn’t. Remote inputs aren’t even being passed through to the video player while in this state. The only way to resolve this is to go through the live guide.

You might be able to work around the dark content issue by issuing some properly timed remote commands after the video starts playing to open and close the guide (up, right, right, center, back). This, however, would be better suited for ah4c.

I pushed a small update to ADBTuner today that just adds some extra logging around ADB connections. However, the most helpful information is going to be in the android logs which we can’t capture if we can’t connect via ADB.

If someone happens to catch an unexpected ADB approval prompt live and has the ability to run an ADB command, the output from the following would be helpful.

adb logcat | grep adbd

I'm having the issue using chomecast with google tv dongles. It seems to be time-based though I haven't been keeping a log (though perhaps I should start). I am running 4 dongles, and I do the approvals in pairs, and the approvals seem to happen in sync with those pairings. This eliminates external factors such as internet interruptions etc since the failures don't "cross the device groups" and seems to suggest some sort of expiration. I don't run any other external applications on/against the dongles.just adbtuner.

Even with the authorization popups, tuning does continue to work for a while if I just ignore it (I run everything in compatibility mode, if that makes a difference) but eventually it will finally start failing to tune because of the authorization issue (after perhaps a week or two..I've only let it go to that point once and it was a while ago so I don't recall the exact amount of time). I'm not sure if that gave you any additional information, but at least it's an additional data point.

Google search says:

Since Android 12 the adb authorization has an expiration date which can be disabled in developer options on the Android device

https://www.reddit.com/r/AndroidQuestions/s/mYqFp8A52n

You don't need to refresh, there's a switch in developer options to 'disable adb authorization timeout'. Just flip that one on and your current adb authorization should remain enabled. On stock Android it's the 3rd one down under the section 'debugging'

1 Like

Yep I found that post too a while back. Unfortunately, like the OP in that reddit post, the chromecasts don't seem to have that option that I can see.

On the other hand, they do have a "Verify Apps over USB" option which I can turn off. Maybe I can try that and see if it quits caring about the expired keys?

Try:

adb shell settings put global adb_allowed_connection_time 0

1 Like

Cool :slight_smile: That's exactly what the OP from the reddit post was asking for. Do you know if there's an easy-button way to do that from the adbtuner docker container, or do I need to add the adbtuner sdk stuff to another device in order to send that command?

Edit: I set up the adb tools on my laptop and was able to connect into each of the chromecasts to issue that command (also did the logcat thing for good measure...nothing jumped out at me as weird in the output). I'll keep an eye on these and report back my findings one way or the other as to if the connection time command had any effect. Thanks, Aman :slight_smile:

1 Like

Based on my testing thus far I'm not convinced that the ADB connection prompts are related to expiring authorizations.

But for testing purposes I just pushed an update to ADBTuner that automatically sets the adb_allowed_connection_time configuration option to see if it changes anything. Please post here if it helps.

1 Like

I have been using ADBTUNER since the initial release and have never had expiring authorizations. I only use FireSticks 4K.

@turtletank Same for me with ah4c. No expired authorizations in over a year of use -- using 6x FireStick 4K Max and Max 2. Maybe this is something device(s) or Android version(s) specific?

FireOS is old based on Android 11

2 Likes

is this under experimental or latest?

1 Like

Both

Thanks for the update.
Definitly always into anyting that stops us from having to keep allowing connection.
I think it helps when apps behave and require less baby-sitting.
The less i have to do the better.

1 Like