[One (M9+) General] drgutman:
fixed - see at the end

So like an idiot I managed to wipe everything from the phone, now it just freezes during boot screen. I've successfully rooted it (Installed TWRP and SuperSU) but decided I want to go back to be able to OTA update. I don't know what I was thinking but I wiped everything from the phone without backing it up :eek: Now I'm stuck with no OS and unable to flash anything on it.

***RELOCKED***
htc_hiau_ml_tuhl PVT S-ON
LK-1.01.0000
OpenDSP-UNKNOWN
OS-1.90.401.3
mid: 0PK711000
cid: HTC__J15

I've tried to flash RUU 1.90.401.3 from fastboot but I get

target reported max download size of 800000000 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 2434584755 is not a multiple of the block size 4096
sending sparse 'zip' (0 KB)...
error: write_sparse_skip_chunk: don't care size 2434584755 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 2434584755 is not a multiple of the block size 4096
OKAY [ 1.028s]
writing 'zip'...
(bootloader) HOSD CL#670935
FAILED (remote: 9: SD_SECURITY_FAIL zip from usb command in download mode)
finished. total time: 1.088s

or

target reported max download size of 800000000 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 2434584755 is not a multiple of the block size 4096
sending sparse 'zip' (0 KB)...
error: write_sparse_skip_chunk: don't care size 2434584755 is not a multiple of the block size 4096
FAILED (command write failed (Invalid argument))
finished. total time: 0.031s

Then I tried some other RUU's (1.32.401.8 and 2.30.401.1) to no avail. I get the same error. I've read all the threads that I could find here about people who can't flash their RUU, I've searched the interwebs for fixes to "Invalid sparse file format" error and could find anything to make it work. I ended up relocking bootloader and now I can't even enter recovery mode.

I don't know what to do anymore so, I'm asking here maybe someone else knows what I should do and guides me. After two days I don't care about the root or the twrp, I just hope I didn't bricked it for good :crying:, just want to go back to factory settings and make it work.

Thanks.

[edit]

I've unlocked the bootloader again and tried installing the same RUU's from sd with twrp but as soon as I swipe right it restarts twrp and nothing happens.

[edit2]

I've found a fastboot.exe which works with big size zip-files in this post https://xdaforums.com/showpost.php?p=73241261&postcount=1367 (thanks ziand_)

Now I get some other errors

C:\adb>htc_fastboot_3.0.9.2 flash zip \adb\x\HTC_Europe_1.90.401.3.zip
htc_fastboot v3.0.9.2 (2015-05-29)
found large-zip header, file count: 8
processing file 1/8...
sending 'zip' (78987 KB)...
OKAY [ 4.555s]
writing 'zip'...
(bootloader) HOSD CL#670935
(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
FAILED (remote: 19: fail to flash via downloadzip)
finished. total time: 10.500s
htc_fastboot finished. total time: 21.965s

I'm guessing that I'm using the wrong RUU for my phone

I'll canvas the[RUU]M9+ RUU file by xiaolongzi maybe I'll find the answer there

if anyone could tell me what I'm doing wrong it would be really neat.

[edit3]

***FIXED***

*probably

I flashed one of these stock firmware recoveries

https://xdaforums.com/one-m9+-me-e9+/one-m9-general/firmware-stock-recoveries-regions-t3120826

and after that

htc_fastboot_3.0.9.2 oem rebootRUU

htc_fastboot_3.0.9.2 flash zip HTC_Europe_1.90.401.3.zip

after that it rebooted just fine, I even managed to make the official update to marshmallow

so, yeah, good job me :good:

[/edit]