Wednesday 2 October 2013

A faster test for 'fake' SD cards and USB Flash drives!

Please note: FAKEFLASHTEST.EXE and RMPREPUSB.EXE DO NOT CONTAIN ANY VIRUSES,
even if Windows Defender tells you they are unsafe!




Watch my YouTube video

Why should I use FakeFlashTest?



If you have ever bought an SD card or USB Flash drive, I hope you tested it first before you used it. A good video about how this can affect you is here. You are probably aware (or maybe not if you are reading this because you have just bought one!) that there are millions of these fake Flash memory devices being sold. Some sellers on eBay even admit (in the small print) that they are 'upgraded' and may not actually contain the amount of memory you paid for, yet eBay still continue to allow these people to sell them!

 Here is an extract from the description for a 64GB SD card that is currently being sold on eBay as 'good'...

Actual eBay ad extract:
Please read below before you commit to bid on or buy one of these cards .
If you bid on or buy one of these memory cards it is of the understanding that you have read, understood and agreed with the below. These brand new upgraded/expanded micro SD SDHC memory cards have been tested and marked as 64GB and are all listed as good and are upgraded/expanded from 8GB to 64GB. These are the same as pretty much all cheaper memory cards on eBay; they just don't tell you this.Please note that while these cards are brand new and have been shipped to me straight from the factory these are sold as upgraded /expanded memory cards and therefore the speed may vary for each card. (They may experience read/write errors once max capacity reached) These items are approximately 1/3 of what you would pay for brand new brand named perfect condition products hence the  very low price! 
Once you receive your card it is always recommended that you format it in your device before use.  We also recommend that you back up your data from time to time. We cannot be held responsible for any loss of data that has not been backed up after use of this card.
*These cards will fail the h2testw test*
So these cards are 'listed as good and are 'upgraded/expanded' ? Well No! - they are fake and have been 'clocked' deliberately to deceive you. Furthermore, any normal method of formatting will cause them to be formatted as 64GB cards and so you will lose any files stored past 8GB when you try to use them. In fact, you are paying 1/3rd of the price of a real 64GB card for 1/8th of the capacity (8GB) and it is of dubious quality and you will lose all your precious files and photos if you try to use it!

They have been deliberately re-programmed to lie to you!

This seller seems to think that it is normal for all cheap SD cards to be fake! It shows just how widespread the problem is. These devices are not 'faulty' per se, they have been deliberately re-programmed to lie about their size. For instance a 64GB SD card may actually contain an 8GB Flash memory chip but Windows or your camera or smartphone will detect it as a 64GB device and even successfully format it as a 64GB device (though often, if you format it as NTFS, it may fail to format!). It's like sticking a Ferrari badge on a VW Beatle and selling it for 1/3 of the price of a real Ferrari and then saying everyone does it so it's OK!

These devices usually work for any reads or writes of the first 8GB to the memory chip inside it, but any writes made to locations past 8GB, will either overwrite the data already in the 8GB chip(s), or the controller inside the device will simply not write the data at all, but signal back to your computer/camera/smartphone that the write worked fine! As the directory and cluster map of a FAT32 file system is stored within the first few 100MBs, the filenames will be listed by Windows Explorer or your camera just fine (until you try to look at that data that is stored past 8GB).

Fake 2TB devices are very common at the moment - you only have to look at the price to know they are fake!

Testing Flash memory

There are several utilities that are suggested for testing these devices, the 'Gold Standard' one being H2TESTW v1.4 written for ctmagazin.de (however, I am not sure why this is the 'Gold Standard' as it does not test the area already occupied by your files). There are also other flash test utilities such as chkflsh and USB Flash Drive Tester.

The problem with these utilities is that they attempt to write and read to all the bytes in the memory (or in the case of H2TESTW, to all the unused filespace). In 2008 when H2TESTW was last revised, they had 256MB flash sticks and you needed to be really rich to afford an 8GB device. Today however, we have 128GB 'fake' SD cards and these can take hours to test using H2TESTW and chkflsh, as these tests 'fill it all up' and then 'read it all back' - every single byte; and only then does it give a report. This is totally unnecessary for the purposes of checking for fake flash memory because we will easily see gross errors - whole blocks or memory will be missing or corrupt. So there is no need to write all 64GB and then read all 64GB back again - with a little intelligence we can greatly speed this up.

RMPrepUSB



RMPrepUSB was a Windows USB drive preparation utility which I wrote several years ago.

The Quick Size Test in RMPrepUSB was designed to check the size of these flash memory devices quickly. It does this by only writing 512-byte sectors at various intervals to the memory and then reading back these sectors and checking them. In this way we only need to write and read to a fraction of the sectors in the device. Consequently it is much quicker than any other test! However, the RMPrepUSB Quick Size Test is destructive - the memory 'blocks' are tested, but in order to do that, they have to be overwritten.

Also, the multi-button, multi-tab RMPrepUSB GUI is a little overwhelming to the average user who just wants to check their new SD card or USB Flash drive.

FakeFlashTest - a faster and more user-friendly test



An RMPrepUSB user suggested that I make a single app just for fake flash testing, so I wrote FakeFlashTest.exe and used the same Quick Size Test code in FakeFlashTest (FFT).

Download FakeFlashTest

Quick Size Test algorithm

512-byte blocks of unique data are written at large intervals to the entire drive, starting from the end of the drive. The blocks are then read back, starting from the beginning of the drive.

Only a fraction of the total blocks in the drive are actually written to, so the test is much quicker than H2TESTW.

Non-destructive (slower) algorithm

I also wanted to add a second test to FFT, similar to the technique used by H2TESTW (non-destructive) - i.e. write files to fill up the device volume and then read back the data in all the files and check it. However, I could do several things differently in order to speed up this test process:

 1. Don't generate a random unique pattern for every file. I use A5h bytes for the basic pattern but then write a unique number at intervals inside the buffer. The unique number is an id marker for that file.
2. The drive is filled by files of 200MB in size, by using this buffer (but with the id bytes changed for each file)
3. When the files are read back, I only read back the marker id bytes and use a file seek operation to get the next marker position. This saves having to read the entire file back and verify all the data.
4. Most fake flash memory devices will contain 1, 2, 4 or 8GB of memory - the rest of the memory will be non-existent. Therefore it is pointless to write 64GB of data in one go and then read all 64GB back again, when we probably corrupted the first 4GB as soon as we wrote just over 4GB of data to it. For this reason, after I write 3GB of files, I verify the 3GB to see if they are corrupt. I also do the same after writing 5GB and after writing 9GB and 17GB. After 17GB, I then don't verify any of the files until I have completely filled the drive volume.
5. If I hit a gross error during the file write process, then execution is stopped. After all, we have our answer - the device is faulty, no need to wait 8 hours! However, if all files were written without error, I check all the files and can then report the amount of usable, uncorrupted space. Note: For this reason the reported 'true capacity' returned by this 'Empty Space' test may be grossly incorrect!


YouTube video about FakeFlashTest and Fake Flash memory.

FFT has two main buttons.
  • Quick Size Test - The large button is for the RMPrepUSB style, destructive but very fast Quick Size Test. I recommend you use this test to test all your SD cards and USB Flash drives and then reformat them (note: RMPrepUSB improves file write speed on a FAT32 volume by up to 10% compared to other utilities!).
  • Test empty Space Test - The smaller button runs an H2TESTW-style file fill test but with the enhancements outlined above. Be aware that even though this just adds files to the drive, if your drive is a 'fake' or faulty then you may still lose ALL your files! Also note that if an error is found, it just stops testing and reports a failure (to save a lot of time), so the estimated 'good' capacity will not be at all accurate when doing this 'file fill' test. For a more accurate size test, use the Quick Size Test button.
You can find this new test on the Fake Flash Tutorial page on the RMPrepUSB website.

So, how does it perform? Here are the results using a fake 16GB USB flash drive, formatted as an empty 16GB FAT32 volume, which actually appears to actually have only 2GB of memory in it.

H2TESTW - 48:40 minutes!!!

FFT Empty Space (file) test  - 7:17 minutes

FFT Quick Test - 27 seconds + estimate of 'good' memory available!

Time differences for a 'good' USB stick are not as impressive because I used a USB 3.0 UFD in a fast USB 3.0 port and so data I/O was pretty fast anyway. A slower USB 2.0 drive would show a much larger difference when compared to H2TESTW.
                                       
                                         H2TESTW        FFT-Files test       FFT-Quick test 
8GB GOOD (USB 3.0)       11:46                 11:01                      6:10                        in USB 3 port
16GB BAD  (USB 2.0)       48:40                  7:17                       0:27                        14GB had 10msec access!

 P.S. Check you have the latest version of FFT (later versions work with non-USB card readers as well as USB card-readers).

