#1
  1. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351

    Destroy the data on an SD card without damaging the card itself?


    Ok, here's the deal. The MicroSD card in my phone has somehow turned into a sort of a time capsule or something. No matter what I do to it, it reverts to the state it was in around 11/25 of this year. If I add files, rename files, delete, move, append, overwrite, or even format the whole thing and install a new filesystem, everything appears to be working. Putting new files on the card allows me to view the files after creation, rename them, move files and see them in the new location, etc. When I unmount the card and remount it, everything goes back to the way it was. I've tried everything I can think of, as has my tech team. The card appears to be permanently stuck in this configuration but still reacts as a valid filesystem. Somehow it has stopped having the ability to permanently record what happened to it in the non-volatile part, and all current changes are volatile.

    That's not the problem though. I got an RMA number and everything's fine for getting my replacement. However, the card contains many files of sensitive nature. Emails (personal and work), photos, chat logs, password reminders, bank statements, cell phone bills, all kinds of crap are stored on my SD card. The question is: how can I nuke those files from the card before sending it back to the manufacturer to be RMA'd. Remember, I can't simply cut the card in half because my RMA would be invalid. I need to kill these files in such a way that it doesn't LOOK like I intentionally broke it, but still renders the card unusable.

    Formatting the card in 3 OSes did nothing. The card spent the last 36 hours sandwiched between neodymium magnets to no effect. Next step, unless you guys can think of something, is sticking it in the microwave for 5 seconds.

    Any ideas?
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    875
    Rep Power
    275
    have you tried using DD to fill the drive completely full of random data, maybe even several times?

    I don't see why microwave wouldn't work, but, I'd be afraid of some melting of the plastic maybe taking place.
  4. #3
  5. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,387
    Rep Power
    1871
    Is it preserving entire file contents through a format, or just a directory structure?

    Flash memory has a finite number of write cycles before it gets 'stuck' in a pattern.

    A file system needs a root directory structure in an easy to find place on the storage medium. There's probably only a small number of places that are cycled through, and when it stumbles into the 'stuck' root structure, your file system reverts to the past.

    On a Linux/Unix system, you could try either of these commands (as root)
    The first will fill a device with an all bits set pattern, and the second fills it with zeros.
    cat /dev/zero | tr '\000' '\377' | dd of=/dev/sdc
    cat /dev/zero | dd of=/dev/sdc
    Make absolutely sure of the device name of your SD card (written as /dev/sdc in the examples). If you pick the wrong device, you'll lose the lot.

    But is it really worth the effort for a $30 item?
    I mean, how much time has been spent on it so far, not to mention the security risks if erasure is less than total.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,072
    Rep Power
    9398
    Dan's not replied?

    Tried dd already to no avail - it still keeps reverting to the old data. The weird (though surely explainable) part is that the files look correct after, but come a remount the changes are gone.
  8. #5
  9. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    sorry, yesterday was our company christmas party, which went from noon to 4am.

    I have tried dd'ing random data with small block size all over the disk, issuing a `sync`, formatting to a new filesystem, another `sync`, writing it full of data, another `sync`. At this point the NEW files are available on the card and can be modified, viewed, etc. I then removed the card and reinserted. The old files came back.

    The card is only 5 months old and I don't do whole-card-rewrites very often, if at all. The physical space on the card shouldn't have had more than 5-6 writes per block over the life of the card.

    The files themselves are still present, so it's not only the filesystem that's the problem. The whole card has been frozen.

    It's a $75 card, so I'm reaching the tipping point of the cost-benefit graph of getting this done.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo