[One (M9) Q&A, Help & Troubleshooting] PropertyCO:
I'll try my best to be as detailed as possible.

I have an HTC One M9 from Sprint. Custom rom on it, I believe it was either Viper Rom or BadBoyz. Running a TWRP PRE 3.0 recovery.

My phone had a pattern lock screen.

I had let the phone sit for about a month with out use, after which I attempted to turn it back on to use it, what I got was a continuous HTC loading screen. So I'm thinking no big deal, all I gotta do is boot into recovery and reflash it.

I boot into recovery, It won't format a number of partitions (I.E. data, system, cache) to allow the flash.

I follow instructions in this video: [YOUTUBE]X7yDPszoQ5s [/YOUTUBE]with no luck, still won't flash.

So after a few hours of research and attempting different versions of twrp and cwm, it no longer has a bootable recovery. any TWRP 3.0 and up wouldn't run at all, no CWM recovery would run.

My understanding is that those partitions were encrypted and pre 3.0 for twrp can't handle the encryption or some such. I flash a few different versions, going from pre 3.0 to post 3.0, with post 3.0 still not booting but pre 3.0 booting.

THEN

After trying to flash back to a pre 3.0 twrp, it acts as it takes it, but when i go to boot into recovery i get:

"Failed to boot to recovery mode"

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash recovery C:\Users\PropertyCO\twrp.img
target reported max download size of 800000000 bytes
sending 'recovery' (36288 KB)...
OKAY [ 3.063s]
writing 'recovery'...
(bootloader) HOSD CL#695981
(bootloader) start@1
(bootloader) recovery@100%
(bootloader) Update partition OK
(bootloader) end@Done
OKAY [ 2.562s]
finished. total time: 5.629s

is what fastboot returns, yet it won't boot to recovery.

So, my next attempt was to run an RUU.

RUU_HIMA_WHL_M60_SENSE70_SPCS_MR_Sprint_WWE_3.41.651.41

I run it, starting with my phone in download mode, RUU sees it just fine, goes to reboot into bootloader. with out assistance when it reboots it just brings up a metalic HTC logo and sits there, so when it reboots i'll hold volume up and down to get it to the boot loader. after some processing from the RUU it gives me the error 170 - USB connection error. Me thinking it's either some drivers messing it up or the cable, i try another laptop, and a series of different cables, no luck there.

I find out that I have to have the bootloader locked to run a RUU, so I attempt to relock the bootloader to see if that fixes the error.

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem lock
...
(bootloader) [KillSwitch] : /dev/block/bootdevice/by-name/frp
(bootloader) [KillSwitch] Last Byte is 0X01, enable unlock
(bootloader) RELOCK device
OKAY [ 0.286s]
finished. total time: 0.287s

phone reboots, i force it into bootloader cause it doesn't automatically go to it, still says "*** UNLOCKED ***" up at the top.

fastboot getvar all:

(bootloader) kernel: lk
(bootloader) product: htc_himawhl
(bootloader) version: 1.0
(bootloader) imei: XXXXXXXXXXXXXX
(bootloader) version-main: 3.41.651.4
(bootloader) boot-mode: download
(bootloader) version-baseband: 3.00.C1144084@60114
(bootloader) version-bootloader: 1.0.0.0000
(bootloader) mid: 0PJA20000
(bootloader) cid: SPCS_001
all:
finished. total time: 0.048s

Thanks in advance!

Edit:

Attempted the ZIP method in this forum and failed too:

https://xdaforums.com/showthread.php?t=1928439