yashsingh1/xdaforums huggingface dataset:
[Shield Android TV Original Android Development] mLgz0rn:
You can disable/enable dm-verity without magisk.

It's an adb command.

Now, if you patched the boot with magisk and checked preserve dm-verity, you will get a bootloop if dm-verity is disabled on the system.

Same if you have a patched magisk boot with preserve dm-verity unchecked and you enable dm-verity.
[Shield Android TV Original Android Development] milenko79:
I don't have magist installed. I have no reason to patch my system except for this audio patch. I installed the 7.2.3 Dev image and them tried to apply this patch, but it wouldn't let me write system files because dm-verity was enabled. So I disabled it through adb. I then copied the files from this patch and then enabled dm-verity again through adb, thinking that would protect my system files from being modded. After re-enabling dm-verity I got stuck in a bootloop.

So now I'm running without dm-verity enabled and no magisk.

I was wondering if it is normal that I got a boot loop when I enabled dm-verity again?
[Shield Android TV Original Android Development] Air:
[MENTION=397727]Koying[/MENTION] do you think it would also be possible to enable dolby atmos in a similar way? I have the full setup but Netflix doesn't offer me Atmos. Somehow restricted. A Sony with Android TV is able to playback Atmos and the Kodi plugin for Shield can to it too. It should be possible but im not very experienced in hacking apps.
[Shield Android TV Original Android Development] Koying:
No.

This hacks into the Shield, not into the Netflix app, which probably restricts capabilities based upon some kind of "device certification" (aka "pay me and I'll enable Atmos on your device", I guess ;) )
[Shield Android TV Original Android Development] Air:
Thats exactly the case with Netflix... Of course it's first world problems but it's not comfortable to use Netflix on my Xbox and Plex on my shield just because none of the platforms provide the full featureset on both services.
[Shield Android TV Original Android Development] directx1971:
[MENTION=397727]Koying[/MENTION] , i am using a USB audio device (Creative SXFI) which doesn't support E-AC3 decoding but supports AC3 , will your hack work with this USB audio or it works only with Optical/ARC connection ?

Given what you have said that the only actual development is done in libaudiospdif.so can indicate that it will work only with Optical/ARC but i am not sure .
[Shield Android TV Original Android Development] Koying:
The hack is before the actual device, so it might work...

As I don't have an usb audio, only way to know is try ;)
[Shield Android TV Original Android Development] directx1971:
Thanks for this unbelievably fast response , i posted then immediately reloaded the page just to find your answer is ready ,

Really don't know how you did it this fast but very glad that you did :) , thanks , will flash and try.
[Shield Android TV Original Android Development] directx1971:
[MENTION=397727]Koying[/MENTION] , unfortunately it didn't work , one question though , after flashing nvidia rooted firmware the shield accepted the adb root , adb remount

And all the subsequent push file commands that you wrote in the first post along with indicating how many bytes pushed for every file as expected

To my knowledge this indicates that the device is successfully rooted , yet Xplorer and Es files tell me that my device is not rooted how comes ?
[Shield Android TV Original Android Development] Koying:
It is rooted as far as "adb root" gives you a rooted shell. "su" is not installed which what those programs are looking for.
[Shield Android TV Original Android Development] s000m:
Hi, after much searching on the Internet to try and resolve my Bose Soundtouch 300 woes where it can't decode DD+ (EAC3) to Dolby Digital (AC3) I practically gave in and was looking at a AV receiver and new speaker system, after spending £1300+ on the Bose Setup with rear wireless speakers etc.

I really want to try what you have made here in the hack but i'm an utter noob when it comes rooting my shield.

What are the risks with a rooted Shield, will I loose any functionality?

Do I need to manually update the shield after rooting it VS. that of the automatic updates on the consumer build?

I would greatly appreciate a video or guided instruction on how best to achieve this hack.

Thanks in advanced,

Scott.
[Shield Android TV Original Android Development] Laney88:
The answer to your question about risks are here - See under Optional Stuff and Additional Information: @ https://xdaforums.com/shield-tv/general/guide-root-nvidia-shield-experience-t3882254

you need to root your shield - then do this

hint: whenever pushing files by adb command, open CMD with admin privileges (easy), then navigate to the root parent directory of where the very files are that you want to push - adb push p yada yada yada
[Shield Android TV Original Android Development] febi85:
No 5.1 surrond after patch

[MENTION=397727]Koying[/MENTION] I performed unlock bootloader in my 2015 Shield 16GB, flashed 7.2.3 image from NV developer os and then perform the following

