[One (M7) Android Development] Red5:
So you want to upgrade your firmware?

So a lot of you have been asking how to upgrade your firmware. Ive done it and helped several others do it, so this is a for sure fire way to get you up to where you want to be. Ive only done this on Sense-based roms.

*Disclaimer*

This is going to overwrite your custom recovery, kernel and radio. I have also posted how to get all that back.

First of all, were going to get you s-off and superCID. To do that, you need to first open up a cmd prompt (I always right click and open in administrator mode) and change the directory to where your adb and fasboot is at. Example: cd c:\android\sdk\platfoorm-tools and then hit enter.

Keep that same cmd prompt open because we're going to use it throughout this whole process.

S-off:

Revone works great and its fast, so we're going to use that. Go to this thread and get the revone file. Now place it in the same folder that your adb and fastboot is at. Now follow the revone steps below.

1. Download revone (above) and push it to your device: adb push revone /data/local/tmp/
2. Open an adb shell and:
* cd /data/local/tmp
* chmod 755 revone
3. (optional) If your device is unlocked and rooted please switch to root using su.
4. Prepare to gain S-OFF by running the command: ./revone -P
4a. If revone reports success reboot the device and proceed to step 5)
4b. If revone reboots the device (we'll pretend this isn't an undiagnosed random crash) please wait 2 minutes then try again from step 2.
4c. If revone reports that you need to reboot and try again please reboot and try again from step 2.
5. Now that revone has successfully prepared your device for S-OFF please open another adb shell (as per step 2) and change to
the /data/local/tmp directory.
6. Instruct revone to grant you S-OFF and unlock status by running the command: ./revone -s 0 -u
6a. Other optional command arguments:-
* -u - Unlock the device
* -l - Lock the device (as if it was never unlocked)
* -r - Relock the device (mark the device as relocked)
* -t - Reset the device's tamper flag.
7. Presuming revone reported success please reboot the device again, this time to the bootloader (adb reboot bootloader)
8. You should now observe your device is S-OFF (and the lock status changed if you invoked that option).
9. (optional) Re-run revone to remove TAMPERED from your HBOOT screen: ./revone -t

SuperCID:

Have your phone booted into your bootloader with a USB cable plugged in. It should say fastboot USB. If not, type: adb reboot bootloader

Once your phone is in fastboot-usb type: fastboot oem writecid 11111111

Next, to check if you are now superCID, type: fastboot reboot-bootloader and you should be showing all 1's at the top of your screen

Firmware:

Now there is some debate that the leaked 2.17 firmware has updated touch drivers and the 2.24 firmware does not... so for the sake of argument, were going to flash both in order to ensure you get everything. Go to this thread and get the 2.24.401.1 firmware from the OP, and also get the 2.17.401.1 firmware from the second post. To help you later, were going to shorten the names of the zip files.

Rename the 2.17 firmware zip file to 2.17.zip and place it in the same folder as your fastboot.

Rename the 2.24 firmware zip file to 2.24.zip and place it in the same folder as your fastboot.

Were going to check what firmware version you are on now. Your cmd prompt should still be open. Type: fastbbot getvar all. A list should come up in your cmd prompt. Look for version-main: and it will say something like 1.26.xxx.x or 1.29.xxxx.x. This is the version you are on right now. Were going to upgrade you higher.

Type: fastboot oem rebootRUU (wait for device to reboot into a black screen with a silver htc logo)

Type: fastboot flash zip 2.17.zip and wait for process to complete

After a success message, retype the same command (fastboot flash zip 2.17.zip) and wait for process to complete (this is because the first time it transfers the files and the second time it actually flashes them)

When its done the green bar will either be at the end, or will stop at around 75%. Just watch your cmd prompt and when it says successful just type: fastboot reboot-bootloader

Now, type: fastboot oem rebootRUU

Type: fastboot flash zip 2.24.zip and wait for the process to complete

After a success message, retype the same command (fastboot flash zip 2.24.zip) and wait for process to complete (this is because the first time it transfers the files and the second time it actually flashes them)

When its done the green bar will either be at the end, or will stop at around 75%. Just watch your cmd prompt and when it says successful just type: fastboot reboot-bootloader

Now type: fastboot getvar all and look for version-main. It should now read 2.24

Recovery:

Because the firmware packages replaces your custom recovery with stock, we need to now push your custom recovery back to your phone.

I use TWRP, so thats what Im going to use for this guide. If you prefer CWM, then get that file and follow the same steps.

Go to this thread and get TWRP. Rename the file to twrp.img and place it in the same folder as your fastboot. Your phone should still be in fastboot, if not, get there.

Type: fastboot erase cache

Type: fastboot flash recovery twrp.img

Kernel:

http://goo.gl/p1QDq <-- Link to the latest stock kernel that comes with ViperOne. This firmware method is for a Sense rom. By flashing the latest 2.24 firmware, it upgraded you to the latest radio and latest kernel. If you're not comfortable with that, then you can downgrade the kernel to the same one that comes with Viper.

If you dont want the latest radio, you can flash your choice of radio if you have one, or boot up and grab whatever radio you want, reboot back into your recovery and flash it. Also, if you dont want to stay at superCID, then you can always boot back into fastboot and put your CID back to whatever you want. I stayed at superCID since Im not going to be receiving OTA's from HTC since Im staying on ViperOne.

Credits go to: ieftm for revone, mike1986 for the firmwares, Flyhalf205 for TWRP, Turge & Jan for ViperOne rom/kernel