yashsingh1/xdaforums huggingface dataset:
[Shield Android TV General] Danieli1669:
How should the partition in GPT look like?
[Shield Android TV General] Danieli1669:
I will do it right now and taking picture again
[Shield Android TV General] Timtheloon:
I never seen any partitions in gparted my original HDD shows up like yours stating unallocated. I just used the DD commands to extract first and last parts

Are you just changing you HDD Daniel?

Did you see my post above about usb controllers maybe this is your problem?
[Shield Android TV General] Danieli1669:
Hmm i just connected the harddrive to my laptop.. its connected with the SATA socket not an USB after im doing the dd=if for the first part im seeing in the GParted Unallocated drive its ok?
[Shield Android TV General] Timtheloon:
hopefully this will help you Daniel

I presume you are using linux to do this.

download: shield_pro_new_disk_gpt_calculator.zip located at post 3 of this thread.

download: backup.gz located at post #312 i think its the first link.

unzip shield_pro_new_disk_gpt_calculator.zip in your home folder in Linux.

unzip Backup.7z in home folder also.

you should now have Firstpart.bin & Lastpart.bin in the home folder with the unzip shield_pro_new_disk_gpt_calculator.

now open terminal

type: sudo -s

(if you get asked for your password, do so.)

type: fdisk -l

This will display all your Harddisks on you PC. locate your new drive.

type: ./shield_pro_new_disk_gpt_calculator lastpart.bin xxxxxxxxxxxxxx new_lastpart.bin

(The xxxxxxxxxxxxxxxx are the total bytes of the HDD you will see this in the fdisk information of your intended hdd.)

this will create the modified Lastpart.bin required for you new hdd.

now to setup your new drive.

type: dd if=firstpart.bin of=/dev/sdX

