[One (M8) Android Development] Sneakyghost:
General Information

Since all M8’s can have S-Off, (and ONLY if you get S-Off!) we can also update the Firmware without the need of HTC’s OTA’ or RUU, yet the stock update way will still remain the safest way. Stick to that if you don’t have reason to come here and choose this.​

Read from top to bottom. No skipping stuff or you will be confused.

There are a few Firmware flashing threads and lots of zips and instructions out there. My goal here is to help you learn and understand an established, known to be safe path to update firmware. I will try to provide some comprehensible info. If you find more vital informations, please share and i will add it here.

The safest way is still HTC’s RUU and OTA system, yet HTC is not providing RUU’s for the international version, however, US Carrier RUU’s can be accessed via HTC’s US ROM download Site. Select your Carrier at the top and jump right down to your carrier section - usually, there will be a RUU for Dev/Unlocked (1540), Sprint (651), Sprint HK (654), AT&T (502) and T-Mobile US (531). RUU’s are superior to other flashing methods because they carry a tested combination of partition images and the method itself is also known to work well. Also, RUU’s do always reassure users that there is a guaranteed and safe way to go back. If you happen to get access to an international RUU, share it with Alex or me please. RUU’s are hosted on androidruu.com by Alex within a short time after being made available to him. Hit him up on Twitter with a link and ask him to add it or send it to me and i will! I added some WWE/Europe RUU’s here which i repacked myself. They behave like official RUU’s, signed and for S-ON users. Since HTC doesn’t really want them published, i don’t link them in the OP, they are “unofficial” and can be found with search by the term “RUU” here.

Other than that, we are mostly stuck with RUU components, usually OTA packages. OTA’s usually depend on a certain Firmware version to be already installed, OTA’s only update parts - they are “incremental”. If you happen to skip an update, you might not get all partitions updated correctly and end up with incompatible partitions, which might (worst case scenario) lead to a brick. I am trying to circumvent this problem with my FULL ZIP or FUU packages - with these you can safely jump from a very old firmware right up to the newest.

The second reason for my thread is that i am trying to do more documentation than usual in order to help you learn how to safely flash firmware.

There are 3 main methods to flash Firmware, which are technically the same (the actual flash is always carried out by the hboot, but the way to get there can be different). I will cover 2 methods. My “automatic” (FUU) approach (simulating HTC’s RUU) and a manual (RUUMode ZIP) approach. The third method, placing a firmware.zip on the SDcard is already covered by [MENTION=4542027]skulldreamz[/MENTION] over HERE.

I will cover GSM PHONES ONLY - no cdma / sprint firmware except when i wish to do otherwise :D​

Method #1: The FUU

​

More convenient, automated, hence user friendly way to flash firmware. What HTC uses. Less reliable, several extra sources for errors.

How this works:​

First thing to do: HTC Sync Manager. Please install, then remove again and leave ONLY drivers! The RUU/FUU was written in Visual C++ 2008 x86 - my installer should install that for you starting with FUU version 3.28.401.6. If it doesn't, just manually install it first to avoid the ARUWizard failing to launch with error "side-by-side configuration....".

What to know about the FUU’s (& ZIP’s)​

General Info:

