yashsingh1/xdaforums huggingface dataset:
[Shield Android TV Android Development] powercommy:
Attempt 1

I have also tried that to flash the full stock image. Boot up the shield, set everything up. Reboot to the bootloader, unlock bootloader, wipe data. Boot the shield again and set everything up, boot to bootloader and used the twrp experimental. Used adb root and adb remount, Mounted everything and loaded the magisk from this thread. Rebooted and stuck at Nvidia logo, rebooted again, wiped user data and booted again. But no luck at stuck again.

Attempt 2

Then went trough it al of the above again, and flashed with magisk again, but also tried to boot with the patched magisk image. But same results.

Attempt 3

Then I flashed everything again to full stock but this time I didn't reboot to setup everything up but just went straight to go to twrp and patch magisk, cleared dalvik, and formatted data.

Attempt 4

Flashed everything to stock again, installed hotfix and went trough al the step in attempt 1 and the steps you explained.

Like you mentioned I think we are missing a important step which make or break. Will give it an other go this afternoon. Keep you posted

---------- Post added at 10:25 AM ---------- Previous post was at 10:23 AM ----------

LOL posted my previous post and missed your latest post.

Thanks I will give that a go this afternoon will let know the result. Fingers crossed
[Shield Android TV Android Development] elliwigy:
i kno it works.. im back up n running again lol.. my steps probably arent very good but it does work
[Shield Android TV Android Development] elliwigy:
I'll try to make it more clear lol...

1) Reboot to bootloader to start fresh...

a) fastboot flash staging blob

b) fastboot flash boot boot.img

c) fastboot flash recovery recovery.img

d) fastboot flash system system.img

e) fastboot flash vendor vendor.img

f) fastboot flash dtb mdarcy.dtb.img

g) fastboot flash vbmeta vbmeta_skip.img

h) fastboot -w

i) fastboot reboot bootloader

2) Now we will boot to twrp and install magisk...

a) fastboot boot twrp.img

b) select mount and mount everything it lets you (usually data, system_root, vendor, cache)

c) adb remount all

d) adb shell

e) rm /system (removes symlinked folder)

f) mkdir /system

f) mount -o bind /system_root/system /system

g) exit

h) adb push magisk-debug.zip /data/media

i) In twrp press install and navigate to magisk zip and flash it

j) adb reboot bootloader

k) fastboot -w

l) fastboot reboot bootloader

m) fastboot flash dtb mdarcy.dtb.img

n) fastboot flash vbmeta vbmeta_skip.img

o) fastboot reboot

3) Device might reboot a few times but eventually loads.. when it does follow these steps

a) Enable usb debugging

b) make sure its authorized and connected

c) adb install -g magisk.apk

d) adb shell

e) su (grant root to shell when it pops up)

f) mount -o rw,remount /

g) Open magisk.apk on the device

h) When it pops up telling you it needs to install stuff select ok and install it.. device will reboot in 5 seconds...

4) When device tries to boot you should now be stuck at the android boot ani (NOT the nvidia logo).. then follow these steps..

a) adb shell

b) su

c) resetprop ro.boot.verifiedbootstate orange

d) after device boots run: resetprop ro.boot.verifiedbootstate green

After all this, you should be good to go finally lol.. it seems like a lot but its not really.. then eventually we will get proper stuff goin..

let me kno if these steps dont work.. b sure to follow to the T.. once to this point u only need to set bootstate to orange for it to boot all the way then u can set back to green.. i tried havin a script set to orange n works but so far havent found a way to set orange then after loads back to green automatically yet.. im sure theres a simple script with a pause or somethin that can be used tho
[Shield Android TV Android Development] TheUndertaker21:
Still nothing for 2019?
[Shield Android TV Android Development] CaptainChris2018:
Works with the 2019 Sheild Pro?

Does this work on the 2019 Sheild Pro? I've been thinking about getting a TV and a 2019 Sheild Pro for my bedroom.
[Shield Android TV Android Development] elliwigy:
Crazy lol.. i guess it seems dtb and vbmeta need to be flashed after making certain modifications.. i suppose after the mods it changes the vbmeta and dtb layout so it needs to be reflashed.. i was trying to make a one click but obviously theres a few parts it needs the user to do stuff so i figured i wouldnt waste my time..

