I see lots of questions about recovering data from corrupted SD card formatted as internal storage, that's not my case. I want to FORMAT this SD card to be able to use elsewhere.
For some reasons the card become read-only so it is impossible for me to make any changes. While on the phone I tried to switch the card from internal memory to external. It didn't work. The only option I had was to forget the card, and so I did. Now even with gparted on linux, I'm not able to format the card. I tried also to change the permits with
sudo chmod -R 777 /dev/sdb
and other different commands like
sudo mount -o remount,rw /dev/sdb
all without luck.
What else can I do? It seems impossible to reset this card.
Ps. the lock on the SD adapter is in the correct position
edit1: I've used sudo badblocks -wsv /dev/sdb
no errors found, but not luck, the partitions are still there (here how to use badblocks https://wiki.archlinux.org/index.php/badblocks). The process took around 10 hours for a 64Gb card.
edit2: after asking help to bunsenlabs.org these things came out. At the moment I can't try them because I don't have the hardware required but my gut and my common sense tell me that it's the right path.
links:
https://github.com/Nephiel/sdlocker-tiny
https://github.com/BertoldVdb/sdtool
sudo mount -o remount,rw /dev/sdb