Guide[Linux][Windows]: Migrate to SSD/HDD of any size, only for SATV Pro

Search This thread

banstro

Member
Jun 9, 2010
25
1
120gb ssd

my ssd is a 120gb i used the 120gb last.bin in the post but cant get it to work. any idea's ???


120gb inland ssd
120034123776 bytes
234441648 sectors

make your own last.bin.
I installed an inland 240GB SSD from Microcenter. Works perfectly.

Make sure you connect the SSD to a sata port in a computer with your preferred Linux environment and do not use a USB to SATA connector or a Windows PC. I learnt the hard way that USB to SATA connector on Windows shows incorrect bytes and sectors.

Once u have the SSD connected to your desktop via SATA, find which device it is by doing "sudo fdisk -l" and get the bytes and sectors numbers. Use the self calculating and updating script u will find in this thread to modify the lastpart.bin file. Simple as that.
 
Last edited:

Souldat

Senior Member
Feb 1, 2011
59
16
Goiânia
Just to register here. My hard drive from my SATV 2015 Pro started making beeping noise, it looks like the needle got stuck. I was able to "fix" temporarily the problem using this tutorial:
With that I was able to do the dumps from this post and don't lose the widevine keys.
 
Oct 7, 2007
35
0
Do you have to be on a certain version of the shield OS for this process to work? Like 7.xx? If you're above 8.0 the process doesn't work? I am still stuck here and I still get a black screen on starting my Shield, computer reports APX device with several different zeroed out SSDs, can't get into fastboot mode. I followed the instructions step by step:

  • 960GB SSD drive 960197124096 bytes, 1875385008 sectors
  • sudo -s
  • fdisk –l
Old shield drive:
  • dd if=/dev/sdX of=firstpart.bin count=6899870

  • dd if=/dev/sdX bs=512 skip=976773158 of=lastpart.bin
New SSD:
  • ./shield_pro_new_disk_gpt_calculator lastpart.bin 960197124096 lastpart4k.bin


  • dd if=firstpart.bin of=/dev/sdX bs=512 count=69888

  • dd if=firstpart.bin of=/dev/sdX bs=512 skip=69790 seek=69888 count=6830080

  • sudo dd if=lastpart4k.bin of=/dev/sdaX bs=512 seek=1875384998

**are there settings I have to put into my old shield OS before removing the SSHD after unlocking it, but before removing it?**

Something like:
1. turn on dev mode
2. enable USB debuging
3. ???
4. profit
 

OregonDude2U

Member
Jan 8, 2021
5
1
Just want to thank all those that contributed to this thread to allow us to upgrade the storage device. Followed the process from hallydamaster to create the two files then used the tool from anchung.chen to adjust the location of the partition array and the GPT header for the new disk size.
Upgraded to a SK Hynix 1TB SSD and it booted up with no issues and confirmed the doubling of available storage space and do notice the boot time is now greatly reduced.(y)
 
Last edited:

aksiman21

New member
Jan 10, 2021
1
0
Help please

I got stuck with a black screen when trying to boot from the new drive. I tried the wait 15 minutes, cold boor, then try fastboot, but I can't get into fastboot, and my shield shows up as APX. I wanted to replace my 500gb drive with a 960gb SSD, here's everything I did after I copied the firstpart/lastpart.bin from the stock SSHD:

Disk /dev/sdc: 894.26 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: -960G-1HAP
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C4AA3DE0-F369-415F-8B00-2A1039AFD2DC


/shield_pro_new_disk_gpt_calculator lastpart.bin 960197124096 lastpart4k.bin

Shield-pro-500G gpt-calculator for new disk, ver. 0.1
Thanks to Luxferro and hallydamaster at xda-developers nVidia-Shield-Android-TV Shield-Android-TV-General
See 'Guide: Migrate to SSD/HDD of any size, only for SATV Pro 500GB'

new_disk_byte_size = 960197124096
new_disk_sector_size = 0x6FC81AB0
new_disk_current_LBA = 0x6FC81AAF
new_disk_last_usable_LBA = 0x6FC81A8F
new_disk_start_partition_array_LBA = 0x6FC81AA6
new_disk_data_last_LBA = 0x6FC81A8E
crc32_partition_array = 32230FBA
crc32_gpt_header = 13235F0E
Done!!!

[email protected]:/home/masteroskillio# if=firstpart.bin of=/dev/sdc bs=512 count=69888

