yashsingh1/xdaforums huggingface dataset:
[Shield Android TV General] jsloan2:
No joy. Same behavior. I opened up my dumped lastpart.bin file to take a look at it and my checksums didn't match the expected values from the guide. Everything was in the right locations but where it said to expect certain values... they were not correct.

Has anyone done this successfully on a shield running 8.x?

I'm going to try dumping the leading part of the drive (firstpart.bin) again, not being a dd expert, is there a way to ensure data integrity on the read, albeit it might be slower but maybe read multiple times? Not sure if thit could have been a corruption issue. I factory reset my original drive before imaging it, it boots to the welcome screen where i need to choose my language.
[Shield Android TV General] Mogster2K:
I don't know, sorry. From what I've read, they can be written to with the right tools.

If you have a Raspberry Pi or similar, you could probably use one of these to access them. Just solder a Dupont header to the board. As for me... I don't know what I'm going to do. I have very little confidence in my soldering skills for something that small.
[Shield Android TV General] oldshanshi:
Your command is OK for the EMMC removed from the 2015 Standard Version, but only if the version of the problem piece I gave you is similar to your original system version. A command like the new blank EMMC will not boot shield TV.

Only EMMC written on a dedicated device can boot shield TV

The links I give you are all EMMC with guidance information. It's like a hard disk with firmware, and the operating system is installed. Your writing method can only write to the operating system without hard disk firmware, so it is invalid for the new EMMC.

You want to buy the EMMC in my link. You can find a Chinese forwarding company first. Generally, people who buy things from China will have a transit company to transit. When you buy something in that link, you can fill in the address of the forwarding company in China. Then the forwarder will ship it to you. Or you can sign up for Aliwangwang, chat with me, and pay through PayPal, I will send it to you directly by international express. But the cost is high. You can register a transfer company and buy some other things from Taobao and send them back together. So the cost of freight is low.
[Shield Android TV General] jarisa:
helpp

:confused::confused: how can i do this with converting a 500gb to 1tb
[Shield Android TV General] slybunda:
i got a old 60gb kingston ssd. can i replace the internal 500gb drive with the ssd i have?
[Shield Android TV General] hallydamaster:
Yes, just use the guide according to your disk size.

Shouldn't be a problem.
[Shield Android TV General] slybunda:
excellent. from what iv read on here even a old bottom of the range ssd seems to give the shield tv a big speed boost over a mechanical drive.
[Shield Android TV General] slybunda:
i got an error when dumping the lastpart.bin:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

G:\Downloads\dd-0.6beta3>dd if=\\?\Device\Harddisk4\Partition0 of=lastpart.bin skip=976773158 bs=512

rawwrite dd for windows version 0.6beta3.

Written by John Newbigin <jn@it.swin.edu.au>

This program is covered by terms of the GPL Version 2.

skip to 500107856896

Error reading file: 23 Data error (cyclic redundancy check)

10+0 records in

10+0 records out

G:\Downloads\dd-0.6beta3>

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

my lastpart.bin is 5kb big. is that correct or did something go wrong?

---------- Post added at 12:42 PM ---------- Previous post was at 12:15 PM ----------

also stumped on the hex edit. since im trying with a 60gb ssd the spreadsheet end up with one less hex digit. i get: 6FCCF0E how do i put that into reverse byte ordering while also having one less character? 7 insted of 8 hex characters?
[Shield Android TV General] slybunda:
also anyone got this error when writing lastpart.bin?

Error writing file: 1117 The request could not be performed because of an I/O device error

1+0 records in

0+0 records out

??
[Shield Android TV General] slybunda:
got it all working now. all is fine. will get some pics up later on. the guide is a iffy since the numbers were for the OP's new drive.

this 60gb ssd is quick. this shield tv pro 2015 is faster than my 2017 16gb one!!
[Shield Android TV General] slybunda:
pics attached

edit: also attached my modded lastpart file for this 60gb ssd.
[Shield Android TV General] hallydamaster:
Hi there,

Good that you got it sorted, and thanks for the pictures.

How did you end up sorting it, and did you have to change something?

As far as I remember, you would substitute the "empty" digit with a zero. I think it would end up like:

0E CF FC 06

But please, let me know how you did it. ?
[Shield Android TV General] slybunda:
Yes i used a hex to decimal converter and saw that the 0 needs to be added to the start of the 7 character hex.

As for the crc and write io error i unplugged the ssd from the computer and attached it again and it flashed first time no issues. Probably getting those issue due to using a sata to usb cable for the drive.

