Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Alereon
Feb 6, 2004

Dehumanize yourself and face to Trumpshed
College Slice
You can't recover data from SSDs because on most systems a TRIM command is sent to actually erase the flash blocks that previously held the file. The same thing does not happen on most USB drives or memory cards so you CAN recover the data unless it has been overwritten, just like a harddrive. Some tools/utilities are aware of this and will intentionally overwrite files when deleting them, however.

Phones used as external storage will TRIM their own eMMC internal storage, but not any microSD card inserted. If some of the internal storage is mapped as /microsd it will get TRIMmed so data will not be recoverable after deletion.

Edit: Actually some modern USB flash drive chipsets do support TRIM now, so I would say there's a good chance that data may not recoverable from USB 3.0 flash drives.

Alereon fucked around with this message at 20:47 on Nov 10, 2014

Adbot
ADBOT LOVES YOU

Alereon
Feb 6, 2004

Dehumanize yourself and face to Trumpshed
College Slice
From a data recovery perspective, TRIM and overwriting a file on flash memory are very similar: the mapping between the logical block and the physical flash page is broken, and the physical flash page is marked as garbage in the drive's page table. The difference is that in an overwrite a new mapping is immediately made to a clean flash page that is then written to, after a TRIM this doesn't happen until that logical block is next written to. At this point the original data is still sitting there in the flash page marked as garbage, but there's no way to ask the drive for it because there are no logical blocks mapped to that page.* Pages marked as garbage are periodically erased (garbage collected) when the drive has a chance, but this happens over seconds to minutes, so the data isn't sitting around hours later even if nothing else changed on the drive. Actually erasing the flash memory immediately doesn't shorten lifespan at all because at that point it unavoidably needs to be erased before it can be used again, doing it sooner rather than later just means you don't have to wait for that erase before you write data again. That's the performance benefit of TRIM, it lets the drive keep the free space actually free, in terms of erased physical flash.

Drives without TRIM behave a lot like harddrives, in that deleting a file doesn't affect the mapping between the logical block and physical flash pages, the drive knows nothing about what you did with the Recycle Bin. Only when you go to overwrite the file does the drive go "oh well if he's overwriting it he must not need it anymore!"

*This does mean that if you have low-level access to the flash or controller you could theoretically retrieve the data during the brief window between when it was marked as garbage but before the garbage was collected.

  • Locked thread