[email protected]:/home/masteroskillio# dd if=firstpart.bin of=/dev/sdc bs=512 skip=69790 seek=69888 count=6830080
6830080+0 records in
6830080+0 records out
3497000960 bytes (3.5 GB, 3.3 GiB) copied,

[email protected]:/home/masteroskillio# dd if=lastpart4k.bin of=/dev/sdc bs=512 seek=1875384998

10+0 records in
10+0 records out
5120 bytes copied


not sure what I am doing wrong.

EDIT: here's what I am doing from start to finish, I have an unlocked bootloader on my shield:

Dumping the data from the SATV SSHD using an ubunto install I have on a laptop:
1. sudo -s
fdisk –l

2. dd if=/dev/sdc of=firstpart.bin count=6899870

3. dd if=/dev/sdc bs=512 skip=976773158 of=lastpart.bin


Putting new SSD inand copying firstpart.bin and lastpart.bin files in a new drive
1. ./shield_pro_new_disk_gpt_calculator-0.3 lastpart.bin 960197124096 lastpart4k.bin

2. if=firstpart.bin of=/dev/sdc bs=512 count=69888

3. dd if=firstpart.bin of=/dev/sdc bs=512 skip=69790 seek=69888 count=6830080

4. dd if=lastpart4k.bin of=/dev/sdc bs=512 seek=1875384998

It doesn't boot with the new SSD in , but It does boot fine with old SSHD in it. Any suggestions? I still have the working SSHD and my copies of the first/last.bin files.

EDIT: tried booting the shield with other hard drives that I had, I noticed the new SSD drive power was 5v .9amps and the SSHD is 5v .7 amps, I thought maybe it was drawing too much power, but no had drive I had would even get to the Nvidia logo, I tested from .6-.8 amps. Nothing shows up on the TV screen at all with any drive except the original SSHD which works fine..
i did the same thing but cant figure it out to work.. i didnt do the hex editing part because the link of the images are broken.. the question is do i need to edit the hex editing part to work this? thanks hallydaymaster
 
Oct 7, 2007
35
0
i did the same thing but cant figure it out to work.. I didn't do the hex editing part because the link of the images are broken.. the question is do i need to edit the hex editing part to work this? thanks hallydaymaster

You're not supposed to need to do the hex editing if you used the shield_pro_new_disk_gpt_calculator tool. That program does what the hex editing did without you having to manually do the work, assuming you put the right inputs in based on your new hard drive, when you ran it so it can edit your lastpart.bin to have the correct values.

Other then that I do not know. I started with project with 2 2017 shield pros months almost a year ago and I have not been able get it done even after creating a linux desktop and scouring the internet for any other info on this. The shield I have works 100% fine if I put the old hard drive back in but does nothing (black screen/ APX device) if I put in the new drive, with from what I can tell, has the right edits made to the firstpart/lastpart.bin. None of the posts I have made have had any responses pointing out any issues with the process I listed. So I can't help you anymore then that. It seems like so many people have gotten this to work, and I can't figure out what I have done wrong even after detailing every step and double/triple checking my work. After failing I even tried zeroing out my SSD disk and trying again.

I am going to keep trying a few different methods because I really love my 2017 shield pros and I would live to have a speedy SSD in there large enough for stuff like Sega CD games and other emulations/roms as well as it being one of the best streaming media players I have seen so far. As awesome as this post is and as much as I thank the creators for their hard work I would love to see a new post with all of the old stuff edited out and only the new/updated essential steps......or you know Nvidia could just release an update that allows hard drive swapping, while keeping your encryption keys because why not?

I really want to get this done, so if you figure out anything I did wrong in my steps please let me know.
 
Last edited:

OregonDude2U

Member
Jan 8, 2021
5
1
Just want to thank all those that contributed to this thread to allow us to upgrade the storage device. Followed the process from hallydamaster to create the two files then used the tool from anchung.chen to adjust the location of the partition array and the GPT header for the new disk size.
Upgraded to a SK Hynix 1TB SSD and it booted up with no issues and confirmed the doubling of available storage space and do notice the boot time is now greatly reduced.(y)
Was a bit hesitant to take the 8.2.2 update that got released today as I have seen some forum chatter indicating issues of updates corrupting the storage device for those of us that have upgraded to a larger disk drive. Gladly I can report no such issues are seen and the 8.2.2 update got applied without any problems and still have close to 1TB available for apps.
 

svenks1

