yashsingh1/xdaforums huggingface dataset:
[Shield Android TV Android Development] Ichijoe:
From what I thought I knew about Android, the Recovery Partition is fully independent of the OS One. This said from what I read about Nougat, where we used to just have the One OS Partition, from Nougat going forward we'll now have Two. An active One, and the other that will be used for active updates. This should be interesting for those on low spec Devices such as the 16Gb Shield. As the Android OS has traditionally taken about 4Gb of Storage. So can we expect that to double now?

About the only thing that could theoretically happen is that the Update overwrites the Recovery Partition. But I don't think this will be a problem.

But, to pass along some helpful info which I made an enquiry about in a different Thread. Once you have flashed TWRP as your recovery, and as far as I can tell you have to have it installed, and not merely loaded from a fastboot command line. You can simply install SuperSU again. (And you will have to do that again anyway.)

Which could be a problem if your like me, and stuck with just the One 4k (2160p), TV. Then this is a more round about way to reinstall SuperSU again after the Update.

Just do the following:

Login to your shield via ADB..

$ adb reboot recovery
$ adb shell
$ twrp install /sdcard/SuperSU.Zip
[Shield Android TV Android Development] Steel01:
The a/b system partition thing is only being done on new devices. We will not repartitioned and lose space due to the upgrade.

The current twrp works just just fine with N ROMs. The worst thing you will see is a couple errors saying a log command isn't found when installing the update. This happens on all ROMs, all devices. It isn't fatal and can be safely ignored. Other than that, everything will continue to work as before. Flashing, backup/restore, etc. No problems at all. No, I haven't seen the official update yet, but I've done some work with cm-14.1 which is the same core stuff.
[Shield Android TV Android Development] brandonb21:
this dosent work at all on the new shield. just reboots after flashing then it reflashes stock recovery
[Shield Android TV Android Development] Ichijoe:
Well I guess the question is does the "new" Shield TV (Slim), actually count as a "New Device"? That supports Google's new a/b System?
[Shield Android TV Android Development] brandonb21:
so fair the only thing that has been discovered with this new "model" is the usb identifiers have changed abit.
[Shield Android TV Android Development] Steel01:
Hmmm... Kinda surprised it doesn't boot at all. Maybe the dtb and kernel changed enough that the newer bootloader balks at them. I won't have one in hand until probably next week. Once I do, I'll make something work.

Previously I would have said no, darcy doesn't have a/b updating. But... The more I look through the code drop, the more it looks like it actually does. But I won't be able to confirm until I got my hands on it.
[Shield Android TV Android Development] brandonb21:
is their anything i can do to help you in the time being to help development along?
[Shield Android TV Android Development] brandonb21:
heres the 2017 5.0.1 image if this helps http://ota-downloads.nvidia.com/ota...-full_ota-1749719_832.2408.20170116175313.zip
[Shield Android TV Android Development] Steel01:
Well, I'm still waiting on a darcy. I hear it's supposed to ship this week. Sorry for the wait, but it's hard to do any development without the device. That or the update for the original 2015 one I've already got. Once I get my hands on something to test with, I should get something out pretty quick.

And yeah, the ota link helps. I went and compared a bunch of stuff and I think I have it ready to go, just can't test it yet.
[Shield Android TV Android Development] Downunder35m:
Only a USB keyboard will work, a transmitter for a combo without cable won't

Keyboard with touchpad, like the K400 work fine as well.

Hold A and B key then plug the power in, let go of the keys once you are in the recovery.

Once in TWRP you should be able to just plug a wired mouse in or use a keayboard with touchpad.

As long as debugging is active only one port works in recovery or fastboot, so no chance to connect a mouse and keyboard with seperate cables.

So far I have not found a hub that works in these low levels.

But most cheap, wired aftermarket controllers should work, although some might have the buttons switched a bit.

By default TWRP only uses the internal memory for backups and since you have no way connect anything else...

