[Shield Android TV Android Development] Downunder35m:
Important notice! : iLLNiSS made me aware of a serious risk!

If you play with the firmwares manually and not with the flash all bat then DO NOT flash the blobs!

These are the actual bootloader files and stuffing up here will cause a hard brick!

I have to stress this out as it is serious thanks to not having working APX drivers a flshing programs for the Shield!

For starters, I uploaded a copy of the 7.2 developer firmware here:

7.2 developer ZIP on Dropbox

It is the full 1.1Gb update and not the 422mb block based one.

I have done some extensive tests since the first block based update wrecked my rooted Shield.

Some of it will end up in this post as info for everyone.

But lets start with what seems to be the problem for a lot of users right now who run a rooted Shield : Fixing the problem ;)

A downgrade is officially not supported by Nvidia but my tests showed it works just fine if you only go back to the 7.1.

So far my tests showed differen sources for a Shield no longer working after the OTA.

1. The device had an unlocked bootloader and you got the 422mb block update.

This would have stuffed your bootloader and the Shield won't go past 1/4 on the progress bar for the update.

You are in luck as just flashing the 7.1 bootloader will fix it.

After that just dismiss the update and change the settings to manual updates.https://xdaforums.com/editpost.php?do=editpost&p=78466377

2. Your device was already fully rooted and you got the full update that resulted in your Shield doing all sorts of thing but nothing properly anymore.

As long as your apps are still there and the Shield is still somhow usable you are lucky again.

A downgrade to 7.1 will fix it, I will explain the steps required further down.

3. You made bid mods, used Magisk or other rooting tools and now your Shield complains that your system is corrupt.

Bad luck if your bootloader is locked as you loose it all.

Lucky if the bootloader is unlocked as you might be able to keep most if not all during the downgrade.

General words of warning:

Even if your bootloader was unlocked from day one I can not garantee that the downgrade will keep all settings, apps, databases and so on.

For me it works fine as I kept all vital databases on external storage.

The procedures are all based on the developer firmware, on the stock firmware some things can still be done but then again you should not have more than software problems.

On the stock firmware the bootloader is locked by default and you can use some things required to owngrade due to the restrictions of a stock system.

General downgrade procedure for the developer firmware to get back to 7.1 :

If the update did get stuck on the progess bar early on and a reboot won't fix it so you can dismiss the update you just follow the steps.

If you can reboot into the 7.1 then just dismiss the update.

Trust issues or curruption warnings at boot but an otherwise working shield on 7.1 require to flash the 7.1 bootloader again.

In some cases it is possible to skip the corruption warning with a connected controller.

A reboot once you got to the homescreen will determine how bad it is.

Reboot goes fine: You are good.

Reboot keeps nagging with warnings other than the unlocked bootloader: Downgrade.

The downgrade is only required if you have problems or the Shield already runs on the 7.2!

In almost all other cases just flashing the 7.1 bootloader is sufficient.

Fixing a stuffed Shield by sideloading the 7.1 firmware while keping all apps and things:

Enable USB debugging and allow the connections for the computer if you still have access to the settings.

Otherwise you need to flash the 7.1 fresh and might loose vital things that need to install again.

Reboot into the stock recovery, if you use TWRP flashed on the Shield already then please flash the recovery from the 7.1 firmware first.

Hook up the controller and pressing A or B should get you into the normal recover screen past the dead droid.

ADB sideload XXX - where the xxx stands for the filename you have for the developer ZIP.

After the rebbot you should be back on your 7.1 homescreen and can dismiss the 7.2 update.

Also change the update settings while at it ;)

Fixing a fully stuffed Shield and then downgrading to the 7.1 firmware:

If all went down south then you tried a few things and realised there is no way to get your data back and even less to prevent the 7.2 update.

Installing the 7.1 from scratch forces the setup wizard and before you can get anywhere you need to update to 7.2 :(

So much easier to use the linked 7.2 update from above until Nvidia provides it on their download servers.

A vital thing to do is to keep the bootloader locked!!

Same for NOT having TWRP installed on the Shield!

If in doubt flash the 7.1 boot and recovery partitions first then go back into the stock recovery and wipe the cache.

Coming from a stock developer firmware with just an unlocked bootloader you are good to go.

Sideload the 7.2 update.

Unplug when the reboot starts and go into fastboot to lock the bootloader: Fastboot oem lock.

This is a vital step as the new kernel otherwise could ruin the completion of the install.

Ignore the double hassles and go through the wizard so you can enter the settings again to enable the developer mode and USB debugging.

Unlock the bootloader so you can do it all again ;) Last time I promise!

Once you have both the bootloader unlocked AND the Shield in a usable condition past the setup wizard:

Reboot into the recovery to sideload the 7.1 firmware.

After the next reboot you are back on the 7.1 homescreen drirectly and can dismiss the update.

Possible tricks that can help you to prevent the installation of the 7.2 update if you come from a fresh 7.1 install instead:

Don't allow the reboot and instead use ADB to reboot into the recovery.

Wipe the cache - this will remove the scripts required to start the update after the reboot.

The next reboot should bring you back to the homescreen where you can stop the new download of the update and change the update settings.

TWRP, full root and new security measures in 7.2:

