Team Win Recovery ProjectOver the past few days, I’ve tried a couple of ROMs on my rooted HTC EVO 4G LTE, and in each case something was horribly wrong that nobody else on the planet experienced – from lockups at the HTC screen to bootlooping multiple times before a ROM would load, and even getting the message that I needed a password to decrypt my storage device.

Having never set a password with lots of experience flashing ROMs in my life, and generally knowing how these things should work, I finally sat down and discovered that the /data partition would not mount via command line or under the mounts menu in TWRP recovery.

A factory reset or three later, and a reboot, /data still was unmountable, and I discovered that it appears that factory reset doesn’t work on a damaged /data parition. After a little bit of searching, I discovered that was the cause of getting the message “enter password to decrypt storage” on some of the ROMs I was flashing, and most likely the root of some of the instability issues.

In TWRP 2.6.3.0 under Wipe, there’s an Advanced Wipe menu. Go there and select Data, format the partition, and problems should disappear with bootloops, data partition mounting, etc. I’m not sure what the actual error was, whether I have a failing internal storage or if it’s just some random leftovers from a few ROM flashes (which I suspect to be the case), but the fix was relatively simple.

Other things to try are to factory reset from the bootloader as opposed to recovery, or running an RUU for a full factory restore. Unfortunately, I’m unable to re-test as the problem has been resolved since performing this process. My guess is that factory reset runs an rm command, which requires a successful mount, and the advanced wipe uses mkfs to format the partitions.