So going stright to backup should work fine and if it does not you get an error that you need to select the storage for your backup.
[Shield Android TV Android Development] nadia p.:
I believe, from what I've read elsewhere, that I need to disconnect the USB cable connecting (Shield TV <> PC). Before I it was connected and the other USB port was connected to the USB keyboard. I didn't boot into recovery mode, I booted to the Home Screen. Once I was able to launch the TWRP Manager, using ES file manager, I then unplugged the USB keyboard and plugged in a USB mouse. From there I was able to click on Backup... however when I tried to define where to output the recovery.img (if I recall the name correctly) it popped up ES to help define the output folder and from there after choosing Downloads I was stuck. By stuck I mean there was no way to say OK or step out of ES to get back to TWRP Manager for me to continue.
[Shield Android TV Android Development] nadia p.:
Installing via flash works.

I gave up attempting to install TWRP 3.2.3.0 using TWRP Manager me.twrp.twrpapp-26.apk.

I was successful in installing TWRP 3.2.3.0 via ADB and flashing it to my Shield TV 2017 (16BG) remote only.

adb devices

List of devices attached

############ device

adb reboot bootloader

C:\shield_tv>fastboot devices

############ fastboot

fastboot flash recovery twrp-3.2.3-0-foster.img

target reported max download size of 67108864 bytes

sending 'recovery' (17278 KB)...

OKAY [ 0.437s]

writing 'recovery'...

OKAY [ 1.016s]

finished. total time: 1.453s

fastboot reboot

rebooting...

finished. total time: 0.016s

adb reboot recovery_______<--- this step is key to get into TWRP's recovery mode

Now you should see the TeamWin screen on your tv/monitor (less than 4k).

adb devices

List of devices attached

############ recovery

NOTES: By the way using ADB and flashing it I didn't have to unplug the USB cable connecting the PC and Shield TV. I used a USB hub to connect a USB keyboard and USB mouse all at the same time which worked great.

---------- Post added at 01:33 AM ---------- Previous post was at 01:13 AM ----------

At the TeamWin Unmodified System Partition screen, I swipped the >>> Swipe to Allow Modifications button.

At the TeamWin Recovery Project screen, I clicked Backup, then checked [x] Cache based on the recommendation HERE. I left the rest as default.

I then clicked Backup and it started backing up the device. Once finished I used the < back arrow buttons to navigate to the main screen and clicked Reboot button to reboot the entire system.

Now when I attempt to boot to the Nvidia Home Screen there are two warning/error message saying that the system is corrupt.

After those messages go away there is only a black screen.

Can anyone enlighten me on what I did wrong and what I need to do to recover from this?

Current Status: I've lost ADB access completely. I'm able to reboot to Android Recovery by pressing A & B keys on the USB keyboard directly plugged into the back of the device on the USB port closest to the HDMI cable. I have access to TeamWin's main menu.
[Shield Android TV Android Development] Downunder35m:
Damn it, I knew I should have checked here first.

Explained it in your other thread but since we are all over the place with 7.2 already....

The system does not have write rights on a recovery level anymore.

At least not for the user or the recovery.

The DTB fixes this for the system but not for the recovery.

Here is what you did wrong in simple steps so everyone on a lower level and just starting can follow:

1. You flashed TRWP.

2. You used it.

Loool, sorry couldn't help it ;)

Jokes aside:

The bootloader still has all DM-Verity related things enabled when it comes to certain interactions.

Same for hash checks and such.

All we did so far is to get around some limitations.

Things have changed with the 7.2 update for good :(

The bootloader "left a note" for the system to inform it about possible unwanted and not authorised access attempts that could not be monitored or prevented.

As result the system now knows that something might be altered and as there is no way to check and correct it with an unlocked bootloader and disabled system restor functions it locks you out :)

Blame Google for it....

The only real way out goes like this:

Get TWRP working again with true and working restore AND flashing functions.

Patch the stock bootloader to be unsecue in the areas required and aslo disable DM-Verity, encryption and the pesky SELinux restrictions.

Patch the system to to match these mods, like the build.prop for starters and the recovery_from_boot.p and related scripts after.

If you like also disable the OTA functions while there.

Check the vendor for possible overrides and additional scripts that need attention.

Create a suitable updater script that allows for the required modifications to be applied and work.

Install the resulting Zip through (a working!!!) TWRP after wiping all included partitions and formatting them to remove all encryptions.

Boot the system and allow it to do its work by overwriting all the hidden partitions, safety things and such.

Reboot to TWRP when all is done and you did another reboot to confirm all is finnished and working as expected.

