Reading List

The Selfish Gene
The Psychopath Test: A Journey Through the Madness Industry
Bad Science
The Feynman Lectures on Physics
The Theory of Everything: The Origin and Fate of the Universe


ifknot's favorite books »

Thursday 17 November 2016

Verify the integrity of a flash/SD card on a Mac using F3 and F3X



TL;DR I just want an App for that but I'm cheap and don't want to pay - go here

Command Line Testing your SD card using F3 on Mac OS X


You love the command line and want to test your SD card? 


The software “F3” (either meaning “Fight Flash Fraud” or “Fight Fake Flash” according to its author Michel Machado) is an open-source implementation of the same algorithm h2testw employs to determine the integrity of a memory card (or any volume you mount on your Mac for that matter).

Installing F3 Using HomeBrew


You do have Homebrew already installed on your OS X machine right?

No I'm an idiot: 



 Yes:


The command below will install F3:

brew install f3

Testing SD card using F3 on Mac OS X using f3write and f3read

There are a couple of new files in the folder now, most notably f3write and f3read, which are the actual programs we’ll need to continue testing the SD card.
First, let’s find out what the actual “volume” of the SD card is. In Terminal, enter:
cd /Volumes/
ls
Your mileage may vary but my results:
OS X        Untitled
So it's clearly 'Untitled' that we're interested in so execute f3write first as you're most likely interested in the the write speed:
f3write /Volumes/Untitled

Got 32GB or more? Go and make a cup of tea...

The f3write program now starts to write to all free/empty space and will report its progress. But a class 10 uhs 1 32GB card will take about half an hour. So this is also a good moment to check the claimed write speed of the card. But what should you expect?

SD card speed classes:

The SD Association devised a way to standardise the speed ratings for different cards. These are defined as ‘Speed Class’ and refer to the absolute minimum sustained write speeds. Cards can be rated as Class 2 (minimum write speed of 2MB/s), Class 4 (4MB/s), Class 6 (6MB/s) or Class 10 (10MB/s). It’s important to note that these are the minimum, so it’s entirely possible a card can achieve faster speeds but these give you an impression of the least you can expect.

UHS Speed Class

The next rating is the Ultra High Speed (UHS) Speed Class. It looks like the number 1 or 3 inside a letter U and refers to minimum sustained writing performance for recording video. UHS came about due to 4K-capable video devices needing faster write speeds.
The SD Association has two UHS Speed Classes, UHS Speed Class 1 and UHS Speed Class 3. UHS Speed Class 1 supports a minimum 10MB/s write speed, whereas UHS Speed Class 3 supports at least 30MB/s write speed. As a rule of thumb, 4K-capable camcorders will usually require at least a U3 rated SD card.

Data integrity with f3read and the F3 manual

Next, check whether the data is OK. To this end, run the  f3read program, to the terminal!

f3read /Volumes/Untitled/
You can monitor its progress for each xxxx.fff file the program finds - these .fff files were written by f3write. The manual page here explains the different columns (ok/corrupted/changed/overwritten).

Eek! The command line is scary... F3X to the rescue!


So, you don't love the command line and yet you still want to test your SD card. Well there is a nifty little GUI interface to the F3 commands that you can download and install from this Git page here.

But, unlike the command line tools, FX3 is a little light on feedback and information on your card's performance:






No comments:

Post a Comment