f3 is a tool that tests flash cards to verify their capacity and performance. It uses pseudorandom data to check if the device matches the claimed specifications, aiming to combat fake flash drives. Examples, installation instructions, and other resources are provided. Surprisingly, f3 can correct the capacity of fake drives and even handle “flaky flash” by marking bad data clusters. The tool is available for Linux, Windows (using Cygwin), and Mac (though some features require Linux). Docker installation is also an option. For Mac and Windows users facing device mapping issues, a VirtualBox VM workaround is suggested. Ultimately, f3 is a versatile tool in the fight against counterfeit flash drives.
https://fight-flash-fraud.readthedocs.io/en/latest/introduction.html#correcting-capacity-to-actual-size-with-f3fix