Install the persistent root solution of your choice, relax and enjoy.

You see the loop problem?

Without a fully working TWRP we are going nowhere, even if a ready to firmware to test is sitting in my ramdisk on the PC :(

And I won't give anyone an untested firmware in the hopes it works as planned.

If it works for me I feel safe enough to share it.
[Shield Android TV Android Development] nadia p.:
Hello Downunder35m, thanks for your time in reviewing the mess I got myself into and trying to explain it to me. I truly appreciate it!!!

A simple question first. Before flashing TWRP onto the device, while I had only booted to TWRP from the img file I was able to create a recovery.img backup which was written somewhere onto the device, perhaps Downloads. Is that recovery.img of any future use?

If not then I'll need a lot more assistance in understanding

exactly

what to do step-by-step. I'm unfamiliar many things you've noted above since I'm just recently learning Android. Are there any guides or instructions posted anywhere that I can being to read and learn from?

I assume there's no way to boot to a USB drive plugged into the device and work from there to restore/flash everything on the device back to a Nvidia developer OS image, correct?
[Shield Android TV Android Development] nadia p.:
Black screen after flashing TWRP 3.2.3.0 to Nvidia 7.1.0 on Shield TV 2017 (16GB)

I started a new thread HERE as I feel this will become a HUGE topic all on its own.
[Shield Android TV Android Development] Downunder35m:
If you can flash it and it works then fine, no problems with it.

And no, AFIAK there is no way to really use a stick or similar if not booted into the system.

Step by step is not easy with all this mess and options.

I will play a bit more trying to get TWRP working for me again, after that I will be able to make final conclusions.

And if the conclusions are positive then a fixed firmware will follow ASAP.
[Shield Android TV Android Development] nadia p.:
I'm able to boot to TWRP Recovery without an issue. ADB (Shield TV <> PC) is broken, I believe since the device is unable to boot to the Nvidia Home screen.

If there's a way to boot to TWRP Recovery then someone flash files on a USB drive or copy them onto the device and flash them from there I can try that. Alternatively I was reading that TWRP has a means to setup ADB in itself and sideload files. I've never done this before and may look into this as an alternate means if the other doesn't work.

If you have time can you offer some advice on what files you'd like me to attempt to flash and perhaps the best way to do it? With some little guidance I'll willing to try and report back what happens.
[Shield Android TV Android Development] whiteak:
Against my better judgement, I couldn't help myself and did it anyway. I was on the latest 7.2.2 Engineering firmware 30.7.130.5 (not Beta, Engineering, doesn't matter but is latest available Firmware).

After seeing the issues you guys are having, I then proceeded to downgrade to 7.1, as that is the firmware version where you guys said twrp still worked. Downgraded fine, I did the flash-all script mainly just for the test. I then rebooted to Fastboot, booted the twrp.img, reboots to twrp no issues.

So long story short, if TWRP is a must for anyone, it should not matter if you have upgraded above 7.2 or not, I have tested for myself you can still downgrade to 7.1 and use TWRP. Myself personally, I have no need or use for it, I just use Patched boot.img's for what I need but understand why some may stilk like to use it. Downunder35m knows why I don't bother with twrp anymore, it has nothing to do with the Shield at all but another device and even in saying that it was not TWRP's fault but it was a very bad and dangerous compile that never should have been released for public use for people to be guinea pigs, but that's another story not for this thread.

I just wanted to share my own personal experience of my 2017 Darcy Model coming from the lastest available firmware back to 7.1 and then still being able to use TWRP.

