yashsingh1/xdaforums huggingface dataset:
[General Topics] OfficerJimLahey:
Welcome to XDA! :cowboy:

Gee, I didn't realize it, but there are (at least) two of these well established topics (and stickied) going on now:

One is right above yours, for general discussion

The other is in the Q&A sister subforum, more tailored for asks

Since your thread is geared more for asking which to buy, I would go for the latter.

Good luck, and hope this helps.

To help promote the use of the above threads, I will be closing this one now.
[Shield Android TV General] anchung.chen:
Hi All:

Thank Luxferro, Tilator and hallydamaster for your hard works, so we could replace the SSHD on shield-pro-tv with any SSD or HHD.

I wrote a small program to do all calculations and generate the new lastpart.bin directly.

usage : ./shield_pro_new_disk_gpt_calculator Input_bin_file New_disk_size_in_byte Output_bin_file

It is for 64-bit Linux PC. Any comments are welcome. And if you like, the source code will be opened.

Well, I think it is quite straightforward to use it. This program just generates the modified lastpart.bin from your original lastpart.bin and disk size (byte) of new SSD/HHD which you will migrate to.

For example of hallydamaster guide, the new 2TB disk has 2000398934016 bytes and 3907029168 sectors. Then

Using following command to generate the correct lastpart.bin for the new 2TB disk.

./shield_pro_new_disk_gpt_calculator lastpart.bin 2000398934016 new_lastpart.bin

Using following command to write the correct lastpart.bin to the new 2TB disk.

sudo dd if=new_lastpart.bin of=/dev/sdX bs=512 seek=3907029158
[Shield Android TV General] tech3475:
Thanks for the guide.

Does anyone know the performance penalty for using a regular 2TB HDD?
[Shield Android TV General] hallydamaster:
Well, I suppose we have the guide for educational purposes then! ;)

Please, tell something about how to use it.
[Shield Android TV General] hallydamaster:
I know that another user here [MENTION=7449004]ahmed68[/MENTION] just did his with a SATV, AFAIK.

I don't think it was an SSD atleast.
[Shield Android TV General] anchung.chen:
Well, I think it is quite straightforward to use it. This program just generates the modified lastpart.bin from your original lastpart.bin and disk size (byte) of new SSD/HHD which you will migrate to.

For example of your guide, the new 2TB disk has 2000398934016 bytes and 3907029168 sectors. Then

Using following command to generate the correct lastpart.bin for the new 2TB disk.

./shield_pro_new_disk_gpt_calculator lastpart.bin 2000398934016 new_lastpart.bin

Using following command to write the correct lastpart.bin to the new 2TB disk.

sudo dd if=new_lastpart.bin of=/dev/sdX bs=512 seek=3907029158
[Shield Android TV General] ahmed68:
have any example how to use it or only run in term ./shield_pro_new_disk_gpt_calculator input_bin_file disk_size_in_byte output_bin_file

plz help I wont to gen gpt for 64gb sd card. I have boot.img for sd card and usb only for l4t Ubuntu thanks.
[Shield Android TV General] hallydamaster:
You are supposed to do:

./shield_pro_new_disk_gpt_calculator lastpart.bin 68719476736 lastpart64gb.bin

But take the byte value you get from your own fdisk -l output.

Also, if you are going to use this for Linux and not android, I don't think it will work. The GPT layout that the SATV Pro uses is not standard.
[Shield Android TV General] ahmed68:
hallydamaster thank you for help

now i use the orig. sshd under ubuntu 14.04 L4T 24.1 i wont to make sdcard for linux and sshd for android to use shield in 4k tv android the best .
[Shield Android TV General] yahoo2016:
I think Nvidia should put boot loader and kernel on internal emmc's for both 16GB and 500GB SATVs rather than keeping significantly different ROM versions for 16GB and 500GB SATVs.

It'd save Nvidia and users time by doing so.

It seems much simpler to add HDDs of any size to 16 GB SATV if the HDD cable is available.
[Shield Android TV General] hallydamaster:
I certainly agree with that, seems they had a brain fart when deciding how to build the pro. Could be great if we could somehow convert the pro version to boot from internal EMMC.
[Shield Android TV General] yahoo2016:
I have serial console print out from 16GB SATV:

http://xdaforums.com/showpost.php?p=67973969&postcount=303

I'm wondering what the output would be for SATV Pro when the HDD is disconnected.

If the first stage boot loader (TegraBoot?) is smart enough, it could check emmc for boot loader.
[Shield Android TV General] hallydamaster:
That's indeed interesting, lot of info in that output!