Now i wonder if dissbling verity and verification altogether could cut the steps down?
[Shield Android TV Android Development] elliwigy:
Lol thats wat some of us have been posting on for over a week now.. the expiremental twrp will boot but i wouldnt suggest flashing it as of yet umtil more kinks are worked out
[Shield Android TV Android Development] brandonb21:
sounds great!, my dog bricked my 2017 box im waiting for a replacement, if i still had my box i wouldn't mind testing for you.
[Shield Android TV Android Development] darkuni:
I'm fine hacking the crap out of mine. Plenty of experience with TWRP, etc. If you want to throw a build my way, I'm happy to test or whatever.
[Shield Android TV Android Development] Steel01:
Sorry, been really busy the last couple days and will continue to be so the next couple weeks. Didn't get a build run until today. And with the release of N for the original fosters, I might as well just test it myself tonight. I'll try to release as soon as I confirm it works. This build should work for all satv models once updated to 5.0.x. As far as I can tell, the bootloader and kernel interaction chanfedj again, so the old twrp won't boot after the update and inversely the new twrp won't boot on the old bootloader? Yay for more confusion...
[Shield Android TV Android Development] darkuni:
Another member has a working (but unofficial) TWRP going here in this thread.

I have tested it on all SKUs; 2015, 2017 and Pro. Works across the board. Maybe this can help out?
[Shield Android TV Android Development] Steel01:
No sources, so not really. But I don't think there's a whole lot that needs to change. Supporting Darcy in the custom init, using the new kernel, and handling the convertible host/device USB port. All but the last is already on my gitlab instance.

*sees reference to broken adopted storage* Oh yeah, I still need to see what's up with that...
[Shield Android TV Android Development] AndroidUser00110001:
TWRP for Shield was being built from kernel sources from scratch. I just dumped the recovery kernel from stock recovery, modified the TWRP device tree to build from prebuilt kernel...
[Shield Android TV Android Development] Steel01:
https://gitlab.incom.co/CM-Shield

Reference there. You can use the cm-14.1 branch of the kernel. Should boot on the new device/ota.

Edit: Use the lineageos_t210_defconfig and change the image name to zImage. Yay for compressed kernel support finally...

Edit 2: If that's all you did on top of the upstream twrp sources, then no darcy specific zips like otas will install because the ro.product.model assert will fail.
[Shield Android TV Android Development] AndroidUser00110001:
Basically all I did for now. I tried to build using OmniROM 7 sources but device tree need to be modified to work with OmniROM 7 so I was going to redo the device tree.

Going to make other changes to add anything darcy specific.

How are you going to go with recovery for the Shields? Build everything off of Foster or make a new device tree for darcy? To keep the OTA flashing for darcy wouldn't a new device tree be better or just modify init_foster.cpp script?
[Shield Android TV Android Development] Steel01:
Oh sheesh. I haven't pushed half the code I thought I did. Give me half an hour or so and check the link I gave above again. Should be an android-7.1 branch on the foster device tree and shield kernel. That will be what I'll eventually push to twrp officially. But the current stop gap release I'm testing will be android-6.0.

Darcy hasn't changed enough to warrant an entire new device tree. Just needs a handful of tweaks to the custom init.
[Shield Android TV Android Development] Steel01:
The android-7.1 branches are pushed. Haven't done a compile test yet since there isn't a minimal compile manifest for omni 7.1 and I don't want to sync the entire tree. Not much has changed, though, so it should work. Working on whipping the 6.0 stuff into shape so I can push it.
[Shield Android TV Android Development] AndroidUser00110001:
With Omni 7.1 the device tree make files need to be tweaked a bit. Was getting some errors building about no longer to make certain calls from some make files...something about that :)

**Edit**

Ha! See the changes were made. Going to try to build with Omni7.1 Will let you know the results.
[Shield Android TV Android Development] Steel01:
Well, that's embarrassing. I forgot to rename a couple files. You'll have to pull again. ><

Alright, just because. Someone with some techy experience test this and report back before everyone else pulls it.

twrp-foster-3.0.3-experimental.img

Edit: Well, that didn't work. I don't know why yet, but my source built kernel will not boot. But I can pull the stock kernel and everything works fine. However, prebuilt kernel don't cut it for me. I will make this work correctly somehow...
[Shield Android TV Android Development] AndroidUser00110001:
I believe your twrp booted for me but I didn't flash stock recovery before I flashed your recovery.

Why didn't the prebuilt kernel work for you?

