Check the physical lock switch on the SD card adapter and slide it to unlock
Reinsert the SD card and try again
Clean the SD card contacts gently and retry
Use Diskpart on Windows:
Open Command Prompt as administrator
Type `diskpart`
Type `list disk`
Type `select disk X`
Type `attributes disk clear readonly`
Type `exit`
Use Disk Utility on macOS:
Open Disk Utility
Select the SD card
Click First Aid
Erase and reformat the card if needed
Remove write protection using Registry Editor on Windows:
Open `regedit`
Go to `HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlStorageDevicePolicies`
Set `WriteProtect` to `0`
Restart the computer
Check for file system errors and repair the SD card
Format the SD card if data recovery is not needed
Try the SD card in another device or card reader
Replace the SD card if it remains write-protected