adb root

adb disable-verity

adb remount

used DTS zip file

adb push -p libaudioflinger.so /system/lib/

adb push -p libaudiopolicymanagerdefault.so /system/lib/

adb push -p libaudiospdif.so /system/lib/

adb push -p libavcodec.so /system/lib/

adb push -p libavformat.so /system/lib/

adb push -p libavutil.so /system/lib/

adb push -p libswresample.so /system/lib/

adb shell sync

adb reboot

I dont get 5.1 from my sonos, only stereo. My setup Nvidia Shield --> optical cable --> hdmi splitter --> optical cable --> Sonos (I verified this setup by using fire tv and do get 5.1 DD in my sonos).

Please help if I miss anything.
[Shield Android TV Original Android Development] DipsoNOR:
Did you set surround to always on in the shiled settings. ?
[Shield Android TV Original Android Development] febi85:
Is that a setting under Sound in nvidia shield or a command in adb? please clarify.
[Shield Android TV Original Android Development] milenko79:
So now the shield pi firmware is out, I guess we just wait for the 8.0 developer image, flash that and hope this patch still works?
[Shield Android TV Original Android Development] k_ipman:
So a quick question. I rooted my Shield with developer images, nothing else to get this audio enabled.

Now to update, will I need to reflash or can be updated through the Shield TV update prompt?

I understand that this audio patch might be lost in the process but I will find out anyways.
[Shield Android TV Original Android Development] Laney88:
no in shield settings itself, i think in settings display and audio, it needs to be set to always for this to work and REBOOT shield after setting it on that option - at least first time to make sure takes effect

---------- Post added at 10:33 PM ---------- Previous post was at 10:32 PM ----------

need to wait for OP [MENTION=397727]Koying[/MENTION] to perhaps update it i wouldnt do it without him updating it ..

new version (8.0) has support for dolby digital though only for netflix it seems...so this mod is million times worth it
[Shield Android TV Original Android Development] milenko79:
I don't think the changelog says that, it says:

Dolby Digital Plus 5.1 audio up to 640 kbps for sound quality that rivals professional recording studios.

So that means eac3 (not the ac3 we want) with changing bitrates coupled to available bandwidth.

I don't know if that is really new or if it already was in the Netflix app, because Netflix introduced this in May iirc.
[Shield Android TV Original Android Development] Koying:
I was confused about that as well ;)

Was about to shout "FINALLY!!", then went to the shield forum, saw no mention about it, then "Hmmm...", the re-read the changelog ;)

Yeah, I need to wait for the dev image to update the patch.

The most adventurous, who used Magisk to root, might try the current mod and report. Worst case, they just have to re-flash.

All the others: DO NOT UPGRADE ;)
[Shield Android TV Original Android Development] Koying:
Mmm... Is XDA corrupted?
[Shield Android TV Original Android Development] milenko79:
Not as far as I can see. It looks normal to me.
[Shield Android TV Original Android Development] jarayn:
Yeah the new update is super disappointing. I didn't think it would fix things but I had a secret hope that was dashed.

Hopefully they release a dev image and koying can fix it again.
[Shield Android TV Original Android Development] febi85:
thank you so much guys, great work by [MENTION=397727]Koying[/MENTION]. I am waiting for this solution for 3 years and finally my nvidia can output 5.1 DD.
[Shield Android TV Original Android Development] Laney88:
so i pressed ok instead of cancel on the upgrade - freak - now i lost dolbydigital - so my question is, you mean that one can try re-rooting android Pi 8.0 with magisk and see if your patch works?
[Shield Android TV Original Android Development] Laney88:
Yes weird thing is that ac3 is now included in sound settings in 8.0 but doesn't really do anything I mean for netflix and prime even if u force ac3
[Shield Android TV Original Android Development] BXM500:
It's a system-wide issue. I reported it to Nvidia and they said they're looking into it.
[Shield Android TV Original Android Development] Koying:
For the magisk/adventurous ones, don't upload "libaudiopolicymanagerdefault.so" anymore.

As P now gives granular selection of supported PT formats, just enable EAC3 there.

Just uploading the other libs *might* work, but might as well kill audio altogether ;)
[Shield Android TV Original Android Development] jarayn:
The dev image has been released now.

Fingers crossed you can work your magic.
[Shield Android TV Original Android Development] Zbrat:
Hello guys,

First of all big big thanks to [MENTION=397727]Koying[/MENTION], what a genius! I managed to get DD 5.1 on Netflix/Amazon on my Shield and Sonos Beam, finally!!

