Removing protection bit from micro SD card?

pete_c

Guru
I have an issue here with microSD cards. 
 
One is running Ubuntu 16.04 and the other running Jessie.
 
Both are 16Gb MicroSD cards.  I cannot write to these cards anymore or format them.
 
They boot up fine in Ubuntu or Jessie.  I have low level formatting this and nothing happens.
 
Is there some program that I can use in Linux or Windows that removes the protection piece of the SD card.
 
It acts as if the tab is moved to being non writable except that the tab is in the position of being writable. 
 
Been trying to fix these two cards in Ubuntu and Windows with no solution yet.
 
Found an SDTool program that runs in Linux or RPi which is supposed to unlock the card.  It didn't work.
 
Looked up the warranty on the Samsung Evo microSD cards and the warranty is 10 years.
 
Went to the website and filled in an RMA / attached pictures to get two new cards.  Very good service.
 
Noticed yesterday that Amazon only carries 3rd party sellers Samsung Evo Micro SD cards.
 
Originally purchased a few a couple of years ago from Amazon.  First one that I purchased didn't work and Amazon sent me another one.  The two that I am returning were manufactured in the Philippines and South Korea.  I have switched over to SanDisk  microSD cards.  (personally they are slower than the Samsung cards).  Here utilize 16Gb cards for RPi's and my Pine64.  32Gb cards for my Windows micro PCs.
 
Here is a short tutorial and software on:
 
SD Card Write protection
 
Most SD cards have a physical write protection switch. This switch is read by the reader instead of being enforced by the card. Of course, many readers ignore this signal and will happily write to a write protected card. Furthermore, Micro SD cards do not have a mechanical switch.
 
It is relatively unknown that SD/MMC cards also have an electronic write protection system. Every card has two programmable flags, one for temporary write protection and one to lock the card forever. Writing these flags is not supported by most SD host devices. To remedy this, this page presents a program that allows a Linux host to configure the protection register.
 
Usage is simple:

$ ./sdtool device command

where device is the raw MMC block device (eg. /dev/mmcblk0) and command is one of the following:
  • status: Show current write protection setting.
  • unlock: Disable write protection.
  • lock: Enable temporary write protection.
  • permlock: Enable permanent write protection.
  • reset: Send go_idle_state command to all cards on the MMC bus (usually only one). This can sometime restart a stuck card without power cycling the card and host. Make sure it is unmounted first.
Note that you must be able to access the MMC device directly. Some SD card readers connect over USB and export a Mass Storage Device (ex. /dev/sda), which cannot be used. Preferably, you need an SD card reader that is connected directly to the CPU bus. This is commonly the case on embedded systems and laptops. You can check this by doing:

$ ls /dev/mmcblk*

If you see some devices you are good to go.
 
You can find precompiled static binaries (AMD64 and ARM) in the static directory. The ARM binary has been verified on a Raspberry Pi B+ and Orange Pi Zero. The AMD64 binary is for standard PCs and has been tested on a Dell Latitude e7270.
 
I've attached the RPi and Linux 64 bit tool.  Very plug n play. 
 
View attachment SDTool.zip
 
The RPi installs always partition the microSD card and it is hard to detect and hard to undo.
 
Look for this free software.
 
MiniTool Partition Wizard
 
Thank you Larry.
 
Yes been using Partition Manager Wizard now a few years.
 
In Linux use GParted.  GParted does not deal well with the FAT16 boot partition on the RPi.  Partition manager works better with it.  I have been able to manually redo the FAT16 boot partition to FAT32 and have it boot fine playing around some with it using GPARTED.  It is more like an EFI boot partition a bit.
 
Relating to setting the protection permilock above the microSD card will be unwritable and unlockable.
 
To bring closure to this post.
 
Around August 8, 2017 I had opened an RMA request on two Samsung Evo 16Gb micro SD cards.  Both of these cards become locked.
 
Samsung did not send me the return labels for sending this cards back to them around August 8, 2017.
 
I called twice afterwards.  Second call resulted in an immediate email with fedex return labels.  I sent the two Micro SD cards back.
 
Yesterday recieved two new 32Gb (sort of too big for me) Samsung Evo cards.
 
I currently have many of these 16Gb microSD cards.  The issue I had though was that I could not update the software on these cards.
 
I just copied / imaged these cards over to a working microSD card and was good to go.
 
pete_c said:
To bring closure to this post.
 
Around August 8, 2017 I had opened an RMA request on two Samsung Evo 16Gb micro SD cards.  Both of these cards become locked.
 
Samsung did not send me the return labels for sending this cards back to them around August 8, 2017.
 
I called twice afterwards.  Second call resulted in an immediate email with fedex return labels.  I sent the two Micro SD cards back.
 
Yesterday recieved two new 32Gb (sort of too big for me) Samsung Evo cards.
 
I currently have many of these 16Gb microSD cards.  The issue I had though was that I could not update the software on these cards.
 
I just copied / imaged these cards over to a working microSD card and was good to go.
The 32GB SD cards may be faster than the 16GB although they seem to group the latest few sizes  by the same technology. Usually newer is better anyway.
 
They probably don't make the 16GB units anymore. :)
 
Yes; here sort of standardized on the 16Gb cards for my Rpi (or RPi like builds) and used 32Gb cards for my mini intel pcs.
 
Back
Top