The memory card suddenly became “read-only”, and Android gives the error “The disk is write protected”? This problem is familiar to many users, especially after a firmware update, incorrect ejection of the drive, or failures in the file system. In 90% of cases, protection can be removed independently - without contacting a service center and without losing data. But it is important to act consistently: from simple methods (checking the physical switch) to complex ones (working with ADB or low-level formatting).

In this article we will examine 7 proven methods removing write protection on microSD, SDHC and SDXC cards - from basic to advanced. We will describe how to determine the cause of blocking (hardware or software), what tools you will need, and what to do if standard methods do not work. We will separately dwell on the nuances for different versions of Android (from Android 6.0 Marshmallow to Android 14) and popular brands (Samsung, Xiaomi, Huawei).

We warn you right away: if the card is physically damaged (for example, after a fall or contact with water), software methods will not help - professional data recovery will be required. For the rest, cases, follow the instructions below.

1. Checking the physical protection switch

The most commonplace, but often overlooked reason is the mechanical one Lock switch on the side of the card. Most SDcards have it (except microSD without an adapter). If the switch is moved to the “Lock” position (usually down, closer to the contacts), the card is automatically locked for writing.

How to check:

  • 🔍 Remove the card from the phone and inspect its side edge. On the adapter (if you use microSD), the switch is on the right.
  • 🔄 Move the slider up (to the “Unlock” position). If it is jammed, carefully pry it with your fingernail or a plastic card.
  • 📱 Insert the card back into the phone and try to write a file (for example, take a photo or copy a document).

If there is no switch (as on most microSD), or moving it did not help - the problem is software. Proceed to the next method.

📊 What type of memory card is yours?
SD (full size)
microSD (with adapter)
microSD (without adapter)
Not I know

2. Formatting a card through Android settings

If the card is detected by the phone, but does not allow you to record data, try formatting it directly in Android. This method will work if the blocking is caused by a file system failure (for example, after an incorrect extraction). Attention: formatting will delete all data from the card!

Instructions for Android 8.0+:

  1. Open Settings → Storage (or Memory).
  2. Find the section SD card or Removable storage and tap on it.
  3. In the upper right corner, click on the three dots (⋮) and select Storage settings.
  4. Tap FormatClear and format.
  5. Confirm the action. Once completed, the card will be ready for use.

On some devices (Samsung, OnePlus), the path may differ: Settings → Device care → Memory → SD card → Format.

Save important data from the card to your PC or cloud

Check the battery charge (should be >30%)

Close all applications working with the card

Make sure the card is not used as internal storage (Adoptable Storage)

-->

If the formatting option is grayed out or the “Card is write-protected” error appears, go to the next method.

💡

On some firmware (for example, MIUI from Xiaomi) after formatting the card needs remove and reinsertfor the changes to take effect.

3. Using the command line (DiskPart) on a PC

If Android refuses to format the card, connect it to the computer and use the utility DiskPart (built into Windows). This method allows you to remove protection even from “stubborn” drives that are not recognized by the phone.

Step-by-step guide:

  1. Connect the card to the PC via a card reader. If you use your phone as a USB drive, enable the mode File transfer (MTP).
  2. Run Command Line as administrator (click Win + XTerminal (Administrator)).
  3. Enter the commands in order (after each press Enter):
    diskpart
    

    list disk

    select disk X (where X is the number of your card, see by size)

    attributes disk clear readonly

    clean

    create partition primary

    format fs=fat32 quick

    exit

  4. After completion, remove and insert the card back.

Critical! Be careful when choosing a disk (select disk X). If you specify the wrong number, you will format another drive (for example, a hard drive).

Command Description
list disk Shows all connected drives with numbers and volumes
attributes disk clear readonly Removes the read-only attribute
clean Clears the partition table (data will be lost!)
format fs=fat32 quick Quick formatting in FAT32 (for cards up to 32 GB)

If after these actions, the card is still protected, try repeating the process, but instead fat32 specify exfat (for cards >64 GB).

What to do if DiskPart does not see the card?

If the card is not displayed in the list of disks (list disk), try:

1. Connect it through another card reader or USB port.

2. Check in Device Manager (click Win + X → Device Manager), whether it is displayed as “Unknown device” with yellow exclamation mark.

3. Update driver: right click on the device → Update driverAutomatic search.

4. Low-level formatting using SD Formatter

Standard Windows or Android tools do not always cope with “broken” cards. For deep cleaning, use the official utility SD Memory Card Formatter from SD Association. It restores the drive's factory structure and removes software locks.