(remember the X part of sdX is changed to the letter displayed in fdisk information on the intended drive.

once complete type: sudo dd if=new_lastpart.bin of=/dev/sdX bs=512 seek=xxxxxxxxxxxxxxx

(now the seek xxxxxxxxxxxx are 10 less of the number of sectors your hdd has this is also displayed in the fdisk information so my hdd sectors was 1000215216 so the number I typed here was 1000215206)

(again remember the X part of sdX is changed to the letter displayed in fdisk information on the intended drive.)

that should be it hopefully fingers crossed
[Shield Android TV General] Danieli1669:
Thank you, if im doing : ./shield_pro_new_disk_gpt_calculator lastpart.bin 500107862016 new_lastpart.bin im getting :

bash: ./shield_pro_new_disk_gpt_calculator : Permission denied, and im used sudo - s
[Shield Android TV General] Danieli1669:
I recorded a video showing what im doing, Please if some1 can help and watch it and tell me what im doing wrong? because when I insert the SSD to my nvidia shield tv there is not even logo boot or nvidia splash

here its the videos :

https://recordit.co/5kkoJC3Obt

https://recordit.co/BHbMUN5ovV

thank you and have a good day!
[Shield Android TV General] Timtheloon:
Daniel I’m so sorry just realised my mistake. I was tired last night.

I wrote this which is wrong this creates the first partition from a HDD.

type: dd if=/dev/sdX of=firstpart.bin count=6899870

What I should of wrote is this to write the first part to you HDD.

type: dd if=firstpart.bin of=/dev/sdX

Remember to unzip the backup file in the home folder because you would have overwritten it when you did the dd if=/dev/sdX of=firstpart.bin count=6899870 command.

I’ve updated my original post seen the mistake when I watched your video the second time.

Fingers crossed.
[Shield Android TV General] Danieli1669:
Thanks for answer, what should i write in the firstpart.bin? dd if=/dev/sdX of=firstpart.bin count=xxxxxx

in the "xxxxx"
[Shield Android TV General] Timtheloon:
All you need to type is this

type: dd if=firstpart.bin of=/dev/sdX
[Shield Android TV General] Danieli1669:
Should i copy firstpart.bin and new lastpart.bin on the SSD? I have Sandisk SSD 240GB its ok?
[Shield Android TV General] Timtheloon:
No they go in your home folder in Linux (Ubuntu)

The commands are what writes them to your SSD
[Shield Android TV General] Danieli1669:
Guys i really need that help, please...

I tried everything but nothing.. i tried Nvidia_Shield_TV_PRO_SSD.zip backup

and Ahmed backup and really nothing..

im sure im doing something wrong, i tried with SSD 240GB and seagate 500gb thin laptop,

I really dont know what to do :(
[Shield Android TV General] ivanovjohn2018:
Do you put a 500 or 240 disc????? In video is specified disk on 250 , (in fact 223,6) I correctly understood? Set the disk to 500 GB, copy the files for it to the Ubuntu desktop and copy using the commands

You have a plug-in disk sda . Therefore, the name of the disk in the command will be

sudo dd if=start.bin of=/dev/sda bs=4M

sudo dd if=end_976574630.bin of=/dev/sda seek=976574630

there everything is ready and nothing needs to be defined! Pre-check the disk file system via sudo gparted
[Shield Android TV General] Danieli1669:
I tried this, but its not worked..

in the Gparted i can see my drive its ext4 its ok?
[Shield Android TV General] Timtheloon:
I was working with Daniel via WhatsApp last night we tried it on his 240gb SSD with the Firstpart.bin and lastpart.bin method using the nvidia shield calculator located on post #3 of this Thread. No Dice

We then did the start.bin method on a spare 500gb HDD which he had using the information in the text file provided but still the nvidia will not start

Sadly his original SSHD seem kaput it does not register when plugged in so no way to retrieve his original first part.bin & lastpart.bin

I got mine to work but even though my SSHD was failing I was still able to retrieve the original firstpart.bin & lastpart.bin could the problem be that he requires the original partitions?

---------- Post added at 11:15 AM ---------- Previous post was at 11:10 AM ----------

Also every time we connected the nvidia shield to the pc it was in APX mode
[Shield Android TV General] ivanovjohn2018:
YES ext4

When you insert the disk into the console, you connect 2 connectors (power, data) and another white connector on the wires, can you forget something?

At me the prefix even with one copied file sudo dd if=start started.bin of=/dev/sdb bs=4M, (NVIDIA inscription appeared and circles appeared, but did not install, since I did not copy the second file sudo dd if=end_976574630.bin of=/dev/sdb seek=976574630 . So I think that either you forgot to connect something or this file something you have not done so.
[Shield Android TV General] Danieli1669:
I connected it to my Laptop (Replaced the hardisk there)

i did the sudo dd if=start started.bin of=/dev/sdb bs=4M

and if=end_976574630.bin of=/dev/sdb seek=976574630

and when i connected it to my Nvidia Shield with 1 White cable and 1 black, and the SATA that Nvidia Shield provided, but no logo boot, and the machine still stucking in APX mode if i connected it to MicroUSB to my PC
[Shield Android TV General] ivanovjohn2018:
And you put drivers on the computer?

https://developer.nvidia.com/gameworksdownload#?search=SHIELD Family Windows USB

and https://developer.android.com/studio/releases/platform-tools (DOWNLOAD ANDROID SDK PLATFORM-TOOLS FOR WINDOWS)
[Shield Android TV General] Danieli1669:
Yes bro, I Tried it without succeed..

i tried with this disk :
[Shield Android TV General] ahmed68:
dear Danieli

run balena etcher go to settings and choice trim ext and unsafe mode

it will allow to use sata and ide hdd

select image backup.img (500gb) from this link

https://mega.nz/#!VtxznaLR!QtEbzfqAomuksyiZIUOx3KlSnzUxqKurd8WiDJqb7hs

then choice your Seagate 500 gb

in the end flash and wait
[Shield Android TV General] hallydamaster:
The SATV only uses around 3,5GB, so 128GB would be plenty of space.
[Shield Android TV General] ahmed68:
I do ill but I cant boot from emmc see the photo
[Shield Android TV General] anchung.chen:
Hi ahmed68:

Thank for your great effort to clone SSHD to eMMC on SATV PRO.

You said that It can't boot from eMMC. When you try this, Do you remove SSHD ? and Is anything showing on the screen ?
[Shield Android TV General] anchung.chen:
Totally agree. It is VERY important to use "USB-To-UART adaptor with 1.8V I/O level" and soldering a very thin wire on the Y9 pin. See https://github.com/senselessDev/shield-android-tv-reverse-engineered/tree/uart-exploration
[Shield Android TV General] ahmed68:
yes I remove sshd nothing see on the screen ,I think the problem its the part (boot,recovery,system,vendor,dtb) in sshd named sda , for emmc its mmcblk0 and system cant booting.

I try flash sshd from satv then from satv pro and nothing , but when I boot to Ubuntu (L4T) I see in the desktop all emmc part like sd card. now I use the emmc for rootfs .

I'm shure its can boot for that we must help other how that do or any one have satv give tha backup of emmc (firstpart.bin ,lastpart.bin) in zip format its 713mb.

I write with (followmsi, GEEKBOX Rom Developer ) in freaktab.com about dualOS anser its possibly.

---------- Post added at 08:10 AM ---------- Previous post was at 08:01 AM ----------

dear yahoo2016

by (usb to uart) I can flash the emmc or best to use jtag .

http://www.aliexpress.com/premium/j...SB_20160819231449&SearchText=jtag&blanktest=0

---------- Post added at 09:04 AM ---------- Previous post was at 08:10 AM ----------

if any one have SATV (non pro) , and like to help can do that

1.boot to fastboot and run :

a.fastboot erase cache

b.fastboot erase recovery

c.fastboot erase system

d.fastboot erase vendor

e.fastboot erase userdata

2. boot to ubuntu (L4T) and run:

dd if=/dev/mmcblk0 | gzip -c > /path/to/backup.img.gz

then but it in mega drive or other

it will be less than 100mb

that enough to boot into fastboot and flash the emmc
[Shield Android TV General] Stevie G:
A heads up to all you guys doing this for all, it's much appreciated. Just a few questions I want to be clear on if anyone can assist.

I do have a nvidia shield 16gb version. I have a 64gb evo sd card in my shield and it performs quite well without any issues yet.

1) Is there any speed difference between a USB3 external drive or a ssd in a USB3 casing used as internal drive in the shield. Reason I am asking is that the USB port on the shield can only run USB3 speeds. Will there be an improved speed using the ssd as an external.

2) is there better speeds on the pro version when the internal drive is replaced by a ssd. Is the internal drive connected straight to the motherboard or will you only get USB3 read and write speeds as the external USB3 ports. Reason me asking if the only difference being the 16gb version have the ssd connected externally via USB 3 port and on the pro it's only internal.

3) Would it be better to add an external USB3 drive or a external ssd seeing that there is a difference in price.

