6

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.

ctacke
  • 66,480
  • 18
  • 94
  • 155
Mark
  • 61
  • 1
  • 1
  • 2
  • This is with a native mmc driver, right? (i.e. Not a USB-SD adapter). – Peter Cordes Dec 08 '09 at 19:14
  • Sorry for the delayed response, but I believe in my case, yes it is mmc (Android phone). There is no USB in this case, but I recall some instance where there wasn't a USB port, but the way the reader was connected to the device actually used USB. I can't remember exactly what that was though. I haven't gotten a chance to test the answers below (too many projects), but they both look promising. – Mark Dec 20 '09 at 05:26
  • http://www.cameramemoryspeed.com/sd-memory-card-faq/reading-sd-card-cid-serial-psn-internal-numbers/ – Harvey Oct 19 '15 at 19:25

2 Answers2

4

You can also try

sudo hwinfo --disk

to get information on your disks, including SD Cards.

hdparm -i may not work through sdcard controllers

RzR
  • 3,068
  • 29
  • 26
ngm
  • 7,277
  • 1
  • 53
  • 62
  • 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 Dec 08 '09 at 19:15
  • Is "Unique ID:" reliable ? – RzR Jan 01 '14 at 23:41
-1

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
  • 62,604
  • 14
  • 116
  • 151