Instructions:

  1. Download the utility from official website (select the version for your OS).
  2. Connect the card to the PC via a card reader.
  3. Run SD Formatter on behalf of the administrator.
  4. In the field Drive select your card (check by drive letter!).
  5. In the section Formatting Options select:
    • 🔄 Quick Format — quick formatting (if the card is not severely damaged).
    • 🛠️ Overwrite Format — complete rewrite (to restore “bad” sectors).
  • Click Format and wait for completion.
  • If the utility displays the “Write Protected” error, return to method c DiskPart and repeat clearing the attributes (attributes disk clear readonly).

    ⚠️ Attention: Low-level formatting (Overwrite Format) takes significantly longer (up to several hours for large cards) and reduces the resource of memory cells. Use it only if other methods have not worked.

    5. Resetting the card as an internal storage (Adoptable Storage)

    Starting from Android 6.0 Marshmallow, memory cards can be used as internal storage (function Adoptable Storage). In this mode, Android encrypts the card and blocks access to it from other devices. you previously activated this option, and now you want to use the card as a removable drive, you need to “unmount it”.

    How to do this:

    1. Go to Settings → Storage.
    2. Tap on the name of your card (for example, SanDisk 64GB).
    3. Click on three dots (⋮) → Storage settingsFormat as external (or Portable storage).
    4. Confirm the action. The card will be formatted and become writable.
    5. If the option is not available or an error appears, try resetting the card via ADB:

      adb shell sm list-disks
      

      adb shell sm partition disk:X,Y private (where X,Y are the identifiers from the previous command)

      adb shell sm set-force-adoptable true

      ⚠️ Attention: After reset Adoptable Storage all data from the card will be deleted, and applications installed on it will stop working. Before the procedure, save backup copies.

      6. Checking for viruses and malware

      It is rare, but it happens that write protection is installed by viruses that have entered the card through infected files. For example, Trojans like Android/Simplocker block access to the drive and demand a ransom. If you have connected the card to other people's devices or downloaded files from unreliable sources, check it with an antivirus.

      How to check:

      • 🛡️ Connect the card to the PC and scan it Kaspersky Virus Removal Tool or Dr.Web CureIt! (free utilities).
      • 📱 On your phone, use Malwarebytes or the built-in scanner (for example, Google Play Protection in Settings → Security).
      • 🔍 Pay attention to files with suspicious extensions: .exe, .apk (of unknown origin), .js.

      If the antivirus finds threats, delete them and try writing again. If the card is still blocked, the virus could damage the file system - in this case, only full formatting will help (see methods 3-4).

      7. Checking the card for physical damage

      If none of the methods worked, the card may be physically damaged. Signs of hardware faults:

      • 💥 The phone or PC does not detect the card at all (not displayed in Device Manager).
      • 🔥 The card heats up when connected.
      • ⚡ When you try to write, the device freezes or reboots.
      • 📉 The reading/writing speed has dropped tenfold (you can check it with the utility CrystalDiskMark).

      What to do:

      • 🔧 Try connecting the card through another card reader or USB port. If it is detected, the problem is in the phone connector.
      • 🔄 If the card sometimes “disappears” when recording, check the contacts for oxidation (carefully wipe with an eraser).
      • 🛠️ To restore data, contact a laboratory (for example, ACE Lab or Hetman Recovery).Independent repair attempts may aggravate the damage.

    If the card is detected, but is not formatted in any way, its memory controller has failed. In this case, recovery is only possible with the help of professional equipment (for example, PC-3000 Flash).

    ⚠️ Attention: Do not use cards with physical damage - this may lead to loss of data on the card. device to which it is connected (for example, due to a short circuit).

    FAQ: Frequently asked questions about write protection on memory cards

    Is it possible to remove write protection without losing data?

    Yes, but only if it is locked software (for example, due to a file system failure or a virus). Try:

    1. Check the physical switch Lock.
    2. Scan the card with an antivirus.
    3. Use utilities to restore access (for example, HDD LLFT or TestDisk).

    If the card requires formatting, the data will have to be saved to another drive before the procedure.

    Why does the card become read-only again after formatting?

    This is a sign hardware. wear or damage to the controller. Possible reasons:

    • The card has exhausted its resource (especially important for cheap ones microSD without overwrite protection).
    • The memory controller is damaged due to overheating or a power surge.
    • The card contains bad blockswhich the system automatically blocks.

    Solution: replace the card with a new one (we recommend brands SanDisk, Samsung, Kingston with a guarantee).

    How to remove protection on a card that the phone sees, but the PC does not?

    Possible reasons:

    1. The phone uses the card as internal storage (see method 5).
    2. The card reader or USB port of the PC is faulty (try another port or adapter).
    3. There are no drivers for the card reader on the PC (update them via Device Manager).

    If the card only works in the phone, copy the data from it to the internal memory, then format it through the Android settings.

    Is it possible to use a write-protected card in the phone?

    Yes, but with restrictions:

    • 📷 You can read files (view photos, videos, documents).
    • 🚫 It is impossible save new data (install applications, take photos, download files).
    • ⚠️ Some applications (for example, cameras or instant messengers) may display errors when trying to access.

    For full use, the protection must be removed.

    Why did the card become “read-only” after updating Android?

    This is a known problem when upgrading to new versions of Android (especially from Android 9 to Android 10+). Reasons:

    • Access rights to removable media were reset.
    • The system automatically encrypted the card as part Adoptable Storage.
    • The storage drivers were updated, and the old file system (FAT32) has become incompatible.

    Solution: format the card via PC or reset settings exFAT via PC or reset settings Adoptable Storage (method 5).