I would appreciate your feedback guys
[Shield Android TV General] ahmed68:
when use ssd speed reed/write its 240-260 mb/s in windows or Linux for evo 850 its 500-540 mb/s I think the problem its current regulator the sdd need more current 1.4 A and sshd need 0.7 A
[Shield Android TV General] Stevie G:
I see, but what is the max speed read/write for USB3 port on shield. Are you saying even if I use a ssd in an external drive the power is too little. What about using both USB ports or a USB3 hub to cater for the extra power it needs.
[Shield Android TV General] anchung.chen:
Hi hallydamaster:

I just notice that the partitions #22 and #32 for /SYSTEM and /DATA are not 4k-byte aligned, and I think there is some performance penalty when replacing original SSHD with SSD or large-size HDD.
[Shield Android TV General] ahmed68:
any usb3 its 1a and 500 mb/s to see that can run aida64 from

https://play.google.com/store/apps/details?id=com.finalwire.aida64&hl=en
[Shield Android TV General] hallydamaster:
How did you check this, and are you sure system isn't? I only have the diagrams/tables to look at, at the moment.

Do you suggest we do something about it? You could probably get a tool for Linux to do alignment, but messing with the partition table from Linux will break it for Android.

Since the GPT partitionvstyle used is very proprietary, I am not sure how one would rectify this. The subject about disk alignment is huge when you begin to read up on it! :eek:
[Shield Android TV General] Stevie G:
So what you actually saying that even if you use the external usb3 drive as internal, it will basically run a similar speed as the Evo ssd.
[Shield Android TV General] ahmed68:
i dont now im not test it i only replace the sshd with ssd and come back to sshd.

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

