[Shield Android TV General] kavey:
DISCLAIMER - I'm posting this to assist the above with generating their own firstpart/lastpart to ensure they have the correct 'pieces' to flash to a new drive. Using your own drive should also mean your personal widevine keys are also preserved - but as I have not needed to use this process myself (I just used DMDE to clone the entire drive which worked for me) WHILE I HAVE TESTED THIS MYSELF TO GENERATE MY OWN FIRSTPART AND LASTPART FILES, I HAVE NOT NEEDED TO WRITE THEM TO MY SSD AS MY CLONE IS WORKING - I TAKE NO RESPONSIBILITY FOR FAILURE. These sector numbers are the same as you would extract for the process to use a different sized drive but if you are cloning to another 500GB then you don't need to fiddle around with the lastpart in HxD to edit the partition table to adjust it for a different sized drive (see https://xdaforums.com/t/guide-linux...sd-hdd-of-any-size-only-for-satv-pro.3440195/ - if you DO want to try a different sized drive - DMDE can edit the lastpart as well in its editor mode, using the same process as HxD, however you would need to find the HEX code for the block size for your drive as explained in that thread - there is a tool/spreadsheet linked in there that can help.)

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

Okay so quick instructions on how to clone the bare OS and partition data from an old drive with DMDE, leaving the userdata blank:

I imaged my drive using DMDE on windows as it has the ability to easily extract (and even modify sectors) as needed, though as I have only cloned my drive to another 500GB drive, I have not needed to use the sector editing function, but now i have a master backup, the facility is there if I ever needed to change drive to another size in the future. I have no link to DMDE and only refer to it as it has worked flawlessly for me.

First select your drive in DMDE and load the data to see an image like this which is the drive layout. Essentially it's a custom linux partition layout for Android

I'm using the image I created from my original drive here, but if you haven't already imaged and need to do this fresh, just select the physical drive option and select the Shield drive and you should see the same partition table. If you can do a full clone first and then work on your master backup image, that is adviseable to reduce wear/use on the original drive, but if your drive is failing and a full clone may not be possible copying just the essential data from the drive should be enough.

2. Cloning just the OS (bootloader, recovery, system etc) (your own personal firstpart.bin) you need to copy all the sectors up until the last partition which starts at sector 6899870 as seen in the image above. This will pull around 3.5GB from the drive, which in your case @eddieyee should hopefully help with your failing drive being able to dump 3.5GB in a few minutes instead of you having to do a full clone which would take hours and will probably fail when the drive heats up.To do this, simply choose 'Copy Sectors' with these values, with your output to a file.

3. To generate your own lastpart.bin, you only need the last 10 sectors which contain the GPT partition table:

4. To then copy those backed-up first/lastpart files, use DMDE to write those sectors to your new drive using the same process ensuring you use the same sector numbers (e.g. firstpart should be written from 0-6899869 and the 10 sectors in the lastpart should be written from sectors 976773158-976773167), but using your new files as the source and the new SSD as the destination. NOTE: when you open firstpart and lastpart in DMDE separately, they WON'T show any data/partition information as they are 'incomplete' raw binary files - only when you reconstruct both firstpart and lastpart combined (well lastpart mainly tbh as that is the partition table) and then re-read the drive as a source in DMDE you should then see the same layout as the original which should confirm the process has worked.

Hope that helps, good luck!