yashsingh1/xdaforums huggingface dataset:
[One (M9) Android Development] Mostafa Wael:
ah, but it really reduces the source of errors in commands, of course I don't want to exaggerate, but I want to thank you as being a provider at least :D

Anyways, I see the title ain't updated to latest 3.35.401.12 ;)
[One (M9) Android Development] Sneakyghost:
At work, no time for thread maintenance. Thanks for the hint. Will see to it tomorrow.
[One (M9) Android Development] mackster248:
I have the T-Mobile M9/S-off/CID 11111111 and I'm trying to flash the latest International firmware (3.35.401.12).

Sadly, I came across the "10 RU_MODELID_FAIL".

After reading the OP, it seems I need to unzip and rezip the firmware zip with the correct MID? Which I think is 0PJA12000. Sadly it's out of my knowledge on how to do that. I tried to look at post #5 on steps on how to achieve that. Does anyone here who had the same issue as me possibly have the fixed zip? That would be awesome. Thanks all.
[One (M9) Android Development] Sneakyghost:
Lazy bum. Unzip with 7zip, put your MID in the Android-info.txt with notepad++, zip again with 7zip using normal compression and the zip profile. Flash, done.

Get your MID: boot to bootloader, run my batch tool, the fastboot getvar all command. The output of that will contain your MID as well as other variables.

[EDIT]

android-info.txt gotta look like that after you edit it (I put in the TMUS MID and also the TMUS CID because I am not quite sure whether or not both are needed):

modelid: 0PJA10000
[COLOR="Red"]modelid: 0PJA12000[/COLOR]
cidnum: HTC__001
cidnum: HTC__J15
cidnum: HTC__102
cidnum: HTC__A07
cidnum: HTC__M27
cidnum: HTC__002
cidnum: HTC__032
cidnum: HTC__016
cidnum: HTC__031
cidnum: HTC__Y13
[COLOR="red"]cidnum: T-MOB010[/COLOR]
mainver: 3.35.401.12
hbootpreupdate: 3
nohardreset: 1
eraseonflash: system
eraseonflash: userdata
eraseonflash: aboot
eraseonflash: adsp
eraseonflash: boot
eraseonflash: cpe
eraseonflash: hosd
eraseonflash: hyp
eraseonflash: radio
eraseonflash: recovery
eraseonflash: rpm
eraseonflash: pmic
eraseonflash: sbl1
eraseonflash: sdi
eraseonflash: tz
eraseonflash: rfg_1
eraseonflash: sp1
eraseonflash: cota
erasepartition: ddr

I really don't want to do these things for you guys. I want you to learn how to do it properly.

The right tools to edit these zips are 7zip and Notepad++.

7zip because it has proven to be the only archiving program to handle zip's totally according to standards, I have never had a fail when doing it with that program. Of course you can use WinRar too but you better be careful - it made broken zips for me a-plenty. Settings are: Compression: Normal, Archive Format: ZIP.

Notepad++ is the best free text editor out there by far. It respects every kind of standard and happens to be set up correctly for android-info.txt formatting by default, so no further adjustments needed. It just handles Linebreaks correct, while Windows Notepad is notorious since it exists, for putting in wrong linebreaks.

ModelID can be put one per line or using wildcards (e.g.: 0PJA1****) - HTC uses WildCards in the DevEd firmware. The MID is also Case SEnSiTivE - stick to the original formatting in the text file.

