Frank's Random Wanderings

SD Card Locks Don’t Lock

Here’s a little known fact about SD Cards. The little “lock” switch on the side of the card? It doesn’t lock the card.

sd-card

This is a photo of a pretty typical SD card. On the left you can see the “lock” switch. You’d think that sliding this switch downwards, into the locked position, would write-protect the card. You’d be wrong.

I first stumbled across this fact on vacation, where at an internet cafe I ended up with a virus on a “locked” SD card.

The lock switch does nothing to the internals of the card. There is no switch or any electrical mechanism in the card. That switch is nothing more than a movable piece of plastic. The card itself has no idea whether the switch is in the locked, or unlocked, position.

In your card reader is a mechanism which senses the position of that lock switch, and reports its position back to the PC. The PC, ie the operating system or file manager in the PC, then has the option, if it so chooses, of not writing to the card if it knows the lock switch is in the locked position. However, it can just as easily ignore it. Electrically, there is nothing preventing it from writing to the card. This is what a virus can easily do. If there is a problem with your OS or file manager program and it ignores the switch position, it too will happily write to a “locked” SD card.

So beware. Don’t assume your card is safe simply because the switch says it’s locked. The card can still be written to, re-formatted, the card contents erased, etc. Accidents most certainly can happen, even though the switch is “locked”. It’s not locked, it’s never truly locked, so treat your card, and its contents, with all appropriate due care & respect. I’ve no idea why the people who designed the SD card implemented a lock switch that doesn’t lock, but they did, and we’d be wise to remember that little fact.

5 thoughts on “SD Card Locks Don’t Lock

  1. Jack C.

    For Jake: One would assume the camera would give card-write errors if the pictures weren’t being saved, but apparently not in your case. Easy enough to test again, with the switch in both positions.

  2. Sam

    Hmm… I wonder if I could make create a custom SD card driver so to bypass the lock that the computer sees.
    It would be mildly useful, but beating the system is always fun!

  3. Nomic

    Glad I found this!
    I wanted an SD card to save contents on and not have it erased by mistake.
    Got a Mirco SD and when the SD adapter switch did not lock I assumed it was a switch fault.
    Next tried an ordinary SD card and it too will not lock (allows writes).
    Spend hours Googeling lots of nonesense such as about covering up the hole (?) in side side of the card.
    bought a new SD card …same issue.
    Thank you for making me fell I am not going mad and the switches are not at best unreliable!

  4. frank Post author

    The photos are almost certainly there. I’ve often seen cameras simply ignore that lock switch, so they’ll record to the card even though the card is “locked”. If your computer can’t read the card, try a different card reader. You can also try viewing the photos from your camera to verify they really are on the card.

  5. Jake

    I recently took over 300 pictures and videos on my lumix camera, i noticed that the sd card was in the locked position. My computer did not read anything on the sd card. I put it back into my camera and it won’t recognize it now. Would the pictures and videos still be on the card even though I took all the pictures in the lock position?

Leave a Reply

Your email address will not be published. Required fields are marked *