dear Stevie G

can you help and dump your emmc you can dump all part in zip its 713 mb or only boot and dtb its less than 100 mb

1.boot to fastboot and run :

a.fastboot erase cache

b.fastboot erase recovery

c.fastboot erase system

d.fastboot erase vendor

e.fastboot erase userdata

2. boot to ubuntu (L4T) and run:

dd if=/dev/mmcblk0 | gzip -c > /path/to/backup.img.gz

then but it in mega drive or other

it will be less than 100mb

that enough to boot into fastboot and flash the emmc
[Shield Android TV General] anchung.chen:
From the spreadsheet picture you posted on the beginning:

The "First LBA" column for partition #1 to #15 indicate 4k-alignment. But for partition #16 to #32, the "First LBA" value is not a multiple of 8 (4k/512) and is NOT 4k-alignment.
[Shield Android TV General] hallydamaster:
I've been examining the data in partition EKS. It's partly filled with some data, but more than half the partition is only zeroes. The following partitions UKS and FB are only zeroes, so to correct this and making the partition layout align I see 2 options:

1.

Shrink EKS partition and move overything following that to align the partitions. This will make everything in the disk align to 4K sector size.

2. Maintain original size of EKS and shrink partition UKS or FB to align.

I tend to option 2 being the best solution, as there might be a reason Nvidia choose to have that specific size of the partition.

Both options though would need a lot of editing of the partition array and following the recalculation of the GPT header.

I would be happy to help, and build the partition array and GPT header if anyone would be interested in trying this out?

I only need the size of the disk to work from (total byte count taken from fdisk -l output).
[Shield Android TV General] anchung.chen:
My proposed option #3:

Move all "First LBS" of partition #16 to #32 down (partition #16 to 0x00011100), and reduce the size of partition #32 (/DATA), This will keep original size for all partition #1 to #31, so it is easy to use dd to move partition #16 to #31 down and use fastboot to erase /DATA.
[Shield Android TV General] hallydamaster:
Well, that sounds reasonable do you want to try it out then? :)
[Shield Android TV General] anchung.chen:
OK, I will try it out.
[Shield Android TV General] etzkaaa:
Maybe someone could pull out partitions dumps from shield tv 16gb 2015. I'm interesting in first 8 partitions, and recovery partition (BCT, NVC, NVC-B, TBC, TBC-B, EBT, RBL, SOS, LNX) , at least. I understand that not everyone has good soldering skills, so this is an easier way, maybe it works :

https://xdaforums.com/showthread.php?t=2450045
[Shield Android TV General] Mogster2K:
I found another thread that may help you. The author sent an image to another person, so he might be able to send you one.

https://xdaforums.com/showpost.php?p=71296051&postcount=8

Not sure what I'm going to do with mine. I want to avoid removing the eMMC if I can because I've never done it before and there's too much chance that something will go wrong. I found this breakout board which looks like I could solder it to the NSTVs main board using the points you provided. I might need the grounds isolated tho. However, I'm not sure the site is still in business - a query sent a couple weeks ago has gone unanswered.
[Shield Android TV General] etzkaaa:
[MENTION=4148780]Mogster2K[/MENTION] I saw that break board, and i think it should work, but I dont know if that site is alive. And I read that post a month or two ago :). [MENTION=354948]oldshanshi[/MENTION] do not answer me for long time...
[Shield Android TV General] etzkaaa:
[MENTION=4148780]Mogster2K[/MENTION] Finally, I got a dump. Tomorrow or next day I will write dump to the chip... See whats happens....
[Shield Android TV General] Mogster2K:
Cool, I hope it works out for you.
[Shield Android TV General] etzkaaa:
So, I damaged my original emmc chip of nvidia shield tv 2015, so I brought new identical chip from aliexpress.com . I writed firspart.bin and lastpart.bin(backup of 2015 16gb version from [MENTION=354948]oldshanshi[/MENTION]). Then I overwrited EKS partition with my own original EKS (sdd12_backup.img) partition for netflix to work. But now my shield tv is on APX mode.

