tags:

views:

377

answers:

2

I want to be able to retrieve an SD Card's Serial Number, Manufacturer, and any other information it may provide. Java or just a command to run would be great. Compact Framework does it, but that doesn't help me.

A: 

You may be able to get some info out of "hdparm"

hdparm -i /dev/sda

Gives a bunch of info about /dev/sda which includes its serial number. In my test case, this was a hard drive, but presumably the same may work for a SD card (which looks a lot like a disk to the OS)

MarkR
doesn't work, at least not through a USB-SD adapter.
Peter Cordes
A: 

You can also try

hwinfo --disk

to get information on your disks, including SD Cards. (I found hdparm -i didn't work for me with my SD Card.)

ngm
I didn't know about hwinfo, so that's interesting. However, the output (for a USB-SD adapter) doesn't show anything specific about the SD card. Probably it's not possible without native mmc, so maybe this is a good answer.
Peter Cordes