yashsingh1/xdaforums huggingface dataset:
[Shield Android TV Android Development] E--Man:
[MENTION=4218641]AndroidUser00110001[/MENTION], first thanks for your hard work. Just to confirm, does this fork of TWRP allow OTA updates from nVidia to be successfully installed without issue? If so, does rerooting need to be done afterwards?

Lastly, for security purposes, is there a diff posted from the OFFICIAL TWRP?

Thanks.
[Shield Android TV Android Development] AndroidUser00110001:
I am not sure about the updating. Out of habit I always flash stock recovery and then update. I did add the proper fingerprints into TWRP to allow updates but not sure if it is working.

The only difference from Official TWRP is that I modified the device tree to build using pre-built which was taken from the Nvidia restore images. Also updating the fingerprint to allow for OTA updates but have not tested that.

I guess I should post my device source tree. Reformatted my Ubuntu partition so I will post the sources in a few minutes.

Edit:

device tree

https://github.com/AndroidUser00110001/all_shield_twrp
[Shield Android TV Android Development] mudsloth:
It worked for me on my Vizio P55!

This was an absolute lifesaver. I had rooted about a month ago (I was not aware of your hacked 4k version of TWRP) and ended up borrowing a monitor from work so I could complete the steps since I couldn't get any display on my TV and don't have any other monitors in my home. Then last week, I unexpectedly lost root (must have been an update I didn't realize was happening). Borrowing a monitor from work was a huge hassle, so I really didn't want to go through that again, but this modified TWRP saved me a ton of hassle.

My computer is plugged into my TV so I had to switch inputs in the middle of the process. Sending the boot command, then switching inputs produced a black screen. However, typing up the boot command on my computer, switching inputs, then hitting enter worked.
[Shield Android TV Android Development] lavero.burgos:
I did test flashing OTA 5.0.2 weeks ago, it flashed with error in red color but i went further and rebooted my device. To my surprise installed and booted just fine, no issues to report after that.

Rooting is systemless for the Shield TV, so if you do a factory reset or wipe data it will be removed and you will have to reflash SuperSU (recommended) or any other root method.

Sent from my Tapatalk Hub

If I helped hit the Thanks button. Follow Me! ~ Buy Me a Coffee ~ Full Android for ShieldTV and Nexus Player
[Shield Android TV Android Development] I_did_it_just_tmrrow:
THX [MENTION=1416222]Steel01[/MENTION] [MENTION=7247453]twrp[/MENTION] and [MENTION=4218641]AndroidUser00110001[/MENTION]

I had 1 wish and 1 question. :)

My wish/suggestion:

Could you please add a md5 and a sha256 to your first post.

My question:

I am not sure why there is no multirom out there for the nvidia Shield TV. But I remeber that to read that the recovery need to support multirom. Is it possible to integrate that?

When not, why?

Greetings by Idijt
[Shield Android TV Android Development] Steel01:
At the multirom question: Because I couldn't make the stupid kexec kernel patch work on arm64. There's now a nokexec version of multirom that I've poked at some, but haven't seriously worked on it for the satv yet. But I don't see any reason why it wouldn't work.
[Shield Android TV Android Development] mr-tee:
Can't seem to flash any recovery

So, yeah, I had the device rooted, had flashed TWRP, it worked. It worked several times, even with the USB cable in, because I disabled MTP (which is on by default and doesn't work with this build for this device). Anyway, I digress..

I then unrooted my device, and flashed the original recovery. That works as intended too.

But now I can't flash TWRP anymore. It says that I've flashed it, no errors. But when I boot into recovery, I always get the stock recovery.........?

I even tried erasing recovery first and then flashing TWRP. Didn't work.

How come? And what to do? It had me flash TWRP before, so it did work. Why doesn't it now? (I tried booting recovery.img, but that doesn't work too, no image on screen.

Thanks in advance...!
[Shield Android TV Android Development] AndroidUser00110001:
Once you flash TWRP you need to root device so the security checks don't over write anything that is not stock.

Try booting TWRP again, it just have been a glitch that you had no video. Happened to me once or twice.
[Shield Android TV Android Development] mr-tee:
Thanks, but I cannot get into TWRP, because I always go directly to stock recovery after flashing or when I boot recovery.img I consistently get the black screen. I have tried over and over again.

When does this overwriting happen? When you boot up the whole OS? Or when you reboot the bootloader?

Thanks in advance again!
[Shield Android TV Android Development] mr-tee:
The file in this post is not the correct for 2017 16gb shield tv on Nougat (5.1 frmw)

So, I finally got it to work, with a different file I found on my shield storage (from previous use).

It's a different one from the one in this thread, but I don't know where I got it.

It is different in size, about 25MB, the one in this post is about 14MB. But it works now. (First time flashing remember to unplug your USB cable to the pc in order to stop it from rebooting, then disable MTP and you can use the cable again (only not for MTP). I believe it will store this setting when you flash this image, so next time entering recovery you can leave your USB cable plugged in (unless you enable MTP again) ).

Since I don't know where I got it, I'll post a direct link to my file, until I find out where I got it from (or someone else did). Damage is not my responsibility, use at your own risk. However, I have done NOTHING to this file except downloading it and rar it for sharing).