Now it's time for me to Flash back to latest 7.2.2 firmware 30.7.130.5 and get back Full Root Access.
[Shield Android TV Android Development] nadia p.:
Hello whiteak, Awesome!!! Thank you so much for testing this for us. Do you have any insight how I might correct my problem after flashing (not booting) TWRP onto my device? Is there anyway to wipe it clean and install the Nvidia 7.1.0 back onto it? Or as an alternative do something to make it work again? I can boot to TWRP Recovery but don't know what to do after that. ADB to the PC doesn't work any more. On a positive note at one point before flashing TWRP onto the device I booted TWRP and output a recovery.img which is still in the Downloads folder I think. I don't know if anything there could be used or reflashed.
[Shield Android TV Android Development] whiteak:
If you can boot to twrp, what I would do is flash back the Stock recovery.img and boot.img. Let me know what firmware version you think is currently installed and I can send you the Stock recovery.img and Stock boot.img for that version. To flash back the Stock recovery.img, in TWRP, you go to install and then choose "image", select the Stock recovery.img, choose recovery swipe to confirm, it will flash, do not reboot to system yet, go back and then do the same process for the Stock boot.img choosing boot etc, once both have been flashed reboot to system which now hopefully it does. Just note though, by doing this you will be losing access to the currently installed twrp, I cannot say by flashing back the Stock Recovery and Stock Boot images will get you back up and running but it is what I would do if in your situation.
[Shield Android TV Android Development] peexl:
Hello me also i have a Shield 2017 remote only.

I was in 7.2.1 succesfully downgraded to 7.1 flashed twrp installed lineageos but it stuck after the setup wizard (loading animation)

If reboot i have the setup wizard again and again .

My question is how can you boot in recovery mode without a gamepad controller?
[Shield Android TV Android Development] Adromir:
Attach a usb Keyboard to the Shield and press A+B after powering on the Shield
[Shield Android TV Android Development] nadia p.:
Hello peexl, If you have a USB keyboard and USB mouse, first attach the USB keyboard to the port

closest

to the HDMI cable. Hold down both keys A and B at the same time, then boot your Shield TV. This will put you into Recovery Mode. Use the "arrow" keys to navigate. If you have a USB hub you can use that, however in one odd/random case I found I needed to plug in the USB mouse directly to Shield TV. If ever you get to the dead droid screen, press the B key to get to its submenu.

Later to swipe you'll find the keyboard won't work unless it has a touchpad. To resolve this you'll need to use either a USB mouse or others have stated to install their App on your personal device (phone or tablet) and use that to control things. I prefer wired objects to do this sort of work. You may need to unplug the keyboard to plug in the mouse if the other USB port

farthest

away from the HDMI cable is in use to connect to your PC.
[Shield Android TV Android Development] nadia p.:
Just a quick note. The OS I flashed before installing TWRP was the Nvidia 7.1.0 developer rooted OS. Shouldn't this help us? nv-recovery-image-shield-atv-2017-7.1.0-dev_rooted.zip

---------- Post added at 11:10 PM ---------- Previous post was at 10:51 PM ----------

Hello whiteak, Thanks for your suggestions. I have a few questions. Is the best way to flash the Nvidia Recovery or Developer OS? I assume we'll extract only the recovery.img and boot.img (untouched) from that package, then boot Shield TV to TWRP Recovery, insert a USB drive with recovery.img and boot.img files, then attempt to flash reading them off the USB or copy them natively to the device? Is there a place that documents the flashing procedures so I don't mess things up?

I'm hoping whatever TWRP modified is only in the recovery and boot information, then perhaps by flashing those to areas it will remove it and it's modifications completely.
[Shield Android TV Android Development] Downunder35m:
Ok, about to give up here :(

I have no issues downgrading to 7.1 and there using TWRP as before.

Took a while to get everything cleaned and fixed but after about (no clue really) reboots and flashes I had a clean 7.1 with locked bootloader and no complainst.

Of course now the damn 7.2.1 insists on updating as there is no userdata or ADB yet to fix it.

Here now what I tried (and failed on) to get my custom ROM 7.2.1 working or the official 7.2.1 - which is a user and not an engeneering version.

I take a link for it though with pleasure ;)

Flashing things under 7.1 with TWRP worked out as it should, all fully rooted and such.

But to get there I had to do the update, full setup and then downgrade to 7.1.

Funny thing now is that this only worked once - after I finally had a fully clean 7.1 back.

The downgrade that worked fine from 7.2 now kills the userdata when the bootloader is downgraded from 7.2.1.

Next step was to just get the 7.1 working again and then flash my custom 7.2.1 through TWRP.

The bootloader reported a corrupted system right away and did not even give me the NVidia logo.

Fine then, I try the 7.1 and adjust it to my liking and then flash that so I won't get the pesky update anymore.

