FORUMS
Remove All Ads from XDA

HTC One (M9) ReadMe Thread

3,109 posts
Thanks Meter: 2,665
 
By Flippy498, Retired Forum Moderator on 4th June 2015, 09:07 PM
Post Reply Email Thread
HTC One (M9) ReadMe Thread

Edit from the 17.08.2018: I don't know what happened exactly but it looks like a lot of the files that were hosted on AFH by me and others aren't available, anymore. Since I don't have them backed up on my laptop, anymore, I won't be able to re-upload them if AFH isn't able to recover the files. All non-working links got removed, for now.

Welcome to the HTC One (M9) ReadMe Thread. Here, you'll find some basic information (which you should read before you start flashing) and every Stock File (e.g. RUUs, TWRP backups or OTAs) that you guys contributed, so far. Besides, you'll find instructions that are needed to flash these files. Make sure that you read them, as well. HTC changed a lot with the M9 and many things you might know from older HTC devices don't apply to the M9.

Be aware that this thread relies on your contribution or it will waste away. If no one contributes any newer OTAs, TWRP backups or RUUs then chances are high that you or others might face a situation in which you can't recover your phone without having to pay for help.

This thread is located in the forum of the [GSM] international HTC One M9 (codename: hima_uhl - MID: 0PJA10000). Therefore, most (not all) of the files you can find here can only be used with GSM versions of the M9. However, much of the information in this thread applies to the other versions, as well. There are device-specific forums for every US variant of the M9. Make sure you search through them, as well, if you own one of the following models:
If you don't know the difference between GSM and CDMA you should read this article before you continue reading my thread. The article explains why you might not be able to get LTE reception with a CDMA device while using it in other countries than the US, as well.

Disclaimer:

You are aware that you use the files and guides that get provided in this thread at your own risk.
You understand and agree that neither I nor xda nor any of the authors of linked guides are responsible for any damages that might result from using the files and/or guides.
You understand that you should not use any of the files or guides if you aren't willing to take the risk.


Important Note:

You should do yourself a favour and check the MD5 sum of the files you downloaded before you flash them. This way you can make sure that the files you're using didn't get broken during the download. You can use WinMD5 (for Win 7/8.0/8.1) or File Hasher (for Win 10) for that purpose. The desired value can be found on the download site of the dedicated files. Unfortunately neither Google Drive nor Mega.nz nor MediaFire provide MD5 sums for their downloads. Therefore, you can only hope that everything went well if you downloaded a file from one of these three file hosters.
The Following 53 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
4th June 2015, 09:47 PM |#2  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More
Overview

  • Post #3: Setting up ADB/Fastboot/HTC_Fastboot correctly
  • Post #4: Unlocking the Bootloader and Rooting/Installing a Custom Rom
  • Post #5: How to convert your M9 to a different version
  • Post #6: Basics about RUUs, Download Links and Instructions how to flash them
  • Post #7: Common RUU errors
  • Post #8: Basics about TWRP Backups and Instructions how to create them
  • Post #9: Flashing/Restoring Instructions for TWRP Backups and Download Links
  • Post #10: Stock Recoveries and Instructions how to flash/restore them
  • Post #11: Basics about OTAs, Download Links and Instructions how to install them with TWRP
  • Post #12: Useful links for further reading
  • Post #13: FAQ
  • Post #14: Credits
The Following 10 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
4th June 2015, 09:47 PM |#3  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

Setting up ADB/Fastboot/HTC_Fastboot correctly