Am i doing something wrong, maybe bad commands in terminal? See photos , what commands I used with ubuntu...Or maybe mainboard have problem?...Or I have to use a proper programer for flashing chip, because I donts see first 2 (maybe 3) ''boot'' partitions. I know that some manufacturers are using these partitions for flashing bootloaders, maybe nvidia is using those hiddens partitions for that purpose, and thats why my shield goes to APX?
[Shield Android TV General] Mogster2K:
I don't know, but I have read that USB readers cannot access the hidden partitions - you need a reader that connects directly to an internal bus (not sure which one.) My laptop has a card reader but it's connected internally to USB 2.0.
[Shield Android TV General] etzkaaa:
Yeah, my laptop has card reader too. But reader do not give a power to emmc chip directly, there should be a triger for that( maybe resistor from 3.3v vcc to dat3 contact). Normal sd card works, but not emmc. Emmc works only in external usb card reader. Same on anothers two my laptops.
[MENTION=354948]oldshanshi[/MENTION] gave me backup, and there are 29 partitions (I firstly writed that to usb flash stick) and he sells programed shield tv emmc chips with another capacity(32gb, 64gb, 128gb). So I think 29 partitions are all, and there shouldn't be any more partitions...or maybe I am wrong :) 500gb version has 32 partitions. I dont see in 16gb backup BCT, NVC, NVC-B partitions...
[Shield Android TV General] oldshanshi:
If I bought the EMMC chip here, I don't need to write first.bin and last.bin. You just need to find the right location to write eks partition. Version 2015 needs to be updated to 7.2 before normal NF. Previously unlocked NF is not available

https://item.taobao.com/item.htm?spm=a2oq0.12575281.0.0.25911debWsx1Hc&ft=t&id=576292085112
[Shield Android TV General] etzkaaa:
[MENTION=354948]oldshanshi[/MENTION]

1. Do I use the right commands to write firstpart.bin, lastpart.bin and EKS partition to the new 16gb emmc chip?(photos in previous post)

2. Whether those commands are enough for the shield to work(no APX), because if thats enought, my shield mainboard is bad...

3. Taobao dont sent items to my country, summer i tried to order emmc, but they just dont send, and for now I dont know if buyed chip could help me...
[Shield Android TV General] Mogster2K:
Does one of you have the DTB image from 7.2? I think that's what I'm missing for mine... I haven't been able to find any info on how to split the "staging blob" into the actual partitions.
[Shield Android TV General] etzkaaa:
If you speaking about DTB partition dump (17 partition of 2015 16gb ver.), then I uploaded here

http://s000.tinyupload.com/index.php?file_id=92397276156449014609

But I dont know which version of android it is...

And for now, I dont know what to do with my shield. Before desoldering and writing to the emmc chip, there were no booting, no video signal, no fastboot, and no APX, only green light on top of the shield. After writing and soldering - APX !!!
[Shield Android TV General] Mogster2K:
Thanks, but I'm pretty sure it has to be 7.2. I guess I can try building from Nvidia's source.

From what I can tell, USB adapters cannot access the boot1 and boot2 partitions at all. You either need a specialized reader or an adapter that connects to a different bus. A search turned up a few: here's one that connects to a PCIe slot, some that connect to mini-PCIe slots, and even some that connect to SATA or M.2 slots. It might also be possible to use a single-board computer; I'm not sure how those are wired internally, and it varies by model.

