Can I let my fake flash USB drive get its real capacity through low level format?

Solution 1:

Formatting will neither tell you the drive's true capacity nor set its reported capacity to the actual. Writes to all reported sectors will apparently succeed, so the /P option does not help.

As Bob said in a previous comment, these drives re-use the same blocks over and over again. They do not exactly wrap around as this would soon corrupt the MBR and the partition table in block 0, resulting inj Windows complaining that the drive needs to be formatted. But they do allow writes to the non-existent space to succeed. And if you read back the data you just wrote, that'll work too, because reads to non-existent space are mapped to the same actual blocks as the writes were. But if you try to also read data you wrote earlier, you'll get data that you wrote later, even though you thought they were being written to different sectors.

In normal use the symptom is that when you put "too much" data on the drive, the file system metadata becomes corrupt. (But usually not the partition table, as the scumbags who made these things were clever enough to not re-use the first few blocks.)

Sorry, but you can't "low level format" a USB drive. There are just aren't any commands in the USB mass storage class to request a low level format. Nor, btw, can you "low level format" a SATA or PATA ("IDE") drive. Consumer "low level formatting" was possible with ST506 and ESDI drives, not SCSI or ATA. Again, there just aren't any commands in the SCSI or ATA command set that would let you do it. Low-level formatting is actually done and tested at the factory, before the platters are assembled into the final drive.

To have your fake USB drive report its actual capacity (assuming you would want to trust it even then; I wouldn't) you would have to rewrite the device's firmware. This is almost certainly not possible from the USB interface either.

To find out what the true amount of storage is, there is a tool called h2testw from heise.de. It writes a unique pattern to each block, and after each write, checks some of the earliest blocks written to see that they still contain the pattern it originally wrote. This detects fake drives very quickly. (And, RPL, this will provide the "reference" you asked for.)

You will probably find that the drive's true capacity is so small that it is not worth bothering with.

Solution 2:

You might try f3 (Fight Flash Fraud) toolset for Linux.

Run f3probe first to check the real drive size, then f3fix to create a partition which is just as big as the usable size. Afterwards test the partition well (f3write/f3read).

Solution 3:

How can I determine how much space it really has?

On Windows, use the tool h2testw. It's hosted on a german website called heise.de and you can find the direct download link here: h2testw.zip. It's easy to use. Open it up, select the drive, and hit start. You can find more information about it on this site. It will also perform a read/write speedtest.

On Mac or Linux, you can use the great alternative: F3.
You can most likely get it from your repo (sudo pacman -S f3 on arch, sudo apt-get install f3 on debian/ubuntu) directly.

It's usage is pretty simple. You have to mount the partition of the USB drive somewhere, let's say /media/usbd. Then cd /media/usbd into the directory and run f3write ./ until it finishes. This will write as much data as it can (should be 64GB in case of a fake 64GB USB drive that in reality is 8GB).
Afterwards, run f3read ./ in the same directory, it will now attempt to read back the data but fail after 8GB in our example. At the end, you will get a summary. This will also include read/write speeds.

Another way to do it using f3 is by using the f3probe command. From it's --help text:

Usage: f3probe [OPTION...] <DISK_DEV>
F3 Probe -- probe a block device for counterfeit flash memory. If counterfeit,
f3probe identifies the fake type and real memory size

In order to find out your disk device, you can run lsblk, then run f3probe /dev/sdX, replacing X with your drive's letter found out by lsblk.

Can I format it properly if I can get the above answer?

I wouldn't bother with that because...

Should I just return it and not try to salvage it?

...you can clearly expect this USB drive to be very faulty much sooner than a decent drive. Just ask yourself: If these manufactures would use high quality components, would they sell it at a fake capacity instead of selling genuine, high quality USB drives?

I've had several of these drives because it's basically free 8GB drives, so I thought when I was young (you get fully refunded if you buy on a reputable site). I've been setting up a partitiontable that would make me able to use just the ~7.4GB that were real, and then format those as FAT-32 and use them. They all broke within months of using. They'd end up not being detected by any OS at all.


Conclusion: If you ever find a too good to be true deal for a USB drive above 8GB capacity, always check it first. If it's fake capacity: Don't even bother. Get your money back and return it or throw it away. Unless it's a cute novelty USB drive, then do like me and keep it as a cute keychain or desk decoration.