Android - How do I check the class of a micro sd card?

An SD Card class basically the minimum sequential write speed that the SD card supports. Testing the class of an SD is quite easy, just copy a 1 GB file to an empty card and measure the time it took for the copy. A class 6 SD card should support at minimum 6MB/s.

Also check out the markings on the SD card, there should a logo like the following:

enter image description here

the number in the logo describes the speed class.


Specification sheets lie, packaging lies, the mark stamped on the card itself lies.

I have lost track of the number of "class 10" SD cards that only run at a couple of MB/s or the number of 8/16/32GB cards that have an actual capacity of 2GB!

If you really want to know how fast a card is (and whether you have been duped with a card which is smaller than it reports and will thus corrupt your data when it gets full) I would highly recommend testing every single SD card you buy.

Even branded products can be faked. I've bought what appear to be high end branded products, in convincingly authentic looking packaging which were actually fakes and failed when put to the test.

Testing under Windows

The best Windows test tool is h2testw, from Heise.

This page is in German, the google translate version is readable even though the formatting is poor.

This writes a unique, verifiable pattern to the drive, completely filling it. Since the pattern is unique, it can verify that the data read back is actually the same as was written and that the card isn't reporting that it has a higher capacity than it actually has.

Since the class is related to the minimum write speed and SD cards get slower as they get full, this also ensures that you are testing speed under the worst case conditions. Loosing one complete rewrite of the drive is a small price to pay for peace of mind.

Hardware required

In order to get an accurate reading on speed, you will need a card reader which supports the interfaces on the micro-sd card.

My card reader of choice is a Kingston MobileLite G4 as it's reliable, cheap and fast. The G4 can make full use of its USB3 interface, and supports memory cards with up to UHS-II (up to 312 MB/s half duplex). It will, of course, be limited to USB2 speeds (around 60 MB/s) if used on a USB2 port on your computer.

If you need to test a UHS-III device (up to 624MB/s), you will need a better card reader though.

Testing under Linux & OSX

There is an open source project called F3 (which is short for Fight Flash Fraud or Fight Fake Flash) which is very similar to h2testw for Linux and Mac, but I don't have any personal experience of this. It might however form the basis for an Android port (the source code is on github).

There are also some GUIs for F3:

F3 QT is a Linux GUI that uses QT. F3 QT supports f3write, f3read, and f3probe. Author: Tianze.

F3 X is a OS X GUI that uses Cocoa. F3 X supports f3write and f3read. Author: Guilherme Rambo.

Testing under Android/IOS

If anyone knows of a similarly robust and reliable Android application to test the SD card in a tablet/phone directly, I would happily update my answer.


You can test SDcard speed in command line :

adb shell
dd if=/dev/zero of=/mnt/sdcard/test bs=512 count=2048000
rm -f /mnt/sdcard/test

that will write a 1GB file with zeros bits in sdcard.

Tags:

External Sd