The version is also 3.0.2.0

[Link removed, Not necessary anymore]

I apologize if this is against the forum rules, my only intent is to serve others with the same issue. Whenever I somehow found the right thread I got this file from I'll remove the link and post a link to the primary source thread.

EDIT EDIT: Seemingly the same file, except de- and recompiled. So still a mystery to me how one works and the other doesn't..
[Shield Android TV Android Development] AndroidUser00110001:
It's correct file. It is complied for Shield TV 5.X. Works fine on my Shield 2017 Shield 16GB and many others that have used it.

I made it for my Shield 2017 which never had MM on it...
[Shield Android TV Android Development] mr-tee:
At the time you uploaded the file (or last edited the first post) Nougat was not out yet for the Shield TV. Maybe you made it work for 5.0.1 but not for 5.1 probably (at least it really doesn't work with my device, the 16gb model of 2017 with Nougat.). don't know why else it doesn't work. It's also a different file from yours, maybe you can check what the difference is between the one I posted and your file (10mb difference in the two). I have tried yours many times, and it wouldn't flash or have a black screen when booted. The one I posted did flash and not once had I one black screen.

But maybe it's not a matter of a version of Nougat, but the bootloader? I don't know. But there's certainly a difference. What version of 2017 do you have? Pro or 16gb?

Anyways, I still haven't figured out where I got the file from. But it's definitely different from yours. And newer (20-3-2017).

Yours is from 28-1-2017. And 25mb vs 15mb.
[Shield Android TV Android Development] AndroidUser00110001:
I have Shield 2017 16GB which was updated to Nougat out of the box and now with 5.1. If you read through the thread you will see many peopled tested it with 2015 16GB and Pro models running Nougat. Not sure why it wasn't working for you.

I am guessing the file size difference is that it was not built from TWRP source but decompressed and then repackaged.

Nougat was out for Shield. Only way I was able to get the stock boot.img to get the kernel file needed to updated TWRP...
[Shield Android TV Android Development] AndroidUser00110001:
The file you posted is identical to the recovery image I compiled from sources. File size and date mean nothing. All files within the image you posted are identical to the image I compiled. Someone just decompressed and repackaged it so that is why file size is different. Not sure why someone would do that without making any changes and not sure why one would work for you and the other not ;)

From my default.prop file:

# BOOTIMAGE_BUILD_PROPERTIES

#

ro.bootimage.build.date=Sat Jan 28 18:50:52 EST 2017

ro.bootimage.build.date.utc=1485647452

ro.bootimage.build.fingerprint=NVIDIA/omni_foster/foster:6.0.1/MOB31K/angelo01281848:eng/test-keys

persist.sys.usb.config=adb

ro.build.display.id=omni_foster-eng 6.0.1 MOB31K eng.angelo.20170128.184738 test-keys

ro.build.version.incremental=eng.angelo.20170128.184738

From default.prop you posted

# BOOTIMAGE_BUILD_PROPERTIES

#

ro.bootimage.build.date=Sat Jan 28 18:50:52 EST 2017

ro.bootimage.build.date.utc=1485647452

ro.bootimage.build.fingerprint=NVIDIA/omni_foster/foster:6.0.1/MOB31K/angelo01281848:eng/test-keys

persist.sys.usb.config=adb

ro.build.display.id=omni_foster-eng 6.0.1 MOB31K eng.angelo.20170128.184738 test-keys

ro.build.version.incremental=eng.angelo.20170128.184738

Both were built from my machine and same date :)

Once you decompress the image I built and the image you posted and compare all files within you can see they are identical.

Take a look at attached image and you can see each file is identical....
[Shield Android TV Android Development] mr-tee:
That is so strange.. I've read the comparison you posted, but I'm still wondering... how?? :confused:

