[How to]Root - Install cwm/twrp - Install a custom kernel - Install a custom rom

Do you have a Singel Sim or Dual Sim Desire 500?

  • Single SIim

    Votes: 237 65.8%
  • Dual Sim

    Votes: 123 34.2%

  • Total voters
    360
Search This thread

dummie999

Senior Member
Mar 2, 2014
721
413
A complete guide on rooting your HTC Desire 500, both single sim and dual sim.
Sorry for my English!

Before you begin, you might want to check for updates on your phone, because it is harder to install an update after your phone is unlocked.

If you see any english mistakes, please pm me about them. English is not my native tongue.

The steps:
1. Unlock the bootloader via htcdev.com
2. Flash a custom recovery, ClockWorkMod or TeamWinRecoveryProject
3. Flash SuperSU
4. Flash a kernel without system write protection

Alternatively:
1. Flash a custom rom
2. Simunlock your device
3. Install Busybox
4. Install an ota upgrade

Everything is at your own risk!
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
[How to]Unlock the bootloader

On HTC phones, by default, you can not replace a partition on the phone from your computer. To enable this, your phone has to be Unlocked.
There is a very good video guide about this, made by @Fliwatt: http://www.youtube.com/watch?v=yWLK5XhsVAE

Unlocking your bootloader will wipe all your data!
Unlocking your bootloader may void your warranty!


It is, however, necessary to root your phone. Currently, there is no other way to unlock the phone or install a custom recovery.

To start, go to http://www.htcdev.com
Then in the top bar, click register. Create an account and fill in all your data. You will get an e-mail from HTC and your account will be activated.

Once you are logged in on the site, you need to go to "Unlock bootloader", and then click get started. On the right, you see a dropdown box. Click it, and select "All Other Supported Models", then click "Begin Unlock Bootloader"

Next install fastboot. I'm not gonna hold your hand here, there are 400+ tutorials on installing fastboot, for every OS you can think of. Search for one and install it.
And, if you are on windows, then install HTC sync as well, pretty basic, even a Windows user should be able to do it;)

Next, on your phone, got to Settings->Battery and scroll down. There, disable the checkbox "fast boot" (not to confuse with fastboot, that's something entirely different).

Once you have done that, shut down your phone, then hold the volume down button, and the power button. This is commonly referred to as "booting into fastboot".
To move around in the fastboot menu, you need the volume keys to go up and down, and the power keys to select an option.

If the options you can choose from are:
FASTBOOT
RECOVERY
FACTORY RESET
SIMLOCK
SHOW BARCODE
then you need to navigate to fastboot, and then hit the powerkey.
The option you can choose from must be:
BOOTLOADER
REBOOT
REBOOT BOOTLOADER
POWER DOWN

Then, on your computer, type:
Code:
fastboot oem get_identifier_token
Your output will be something like:
Code:
...
(bootloader)    
(bootloader) < Please cut following message >
(bootloader) <<<< Identifier Token Start >>>>
(bootloader) 2ADE05B9466F0DD398559C7B5A6D636F
(bootloader) 70E8FB65B9523AE73B8A22DDCD0092A2
(bootloader) D52C617B971383374332044C0D04C492
(bootloader) 707A43C4AAEC77A36DDE3060F7665574
(bootloader) 22453BF1F9FDCA6E2118385B96A3C88B
(bootloader) 4FE90D89BC086A9E9B0EA2086456D658
(bootloader) 5831DBA6ADF940D3B0DD0618B745DD18
(bootloader) AE37DC63341E4CBC66A8ACCB494E6AEE
(bootloader) 5982C1432A5C5535836953243D6B8353
(bootloader) 648EFDFD3B5F0C6D47987A0F47BC1A9F
(bootloader) 0ABF9438C059A604832ABB87696CFDD7
(bootloader) 1847D317701DC2C140294FD486109872
(bootloader) 559EE22C73E4F2F9B00AF03FB12A9F9D
(bootloader) 61DFDDD3FAB40CD8537F300078566632
(bootloader) 2142B7EC56E99DD8C4DFB1B819F9F449
(bootloader) 9B2DB0EA3E2FB18C293BD246012909ED
(bootloader) <<<<< Identifier Token End >>>>>
OKAY [  0.076s]
finished. total time: 0.076s
Don't use this code, it won't work. Do it yourself!

Troubleshoot:

Problem: I get
Code:
...
FAILED (status malformed (1 bytes))
finished. total time: 0.000s
Solution: Select the fastboot option with the powerkey.

Copy the relevant part to the HTC dev site, and submit your token. You will (should) get an e-mail that contains your unlock code. Save the attachment (Unlock_code.bin) to a location where you can find it.

Next type:
Code:
fastboot flash unlocktoken Unlock_code.bin
If you are in the same location as your unlock code, of course.

On your phone, you will now see a screen where you have to confirm that you want to unlock your phone, and that it will wipe all your data, and may void your warranty. Use the volume buttons and the power button to choose what you want.

If you selected that you want to unlock your device, then:
Congrats, your bootloader is unlocked

But hold it, before you reboot your phone to confirm that you will have to re-type your very long wifi password, you might as well continue to installing a custom recovery:
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
[How to]Install a custom recovery

This is actually quite easy, if you just unlocked your bootloader. The only trick will be selecting the right recovery to flash ;)


Now, there are two three things you need to think about when choosing a recovery:
1. Do you have hboot 1.03 or a lower version
2. Do you want ClockWorkMod or TeamWinRecoveryProject (both are usually abbreviated as you might expect)
3. Do you have dual sim or single sim

1. To check your hboot version, boot your phone into fastboot mode (you got this, check the post up there ^). The third line will be something like:
HBOOT-1.02.0001 or HBOOT-1.01.0001 or HBOOT-1.03.0001. As you might have guessed, this is your hboot:rolleyes:
2. cwm or twrp, that's the question.
Cwm is a no touch recovery. That means you have to use the powerbuttons/volumebuttons to move around which is quite annoying. Twrp however, is a touch recovery, much easier to use.
But with twrp, adb doesn't work, which can sometimes be useful if you are a developer. (twrp is not (yet) available for dual sim).



So, it's your choice: twrp or cwm. If you have single sim, you can pick both, if you have dual sim, you can only get cwm.
Downloads:
hboot 1.02 and below:
Both sims:
ClockWorkMod
Single sim:
TeamWinRecoveryProject
Credits for cwm go to @SPSPaWn and credits for the fix of the dancing screen go to @galaxyfreak
(credits for twrp go to me)
Now, assuming your phone is still in fastboot:
Code:
fastboot flash recovery recovery.img
Or recovery_cwm.img etc. I assume you get it.

Wait for it to finish, and then hit BOOTLOADER, and then click one down to RECOVERY, and select it. Your phone should now boot into recovery.

Congrats, you now have a custom recovery!

Now, before jumping with joy because you did it, there is one thing you should do before you do anything else!
Make. A. Backup.
Not optional. You need to have a sdcard in your phone. On twrp, touch backup and follow the onscreen instructions (backup all the partitions that are already checked)
On cwm, you will have to use the volume buttons to scroll down to backup and restore, then select backup, and it should begin immediately.

It can take a very long time, depending on your sdcard.


-very long time-


Now, you are ready to actually root your phone.
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
[How to]Root your HTC Desire 500

Once you have your recovery installed, you can actually root your phone.
Reboot your phone, then download SuperSU, and put it on your sdcard. Then boot into your new recovery another time. Select either "Install" or "Install zip", then install zip from sdcard, and select the SuperSU.zip you downloaded earlier.
Congrats! You now have (partial) root!

Yes, you are not done yet. As an extra layer of security, htc prevents you from editing the system partition, with something called system write protection. To get it away, you need to install a custom kernel.
First, check your software version. You can do this by going to "Settings"->"About Phone"->"Software version".
Mine, for example, is: 1.32.401.3
Now, if your software version starts with 1.20 or something lower, then you must install the Kangbang kernel, else, install the Ultimate kernel.

To install the Kangbang kernel, go here. But the installation instructions are slightly different, basically the only thing you have to do is mount /system, and then flash the zip. Don't forget to mount system!

For installation instruction on flashing the Ultimate Kernel, go here.
Remember, you already flashed a superuser app.

Troubleshoot:
Problem: After installing the kernel I cannot make phone calls
Solution: Install the right kernel, according to your software version


Once you have one of the kernels installed, then your phone is fully rooted!
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
[How to]Install an ota upgrade

After unlocking your bootloader, the installation of ota (over the air) upgrades fails, because it requires a locked bootloader.
Steps to install the upgrade anyway:

Part 1:
First, you need to download the ota. Next, pull the zip to your computer, it should be located in your downloads folder.
Next, open the zip and remove the file firmware.zip, you will need it later. Next, open in the zip the file META-INF/com/google/android/updater-script. There, you need to remove this part:
Code:
ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
assert(check_cid(getprop("ro.cid"), "00000000" , "11111111" ,
"22222222" , "33333333" , "44444444" , "55555555" , "66666666" ,
"77777777" , "88888888" , "99999999" , "HTC__001" , "HTC__E11" ,
"HTC__102" , "HTC__032" , "HTC__Y13" , "HTC__M27" , "HTC__A48" ,
"HTC__J15" , "HTC__203" , "HTC__304" , "HTC__N34" , "HTC__405") == "t");
);
ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
assert(check_mid("full", "0P3Z11200") == "t");,
assert(check_mid("simple", "0P3Z11200") == "t");
);
assert(getprop("ro.product.device") == "z4u" ||
getprop("ro.build.product") == "z4u");
What you find might slightly different. For example, z4u might be z4dug, if you are on dual sim. But it usually starts at the second line of the file, so it should be to hard to find.
Then, restore the first nandroid back-up you made, because the ota checks if the files on your system partition are modified.
Next, you push the zip back to the sdcard again, and then flash it via your custom recovery.

Part 2:
While you are still in your recovery, make a backup of only your data partition! Don't make a backup of your complete system!
Now, to flash the firmware.zip, you need to lock your bootloader. Because you will have to re-unlock your bootloader after you are done, you will lose all your data again. If you are S-off, then you don't have to relock your bootloader, you can skip this.

How to re-lock your bootloader:
1. In recovery, select: Reboot Bootloader
2. Connect your phone to fastboot
3. Type: fastboot oem lock
That was easy! Your phone, however, might not boot. Don't worry about that, we will fix that later.

Now, type:
Code:
fastboot oem rebootRUU
fastboot flash zip firmware.zip
This can take a short while.
Next:
Code:
fastboot reboot
You now have flashed the firmware.zip

Congrats, you have the ota installed.
It might be a good idea to keep your modified ota around, you might need it later on.

Now, you can unlock your bootloader again (htc dev, second post), check your hboot version again, install a custom recovery again (make a new backup. Don't throw away your old backup), root your phone again etc.
You can now install The Ultimate Kernel!

Credits go to @ricardo-nl, this post http://xdaforums.com/showthread.php?t=2597314&page=45

To do: Make a cool bash/awk script that removes all the assert(), so the updating won't fail if you have deleted some system files.
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
[How to]Simunlock

To sim unlock your device, you need to have CWM on your device and you need to have adb installed.
It doesn't work with twrp, because adb doesn't work.
Boot your device into cwm. Connect your device to your computer (with the cable:p), and connect with:
Code:
adb shell
then, type:
Code:
strings -n 8 /dev/block/mmcblk0p7
The output will be a lot of rubbish, but you need to
look for a 8 digit combination that MAKES SENSE for a CODE.
And In the case of ATRAC3, it was K65151479, so his unlock code was 65151479. I haven't tested this myself, because my device was never sim locked, but it should work.
Full credits for this go to @ATRAC3, this post.
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
[How to]Get a logcat and a dmesg

Well, everything is done and working. You have rooted your phone, installed a custom kernel and a custom rom, and everything is working fine.

But, then, at once, you get: "unfortunately camera has stopped" and your camera app refuses to start. And now, when you tell the dev that the camera is not working, he replies:
So, I'll explain what they both are:
dmesg - This is basically a print of /devlog/kernel_log. All the messages from the kernel get stored there. If you think a problem is kernel related, you should at least include this.
logcat - This is a print of /devlog/system_log. All other messages get stored there. If you think something is related to a rom, you should at least include it.

It requires you to have adb installed.

How to get one:
1. Enable adb on your phone. Go to Settings->Developer Options->enable it->enable USB-debugging
2. Next, connect your phone with a cable, and type (on the computer cmdline): adb devices
You should see something like: SH3BRWE00258 device. This means your phone is succesfully connected.

If you want a logcat, now type: adb logcat > logcat
This stores all the logs in logcat. You have to let this run for a few seconds, and then hit ctrl+c. Then, there should be a file called logcat, containing, well, your logcat.

If you want a dmesg, type: adb shell
Then, you need to check, whether the text you see ends with a #. If it doesn't, type: su, and then unlock your phone. You might see a warning, asking for superuser access, grant it.
If you are sure it ends with #, then type: dmesg > storage/sdcard0/dmesg
The dmesg is then stored on your sdcard (called dmesg), pull it to your computer and post it on the forums.
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
Tips for further reading

Some places where you might want to look for more info:
1. http://xda-university.com/ is a good start. Read the "As a user", and perhaps the "As a developer" as well.
2. http://xdaforums.com/showthread.php?t=1877040 a good guide on github
3. http://xdaforums.com/showthread.php?t=1680928 and http://www.htcdev.com/bootloader/about_unlock_process Some info about S-off and why you probably don't need it.

A word about posting a proper question:

be short, but post everything, for example:
bad:
My recovery doesn't work
ok:
I installed the recovery_cwm.img from this thread but the backup doesn't work, i'm on hboot 1.02 btw
better:
Making a backup of /system doesn't work in cwm. Steps:

unlocked htcdev
fastboot flash recovery recovery_cwm.img
hboot: 1.02
software version: 1.32
kernel: whatever@kernel
This way I don't have to ask "what is your hboot version" etc.
 
Last edited:

SpliFFdu95240

Senior Member
Oct 23, 2010
231
28
Thank you for this topic .

It s time for me to try the custom rom and kernel .

Just for that : "Next install fastboot. I'm not gonna hold your hand here, there are 400+ tutorials on installing fastboot, for every OS you can think of. Search for one and install it."

It s in the video of Fliwatt ( 3,40 ). Everything is explain . With your post and the video , everybody can do that . (So don t need to install sdk tool ? It s just for the adb files , right ? )

Thank you

And, Htc sync is htc sync manager ? ( the link is broken on htc : www.htc.com/www/help/ )
 
Last edited:

dummie999

Senior Member
Mar 2, 2014
721
413
Thank you for this topic .

It s time for me to try the custom rom and kernel .

Just for that : "Next install fastboot. I'm not gonna hold your hand here, there are 400+ tutorials on installing fastboot, for every OS you can think of. Search for one and install it."

It s in the video of Fliwatt ( 3,40 ). Everything is explain . With your post and the video , everybody can do that . (So don t need to install sdk tool ? It s just for the adb files , right ? )

Thank you

And, Htc sync is htc sync manager ? ( the link is broken on htc : www.htc.com/www/help/ )

Yes, htc sync is htc sync manager
Sorry for my late reply
Yes, with fliwatts video everyone can do it!
 
  • Like
Reactions: SpliFFdu95240

hamedkh

Member
Jul 12, 2014
12
0
?

A complete guide on rooting your HTC Desire 500, both single sim and dual sim.
Sorry for my English!

Before you begin, you might want to check for updates on your phone, because it is harder to install an update after your phone is unlocked.

If you see any english mistakes, please pm me about them. English is not my native tongue.

The steps:
1. Unlock the bootloader via htcdev.com
2. Flash a custom recovery, ClockWorkMod or TeamWinRecoveryProject
3. Flash SuperSU
4. Flash a kernel without system write protection

Alternatively:
1. Flash a custom rom
2. Simunlock your device
3. Install Busybox?

The part about the rooting and simunlock are finished, the rest isn't.

Everything is at your own risk!

how can install an update after phone is unlocked? u said its hard not imossible,right?

---------- Post added at 09:39 PM ---------- Previous post was at 09:13 PM ----------

how can install an update after phone is unlocked? u said its hard not imossible,right?

actually i just unlocked my phone and now i want update software from 1.20 to 1.32. is there any hope? what can i do?
 

dummie999

Senior Member
Mar 2, 2014
721
413
how can install an update after phone is unlocked? u said its hard not imossible,right?

---------- Post added at 09:39 PM ---------- Previous post was at 09:13 PM ----------



actually i just unlocked my phone and now i want update software from 1.20 to 1.32. is there any hope? what can i do?

It is not impossible. The 6th post on the first page is a tutorial about installing the ota. Follow that tutorial, and you should be fine.
 
  • Like
Reactions: hamedkh

hamedkh

Member
Jul 12, 2014
12
0
It is not impossible. The 6th post on the first page is a tutorial about installing the ota. Follow that tutorial, and you should be fine.
and how can i download ota? or when phone download ota update,before instal it,where does save the file? can i find the ota update that downloaded in my phone?
 

dummie999

Senior Member
Mar 2, 2014
721
413
and how can i download ota? or when phone download ota update,before instal it,where does save the file? can i find the ota update that downloaded in my phone?

Go to Settings->Info->Software Updates, then a screen should pop up, about 1.32/1.20, then you can download it. If a screen does not popup, then you cannot install any update, and I don't recommend trying to install one
 

hamedkh

Member
Jul 12, 2014
12
0
Go to Settings->Info->Software Updates, then a screen should pop up, about 1.32/1.20, then you can download it. If a screen does not popup, then you cannot install any update, and I don't recommend trying to install one

i mean where does the file save? so as u said i can find and pull it in pc and edit it
 

blackviory

Member
Oct 6, 2008
25
6
Florence, Italy
great guide
thank you!

i have a problem...
well
when i go in recovery - install zip from sdcard i have only sd card not fount
i try to mount by menu but nothing to do.
sdcard works well in android

any idea?

thanks
Stefano


edit: i solve my problem. i had 2 partitions on sdcard and fat32 one was 2nd. i moved fat32 partition forward and now it's all ok
 
Last edited:

Fliwatt

Senior Member
Jan 11, 2014
94
47
  • Like
Reactions: dummie999

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    A complete guide on rooting your HTC Desire 500, both single sim and dual sim.
    Sorry for my English!

    Before you begin, you might want to check for updates on your phone, because it is harder to install an update after your phone is unlocked.

    If you see any english mistakes, please pm me about them. English is not my native tongue.

    The steps:
    1. Unlock the bootloader via htcdev.com
    2. Flash a custom recovery, ClockWorkMod or TeamWinRecoveryProject
    3. Flash SuperSU
    4. Flash a kernel without system write protection

    Alternatively:
    1. Flash a custom rom
    2. Simunlock your device
    3. Install Busybox
    4. Install an ota upgrade

    Everything is at your own risk!
    14
    [How to]Root your HTC Desire 500

    Once you have your recovery installed, you can actually root your phone.
    Reboot your phone, then download SuperSU, and put it on your sdcard. Then boot into your new recovery another time. Select either "Install" or "Install zip", then install zip from sdcard, and select the SuperSU.zip you downloaded earlier.
    Congrats! You now have (partial) root!

    Yes, you are not done yet. As an extra layer of security, htc prevents you from editing the system partition, with something called system write protection. To get it away, you need to install a custom kernel.
    First, check your software version. You can do this by going to "Settings"->"About Phone"->"Software version".
    Mine, for example, is: 1.32.401.3
    Now, if your software version starts with 1.20 or something lower, then you must install the Kangbang kernel, else, install the Ultimate kernel.

    To install the Kangbang kernel, go here. But the installation instructions are slightly different, basically the only thing you have to do is mount /system, and then flash the zip. Don't forget to mount system!

    For installation instruction on flashing the Ultimate Kernel, go here.
    Remember, you already flashed a superuser app.

    Troubleshoot:
    Problem: After installing the kernel I cannot make phone calls
    Solution: Install the right kernel, according to your software version


    Once you have one of the kernels installed, then your phone is fully rooted!
    13
    [How to]Install an ota upgrade

    After unlocking your bootloader, the installation of ota (over the air) upgrades fails, because it requires a locked bootloader.
    Steps to install the upgrade anyway:

    Part 1:
    First, you need to download the ota. Next, pull the zip to your computer, it should be located in your downloads folder.
    Next, open the zip and remove the file firmware.zip, you will need it later. Next, open in the zip the file META-INF/com/google/android/updater-script. There, you need to remove this part:
    Code:
    ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
    assert(check_cid(getprop("ro.cid"), "00000000" , "11111111" ,
    "22222222" , "33333333" , "44444444" , "55555555" , "66666666" ,
    "77777777" , "88888888" , "99999999" , "HTC__001" , "HTC__E11" ,
    "HTC__102" , "HTC__032" , "HTC__Y13" , "HTC__M27" , "HTC__A48" ,
    "HTC__J15" , "HTC__203" , "HTC__304" , "HTC__N34" , "HTC__405") == "t");
    );
    ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
    assert(check_mid("full", "0P3Z11200") == "t");,
    assert(check_mid("simple", "0P3Z11200") == "t");
    );
    assert(getprop("ro.product.device") == "z4u" ||
    getprop("ro.build.product") == "z4u");
    What you find might slightly different. For example, z4u might be z4dug, if you are on dual sim. But it usually starts at the second line of the file, so it should be to hard to find.
    Then, restore the first nandroid back-up you made, because the ota checks if the files on your system partition are modified.
    Next, you push the zip back to the sdcard again, and then flash it via your custom recovery.

    Part 2:
    While you are still in your recovery, make a backup of only your data partition! Don't make a backup of your complete system!
    Now, to flash the firmware.zip, you need to lock your bootloader. Because you will have to re-unlock your bootloader after you are done, you will lose all your data again. If you are S-off, then you don't have to relock your bootloader, you can skip this.

    How to re-lock your bootloader:
    1. In recovery, select: Reboot Bootloader
    2. Connect your phone to fastboot
    3. Type: fastboot oem lock
    That was easy! Your phone, however, might not boot. Don't worry about that, we will fix that later.

    Now, type:
    Code:
    fastboot oem rebootRUU
    fastboot flash zip firmware.zip
    This can take a short while.
    Next:
    Code:
    fastboot reboot
    You now have flashed the firmware.zip

    Congrats, you have the ota installed.
    It might be a good idea to keep your modified ota around, you might need it later on.

    Now, you can unlock your bootloader again (htc dev, second post), check your hboot version again, install a custom recovery again (make a new backup. Don't throw away your old backup), root your phone again etc.
    You can now install The Ultimate Kernel!

    Credits go to @ricardo-nl, this post http://xdaforums.com/showthread.php?t=2597314&page=45

    To do: Make a cool bash/awk script that removes all the assert(), so the updating won't fail if you have deleted some system files.
    12
    [How to]Unlock the bootloader

    On HTC phones, by default, you can not replace a partition on the phone from your computer. To enable this, your phone has to be Unlocked.
    There is a very good video guide about this, made by @Fliwatt: http://www.youtube.com/watch?v=yWLK5XhsVAE

    Unlocking your bootloader will wipe all your data!
    Unlocking your bootloader may void your warranty!


    It is, however, necessary to root your phone. Currently, there is no other way to unlock the phone or install a custom recovery.

    To start, go to http://www.htcdev.com
    Then in the top bar, click register. Create an account and fill in all your data. You will get an e-mail from HTC and your account will be activated.

    Once you are logged in on the site, you need to go to "Unlock bootloader", and then click get started. On the right, you see a dropdown box. Click it, and select "All Other Supported Models", then click "Begin Unlock Bootloader"

    Next install fastboot. I'm not gonna hold your hand here, there are 400+ tutorials on installing fastboot, for every OS you can think of. Search for one and install it.
    And, if you are on windows, then install HTC sync as well, pretty basic, even a Windows user should be able to do it;)

    Next, on your phone, got to Settings->Battery and scroll down. There, disable the checkbox "fast boot" (not to confuse with fastboot, that's something entirely different).

    Once you have done that, shut down your phone, then hold the volume down button, and the power button. This is commonly referred to as "booting into fastboot".
    To move around in the fastboot menu, you need the volume keys to go up and down, and the power keys to select an option.

    If the options you can choose from are:
    FASTBOOT
    RECOVERY
    FACTORY RESET
    SIMLOCK
    SHOW BARCODE
    then you need to navigate to fastboot, and then hit the powerkey.
    The option you can choose from must be:
    BOOTLOADER
    REBOOT
    REBOOT BOOTLOADER
    POWER DOWN

    Then, on your computer, type:
    Code:
    fastboot oem get_identifier_token
    Your output will be something like:
    Code:
    ...
    (bootloader)    
    (bootloader) < Please cut following message >
    (bootloader) <<<< Identifier Token Start >>>>
    (bootloader) 2ADE05B9466F0DD398559C7B5A6D636F
    (bootloader) 70E8FB65B9523AE73B8A22DDCD0092A2
    (bootloader) D52C617B971383374332044C0D04C492
    (bootloader) 707A43C4AAEC77A36DDE3060F7665574
    (bootloader) 22453BF1F9FDCA6E2118385B96A3C88B
    (bootloader) 4FE90D89BC086A9E9B0EA2086456D658
    (bootloader) 5831DBA6ADF940D3B0DD0618B745DD18
    (bootloader) AE37DC63341E4CBC66A8ACCB494E6AEE
    (bootloader) 5982C1432A5C5535836953243D6B8353
    (bootloader) 648EFDFD3B5F0C6D47987A0F47BC1A9F
    (bootloader) 0ABF9438C059A604832ABB87696CFDD7
    (bootloader) 1847D317701DC2C140294FD486109872
    (bootloader) 559EE22C73E4F2F9B00AF03FB12A9F9D
    (bootloader) 61DFDDD3FAB40CD8537F300078566632
    (bootloader) 2142B7EC56E99DD8C4DFB1B819F9F449
    (bootloader) 9B2DB0EA3E2FB18C293BD246012909ED
    (bootloader) <<<<< Identifier Token End >>>>>
    OKAY [  0.076s]
    finished. total time: 0.076s
    Don't use this code, it won't work. Do it yourself!

    Troubleshoot:

    Problem: I get
    Code:
    ...
    FAILED (status malformed (1 bytes))
    finished. total time: 0.000s
    Solution: Select the fastboot option with the powerkey.

    Copy the relevant part to the HTC dev site, and submit your token. You will (should) get an e-mail that contains your unlock code. Save the attachment (Unlock_code.bin) to a location where you can find it.

    Next type:
    Code:
    fastboot flash unlocktoken Unlock_code.bin
    If you are in the same location as your unlock code, of course.

    On your phone, you will now see a screen where you have to confirm that you want to unlock your phone, and that it will wipe all your data, and may void your warranty. Use the volume buttons and the power button to choose what you want.

    If you selected that you want to unlock your device, then:
    Congrats, your bootloader is unlocked

    But hold it, before you reboot your phone to confirm that you will have to re-type your very long wifi password, you might as well continue to installing a custom recovery:
    11
    [How to]Simunlock

    To sim unlock your device, you need to have CWM on your device and you need to have adb installed.
    It doesn't work with twrp, because adb doesn't work.
    Boot your device into cwm. Connect your device to your computer (with the cable:p), and connect with:
    Code:
    adb shell
    then, type:
    Code:
    strings -n 8 /dev/block/mmcblk0p7
    The output will be a lot of rubbish, but you need to
    look for a 8 digit combination that MAKES SENSE for a CODE.
    And In the case of ATRAC3, it was K65151479, so his unlock code was 65151479. I haven't tested this myself, because my device was never sim locked, but it should work.
    Full credits for this go to @ATRAC3, this post.