Unfortunately, I am not able to get 5.1 on Plex. Yes, I tried the passthrough options and these are my results with AC3 movies:

Passthrough disabled -> PCM Stereo

HDMI Passthrough ON -> Error, lost connection to Plex media server

Optical Passthrough ON (nothing activated) -> PCM Stereo. Plex transcodes and shows "The AC3 Audio is not supported by the device" (?)

Optical Passthrough ON (AC3 Active) -> Error, lost connection to Plex media server

Optical Passthrough ON (DTS Active) -> PCM Stereo. Plex transcodes and shows "The AC3 Audio is not supported by the device"

Optical Passthrough ON (AC3&DTS Active) -> Error, lost connection to Plex media server

Honestly, I don't have a clue what is going on, did I mess up the audio with the hack?

If somebody could shed some light in here I'd be really grateful!
[Shield Android TV Original Android Development] DipsoNOR:
Perhaps try to use Kodi with the Plex add-on?
[Shield Android TV Original Android Development] Zbrat:
Very good suggestion! It now works! Thanks a lot.

Any idea why it works via Kodi and not the app itself?

Now I need to convert all my DTS audio movies to AC3...
[Shield Android TV Original Android Development] DipsoNOR:
Kodi has always had good passthrough. My guess is that their implementation is better then whatever way Plex does it. :)
[Shield Android TV Original Android Development] lifeblind001:
I read the thread and have not seen any confirmation if this is working on 8.0.

Has anyone tried this on the new 8.0 update or do we need to wait for an update to the mod?
[Shield Android TV Original Android Development] jarayn:
why? there's a dts version in the OP
[Shield Android TV Original Android Development] milenko79:
I think root is not working on the 8.0 Dev image. So there is nothing to test.
[Shield Android TV Original Android Development] Zbrat:
I hacked with the latest file "NF51+DTS-723-20190505.zip " and I can only get DD5.1 on AC3/EAC3 movies. When it comes to DTS formats the Shield only outputs PCM Stereo.

Did I do something wrong? I basically followed steps from the OP using the same scripts :confused:
[Shield Android TV Original Android Development] Koying:
The DTS version *also* transcode DTS. It's only useful for people *only* having AC3 on their TV/Soundbar.

If you only get stereo on DTS, it's probably a Plex issue. If it was a mod issue, you wouldn't have any sound at all.

I assume you enabled DTS in the Shield options, did you?
[Shield Android TV Original Android Development] Zbrat:
I have my Shield connected to a Sonos Beam which can't output DTS, so I assumed that file should be the best for my setup. I am using Plex on Kodi because of its passthrough capabilities (as suggested by [MENTION=6593550]DipsoNOR[/MENTION]). When I activate the DTS on the Plex App options I only get PCM Stereo as well.

Or what do you mean by enabling DTS on Shield?
[Shield Android TV Original Android Development] Koying:
Yes, that's exactly what I wrote [emoji6]
[Shield Android TV Original Android Development] Zbrat:
Oh ok, so I activated DTS Passthrough in the Kodi audio options. Problem now: The TV and the Sonos show as they are outputting DTS signal, but no audio is being played.

I am running out of ideas...
[Shield Android TV Original Android Development] bydo:
Any chance this could work on other Android TV platforms? I have an s905x2 Android TV 8.0 box that also only supports EAC3 output from the Netflix app and won't do AC3. Could the Nvidia binaries work or would it require custom patching?
[Shield Android TV Original Android Development] Koying:
Mmm... They shouldn't say "DTS". Expected results would be AC3 with sound (or no sound if there's a bug), but them saying they receive DTS make little sense to me...

What makes even less sense to me is that you said in the previous post your Sonos didn't support DTS, so how could it tell you it outputs DTS?
[Shield Android TV Original Android Development] Koying:
Conceptually? absolutely.

The binaries? Maybe, if your device is on Oreo. Most probably not libaudioflinger.so and libaudiopolicymanagerdefaault.so, though, but you might be able to patch the ones from your device withe info in the OP.
[Shield Android TV Original Android Development] Zbrat:
Yes, that's weird, isn't it?

The difference between now and then is that now I'm using the Plex App for Kodi (Fully Passthrough) and before I was using the Plex App which was transcoding the content to PCM.

Just to double-check, I used the scripts to perform the backup of the 3 files from the OP (libaudioflinger.so, libaudiopolicymanagerdefault.so and libaudiospdif.so) and then pushed the 7 files. Nothing else is missing no?
[Shield Android TV Original Android Development] Koying:
That's a hell of a difference ;)