What is the difference then? Maybe a slight change somewhere? I had tried several downloads of yours (because I had other copies of yours on my hard drive as well). none of them worked. Seemed like they wouldn't flash.

I actually don't know how to decompile and recompile properly, so it wasn't me. It was the last file I had sitting on my device's storage that wasn't compressed. I'm going to try both of them again. After I wipe the recovery partition first. This is so weird.

(I thought 5.0.1/5.0.2 was Marshmallow, but that was 3.3 or something? I was wrong about that... sorry!)

What is the version of your bootloader?

Mine is: 24.00.2015.42-t210-e3360677

How can you decompile img files?
[Shield Android TV Android Development] AndroidUser00110001:
I didn't see any difference. Decompiled and compared twice to make sure I didn't use the same recovery.img to compare between the two.

Have no idea why one works and the other doesn't.

Bootloader is from the latest 5.1 update.

Wasn't implying it was you. Nothing to be sorry about...

You can use SuperR's Kitchen to make decompiling easier
[Shield Android TV Android Development] mr-tee:
Have you also compared the contents of the files? (or MD5?)

If you replace some text with the same amount of digits/characters the file size stays the same.

I'm going to search in my browser history from that date onwards, maybe I'll find the source :D.

Or maybe Android itself changed the file size? Because I recovered it from my device, not from my pc. Maybe the date was the date I uploaded it for the first time? Or extracted it.
[Shield Android TV Android Development] AndroidUser00110001:
Yes compared all text. With Beyond Compare it compares all text and will point out any difference...
[Shield Android TV Android Development] mr-tee:
Yeah, I haven't found any other sources I got this from, so it's probably the exact same file I downloaded from this thread. Only other site I downloaded (the wrong) recovery from was twrp.me itself, but that only works for foster devices.

Ah well, I'll figure out why it wouldn't work. Nothing changed in the meantime, except adb and maybe fastboot executives (from android tools).

Ok, so, thanks for the effort :). I'll remove my link.
[Shield Android TV Android Development] savagepagan:
Has anyone tried the TWRP app from the Google Play Store. It only supports the 2015 (foster) model. The latest recovery is 3.1.0.0. How do you boot into it after install? Does it support Nougat?
[Shield Android TV Android Development] BIFFTAZ:
A bit late to the party, But can confirm that your fix doesnt work on 4K screens (Atleast it didnt for me). I also tried changing the shield out put to 1080/59, But didnt help. I have since managed to get a 1080p TV & used the one in the OP, Works just fine. Thanks!!
[Shield Android TV Android Development] cjeman:
I have a 4K Vizio and TWRP has no issues when the Shield is booted into Recovery.

I notice that the adaptive storage SSD does not show any activity when backing the unit up. Is adoptive storage contents backed up with internal storage? I hope/trust that TWRP treats both as contiguous storage.
[Shield Android TV Android Development] cjeman:
Just to satisfy myself, I made a backup of the system with no apps on adoptive storage. I then moved an app to adoptive and did a restore. The app that was on adoptive was back in Internal. I also did a backup of internal without any adoptive storage. Both types were about the same size, so this version of TWRP does indeed handle adoptive storage.
[Shield Android TV Android Development] edjanx:
Is there any way to get the stock NVIDIA Shield TV Pro stock bootloader to load so I can perform a stock 5.1? Apparently I need to go back to stock to take the 5.2 upgrade, and I've been spinning my wheels on this all day. Thanks!
[Shield Android TV Android Development] mr-tee:
Why do you assume that? If you mean you can't get an OTA, then you just need to wait, it's not available on every device yet, if any. Mine also doesn't show an update, just be patient.
[Shield Android TV Android Development] edjanx:
I'm part of the 5.2 early release program and there are a lot of features I want to take advantage of now. I have the update and it's simply won't install because I have TWRP. I don't see much value in being rooted on Shield TV so I'd like to understand how to go back to complete stock without TWRP. Thank you.
[Shield Android TV Android Development] mr-tee:
Nvidia has instructions for that. Just google for shield tv stock rom where you can download the rom with instructions.

Just don't use the flashall.bat. Just perform the fastboot commands manually one after another WITHOUT rebooting. Lastly you should do a fastboot -w to erase all user data for a factory reset.

So basically, download the ROM and unzip it. Boot the device into bootloader, connect the USB, make sure drivers for fastboot are installed (which you probably have) and one by one flash the different partitions. Maybe only flashing the recovery partition might be enough: fastboot flash recovery recovery.img (while in the folder where you unzipped the factory ROM image). Or do an erase of that partition first, fastboot erase recovery, then flash. But probably not necessary.
[Shield Android TV Android Development] edjanx:
Thanks [MENTION=4767528]mr-tee[/MENTION]. I had worked from this page, which seems to be what you are describing: http://developer.download.nvidia.co...TV/Upgrade-2.0/HowTo-Flash-Recovery-Image.txt

However, I ran into an error, which is one of the reasons I reached out for advice. There is a possibility of pilot error, so I will attempt this again after work and report any errors, or hopefully success!

Kind regards,

Janx
[Shield Android TV Android Development] mr-tee:
That's why you need to follow my directions. The instructions on Nvidia's site are for multiple versions. Nougat and marshmallow.

By the way, the instructions you linked doesn't seem the right one.

And Rotterdam is my location, not my name ;)
[Shield Android TV Android Development] AndroidUser00110001:
Go here

Download here

Download the image you need.

Flash recovery

Fastboot flash recovery image.name

or the whole package...

Flash-all.bat
[Shield Android TV Android Development] AndroidUser00110001:
Anyone try this TWRP on 5.2 yet? It may need an update. Let me know if it doesn't work. I'll build a new TWRP. I am guessing it will may not work since kernel has been updated.

I locked my bootloader so if TWRP needs an update I will need someone to test if new TWRP is needed...
[Shield Android TV Android Development] zulu99:
Your TWRP work with 5.2 on 2017 model. The official twrp not work on 2017 model.

Both work on 2015 models.

Thanks
[Shield Android TV Android Development] Cameron581:
Just tried to flash the 5.2 OTA but its a no go on 2017 16gb, the ro.build.prop that grabs the devices name flags the device as a foster and the ota requires a darcy.
[Shield Android TV Android Development] AndroidUser00110001:
Most likely an error in this script https://github.com/AndroidUser00110001/all_shield_twrp/blob/master/init/init_foster.cpp

I no longer have unlocked bootloader so cannot test any changes...
[Shield Android TV Android Development] edjanx:
ro.build.prop flags the device as a foster & 5.2 OTA requires darcy

This is the exact same issue I've been experiencing on my Shield TV 2017 PRO (500GB) I mentioned earlier in the thread on June 4th when I was a preview tester. I am still unlocked and can test if someone can assist updating the script.

Line 52:

property_get("ro.hardware", model);

