[Galaxy S 5 General] Shipwreck65:
My turn to give back to the community that has helped me here....

First the legal mumbo jumbo.... Disclaimer: Do This At Your Own Risk - I Am Not Responsible For Your Devices And My Lawyer Is Bigger Than Your Lawyer.

If you're having problems with your extrenal SD card in TWRP or any other app not seeing it (or TWRP seeing it but showing 0 capacity), or seeing it but not being able to do anything with it (this includes having problems copying things to it or formatting it in Windows) then this post is for you. I had these problems with several external SD cards after using them with TWRP.

I searched here to try and find a solution to my problems and found this thread:

https://xdaforums.com/note-4-verizon/help/mount-sd-card-twrp-t3365103

There were a couple of posts that did help some, but did not help others who ended up having other issues that weren't mentioned.

Below I have listed the problems that were brought up in the above linked thread, as well as several other problems that I personally ran into but couldn't find a solution for. For each problem I have listed the solutions under them. Read through each problem and then try the solution. If the solution doesn't work for you then go to the next step. You can also scroll through the problems to find the specific error or problem you are having and try the solution. Specific errors are in bold text.

!!!! WARNING !!!! ALL OF THESE SOLUTIONS WILL FORMAT YOUR EXTERNAL SD CARD, AND YOU WILL LOSE EVERYTHING ON IT. IF YOU NEED ANYTHING ON THE CAR AND CAN COPY THE CONTENTS DO SO BEFORE USING THESE STEPS.

The "Unable to complete the format" &"Disk is write protected" error/problems, while trying to format a local disk or an external/removable drive (e.g. an SD media card or a USB flash disk or a USB external drive, etc.) means one of the following:

1. The disk is write protected (Read-only) and you haven't permission to change/delete/modify the files on the disk or even to format the drive.

2. The file system type on the disk is in RAW format and it is not recognized by Windows.

3. The file system on the drive (disk) is corrupted – unreadable.

4. The drive has a physical damage.

Step 1. Remove the USB/SD Write Protection using the UNLOCK switch.

– Some USB flash drives and media (memory) cards (SD/SDHC/SDXC) have a hardware Write Protection switch on their surface. So first of all, check if your device has this security switch and if it does, put this switch to UNLOCK (OFF) position to remove the write protection.

(e.g. If your card is a mini SD card, then insert your card into the SD adapter and change the position of the write-protection switch to OFF position).

Step 2. Disable the USB/SD Write protection in Registry.

Remove the write protection using registry.

1. Open Registry editor. To do that:

1. Simultaneously press the “Win” and “R” keys to load the Run dialog box.

2. Type regedit and press Enter to open Registry Editor.

IMPORTANT: Before you continue, first take a backup of your registry. To do that:

From the main menu, go to File & select Export.

Specify a destination location (e.g. your Desktop), give a filename to the exported registry file (e.g. “RegistryUntouched”), select at Export range: All and press Save.

2. Navigate (from the left pane) to this key: *

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

* Note: If you don't have the 'StorageDevicePolicies' folder, then right-click at the 'Control' folder and select New > Key. Name it StorageDevicePolicies

3. At the right pane double click to open the WriteProtect key. *

* Note: If you don't have the 'WriteProtect' key, then right-click on an empty space (at the right pane) and select New > DWORD (32-bit) value. Name it WriteProtect

4. Type 0 at value data box to disable the storage write protection. *

* Note: If you want to enable the write protection in the future, put this value to 1.

5. Close Registry Editor.

6. Restart your computer.

7. Open Windows Explorer, right-click on your USB drive and select Format. If the format still fails, then continue to the next step.

Step 3. Repair corrupted/damaged or RAW file system with the DISKPART tool.

By using the below procedure in DISKPART utility you 'll be able to fix file system problems and to eliminate the "disk write protected" error message when you are trying to format the USB/Memory drive.

1. Before you continue, unplug all other working removable drives (USB disks, Memory cards, etc.) from your computer.

2. Open an elevated command prompt window by going to:

In Windows 7 & Vista:

Start > All Programs > Accessories

Right-click to “Command prompt” item and choose “Run as administrator”.

In Windows 10, 8 & 8.1:

Right-click at the screen's bottom-left corner and from the pop-up menu, choose “Command Prompt (Admin)”.

3. Then launch the DISKPART tool (at the command prompt when you launch it just type diskpart) and give the following commands in order (press Enter after typing each of them) to resolve the write-protected error and to fix the corrupted file-system on your problematic HDD, USB disk or Memory card.

Note: If you receive the following error after executing the "diskpart" command, then probably your disk is damaged and you have to replace the disk.

" DiskPart has encountered an error: The request could not be performed because of

an I/O device error. See the System Event Log for more information."

4. At DISKPART command type:

list disk

5. From the listed disks, find out which disk is the problematic disk. You can easily find out which is the problematic disk in the list from its size in GB (Gigabytes).

6. Then select the problematic disk by typing: *

select disk <DiskNumber>

* Note: Replace the "<DiskNumber>" with the number assigned to the problematic drive.

7. Type the following command to clear (remove) the Read-Only attributes (write protection) on the selected disk:

attributes disk clear readonly

8. Then remove the partition on the selected disk by typing:

clean

9. Then create a partition on the selected disk by typing this command: *

create partition primary

* Note: If after executing the above command you receive the following error message, then try the following methods to resolve it :

" No usable free extent could be found. It may be that there is insufficient free space to create a partition at the specified size and offset. Specify different size and offset values or don't specify either to create the maximum sized partition. It may be that the disk is partitioned using the MBR disk partitioning format and the disk contains either 4 primary partitions, (no more partitions may be created), or 3 primary partitions and one extended partition, (only logical drives may be created)".

Method 1.

1. Type these commands in order:

1. select partition 1

2. active

2. Continue to format the drive (Step 10).

Method 2:

1. Clean all partitions (it takes a long time) on the disk by typing this command: clean all

2. After DISKPART cleaning, create a partition on the disk by typing: create partition primary

3. Continue to format the drive (Step 10).

Method 3:

1. Reboot your computer in Safe Mode.

2. Log in to Windows with an Administrator account.

3. Open Windows Explorer, right-click on your USB drive and select Format.

10. Finally format the disk in FAT32 file system by giving this command.*

format fs=fat32

* Notes:

1. If you want to use the disk in a Windows computer then format it in NTFS file system, by giving this command: format fs=ntfs

2. If you receive the following error after executing the format command: "DiskPart has encountered an error: Access is denied. See the System Event Log for more information.", then:

a. Close command prompt.

b. Restart your computer.

c. Log in on your computer as Administrator.

d. Open Computer Management > Disk Management.

e. At the right pane: Right click on the disk and select Format.

f. When the format is completed you can use the disk normally. (Ignore all other steps listed here).

11. Wait until the format operation is completed (this procedure takes a long time) and then type exit to close the DISKPART tool.

12. Close the command prompt window.

13. Remove your sd card and place it back in your phone, reboot/enter recovery and mount your external storage.

You should now see the full available storage space.

14. If you can see your phone when you plug it into your computer (you have a working system on the phone) just plug the phone into the USB port and copy files you need as normal. If you can not see your phone when you plug it into your computer (no system on the phone) then just put the SD card into a slot on the computer (if you don't have SD card slots used a USB SD card adapter) and copy the files that way and then put the SD card back into your phone.

I hope this helps.