SD won't encrypt or decrypt or work after removing phone battery I removed my phone battery when the phone was on without turning it off first, my SD card was encrypted, so now I cannot access my SD card contents on my phone while phone detects the SD card.

Moreover, when I turn my phone on, encryption page shows after boot, giving me the option to encrypt or decrypt the sd card and selecting either encrypt or decrypt won't do anything.

So how can I decrypt my SD card and access my data?

My phone uses android version 6
First, apparently, the phone thinks that the SD card is in the middle of encrypting/decrypting so it will not allow access to SD card while not encrypting/decrypting the SD card either.

to remedy this I removed a .MetaEcfsFile on my SD card using my computer, after removing this my phone now thinks that the SD card is not encrypted.

Second, I encrypted my already encrypted SD card, the reason that this will not corrupt my data is that starting with Android 5, android uses fast encryption that will only encrypt edited blocks, so enabling encryption will not encrypt your files the second time if you don't change them.

From source.android.com:


  Full-disk encryption was introduced to Android in 4.4, but Android 5.0
  introduced these new features:
  
  
  Created fast encryption, which only encrypts used blocks on the data    partition to avoid first boot taking a long time. Only ext4
  and f2fs    filesystems currently support fast encryption.
  


Last, after encryption you decrypt the SD card, android now decrypts the whole SD card not just changed blocks and you can access your files.

I also observed that removing the pattern and lock screen will not make your SD card data inaccessible.