I couldn't get Omni7.1 to build with your device tree. When running lunch it didn't pick up the device...
[Shield Android TV Android Development] Steel01:
I finally went and pulled the entirety of omni 7.1. Fixed and pushed a couple things and it builds now. It appears I'm having some compile conflicts or bad commits in my kernel. Nvidia's aosp boots, mine doesn't. I'm working on finding the differences.

The prebuilt 'works' in that it boots. It doesn't work for me because I will not ship a prebuilt kernel. Open source software, I want as much built from source as possible. If the GPL kernel can't be built from source, something's wrong.
[Shield Android TV Android Development] AndroidUser00110001:
Nvidia has their source available now if that helps
[Shield Android TV Android Development] Steel01:
I've been using Nvidia's source. My kernel is theirs with a couple cherry-picks from the shieldtablet kernel (I use the same kernel tree for the shieldtablet as well). So... poked around a bit more. If I build from omni6 with my M trees and the new kernel, it all works. I've got something way broke in my N bringup. I just don't know what yet...
[Shield Android TV Android Development] AndroidUser00110001:
I tried to build LineageOS and it hangs at Nvidia boot screen. Something not right with kernel. I poked around and saw a couple of things but did not have time to try anything new. Will try tonight. Will post my findings if anything works.
[Shield Android TV Android Development] Steel01:
I gave up on twrp from 7.1 atm and moved on to lineage. I did find what's causing the kernel issues, though. My cross32 commit for vdso. Instead of using androideabi, it has to use arm-eabi-4.8. The nvidia aosp code does that and when I made that change locally, the kernel boots. However, there still a bunch of other problems I need to work through, /vendor and firmware related. And I don't have a whole lot of time to do so right now, unfortunately.
[Shield Android TV Android Development] tailslol:
aww so no twrp nougat for shield tv yet? ;(
[Shield Android TV Android Development] darkuni:
Sure there is. Check the other threads :)
[Shield Android TV Android Development] TheUndertaker21:
Damn

Will, keep watching
[Shield Android TV Android Development] powercommy:
Tried to make it a bit clearer for others:

https://xdaforums.com/showpost.php?p=81218101&postcount=2

But like [MENTION=3812611]elliwigy[/MENTION] also mentioned it's a tricky thing to root the shield 2019 PRO, like I also explained in some PM messages, if you are new with this then you better can wait.
[Shield Android TV Android Development] TheUndertaker21:
sick but i think i can root it LOL

this seems easy enough
[Shield Android TV Android Development] powercommy:
I will try to do that later on this week and maybe it will be a good way to get a few less steps.

Stock image with root is running smoothly and I'm still receiving the updates from Nvidia. Yesterday got a other one and running some steps again I got root back with a problem.

Connected the shield to a Raspberry so I can easily access adb and fastboot. Added a small script to system/bin which I can easily start with adb shell "su -c 'sh /system/bin/orange.sh'"

Will play around later on.
[Shield Android TV Android Development] powercommy:
Did you manage to get things running?
[Shield Android TV Android Development] vashp2029:
I'm getting stuck right after installing Magisk when we request root access. I'm requesting root and it seems to hang as if it's waiting to be granted access, but I don't get a prompt on the Shield itself to allow it. Checked Magisk installation and green checkmarks all around. Without granting superuser at that step, I'm not able to run the resetprop steps on the next phase, so I end up stuck in the Google boot animation and pretty much have to restore to stock.
[Shield Android TV Android Development] elliwigy:
You shouldn't need to grant it su rights as u should do that before rebooting so when it reboots you already have adb authorized and root is already allowed.. that or u can set a script like I have so when it reboots it sets the property automatically so u don't need adb at all. You can then change the boot state back to green if u want to pass safety net but so far i find it doesnt really matter for me anyways.

I'm on stock 8.1.1 hotfix rooted with magisk. Tomorrow i plan to see if 20.2 or w.e is fixed yet to work for our devices like i was told it would be. I didnt see anything in changelogs to indicate it was fixed but i will find out soon enough lol I'm pretty confident i have the process down now so should be an easy fix if it doesnt work.