New member
Feb 1, 2021
2
0
Hi all
First of all, a heartfelt THANK YOU to all the good people who has been working on this and bringing up new ideas, tips and tricks.
Unfortunately, I've unable to get it to work...
My Shield 500GB from 2016 decided that it did not to do streaming anymore - except for Youtube! You could connect all right to Prime, HBO and other sites, but streamin: "An error occurred". Mind you, if I did a Fast Reset, I was able to get it working - most of the time. But after power off: No Joy.
After a longish dialogue with nVidia Support, they suggested it might be the hard disk. And so I thought "Nothing left to lose" and came across this thread. As I did have a free 256 SSD, I wanted to use that. NO joy, but then I read the latest part of the thread with the thing about USB/SATA issues. Went and installed Ubuntu in a Hyper-V VM and attached the SSHD directly to the VM (Offline in host, then attach physical disk). And sure enough, the numbers for the SSHD was slightly different. Well, finally! I thought, and did the dance again.
But still no joy. The Shield won't boot, nothing happens and I can't get it to talk to Fastboot or anything.

I do have one big question, though: Since the first post, a new step has been added:
" dd if=firstpart.bin of=/dev/sdc bs=512 skip=69790 seek=69888 count=6830080"

Why is this suddenly needed? I thought it had something to do with 4K alignment (as I won't do as optimum block size for my SSD is 512), but this only involves firstpart.bin?

I am 99.99% sure I have put the right numbers in everywhere, but still no joy.
Any ideas are most welcome!

BRGDS
Sven Sorensen
Copenhagen
 

svenks1

New member
Feb 1, 2021
2
0
Hi all
First of all, a heartfelt THANK YOU to all the good people who has been working on this and bringing up new ideas, tips and tricks.
Unfortunately, I've unable to get it to work...
My Shield 500GB from 2016 decided that it did not to do streaming anymore - except for Youtube! You could connect all right to Prime, HBO and other sites, but streamin: "An error occurred". Mind you, if I did a Fast Reset, I was able to get it working - most of the time. But after power off: No Joy.
After a longish dialogue with nVidia Support, they suggested it might be the hard disk. And so I thought "Nothing left to lose" and came across this thread. As I did have a free 256 SSD, I wanted to use that. NO joy, but then I read the latest part of the thread with the thing about USB/SATA issues. Went and installed Ubuntu in a Hyper-V VM and attached the SSHD directly to the VM (Offline in host, then attach physical disk). And sure enough, the numbers for the SSHD was slightly different. Well, finally! I thought, and did the dance again.
But still no joy. The Shield won't boot, nothing happens and I can't get it to talk to Fastboot or anything.

I do have one big question, though: Since the first post, a new step has been added:
" dd if=firstpart.bin of=/dev/sdc bs=512 skip=69790 seek=69888 count=6830080"

Why is this suddenly needed? I thought it had something to do with 4K alignment (as I won't do as optimum block size for my SSD is 512), but this only involves firstpart.bin?

I am 99.99% sure I have put the right numbers in everywhere, but still no joy.
Any ideas are most welcome!

BRGDS
Sven Sorensen
Copenhagen

Hi all
Just a little follow-up (in case someone is interested :))

By doing some disk shuffling, I maneged to free an EVO 860 500GB. And yes, it has the exact same geometry as the SSHD in the Shield. Did a DD copy in my Ubuntu VM, and by Golly! The shield booted afterwards! And streaming worked too....

But not for long :(

The original problem soon came back, and I'm back to square 1one, except for the boot times. So, it is probably not a HDD problem after all, but what it then may be, I have no clue.
Still, music streaming works (for now anyway), and I'll check up on Geforce Now! and see if can still game on the Shield, even if the games are actually running on my gamer rig.

But if I ever need a 500GB SDD, the Shield is history!

BRGDS
Sven
 

andyftp

New member
Feb 19, 2015
3
0
Hoping someone can help. I followed instructions and upgraded to a 1tb SSD. I end up having an issue where when I try to install anything, it tells me there isn't enough space. File explorer programs claim that i have .98tb free.

I tried fastboot and formating the /data partition. How long should that take? It's been running for like 12 hours.

Edit *. 4 to 12 hours
 
Last edited:

Valiante

Senior Member
Jul 7, 2013
508
118
Are there any issues with updates using this method? Might be easiest to just get a matching SSD size.

EDIT: PC reporting "APX device", followed the guide to a T. Even used Linux for everything, didn't work. Someone mentioned zeroing the drive, did that, re-wrote the .bin, same thing. No fastboot, only "APX device". Using a 128gb drive here.

EDIT 2: Appears to be a power draw issue, I've double and tripled checked the steps. Finally dawned on me to check the power requirements, each drive was 1.0A and 1.6A respective. Stock drive is 0.7A. Not sure where to even get a drive with such low amperage.

EDIT 3: Amazon to the rescue, Bestbuy didn't even list power requirements on their website. Got one with 0.6A arriving tomorrow, lets see how this goes.

EDIT 4: 0.6A drive did not work. Trying the non-4k calculator.

EDIT 5: 0.6A SSD [128gb] + non-4k calculator + linux bootable USB + SATA cable = success. I also zeroed the drive completely between re-writes with:
Code:
dd if=/dev/zero of=/dev/sde bs=16M status=progress

I've attached the working 128gb non-4k lastpart.bin to this post.
 

Attachments

  • new_lastpart.bin
    5 KB · Views: 24
Last edited:

slybunda

Senior Member
May 6, 2010
793
73
managed to get hold of another shield tv 500gb!!! looking forwards to do ssd swap again. iv got another spare 60gb ssd that i used in the last shield tv so having the same model of drive should make things easy since i can just reuse the lastpart.bin file that was modded for the first unit.
 

JKOL49

New member
Aug 2, 2021
3
0
I don't know what's going wrong as I've done this once before two years ago and it went very smoothly when I did it without the hexeditor on a 500gb SSD.

Yet on this new 2tb ssd that I've purchased on a different Nvidia shield tv pro 2017, nothing seems to be working. I've tried writing to the disk about five times now and everytime I get no video on screen. The green light lights up and I'm able to turn off the shield by holding down the power button but no other responses.

It's also showing up in Windows as an apx device and no matter what I do I can't appear to be able to get it into fastboot with this drive. The original SSHD worked fine when I tried to put it back in, so it can't be a failure with the device itself. I'm completely out of ideas so any advice would be much appreciated.

(The new SSD is a Crucial MX500 in case it's relevant by the way.)
 

brainmaster

Inactive Recognized Developer
Dec 10, 2006
4,064
4,507
Huawei Watch
OnePlus 7T Pro
I'm gonna share my experience with HDRaw tool. 2 years ago I replaced the 500GB HDD with 500GB SSD. Cloning completed without any issues and it booted fine.
Last week I tried to make a backup copy in case that SSD brakes. But the new cloned drive didn't wanted to boot. Just green lights and black screen.
It was the Windows demount problem. I just disconnected the clones drive, without safely removing it first, so that Windows would demount the drive properly.
Also, if you reconnect it again on Windows device, you'll possibly get two different pop-up messages. One that says "In order to use the drive, you need to initialize it first" - don't do that. That brakes the drive and it's not gonna boot on Shield. Second message is "This drive has errors, do you want to fix it?" Don't do that either, result is again same - not booting.
Proper process is - just connect the initial drive for cloning and the backup drive. Don't do any initialization or fixing error process. Fire up HDRaw tool and clone drive. Upon successfully completing the cloning process, click in the Windows Taskbar left to the clock and safely remove both drives.
Then put it into the Shield. It will boot successfully.
This was my experience and wanted to share it with you guys.
 

JKOL49

New member
Aug 2, 2021
3
0
I'm gonna share my experience with HDRaw tool. 2 years ago I replaced the 500GB HDD with 500GB SSD. Cloning completed without any issues and it booted fine.
Last week I tried to make a backup copy in case that SSD brakes. But the new cloned drive didn't wanted to boot. Just green lights and black screen.
It was the Windows demount problem. I just disconnected the clones drive, without safely removing it first, so that Windows would demount the drive properly.
Also, if you reconnect it again on Windows device, you'll possibly get two different pop-up messages. One that says "In order to use the drive, you need to initialize it first" - don't do that. That brakes the drive and it's not gonna boot on Shield. Second message is "This drive has errors, do you want to fix it?" Don't do that either, result is again same - not booting.
Proper process is - just connect the initial drive for cloning and the backup drive. Don't do any initialization or fixing error process. Fire up HDRaw tool and clone drive. Upon successfully completing the cloning process, click in the Windows Taskbar left to the clock and safely remove both drives.
Then put it into the Shield. It will boot successfully.
This was my experience and wanted to share it with you guys.
Okay, I guess my situation is a bit different though as I'm trying to move from the original 500gb drive to a 2tb one.
 

JKOL49

New member
Aug 2, 2021
3
0
I got it working in the end, turns out you have to leave it a good 1 to 2 hours after first turning it on after putting in the new ssd, before unplugging the power to the device and plugging it back in again.
 

manc01

Member
Jul 3, 2012
13
4
Adelaide
Samsung Galaxy S21
This guide is now 5 years old and a lot of the links, images and calculators etc have changed. There are also a lot of people who are not familiar with Linux or not as tech-minded as most people who posted in this thread.

I am wondering if this can now be done via windows or some other SIMPLE method? There must be a lot of people that want to put in a larger drive but cannot figure out how to do so.

I am wondering if anyone can help by possibly posting an updated guide (or better still a YouTube video)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Code:
    [B][I][COLOR="Red"][SIZE="3"]I am not responsible for bricked devices, dead HDDs, animals 
    activist campaigns, or any H/W damage caused by you following these
    directions. YOU are choosing to make these modificiations, and
    you, yourself take responsibility for doing these modifications
    to your device.
    You can do serious H/W damage to your SATV or even your computer
    by doing any of this. So, you have been warned! [/SIZE][/COLOR][/I][/B]

    First of all, you should pay your thanks to @Luxferro for mapping out the entire partition array, and building the chart that does all the calculations for using another disk size.
    He also proved that it was indeed possible to modify your GPT header to another sized drive.
    None of this would have been possible, if it was not for him.

    Also thanks to @Tilator for initiating his thread, and proving it was possible to swap your HDD for something else.

    1. Preparations and disassembling the SATV

    Well, to begin with you should have a working linux environment set up. This can easily be a live CD/DVD/USB. Or you can do it from a virtual environment. You can use DD for Windows now, follow guide as normally.
    You should have a hex editor with CRC32 calculating capabilities. I recommend HxD:
    https://mh-nexus.de/en/downloads.php?product=HxD
    Yes, that is for Windows, I use Linux for all the writing/dumping, but I prefer my Windows hex editor.

    It's worth to know, that your device should be bootloader unlocked, and preferably newly factory reset.
    Also, an autotool has been made now to do this GPT header edit. See post #3.


    Then you can go open up the SATV by prying off the bottom of the casing. I managed to do this with my fingernails. A small plastic pry tool can be used as well.
    088cdebe48.png

    Then you remove the 2 wire sets from the plugs to give more working room. There is 2 sets of tape holding the wires and the HDD in place as well.
    There is (on mine at least) just one screw with a small bracket holding the HDD in place, you will need a T6 driver to remove it.
    Gently lift the black latch/lock on the connector to the secondary board, then the FCC connector will be easily out.
    Then it is just a matter of gently loosening the adhesive on the FCC strip from the HDD and pull out the SATA connector.

    With the HDD out, you will have to connect it to your Linux setup somehow. I used an enclosure with a USB3 connection.
    With the HDD recognized in the computer, the time has now come to clone you HDD.
    You could as well use the bin files Tilator has provided, but if you want your own genuine Netflix ESN, you should use your own.

    If you want to use DD for Windows, please continue the guide from post #2. After finishing that part, come back to this post and skip to the hex editing part.


    2. Dumping the data from the SATV SSHD

    In a terminal window you start by listing the drives:

    Code:
    sudo -s
    fdisk -l

    This is to determine which drive you are working with. Remember that the DD command does't care which drive you specify, it will destroy your main drive if you ask it to.
    The you continue by dumping the first 6899870 blocks of data to a bin file:

    Code:
    dd if=/dev/sd[B]X[/B] of=firstpart.bin count=6899870

    This will give you a raw image file of all the partitions up until the /data partition which is better left out (it will come later).
    Then continue by dumping the last 5120 bytes of data which contains the partition array and the GPT header:

    Code:
    dd if=/dev/sd[B]X[/B] bs=512 skip=976773158 of=lastpart.bin

    EDIT: 26th August 2016, @anchung.chen has experimented with aligning the partitions to Advanced Format 4096 byte sectors (4K alignment). This supposedly gives better performance especially on SSD drives.
    It's worth to know that this most likely breaks the OTA updates, as they might write partitions on block level rather than on a file level. OTA updates seems to be working.
    Also, anchung.chen has had problems unlocking the bootloader on the 4K aligned disk.
    @ahmed68
    Reports that TWRP doesn't work well when trying to flash SuperSU.
    Please see follow these steps to write the bin files with 4K alignment:


    Start by downloading the ELF executable programmed by anchung.chen from this post:
    http://forum.xda-developers.com/showpost.php?p=68300570&postcount=44

    Patch the lastpart.bin the following way (2TB disk size):
    Code:
    ./shield_pro_new_disk_gpt_calculator-0.3 lastpart.bin [B]2000398934016[/B] lastpart4k.bin
    This will recalculate the GPT header to match the 2TB disk, but also rewrite the partition array.

    Then continue by writing the firstpart.bin in 2 steps instead of just one:

    Code:
    if=firstpart.bin of=/dev/sd[B]X[/B] bs=512 count=69888
    Code:
    dd if=firstpart.bin of=/dev/sd[B]X[/B] bs=512 skip=69790 seek=69888 count=6830080

    These 3 steps effectively moves the partitions 16-32 to match 4K alignment structure.

    And finish off by writing the lastpart4k.bin:
    Code:
    dd if=lastpart4k.bin of=/dev/sda[B]X[/B] bs=512 seek=[B]3907029158[/B]

    This completes the guide, no more steps needed.



    You can now disconnect your HDD. These 2 files also counts as a backup of your SATV (not with settings as userdata was not copied).
    Now connect your new SSD in the enclosure.
    You can easily start by writing the firstpart.bin:

    Code:
    dd if=firstpart.bin of=/dev/sd[B]X[/B]

    3. Hex-editing the partition array and the GPT header

    In your linux terminal load up the block count (called sectors in linux language) of the new drive:

    Code:
    fdisk -l

    A 2 TB disk should have a total block count of 3907029168, but a smaller disk would have a smaller block count, so use fdisk -l to determine this.
    Or if you use DD for Windows you have the output from dd --list to work with.
    The lastpart.bin must be edited before we can write it on the new disk.
    So use the spreadsheet provided by @Luxferro in this post:
    http://forum.xda-developers.com/showpost.php?p=67996717&postcount=189
    In the column at the buttom right that says disk size, you change the value to match you new disk. In this example for the 2TB it should be 2000398934016 (bytes). This value should be taken from fdisk -l as well.
    Now it gets a little hairy!

    In the spreadsheet you should start with the buttom value marked out in purple under the row called "Last LBA". This should be E8E0888E:

    dc65e8f1d7.png


    Open up lastpart.bin in HxD and navigate to offset 00000FA8. There you should find the 4 bytes 0E 60 38 3A illustrated in this picture:
    dc675ca9e9.png


    This value is in a format called reverse byte ordering, so to put in your new calculated value, you will have to arrange it like this: 8E 88 E0 E8. Input that value instead of the bytes already there like this picture:

    dc884ceb4c.png


    While we are in this particular position in the lastpart.bin we might as well do the CRC32 of the partition array.
    Now make a selection containing the 64 bytes or 4 empty lines underneath the line having UDA written in ASCII, and all the way to the top of the file, offset 00000000 to 00000FF0 like in this picture:

    dcea590c79.png


    In the drop-down menu, choose Analyzis->Checksums and generate a CRC-32 checksum (Not checksum-32).
    It will come up in the buttom screen of HxD, and should read 6B CF E5 7D

    Navigate to the buttom of the file which contains the GPT header. It should start with an ANSI text reading "EFI PART".
    In offset 00001258 you should find the value of the original CRC-32 value containing the bytes 0E 02 C5 DC.
    Replace this, again reversing the bytes from your newly calculated CRC-32 value like this: 7D E5 CF 6B:

    067dc12477.png


    Now we are actually almost finished! In the spreadsheet all the way to the right, you will find 4 hexadecimal values marked in purple.
    First is the position of the GPT header, and the second is the position of the backup GPT header. Since there is only 1 on the SATV, these values are both the same.
    Write them into the GPT header on offset 00001218, and 00001220, again reversing the bytes like illustrated in the picture:

    067dc3304e.png


    Same goes for offset 00001230, Last Usable LBA, and offset 00001248, Starting LBA of array of partition entries.

    This brings us to the last thing on the table, the CRC32 of the GPT header itself.
    The CRC is located on offset 00001210 and should have the bytes 46 C9 88 78 already there.
    Just write 00 00 00 00 to blank them out:

    06df641cfe.png


    Now make a selection of the GPT header containing the beginning of the header, and to the last written byte before all the zeroes:

    06df74f054.png


    In the drop-down menu, choose Analyzis->Checksums and generate a CRC-32 checksum (Not checksum-32).
    It will come up in the buttom screen of HxD, and should read 46 9F 24 38
    Again, write it instead of the 4 bytes with zeroes reversed like this:

    06df5f2486.png


    This completes the matter, now just save your work in HxD and write it to the end of your drive.
    To do this we need the total block count from the HDD that you fetched in the beginning of the guide from the fdisk -l output, should be 3907029168
    The lastpart.bin is 5120 bytes which is the same as 10 blocks of 512 byte length.
    So, 3907029168 minus 10 is 3907029158 and put into your DD-line like this:

    Code:
    dd if=lastpart.bin of=/dev/sda[B]X[/B] bs=512 seek=[B]3907029158[/B]

    Or like this if you use DD for Windows:
    Code:
    dd if=lastpart.bin of=\\?\Device\Harddisk[B]X[/B]\Partition0 bs=512 seek=[B]3907029158[/B]

    4. Assembling SATV and finishing up

    Now at last, put in your new disk in the SATV and assemble everything back together.
    If it doesn't boot in the first try, you could try another cold boot (give it 15 min.).
    If that won't do it, you might have to wipe the DATA partition from the fastboot menu.
    To cold boot into fastboot, follow this (taken from "http://developer.download.nvidia.com/mobile/shield/ROM/SHIELD_ATV/OTA-1.1/HowTo-Flash-Recovery-Image.txt"):

    Code:
    HW method:
    - Disconnect power cable
    - Insert USB OTG cable and make sure to connect other end to a host PC
    - Connect power cable to SHIELD
    - Quickly start pressing power button for ~3 seconds
    - Do not hold the button and connect power supply afterwards
    - HDMI TV should be always connected to SHIELD

    And format the /DATA partition from fastboot like this:

    Code:
    fastboot format FS:EXT4 /data

    Or do a fastboot oem unlock of the SATV.

    Hopefully you will now have a SATV with an upgraded SSD/HDD! :D
    14
    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.
    Code:
    ./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.
    Code:
    sudo dd if=new_lastpart.bin of=/dev/sdX bs=512 seek=3907029158
    6
    DD for Windows part

    Guide for Windows, using dd for Windows by John Newbigin

    Download the dd utility from: http://www.chrysocome.net//dd

    Code:
    [SIZE="4"]
    [COLOR="Red"]
    WARNING! Using DD for Windows from a command prompt with administrator privileges is DANGEROUS!
    If you specify your Windows drive as output file/device, it WILL destroy the partition!
    [/COLOR]
    [/SIZE]

    Code:
    [B][I][COLOR="Red"][SIZE="3"]I am not responsible for bricked devices, dead HDDs, animals 
    activist campaigns, or any H/W damage caused by you following these
    directions. YOU are choosing to make these modificiations, and
    you, yourself take responsibility for doing these modifications
    to your device.
    You can do serious H/W damage to your SATV or even your computer
    by doing any of this. So, you have been warned! [/SIZE][/COLOR][/I][/B]

    So, I used a Windows 10 Pro environment to test this. I think any Windows version based on the NT architecture will be working.
    Extract the dd.exe and as the path you want to extract to, use this: "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps"

    This gives you the ability to use DD system wide.

    Plug in the HDD from your SATV. The disk will be unreadable to Windows as it has no known filesystem. Windows might pop up asking you to format the drive. You MUST ignore that, and press cancel!

    Open up a command prompt with administrator privileges. You can do this with Windows key+X to bring up a menu, then choose Command Prompt (administrator).

    Navigate to a folder where you want to work from. It doesn't matter where, as you just have to have space enough to store the bin files.
    If you need a refreshment in navigating the commnd prompt, you can read up on it here:
    http://www.pcstats.com/articleview.cfm?articleid=1723&page=3

    Now, run the command
    Code:
    dd --list

    This gives you a lot of information. It even gives you the total byte count of your harddisk drives.
    Navigate a little up to locate the right disk:
    ef7625c822.png

    In this example I didn't use my SATV HDD, but another 750GB HDD I had lying around. The SATV SSHD will have a size of 500107862016 bytes.
    Be careful that you choose the right drive to work on, and you also have to find the one that has the device string "\\?\Device\HarddiskX\Partition0".
    And X will have to be equivalent to the harddisk number that Windows has assigned to your device.
    The you continue by dumping the first 6899870 blocks of data to a bin file:
    Code:
    dd if=\\?\Device\Harddisk[B]X[/B]\Partition0 of=firstpart.bin count=6899870

    This will give you a raw image file of all the partitions up until the /data partition which is better left out (it will come later).
    Then continue by dumping the last 5120 bytes of data which contains the partition array and the GPT header:
    Code:
    dd if=\\?\Device\Harddisk[B]X[/B]\Partition0 of=lastpart.bin skip=976773158 bs=512

    You can now disconnect your HDD. These 2 files also counts as a backup of your SATV (not with user settings, data partition was not copied).
    Now connect your new SSD in the enclosure. Use dd --list again to determine the right disk to use, and please be careful not to mix up your Windows drive or another drive which contains important data.
    You can easily start by writing the firstpart.bin:
    Code:
    dd if=firstpart.bin of=\\?\Device\Harddisk[B]X[/B]\Partition0

    Please continue the rest of the guide in first post.
    4
    Hi all, I too have successfully upgraded my SATV 2017 Pro with a Crucial BX200 480GB Solid State Drive in my case, using Windows only.

    Thanks a lot to everyone in the forum, specially @Tilator, @Luxferro, @hallydamaster and @anchung.chen

    Specifications:


    Steps:
    - Before doing this please read original post on this thread for windows which explains how to use dd to get your SSD size in bytes and pick the right HDD.
    - To make everything easier just create a folder e.g. c:\shield and copy both dd.exe executable and shield_pro_new_disk_gpt_calculator-0.3 to this folder.
    - Remember the numbers below are for this specific SSD if you use a different one please read the posts carefully to get your number

    1. Factory reset
    2. fastboot oem unlock
    3. replace HarddiskX with your corresponding for SATV HDD, open your standard cmd as an Administrator and run
      Code:
      dd if=\\?\Device\HarddiskX\Partition0 of=firstpart.bin count=6899870
      dd if=\\?\Device\HarddiskX\Partition0 of=lastpart.bin skip=976773158 bs=512
    4. Open bash on ubuntu for windows
    5. Assuming you have everything in c:\shield then do
      Code:
       cd /mnt/c/shield
      ./shield_pro_new_disk_gpt_calculator-0.3 lastpart.bin 480103981056 lastpart4k.bin
    6. This tool gives you the commands you need to run afterwards so make sure you take note
    7. Now you should have everything to start copying into your SSD
    8. for SSD run using your standard cmd as an Administrator
      Code:
      dd if=firstpart.bin of=\\?\Device\HarddiskX\Partition0 bs=512 count=69888
      dd if=firstpart.bin of=\\?\Device\HarddiskX\Partition0 bs=512 skip=69790 seek=69888 count=6830080
      dd if=lastpart4k.bin of=\\?\Device\HarddiskX\Partition0 bs=512 seek=937703078

    That's all I did. I didn't have to do reboot in fastboot to do any factory reset or unlock or format.

    Two things worth mentioning, though:

    - When raw reading and dumping the lastpart of the ordiginal Shield SSHD I too got the reading file 27 error as has been reported by multiple users:

    skip to 500107856896
    Error reading file: 27 The drive cannot find the sector requested
    10+0 records in
    10+0 records out

    It did write the the 10 blocks of 512 bytes, though. With hex editor I couldn't find anything wrong either so, as I'm lazy by nature, I just tried using this generated lastpart.bin and ignored the error and it seemed to work.

    - Secondly I've chosen to use the 4k alignment method, as this supposedly gives better performance especially on SSD drives. Although @ahmed68 has reported that TWRP doesn't work well when trying to flash SuperSU, I've had no problem with TWRP, rooting and flashing SuperSU afterwards.

    Thanks again all! I hope my experience will help others as all your work and posts have helped me!
    3
    i bought a 2017 pro edition (used) and the HDD is sort of DOA (it sits at the logo screen for forever) i have tried going into the recovery kernel and it comes up to the no command screen, but then just goes back to the nvidia logo. is there anyway that i can build my own bin files on a SSD ? or image someones copy or is the bin file unique to each machine and locked tot hat machine as well?

    If the logo comes up, the HDD is probably fine. You could try to take the drive out and migrate to an SSD
    The bin files are dumps of the machines HDD, and are therefore unique to each machine.

    If you rather want to try revive the Shield as it is, you should try to boot into fastboot and do:
    fastboot oem unlock

    This will effectively wipe the drive. If that doesn't work you can flash the factory images from Nvidia or TWRP recovery to do a factory reset.