if (!strcmp(model, "foster_e_hdd")) { // check cpuinfo hardware identifier

/* foster_e_hdd */

symlink("/etc/twrp.fstab.sata", "/etc/twrp.fstab");

strcpy(int_path, "tegra-sata.0");

property_set("ro.build.fingerprint", "NVIDIA/foster_e_hdd/foster:7.0/NRD90M/1749719_832.2408:user/release-keys");

property_set("ro.build.description", "foster_e_hdd-user 7.0 NRD90M 1749719_832.2408 release-keys");

property_set("ro.product.model", "foster_e_hdd");

} else if (!strcmp(model, "darcy")) {

/* darcy */

symlink("/etc/twrp.fstab.emmc", "/etc/twrp.fstab");

strcpy(int_path, "sdhci-tegra.3");

property_set("ro.build.fingerprint", "NVIDIA/darcy/darcy:7.0/NRD90M/1749719_832.2408:user/release-keys");

property_set("ro.build.description", "darcy-user 7.0 NRD90M 1749719_832.2408 release-keys");

property_set("ro.product.model", "darcy");

} else {

/* foster_e */

symlink("/etc/twrp.fstab.emmc", "/etc/twrp.fstab");

strcpy(int_path, "sdhci-tegra.3");

property_set("ro.build.fingerprint", "NVIDIA/foster_e/foster:7.0/NRD90M/1749719_832.2408:user/release-keys");

property_set("ro.build.description", "foster_e-user 7.0 NRD90M 1749719_832.2408 release-keys");

property_set("ro.product.model", "foster_e");

BTW, the NVIDIA SHIELD ANDROID TV Pro recovery OS image is now available here: https://developer.nvidia.com/gameworksdownload

I think I can flash the image in FlashFire and hopefully not lose my data or root via this thread: https://xdaforums.com/shield-tv/general/how-to-update-ota-5-2-2017-update-t3622540

But if someone wants to take a crack at updating the scripts, I could hold off. Heck I waited two weeks already., and the early release program is over. It may be worth having a working TWRP, since there are bound to be more updates coming with the Android TV O, which is a game changer.

Thanks,

Janx

---------- Post added at 04:12 PM ---------- Previous post was at 03:56 PM ----------

I've added my error message which shows expected release keys, vs. what's on my build:

Verifying current system...

E3001: Package expects build fingerprint of NVIDIA/foster_e_hdd/foster:7:0/NDR90M/1915764_884.4973:user/release-keys or [NVIDIA/foster_e_hdd/foster:7:0/NDR90M/1915764_910.7870:user/release-keys;

this device has NVIDIA/foster_e_hdd/foster:7:0/NDR90M/1749719_832.2408:user/release-keys

E: unkown command [log]

Updater process ended with ERROR: 7

Error installing zip file '@cache/recovery/block.map'

Done processing script file

MTP Enabled

Again, no dev here, but it looks like foster:7:0/NDR90M/1749719_832.2408 is already accounted for in the script.

Thanks,

Janx
[Shield Android TV Android Development] AndroidUser00110001:
Thanks for the info. Looks like just the fingerprint needs to be updated. I'll update TWRP with the expected fingerprints and see what happens from there. I still wouldn't flash with TWRP :)

Where are the logs coming from? I thought TWRP wasn't setting the right device ID but looks like it is.
[Shield Android TV Android Development] edjanx:
I took a picture of that error message when it appears on my TV momentarily after the 5.2 update fails. I then transcribed it for sharing here.

Janx
[Shield Android TV Android Development] dk1keith:
I have the latest 2017 Shield TV Pro. How do I confirm the fastboot oem unlock? the controller doesn't seem to work in fastboot so I can't press the A button.

Thanks
[Shield Android TV Android Development] OCDiary:
I am attempting root following a tutorial online, however, after trying to "fast boot boot recovery.img" it goes to the red 'Please wait...' screen! It's not booting the TWRP at all? I have tried unplugging the usb from the pc, but im not sure exactly when I should be pulling the plug. So that isnt working as a solution either.
[Shield Android TV Android Development] dk1keith:
twrp recovery restore

Hello all,

I have the Shield TV Pro with bootloader unlocked rooted and I can boot TWRP. I have made a couple of backups using TWRP but haven't tried restore. Has anyone actually used a restore on the Shield Pro 2017.

thanks
[Shield Android TV Android Development] dk1keith:
*bump* no one has done a restore from TWRP on the Shield TV Pro 2017?
[Shield Android TV Android Development] donthateme702:
an someone tell me how you flash SuperSu from Flashdrive in Twrp,i install full android nougat and could not sideload it. If both ports on shield are being one for mouse and one for 3.0 cable where do you plug it at?
[Shield Android TV Android Development] yojoe600:
Once you are in twrp you can unplug the USB cable and plug in a flash drive with SuperSU on it. Then find it with twrp. Or download it to the internal memory of the shield beforehand.
[Shield Android TV Android Development] donthateme702:
Thank you, i just plugged in a 4 port hub so i could use mose at the same time. Flashed and poof we have root,haha. But again thank you.
[Shield Android TV Android Development] yojoe600:
Yea that works too that's what I have set up.

Sent from my HTC 10.
[Shield Android TV Android Development] donthateme702:
works much smoother,and it keeps me from having to pull stupid usb cord out each time for it to boot to twrp.
[Shield Android TV Android Development] freshgreenz:
Have in general trouble also

I unlocked boot loader but can't get twrp img to flash says cannot load no such file or directory

---------- Post added at 12:54 PM ---------- Previous post was at 12:49 PM ----------

I unlocked boot loader trying to get the twrp img to load fastboot says cannot load no such file or directory any help would be amazing ty in advance
[Shield Android TV Android Development] Juggalo23451:
Make sure that the twrp image is in the same location as the ADB / fast boot files are.

Also make sure to put fastboot recovery xxxx(name of file) .img
[Shield Android TV Android Development] sageman70:
Hi. After flashing the twrp recovery on shield 2017 it keeps going into a booting loop which briefly shows the twrp logo and then it reboots again
[Shield Android TV Android Development] sageman70:
You can't as I have learned the hard way. What you need is save the SU file to a USB drive. You also need a USB HUB for creating more USB ports (buy one from ebay) to plug in both the controller and mouse USBs on the USB port nearest to the HDMI. When I place the USB drive in the USB port furthest away from the HDMI (used for the USB male to male) , TWRP freezes and it cannot be mounted for some odd reason. After executing the fastboot recovery command wait for the boot screen to start and then immediately take off the USB cable from the Nvidia device.

Once the TWRP screen shows on your screen, drag the swipe button to the right and then click install, select storage, USB and then select your SU file and complete the rest of the procedure (No need to sideload).