Examining Counterfeit Micro SD Cards In Linux

As the cost of storage climbs, so to do does the likelihood that you’ll come across counterfeit hardware in the wild. Unfortunately these fake storage devices are also becoming increasingly convincing, so it will take more than a cursory examination to figure out if you’ve got the real deal.

The good news is, figuring out if that new micro SD card you just bought can actually hold as much data as it claims is relatively straightforward if you’re on Linux. [Jason Andress] has written an an article on how you can use various tools to not only verify the legitimacy of a micro SD card, but even “fix” some types of fake cards.

As a first step, [Jason] shows how the output of dmesg can give you a hint about what’s actually inside a micro SD card. Modern high-capacity cards should show up in the kernel logs as UHS (Ultra High-Speed), and despite how it might sound, a device that’s detected as “high-speed” is likely to be a disappointment. One can then look in the /sys filesystem to glean more information about the device, and even start poking at its registers. This can uncover discrepancies such as an incorrect manufacturer ID code.

Ultimately, on a fake card you’re likely to find that the actual capacity of the device is far less than what’s advertised. In such cases, it’s possible to fiddle with the partitions so the OS sees a usable volume that actually matches the capacity of the hardware. [Jason] recommends a software suite called “Fight Flash Fraud” — or f3 that can automate the process and perform other various diagnostic tests. Of course, there’s a case to be made that any card which needs this sort of intervention to work properly is probably better off in the trash than in any of your devices anyway.

On the other hand, if you have a legitimate SD card that’s physically damaged, you might be able to repair it if you’re willing to put the effort in.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.