CID can be put one per line or using wildcards, I believe (haven't seen CID Wildcards yet but I heard it works).

No spaces at the EOL (end of line)!
[One (M9) Android Development] Mostafa Wael:
Isn't the fastboot getvar all command should be run from download mode ?!
[One (M9) Android Development] Mostafa Wael:
Isn't the fastboot getvar all command should be run from download mode ?! I got my mid and cid from download mode ;)
[One (M9) Android Development] Sneakyghost:
Could be. I never remember until I do it myself. Just try either way and get the MID...
[One (M9) Android Development] mackster248:
Thanks for your help. Followed instructions then proceeded to flash it. Then I got a "22 RU_HEADER_HEADER" error. Something about not finding ZIP header. :/
[One (M9) Android Development] Sneakyghost:
Did you see the edit I made to the post you quoted? I've put some more info in that post so you'll have it easier. Error 22 is new to me too but the string is kind of self explanatory: every archive has a header where the archive-program finds info about what type of archive and what compression. If the error says anything about this header, the logical conclusion is either a corrupted, broken archive or an unsupported archive type.

I suspect the latter simply due to the fact that the zip was unpacked and repacked, which then easily creates an incompatible zip.

If you go back to the previous page you'll see my edit on how to properly zip the firmware files again.
[One (M9) Android Development] bartdeli:
I downloaded your Bath Tool. I connected my M9 (s-off, Viper 3.5) to upgrade my firmware, but the laptop cannot see my M9 when I type in cmd.

This is the first time I'm using this laptop with Windows 10. I can copy files between M9 and laptop, but when I type "Adb devices" the list of devices is epmty. Sometimes I get "list of devices attached. daemon not running. starting it now on port 5037. daemon started successfully" and nothing.

Never had problems with flashing and now this :(

Turned off firewall and antivirus but with no luck. Debugging mode on and off and still no luck.

Any ideas?

Edit: I followed your instructions from that post http://xdaforums.com/showpost.php?p=64484751&postcount=761

What now?
[One (M9) Android Development] dida1:
ok

here is what I did

I start the tool then choose to reboot to bootloader (6)

phone reboot to booloader

then I choose reboot to download RUU (7)

the gold HTC show up then I past the code fastboot flash zip Firmware_xx.zip

but nothing happened

phone stuck on htc logo

then I hold on power tell phone restart

did I missed any step

kindly could you provide step by step how to use this tool
[One (M9) Android Development] Mostafa Wael:
You should remove the underlined phrase and put the exact name of the firmware.zip file you downloaded
[One (M9) Android Development] bighleo114312:
I wanna flash 401.10 but I can't get to either download or ruu. If I type oem rebootruu it does but after 1 sec. It takes me to bootloader. And if I type reboot download takes to bootloader. I only have access to system which is t mobile latest and twrp

Enviado desde mi HTC One M9 mediante Tapatalk
[One (M9) Android Development] dida1:
I did that

Can you explain to me step by step

How to use this tool

Please
[One (M9) Android Development] Sneakyghost:
Tried with different cables? When I had my problems on the M8 and M9 before christmas (windows 10 on an old AMD based netbook) I faced all sorts of random issues from not working adb to not working fastboot to not working MTP... you name it. After I bought a very good cable with solid plugs, gold-plated for better contact, even my old M8 with dodgy usb port became fully accessible again.

Just saying...
[One (M9) Android Development] Dheyl:
Need help with error 99 SD_UNKNOWN. before you ask yes I am S-OFF.
[One (M9) Android Development] gregsarg:
Flashing from external storage ?

Fat32 format ??

If not external....post the error log....g
[One (M9) Android Development] Dheyl:
target reported max download size of 800000000 bytes

sending 'zip' (65297 KB)...

OKAY [ 4.109s]

writing 'zip'...

(bootloader) HOSD CL#556209

FAILED (remote: 99: SD_UNKNOWN_FAIL to flash via downloadzip)

finished. total time: 5.144s

S-OFF and bootloader unlocked. I've tried multiple Firmwares, but was only able to successfully flash the AT&T 2.6 Firmware no wipe with TWRP
[One (M9) Android Development] gregsarg:
You should not be flashing firmware with TWRP...

That is a fastboot command flash in download mode...

I believe the source thread for your firmware package explains this....

You likely have corrupted data from the TWRP flash....

You need to fastboot flash a complete RUU....to restore the correct data.....IMHO....g
[One (M9) Android Development] mackster248:
Again, thanks for your reply. Appreciate the help.

I edited that text and made it look just like the example you had along with the correct MID. As for re-zipping it, I opened up 7zip, selected the folder I wanted to zip then pressed the "add" button. I made sure the "Archive Format" was "zip" and made sure the "Compression Level" was at "normal". Left everything else as is then pressed OK.

Did I so something wrong in one of those steps?
[One (M9) Android Development] h4mmer4:
Still no luck here... odd since the adb reboot download command, option 1, works fine.

Any specific things I should check with the flash environment?

Using factory cable in htc download mode.
[One (M9) Android Development] Sneakyghost:
Go inside the folder where all the image files are.

Highlight all files including Android-info.txt.

Right-click the highlighted files and select 7zip --> Add to archive.

Choose the settings I told you.

Make sure it's only the firmware files in the zip, not /zip/somefolder/firmware files.

No folders in the zip.
[One (M9) Android Development] Dheyl:
I am using fastboot. Twrp was baked into the firmware I was attempting to flash.
[One (M9) Android Development] gregsarg:
Okay..

Then you were using fastboot....good.

Your post said you flashed with TWRP..so that threw me off..

You need an RUU to get back on track..

Fresh data will fix you up..g

Edit:

My advice is don't use a modified Aboot/Hboot...

Losing the red text is not worth the risk....IMHO

You are the 5th user this week with firmware flash issues related to "no red text"....firmware..

Not that flashing those won't work....but it's risky as you have discovered....

The M9 is NOT an easy device to deal with...

M8 and M7 were easy...but this device is a new animal...g
[One (M9) Android Development] Dheyl:
That was my next step. Will I loose S-OFF or re-lock my bootloader?
[One (M9) Android Development] gregsarg:
No....

Those areas remain untouched..g
[One (M9) Android Development] bigjailerman:
Hi guys, have a noob question. I have an M9 on 5.1 with Venom 3.5. S is off through Sunshine. Rom installed through TWRP. I want to upgrade to 4.1 and phone isnt picking it up as OTA for some reason. Can I just flash the 4.1 over 3.5 without issues? I was thrown off in the original post stating that I have to install M firmware first? Am I misunderstanding that? Also it said it is after the ROM download? Im sorry for a dumb question but which file is that?

Thanks for any assistance
[One (M9) Android Development] Sneakyghost:
http://xdaforums.com/one-m9/development/firmware-t3068243 Post #1 through to #5 have infos on how to flash your phone with new firmware and learn the bits and pieces you might need to know.
[One (M9) Android Development] mackster248:
Awesome, that worked!

Really appreciate you taking the time to help me out. :good:
[One (M9) Android Development] calikevin:
Does anyone have OTA zips with the new firmware for S-on yet that we know of?
[One (M9) Android Development] Sneakyghost:
Has HTC published their OTA yet for anyone but DevEd and Taiwan? No? Oh. That means no OTA for the ROW then. Patience. And this is also not the proper thread for it. Clearly says S-OFF only.

There is a HTC Update thread in general, which is 100% fitting for your question.
[One (M9) Android Development] SoLdieR9312:
I have the OTA from 3.35.401.10 to 3.35.401.12, but you would need a stock system backup to do the ota.. only way to update to mm firmware without s-off
[One (M9) Android Development] Sneakyghost:
Without the previous OTA from 2.xx to 3.35.401.10 that is quite useless, so I don't quite see the point in your post? Especially since it belongs to the HTC update thread? Maybe I am missing something here?
[One (M9) Android Development] SoLdieR9312:
Why would he need the previous? You can restore backup via twrp, and flash ota with stock recovery. I did this on m8 s-on before.

And yeah, its the wrong thread, i only wanted to answer his question.
[One (M9) Android Development] bigjailerman:
...So then other than the rom itself, the required firmware is the sneaky ghost zip and that gets installed first? Just verifying

Thanks
[One (M9) Android Development] Mostafa Wael:
You talking about MaximusHD 7.0.0 MM ROM on the M9 then I guess so. [MENTION=1102297]Sneakyghost[/MENTION] is there a difference between the 3.35.401.12_NoWipe.zip of yours and that one LlabTooFeR provided once he made his ROM available ? His firmware is named "unsigned_firmware" ... :eek:
[One (M9) Android Development] Sneakyghost:
Because with S-ON, OTA works only incremental. the .12 is made to update .10 and not the previous 2.xx version, is it? Maybe that's the part where I'm missing something...
[One (M9) Android Development] bigjailerman:
no I mean the venom rom. I have 3.5 amd want to go to 4.1
[One (M9) Android Development] Sneakyghost:
Explained in the first post. My zips are full, not incremental.
[One (M9) Android Development] darkenedpath:
[MENTION=1102297]Sneakyghost[/MENTION]....... just want to ask for knowledge, I flashed the latest developer firmware from your collection. When booting to recovery from system, or to download even, the old HTC RUU screen "black background with silver HTC logo" appears in between. Is that normal? Because I did have a connection issue, resolved it, the flashed the firmware successful. Sorry for a dumb question, or OT. Just trust you over anyone. Thanks.
[One (M9) Android Development] donmarkoni:
It is normal. HTC changed behavior. Don't worry...
[One (M9) Android Development] darkenedpath:
Not really worried.... just curious more or less. Had a error flashing it, then it threw that screen up. Works fine, just wondering if it was HTC like you mentioned.never know with them.
[One (M9) Android Development] rdnckreaper:
Maybe I am going crazy

Could someone point me in the direction of the firmware download for Andy M... I am new to HTC and have been samsung since the beginning so everything is like starting all over again and I am having a hard time finding the firmware file so I can update to M.
[One (M9) Android Development] sdamark:
Umm, did you check the opening page, second post? :confused:
[One (M9) Android Development] rdnckreaper:
Sorry for the waste of time... I am use to seeing the download links in the post and the Google Spreadsheet didn't even register to me...sorry for that.

EDIT: Because I have it unlocked from HTCDev I can flash the developer/unlocked version right? I have the ATT version.

I am sorry, like I said I am new to HTC and this is a completely different world than the one I just came from.
[One (M9) Android Development] bighleo114312:
Im one of those 5? I tried to flash no red text for my tmo m9, it did flash but now im not able to boot download mode or ruu mode. Im gonna sell my phone

Enviado desde mi HTC One M9 mediante Tapatalk
[One (M9) Android Development] xunholyx:
No. You need S-Off to convert your device to Dev Ed.
[One (M9) Android Development] rdnckreaper:
I want to say I went through that while I was unlocking and rooting it because I think I needed that to get TWRP and ViperOne 3.5 on my device....
[One (M9) Android Development] gregsarg:
Yes ...

I'm sorry to hear that you cannot recover the device.

Bad flashes do happen.....and at the boot partition level those flashes that fail can end up in a brick....or a partial one anyway...

Your device still boots.....so a recovery is possible...perhaps by ADB push of files...

The use of that method is above my skill set....but I do believe that you could find help from someone more familiar with the m9 partitions..

I bid you good luck....g
[One (M9) Android Development] rdnckreaper:
Just found out that I don't have S-off....then found out it is $25 for sunshine license code. so I guess I won't be getting the s-off today as I don't have the money in my account...lol

The weird thing is that when my phone boots up it has a disclaimer under the HTC logo that says the software is developer edition software. Does that mean I could continue forward without the S-Off?
[One (M9) Android Development] xunholyx:
That red warning comes up when your bootloader is unlocked. It doesn't say Dev Ed, it says you have a build meant for development purposes. It just means that your bootloader is unlocked and you can start hacking stuff onto it.
[One (M9) Android Development] rdnckreaper:
Oh okay...well I found a way to pay for the S-Off so I guess the flashing is about to commence....lol

---------- Post added at 01:22 AM ---------- Previous post was at 01:03 AM ----------

This is the error I get. It doesn't matter if I go through RUU mode or Download mode.

Microsoft Windows [Version 10.0.10240]

(c) 2015 Microsoft Corporation. All rights reserved.

C:\Android\com>htc_fastboot flash zip M9_3.35.617.12_NoWipe_TWRP2871b1.zip

htc_fastboot v3.0.9.2 (2015-05-29)

target reported max download size of 800000000 bytes

sending 'zip' (64357 KB)...

OKAY [ 4.746s]

writing 'zip'...

(bootloader) HOSD CL#496334

(bootloader) ERR CID not matched

(bootloader) ERR [SD_UPDATE_ERR] CID NOT ALLOWED

(bootloader) ERR [SD_UPDATE_ERR] sddownload failed: 7

(bootloader) ERR Update zip file failed.

(bootloader) ERR ZIP ERROR, exit read zip loop

(bootloader) Update zip file OK

(bootloader) ERR ZIP ERROR CODE, 7

(bootloader) end@Done

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

finished. total time: 6.877s

htc_fastboot finished. total time: 7.150s

C:\Android\com>
[One (M9) Android Development] gregsarg:
Your CID doesn't match the file you are flashing...

Read the first 2 posts of this thread..

Covered completely....g
[One (M9) Android Development] bigjailerman:
Im confused with this

For Error 42 "Wrong Customer ID" and: 41 "Wrong Model ID" do:

Code:

fastboot getvar all

Read that output, take note of your CID and MID and then edit the "android-info.txt" in your firmware.zip accordingly (For Wrong MID change the MID in the text, for wrong CID add your CID to the text).

Alternative method for MID and CID errors:

go SuperCID. Do:

Code:

fastboot oem writecid 11111111

My error is CID below

Microsoft Windows [Version 10.0.10586]

(c) 2015 Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Minimal ADB and Fastboot>adb reboot download

adb server is out of date. killing...

* daemon started successfully *

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem rebootRUU

...

OKAY [ 0.045s]

finished. total time: 0.050s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash zip M9_3.35.401.12_NoWipe_TWRP2871b1.zip

target reported max download size of 800000000 bytes

sending 'zip' (64357 KB)...

OKAY [ 4.081s]

writing 'zip'...

(bootloader) HOSD CL#576582

(bootloader) ERR CID not matched

(bootloader) ERR [SD_UPDATE_ERR] CID NOT ALLOWED

(bootloader) ERR [SD_UPDATE_ERR] sddownload failed: 7

(bootloader) ERR Update zip file failed.

(bootloader) ERR ZIP ERROR, exit read zip loop

(bootloader) Update zip file OK

(bootloader) ERR ZIP ERROR CODE, 7

(bootloader) end@Done

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

finished. total time: 6.211s

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

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

C:\Program Files (x86)\Minimal ADB and Fastboot>adb reboot download

adb server is out of date. killing...

* daemon started successfully *

error: device '(null)' not found

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem writecid 11111111

...

(bootloader) cid: 11111111

OKAY [ 0.064s]

finished. total time: 0.065s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot getvar all

(bootloader) kernel: lk

(bootloader) product: htc_himauhl

(bootloader) version: 1.0

(bootloader) imei: xxxxxxxxxxxxxxx

(bootloader) version-main: 2.10.709.1

(bootloader) boot-mode: RUU

(bootloader) version-baseband: 01.04_U11440601_71.02.50709G_F

(bootloader) version-bootloader: 1.0.0.0000

(bootloader) mid: 0PJA10000

(bootloader) cid: HTC__621

all:

finished. total time: 0.030s

How do I change the CID? where does that go?
[One (M9) Android Development] sdamark:
Really should not post your IMEI for everyone to see. Some may not be as honest as me....

I suggest you delete, or edit, that post.

All the questions you are asking are addressed in the opening page.

Read through carefully, it's all there.
[One (M9) Android Development] bigjailerman:
Another error is being thrown

C:\Program Files (x86)\Minimal ADB and Fastboot>adb reboot download

adb server is out of date. killing...

* daemon started successfully *

error: device '(null)' not found

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash zip M9_3.35.401.12_NoWipe_TWRP2871b1.zip

target reported max download size of 800000000 bytes

sending 'zip' (64357 KB)...

OKAY [ 4.062s]

writing 'zip'...

(bootloader) HOSD CL#576582

(bootloader) ERR [SD_UPDATE_ERR] Parse zipped android_info fail!

(bootloader) ERR [SD_UPDATE_ERR] sddownload failed: 14

(bootloader) ERR Update zip file failed.

(bootloader) ERR ZIP ERROR, exit read zip loop

(bootloader) Update zip file OK

(bootloader) ERR ZIP ERROR CODE, 14

(bootloader) end@Done

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

finished. total time: 6.174s

I didnt notice error 14 in first posts? Is there a resolution to this one.

Is this because I changed the CID from earlier error?

---------- Post added at 08:16 PM ---------- Previous post was at 08:07 PM ----------

Thanks for heads up
[One (M9) Android Development] mackster248:
Change your CID to 11111111. Use the OP's batch tool to do that easily.
[One (M9) Android Development] bigjailerman:
Thanks, I have changed it manually bit now an getting an error 14, parsing error
[One (M9) Android Development] h4mmer4:
Still the same issue here. Using stock htc cable.

Any ideas? Thanks

EDIT - I made big progress by reinstalling HTC Sync Manager, so could actually get the M9 recognized. Had to change the CID with the handy tool, will change MID in the .txt file later when I can since it threw error 10.

Will post back later, it will probably work when MID is changed.
[One (M9) Android Development] bigjailerman:
Can someone tell me the workarounds our fix with an error 14 parsing. My output log doesn't say which file is causing the error so how do I choose an img stock name?

[/COLOR]In the pp posts to fix errors here does address a parsing issue but I still have a question for someone that could direct me. You will see below I have an error 14 parsing error. In the skin first page in thread it addresses the user to change the img file to a sick line name depending on what file is in error but how can I determine what file (img)? Is the error and how do I decide which name to change it to..

Help with this solution is appreciated.

\Program Files (x86)\Minimal ADB and Fastboot>adb reboot download

adb server is out of date. killing...

* daemon started successfully *

error: device '(null)' not found

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash zip M9_3.35.401.12_NoWipe_TWRP2871b1.zip

target reported max download size of 800000000 bytes

sending 'zip' (64357 KB)...

OKAY [ 4.062s]

writing 'zip'...

(bootloader) HOSD CL#576582

(bootloader) ERR [SD_UPDATE_ERR] Parse zipped android_info fail!

(bootloader) ERR [SD_UPDATE_ERR] sddownload failed: 14

(bootloader) ERR Update zip file failed.

(bootloader) ERR ZIP ERROR, exit read zip loop

(bootloader) Update zip file OK

(bootloader) ERR ZIP ERROR CODE, 14

(bootloader) end@Done

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

finished. total time: 6.174s

I understand many guys get frustrated with noobs but we all start in a new device sometimes and things can be different and we dont necessarily like to do things without doing something without confirmation. When we help out new guys today become teaches tomorrow.

For me I offer apologies for my previous errors in my posts/thrreads
[One (M9) Android Development] Sneakyghost:
(bootloader) ERR [SD_UPDATE_ERR] Parse zipped android_info fail!

It tells you right there. First error. Error 14 follows. The first error is clearly saying the bootloader can't read the android-info.txt. So either the zip is incompatible (did you stick to my recommendations in post 5 of this thread?), or simply android-info.txt was broken by the editor (again: did you stick to my recommendations in post 5 of this thread?).

You need to redo what you did, but properly. See post 5.