I've been given some flash drives that appear to be fake. The silk screen says 64 gigs, and they show up as 64 gigs to the OS.
However if you attempt to write any files larger than 4 gigs the file becomes corrupted.
How can you quickly tell if a flash drive / sd card is fake, and what the actual size is?
Side note:
I know about h2testw, but it is in german, and I find it extremely difficult to use. I'm looking for an alternative program, or a way to do this from the command line.
Any platform is fine.
Answer
Open the card device directly, and write 0x00
to it up to the capacity on the label. Write 0x55 0xff 0xaa
to the first three bytes, and look for any non-0x00
byte up to the capacity on the label. If you find one, the card is either fake or defective. If you find 0x55 0xff 0xaa
... definitely fake.
dd if=/dev/zero of=/dev/mmcblkX bs=16M count=...
echo -e -n '\x55\xff\xaa' > /dev/mmcblkX
hexdump /dev/mmcblkX
No comments:
Post a Comment