Kodi is using another way to do passthrough (IEC), which is unaffected by this mod, by default.

In this case, you should disable "DTS" in the *Kodi*'s passthrough option, and Kodi will do the transcoding itself.

Not sure that option still exist, but there was a "RAW" option as well, which then would go through the mod, but it's basically pointless
[Shield Android TV Original Android Development] Zbrat:
Alright! I've found the solution! Now all the DTS is transcoded to AC3 and I get obviously perfect 5.1 sound!

If someone is facing the same problems the solution was to change the

Number of channels

to 2.0.

Then on the Passthrough section a new option will be available "

Enable Dolby Digital transcoding

" , enable it and disable

DTS capable receiver

.

And see the magic happen :)

Thanks [MENTION=397727]Koying[/MENTION] for your help :highfive:
[Shield Android TV Original Android Development] vbhagaur:
Hi All, NVIDIA has a hotfix image on invitation basis. Fill out below form and hopefully they were able to fix issues with latest image (including surround sound) in case you are interested.

https://docs.google.com/forms/d/e/1FAIpQLSdPDe7maEmGtmIfpC4sXQtzOCocC-3HRrB5gr2jr481qdATbg/viewform
[Shield Android TV Original Android Development] Koying:
That's pretty much irrelevant to this thread. They won't implement EAC3->AC3 in a hotfix ;)
[Shield Android TV Original Android Development] vbhagaur:
Do we not see EAC3, AC3 in sound output setting Or did i miss something... I updated by mistake and i really hope they do fix it to work out of box and never have to worry about updating and losing surround in future...
[Shield Android TV Original Android Development] k_ipman:
I guess you meant the 'fix' is not working on the Dev Image? The Dev image itself is rooted.

Not sure if [MENTION=397727]Koying[/MENTION] has already tried and it still is not working. Mine got updated to 8.0. In fact the auto download broke the fix so I anyways updated. Now eagerly waiting for the fix to arrive for 8.0.
[Shield Android TV Original Android Development] Koying:
No, it's not: https://www.nvidia.com/en-us/geforce/forums/shield-tv/9/307650/800-dev-image-no-root/

NVidia has been super-brilliant, lately ;)
[Shield Android TV Original Android Development] Zbrat:
Hey, just to share my experience, maybe is helpful to someone. I've been using the hack on a Shield 2015 and it was working great.

Yesterday the Shield performed an auto-update to 8.0, still don't know how it did by itself bc I have been quite cautious about it. Ghosts maybe... :mad:

But to my surprise, the hack is still working so far! Just had to unselect the correct outputs that my HT is capable of in the shield options.
[Shield Android TV Original Android Development] k_ipman:
Can you list what is selected and what is not in your options?

Worth giving a try. The auto and manual selections did not work for me. So will just play around with your options if it works.
[Shield Android TV Original Android Development] Zbrat:
Sure. I enabled manual selection and all ON except E-AC3. Inside Plex options I enabled Optical transfer and tick the AC3.

DTS, True-HD and EAC3 movies are working so far.

Hope this also works for you.
[Shield Android TV Original Android Development] jarayn:
Are you saying that when you play Netflix or prime from the shield TV connected to a receiver that is not eac3 capable that you are receiving an ac3 audio stream on a clean 8.0 install?

Because I can't see how that is possible.
[Shield Android TV Original Android Development] Koying:
Neither do I. I suspect Zbrat is talking about Plex only, and that Plex is transcoding in this case.
[Shield Android TV Original Android Development] k_ipman:
Yeah. I have already tried all options and these do not work.
[Shield Android TV Original Android Development] Zbrat:
No no, I was talking about Netflix and Amazon apps as well. The Plex part was to answer [MENTION=10060057]k_ipman[/MENTION].

To make it clear: I had the hack on the last 7.2 firmware. Then, for whatever reason, it triggered the update but itself to 8.0.

But the hack still seems to work. Netflix/Prime output Dolby Digital 5.1 (checked on my Sonos HT) and Plex transcodes the DTS and TrueHD Audio to Dolby too (just confirming this last part bc I had problems before with Plex only transcoding to PCM).

