[HTC One S] AKToronto:
For those who may be flashing ROMs, cannot mount the SD Card any more, and may have accidentally corrupted their SD Card, here are some helpful steps.

Preliminary Review - Check to see if you can mount in recovery or bootloader

First, go back to your bootloader screen and click on fastboot (reset your phone and hold the power and vol down button). Once in bootloader check your computer drives to see if the sd card is recognized

Your computer may be able to recognize the drive even if it cant open it. If thats the case, you may be able to format it from your computer (use FAT32 formatting).

Second, If you cannot see your SD Card in your ROM or from the PC, and you are using Clockwork Recovery (CW), try flashing TWRP recovery first. Do this by going through the following steps:

Step #1

Download TWRP recovery from http://teamw.in/project/twrp2/100 Make sure to download the correct version for your device

Step #2

Place the recovery file into a folder with fastboot.exe

Step #3

Reboot your phone and hold down the Vol Down Button and Power Button until your bootloader screen appears, then enter fastboot. Then connect to your computer. I find this method works best by holding down the buttons right away. If your phone is off, press the power button then immediately press and hold the power and vol off buttons again until bootloader screen shows up. Dont let go until the screen shows.

Step #4

Type

fastboot flash recovery twrp.img

but replace the twrp.img wording with the exact name of your downloaded TWRP recovery

Step #5

Enter TWRP recovery by selecting it from your bootloader screen. Then ensure the device is connected to your computer and select the Mount option and then mount your sd card.

IF you still cant see your SD Card from TWRP recovery or you get an error, proceed to the next steps. Your computer may be able to recognize the drive, even if it cant open it (if your lucky).

If your computer recognizes the drive but cant open it, you can try formatting it from your computer (make sure to format as FAT32)

If you really cant see your SD Card, and your fairly sure its corrupted, and you have no way formatting it from your computer, continue on below:

Basic Solution

Reflashing Stock Recovery to your device using fasboot, then doing a full factory reset. This would be using the method in post http://xdaforums.com/showthread.php?t=1630459

PLEASE NOTE THIS METHOD WILL WIPE THE DATA FROM YOUR DEVICE AS WELL AS FROM YOUR SD CARD

This method works because custom recoveries cannot re format SD Cards on the HTC One S, only wipe data from them. However, the stock recovery does have a proprietary feature that will reformat the internal sd card if it has been corrupted.

Inotherwords:

Step #1

Download the stock recovery from: http://loadbalancing.modaco.com/download.php?file=ville_recovery_signed.img

*******Note that this file is a stock recovery for S4 devices, not S3.

Place the file into the same folder as your fastboot.exe

Step #2

On your device, go into bootloader and fastboot mode, connect your computer to the device, and type

fastboot flash recovery ville_recovery_signed.img

Step #3

Reboot into the bootloader and then choose to "clear storage" from the main screen and afterwards reset to factory defaults.

Step #4

Go back into the bootloader once step #3 is done and enter fastboot, connect your device and reflash your original custom recovery again. Your SD Card should be visible

Advanced Solution - If you do not want to wipe the data from your device

This method does not require reflashing the original recovery and factory reseting the whole phone. However, it still means that the info on your sd card will be lost. It also needs a rooted device.

This method does not require you to access your bootloader or use fastboot. You can do this while having your phone in custom recovery.

DO NOT ATTEMPT UNLESS YOU FEEL COMFORTABLE WITH THE INSTRUCTIONS. THERE ARE ALWAYS RISKS WITH FORMATTING. DO NOT HOLD ME RESPONSIBLE FOR BRICKED DEVICES. YOUR DEVICE IS LIKELY OUTSIDE OF WARRANTY ALREADY SINCE YOU WOULD HAVE UNLOCKED THE BOOTLOADER.

I have taken this solution from HTC One X forums namely from post 17 at http://xdaforums.com/showthread.php?t=1647806&page=2

However, I have also confirmed (SneakyGhost's partition list for HTC One S) that the correct mmcblk0p for the HTC One S sd card is mmcblk0p36.

Step #1: Download the version of busybox listed below, unzip it and also put this in the folder with ADB before you get started. You only need to do this if you dont already have busybox installed on your HTC One S. Sometimes this busybox file can be found under /system/bin or /system/xbin if youve previously installed it. If so, replace the paths in the instructions below for that of your busybox. If you have busy box already installed in /system/bin , then you do not need to type in the paths since the adb shell automatically picks up programs in that folder

Step #2: Go to your command prompt in the folder with adb.exe . Connect your HTC One S to your computer and type

adb devices

and ensure your computer sees your HTC One S. This command should work even if you are in a custom recovery like TWRP or CW (but for gods sake, if your on CW, the first thing you should do is flash TWRP, but thats just an editorial opinion, lol).

Step #3: Type

adb push busybox /data/local/tmp

This pushes busybox to a temp folder on your HTC One S. Make sure you are pushing the busybox file and not the zip file. If you already have busy box installed you do not need to do this step. (you can delete it from this folder later if you like)

Step #4: Type

adb shell

to get into your linux shell. Then type

su

to get root access. Your command prompt should now be a # and not $.

Step #5: Type

chmod 755 /data/local/tmp/busybox

to fix permissions for busybox. You may not need to do this if you already have busy box installed with the correct permissions. If these instructions dont work with your version of busy box, try setting the permissions with this code but replace the path with the location of your busybox.

Step #6: Type

cat /proc/partitions

and just ensure you see mmcblk0p36. This is the sdcard partition for HTC One S

Step #7:Type

/data/local/tmp/busybox mkfs.vfat /dev/block/mmcblk0p36

Make sure you type this correctly. You dont want to format the wrong partition accidentally.

That should work. Pls let me know if it doesnt. If it doesnt work with your version of busybox just try using the one in the zip file below. Also remember, dont just push the zip file. Extract the busybox file from the zip and push that to your device instead.

Also, it may help to use adb through a custom recovery instead of being in your ROM (ie if it doesnt work when your phone is booted normally, try doing the steps with recovery loaded).

There are other methods to try too They would be:

Other Solutions

Other Method #1: Relocking your bootloader and using a compatible RUU with your phone. This will fully wipe your device

Other Method #2: If your computer sees your sdcard even if it cant open it when your device is connected, you can try formatting it that way (ie the way you would format any other drive on your computer)

Only use the busybox method if you are comfortable with it and if other methods have failed. You can learn more about the formatting command (ie mkfs.vfat) by googling it.