The FUU is the flashing technology HTC uses. I call it “FUU” because its not a ROM Update Utility (i don't deliver system.img) - it’s only a Firmware Update Utility for us (read HERE to understand the difference between "Firmware" and "ROM"). So i will update the FUU only when HTC does and provide one (empty) FUU download. Place this wherever you want your working directory to be. I suggest to use “C:\Android\com” because this is where i work. Might make following my instructions easier. I will also provide the ZIP’s as self-extracting FUU versions. Using those, you won’t need the empty structure

So, once you have downloaded and extracted the FUU to its place (I will give you a self extracting archive that sets up the FUU for you in the path mentioned above), you can then begin to download fastboot flashable zips.

To get them flashed, simply drop them into the FUU folder (C:\Android\com) and then run the FUU, which is the ARUWizard.exe (double click that one, make a shortcut to your desktop for convenience).

IMPORTANT RED, BOLD AND UNDERLINED

​

Whenever you drop a new zip into C:\Android\com, make sure you delete ALL OTHER ZIP’s before running the ARUWizard.exe! Plus, rename any zip you intend to flash to “ROM.zip” (small or CAPITAL doesn’t matter) to make sure a new zip overwrites an old one. So, in order to have a proper flash, have just ONE rom.zip in the “com” folder!

Now, on to what I provide here:

- FullStock Wipe ZIP/FUU: this type of zip also re-flashes the /data partition with HTC’s DZDATA files (meaning you lose everything on your internal SDCARD). Also replaces the Kernel, Ramdisk, recovery and Splash1 with latest stock images! The /system partition will not be touched. (Else this would be a RUU, not a FUU). Phone will NOT boot after using this! Be sure to put a ROM onto your EXTERNAL SD before proceeding with a FullWipe ZIP! Else you can also ADB push a ROM in recovery mode after fastboot reflashing a recovery.

- Combined NoWipe ZIP/FUU: this type of zip updates basic firmware partitions, does not touch the /data partition, leaves kernel, splash and ramdisk alone. Recovery will be replaced with current TWRP.Phone will boot normally after using this.

And what you won’t get here (fine print):

Since this is a (F)irmware (U)pdate (Utility) and not a (R)om (U)pdate (U)tility, you do NOT EVER get a ROM (a.k.a “System.img” or plain: “System” here. You understand and agree that you cannot have this from me. You also acknowledge that i cannot be blamed for your non-booting phone due to you not reading or not understanding this.​

Method #2: Fastboot/RUUMode ZIP’s

​

Instead of using the FUU, you can of course flash those zips manually as well. It eliminates a few error sources by reducing complexity and is more reliable. BUT it requires ADB and Fastboot knowledge!

Prerequisites:​

You need ADB and Fastboot on your PC and instead of using the Google SDK Tools from HERE you should (from Software versions 4.20.xxx.x and up) use my Android Tasks Batch script collection, which sets up the HTC versions of ADB and Fastboot in the path “C:\Android\com”. Info in Post #3. Or alternatively the HTC One Tool from [MENTION=4752144]squabbi[/MENTION] which also offers driver downloads and recovery downloads (handy shortcuts!).

To learn to use ADB and Fastboot, please use search, many guides available..​

Step-By-Step:​

1.

If device is booted into Android, reboot into bootloader by running:

adb reboot bootloader

1.a

Or else, if your device is in a different state or you just prefer the button method:

Press Power for 15 seconds and hold Vol UP at the same time, when the screen and charging LED go dark immediately slide your finger down to Vol Down until you see the bootloader screen. Notice: First VolUp, then VolDown as soon as the screen goes dark (and you hear the windows connection sound if your phone is hooked up).

2. Now place the Firmware_xx.zip into your adb/fastboot folder (which will be "C:\Android\com" if you use my Task Script).

3.

Now run:

htc_fastboot oem rebootRUU

4.

Followed by:

htc_fastboot flash zip Firmware_xx.zip

(replace "Firmware_xx.zip" with the name of your zip)

5.

Now check the console output. It should approximately look like this (this is from GSM International 3.28.401.6 FullWipe):

Important: the flash process halts at around 75% to 90% on phone screen! This is normal and a safety precaution! The last few percent is the reboot, which is NOT happening automatically, so you get a chance to check the console output to make sure it is safe to reboot! The bar will only fill up to 100% once you type:

6.

htc_fastboot reboot-bootloader

FUU general errors:​

- FUU quits right away, says “side-by-side configuration wrong or missing” : install Visual C++ 2008 x86. Also .NET is required but build into later windows systems, might only be an issue on old windows.

- Any other FUU crash is hinting at the same issues (at least what i have seen). Make sure your Visual C++ is ok.

- FUU errors with numbers (FUU launches, starts, then throws an error number): please see below.​

RUUmode/ Fastboot Error handling strategies:​

IF IT SAYS "FAILED" do not immediately reboot the device If you reboot with a FAIL It could brick! If no flash is being accepted you have to find out what is causing the malfunction before rebooting your phone. Keep it alive while trying to figure out the error. It might be your cable, your USB ports (don’t use hubs! Always direct-mainboard connections), it might be USB 3.0 which is not good yet, it might be bad configuration of your ADB and Fastboot...

The least dangerous FAILED messages are listed below and are safe to reboot (below this section you find CRITICAL errors, please observe):

Safe to reboot / Flash didn't happen Errors (if you encounter one of them, you can just reboot. Nothing changed):

- 12 signature fail (unknown yet but safe to reboot)

- 23 parsing image fail (means something wrong with the image in the zip)

- 24 android-info fail (means something wrong with android-info.txt in the zip)

- 32 header error (means the zip couldn't be read and unzipped properly)

- 41 Wrong Model ID (means it's not the right device)

- 42 Wrong Customer ID (wrong CID means you gotta swap CID first as explained below)

- 90 hboot pre-update (means it only flashed hboot and you have to run the process again immediately to flash all other partitions WITHOUT a reboot in-between).

- 99 UNKNOWN usually indicates you are S-ON, sometimes other Security related issues.

- 130 wrong model ID (seems it's the same like 41, just that it shows in the FUU as 130.

- 155 seems to indicate different things. It can mean: 1.) You need to relock bootloader (If S-ON); 2.) You cannot run the RUU/FUU because the software versions of ROM, Firmware and RUU/FUU don’t match.

- 170 Check USB - FUU won’t run because of not working ADB.​

In fact, if it aborts before the "(bootloader) start image[hboot] unzipping & flushing..." line it actually didn't write anything and you can probably just reboot. If you see it flashing stuff though (the stages after that line) and then it stops with a FAILED, chances are a little higher that something is now broken. In that case do NOT reboot but do as i said above.

For Error 12 “signature fail" do:

- might indicate that a signed firmware package is required. This would only happen with S-ON phones though.

For Error 23 "parsing image fail" do:

- change image names in the zip to stock image names like “hboot.img" or “radio.img" or whatever failed there....

For Error 24 "android-info fail" do:

- check that your ZIP isn’t some HTC OTA or anything thats got no android-info.txt - those cannot be flashed with fastboot flash zip nameof.zip command.

- check that your zip has a good MD5 and is not broken, check android-info.txt etc...

For Error 32 "header error" do:

- Sorry i haven’t found the exact cause yet and don’t know a definite solution.

- Make sure there is only one . (dot) in the filename, before the extension. fastboot reads anything after the first dot it sees as the extension. If that is not zip, it fails.

- If that doesn't help, you can also try: make the zip new with recommended settings, re-run the command, check your connections...

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

htc_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:

htc_fastboot oem writecid 11111111

You can change back to any desired CID after a successful firmware flash. Notice: this command only works on S-OFF phones (which you have already of course or else you wouldn't be here).

For “Error 90 hboot pre-update..." do:

- Run the same flash command again which you just ran (press arrow up on your keyboard to get to the previous command in console)

- Don’t reboot in-between! (It wouldn't brick you but it would just make you run the flash command twice again)

- This might be caused by the newer encrypted RUU's, they need their hboot to be flashed first so it can then decrypt the rest of the ROM.zip. Look at an encrypted ROM.zip from a RUU, you will notice that you can mostly extract the hboot without decrypting the ROM.zip, but you can't extract much else.)

For “Error 99 UNKNOWN" do:

- Check with other zip’s if they work!

- Check if your S-OFF is correct

- You are S-ON? Then almost definitely this means the ZIP is not signed - get an unmodified zip!

For “Error 130 wrong model ID" do:

- Please refer to Error Code 41/42.

For “Error 155 relock bootloader" do:

- Since my thread works only with S-OFF phones anyway, this error can be read as: you need to S-OFF first!

- Error 155 can mean that you need SuperCID. On a few occasions this was shown when the RUU/FUU refused to run because of a wrong region lock.

- Lately, Error 155 has occurred when a FUU was launched from within android. When encountering a FUU error 155 with the process stalling after the rebootRUU (stuck at black screen with silver HTC logo), please just restart the FUU and leave the phone in that mode, or reboot the phone, then reboot to bootloader, then do “htc_fastboot oem rebootRUU” and then launch the FUU again (thanks [MENTION=2677046]anarchychris[/MENTION] for pointing it out).

- run the fastboot command “htc_fastboot oem lock" - only applies to S-ON phones that want to update the firmware with a stock OTA package (not offered on this thread!!). Stock OTA files sometimes need a locked bootloader.

For “Error 170 Check USB" do:

- Sometimes shown when running a RUU or FUU. Indicates issues with drivers. One way to solve is to run the ARUWizard with the phone already in Fastboot mode. Else you will have to re-install HTC Sync manager. Also, avoid USB 3 ports (the blue ones) - they have a complete new driver stack and that doesn't work well currently.​

NOT safe to reboot / Flash (partly) happened Errors (if you encounter one of them, DON’T reboot:

- 152 Image Error - Phone Screen shows a little triangle beside a full green bar​

For “Error 152 Image Error" do:

- Error 152 is quite rare, have seen it only once with a friend’s phone and it aborted the flash nearly at the end. The flash was started by the FUU. We could resolve the matter by NOT rebooting the phone and flashing the zip again through a manual fastboot flash as outlined further up.​

I usually test all of these zips on my own device, still, you flash at own risk. You're writing to

critical

parts of your phone. If anything goes wrong along the way, you might be

bricked

.

DOWNLOADS

​

ALL DOWNLOADS FUU AND ZIPS

*notice: here you find all other ZIP and FUU downloads.​

Recent additions​

​

Credits​

I have lost track of my firmware sources. I am sorry i cannot name you guys all. The most common source would be [MENTION=494185]LlabTooFeR[/MENTION] and HTCDev and some others. If you find your stuff here and want to be included in the credits please contact me. I am very grateful for everyone busy providing dumps and direct leaks.

Further i would like to express my deepest gratitude to team venom, who aren't only good friends but also let me use their graphical stuff as base for my own stuff. Thank you!

One helpful person, [MENTION=506238]O.M.J[/MENTION], posted one of the very first M8 RUU’s for Sprint - i originally based my first M8 FUU’s on that, so he be mentioned here as well. Thanks mate!

Last but not least and probably the holy grail of the HTC Modding Scene: the guys behind Firewater, Sunshine, and all the other S-OFF methods, currently i believe mostly [MENTION=711482]beaups[/MENTION] and [MENTION=2376614]jcase[/MENTION] - Thank you so much!

Donations​

I am never asking for donations, yet i decided to put up a donation link in the past, because people asked if they could donate to me. It does happen once in a blue moon. The nicest thing that has ever happened to me was a device donation. I feel forever humbled for that. I don’t know how to repay that debt of honor.

However, there is one thing i would like everyone to not do: PM me and promise a donation, get my help and then don’t live up to your promise. Why?

Even though i am never asking for a donation, i feel very happy when someone donates a small buck towards my hobby. I really do feel appreciation if i can buy myself a beer and think: i have earned myself this by helping someone. So, if someone hits me up private and says “I’ll donate something to you if you help me with this seriously overwhelming issue” i usually think “hell yea, poor bastard, i’ll help ya! (and maybe i can get my next beer for free). Then nothing comes in return, not even a thank you.

That REALLY hurts.​

Disclaimer​

You are aware that writing to the security protected partitions increases your risk to lose the device exponentially. You understand and agree that i cannot be held responsible for such or any other damages. The flash process is theoretically safe and tested on various phones at time of posting, however you are the brains behind the wheel and you are solely responsible for the execution of the process. I will not accept any responsibility. The method itself is developed by Google and HTC, i only provide access and information to it and you execute it.

You understand that you should not do it if you are not willing to accept this risk.​