• Guest, The rules for the P & N subforum have been updated to prohibit "ad hominem" or personal attacks against other posters. See the full details in the post "Politics and News Rules & Guidelines."

Changing/creating a custom serial ID on a flash drive (low level blocks)?

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
I posted this in Highly Technical, but perhaps it's not that high tech and maybe someone here can help me.

My company is getting some drives made in China that we're sending out to various vendors. To make a long story short, there's preloaded software on these drives that is uniquely tied to the drives' serial ID. In order to activate the software, the customer has to log into a website, which reads the ID and decrypts the program. Unfortunately, we ran into a problem with one of the packages where the manufacturer didn't load the correct ID. Instead of sending them back to China and having them reload (which is going to take quite a bit of time), we want to do this ourselves. We have a means to get the software loaded en-masse (so any kind of formatting is ok), but at this point we can't alter the serial IDs. This will also help in future distributions where we can just order the drives blank, load the software ourselves, and load the serial IDs as well.

We got some direction from our middleman on using a program called Alcor/AlcorMP which can do some low level formatting and alteration of blocks on flash drives. Unfortunately the program isn't picking up the flash drives (any flash drives for that matter). We tried several versions of the program on various operating systems - no dice. The closest we came was getting one Win7 machine to recognize the drive as "unrecognized flash", but it still didn't auto-detect the settings which is required to proceed.

Apparently Alcor is (was?) used to fix frankenflash scam drives sold on Ebay, so it does work. Here's some more info on it:

http://sosfakeflash.wordpress.com/2008/11/01/where-to-download-alcor-tools-to-fix-fake-usb-flash-drives/

I downloaded a utility called CheckUDisk and it properly recognizes the drive and the serial ID, now I just need to change it. No luck on Google yet finding something that works.

I should mention that we're not tied to this program in any way. The only thing I need is to be able to alter the serial ID on a set of flash drives (currently ~125 of them); how I do it doesn't matter. I'm still looking into it and I heard Linux may have an easier time accessing some of the lower-level information on Flash media. Unfortunately this is above my head so I would greatly appreciate any help or direction.

TIA!
 

tcsenter

Lifer
Sep 7, 2001
17,848
24
81
Its most likely programmed into some PROM embedded in the controller or PROM chip, like the SID/VID is on just about every other device.
 

Mark R

Diamond Member
Oct 9, 1999
8,517
13
81
You need to contact the manufacturer and ask how to do it.

However, you may find that the ID is one-time programmable, and cannot be changed once the stick has left the factory.
 

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
Yes, it is programmed into the hardware, but you can change it. Why would you not be able to change it? That Alcor program does it and it's what our manufacturer uses to program the serial IDs ... we just can't get it to work on our systems and I'm looking for alternative methods.
 

tcsenter

Lifer
Sep 7, 2001
17,848
24
81
Because it might require a special dongle or is programmed by the chip vendor before it is assembled. Or it requires a proprietary utility that is supplied by the controller chip vendor. The "Alcor" program refers to "Alcor Micro", a leading maker of controller chips for USB and flash memory applications. Their program probably only works with their chips.

If your flash drives use another company's controller chips, you may need to get a similar utility from them.
 

skrewler2

Senior member
Aug 28, 2005
279
0
76
I don't know what exactly you're referring to when you say "Serial ID". What app is 'reading from a website'?

Are you talking about a UUID?

In 1 minute flat of googling for "alcormp flash drive" I found this:

http://sosfakeflash.wordpress.com/2008/11/01/where-to-download-alcor-tools-to-fix-fake-usb-flash-drives/#comment-283

If you know your what 'serial ID' on a given flash drive is, you could dd it then grep for the number you're looking for. If it's there, it's trivial to change it..

Use http://unxutils.sourceforge.net/
 

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
I don't know what exactly you're referring to when you say "Serial ID". What app is 'reading from a website'?

Are you talking about a UUID?

In 1 minute flat of googling for "alcormp flash drive" I found this:

http://sosfakeflash.wordpress.com/2008/11/01/where-to-download-alcor-tools-to-fix-fake-usb-flash-drives/#comment-283

If you know your what 'serial ID' on a given flash drive is, you could dd it then grep for the number you're looking for. If it's there, it's trivial to change it..

Use http://unxutils.sourceforge.net/
Yes I can pull up the serial ID through multiple utilities. The link to download DD and GREP on that page doesn't work. Got another link?
 

skrewler2

Senior member
Aug 28, 2005
279
0
76
dd if=x: of=output.txt bs=512 count=1024
grep <serial id> output



where x: is the flash drives letter assignment..

if you don't get anything, paste output.txt to pastebin or something and give me the expected serial ID.

If that works I could whip up a quick perl/powershell/shell/python/whatever script to change them for you if you wanted.. donations for my time would of course be appreciated.=)
 
Last edited:

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
How do I get this to run? I'm typing, in the command prompt:

c : \folder_location\usr\local\wbin>dd if=f: of=output.txt bs=512 count=1024

and it comes back with

dd: f:: Permission denied

I can read/write to this drive. What does this mean? And obviously it's not giving me an output text file.
 

Maverick2002

Diamond Member
Jul 22, 2000
4,694
0
0
No go ... seems like everything I try gets "close", but not quite. With that first version, dd --list isn't a recognized command. With the new version you linked, it works, and lists the device as \\Device\HarddiskVolume4

I try to use that like this:

c : \folder_location\usr\local\wbin>dd if=\\Device\HarddiskVolume4 of=output.txt bs=512 count=1024

And it comes back with "Error opening input file: 53 The network path was not found"

If I still use "f:", I get this:

"read 95 disk NYI
Error opening input file: 5 Access is denied"

I tried everything you suggested, including creating an output.txt file in case it didn't have permissions to create it but could write to it. Any ideas? I appreciate all the help, but if you can't help further I understand.

What does DD do anyway, just list stuff? Because I know what the serial ID is, I have a couple programs that can pick it up. I just need to change it.
 

Mark R

Diamond Member
Oct 9, 1999
8,517
13
81
What does DD do anyway, just list stuff? Because I know what the serial ID is, I have a couple programs that can pick it up. I just need to change it.
DD copies the entire contents of the 'block device' from the drive into a file. A 'block device' is means the user and system accessible storage of a drive. It's the raw data off the drive, containing the list of partitions, followed by each partition - each with a complete copy of the file system data.

The Serial ID for a USB device is not stored in the block device data. It's stored as part of the USB device metadata. It's therefore unlikely that you will have access to it via DD. You can find it by running and USB diagnostic tool - as the serial number is used by the OS to keep track of specific settings applied to the USB drive.

Setting it requires the manufacturer's configuration tool for the controller chip in the USB drive.
 

svendali

Junior Member
Apr 9, 2019
1
0
6
dd if=x: of=output.txt bs=512 count=1024
grep <serial id> output



where x: is the flash drives letter assignment..

if you don't get anything, paste output.txt to pastebin or something and give me the expected serial ID.

If that works I could whip up a quick perl/powershell/shell/python/whatever script to change them for you if you wanted.. donations for my time would of course be appreciated.=)
I require a 16GB SanDisc compact flash with a custom serial number. To replace a 1GB compact flash before it dies. After reading this chain you sound like the one to ask and you take donations. I would love to hear back.
 

ASK THE COMMUNITY