[One (M9) Q&A, Help & Troubleshooting] Mafaka:
Hi All,

I'm not sure how I managed to do this but I think I bricked my phone :(

My bootloader was unlocked and the phone was rooted. I wanted to bring the phone back to stock in order to be able to install an OTA update.

I flashed the stock ROM and was able to install the OTA update.

After this I ran into a problem where the phone would boot and upgrade apps then right before finishing the boot it would reboot and start the process all over again. Looping everytime that the upgrade apps would finish.

Log story short I ended up restarting the process of going back to stock to try everything from scratch again. Things were not working so I foolishly relocked the bootloader thinking it wouldn't be an issue to unlock again with the unlock_code.bin file that I had used previously.

Now the phone will boot into the bootloader and into download mode but not into recovery.

Ive tried flashing the stock recovery and the TWRP recovery and even the recovery from the OTA update but none will flash as the bootloader is locked.

I tried to unlock the bootloader again but cannot and here is the reason why.

The bootloader thinks my OS is 5.1 but really the OS on the phone is 5.0.2

C:\Users\Dan\Desktop\HTC One\One M9>fastboot getvar all

(bootloader) kernel: lk

(bootloader) product: htc_himaulatt

(bootloader) version: 1.0

(bootloader) imei:

(bootloader) version-main: 2.11.666.2

(bootloader) boot-mode: RUU

(bootloader) version-baseband: 01.02_U11440601_77.04.50715G_2_F

(bootloader) version-bootloader: 1.0.0.0000

(bootloader) mid: 0PJA11000

(bootloader) cid: BM___001

all:

finished. total time: 0.033s

Software number on my phone is 1.32.666.30 but version-main is 2.11.666.2

Fastboot oem unlock does not work as the bootloader is looking for a flag that is set by selecting the developer option of unlock bootloader but that developer option only exists in android 5.1+

Being as the OS on my phone is 5.0.2 I don't have that option in my developer options.

When I boot into RUU with "fastboot oem rebootRUU" and I try to flash my stock rom I now get this.

C:\Users\Dan\Desktop\HTC One\One M9>htc_fastboot flash zip 0PJAIMG.zip

sending 'zip'... (94347 KB) OKAY

sending time = 5.298 secs

writing 'zip'... (bootloader) HOSD CL#579410

(bootloader) ERR [SD_UPDATE_ERR] Main version NOT ALLOWED

(bootloader) ERR [SD_UPDATE_ERR] sddownload failed: 19

(bootloader) ERR Update zip file failed.

(bootloader) ERR ZIP ERROR, exit read zip loop

(bootloader) ERR ZIP signature checking failed...

(bootloader) Update zip file OK

(bootloader) ERR ZIP ERROR CODE, 19

(bootloader) end@Done

FAIL19: fail to flash via downloadzip

FAILED (remote: 19: fail to flash via downloadzip)

Execution time is 10(s)

I found a tool called misctool which can change the main version to whatever I choose - If I could change the main version back to 1.32.666.30 I'm assuming this would allow me to flash the stock ROM again and get me back up and running.

The problem is that misctool requires root and I cannot get root without unlocking the bootloader which I cannot unlock because the OS on my phone does not have the option to do so :(

I read about using nautilus within ubuntu to be able to push files into root areas of my phone and have tried to go this route but I cant get my phone to appear in ubuntu while its in download mode.

Sigh if only I could find a way to get root to be able to change the version-main I think my troubles would be a thing of the past :(

Can anyone shed any light on my dismal situation?