Speed is amazing. And im happy knowing i got a backup of the drive incase something happens to the ssd down the line.
[Shield Android TV General] slybunda:
it would be awesome if someone could port that to windows.

would it work in ubuntu?
[Shield Android TV General] hallydamaster:
You can use it Windows, just use the Ubuntu shell. ?
[Shield Android TV General] slybunda:
tested the calculator in ubuntu vm and it works great.
[Shield Android TV General] dswe:
Maybe someone can advice me a bit, I have shield 2015 hdd and I've managed to restore a drive from mega.nz #!VtxznaLR!QtEbzfqAo...Kurd8WiDJqb7hs posted previously on top of 250 GB ssd.

It works fine and I can restore 8.0.0 image + fastboot format userdata + fastboot format cache. I don't need netflix/etc so don't care about widevine keys.

But as soon as I flash 8.0.1 or update to 8.0.2, bootloader just dies. Can't boot into fastboot and no output via hdmi.

Was there anything changed between 8.0.0 and 8.0.1 bootloaders? Any tips how to debug this?
[Shield Android TV General] slybunda:
If your not bothered about widevine then its easy. Download latest images from nvidia site and flash directly through apx mode or manually with the drive connected to computer.

If you still have widevine keys intact it would be worth backing those up since you never know what the future holds.
[Shield Android TV General] dswe:
I have limited experience with jetson boards and haven't really poked at tegra's APX. Would help if you could give me some keywords to look for :)

Do I understand right that NVidia doesn't give the full image of the drive? https://developer.nvidia.com/gameworksdownload#?tx=$additional,shield and "NVIDIA SHIELD ANDROID TV Pro Recovery OS Image" is the only and correct image set?

So how do I do flash it via APX then? nvflash I suppose? Where do I get offsets then?

My problem is that if I flash blob and boot.img via fastboot (fastboot flash staging blob + fastboot flash boot boot.img) then shield doesn't boot anymore.

I don't quite see how flashing it via nvflash will do anything given that it's the same data written to the same location I assume.
[Shield Android TV General] slybunda:
In that case to get it working again there is a torrent going around with a full copy of a working drive image. Use that and adjust partition for your drive.
[Shield Android TV General] slybunda:
nvflash is used to do apx mode flash. best to use a flash all command and get system.img back on it too. with everything flashed it should boot up fine.

iv read a case where someones drive died they swapped it for exact same 500gb sshd drive and used apx mode with nvflash and full flashed image from nvidia site and not only did it start working again but he also had widevine level 1. not sure if thats the result of apx mode and nvidias flashing tools and stock images.
[Shield Android TV General] hallydamaster:
Please point me in the direction to read about APX mode flashing! ?

Where did you read about it?
[Shield Android TV General] slybunda:
its on nvidias developer site. same procedure as jetson tegra boards.
[Shield Android TV General] hallydamaster:
Well, can't seem to find anything on the developer site regarding SATV and APX mode flashing.

So if you have anything more specific, please enlighten me about it. :)
[Shield Android TV General] slybunda:
process is also outlines here https://xdaforums.com/nvidia-tegra-note-7/general/nvidia-tegra-note-7-apx-images-t3149839
[Shield Android TV General] MAsterOSkillio:
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!!!

root@masteroskillio-ubuntu:/home/masteroskillio# if=firstpart.bin of=/dev/sdc bs=512 count=69888

root@masteroskillio-ubuntu:/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,

root@masteroskillio-ubuntu:/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..
[Shield Android TV General] AndG404:
I'm using Linux and following the instructions to the T in addition the nvidia shield GPT tool. After performing the steps and placing my ssd into the Shield, there isn't anything showing up on the screen. I've waited 15 minutes and then have tried again with no success. I've also used a 500GB ssd and cloned my original SSHD with no success either. There is no output on the screen. When I put the original SSHD back in the shield, it works fine. I have no idea what step I am missing. Any help would be much appreciated. TIA!
[Shield Android TV General] slybunda:
You probably didnt initalise the disk properly. Needs all partitions removed before you proceed.

Also make sure ssd firmware is updated too.
[Shield Android TV General] MAsterOSkillio:
Thank you for they reply!

From what I had read after updating the firmware the SSD was supposed to be left unformatted? I put the drive into GPT mode should it be MBR? Here is a pic of what it looks like after completing all of the steps in the first post. I can easily format it though and try writing everything back to it, though, if it has to be formatted what should I format it in? EXT4?