I took the hotfix ota which loses root.. all I had to do was boot to twrp.img from fastboot, select all the mounts in the mount settings, adb remount all, mount -o bind /system_root/system /system then flash the modified magisk.zip we`ve been using and reboot.. it kept all my modules and everything intact and booted right up..

Basically once u get it all situated then updating and re-rooting is easier..
[Shield Android TV Android Development] vashp2029:
The problem is that even before I reboot, I can't give SU rights because I never get the prompt.
[Shield Android TV Android Development] DumbKing@letthemeatspam:
Any chance to get this with controller support so I don't have to use a mouse? Unfortunately I don't have a mouse atm
[Shield Android TV Android Development] Adromir:
Most likely not. In theory every controller might need its implementation and because the space on the recovery partition is very limited, there is barely any hardware implemented in the kernel of the recovery. That's also why there is no Wi-Fi available in recovery
[Shield Android TV Android Development] di0xide:
I've tried using multiple wired keyboards and none of them were functioning. Apparently it is a known issue when using keyboards in the shield bootloader: nvidia.com/en-us/geforce/forums/discover/266932/keyboad-don-t-work-on-fastboot/

People seem to have success with wireless keyboards and paired dongles.

I've purchased the shield controller gen2 for the sole purpose of navigating the bootloader, directly plugged in to the port closest to the HDMI. It's working well. X/Y for up/down and A/B for Select/Back.

It's important to use the port closest to the HDMI for the controller, and the port further away from the HDMI for the direct USB connection to PC, for anyone who is having trouble :)
[Shield Android TV Android Development] di0xide:
Working great! However, every time i reboot my shield, it's stuck at the google logo. I have to do the following every time:

q) adb shell

r) su

s) resetprop ro.boot.verifiedbootstate orange

t) after device boots run: resetprop ro.boot.verifiedbootstate green

is there a way we can automatically make this happen? Thanks! :)
[Shield Android TV Android Development] elliwigy:
my keyboard works fine with bluetooth but fastboot i use my tablet
[Shield Android TV Android Development] elliwigy:
did you try setting and authorizing adb prior to installing magisk?
[Shield Android TV Android Development] dk1keith:
I have been trying to get an answer to what should be a fairly basic question....is there a stable version of TWRP that can do backup/restore for Shield TV Pro 2017 on 8.01? I don't really want to do to much experimenting with my shield if I can't even make a backup/restore.
[Shield Android TV Android Development] elliwigy:
With root you don't even need twrp to make a backup lol.. sad these devices don't get much love considering they're the best on the market for what it is...
[Shield Android TV Android Development] TheUndertaker21:
so rooot is still convoluted ?
[Shield Android TV Android Development] elliwigy:
depends.. yes and no lol.. i was on unrooted 8.1.1 update.. fastboot boot twrp.img.. rm /system.. mkdir /system.. mount -o bind /system_root/system /system.. flash the magisk.zip from herereboot will bootloop boot back to twrp.. touch /data/adb/service.d/script.sh.. then make script to do resetprop ro.boot.verifiedbootstate orange.. reboot and u should b good to go lol

at this rate i dont think theyll ever fix it or get it right.. just not enough demand here
[Shield Android TV Android Development] lycaos:
Hello Steel01,

Thank you for sharing this, I have tried it and have this issue :

Can you help me for that please ?

Regards.
[Shield Android TV Android Development] bobpiesz:
Can confirm works on 8.0.2. Recovery image for Darcy 2017 Shield.

I just downloaded the 2017 8.0.1. recovery image, flashed everything, and once booted I let it download and install the 8.0.2. update.

Then I ran fastboot boot recovery recovery.img with supplied twrp, it worked, so then flashed 1.5 beta, and it worked perfectly. Flashed the twrp recovery after the test boot as well.
[Shield Android TV Android Development] Crumplet:
1.5 beta twrp?

What version of twrp and where did you download it? Thanks for sharing.

On another note can anyone verify if this website and its unofficial TWRP safe to use? Here's the web link.

https://www.google.com/amp/s/unofficialtwrp.com/unofficial-twrp-3-3-1-root-nvidia-shield-tv/amp/
[Shield Android TV Android Development] J85maurice:
Does twrp work with 4k tv's now. I am still on 7.2.2 firmware
[Shield Android TV Android Development] iaminfa:
any luck on that twrp image for Shield 2017 16gb oreo 7.2.3?
[Shield Android TV Android Development] elliwigy:
??

It has for few years now.. where u been lol
[Shield Android TV Android Development] J85maurice:
When I rooted my shield last year i had to root it using a 1080 tv as twrp didn't display on my 4k tv. ... But If that's been fixed that's awesome
[Shield Android TV Android Development] elliwigy:
I remember that years ago lol
[Shield Android TV Android Development] J85maurice:
SO you're actually telling me if I update my shield to the latest version. Using my 4k tv I can flash and use twrp?
[Shield Android TV Android Development] elliwigy:
I dunno.. I dunno what stuff u got or wat ur skills r.. I've since updated to 2019nstv pro and I can boot to twrp on it also.. it's been a while since I messed with anything 2016 models
[Shield Android TV Android Development] J85maurice:
I have the 2017 model. I actually got my buddy into a 2019 shield and thay new cylinder design is ugly AF. Hmm maybe I'll try to give it a go these next days off... Worst case scenario I just buy a small 1080 tv to flash it
[Shield Android TV Android Development] elliwigy:
The cylinder version as u call it can't be unlocked/rooted without taking it apart and soldering a USB port to the board fyi
[Shield Android TV Android Development] J85maurice:
Yeah I kind of figured... Was a pain in the ass transferring apks to his little cylinder via micro sd card... I sure hope I can get the updated firmware and twrp to work on mine... Tired of constantly getting the update notifications. I also have a minix u1. I love the UI/launcher so much over the Nvidia. I have atv launcher installed too but the whole feel just isn't the same. No complaints otherwise though. Thanks for your help my man.
[Shield Android TV Android Development] elliwigy:
it appears the nstv pro 2019 source is now available fyi.. maybe this means a more stable twrp can be built?

http://nv-tegra.nvidia.com/gitweb/?...c;hb=a9e971377c0addeb17ecb62316a1b7b58356376c
[Shield Android TV Android Development] One.Hit.Kill:
I'm not sure if this will help, but the Magisk Canary Channel now supports the Shield TV 2015&2017. I used TWRP Pie Edition and it installed the latest version yesterday on my Shield 2017 v8.0.2 with no problems. Magisk new UI is also a added bonus... Anyways maybe it will work with the Shield TV 2019 without all those added steps, maybe not, I don't want to reset mine to find out. Just thought to inform. Sorry is I wasted anyone time...
[Shield Android TV Android Development] I_did_it_just_tmrrow:
THX.

So there should be no problem with installing magisk canary on my foster device, or? Foster is the 2015 model with 500gb hdd.
[Shield Android TV Android Development] Rotaryknight:
any more info on this? What kind of usb header? macro? or full size?
[Shield Android TV Android Development] trohn_javolta:
Could you specify the update process a bit?

I'm still on shield experience 7.2.3, rooted via the "patch boot.img with magisk and after update flash patched_boot.img via twrp method" from here: https://xdaforums.com/shield-tv/general/guide-root-nvidia-shield-experience-t3882254

and I plan on updating to latest shield experience.

Can I just update normally to latest shield experience, then boot twrp, sideload magisk canary zip and just flash it, done?
[Shield Android TV Android Development] One.Hit.Kill:
Yes, that's exactly what I did. I clean/unrooted my Shield TV and then updated to to the latest Shield Experience. After that I copied Magisk Canary to the Shield TV, used TWRP-Pie to install Magisk Canary and I had root. I didn't have to patch the boot.img or any other steps. It was super easy. I would imagine one could simply update the Shield TV to the latest Shield Experience and install Magisk Canary without having to clean/unroot the Shield TV. I just did that to give myself piece of mind. I hope this helps.
[Shield Android TV Android Development] trohn_javolta:
Yes this helps, thx. How did you clean/unroot your shield?

Could you link the exact files you used? I'm not too lazy to search them myself, just wanna make sure I don't mess up somewhere by using wrong twrp or magisk. Did you grab app-release.apk as Magisk Manager app and magisk-release.zip files from here? https://github.com/topjohnwu/magisk_files/tree/canary

Which twrp did you use?
[Shield Android TV Android Development] elliwigy:
not sure. only seen one person that said they did it.. cant remember if it was this thread or not
[Shield Android TV Android Development] tinhsoftware:
What i did, i flash magisk module remover. Download shield tv 2017 8.0.1 image from shield website. Extract the image and run flash-all.bat for window to update to 8.0.1. then OTA update to 8.0.2

To root

root shield 2017 8.0.2

You need to start from fresh before root. You need

File from post ([KERNEL][ROOTED][PIE] Performance Enhanced Overclock Kernel)

https://xdaforums.com/shield-tv/development/kernel-overclock-kernel-2-22-ghz-t3943079

You need to start from fresh before root. You need

1. Twrp 3.3.1-0shieldtv-pie.img (downloadlink on first post)

2. magisk_shieldtv_pie_r2.zip (attached file on first post)

Temp boot to the twrp and flash the magisk zip file. The zip file included magisk manager.