Prerequesits:
  • You need Windows 7/8/8.1/10.
  • You need this archive. (Those files got extracted manually from HTC's RUUs.)
  • You need the latest 7-zip version or any other program that can handle *.zip archives.
  • You should've installed all needed Runtimes.
    • An all-in-one Installer can be found e.g. here. (The website and the installer are using the German language. Send me a link if you know an English alternative.)
  • The HTC USB Driver Installer is needed.
    • Install the HTC Sync Manager and uninstall it immediately. The Manager is known to cause problems with ADB and Fastboot. The drivers won't get affected by uninstalling the Manager.

Instructions:
  1. Create a new folder on your desktop called "android".
  2. Unzip the ADB/Fastboot archive into that folder. There musn't be any subfolders!

Troubleshooting:
  • Make sure that the HTC USB drivers are installed.
  • If the HTC Sync Manager is installed on your PC you should uninstall it.
  • Make sure that all needed Runtimes are installed.
  • If you aren't using the cable that came with your phone you should try the original one.
  • If you're using a USB 3.0 port you should try a USB 2.0 port.
  • If you're using a Windows 8/8.1/10 PC you should try a Windows 7 PC.
  • Make sure that you only try to use Fastboot/HTC_Fastboot while your phone is booted to Bootloader or Download Mode. You can't use them while the phone is booted to the normal system.
  • Make sure that you only try to use ADB while your phone is booted to TWRP (if installed) or to the system. You can't use ADB while the phone is booted to Bootloader or Download Mode.

The Following 6 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
4th June 2015, 09:48 PM |#4  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

Unlocking the Bootloader and Rooting the M9/Installing a Custom Rom

Prerequisites and important infos:
  • You'll need an external SD card with a size of at least 8 GB.
  • This guide assumes that you're using the latest 4.x firmware.
    • You're going to verify that with step 1 of the instructions.
    • You can't follow step 4 (which is optional) if you don't use at least firmware 3.x!
    • Check Q4 and Q5 of the FAQ section if you skip step 2 while using firmware 1.x, 2.x or 3.x since these require older TWRP and SuperSU versions than firmware 4.x. Your phone will not be able to boot to recovery mode or end in a bootloop if you don't use the correct files.
  • You need a working ADB/Fastboot/HTC_Fastboot environment.
  • You need the official TWRP 3.2.2-0.
  • (Optional) Read the RUU section or TWRP section II if you want to restore an untouched system image and the stock recovery after following this guide.
  • The instructions aren't usable with a Verizon M9 due to the bootloader unlock being blocked by Verizon. You need S-OFF for being able to unlock it. Sunshine S-OFF only works on firmware 3.x or below (Android Marshmallow and older). Alternatively, you can look for someone who owns a Java card or an XTC clip. I recomend you taking a look at the Verizon M9 forum. Chances are higher that you'll find what you need over there.

Instructions:
  1. Boot to download mode and look at the line with "OS" at the beginning for finding out your current firmware version.
    • That means: Power off the device, wait some seconds and turn it on again while you keep volume down pressed until you see a black screen with red, blue and yellow text. If you see a white screen with multicoloured text then you're facing the Bootloader mode. In that case you can navigate to "Boot to Download Mode" with the volume keys and select the option with the power button.
  2. (Optional) Install all available OTAs (via the software update function of the system settings) if you aren't using the latest 4.x firmware
  3. Unlock your phone's bootloader via HTCdev.
    • Your internal storage will get wiped by doing so!
    • Since you already have a working ADB/Fastboot/HTC_Fastboot environment you don't need to download the android SDK from HTCdev.
  4. (Optional) I highly recommend to follow the instructions in the TWRP section I.
    • Even if you don't want to share your backup with us you should at least keep it on your PC so that you're prepared if you need to revocer your phone.
  5. Boot Download Mode, again.
  6. Open the folder that contains your ADB/fastboot/HTC_fastboot files on your PC.
  7. Press and hold Shift on your keyboard.
  8. Right-click into the folder.
  9. Choose "open command window here".
    • If you're using the Win 10 Creator's update or any newer version then you need to choose "open powershell window here".
    • Type "start cmd" without the quotation marks and execute the command with pressing Enter on your keyboard.
  10. Use the command
    Code:
    fastboot flash recovery twrp-3.2.2-0-hima.img
    (execute it with Enter).
  11. Wait a bit. TWRP should get flashed on your phone.
  12. Reboot to Bootloader Mode.
  13. Choose "Boot to Recovery Mode".
  14. If you want to keep the stock rom and only gain root you need to follow instruction A. If you want to install a custom rom you need to follow instruction B. (Be aware that most custom roms come pre-rooted.)
    1. Get either SuperSU 2.79 SR3 or the latest Magisk version and copy the *.zip you chose into the download folder of your external sd card. Choose "Install" and navigate to your external sd card's download folder. Select the SuperSU/Magisk file and install it by swiping. Reboot your phone after the flash got finished. It's rooted, now.
    2. Get the latest version of the rom you want to flash from either the android development section or the original android development section (make sure that you read all important information that got posted in the first posts of the rom thread) and copy the *.zip you chose into the download folder of your external sd card. Choose "Wipe" and wipe everything except for "Micro SDcard", "USB-OTG" and "SD-Ext" via the advanced wipe. Get back to the main menu and choose "Install" and navigate to your external sd card's download folder. Select the rom and install it by swiping. (Be aware that roms that aren't based on HTC's stock rom (e.g. LineageOS or Resurection Remix) may lack all google apps. You can download them from here. Choose the ARM64 version that corresponds to the android version of your custom rom. It doesn't matter which variant you use so choose the one that suits you best and install it via the install option after you flashed the rom. This is not needed for roms like Android Revolution, ICE, MaximusHD, Viper or Leedroid.) Reboot your phone after the flash got finished. The first boot may take a while.
  15. (Optional) If you want you can set your phone S-OFF with the Sunshine app, now. Be aware that this is only possible on roms that are based on HTC's stock rom or the stock rom itself. More information about S-OFF can be found here.

The Following 29 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
4th June 2015, 09:49 PM |#5  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

How to convert your M9 to a different version

  • This guide is based on clsA's conversion guides (older one/newer one). I only updated some of the information so most of the credits go to him.

Prerequisites and important infos:
  • This is only possible with S-OFF and only owners of a GSM version should follow these instructions.
  • Owners of a CDMA device may damage their phone unrecoverably by using these instructions. Read the RUU section if you want to know why.
  • A working ADB/Fastboot/HTC_Fastboot environment is mandatory.

Instructions:
  1. Boot to download mode and look at the line with "OS" at the beginning for finding out your current firmware version.
    • That means: Power off the device, wait some seconds and turn it on again while you keep volume down pressed until you see a black screen with red, blue and yellow text. If you see a white screen with multicoloured text then you're facing the Bootloader mode. In that case you can navigate to "Boot to Download Mode" with the volume keys and select the option with the power button.
  2. Download the RUU for the firmware you want to convert to from the RUU section.
    • For minimizing headaches, you should only use RUUs whose major version (1.x, 2.x, 3.x or 4.x) matches the one your phone is using.
  3. Connect your phone via USB with your PC.
  4. Open the folder that contains your ADB/fastboot/HTC_fastboot files on your PC.
  5. Press and hold Shift on your keyboard.
  6. Right-click into the folder that contains your ADB/fastboot/HTC_fastboot files.
  7. Choose "open command window here".
    • If you're using the Win 10 Creator's update or any newer version then you need to choose "open powershell window here".
    • Type "start cmd" without the quotation marks and execute the command with pressing Enter on your keyboard.
  8. Copy'n'paste the command
    Code:
    fastboot getvar all
    and execute it with Enter on your keyboard.
  9. Write down your CID and your MID on a piece of paper so that you know them in case you want to revert to the original firmware of your phone.
  10. Change your MID using the command
    Code:
    fastboot oem writemid <enter MID of the RUU you want to flash>
    and executing it with Enter. This might not be needed if your original MID already matches the one of the RUU you want to flash, later on.
    Example for the Dev Edition RUU 3.35.617.12:
    Code:
    fastboot oem writemid 0PJA11000
  11. Change your CID by using the command
    Code:
    fastboot oem writecid <enter CID of the RUU you want to flash>
    and executing it with Enter.
    Example for the Dev Edition RUU 3.35.617.12:
    Code:
    fastboot oem writecid BS_US002
  12. Choose the option "reboot to download mode" on your phone.
  13. Verify whether CID and MID got changed correctly by using the command
    Code:
    fastboot getvar all
    and executing it with Enter.
  14. Flash the RUU you downloaded before with one of the methods from the RUU section.
    • It doesn't matter which method you use.
  15. Congrats! You sucessfully converted your M9 to a different version.

