Reformatted an SD card and want it to be recognised as the same SD card by your Android Phone? Or want to change your volume serial number for some other reason? You need to record the original volume serial number and replace the new one with this number after formatting. Here’s how to do that for an exFAT volume.

Changing an exFAT volume serial number is relatively trivial with a disk editor. All you need to do is change the serial number at offset 0x64 of the boot sector (the boot sector is the first sector of the volume, has “EXFAT>” at offset 0x03, and you should recognise the serial number at 0x64).

The only tricky part is you need to re-calculate and update the boot sector checksum (sector 11 of the volume contains a repeated checksum of sectors 0‒10, which is calculated by summing shuffled bits, excluding a few variable bytes of the boot sector).

To help with this, I’ve made a simple Python script to help calculate the checksum: exfat_bootsector_checksum.py 

Further instructions are in the script description.