Edit: according to this thread, a Raspberry Pi 3 can be used to read/write the boot partitions.
[Shield Android TV General] etzkaaa:
Does anyone know if writing nvidia images (blob file) to 16gb version shield tv (with fastboot), could corrupt boot1 boot2(mmcblk1boot0, mmcblk1boot1) first bootloader partitions on emmc chip. Somewhere I read that they are "read only" and cannot be damaged? I think this is the case with all emmc chips with android system...
[Shield Android TV General] jsloan2:
Trying to replace my old Seagate drive and hitting a snag.

Followed instructions for 4k alignment swap on 1TB SSD.

dumped my own firstpart.bin

used a posted lastpart.bin and ran it through the 4k alignment tool.

Device boots to nvidia logo followed by an android logo with a white glow/aura. (not the flower power android you see during boot)

Tried factory reset overnight and it is just on the same screen in the morning.

Is there a version limitation this works for? I didn't see one listed but I'm likely running the latest v8 available.

./shield_pro_new_disk_gpt_calculator-0.3 lastpart1tbv2 1000204886016 lastpart1tbv2-4k

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

new_disk_byte_size = 0x0001000204886016
new_disk_sector_size = 0x0000000074706db0
new_disk_current_LBA = 0x0000000074706daf
new_disk_last_usable_LBA = 0x0000000074706d8f
new_disk_start_partition_array_LBA = 0x0000000074706da6
new_disk_data_last_LBA = 0x0000000074706d8e
New partition #16 First-LBA=0x0000000000011100 Last-LBA=0x00000000000120ff
New partition #17 First-LBA=0x0000000000012100 Last-LBA=0x00000000000130ff
New partition #18 First-LBA=0x0000000000013100 Last-LBA=0x00000000000530ff
New partition #19 First-LBA=0x0000000000053100 Last-LBA=0x000000000005fcff
New partition #20 First-LBA=0x000000000005fd00 Last-LBA=0x0000000000061cff
New partition #21 First-LBA=0x0000000000061d00 Last-LBA=0x000000000006e8ff
New partition #22 First-LBA=0x000000000006e900 Last-LBA=0x000000000046e8ff
New partition #23 First-LBA=0x000000000046e900 Last-LBA=0x00000000004ee8ff
New partition #24 First-LBA=0x00000000004ee900 Last-LBA=0x000000000066e8ff
New partition #25 First-LBA=0x000000000066e900 Last-LBA=0x000000000066f8ff
New partition #26 First-LBA=0x000000000066f900 Last-LBA=0x000000000067f8ff
New partition #27 First-LBA=0x000000000067f900 Last-LBA=0x00000000006808ff
New partition #28 First-LBA=0x0000000000680900 Last-LBA=0x00000000006848ff
New partition #29 First-LBA=0x0000000000684900 Last-LBA=0x00000000006888ff
New partition #30 First-LBA=0x0000000000688900 Last-LBA=0x00000000006908ff
New partition #31 First-LBA=0x0000000000690900 Last-LBA=0x00000000006948ff
New partition #32 First-LBA=0x0000000000694900 Last-LBA=0x0000000074706cff
crc32_partition_array = 0xce3e8bfb
crc32_gpt_header = 0xe57f9037
Done!!!
'sudo dd if=firstpart.bin of=/dev/sdX bs=512 count=69888' to write partion #1-#15 to new disk
'sudo dd if=firstpart.bin of=/dev/sdX bs=512 skip=69790 seek=69888 count=6830080' to write partion #16-#31 to new disk
'sudo dd if=lastpart1tbv2-4k of=/dev/sdX bs=512 seek=1953525158' to write to new disk
In fastboot mode, 'sudo fastboot oem unlock' and confirm in fastboot menu
or In fastboot mode, 'sudo fastboot erase userdata'
In fastboot mode, 'sudo fastboot format:ext4 userdata'
[Shield Android TV General] hallydamaster:
I don't believe that you'll gain anything by 4k aligning your setup.

Try write firstpart.bin and the regular 1TB lastpart.bin to see if it boots. If it does, something was not done properly 4k aligning it.