(Note: limited usefulness, only for some specific uses. Or for fun, because it can be done.)
I want to upgrade the sdcard (32GB in FAT32) in my Android phone to a new 128GB one but I want the mount location to stay the same, i.e /storage/xxxx-xxxx (volume serial number, 8 random hex numbers like 1234-ABCD)
If I format the card, the volume serial number will be randomly generated, so the location changes. Thus, I need to re-allow file access right for some apps, fix some sync jobs, rebuild my music playlists, etc. :effort: I want to keep the serial number as-is.
One option is to clone the partition on the old card to the new one: the serial number will stay the same, and FAT32 does work with 128GB cards. But I don't want FAT32 anymore due to its 4GB file size limit as I want to carry large ISO and movie files. NTFS isn't supported because Lenovo doesn't pay Paragon or Tuxera to get their commercial NTFS drivers. So exFAT is selected.
For FAT32, NTFS, it's easy because there's VolumeID tool from Microsoft Sysinternals (free). https://docs.microsoft.com/en-us/sysinternals/downloads/volumeid
For exFAT, it's not so easy.
The hard way: manually edit the partition header and re-calculate its checksum values. No, definitely not for a lazy fag like me.
The easy way: get AOMEI Partition Assistant Pro or higher edition; it can change the volume serial number of exFAT partitions.
The free version doesn't have this feature. So try Google for either a key for this one-off usage or the bootable ISO. Or better, buy it; it's worth the price.
Paragon Hard Disk Manager 16 Advanced and later also have similar feature.
The fun way: get KRyLack Volume Serial Number Editor demo CLI version and mod it. I actually did this.
It allows you to change the serial number to 1324-ABCD (the readme says 1234-ABCD, but it's a bit wrong, thank you). exFAT is supported.
Use HxD to search for the string 1324ABCD
and replace all instances with the serial you want, i.e 12345678. Actually, only the first one must be replace, but you should do all of them to be sure.
When you run it, i.e "D:\tmp\volsnsetup\volsn64.exe" c F: 1234-5678
, it will change the volume serial number of partition F: to 1234-5678, or whatever you edited above. The console might still says changing to 1324-ABCD if not all 1324ABCD
were replaced.
Now you need to physically remove and re-insert the card to see the change.
Excellent!
Was looking for a solution for this for exactly the same reason :)