Drawbacks: Steam Link App and Kodi are crashing on startup. I am afraid of performing a clean install and lose the audio fix :(
[Shield Android TV Original Android Development] Koying:
Mmm. It cannot be the hack, as it definitely was overwritten during the update.

Do you see the the "5.1" badge when browsing Netflix? If not, NF definitely streams in 2.0

If you "enabled manual selection and all ON except E-AC3", then, unless NF suddenly started streaming in AC3 or there is some magic, undocumented, unfeatured trick in Shield, I *really* do not see how that's possible...

Would you have ticked the "Stereo Upmix" option in the Shield Audio settings?
[Shield Android TV Original Android Development] Zbrat:
Hi Koying, I've been double-checking and I can confirm I am getting 5.1 DD. And in Amazon Prime Video as well.

If with the "badge" you meant the 5.1 icon underneath the title of the serie/movie, then yes, it is 5.1 (https://imgshare.io/image/shield.EbnRH).

And also made sure not having Stereo Upmix selected.

Let me know if you need any information so I can offer some help.
[Shield Android TV Original Android Development] Laney88:
I dont think that badge in ur screenshot means much it shows capability of movie to play in that audio format but not that it will

In your sonos ios app does it display dd5.1 when u play the movie??
[Shield Android TV Original Android Development] Koying:
Yes, it does. NF does not show the badge if the device is not capable of *playing* 5.1.

Anyone can see that on 8.0, I guess ;)
[Shield Android TV Original Android Development] Koying:
I'm clueless, tbh :)

As you disabled EAC3 on the Shield side, but NF is showing the 5.1 badge, the only possibilities I see is that NF would stream AC3 just for you or that you somehow activated a secret option of Shield that would do the equivalent of this mod ;)
[Shield Android TV Original Android Development] jarayn:
I couldnt find a clear answer on the manufacturer website but numerous forum posts stated that the Sonos beam (that this guy uses) automatically downmixes DD+ to DD when connected by ARC.
[Shield Android TV Original Android Development] Koying:
Could be, but then there is a confusion (or a shield bug), as he said in post #116 that he disabled manually EAC3 on the Shield...

Would still be surprising that he would even be here, then, as 5.1 Netflix and Prime should have worked out-of-the-box for him on 7 as well.
[Shield Android TV Original Android Development] milenko79:
Is that new, because previously Sonos said that your TV would do that so they would not have to. The problem is that a lot of tv's do not do this downmix, which is our problem and why we need this fix in the first place.

About a week ago, before I went on vacation, I tried my mibox3 which is normally in the vedroom, on my living room TV which is connected to my Sonos beam ( I tried HDMI and optical). I could not get 5.1 from Netflix, there was no downmixing dd+ to dd. The Netflix apps on the shield and the mibox3 are the same build.
[Shield Android TV Original Android Development] Laney88:
[MENTION=10074701]Zbrat[/MENTION] Can u just triple confirm in the about of the sonos app that thst is also displaying dd5.1 when video is playing? Like in your ios or android sonos app?
[Shield Android TV Original Android Development] Zbrat:
Yes yes it does. I won't be able to do it until Sunday, but I will send you screenshots to confirm it, if you want.
[Shield Android TV Original Android Development] Laney88:
Oh no no thanks [MENTION=10074701]Zbrat[/MENTION] no need for screenshot just wanted to triple check - what i would rather appreciate is a pic of your settings in shield (i know you wrote them in the post but a pic would be nice too)

So how about playing offline/network movies through kodi? Are you successful with those as well to get dd output?

Thanks so much!
[Shield Android TV Original Android Development] squirrito:
I've been searching to a solution to this problem for years and just stumbled across this thread, which I will watch with interest. I was very curious how the 8.0 update would affect my own setup (Shield --> 2013 Samsung TV --> Playbar 5.1) however I am unable to test at the moment. Perhaps this should be cross-posted to the Sonos forums so that it gets more attention.
[Shield Android TV Original Android Development] Koying:
Had a look at those posts, and it seem to me that most of those posts are from confused users.

It very much looks like the Beam only supports PCM 5.1 and DD.

They are confused because most modern TV will convert DD+ to DD or 5.1 when going to the Beam via ARC.

[MENTION=10074701]Zbrat[/MENTION] Are you doing Shield -> TV -> Sonos (via ARC)?

If so, what is the brand/model of your TV.

That *should* still not work if EAC3 is manually disabled in Shield, though.

[MENTION=10074701]Zbrat[/MENTION] does it make a difference if enabled or not?
[Shield Android TV Original Android Development] Zbrat:
Im not at home until tomorrow evening [MENTION=397727]Koying[/MENTION] so I can't bring you results on your questions for now.

I'm exactly doing that connection so it very much seems that your deduction of the TV converting to DD must be the explanation.

I'll do the test with optical or no ARC connection and enabling/disabling EAC3 and see what I get.