author avatar
    Senior Program Developer
 

Summary
Learn how to remove write protection from an SD card and recover data. SD cards are versatile, compatible with various devices like cameras, multimedia players, and computers.



how to unlock sd card

I. About SD card write protection

The purpose of SD card write protection is to safeguard the data’s integrity. Not only does it prevent unauthorized access or alterations to the SD card’s content, but it also helps prevent the storage of virus-infected files. There are multiple methods for enabling write protection on an SD card, such as using the card’s write protection switch or configuring it as read-only on a computer. If you are unsure how to disable SD card write protection, the following section provides guidance.

II. How to remove the write protection of the SD card?

1. Turn off the write protection switch of SD card or card reader

SD cards and card readers often come equipped with a write-protect switch. If you encounter difficulties trying to copy, modify, or store new data on your SD card, you can attempt to disable the write-protect switch on either the card or the reader itself.
Turn off the SD card write protection switch
If the write protection switch is turned off, but the SD card is still in the write protection state, you can try the following methods.

2. Use the diskpart command to clear the read-only attribute of the SD card

Step 1: Connect the SD card to the computer through a card reader, enter (cmd) in the search box, right-click (command prompt), and select (run as administrator).
run as administrator
Step 2: Please follow the given instructions and enter the following commands one by one, pressing the (Enter) key after each line of input:
diskpart
list disk (will list all disks in the computer)
select disk 1 (1 indicates the disk number of the SD card)
attributes disk clear readonly (Clear the read-only attribute of the disk)
exit (quit)
diskpart clear read-only attribute
Kind tips
The prompt “Diskpart failed to clear disk attributes” (Diskpart cannot clear disk attributes) may appear after entering the (attributes disk clear readonly) command. This could be due to the physical write protection switch of the SD card still being closed. You can check this article Turn off the SD card write protection switch. Another possible cause could be a bad sector or file system error on the SD card. In this case, you can use the Windows error checking tool to diagnose and repair the issue.

Diskpart cannot clear disk properties

3. Remove write protection in the registry

There are write-protected settings in the registry, which can prevent all external devices from writing any data. Here are the steps to remove write protection in the registry:
Step 1: Press (Windows key + R) at the same time, enter (regedit) and click (OK).
windows Key + R
open registry editor by running regedit
Step 2: Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
Step 3: Double-click on “WriteProtect” and change its value from 1 to 0 to remove the write protection. After that, please restart the computer.
StorageDevicePolicies
Kind tips If you do not find the WriteProtect value in the registry, you can try to disable the (Removable disk: Deny write permission) setting in the local group policy editor.
If you’ve exhausted all other methods and still can’t remove the write-protection from your SD card, it’s possible that the card has reached the end of its lifespan or has been infected with a virus. Certain viruses, like CARDK Trojan and WannaCry, are known to lock entire SD cards. In the case of a virus, it’s recommended to use anti-virus software on your computer to scan and remove the virus before you format SD card. If you do end up formatting the card and realize important data is missing, there are ways to recover it.

III. After formatting, how to restore the data in the SD card?

When we format the SD card for some reasons, we can use some data recovery software to recover important data. The following will introduce a very practical data recovery software – Renee Undeleter , which supports multiple scanning modes and supports Windows and MacOS.

1. What is Renee Undeleter?

Renee Undeletere is a software specially used to restore system data files. When you accidentally delete important files, empty the recycle bin, or format the disk/storage, you can use this tool to retrieve the lost data. The software covers four functional modules, including file recovery, format recovery, partition recovery and image creation, which can help you solve all data loss problems in an all-round way.
Hot Topic - ADsRenee Undeleter – Simple & Powerful Software for Data Recovery

Easy to use Recover data by 3 steps;

Multiple scan modes Fast partition scan, whole partition scan and whole disk scan;

Supported file types Image, video, audio, text, email and so on;

Image creation Create a partition image to read and back up data;

Supported devices SD card, SDHC, SDXC, USB flash drive, hard disk and computer.

Easy to use Recover data by 3 steps;

Multiple scan modes Fast partition/whole partition/whole disk scan;

Supported devices SD card/USB/hard disk.

Free TrialFree TrialFree Trial 800 people have downloaded!

2. How to use Renee Undeleter to recover SD card data?

Step 1: Connect the SD card to the computer through a card reader. Download, install, and run Renee Undeleter. Select the (Whole Partition Scan) option on the main interface.
Note: Do not install Renee Undeleter in the disk where data is lost to avoid data overwriting.
select whole partition scan in renee undeleter to recover deleted video from sd card
Data recovery function introduction:
Fast Partition Scan – Quickly retrieve files lost due to accidental deletion or emptying the recycle bin.
Whole Partition Scan – Quickly recover files lost due to inaccessible or formatted partitions.
Whole Disk Scan – Analyze and get partition information and perform a full scan of the entire partition.
Image Creation – You can create a mirror image for a partition to back up the current partition state.
Step 2: Next select the SD card partition and click (Next).
Renee Undeleter Whole Partition Scan
Step 3: Please wait for the scan to complete, as the duration of the scan will vary depending on the size of the SD card memory. While the scan is in progress, you can preview the files by double-clicking on them. If you have located the file you wish to recover, simply select it and click on the (Recover) button. This will terminate the scan and initiate the file recovery process. Alternatively, you can wait for the scan to finish, review the scan results for the files you want to recover, and then click on the (Recover) button.
Note: It is recommended to save the recovered files in other partitions instead of the original SD card to avoid data overwriting.
preview and select the files to recover in renee undeleter
If you still cannot recover the data through the above steps, the lost data may be overwritten or the SD card is damaged. Please check this article SD card repair method.