Does not boot, no matter how I try to get it on the shield, updater script and zip, flashable zip, just the images, block based and sparse - nada, nothing, nix, zilch, nichts....

Of course the great Android only release that Zulu created will still work as before...

And it worked as good as the rest, not at all, not even a half boot near the system....

I am running out of ideas here as:

a) I have no real clue why my Shield failed to accept anything but original files except for boot and recovery images.

And for the later, flashing TWRP now always results in a corrupted and not bootable system for me.

b) To the best of knowledge the problem with my custom roms can't e within the rom as they install fine.

Plus they use all the standrd things that work fine for me on other systems.

Right now I suspect something is seriously messed up with my security on the device.

It is like having a persistent boot virus that just waits to have a good laugh on my behalf.
[Shield Android TV Android Development] whiteak:
Yep, that's exactly what I would do, it doesn't matter whether you flash the files off a usb or off the device itself as long as you can point twrp to where they are. Just make sure you get the img's from the Stock Firmware and not the Dev Firmware. The instructions I provided last post are the actual instructions you need, step by step. If you need I'm sure there would be a Youtube video of someone doing it, it actually is a feature of twrp to flash boot and recovery .img's.
[Shield Android TV Android Development] nadia p.:
I can't beleive I have to ask this question...

Please accept my apologies for having to ask this question here. What's required to create a USB drive, place the system.img, boot.img, recovery.img, etc... on it so that TWRP can actually see the files?

I have a SanDisk 32GB USB drive that I formatted as FAT32. TWRP can mount and see it but cannot view any of the files. I later created a 8GB partition, formatted that as FAT32, placed boot.img and a readme.txt file as a test. TWRP can't see either of the 2 files. I've formatted the USB drive and primary and logical. I've tried MBR and GDP...

I've spent hours reading several different web sites, watched a few videos and I still cannot figure how what's so special that TWRP can't read anything. I've tried 3 different USB drives and even a 4TB External USB drive.

I've not found anyway to format the drive from TWRP to ensure it's don't it's way, then later place the files onto that's required to install. Any advice is greatly welcomed at this point. I'm starting to think it has something to do with Android or TWRP security.
[Shield Android TV Android Development] whiteak:
It shouldn't matter, twrp should be able to read the usb drive, are you using the usb port closest to the hdmi port?, you may have to use a usb hub to be able to use a mouse and read the usb at the same time.
[Shield Android TV Android Development] nadia p.:
Shield TV sees the USB drive and so does TWRP. There's an Android folder with some other data in it and a LOST.DIR folder that is empty. TWRP sees this too. I have inserted the USB drive into the port closest to the HDMI cable and tested it in a powered USB hub too. The results are the same. The USB port farthest away from the HDMI cable doesn't seem to do much, I believe Shield TV has it setup for ADB to the PC still.

I just returned from a friends house who has a Sony Android TV. I asked him to format it using that running Android 7.0. I'm installing 2 files now as a test... we'll see if it works.

---------- Post added at 01:01 PM ---------- Previous post was at 12:41 PM ----------

No luck. At first both Windows 10 PC and macOS 10.13.6 Mac had to initialize the USB drive to be able to see it after the Sony Android TV formatted it. One readme.txt file and boot.img were copied onto the USB drive, ejected it then rebooted Shield TV, it could see the USB drive but not the 2 files I added. Very odd...

---------- Post added at 01:04 PM ---------- Previous post was at 01:01 PM ----------

Hello whiteak, Is there a way to

sideload

the files if I were to zip them? Do you think I need an 8GB USB drive, that the 32GB is too large? From my understanding the USB drive needs to be formatted as FAT32, MBR and Primary, correct?

Are there any Terminal commands that can be used within TWRP to format the USB drive? I've attempted to change the file/folder permissions using TWRP's File Manager and chmod 755.
[Shield Android TV Android Development] whiteak:
You have tried mounting the USB I take it? I would try a different USB Stick if you have one for sure, it doesn't have to be any special format at all, just a simple fat32 format through Windows is all it needs. Without actually physically seeing what is going on, I can't really say what is going on, power is actually getting to the USB, eg, can you see any lights flashing etc?

Maybe should take this to your other thread as well, this thread is getting a bit off topic.
[Shield Android TV Android Development] nadia p.:
Done. :)