[One (M9) Q&A, Help & Troubleshooting] Kyanote:
Hello.

I got my M9 after releasing and then rooted, changed rom quick, was quite time ago so I actually don't remember good how I did all in details - yes, I'm noob.

3 days ago I was trying to upgrade my android from 5.1.1 to 6.0, after failing flashing roms from twrp 2.8.6.0 I have read that this update need to get upgraded firmware too. I had 2.10.401.1 (2.10.xxx.x for sure) and wanted make it 3.35.401.12 or 3.35.617.12 as I needed, through adb console. It failed, so tried putting old one (2.10.xxx.x) but it failed too. Tried to flash recovery back (TWRP.img) at least to let me install old rom or any, to make phone boot - failed too. Then I have read about S-OFF/ON thing, maybe I flashed my old firmware when it was still free and now just ... it up? Now I see that I can't flash (or I just don't know how) via adb with S-ON.

The problem is, firmware may be broke, rom may be broke (don't know what those FAILS in terminal meant exactly but recovery and boot got broke) and I can't make S-OFF to even let me flash something via adb, so I stuck on bootloader. I left with *** Security Warning ***, RELOCKED and S-ON.

The code from CMD after trying flashing recovery (TWRP.img):

C:\Program Files (x86)\Minimal ADB and Fastboot>adbdevices
List of devices attached

C:\Program Files (x86)\Minimal ADB and Fastboot>adb reboot bootloader
error: device not found

C:\Program Files (x86)\Minimal ADB and Fastboot>adb devices = profit
Usage: adb devices [-1]

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot devices
HT535YJ01315	fastboot

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash recovery twrp-2.8.6.0-hima.img
target reported max download size of 800000000 bytes
sending 'recovery' (35928 KB)...
OKAY [ 2.652s]
writing 'recovery'...
(bootloader) HOSD CL#549783
FAILED (remote: 9: SD_SECURITY_FAIL recovery and bootloader isn't BL_UNLOCK)
finished. total time: 3.672s

Tried out even htc_fastboot:

C:\adbfastboot>htc_fastboot flash recovery twrp-2.8.6.0-hima.img
sending 'recovery' (35928 KB)... OKAY
writing 'recovery'... FAILcannot flash this partition in s-on state
FAILED (remote: cannot flash this partition in s-on state)
Execution time is 812(ms)

Status of bootloader is RELOCKED and I can't do "fastboot oem identifier_token" again, cause my phone isn't listed under "adbdevices" (but under "fastboot devices" something appeared), if I'm not wrong of course, because "fastboot reboot" works fine. It giving me code like that (making token try):

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem get_identifier_token
...
FAILED (remote: unknown command)
finished. total time: 0.010s

I can't see anymore my phone in My Computer, can't browse it, since month. But I hear the sound by connecting. See it as My HTC in Device Manager (now I have installed Koush’s Universal ADB Driver and it's showed as HTC Android Interface but still can't browse it). HTC Sync Manager popping up when I connect phone but it says, no phone connected.

The question is how I was able to broke firmware/recovery boot, since I have S-ON and bootloader is RELOCKED, my phone wasn't on adb devices list also, so if I was able to is there way to boot anything again? I can't find anything new to try out neither answers.

Trying to fix it 3rd I have no more ideas.

Thanks in advance for any help.