yashsingh1/xdaforums huggingface dataset:
[Shield Android TV Android Development] Steel01:
I most certainly want a dump of a mdarcy. The mega link is locked behind a password, though.

Those partitions are most of the ones to care about. DTB is the kernel device tree. RP1 is the bootloader dtb. EKS is the keystore. FCT is some device specific settings like wifi and bt macs. Make sure to keep those two saved off. And not in the public dump. :P I can list what all of them do, but probably less than useful.
[Shield Android TV Android Development] powercommy:
Just send you a PM.
[Shield Android TV Android Development] Steel01:
Got it, thanks. Beginning to parse through and update my sources.

So, sounds like a couple people are able to run twrp on an mdarcy well enough. That's encouraging. I'm expecting the issues with rooting are due to the stock rom and not any issue with twrp. Hard for me to tell without hands on a device, though. Plus, I stay away from magisk, so can't say what's going on there.
[Shield Android TV Android Development] elliwigy:
i could swear i selected without key haha

try this one

https://mega.nz/#!1FEn0CCQ
[Shield Android TV Android Development] elliwigy:
im wondering if my issues are due to selinux.. im seeing quite a bit of denials in recovery logs.. i tried setting permissive using an init script on system but so far no luck..

only issue so far ive seen with the twrp is its complaining about not having a system mount or somethjng rather.. ill take some pics of some logs n post it here in a sec..

i kno on sammy devices they need to flash a "multi disabler" in twrp that disables most security features that would block root such as proca, vbmeta, vaultkeeper, defex etc etc.. i kno the shield is different but something similar to do this once the culprits are found would make things easier..

i kno on dev firmware i never had to worry about that stuff bcuz its already lax so it doesnt cause troubles..

at the same time magisk is advanced enough it in turn masks whatever is disabled so device can pass safety net and what not to still use stuff that wouldnt normaply b allowed on a unlocked n rooted device.. samsung is well known to do this with samsung pay, health, secure folder and most stuff knox related.. its not even permitted once bl is unlocked as it trips the warranty bit which cant be reversed but magisk can get around it..

also on sammy they are A only SAR with ramdisk in recovery similar to the shield.. i think they patch boot somehow bcuz something will stop the boot process otherwise and then the magisk stuff is in the ramdisk.. and of course patch vbmeta/verification since if it tries to check for verification itll usually fail to boot usually with a red state warning that device is corrupted.. magisk essentially zeroes out vbmeta so theres no hashes or footers etc for it to verify.
[Shield Android TV Android Development] elliwigy:
so i went into twrp and manually removed verify flags from fstabs and others areas, manually modified and patched boot and recovery with magiskboot and even tried sukernel and system root etc and still no change lol

next im going to try and manually flash all the backups i made which in theory should work but so far im unlucky

twrp cant seem to flash anything for me.. it is complaining about the system partition like it cant find it..

almost seems like its looking for it at /system but theres no mount at /system.. theres a folder but its linked to /system_root/system..

APP seems to be mounted on rootfs aka / then theres a mmcblk on /dev/block thats mounted as system_root
[Shield Android TV Android Development] elliwigy:
to add no matter what i do when i reboot from twrp it complains theres no os but the os is clearly there? when i fastboot flash system it writes successfully and i can find it in twrp root shell but it still says no os
[Shield Android TV Android Development] elliwigy:
I think I am back in business!

Used your TWRP, made a simple sh script to use dd and basically made it write all the partitions I backed up before I started messing around :)

At least I know if I goof up that the backup should work to revive it so long as I can gain a root shell...

The simple sh script I made is here, nothing special by any means https://pastebin.com/pR37sscR

Just goes to show how everyone should always have a backup when experimenting!
[Shield Android TV Android Development] powercommy:
I ran into the same issue, TWRP not able to find /system to do anything. I tried to patch the boot.img while running the shield, but the with the patched boot.img the shield got stuck on the logo. Things on the new shield with 8.1.1 are just a bit different, my guess is since they try to protect Dolby Vision which you lose when unlocking the boot loader.