The 4.9 kernel used also makes use of a Fstab configuration that no longer includes the system partition.

This and other restrictions currently make the normal use of Magisk impossible.

With no system partition available to Magisk the changes in the boot process come to a stop and the Shield gets stuck during boot.

The added restrictions also make it very, very hard to manually add SU and busybox.

At least without getting the currupt system popup on every boot and finding out that a lot of things still don't work properly.

A final 7.2 firmware is said to be available on the download servers today.

If this final is no different from the current OTA then it will not be of any use for users requiring a fully rooted devices.

With the stock recovery still using the old kernel all attempts to use recovery functions to alter the system for rooting fail as well.

Can't blame the company as all this is part of Google revamp og security and closing backdoors and loopholes for possible attackers.

Personally I think it is Googles way of keeping control over devices they don't actually own.

Anyways I did make some little progress:

Plans for the near future:

Security is good but I like to know what my Android devices are doing and especially what Google likes to collect if I can not find ways to stop it.

So I will not try to use any backdoors or secrurity vulnerablilites in the new kernel to allow a full root on my Shield.

I will go the route I know best: Manual labour ;)

The bootloader is already fixed to allow what we are used to from previous developer firmwares.

As SU and busybox can not be manually entered at this stage I will try to include them directly in the stock 7.1 firmware while renaming the OTA updater to have it a bit easier.

Assuming that works as expected I will do the same on the 7.2 firmware and compare the corresponding scripts and so on.

If the standard SU still works on an "unlocked" 7.2 I should be able to adjust the Magisk ZIP accordingly to implement it into the bootloader.

Only need to figure out if Magisk then has enough rights to work and the system is still happy to accept the changes.

I noly have the 16Gb 2017 model to work with but since the bootloader seems to be same for all Shield models I think if it works then it should do so for all models.

In the meantime I hope the infos here will help some pople to get their shield back without the need to sent it in.

Update 25/12/18: I got TWRP working on 7.2 :)

This is only true for the 2017 model though as I have only this for testing.

Currently creating a backup to the internal storage.

If the restore works then I will upload the new TWRP - for the said model only!

Give me a day or two to fix it for the other models too.

There is progress on the rooting front as well.

Created new scripts for my kitchen to be able to handle the new file_context thing.

A fully pre-rooted and totally unsecure (in terms of ABD, DM-verity and such) is already cooked, just did not dare yet to try it out as I have a real life job too.

As for the pre-rooted firmware:

Things have changed quite a bit with the new kernel in terms of "just adding SU or Magisk".

Magisk might see an update for this problem soon, SU however seems to tally fail on two levels.

So far I was unable to do a full install of the modded firmware.

Flashed all at once and the boot just hangs.

Bootloader, reboot, then the rest seems to work.

At least for the basic install of the system.

If I add SU and busybox the system still ends up with a corrup notice during boot and then it fails.

Tune in over the next few days for progress updates at the end of the thread.

Major developments will be added right here.

Just a matter of finding the last restrictions.

Once that is done Magisk should be possible as well.

Ok, TWRP boot fine, does a backup but fails to restore the system to a bootable state.

Will now check if at least installing a zip works.

Well, it did not, so TWRP has to wait a few more days :(

I edited post 3 with instructions on how to "unbrick" and go back to 7.1.

Update 27/12/18: A friend of mine found some intersting stuff.

A 7.2 firmware offering a pure Android without any TV stuff but also a full root possible.

I hope he will share his finding here soon or allow me post it all in his name.

For now lets just say: It really works if done the rght way!

Full write rights, installing Magisk modules and all.

All thanks to an undocumented flaw in the device security structures, so even without any hidden backdoors or such LOL

Update: Whiteak was so kind to provide a working root solution in post 36, please check it.

I can confirm it is working as promised.

So the credits for this one go to Whiteak and the credits for the idea and use of the DTB file to Zulu99 - great idea!

To prevent any problems I advise to perform a factory wipe after the install and before the first boot.

Switch to the stock recovery to do this then boot as normal an enjoy.

A complete firmware with the required mods is sitting on my PC just waiting for idiot behing the keyboard to figure out how to pack it properly for flashing.

Once that problem is sorted and also TWRP working again things will get a lot easier.

Annoying update:

I was not able to confirm my web findings on the 7.2 firmwares bootloader but it seems other devices running the same type of kernel and bootloader and a bit lost now.

AVB is fully implemented on the latest level.

(Again I am working on confirming or denying these findings!)

This means any alteration to vital parts of the system will fail with a corruption warning or worse.

Custom recovery access is limited if not fully restricted.

But even if it works you still need a firmware to flash that either is able to disable all this crap, hoping the bootloader alone will allow it, or

to hope Nvidia will provide a future bootloader update with these restrictions removed.

We can not downgrade the bootloader and even if there is some old one out there that would actually be flashable the risk is high to end with a brick anyway.

The DTB, at least in my tests gives us the required system wide write access but I have no information about the AVM verfified boot other than that Zulu99's firmware works.

But if it was compiled with the NVidia developer suite then it will be signed accordingly so the bootloader accepts it.

Could not find any info on how his firmware was actually created.

It gives me the hope though that once I have a fully working TWRP again that my modded 7.2 will work as expected and with no restrictions anymore.