The Following 2 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
4th June 2015, 10:59 PM |#6  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

RUU Section

General infos:
  • Rom Update Utilities (RUUs) are *.exe or *.zip files with which you can reflash the stock system and the whole firmware of your phone quite easily.
    • Strictly speaking only the *.exe files are RUUs (which are nothing more than a *.zip file combined with a fancy installer and HTC_Fastboot files). However, people got used to call them both RUUs and since most of the files here are *.zip files I don't want to start nitpicking.
    • The catch is that HTC only provides RUU.exe files for their US customers. All other RUUs which you can find in this post got leaked somehow and no one knows if or when new non-US RUUs are going to be available. That's why it might happen that non-US users can't find a publicly available RUU they could use with their phone.
  • S-ON Users can (in most cases) only use RUUs which have at least the same firmware version as their phone.
    • That means a downgrade is (in most cases) not possible with S-ON.
  • S-OFF Users on the other hand can use almost every RUU they want. Be aware that flashing a CDMA RUU on a GSM device and vice versa will probably lead to unrecoverable damages due to differences in their partition layout. It's not even safe to flash a CDMA RUU on your phone if the SKU of your current firmware and the one of the RUU don't match. The partition layout of the different CDMA versions differs in many cases, as well.
  • In addition to that, there are some RUUs on the internet which contain "combined_signed" in their naming. These RUUs are not officially signed by HTC although the files inside these archives are signed correctly. You can compare this kind of RUUs with Sneakyghost's firmware packs. The content is official but the archive itself isn't.
  • S-OFF users should be aware that the phone's CID and MID need to correspond to the SKU of the RUU you want to flash. The SCID (11111111) won't make your phone ignore mismatches between those ID numbers as it did on older HTC devices.
  • In addition to that, you can't flash RUU.zip files with fastboot, anymore. The RUUs for the M9 are too big so that fastboot can't handle them.
    • A special version which got developed by HTC (HTC_Fastboot) is needed for that purpose.
  • In contrast to RUUs of older HTC devices M9 RUUs can get flashed with an unlocked bootloader even if the phone is S-ON.
  • I highly discourage everyone from (re-)locking the bootloader unless you have a working RUU at hand and know that you're able to flash it (via HTC_fastboot or an SD card if it's a *.zip). Security features of the M9 prevent the phone from booting if anything is modified and the bootloader is (re-)locked. You can't even enter TWRP, anymore, in this situation. In addition, you can't re-unlock if "OEM Unlock" (introduced with firmware 2.x) isn't activated in the developer options. You've been warned about the risks.