Will probally start playing arround with it this weekend.

---------- Post added at 06:00 PM ---------- Previous post was at 05:57 PM ----------

The experimental version of TWRP runs fine expect the mounting of the system partition which is not there.

The normal version of TWRP is not working since the mouse does'nt seems to be working then.
[Shield Android TV Android Development] elliwigy:
yea.. i thought maybe because we are booting to twrp that its seeing the mounts differently but flashing it bootsback into fastboot.. also the system will overwrite it with stock recovery after a normal boot

i also noticed the system read only button is selected and it doesnt allow to turn it off which could be the reason also that it cant remount system..

i wonder why magisk needs to mount system in the first place if its a systemless root.. with same token any modified bootsor recoveries i get stuck on nvidia logo either way lol
[Shield Android TV Android Development] powercommy:
It's seems like Nvidia released the developers image for the shield 2019 pro. There is no description at links only some dots see images. I used the developers images on my other shields, but I'm not 100% sure if this new images are for our devices.

https://developer.nvidia.com/search/site/Shield 2019

NVIDIA SHIELD ANDROID TV 2019 Pro Developer Only OS Image

https://developer.nvidia.com/nvidia-shield-android-tv-pro-developer-only-os-image

NVIDIA SHIELD ANDROID TV 2019 Pro Recovery OS Image

https://developer.nvidia.com/nvidia-shield-android-tv-pro-recovery-os-image
[Shield Android TV Android Development] elliwigy:
i tried the dev images and it works! its actually a userdebug build.. adb root shell works.. i then installed magisk 20.1 manually to system and i can use it.. i just need to figure out what i can use that can start it on each boot.. currently i need to use adb root shell to start the daemon when i reboot
[Shield Android TV Android Development] powercommy:
That is a good step in the right direction, I will give that ago also. Thank you for your update
[Shield Android TV Android Development] elliwigy:
to add im on nvidia shield tv pro 2019 used the dev os images linked above..

i tried using magisk manager to direct install magisk but of course didnt boot so reflashed the dev os boot.img and booted right back up
[Shield Android TV Android Development] powercommy:
Same here this morning I installed the dev image and installed the magisk manager apk. With adb I pushed the boot image and patch it with magisk. Then pulled the patched boot image, to flash it but got the same results as you. Stuck on the Nvidia logo.
[Shield Android TV Android Development] elliwigy:
i got magisk root installed but currently have to manually start it using adb root shell each reboot.. at least i can use root apps.. i already debloated it
[Shield Android TV Android Development] BlackAngel98:
Great work guys. I got the apk installed but how do I install magisk to system since I can not boot a patch boot img and do i need to unlock my bootloader for this?
[Shield Android TV Android Development] elliwigy:
if you have to ask those questions I suggest you stay away from modding it for now until a normal method is available..
[Shield Android TV Android Development] elliwigy:
fyi if u lock bl after flashing like instructions advise it boots in a yellow state lol
[Shield Android TV Android Development] powercommy:
I got to the same point as you was able to use my applications which require root. And as long as the shield keeps running everything's runs fine. A shield with root is much better ?
[Shield Android TV Android Development] elliwigy:
to add if you relock bl you cant disable verity or make changes to system etc. but can still get a root shell.

also the vbmeta_skip.img on unlocked bl essentially disables vbmeta as the img is zeroed out and only has the header.

there must be something in the kernel or something thats preventing device from booting with modified imgs..
[Shield Android TV Android Development] Steel01:
Hey look, a recovery image. That really helps with some of the stuff I do. Wish they'd uploaded one for sif too, but oh well. Maybe eventually.

Fwiw, /system will not mount directly, this is expected. Since the newer versions use system as root, the system partition mounts to /system_root and /system is a symlink to /system_root/system. I've seen some errors about unable to mount /system myself, but it's never seemed to actually break anything.
[Shield Android TV Android Development] elliwigy:
i noticed when i locked bl while modified and rooted with vbmeta disabled it said red corrupt screen due to "no os".. oem unlocked and it booted again.. i kno this might b different but implying that could be a verty/verification issue or something we need to disable?

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] rootfan:
[MENTION=3812611]elliwigy[/MENTION], I believe I've figured out why Magisk doesn't work on Shield TVs. Give the attached zip a try and let me know if it works.

Edit: [MENTION=534058]powercommy[/MENTION], I've attached a magisk patched mdarcy developer boot.img. See if that works.
[Shield Android TV Android Development] elliwigy:
we just need a working twrp now haha.. twrp is broken atm.. experimental version is having trouble mounting system so zips are failing and older twrp mouse/keyboard not working so cant swipe when it loads..

unless the script is the reason zips arent flashing?

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] powercommy:
[MENTION=4180946]rootfan[/MENTION] Tried your release a couple of times, started the shield with twrp experimental and mounted system_root and is symlink to system.

Attempt 1.

Installed your magisk and got the result mounting /dev/block/App failed.

Symlink for system was removed and a directory system has been created by your zip file.

Attempt 2.

Trough terminal I run the following command and manually created the mount like you tried in the installer.

mount /dev/block/platform/sdhci-tegra.3/by-name/APP /system

Started install magisk_debug.zip again. See pictures for results in both attempts. Rebooted got stuck at Nvidia logo again.

Then flashed the dev boot.img again to started the shield.
[Shield Android TV Android Development] powercommy:
Sorry, got a busy day at work today, but finally got around to test your boot image.

Good news is that we get a step further and past the Nvidia logo.

Bad news is that the Android logo keeps loading forever.
[Shield Android TV Android Development] elliwigy:
upon further review i modified a bunch of stuff.. dmesg is giving errors about tlk_daemon.. upon more research tlk properties I see

init.svc.tlk_daemon=restarting

ro.boot.secureos=tlk

ro.hardware.gatekeeper=tlk.tegra

I attached a screenshot of dmesg and cat of /proc/kmsg..

I modified /init.rc, prop.default, system/build.prop, fstab.darcy (i think this is the one for mdarcy?)

i tried setenforce 0 to permissive...

i have magisk files in system/xbin which work if i patch policy and start daemon using the adb root shell after booted up without the mods listed above.. basically unmodified devos, adb root shell, then use the magisk binaries to start magisk daemon works..

with the modifications though it sits at the android bootani.. i still have adb shell access..

another odd thing is that /data does not seem to be mounted.. not sure if this is bcuz od not fully booted or if it could be causing to not fully boot..

i think theres some security still enabled somewhere thats blocking boot..

anyone kno anything about TLK? secureos is tlk, also ro.boot.security=enabled and ro.vendor.security=enabled
[Shield Android TV Android Development] elliwigy:
forgot screens
[Shield Android TV Android Development] elliwigy:
hm... so.. i reflashed the dev firmware and used the vbmeta_skip.img instead of vbmeta.img.. then did a fastboot -w.. then fastboot reboot bootloader... then fastboot flashed your patched boot.img.. then fastboot -w... then fastboot reboot... it actually loaded up with the magisk patched boot.img.. however magisk.apk wasn't installed.. I installed magisk.apk and when i opened it, it said that it needed to install something (like it normally does) and after selecting that device reboots then hangs on the boot animation
[Shield Android TV Android Development] elliwigy:
After further testing, after i got stuck again on the bootani i did adb reboot bootloader.. then fastboot -w and then fastboot reboot and it again started back up..

this time i adb installed magisk.apk.. when I opened it i pressed cancel on the pop up to install it or w.e.. then i set the access popup to always grant su.. adb shell then su gains magisk root just fine at this point..

the only issue I am having now is when I try to download/install a mod.zip it fails to install saying to install the latest magisk..

so we are almost there but not quite yet haha.. apparently though when modifications are run and you get stuck at the bootani wiping the device seems to allow it to boot with the changes made.. this is odd seeing as how I have both verity and verification disabled? I noticed the patched boot.img has avb/dm verity box checked however.
[Shield Android TV Android Development] elliwigy:
so both the zip and boot work to an extent.. i used the zip and am now rooted on stock firmware..

Here are the steps I followed:

1) Unlock BL/Wipe data

2) If you are not already on full stock OS then flash full stock OS in fastboot then fastboot reboot bootloader then fastboot -w to wipe again..

3) fastboot boot experimental twrp..

4) select mount then select system_root, vendor and data.. if data doesnt mount then format data in twrp then reboot bootloader then fastboot boot twrp again and u should b able to mount it..

5) from pc type adb root then adb remount all..

6) adb push magisk-debug.zip to /data/media..

7) adb shell

8) mount -o bind /dev/block/mmcblk0p18 /system

9) install, navigate to the magisk zip and install it..

10) reboot.. if it doesnt boot then go to fastboot and wipe data again and reboot..

11) once booted n setup you take the magisk.apk from the magisk.zip and adb install -g magisk.apk

12) not sure if this matters but in adb shell, type su and grant adb shell root.. then i mounted / by "mount -o rw,remount /"

13) Open magisk again and this time install the magisk setup.. itll reboot after about 5 seconds..

14) device will seemingly sit on the android bootanimation.. the key to get it to boot is by adb root shell typing "resetprop ro.boot.verifiedbootstate orange"

15) after it boots up you can type "resetprop ro.boot.verifiedbootstate green" so you can pass safetynet again..

16) now u can open magisk and install modules etc as normal..

Part of my hunch about TLK was accurate.. when its sitting on the bootani if you run dmesg youll see TLK dolby service complaining that device boot state is not green.. magisk sets it to green by default for safetynet bypass and other reasons but tlk wont boot if its mismatched?

the resetprop command needs to b run after each reboot.. that is until someone makes a module or script that can change it to orange then back to green so it doesnt need to be manually done each reboot..

i also recommend disabling magisk updates.. im not sure if/what was modified to get it to work but updates might break root? [MENTION=4180946]rootfan[/MENTION] can probably answer this..

also to add, i havent figured out how to get disney+ working.. its not in play store and the alternate install methods it wont open.. it instantly crashes..

i tried messin with some props but no luck yet.. i dunno wat its checking.. according to nvidia it wont work on new shields while rooted but dunno
[Shield Android TV Android Development] elliwigy:
forgot pics again lol
[Shield Android TV Android Development] rootfan:
[MENTION=3812611]elliwigy[/MENTION], I notified the Magisk developers about the specific issue and it has been addressed so the next release of Magisk should just work on 2015 and 2017 shields and on 2019 shields with the steps you provided. You'll need to uninstall the Magisk Manager app and flash the Magisk uninstaller package first though before installing the next release if you installed the zip I provided as there's a problem with going from unofficial to official releases.
[Shield Android TV Android Development] elliwigy:
nice! I just got it set up nicely. ill update to official magisk tho next update so i can continue to get the updates lol..

for now im just using a props module that sets bootstate to orange so it boots.. i also set foxy boot so i can actually see the boot log.. this way i can see y its not booting lol..

also, if anyone cares.. i also used the props tool in magisk and set the fingerprint to shield tv 2017 pie and was able to install and set up/use disney+.. i then set the fingerprint back to default and disney+ still works! so this is a workaround until nvidia fixes it on later builds..

also for you nstv 2017 owners not sure but maybe changing the fingerprint will pull the 2019 update lol.. dunno if itll flash or what but when i changed my 2019 to 2017 fingerprint it prompted to update to pie 2017 firmware.. dont think itd b much different tho than trying to flash the firmware in fastboot.. i no longer have a 2017 model..

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] powercommy:
Wow, you found out a lot of things in the last day or so.

Yesterday I went back to the stock images since I was having problems with Netflix. As soon its starts playing a video, Netflix started to use a lot of CPU and crashed.

Playing movies trough kodi was not a problem, also other services were working fine its was just having problems with Netflix to go back to stock. Did you didn't experience any problems with Netflix?

I will try again when I have some more time on my hands.
[Shield Android TV Android Development] elliwigy:
i dont use netflix.. in fact i delete it entirely..

i am having some issues with disney+ tho.. its sort of jumpy.. youtube vanced is ok but also a very slight glitchyness also..

i wonder if this is drm related or something that doesnt like root..

everything loads/works tho for the most part that i do use..

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] powercommy:
It really depends on your screen resolution, if I use the shield on a older TV with 1920x1080 then Netflix is glitchy/jumpy and when I use a 4K television with a the nice features Netflix won't start the video from it loads to 99% and flickers.

I have the same issue when I'm using stock with a unlocked bootloader. As soon as I lock the bootloader everything is running fine. The AI up scaling stuff shows a message saying that a unlocked bootloader is found.

The dev roms with a locked bootloader also is having problems with playing Netflix.

It's something that doesn't like us, I think it has something to with the Dolby vision stuff in their. Since Dolby is sort of proprietary stuff. I
[Shield Android TV Android Development] elliwigy:
well the device thinks its locked in my situation as well as i am using a nice 4k TV lol.. i was thinkin it was just d+ for me since it technically isnt supported/available yet on rooted 2019 models at all but I guess its not just me or just d+..

i can almost certainly say it probably is somethin to do with tlk/dolby/drm or w.e not agreeing with root or unlocked bl..

its not too bad for me anyway.. its tolerable and definitely worth it to me as i prefer root over netflix anyways lol

also, turning ai upscaling completely off had no effect for me.. havent tried changing video modes yet tho..

stock rooted is the way to go tho it seems :)

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] powercommy:
I will give your procedure a go later on this week see how Netflix is working then. I'll also prefer root, but the wife wants to watch Netflix downstairs ?I prefer a happy wife over root.

Let you know how things turn out with stock root. Have a nice Sunday.
[Shield Android TV Android Development] elliwigy:
lmao happy wife happy life.. sounds like u need to buy a second device just for u to play with lol

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] powercommy:
:laugh:
[Shield Android TV Android Development] elliwigy:
So ensuring s3linux is enforcing and boot state is green and disabling Dolby audio processing in settings video playback is smooth.. just an fyi
[Shield Android TV Android Development] powercommy:
Tried your steps and when i reboot at step 10, I will get the Nvidia logo, after that the screen blinks and reboots again. Tried Wipe/Format data but didn't make a difference. Then I installed the stock zip file again because my shield was patched with the hotfix, but that also didn't make a difference. Tried with the patched boot image from rootfan but still no luck.

First time around I try to install the magisk-debug.zip file I get a error the second time I run the installer everything is installed correctly but like i said, I get to the Nvidia logo, then blinks. So for now i am a bit stuck, will try again in the morning if you have any suggestions what the doe with the logo...:)
[Shield Android TV Android Development] elliwigy:
can u write your exact steps start to finish? ill try and direct u from there but need more details of ur exact steps..

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] elliwigy:
to add, the magisk debug zip is the one from this thread that was modified for nstv pro.. then while in twrp you need to mount everything you can in mount options in twrp, then in adb while in twrp type adb remount all then try to flash the zip..

if its not booting it might b vbmeta.. i flashed the vbmeta_skip.img from the dev os firmware..

i will try to make a video or something this weekend

Sent from my SamPWND N976V or G975U
[Shield Android TV Android Development] elliwigy:
also getting boot loop.. im retracing my steps again lol..

ill update once i figure out where my instructions are off..

i think it needs to be flashed back full stock then set up before rooting
[Shield Android TV Android Development] elliwigy:
ok, after step 10 if it loops try going back into fastboot then fastboot flash dtb mdarcydtb.img then fastboot flash vbmeta vbmeta.img (i use vbmeta_skip.img from dev pkg as its zeroed out) then fastboot reboot.. itll reboot a few times probably then should boot up.. then u can proceed with the steps