EDIT: when I put the original SSHD in my computer it shows up as unformatted as well, although it is showing up as not initialized.
[Shield Android TV General] AndG404:
I figured it out and it works flawlessly now! I was initially using my laptop with Linux being booted from an SD card and plugging in my SSHD and SSD in with a USB enclosure. I put both the SSHD and the SSD in my desktop and booted linux with the same SD card, performed the instructions again to the T and it works flawlessly now!
[Shield Android TV General] MAsterOSkillio:
I was doing it the same way I will try your method. Thanks!!!!

EDIT: Stupid question Are you supposed to rename lastpart4k.bin to lastpart.bin after running the gpt calculator? If I copy lastpart4k.bin back to my SSD would that cause the SATV to not work?
[Shield Android TV General] AndG404:
If you're using linux and if you follow the commands in the GPT Calculator Post, you shouldn't have to rename anything. I am normally a windows user, but Linux def helped with this. I used etcher and wrote Kali Linux to a flash drive and had my desktop boot from there.
[Shield Android TV General] MAsterOSkillio:
I have ubuntu on a desktop, via the sata from the motherboard so everything has been done in linux. After running the calculator it creates a lastpart4k.bin, are you sure that file doesn't need to be renamed to be just lastpart.bin?

Here's what I am doing from start to finish, I have an unlocked bootloader on my shield look at the steps I took:

The drive is Disk /dev/sdc: 894.26 GiB, 960197124096 bytes, 1875385008 sectors

Dumping the data from the SATV SSHD using an ubunto install I have on a desktop:

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

After that I Put in the new SSD in and copy firstpart.bin and lastpart.bin files to the new drive

1. ./shield_pro_new_disk_gpt_calculator 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

**Did I miss any steps in this process?**

It doesn't boot with the new SSD in the shield, just a black screen, 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.

Nothing shows up on the TV screen at all with any drive except the original SSHD which works fine. I can't get into ADBfastboot, and the shield shows up as AGX under windows when connected to a PC. with the original hard drive in the shield boots perfectly fine though. I am stumped
[Shield Android TV General] niekoh19:
if i use 500Gb ssd should i skip to the hex editing part?
[Shield Android TV General] MAsterOSkillio:
If you're using a 500gb SSD you should just clone the old drive straight up and keep all the old data, no reason to do any of this.
[Shield Android TV General] tit0um:
hi,

if i plan to start fresh, do i need to bother with the hexa or can i just use the stock image from nvidia?
[Shield Android TV General] uigger:
hi, is this 4k alligment stuff still needed in 2020 and does it really improve performance?

because i don't understand that part.

and do any problems still exist with that patch?

what would i need to do with a 512gb ssd since that example is for a 2tb ssd?

thansk for helping out. i really want to finally do this, but there are some things i have a hard time understanding. doesn't help that my native language isn't english plus i have no experience with android custom roms.
[Shield Android TV General] yaneca:
Hi!

Does anyone have the original hdd image (clone) to share? Or can anyone please make and share one to help me out? That would be a great help!

My boot partition died during a failed flash of boot.img, now I have a hard-brick(no fastboot or recovery) but still completely functional hardware which I can't use. The only way to save it is to restore a disk image in order to get my boot partition back on the original HDD.

Thanks in advance!
[Shield Android TV General] BostonDan:
Warning: you do not want to flash the complete hdd image! Make sure you understand how dd works and only flash the boot.img, or pull off your eks (wind one) keys. Otherwise you lose the ability to upgrade Shield Experience 8.0 and/or netflix and other DRM content!

Just a general warning before you restore a complete image.

Cheers,

B.D.
[Shield Android TV General] yaneca:
Thanks for this important warning!

Can you please help me with figuring out how to do this? I have the boot.img, can I use it to revive my boot partition through my PC, or do I need a clone/image that someone has made from his boot partition?

Here is my thread where I described the problem in details: https://xdaforums.com/shield-tv/help/how-to-recover-shielt-tv-pro-2017-error-t4163329/

Cheers!

Yan
[Shield Android TV General] I_did_it_just_tmrrow:
This is a darcy and not a foster. Sorry, I know you need and want help but this threwad is wrong.

Greetings by Idijt
[Shield Android TV General] yaneca:
My device is Shield Pro P2571, I believe this is Foster, so this is not the wrong thread. Thanks for pointing out to correct my subject line from the wrong 2017 to 2015. If this is foster not darcy, can you please help?
[Shield Android TV General] jleopold512:
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
[Shield Android TV General] banstro:
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.
[Shield Android TV General] Souldat:
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.
[Shield Android TV General] MAsterOSkillio:
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
[Shield Android TV General] OregonDude2U:
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)
[Shield Android TV General] aksiman21:
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
[Shield Android TV General] MAsterOSkillio:
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.
[Shield Android TV General] OregonDude2U:
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.