Important Notes:
  • There are several reports about downgrades being possible with S-ON in some specific cases and without the need of any additional tricks (e.g. during this conversation: Link #1, Link #2). It looks like you're able to downgrade whenever the firmware version you're currently using and the one of the RUU only differ in the numbers behind the SKU. In other words the part marked with y of x.xx.xxx.yy is allowed to differ whereas x needs to be the same for your current firmware version and the RUU (e.g. downgrades from 1.32.401.15 to 1.32.401.8 or from 3.35.401.32 to 3.35.401.12 are possible but from 1.40.401.8 to 1.32.401.15 or from 3.35.401.12 to 2.10.401.1 aren't). I've tested it myself before I set my phone S-OFF and I can confirm that it is working.
    • In addition it's possible to downgrade anytime if you delete the main version of your phone via dd commands, beforehand. Be aware that the tiniest mistake while using dd commands can lead to unrecoverable damages because of the nature of these commands. Due to its risks I won't be supporting that method in this thread. However, you might be able to find a thread that deals with this method if you use the forum search.
  • It doesn't matter which method you use but the SD card method is the recommended one since it's the most fail-safe method.
  • If you have a RUU.exe at hand but want to use a different flashing method you can extract the *.zip file using these instructions. Although they're a bit older they can still be used with M9 RUUs. Alternatively, you can use the Universal Decryption Tool.
  • HTC changed the M9's encryption keys several times:
    • Firmware 1.x is unencrypted
    • Firmware 2.x and 3.x use the "first" encryption key
    • Firmware 4.x uses the "second" encryption key
    The consequences are that you cant flash 2.x, 3.x or 4.x RUUs if your phone is currently using a 1.x firmware and that you cant flash 4.x RUUs if your phone is currently using a 2.x or a 3.x firmware. Both, OTAs and Sneakyghost's custom firmware packs, are unencrypted. In other words, for updating your M9 you either need to flash a NoWipe/Full-Wipe Firmware Pack that contains the new encryption key beforehand (only possible with S-OFF) or you need to use the latest RUU for your SKU that uses the same encryption key as your phone. If you choose the latter you need to install the available OTAs, afterwards.
    • Another consequence is that downgrades from 4.x to firmware 2.x or 3.x aren't that easy, either. You need to flash a NoWipe or a Full-Wipe Firmware Pack for either firmware 2.x or 3.x before you're able to use 2.x or 3.x RUUs, again.
    • Downgrading to firmware 1.x should be possible without any extra steps since that firmware isn't encrypted at all.

Instructions for the SD card method:
  • Be aware that you need an external SD card for your phone that is not bigger than 32 gb.
  • The size limit doesn't apply to phones with firmware version 3.x or higher.
  • According to the Download Mode of firmware 4.x you should be able to use USB-OTG instead of an SD card on firmware 4.x and higher. However, I haven't tried this alternative, yet. (If someone is willing to try it I would be happy if that person could report back whether it worked or not.)
  • Flashing a RUU will erase all personal data on your phone! Make a backup of everything you don't want to lose before you start flashing.

  1. Boot to download mode and look at the line with "OS" at the beginning for finding out your current firmware version.
    • The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running and might therefore differ from the real one in the download mode.
    • Remember that you can always flash newer RUUs as long as they use the same encryption key as your current firmware. (c.f. the important notes in this post)
  2. Download or extract the correct RUU.zip for your phone.
  3. Rename the file to "0PJAIMG.zip". (Make sure that file extensions are visible so that you don't rename the file to "0PJAIMG.zip.zip"!)
  4. Copy the file to the root directory of a SD card which is formatted to fat32. (If you're on firmware version 3.x or higher you can use an exfat formatted SD card, too.)
    • It looks like this is only possible if the SD card is directly connected to your PC and not put into your phone.
    • However, it got reported that you can copy the file while the card is put into your phone if the RUU lacks its file extension (".zip"). Don't forget to re-add the extension if you choose to delete it.
  5. Put the card into your phone and boot to Download Mode.
  6. You will be asked whether you want to flash the file. Confirm with the volume up button.
  7. Your phone will reboot at least one time.
    • Depending on your current firmware version it may reboot to Android or the Bootloader instead of rebooting to Download Mode. If this happens you just need to manually boot it to Download Mode.
  8. Flashing may take some time.
  9. At the end you will be asked to push the power button. You phone will shut down if you do so.
  10. Wait some seconds and then turn your phone on, again.
  11. First boot may take a while.
  12. Congrats! Your system is now stock and able to receive and install official OTAs, again.


Instructions for RUU.exe files:
  • Windows 7/8/8.1/10 is required.
  • Flashing a RUU will erase all personal data on your phone! Make a backup of everything you don't want to lose before you start flashing.

  1. Boot to download mode and look at the line with "OS" at the beginning for finding out your current firmware version.
    • The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running and might therefore differ from the real one in the download mode.
    • Remember that you can always flash newer RUUs as long as they use the same encryption key as your current firmware. (c.f. the important notes in this post)
  2. Download the correct RUU.exe for your phone from HTC's website.
  3. Boot your M9 to Download Mode.
  4. Connect your phone with your PC via a USB cable.
  5. Run the RUU.exe and follow the on-screen Instructions.
  6. Flashing may take some time. Your phone will power off at the end.
  7. Wait some seconds and then turn your phone on, again.
  8. First boot may take a while.
  9. Congrats! Your system is now stock and able to receive and install official OTAs, again.


Instructions for the ARUWizard method:
  • Basically, you're creating your own RUU.exe for non-US RUUs with this method.
  • The credits for this method go to Golv and Nikolay82.
  • Windows 7/8/8.1/10 is required.
  • Flashing a RUU will erase all personal data on your phone! Make a backup of everything you don't want to lose before you start flashing.

  1. Boot to download mode and look at the line with "OS" at the beginning for finding out your current firmware version.
    • The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running and might therefore differ from the real one in the download mode.
    • Remember that you can always flash newer RUUs as long as they use the same encryption key as your current firmware. (c.f. the important notes in this post)
  2. Download the correct RUU.zip for your phone.
  3. Rename the file to "rom.zip". (Make sure that file extensions are visible so that you don't rename the file to "rom.zip.zip"!)
  4. Download and unpack this archive.
  5. Copy the RUU into the "Wizard_RUU" folder.
  6. Boot to Download Mode.
  7. Connect your phone with your PC via a USB cable.
  8. Run the ARUWizard.exe and follow the on-screen Instructions.
  9. Flashing may take some time. Your phone will power off at the end.
  10. Wait some seconds and then turn your phone on, again.
  11. First boot may take a while.
  12. Congrats! Your system is now stock and able to receive and install official OTAs, again.


Troubleshooting for RUU.exe files and the ARUWizard method:
  • Make sure that the HTC USB drivers are installed. Install the HTC Sync Manager if they aren't.
  • If the HTC Sync Manager is installed on your PC you should uninstall it. This won't affect the USB drivers.
  • Make sure that all needed Runtimes are installed.
  • If you aren't using the cable that came with your phone you should try the original one.
  • If you're using a USB 3.0 port you should try a USB 2.0 port.
  • If you're using a Windows 8/8.1/10 PC you should try a Windows 7 PC.
  • Try to run the RUU.exe/ARUWizard.exe as an admin if you didn't do so before.
  • Deactivate your PCs internet connection (this is only meant for your own safety) and disable your firewall and you antivirus program, afterwards. In some cases these programs block a RUU.exe/ARUWizard.exe.


Instructions for the HTC_Fastboot method:
  • Basically, you're doing manually with this method what a RUU.exe/ARUWizard is doing automatically.
  • A working ADB/Fastboot/HTC_Fastboot environment is mandatory.
  • Flashing a RUU will erase all personal data on your phone! Make a backup of everything you don't want to lose before you start flashing.

  1. Boot to download mode and look at the line with "OS" at the beginning for finding out your current firmware version.
    • The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running and might therefore differ from the real one in the download mode.
    • Remember that you can always flash newer RUUs as long as they use the same encryption key as your current firmware. (c.f. the important notes in this post)
  2. Download the correct RUU.zip for your phone.
  3. Copy the RUU into the folder that contains your ADB/fastboot/HTC_fastboot files on your PC.
  4. Boot to Download Mode.
    • That means: Power off the phone, wait some seconds and turn it on again while you keep volume down pressed until you see a black screen with red, blue and yellow text. If you see a white screen with multicoloured text then you're facing the Bootloader mode. In that case you can navigate to "Boot to Download Mode" with the volume keys and select the option with the power button.
  5. Connect your phone with your PC via a USB cable.
  6. Press and hold Shift on your keyboard.
  7. Right-click into the folder that contains your ADB/fastboot/HTC_fastboot files.
  8. Choose "open command window here".
    • If you're using the Win 10 Creator's update or any newer version then you need to choose "open powershell window here".
    • Type "start cmd" without the quotation marks and execute the command with pressing Enter on your keyboard.
  9. Copy'n'paste the command
    Code:
    htc_fastboot flash zip <enter name of the RUU.zip here>
    and execute it with Enter on your keyboard.
    Example for the European RUU 3.35.401.12:
    Code:
    htc_fastboot flash zip 0PJAIMG_HIMA_UHL_M60_SENSE70_HTC_Europe_3.35.401.12_Radio_01.01_U11440792_97.00.51203G_F_release_signed.zip
  10. Some firmware files will get flashed and you'll face error 90. Don't panic! This is completely normal and has already been like this for several older HTC devices.
  11. Execute the flashing command a second time.
  12. Flashing may take some time. Your phone will power off at the end.
  13. Wait some seconds and then turn your phone on, again.
  14. First boot may take a while.
  15. Congrats! Your system is now stock and able to receive and install official OTAs, again.


Download Links:
Sidenote: The SKU is part of your firmware version and located between the second and the third dot. Example: If 3.35.401.12 is your current firmware then you need to look for RUUs with SKU 401.

GSM RUUs
codename: hima_uhl - MID: 0PJA10000
SKU: 401 - CID: HTC__001, HTC__J15, HTC__102, HTC__Y13, HTC__A07, HTC__032, HTC__016, HTC__M27, HTC__002 or HTC__031
1.32.401.8
1.32.401.15
1.40.401.8
2.10.401.1
3.35.401.12
4.14.401.7 (MD5: 148A8AF99EBDC7B26B4B14C09179D6E0)
4.28.401.3

SKU: 708 - CID: HTC__622 or HTC__044

SKU: 709 - CID: HTC__621

SKU: 710 - CID: HTC__039, TELNZ001, OPTUS001 or VODAP021

SKU: 111 - CID: T-MOB101

SKU: 118 - CID: T-MOB009

SKU: 161 - CID: VODAP001, VODAP102, VODAP304, VODAP405, VODAPE17 or VODAPD18

SKU: 206 - CID: O2___001 or O2___102

SKU: 771 - CID: H3G__001, H3G__106, H3G__402 or H3G__G04

SKU: 61 - CID: ORANG001

SKU: 73 - CID: ORANG202
3.35.73.14 (MD5: 1d829788af3fa566a4aab70cc547707b)

SKU: 841 - CID: TELST001

codename: hima_ul / hima_ulatt - MID: 0PJA11000
SKU: 617 - CID: BS_US001 or BS_US002

SKU: 502 - CID: CWS__001

SKU: 599 - CID: HTC__332

SKU: 600 - CID: HTC__332

SKU: 631 - CID: ROGER001

SKU: 661 - CID: TELUS001

SKU: 1500 - CID: GLOBA001

SKU: 1530 - CID: VIDEO001

codename: hima_ul / hima_ultmus - MID: 0PJA12000
SKU: 531 - CID: TMOB010

codename: hima_uhl - MID: 0PJA13000
SKU: 425 - CID: HTC__058 or HTC__059

CDMA RUUs
codename: hima_whl - MID: 0PJA20000
SKU: 651 - CID: SPCS_001

SKU: 510 - CID: ACG__001

codename: hima_wl - MID: 0PJA30000
SKU: 605 - CID: VZW__001

SKU: 512 - CID: LRA__001

Other RUU Collections
Some more (but older) RUUs can be found on AndroidRUU

The Following 30 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
5th June 2015, 09:47 PM |#7  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

Common RUU Errors

  • This List is based on 5m4r7ph0n36uru's list in his HTC 10 De-branding guide. I only changed some phrasings so most credits go to him.

  • 07 RU_CID_FAIL: Your phone’s CID doesn't match the one that the RUU expects (c.f. its android-info.txt).
  • 10 RU_MODELID_FAIL: Your phone’s MID doesn't match the one that the RUU expects (c.f. its android-info.txt). You might be trying to flash a RUU for a completely different device if you face this problem.
  • 12 SIGNATURE FAIL: The phone expects an HTC signature and can't find one or found a wrong one. This error occurs if you try to flash a RUU that uses a different encryption key than the one your phone is using (e.g. firmware 3.x and older vs. 4.x).
  • 22 RU_HEADER_ERROR: Something is wrong with your *.zip. Check the MD5 sum of the downloaded file.
  • 23 PARSING IMAGE FAIL: Something is wrong with the image(s) within the *.zip.
  • 24 ANDROID-INFO FAIL: Something is wrong with android-info.txt within the *.zip.
  • 32 HEADER ERROR: The *.zip couldn't be read and unzipped properly. This seems to be the same as error 22.
  • 33 NOT KNOWN YET: This might indicate a hardware failure.
  • 35 FAILED (remote: 35 RU_PARTITION_NOT_SUPPORT <PartitionName>): This means you can’t flash an image in Download Mode as it has to be done in Bootloader Mode.
  • 41 WRONG MODEL ID: Seems to be the same as error 10.
  • 42 WRONG CUSTOMER ID: Seems to be the same as error 07.
  • 90 PRE-UPDATE FAIL: The RUU only flashed the aboot and you have to re-run the process immediately to flash all other partitions. HTC_fastboot auto-reboots on error 90.
  • 99 RU_UNKOWN_FAIL terrible mishap: This error often occurs if you're using a broken SD card for the SD card method.
  • 130 WRONG MODEL ID: Seems to be the same as error 10.
  • 132 SIGNATURE ERROR: Seems to be the same as error 12.
  • 155 INDICATES DIFFERENT THINGS:
    1. You need to relock the bootloader on a device with S-ON. (This only applies to devices that are older than the M9!)
    2. The RUU cannot be executed because your phone is S-ON and its Rom and/or Firmware version is newer than the one of the RUU.
  • 170 CHECK USB: The RUU won’t run because ADB isn't working properly.
  • 171 USB ERROR: This can happen when a RUU reboots the phone to Download Mode. For some reasons the device is losing its connection making a RUU flash virtually impossible. There is an incompatibility between USB 3/3.1 and Fastboot/ADB, as well as an issue with the Windows Device Detection on some Windows 10 builds. (According to Sneakyghost, there seems to be a fix for this, though.)
  • 255: This error often occurs if you're using a broken SD card for the SD card method.

The Following 2 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
7th June 2015, 09:55 AM |#8  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

TWRP Backup Section I

General Infos:
  • TWRP Backups can be used for getting back to stock if there is no RUU availabe you could use for the same purpose.
  • However, the TWRP Backup needs to contain the Boot Image, the Stock Recovery and a System Image that has never been mounted as read/write. If a backup only contains the needed Boot Image and the System Image you'll need to reflash the Stock Recovery manually, afterwards.
  • You should always check whether a RUU or a TWRP backup for your current firmware version is available before you start flashing.
  • If neither is available you need to create your own backup using the instructions in this post. (And hopefully you're going to upload it afterwards so that it can be shared with us. )

Important Notes:
  • Check whether we already have a backup for your current firmware in TWRP section II before you start uploading your own. Otherwise, you might waste your time since there is no need for more than one publicly available backup per firmware version.

Instructions:
  • Windows 7/8.0/8.1/10 is required.
  • You need an unlocked bootloader. Aside from that the M9 needs to be completely stock.
  • The instructions only work on firmware version 3.x or 4.x. Older firmware versions aren't able to boot to TWRP without flashing it in Download Mode.
  • The latest 7-zip version is needed.
  • The offical TWRP 3.2.2-0 version is needed.
  • An exfat-formatted SD card for your phone (at least 8 GB) is needed, as well. Use your PC for formatting.
  • A working ADB/Fastboot/HTC_Fastboot environment is mandatory.

  1. Connect your M9 with your PC using a USB cable.
  2. Boot to Bootloader Mode. NOT Download Mode.
    • That means: Power off the device, wait some seconds and turn it on again while you keep both volume buttons pressed until you see a white screen with multicoloured text. If you see a black screen with red, blue and yellow text then you're facing the download mode. In that case you can navigate to "reboot to bootloader" with the volume keys and select the option with the power button.
  3. Open the folder that contains your ADB/fastboot/HTC_fastboot files on your PC.
  4. Press and hold Shift on your keyboard.
  5. Right-click into the folder.
  6. Choose "open command window here".
    • If you're using the Win 10 Creator's update or any newer version then you need to choose "open powershell window here".
    • Type "start cmd" without the quotation marks and execute the command with pressing Enter on your keyboard.
  7. Use the command
    Code:
    fastboot boot twrp-3.2.2-0-hima.img
    (execute it with Enter on your keyboard).
  8. Wait a bit. TWRP should boot on your M9 after some minutes.
  9. DO NOT SWIPE! Choose "keep system mount read-only".
  10. Open the Backup menu.
  11. Backup "Boot", "System Image" and "Recovery" on the external SD card.
  12. Copy the Backup (the whole folder - not only the files inside of the folder) to your PC.
  13. Rename the Backup folder according to the firmware version of your phone. Example: Stock_Backup_4.14.401.7
  14. Righ-click onto the Backup folder.
  15. Choose "7-zip>add to an archive".
  16. Choose "ok".
  17. Upload the archive to a free filehoster like AFH.
    • AFH is recommended since it's free and states the MD5 sum of the uploaded files. This way you can check whether the file got damaged during the upload or not. In addition, others can verify whether the file got damaged during their download.
  18. Post the download link here in this thread.

The Following 26 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
7th June 2015, 10:18 AM |#9  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

TWRP Backup Section II


Important Notes:
  • These Instructions got originally written for my Google sheet and my own backups. However, they can be used with every TWRP Backup that contains a System Image that has never been mounted as read/write, the corresponding Boot Image and the corresponding Stock Recovery.
  • If a backup lacks the corresponding Stock Recovery you might need to flash it manually.
  • On the other hand, if you want to keep TWRP you mustn't restore "Recovery".
  • Be aware that it's possible to flash OTAs with TWRP if you are at least on firmware 3.x and using at least the official TWRP version 3.1.0-0. For more information read the OTA section.
  • If you can't fulfill these two requirements you need to restore the Stock Recovery and an untouched System Image (e.g. with the instructions in this post) for being able to receive/install OTAs. Otherwise any Update will fail since Google introduced Block-based OTAs with android 5.

Instructions:
  • Be aware that you need an external SD card for your phone. In contrast to the RUU method, there is no size limit for the card if you want to restore a Backup.
  • There is no need to lock or re-lock the bootloader if you use this method.
  • If you follow my instructions all your personal data will be erased so backup everything that is important (e.g. contacts, messages, pictures, etc.)!

  1. Format your SD card with a PC to exfat and put it back into your phone.
  2. Boot to TWRP.
  3. Create a backup on your external SD card.
    • Backing up "Boot" is more than enough. We only want TWRP to create the needed directories on your SD card.
  4. Download the correct backup for your firmware version.
    • Boot to Download Mode. It is stated in the line with "OS" at the beginning. The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running.
    • In contrast to RUUs, you mustn't use TWRP backups that are newer than your current firmware.
  5. Unzip the downloaded backup.
  6. Copy the unzipped backup folder to "TWRP/BACKUPS/<YourSerialnumber>/"on your SD card.
    • Sometimes this is only possible if the SD card is directly connected to your PC and not put into your phone. I don't know why some M9s refuse the copy process.
  7. I recommend wiping everything except "Micro SDcard", "USB-OTG" and "SD-Ext".
  8. Check the "Mount system as read-only" box in the Mount menu.
  9. Restore the backup.
  10. Boot to system (ignore the warning that no OS is installed). This process may actually take a while!
  11. Congrats! Your system is now stock and able to receive and install official OTAs, again.


Download Links:
Sidenote: The SKU is part of your firmware version and located between the second and the third dot. Example: If 3.35.401.12 is your current firmware then you need to look for Backups with SKU 401.

GSM Backups
codename: hima_uhl - MID: 0PJA10000
SKU: 401 - CID: HTC__001, HTC__J15, HTC__102, HTC__Y13, HTC__A07, HTC__032, HTC__016, HTC__M27, HTC__002 or HTC__031

SKU: 708 - CID: HTC__622 or HTC__044

SKU: 709 - CID: HTC__621

SKU: 710 - CID: HTC__039, TELNZ001, OPTUS001 or VODAP021

SKU: 111 - CID: T-MOB101

SKU: 161 - CID: VODAP001, VODAP102, VODAP304, VODAP405, VODAPE17 or VODAPD18

SKU: 206 - CID: O2___001 or O2___102

SKU: 771 - CID: H3G__001, H3G__106, H3G__402 or H3G__G04

SKU: 73 - CID: ORANG202

SKU: 75 - CID: ORANG309

SKU: 1020 - CID: HTC__247

codename: hima_ul / hima_ulatt - MID: 0PJA11000
SKU: 617 - CID: BS_US001 or BS_US002

SKU: 502 - CID: CWS__001

codename: hima_ul / hima_ultmus - MID: 0PJA12000
SKU: 531 - CID: TMOB010

codename: hima_uhl - MID: 0PJA13000
none contributed to this thread, so far

CDMA Backups
codename: hima_whl - MID: 0PJA20000
none contributed to this thread, so far

codename: hima_wl - MID: 0PJA30000
none contributed to this thread, so far

Other Backup Collections
Back to Stock Files for Canadian Users

The Following 18 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
11th June 2015, 10:34 AM |#10  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

Stock Recovery Section

Important Notes:
  • Things you might know from older HTC devices don't apply to the M9 since google introduced Block-based OTAs with android 5.
    • In other words: You can't install OTAs if you simply un-root and re-flash the Stock Recovery of your current firmware. Further information can be found in the OTA section.
  • Many of the TWRP Backups in this thread already contain the corresponding Stock Recovery.
    • However, if you need to restore a Backup that lacks the Stock Recovery you can use the instructions in this post for restoring/flashing it. It doesn't matter which method you choose.
  • Use the Universal Decryption Tool if you want to extract a Stock Recovery from a RUU.zip or a RUU.exe file.

Instructions for flashing the Stock Recovery via TWRP:
  • You'll need an external SD card. There is no size limit and it doesn't matter whether the card is formatted to fat32 or exfat.

  1. Boot to TWRP.
  2. Download the correct Stock Recovery for your firmware version.
    • Boot to Download Mode. The firmware version is stated in the line with "OS" at the beginning. The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running.
  3. Copy the Stock Recovery to the root/main directory on your SD card.
    • Sometimes this is only possible if the SD card is directly connected to your PC and not put into your phone. I don't know why some M9s refuse the copy process.
  4. Choose "Install" in the TWRP main menu.
  5. Choose "Install Image" at the bottom of the screen.
  6. Choose the Stock Recovery and install it by swiping the slider.
  7. Congrats! TWRP will be replaced with the Stock Recovery as soon as you reboot your device.


Instructions for restoring the Stock Recovery via TWRP:
  • You'll need an external SD card. There is no size limit and it doesn't matter whether the card is formatted to fat32 or exfat.
  • Step 2 can be skipped if the directories already exist on your SD card.

  1. Boot to TWRP.
  2. Create a backup on your external SD card.
    • Backing up "Boot" is more than enough. We only want TWRP to create the needed directories on your SD card.
  3. Create a folder on your desktop and rename it to "Stock Recovery".
  4. Download the correct Stock Recovery for your firmware version and copy it into the "Stock Recovery" folder.
    • Boot to Download Mode. The firmware version is stated in the line with "OS" at the beginning. The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running.
  5. Rename the Stock Recovery to "recovery.emmc.win". (Make sure that file extensions are visible so that you don't rename the file to "recovery.emmc.win.img"!)
  6. Copy the "Stock Recovery" folder to "TWRP/BACKUPS/<YourSerialnumber>/" on your SD card.
    • Sometimes this is only possible if the SD card is directly connected to your PC and not put into your phone. I don't know why some M9s refuse the copy process.
  7. Restore the Stock Recovery.
  8. Congrats! TWRP will be replaced with the Stock Recovery as soon as you reboot your device.


Instructions for flashing the Stock Recovery via Fastboot:

  1. Download the correct Stock Recovery for your firmware version.
    • Boot to Download Mode. The firmware version is stated in the line with "OS" at the beginning. The "firmware version" in "settings>about>software information>more" is only the base of the (custom) rom you are running.
  2. Copy the Stock Recovery into the folder that contains your ADB/fastboot/HTC_fastboot files on your PC.
  3. Boot to Download Mode.
    • That means: Power off the phone, wait some seconds and turn it on again while you keep volume down pressed until you see a black screen with red, blue and yellow text. If you see a white screen with multicoloured text then you're facing the Bootloader mode. In that case you can navigate to "Boot to Download Mode" with the volume keys and select the option with the power button.
  4. Connect your phone with your PC via a USB cable.
  5. Press and hold Shift on your keyboard.
  6. Right-click into the folder that contains your ADB/fastboot/HTC_fastboot files.
  7. Choose "open command window here".
    • If you're using the Win 10 Creator's update or any newer version then you need to choose "open powershell window here".
    • Type "start cmd" without the quotation marks and execute the command with pressing Enter on your keyboard.
  8. Copy'n'paste the command
    Code:
    fastboot flash recovery <enter name of the Stock Recovery here>
    and execute it with Enter on your keyboard.
    Example for the European 3.35.401.12 Recovery:
    Code:
    fastboot flash recovery 3.35.401.12-recovery-signed.img
  9. Congrats! TWRP got replaced with the Stock Recovery.


Download Links:
Sidenote: The SKU is part of your firmware version and located between the second and the third dot. Example: If 3.35.401.12 is your current firmware then you need to look for Recoveries with SKU 401.

GSM Stock Recoveries
codename: hima_uhl - MID: 0PJA10000
SKU: 401 - CID: HTC__001, HTC__J15, HTC__102, HTC__Y13, HTC__A07, HTC__032, HTC__016, HTC__M27, HTC__002 or HTC__031

SKU: 708 - CID: HTC__622 or HTC__044

SKU: 709 - CID: HTC__621

SKU: 710 - CID: HTC__039, TELNZ001, OPTUS001 or VODAP021

SKU: 111 - CID: T-MOB101

SKU: 161 - CID: VODAP001, VODAP102, VODAP304, VODAP405, VODAPE17 or VODAPD18

SKU: 206 - CID: O2___001 or O2___102

SKU: 73 - CID: ORANG202
3.35.73.14 (MD5: 1c141f3d906ea535b9682cc73889615c)
4.23.73.1 (MD5: 819514486aca4101725ccedf1c501908)

codename: hima_ul / hima_ulatt - MID: 0PJA11000
SKU: 617 - CID: BS_US001 or BS_US002
1.32.617.6
1.32.617.30
2.8.617.4
3.35.617.12
4.14.617.6
4.19.617.1 (MD5: 49B8AA1F027E32B3615B44E492E94F9B)
4.23.617.1 (MD5: E1AFEA5C70BA0C7B5FC3C15F860BE0C6)
4.27.617.2 (MD5: 06750D1CD2F17ADE1567DCA9AB5DFD8C)

SKU: 502 - CID: CWS__001

codename: hima_ul / hima_ultmus - MID: 0PJA12000
none contributed to this thread, so far

codename: hima_uhl - MID: 0PJA13000
none contributed to this thread, so far

CDMA Stock Recoveries
codename: hima_whl - MID: 0PJA20000
none contributed to this thread, so far

codename: hima_wl - MID: 0PJA30000
none contributed to this thread, so far

The Following 25 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
11th June 2015, 10:34 AM |#11  
Flippy498's Avatar
OP Retired Forum Moderator
Thanks Meter: 2,665
 
Donate to Me
More

OTA Section

General Infos:
  • The OTAs (Over The Air Updates) in this section are *.zip archives provided by HTC which are needed for updating the stock rom and the firmware of your HTC One M9. Normally you would download them via "settings>about>software updates".
    • OTAs are incremental. That means you can't directly update to the latest firmware if your phone is two or more versions older than the latest version. You'll need to install each update that ever got distributed.
  • Prerequisites for being able to install them (if you're using firmware 1.x or 2.x) are a completely unmodified System partition which has never been mounted as read/write and the corresponding Stock Recovery.
    • In other words: You aren't able to install an OTA if you simply un-root your phone and re-flash the Stock Recovery.
  • You can either restore one of the TWRP Backups or flash a RUU for restoring your System partition. Make sure that you follow the instructions in the dedicated sections.
  • Thanks to @nkk71 and @Captain_Throwback you can install OTAs with TWRP if you're at least using firmware 3.x and the official TWRP version 3.2.2-0.
    • The needed information/instructions can be found here and here.
    • Be aware that even on firmware 3.x and newer a completely unmodified System partition is a must-have if you want to install an OTA.

Important Notes:
  • It's always safer to update via "settings>about>software updates".
    • The worst thing that might happen in that case is that the OTA aborts. If you manually flash an OTA with S-ON and the flash fails you might end up with a non-booting phone. In addition you won't be able to use RUUs for the firmware version that has been installed on your phone before you started flashing the OTA. If you're unlucky there might not be a RUU for the newer firmware version and you can't recover your phone without having to pay for help.
  • Things you might know from older HTC devices don't apply to the M9 since google introduced Block-based OTAs with android 5.
  • If you want to contribute OTAs and don't know how to extract them you might want to check out this guide.
    • Although it's written for the HTC 10 its instructions can be used with the M9, as well.
    • Re-uploading OTA files isn't needed. Just post HTC's download link in this thread.
  • Be aware that there have been several reports that it's not possible to receive/install OTAs while using the SuperCID (11111111). So make sure you use a CID that corresponds to the OTA you want to install.
  • There is no need for (re-)locking the bootloader if you want to install OTAs. I actually discourage everyone from getting back to a (re-)locked state.
    • Read the warning I posted in the RUU section for further information.

Download Links:
Sidenote: The SKU is part of your firmware version and located between the second and the third dot. Example: If 3.35.401.12 is your current firmware then you need to look for OTAs with SKU 401.

GSM OTAs
codename: hima_uhl - MID: 0PJA10000
SKU: 401 - CID: HTC__001, HTC__J15, HTC__102, HTC__Y13, HTC__A07, HTC__032, HTC__016, HTC__M27, HTC__002 or HTC__031

SKU: 708 - CID: HTC__622 or HTC__044

SKU: 709 - CID: HTC__621

SKU: 710 - CID: HTC__039, TELNZ001, OPTUS001 or VODAP021

SKU: 111 - CID: T-MOB101

SKU: 161 - CID: VODAP001, VODAP102, VODAP304, VODAP405, VODAPE17 or VODAPD18

SKU: 206 - CID: O2___001 or O2___102

SKU: 771 - CID: H3G__001, H3G__106, H3G__402 or H3G__G04

SKU: 73 - CID: ORANG202

SKU: 75 - CID: ORANG309

SKU: 1020 - CID: HTC__247

SKU: 841 - CID: TELST001

codename: hima_ul /hima_ulatt - MID: 0PJA11000
SKU: 617 - CID: BS_US001 or BS_US002

SKU: 669 - CID: SASKT001

codename: hima_ul / hima_ultmus - MID: 0PJA12000
none contributed to this thread, so far

codename: hima_uhl - MID: 0PJA13000
none contributed to this thread, so far

CDMA OTAs
codename: hima_whl - MID: 0PJA20000
none contributed to this thread, so far

codename: hima_wl - MID: 0PJA30000
none contributed to this thread, so far

The Following 9 Users Say Thank You to Flippy498 For This Useful Post: [ View ] Gift Flippy498 Ad-Free
Post Reply Subscribe to Thread

Tags
backup, instructions, ota, ruu, stock

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes