I've done a bit of research and I've heard of the SD card end-of-life behavior (not really sure what else to call it) where SD cards and microSD cards make themselves read-only to avoid data loss. When I first heard of it, I thought it was terribly clever. Now I'm not so sure.
Some background: I had a microSD which lasted 2 years of heavy raspberry pi use before putting itself in write-protect mode. I used dd to move the whole os and filesystem onto my replacement card. Within a few days of usage, I realized that this card had write-protected itself too. I thought I had terrible luck, until my second backup card did the same almost immediately.
This troubled me, so I've since let my raspberry sit off. But I've begun to wonder how the SD card knows to write-protect itself. If it keeps a count of the write-cycles, and I used dd to make an image of the whole disk, then I may have crippled my SD cards by tricking them into thinking they were old. But I can't find the implementation of the end-of-life behavior anywhere. Does anyone know how it works? I'd like to try to undo it but the write-protection seems to be implemented on a very low level. I can't even access the /dev/sdX using sudo.
If I'm right and it keeps some kind of write-cycle tally, this is more than a little frustrating. It means that the SD card hasn't actually died – it's just a precautionary measure. While this is nice, I'd like to use it all the way to actual death, as I'm making regular backups.
With that as my long-winded background, does anyone know how the end-of-life behavior is implemented, and is there any way I can undo an accidental triggering of the behavior?