After installing LineageOS 17.1 on my Xiaomi Redmi Note 7, the wizard offered me to use my sd card either internal or external storage. None of the options work. If I select internal, the wizard crashes, if I select external, it goes through but then ask me later the same thing "SD card is uncompatible, do you want to format it as internal or external ?" etc.
So I tried to repair or wipe it through TWRP recovery, and it gives me "Error code : 1". TWRP shows the external SD is 0Mb. I don't know if it means it's detected and corrupted, or maybe not detected at all.
Then I tried to put my microSD card in an SD card reader in my Windows 10 Thinkpad T420, and it doesn't even show up. I read several threads here and there. I already tried to use partitionning tools (3 of them), but the SD card doesn't show up there either. No "blank" partition shown or even a drive letter appearing. Nothing.
I tried Play Store apps that could fix it but it was impossible.
I was wondering if I can repair/fix/reset/erase SD card so it will show at least my 32Gb blank partition on my laptop.
I'm able to use fastboot/adb shell or any command line solution.
I saw a solution using "parted" but it doesn't come included in TWRP, I should flash an old recovery, not recommandable I think.
EDIT : What I additionnaly tried.
Rooted my phone, and tried to use Aparted app, failure.
Tried from diskutily on my mac, "last block couldn't be written"
Tried on command line using
diskutil erase on my mac, failure.
Tried filling the SDcard with
cat /dev/random and then formatting.
Created a GPARTED USB live. The SDcard finally appeared after several times in/out but resulted with "impossible to create partition table"
Everything results with different code errors, depending on the machine (Windows, linux, OSX, Android...), I'm getting scared that the SDcard definitely died.
Thanks in advance for your answers.