Recommended: SanDisk Extreme Pro 3.1 (#ad)


 What to do if you have a 'fake' SD card/flash drive

 1. Complain to the seller and leave negative feedback (even if they fully refund you). They are cheats and frauds and are robbing everyone. Someone else may go on a once-in-a-lifetime safari holiday to Africa or a Wedding or other important event, only to find that they have lost all their photos when they get back home! If it was purchased from eBay/Amazon then report them!

 2. Try using RMPrepUSB to format the fake device to it's real capacity (as reported by FFT Quick Size test). Then test it using the FFT - Test Empty Space button or H2TESTW to check that all bytes are good. Even if you do this, there is no guarantee that the memory chips are reliable - many use rejected memory chips that have failed to pass quality testing.
 
Mark the device so that you know it is a fake and write the real capacity on it. If you reformat it, you must reformat it to the real capacity of the memory actually fitted. Do not use your camera or smartphone to reformat it or it will format it to the maximum 'fake' capacity again. Do not use it for anything important!

42 comments:

  1. Thank you for your programming in service of honest commerce.

    ReplyDelete
  2. Hi, I'm attempting to reformat a fake drive with its real capacity but I'm feeling overwhelmed with the RMPprep GUI. How would I go about reformatting it, if I already know it's true size?

    ReplyDelete
    Replies
    1. Follow numbered steps 1 to 6.
      Hint, where it says size, you enter the size!

      Delete
  3. The test runs to 95% then hangs. Any suggestions?

    ReplyDelete
    Replies
    1. Exact same thing happening to me. 95% Complete, then frozen

      Delete
  4. The test starts at the top of memory and then tests down to the bottom. The last 95% is probably real memory instead of fake memory. How big is the flash drive?

    ReplyDelete
  5. So 25GB left to test (ish). Well, you can either wait a long time or abort, reformat using RMPrepUSB and try the other test in FakeFlashTest. I suspect it is a fake drive though as normal drives dont race through the top 95% of memory and then go really slow for the last 5%!

    ReplyDelete
  6. How long would you expect to need to leave it?
    I suspect it is a fake: I bought it partly to test the company...

    ReplyDelete
  7. I can't say - is the LED flashing much, any progress messages in FFT? If the LED is not flashing at all then Windows is probably having a hard time reading sectors and is retrying. Retries have a timeout period which depends on the USB driver code, each retry can take a few seconds or a few minutes! You can always tell by the price - if its under $50 then I would be very suspicious!

    ReplyDelete
  8. I didn't think to look at the LED. I've set a different test programme going now and going out.
    I'll try yours again later and let you know.
    Thanks for the help.

    I'll be very surprised if it turns out to be a good one, but eBay buyer protection is pretty good so what have I got to lose?
    And if the card turns out to be 10% of what it claims, then that's still a useful size (though obviously not for any essential data).

    ReplyDelete
  9. 29.4 GByte OK (61767991 sectors)
    Almost exactly what you said.
    The question now is of how best to lock down the 29 good GB and how good are they...

    ReplyDelete
  10. You can use RMPrepUSB to set the size of the partition to say 29000 MB. Then use the FFT 2nd (file) test to quickly test it. But usually the memory is very low quality - in my experience these drives usually totally fail within a few days to a few months of use.

    ReplyDelete
  11. Thanks again.
    Any good ways to give them a thorough test?

    ReplyDelete
  12. Trying to test a " decent priced" 1TB USB 3.1 flash drive offered on Amazon.
    Used both the V 1.1.1 and V1.1.2 of fakeflashtest. Seems to work as it should until the last 95%. Program then just hangs there. ( for at least 25 minutes).
    Tried on a standard 8GB flash and it does complete successfully.
    Any suggestions or other tests to verify the new !TB flash at the top level

    ReplyDelete
    Replies
    1. Try filling it with 100GB of videos and then see if you can play them all (they will either start to play or they won't). Or if you have a large Windows ISO file (4GB) then make multiple copies onto the flash drive and then try to open them with 7zip or Windows Explorer afterwards. If the drive was a lot cheaper than other 1TB USB flash drives such as Patriot Rage 1TB then it is probably a fake!

      Delete
    2. P.S. Also worth checking the genuine manufacturers website to see if they even make it!

      Delete
  13. I have been running FFT 1.1.2 on a flash drive bought from Amazon. The drive is advertised as a 1TB drive. FFT first writes information to the drive. That part worked reasonably quickly. It then attempts to read back what it wrote. I say "attempts", because it has now been 24hrs and FFT is still sitting at 60% of the read operation complete. I think it's a pretty good bet that I'm dealing with a fake but it would be helpful if, in some later version of FFT, you issued some sort of error message pronouncing the drive as a fake. Some sort of "time-out" function could trigger such an error message. A screen shot of that error message submitted with a request for refund would likely eliminate a lot of arguing.

    ReplyDelete
    Replies
    1. During the read back session, it will display any errors it finds. If it finds a lot it will abort. If you don't see any errors reported then it appears to be passing! No idea why it is so slow though - reads are usually much faster than writes!

      Delete
    2. After about 36hrs I gave up: it still sat at 60%. Also, I rebooted the machine and after the reboot, I was prompted to re-format the drive. I decided to format it as NTFS rather than exFAT and I will try running FFT again when I spare the machine for a day or more.

      Delete
  14. FYI: When trying to publish a reply here, your "Captcha" verification shows pictures but never tells you what you are supposed to select. (This could be a bug in Firefox 71)

    ReplyDelete
    Replies
    1. My bad: I didn't see the scroll bar which allows me to scroll up to see the question

      Delete
  15. Looks like I'm not the only one; I bought a "1Tb flash drive". Using the latest version of Fake Flash Test I tried the quick test. It tested to 95% in only a few minutes and then (claiming 27 seconds remained to complete the last 5%), it just stopped. The light inside the flash drive continued to flicker so I gave it another 15 minutes or so. Nothing. I aborted. Now the drive is unformatted. I am attempting to format it as I write this using the HP USB Disk Storage Format Tool. I'm hoping it will format it to it's true parameters. If not I will probably try a partition management program. If that doesn't work it's H2TestW for the slow win. Is there another version of Fake... in the works that will provide more info as to the status of the tested drive?

    ReplyDelete
  16. I also have this problem. The test reaches 95%, then stalls and the test never ends properly. After it has been stuck at 95% for a while I see that FAKEFLASTEST.exe CPU usage jumps from zero to 25% and stays there.
    Why is this, and is there a solution to this problem?
    Thanks.

    ReplyDelete
    Replies
    1. It is a typical symptom of a fake flash drive. Each sector write returns an error and Windows will retry with a long timeout on each retry. Hence the very long wait.

      Delete
    2. I understand. Why does FAKEFLASTEST.exe CPU usage jump from zero to 25%?

      Delete
    3. FakeFlashTest just makes a write-sector or read-sector call to Windows. The Windows driver is then responsible to write/read the sector and wait for the flash drive to respond. The driver may be polling an I/O register waiting for a response or who knows what? FakeFlashTest just had to wait for the call to come back.

      Delete
    4. Thanks for your reply. I have dug deeper. Looking at Resources manager, cpu usage tab shows Fakeflashtest as not responding, and there is no Fakeflash entry under the disk tab process list. Fakeflashtest has been in this state for around 6 hours, and this is my third try today. Do you have any suggestions?

      Delete
    5. You can try a test program under Linux which has much better error handling with much shorter retry timeouts - or just throw the USB drive in the trash!

      Delete
    6. This 95% hang seems to be an issue. I don't have a Linux machine handy. I just bought 2 USB drives and 2 SDHC cards on ebay, and I need some test results to back up fake/not as described claims. I was hoping that Fakeflastest would speed tests up. Since it won't work for me I'll try alternative test software (H2testw if I am allowed to mention that here) and test just the first 40GB or so to speed things up. Anyhow, thanks for your help.

      Delete
    7. Sure- or just format it as NTFS and copy lots of very large video (mp4) files onto it.
      Then try to play each one.

      Delete
    8. I like Steve Si's answer: Just throw the USB drive in the trash! Hahaha Good program, mate.. I buy lots of cheap flash media and test it all before use. I return the bad, keep the good..

      Delete
  17. I bought a "2Tb flash drive". Using the latest version of Fake Flash Test I tried the quick test. It tested to 95% in about 30 mins and then it just stopped. So while I suspect capacity is overstated I'm really none the wiser......¯\_(ツ)_/¯ I do wonder though, if technology hasn't outpaced the usefulness of this particular test program

    ReplyDelete
    Replies
    1. Same for me 95% then stalls.
      But another program had same effect at 95%

      Delete
    2. Me too, 2TB usb drive (yeah right), took 35 minutes to get to 95% and then just freezes.

      Delete
  18. Hi im testing out a friends "2TB" drive from wish (yeah right) FakeFlashTest does 100% of the write but freezes at 30% of the read, left for about 3hrs and i have to end process.
    Any ideas?

    ReplyDelete
    Replies
    1. My 2T micro SD from the same source, FFT ran it all the way to 95% then hung. I was able to reformat it as either Fat32 or exFat in Explorer and showed it as 999.7 capacity. I'm just wondering how I discover it's actual size. Would the controller be replaceable?

      Delete
    2. You can fill it full of large video files and then try to play the last ones and first ones. 2TB SD cards are bound to be fake! Even if you find its true capacity, it will probably fail within a few weeks.

      Delete
    3. I think I'll try the refund angle from Wish.com. Appreciate your response and like the song says: I should'a known better!

      Delete
  19. rmprepus made a 120 gb usb unuseable. now i cant even format it. how do I format it if if now protected against writting.

    ReplyDelete
    Replies
    1. A common symptom of a fake/cheap USB drive is that it becomes faulty.
      Also make sure your Antivirus is not blocking writes to the USB drive.
      https://rmprepusb.com/tutorials/054-how-to-fix-write-protected-read-only-drives-and-sd-cards/

      Delete
  20. I'm having the same problem as many here: I've been running FakeFlashTest's quick size test for about 4 hours now, and I'm stuck at 95% reading. As the SD card is supposed to be a 512 GB one, I'm wondering if would be safe to just format it to, say, 400 GB and then try to run the test again. Is there any other way to know the real size of the device?

    ReplyDelete