HTC's upcoming flagship for 2015 is only weeks away, and while it may not be the most groundbreaking smartphone to launch this year, there will undoubtedly be a good number of loyal HTC fans and those just generally interested in picking up the device, perhaps as their first HTC product either ever or in some time, that will be looking to purchase it. With the launch of the HTC One M9 imminent, the inevitable question for those who like to tinker will be how to unlock the bootloader, although those who like to tinker may already have some grasp on how to complete this process. This helpful little tutorial is going to be more for those who would consider this uncharted territory. It's also worth noting that should you choose to go through with this process, you alone are liable for anything that happens to the device if steps are completed incorrectly or if anything happens to your phone.
First and foremost, why would you want to unlock the bootloader for the phone? Simple. So you can root the device and open up the device's capabilities to flashing custom ROMs, kernels, and using "Root Required" apps. Even prior to the phone being released to the public the bootloader is already equipped to handle an unlocking process, and it really isn't too difficult to do so long as you follow the steps to the letter. Before you decide to begin this process, it's important to know that unlocking the bootloader will wipe the data on your device, so make any necessary backups to your computer or another storage drive, and it will void the warranty of the device, although there are likely in time (if there aren't already) going to be ways one could relock the bootloader. That however, is a subject for another time. For now we'll focus on the unlocking process, which in this case, is the method for a Windows-based machine.
The first step begins with installing HTC Sync, you'll need this software to connect your device to your computer when you hook it up with the USB cable. Once you have that installed, you'll also need to make sure that you have the correct minimal ADB and Fastboot files installed as well. If you aren't sure where to grab these, do a quick Google search as you should be able to find them rather quickly. If you care not to search, you can click this link and get the files here. Next, go to the HTC Developer website and register an account if you haven't already done so. Once you're logged into the site, there is a simple Unlock bootloader option you can use to begin the process, make sure your device is already connected to your computer when you do this. The next step is a little more involved than the last few, but stay with us.
At this point, when the process started on the HTC Developer site is finished, you should be prompted to disconnect your HTC One M9 from the USB cable connected to the computer, then power off the device and then press and hold the volume down key plus the power button after the device has been powered off for at least 10 seconds. Hold down these two buttons until you see the words "locked" on the screen, along with the words Fastboot, Recovery, ETC. Use the volume down key to move the cursor and highlight Fastboot, then press the power button to select Fastboot, and then reconnect the HTC One M9 to the USB cable connected to your computer. If the drivers were properly installed following the installation of the latest HTC Sync software, the word Fastboot should switch to Fastboot USB.
Next, find the folder where you downloaded the minimal ADB and Fastboot files to, hold down the shift key and right-click in an empty spot in the folder, then select "open command window here" to open up the command prompt. In the command prompt, type the following: fastboot oem get_identifier_token.(without the period of course, and make sure the spaces and underscores are included)After you do this you should see the words Identifier Token Start pop up in the box. Below this will be a large series of letters and numbers, and the words Identifier Token End at the end of the string. Copy everything but the words Identifier Token Start, and Identifier Token End. Also make sure not to copy the headers which are the arrow symbols you see. From here go back to the HTC Developers website and paste the copied token into the "My Device Identifier Token" area and hit the submit button. If you receive an email from HTC with a .bin file attachment marked "Unlock_code.bin" then so far so good.
Download the file from this email and place into the same folder where you downloaded the minimal ADB and fastboot files to, open a new command prompt within this folder just like before and then type the following: fastboot flash unlocktoken Unlock_code.bin.(Without the period here too, and again make sure to enter in the spaces and the underscore) From here, you should see a message pop up on screen asking you to confirm the bootloader unlock process, simply use the volume down key to navigate to that option and highlight it, then select it using the power button just as you did before when entering into fastboot. At this point, the phone should reboot and you should have an unlocked bootloader. That's it, now that your device is unlocked, you can proceed to rooting it and throwing on a custom ROM when they become available.