I'm pretty sure that [MENTION=7386697]Tilator[/MENTION] had someone send him a copy of a complete rip of the EMMC from a 16GB SATV.

He then wrote it to the EMMC on the Pro, which is just empty. It didn't boot with it, but I'm not sure if he tried booting it without the HDD in it.

Cloud be interesting to try though.

Unfortunately I don't really have the time to read up on UART and solder wires on my board to try this. :-/

Not for the time being at least.
[Shield Android TV General] ahmed68:
i will try to flash satv pro from satv and see it must save in emmc , I wont to make sd card like recovery for satv and satv pro I try repack the partition but bot work I need to edit boot.img #include <sys/mount.h>

#include <unistd.h>

#include <linux/reboot.h>

#include <fcntl.h>

extern char **environ;

int main(int argc, char **unused) {

mount("/dev", "/dev", "devtmpfs", 0, NULL);

mount("/dev/mmcblk0", "/dest", "ext4", 0, NULL);

// mount Android system

//	mount("/dev/mmcblk0p1", "/mnt", "ext4", 0, NULL);

mount("/dev", "/dest/dev", NULL, MS_BIND, NULL);

chroot("/dest");

chdir("/");

char * const argv[] = { "/sbin/init", NULL };

execve(argv[0], argv, environ);

}

must change mmcblk0 to mmcblk0p1 ,mmcblk1p1 or sda21/32

---------- Post added at 08:40 PM ---------- Previous post was at 08:20 PM ----------

I take this flash.sh from tegra jetson-tx1

flash.sh: Flash the target board.

#	flash.sh performs the best in LDK release environment.

#

# Usage: Place the board in recovery mode and run:

#

#	flash.sh [options] <target_board> <root_device>

#

#	for more detail enter 'flash.sh -h'

#

# Examples:

# ./flash.sh <target_board> mmcblk0p1	- boot <target_board> from eMMC

# ./flash.sh <target_board> mmcblk1p1	- boot <target_board> from SDCARD

# ./flash.sh <target_board> sda1	- boot <target_board> from USB device

# ./flash.sh -N <IPaddr>:/nfsroot <target_board> eth0	- boot <target_board> from NFS

# ./flash.sh -k LNX <target_board> mmcblk1p1	- update <target_board> kernel

# ./flash.sh -k EBT <target_board> mmcblk1p1	- update <target_board> bootloader

can anybody edit the boot.img to

1. mmcblk0p1 for emmc

2. mmcblk1p1 for sdcard

I think its most work
[Shield Android TV General] ahmed68:
i flash satv pro from satv i now it come not bootable then i will remove hdd and boot to linux when run sudo fdisk -l i see 2 part of hdd first mmcblk0 (emmc) and sdx its sda in android by dd if=/dev/sdx of=firstpart.bin count=6899870

then dd if=firstpart.bin of=/dev/mmcblk0 and dd if=lastpart.bin of=/dev/mmcblk0 bs=512 seek=xxxxx (xxxxx i will take it from fdisk -l -10) then i most to delete boot patition from sda by sudo fdisk /dev/sda21 # input d , w .

now we have a work satv non pro , i need to use ubuntu in emmc and android in sda for that we must make the first boot img for dualOS like (Geekbox Lollipop Lubuntu dualOS)

http://forum.geekbox.tv/viewtopic.php?f=12&t=3198

anybody have any edia plz help.
[Shield Android TV General] yahoo2016:
You can boot to Android from emmc (mmcblk0) of SATV Pro without HDD?

Does recovery mode work for SATV Pro without HDD?
[Shield Android TV General] revoman:
Is this fix working with the 3.2 update from a few weeks ago? I'd like to duplicate more of my movies onto my SATV Pro now that the Plex Server is installed.
[Shield Android TV General] hallydamaster:
Hi ahmed, can you please clarify if you had it boot without the HDD?

You cloned the HDD partitions onto the EMMC? And then removed the boot partition from the HDD, and then it booted anyway?

This procedure will just clone your HDD to another disk, this should be totally independant from Android, unless ofcourse Nvidia would do something to break this.
[Shield Android TV General] polve72:
Maybe I'm the only one who would like to put a smaller HD on my shield TV. Can someone tell me if a 128GB SSD is larger enough or the smaller disk is 256GB?

TIA Polve
[Shield Android TV General] hallydamaster:
Thank you. I found a random app for testing sd card performance on Google play store. It was a phone app, so I had to sideload the app manually.

You should know that, due to hw limitations in the SATV, it caps the performance at 2 or 300 mbps (can't remember exactly). You will never utilise the full performance of your ssd unfortunately.
[Shield Android TV General] hallydamaster:
Just app I understand you correctly... You backed up your bin files after it got bricked?

You should be able to clone only the part of the drive you need. And it should work unless something else is wrong with your machine.

I can try work something out for you, but I'm not with my computer atm.
[Shield Android TV General] Drrobot:
that would be great and much appreciated!

thank you.

yeah backed up after it was bricked ( didn't know of this hdd swap's existence before hand )

the problem is that i cant access recovery, fastboot nor see any system partition data ( where i assume system should be, is all null in the firstpart.bin )

i was on the 6.2 update already, bootloader unlocked, but wanted to flash over the developer image from nvidia's site. it flashed the blob and partial on the boot.img and failed to boot after its restart. Now its only recognized as APX device on my machine.

i hope that information can further help you :)

thanks again

i should also note, that using a 1tb drive, and flashing partition 1-15 from my backup make the system un-bootable. and is what brings me to apx mode.

but using anothers, 1-15 partition flash, i am able to boot.

buuuut, i'd like to keep my drm keys. so the error with my booting lays within those partitions.
[Shield Android TV General] pnkiller78:
OK, Thank you. I will try that.

Also, I was thinking, since installing a SSD in the SATV would not yield big performance boost, I think that a bigger SSHD would make more sense. But there's one thing that bothers me in this procedure, and it's that all the information that I have on the SATV is lost and I have to start over again.

So, I was thinking if it would be possible to get away with this idea.

1. Dump the firstpart.bin and DO NOT 4K align it.

2. Dump the data partition and DD it onto the new drive

3. Dump the lastpart.bin and patch it to the new size of the new SSHD.

4. DD the lastpart.bin onto the new SSHD, following the guidelines of this guide.

5. Use gparted to resize the data partition a fill rest of the drive.

What do you think? I haven't tried but to me it looks like it could work. Correct me if I'm wrong.
[Shield Android TV General] hallydamaster:
This will not work, because you cannot read the disk in a linux environment or any other for that matter. Only the SATV will read the disk as it is.

You could do the migration to a new larger drive, and then you can use testdisk to make the drive readable.

Then you can transfer your data to the new SATV.
[Shield Android TV General] hallydamaster:
So, try download this attachment.

Then you write your own bin file from your own backup onto your drive, hopefully restoring your DRM/Widevine.

The bin files should be written as follows:

dd if=first8.bin of=/dev/sdX
dd if=10to14.bin of=/dev/sdX seek=36864
dd if=16to20.bin of=/dev/sdX seek=73886

This should write the first 20 partitions without the DRM/Widevide data.

Please let me know how it goes! :)
[Shield Android TV General] Drrobot:
Awesome, I'm re-writing my backup to the drive now.

Also, I should report that the 1TB HGST TravelStar 7200rpm HDD ( 7K1000 model ) does work with the ShieldTV

Now time to sit and wait for dd. ?
[Shield Android TV General] Drrobot:
After tons of trial and error, and with the help of hallydmaster, i have gotten my hdd ( i think ) to a normal widevine L1 authenticated device.

after hallydmaster sent me his fix, i had reflashed my backup and flashed his fix over it. Just to see it got worse... turn on then off instantly.

so i started delving into a day long dd fest.

long story short, if you had done a bad flash from a factory image / dev image, make a backup asap. your EKS ( NVEKSP ) partition will be extremely useful.

i modified my lastpart.bin to work with my 1tb drive.

i downloaded the start.bin from http://xdaforums.com/shield-tv/development/nvidia-shield-tv-ssd-t3402580

and i wrote that to the drive, then wrote my lastpart.bin

plugged my drive into the shield, let it update to 6.2 fw , checked my widevine L1 status ( not there as expected )

unplugged and replugged back into my pc.

flashed my original backup .bin EKS partition to the drive.

popped it back into the shield, checked my widevine L1 status, L1 verified! success!!!

Netflix works as expected, Chromecast works etc etc.
[Shield Android TV General] hallydamaster:
I'm glad you got it sorted, even though my little "package" didn't work. :)

Great that you discovered that the only partition really needed for Widevide is EKS. I'm certainly going to look into that at some point!
[Shield Android TV General] jionny:
Don't know if it will work, hope it will for you but early on when I first started flashing my shield I had the same exact problem contacted nvidia and was told that if its recognized as apx then it is hardware failure
[Shield Android TV General] Tinwarble:
Well, I've tried everything. I've tried cloning with a 2 bay cloner, doing a direct clone in linux, creating a image file from the source drive then dd'ing to the SSD, tried this https://xdaforums.com/shield-tv/development/nvidia-shield-tv-ssd-t3402580 and tried the method in this thread.

Nothing!! Just black screen, like the drive isn't even installed.

I'm just trying to clone to a Samsung 850 EVO 500GB SDD and I can't figure out what's wrong, other than maybe there's something wrong with the SSD or something wrong with the SATA cable on the Shield, though the SSHD works fine.

The only thing that does seem odd is that the sector count for both the SSD & SSHD is 976773164 and not 976773168. I adjusted for that in "skip" & "seek", but I'm wondering if that is throwing things off.

Source:

Disk /dev/sdj: 465.8 GiB, 500107859968 bytes, 976773164 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

SDD:

Disk /dev/sdj: 465.8 GiB, 500107859968 bytes, 976773164 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Also, I didn't do a factory reset with the SSHD or unlock the bootloader. Does anyone think that would make a difference?
[Shield Android TV General] hallydamaster:
Well, I just checked on my end here, and my disk are reporting:

Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 512 bytes / 4096 bytes

So definitely seems like something isn't right on your end with the disks.

What kind of Linux environment are you using?

It should have no impact, whether or not you did a factory reset beforehand.
[Shield Android TV General] Tinwarble:
Ubuntu 16.04, running it as a standalone on an external drive.

Also, if I run dd from Windows I get the same size

\\?\Device\Harddisk10\Partition0
link to \\?\Device\Harddisk10\DR13
Fixed hard disk media. Block size = 512
size is 500107859968 bytes

EDIT: Ok, I think I figured out what was wrong with the byte/sector count. Seems like there's some sort of issue with my USB>SATA cable. When I use it I get the above, when I use my Sabrent 2bay I get 500107862016 bytes in using dd --list.

Think I'm going to try this one more time and just pull one of my drives from PC and do a direct SATA connection.
[Shield Android TV General] hallydamaster:
That's kind of weird, it reports the sizes like that.

Hopefully you'll have better luck with a direct connection.
[Shield Android TV General] Tinwarble:
Yeah, never seen anything like that before, really threw me for a loop.

I hope so too, it's been a PITA trying to get this to work. Especially want to get it cloned since the Pro is discontinued (apparently).

One thing I can say though is that I've become an expert on removing and installing the drive on the Shield. :p
[Shield Android TV General] Tinwarble:
Ok, we are cooking with gas now!

I first tried using my Sabrent 2 bay cloner, it did fine copying the SHDD, but when I went to write the files to the SSD it would only write 2.8GB of 3.5GB of the data. Plus, it appeared to unmount the SSD towards the end of the write. So I would suggest anyone attempting to clone their drive to stay away from the Sabrent EC-HDFN cloner.

Anyway, the direct SATA connection worked and everything is much quicker. Boot time went from about 2 min to only a few seconds and is now on par with my 16GB Shields.

A big Thanks to [MENTION=2890402]hallydamaster[/MENTION] and all those who contributed to getting this done.
[Shield Android TV General] Seattleweather:
can I just reloader bootloader on my existing SSHD since I could not access fastboot mode? If so, how? Thanks.
[Shield Android TV General] hallydamaster:
I would like to help you, but I do have a little trouble understanding your question.

Did something happen to your SATV?
[Shield Android TV General] Seattleweather:
Basically the light is up and the hard drive is spinning. That's about all it can do. The unit is bootable, but I could not access fastboot mode. NO outputs fron hdmi or usb. I am thinking the bootloader part on the harddrive is messed up. Can I just take the harddrive out and reload the bootloader from the stock image?
[Shield Android TV General] hallydamaster:
Sorry, have been quite hung up with work.

You can try to take out the SSHD and do a backup of the drive as described in my guide.

Then try to write the files from this thread: http://xdaforums.com/showpost.php?p=67426622&postcount=23

If the SATV boots after this, you can recreate your NVEKS partition to get Widevine working again.
[Shield Android TV General] pnkiller78:
Anybody having trouble upgrading to Shield Experience 6.3?

I have a 2TB SSHD installed on SATV, my original SSHD was on Shield Experience 6.2.... now when I select to install SE6.3 the SATV reboots, enter into upgrading mode, with a progress bar covering about 20-25% of the bar in green, then it reboots, and takes a little longer than the usual time to enter in the ATV interface, and the Upgrade notice appears again on the top recommendation bar.

First my SSHD was 4K aligned, so I tough that was the problem, I tried to just use this method using the non-4k approach, but the outcome is the same, the upgrade doesn't install properly.

Anybody with the same problem?
[Shield Android TV General] dk1keith:
I'm sure someone else is better suited than me to answer but I experienced the same thing on my 2017 shield pro because I am rooted. If you're rooted that may be the problem.
[Shield Android TV General] pnkiller78:
No problem, I figured out that maybe that was the problem, I though at first that it had to do with the bigger SSHD for the comment in the first post on this thread mentioning something related to "block level" updates on the OTAs, but that was not the case. I searched the forums and found a post teaching how to apply the update manually using FlashFire following this post. But I used the regular OS Recovery Image, instead of the Developer used by the user on the post.

Thanks.
[Shield Android TV General] agonypants:
Did 6.3 invalidate these directions?

I have tried to swap my 500 GB Shield drive with a 128 GB SSD. I have followed the instructions to the letter twice now with the same result each time:

Nvidia logo > Four spinning dots (forever)

I can get into the recovery menu, but the unit will not boot into the recovery kernel. The error message displayed shows a "dead" Android and the words "no command."

I suspect that the recent update to 6.3 changed something with the drive partitions and has perhaps invalidated these instructions. The steps for bringing up the recovery menu have changed under Marshmallow:

Connect USB OTG to PC

Connect HDMI

Connect power

Immediately* press and hold power button for 6 full seconds

* As soon as the green LED is lit for no more than 1/2 second

Because the directions for getting to the recovery menu have changed, I wonder if perhaps the directions for the dd steps may have changed too?

The first time I tried to do this, I used dd on my Linux machine. The second time, I used dd on my Mac OS X laptop. On both attempts I used a USB > SATA connector, but it's a high quality connector so I don't think that's causing an issue. Additionally, I used the script that was posted in comment #3 to modify the lastpart.bin.

Re-installing the original Shield drive allowed the unit to boot normally.

Thanks in advance for any help you might be able to offer.
[Shield Android TV General] hallydamaster:
If it boots to the splash screen, then it's most certainly correctly flashed.

You should be able to boot it after you do a factory reset.

If you are boot loader unlocked, you can as well flash TWRP to do a format of the data partition.

For some reason, this scenario happens a lot, but whenever a factory reset had been applied it boots.
[Shield Android TV General] agonypants:
Factory reset?

First, thank you for your response. Second (forgive my ignorance) but how do I do a factory reset? At the recovery menu, my choices are:

Continue (tries to do a normal boot - and fails)

Boot recovery kernel (results in "no command" screen)

Boot safe mode (slightly different splash screen, does not boot)

Reboot (self explanatory)

Poweroff (self explanatory)

Forced Recovery (I think I tried this - did nothing?)

I believe I have tried all of these options and I don't believe I was ever presented with the option of doing a factory reset. If this is something that can be done via adb or fastboot, let me know. To get into recovery I have to connect the unit via USB to my Mac laptop. It's got an old version of adb installed, but so far I have not been able to get adb to successfully recognize the Shield as an attached device. Perhaps I need to update my version of adb?

Also, I am concerned about unlocking the bootloader as I don't want to break Widevine DRM, etc. Netflix and Amazon 4K are a must for me.

Thanks in advance.
[Shield Android TV General] hallydamaster:
That menu you call the Recovery menu, is really the fastboot menu. That explains why you cannot use adb to access the device.

You can, one the other hand use fastboot commands, and to do a factory reset you can do:

fastboot oem unlock

This will effectively wipe the data partition, and do a factory reset.

Unlocking the boot loader will have no affect on your Widevine status. The only thing it does, is to alter 1 byte on your drive from 00 to 01, and format the data partition.

You can always return to your original drive, and everything will be like you never did anything.
[Shield Android TV General] agonypants:
Success!

Success! I ended up figuring out the menu was actually fastboot on my own a little while ago. I did the fastboot oem unlock figuring that if there were any problems, I could go back to the original hard drive.

I'm having to re-install my apps, but everything appears to be going OK. I have tested Netflix and it's playing in HD with no trouble. I haven't yet upgraded to Netflix 4K. I have also tested Amazon 4K/UHD and that also appears to be working with no trouble.

Thank you VERY MUCH for your responsiveness and help! :good:
[Shield Android TV General] hallydamaster:
I'm glad you got it sorted. ?
[Shield Android TV General] ivanovjohn2018:
Please help install HDD on 160 gb, is there a ready-made bin file? I can't figure out what to put on the table.

My disk has 160041885696 bytes, 312581808 sectors