[HOWTO] Rooting your Legend! Guide from MoDaCo!

TheDeadCPU

Retired Senior Moderator
Jun 22, 2009
2,037
689
0
27
ಠ_ಠ
www.thedeadcpu.com
Read this whole topic - it contains a ton of useful information as well as the instructions and downloads!

Remember that if you use this guide, you do so entirely at your own risk!!

Welcome Paulobrien's guide on how to root the HTC Legend!

Compatibility

This guide will allow you to root your HTC Legend, provided it has a bootloader version of 0.43.xxxx or below and a ROM version of 1.31.xxx.x or below. To check this, turn off your device, then turn it back on with the 'back' key held. On the second line in green text you will see HBOOT- and then a number. Provided this is 0.43 or below, this guide should work for you.
If the number is above 0.43 use this guide to Downgrade!

Legend rooting protection

Back in the early days of Android, rooting was easy. You had several options - you could flash stuff via the bootloader, you could flash an engineering bootloader, you could use kernel exploits - there were many ways of getting the low level access to your device that - in fairness - I think we as paying customers are entitled to. As time has progressed however, the manufacturers have made things harder and harder. The Legend is not a straightforward phone to root, for many reasons, including...
  • a 'perfected bootloader' that doesn't allow flashing or booting of any images (even HTC signed ones)
  • a RUU flash process that does not allow downgrading of the bootloader to earlier versions
  • a kernel (that as yet does not have publicly available source) that as yet has no known exploits
  • a new protection method previously seen on the HTC Tattoo that protects key partitions from having write access. Even with SU access, it is not possible to write to the boot, recovery or system partitions.
In reality, the options for rooting a device this secure are limited. Even if a kernel exploit were found, the key partitions would still be unwritable, rendering su access useless. This was circumvented on the Tattoo very cleverly, using a specific memory address from a confidential Qualcomm datasheet, however this information is not yet available for the MSM7227 chipset used in the Legend (and indeed may never enter the public domain).

And so the root process becomes a process of methodically probing every possible point of exposure on the device, looking for the slightest chink in the armour. I found one and we're putting it to good use! The downside is that it's not as easy or as pretty as rooting a device that is actually DESIGNED to be accessible at the lowest level, such as the Nexus One.

Shame on you HTC for going to such unnecessary lengths (but that's another story for another day).

What this root process provides and does not provide

The root process will...
  • flash your device with a new, generic 1.31 series based ROM that has Superuser access
  • show you how to enter the recovery image in future, allowing you to flash update zips
The root process will NOT...
  • enable you to flash your device with a custom recovery image that can be launched easily by just holding down the volume down button when powering on
  • enable you to have write access to the /system partition in normal use of the device
Both of these limitations are being worked on of course.

Pre-requisites

In order to complete this guide, you need the following...
  • a HTC Legend
  • a computer running Windows (32 bit recommended, some users have reported issues with x64), OSX or Linux
  • a microUSB cable
  • a microSD card (to be made into a 'goldcard')
  • the download below
  • balls of steel (actually, I just made that up)
Download

To be ready for the guide, download the following items...
  • the required files - DOWNLOAD (MediaFire Pro) / MIRROR (ROMraid / CoBlitz) MD5: rm6154a24e21df9fb6f542834f76e0d8f9
Once you have this on your machine, you're ready to start!

Note: If you require the previous 'TinyCoreLinux' r3 build, you can download it here (MediaFire), http://coblitz.codeen.org/www.romraid.com/paul/legend/r1-tinycore_2.10-legendroot.iso (ROMraid / CoBlitz).

The guide

Follow through these steps, one by one and at the end of it you'll have a rooted Legend with the latest ROM.

Note: This process will wipe your device and there is currently no option to backup your device ROM before you start.
  • Make your microSD card into a goldcard by following these instructions (it's a good idea to back up the contents of your card first!).
  • Unzip the file you downloaded to a directory, then open a command prompt / terminal window at that directory.
  • Turn off your HTC Legend, then turn it back on with the 'back' button held down. You'll see 'FASTBOOT' written on the screen in a red box. Connect the phone to the computer.
  • In the terminal window, enter either 'step1-windows.bat', './step1-mac.sh' or './step1-linux.sh' as appropriate.
  • When this step has completed, REMOVE THE GOLDCARD and either format it and replace, or replace with a different (non goldcard) microSD.
  • Navigate to the 'BOOTLOADER' and then 'RECOVERY' option on the menu, using the volume buttons to move and the power button to select.
  • In the terminal window, enter either 'step2-windows.bat', './step2-mac.sh' or './step2-linux.sh' as appropriate.
  • When this has completed, your device should be at the 'recovery' screen. Select the 'wipe' option, then select the option to apply an update zip from sdcard, and select 'rootedupdate.zip'. This will take a little while, so go make a nice cup of tea. When the flash has finished, reboot, and you are DONE!
Troubleshooting

If you have any issues with the root process, post below, and we'll do our best to help!

Recovery mode for future updates

Once you are rooted, you can enter recovery mode by turning your device on with the volume button held down and selecting 'RECOVERY', then running either 'recovery-windows.bat', './recovery-mac.sh' or './recovery-linux.sh' as appropriate from the root zip directory.

And finally!


Enjoy!

P

Thanks to nilezon for his patched windows ADB binary and Amon_RA for the recovery image I butchered here.

Thanks to Paul O'Brien for the guide!
Here is the original guide over on MoDaCo.
 
Last edited:

c_man

Senior Member
May 3, 2010
334
6
0
London, UK
So, everyone must downgrade to 1.31 in order to root....

2 questions:

1] A Goldcard is required for the downgrade to 1.31. Is it possible to use the SD supplied with the Legend as a Goldcard?
i.e.
- Copy contents of SD card to PC
- Format SD Card
- Use as Goldcard
<Install 1.31>
<Root the Legend>
- Delete contents of SD Card
- Copy original contents from PC back to SD card


2] Is a Goldcard required when you apply new ROMS? I have a unbranded and unlocked Legend, when exactly is a Goldcard required?



Thanks in advance guys!
 

snakehult

Senior Member
Jun 8, 2010
369
60
0
So, everyone must downgrade to 1.31 in order to root....

2 questions:

1] A Goldcard is required for the downgrade to 1.31. Is it possible to use the SD supplied with the Legend as a Goldcard?
i.e.
- Copy contents of SD card to PC
- Format SD Card
- Use as Goldcard
<Install 1.31>
<Root the Legend>
- Delete contents of SD Card
- Copy original contents from PC back to SD card


2] Is a Goldcard required when you apply new ROMS? I have a unbranded and unlocked Legend, when exactly is a Goldcard required?



Thanks in advance guys!
1. Yes
2. No, only for rooting first time. Or if you decide to unroot with RUU

its no big cost buy 1 extra for quick future use.
 

c_man

Senior Member
May 3, 2010
334
6
0
London, UK
Thanks for the reply.

I understand its not a big cost to buy a SD card.
Its also minimal hassle to copy SD contents to PC, use as SD as Goldcard, then copy contents back :).

As for the second question/answer, you responded with a "No" to : "I have a unbranded and unlocked Legend, when exactly is a Goldcard required?" ...I'm still not sure! You say Goldcard is required when you root for the first time. My Legend is unbranded and unlocked - do I still need a Goldcard?
 

c_man

Senior Member
May 3, 2010
334
6
0
London, UK
If I understand correctly, a gold card is requiered when flashing from a non-rooted firmware to any other firmwares
I see, so it doesn't matter if your Legend is unbranded/unlocked. If you want to move from a non-rooted firmware (i.e. Stock ROM) to ANY other ROM (i.e. from this forum) then a Goldcard is required.

Hope somebody can confirm this?
 

TheDeadCPU

Retired Senior Moderator
Jun 22, 2009
2,037
689
0
27
ಠ_ಠ
www.thedeadcpu.com
I see, so it doesn't matter if your Legend is unbranded/unlocked. If you want to move from a non-rooted firmware (i.e. Stock ROM) to ANY other ROM (i.e. from this forum) then a Goldcard is required.

Hope somebody can confirm this?
Gold card should only be needed for a locked device.

Paulobrien said:
A GoldCard is a special SD card which, when inserted into your device, allows you to flash RUU files with a different CID to your own device. For example, if you own a T-Mobile branded device, this will allow you to flash a generic ROM.
 

c_man

Senior Member
May 3, 2010
334
6
0
London, UK
any other means official firmware, right ?
the roms available in the forum are customised.
Sorry, by 'any other', I meant any other non-stock or non-official ROM, i.e. customised ones as found here on the forum.

Gold card should only be needed for a locked device.
So as I bought my Legend unlocked/unbranded, I just follow Pauls guide in the OP and ignore the bits in RED?

The guide

Follow through these steps, one by one and at the end of it you'll have a rooted Legend with the latest ROM.

Note: This process will wipe your device and there is currently no option to backup your device ROM before you start.
  • Make your microSD card into a goldcard by following these instructions (it's a good idea to back up the contents of your card first!).
  • Unzip the file you downloaded to a directory, then open a command prompt / terminal window at that directory.
  • Turn off your HTC Legend, then turn it back on with the 'back' button held down. You'll see 'FASTBOOT' written on the screen in a red box. Connect the phone to the computer.
  • In the terminal window, enter either 'step1-windows.bat', './step1-mac.sh' or './step1-linux.sh' as appropriate.
  • When this step has completed, REMOVE THE GOLDCARD and either format it and replace, or replace with a different (non goldcard) microSD.
  • Navigate to the 'BOOTLOADER' and then 'RECOVERY' option on the menu, using the volume buttons to move and the power button to select.
  • In the terminal window, enter either 'step2-windows.bat', './step2-mac.sh' or './step2-linux.sh' as appropriate.
  • When this has completed, your device should be at the 'recovery' screen. Select the 'wipe' option, then select the option to apply an update zip from sdcard, and select 'rootedupdate.zip'. This will take a little while, so go make a nice cup of tea. When the flash has finished, reboot, and you are DONE!
...and as we can only root in 1.31, I guess I still don't need a Goldcard for that a it's an official ROM.


I hope someone can confirm all of this post as correct as I'm sure it will be helpful to many others reading (sorry if they are basic questions!).
 
Last edited:

c_man

Senior Member
May 3, 2010
334
6
0
London, UK
Correct.
/10char
Excellent thanks for the clarification.

In which case, my understanding suggets that a Goldcard is not required in order to downgrade to 1.31 ([TESTED WORKING]DOWNGRADE to 1.31 which you can then root for Legend 2.1) in order to root either, because I would be moving from an official ROM (right now) to another official ROM (1.31)....yes? :)


EDIT:

Hmm.... not so sure now due to:

Big thanks to Joeball88 for putting in the testing time with me to get the bumps all smoothed out, and for caska who had the epiphany that we should goldcard it before RUUing.
 
Last edited:

c_man

Senior Member
May 3, 2010
334
6
0
London, UK
Thanks for the help again, TheDeadCpu :D!

Now it is clear:

A Goldcard is not required if your phone is unbranded/unlocked.... regardless of whether you want to root or apply another ROM.

Hope this helps some others out there too.
 

Learners Lisence

Senior Member
Jun 28, 2010
187
4
0
Thanks cman and deadcpu,
This completely changes our perspective.
So we just need HTC sync going to hop, skip and jump from one rom to another, offical or otherwise.
 

Learners Lisence

Senior Member
Jun 28, 2010
187
4
0
well, what i meant was that if our legends are not locked or branded we dont need a goldcard for rooting or changing our firmwares ?
But only HTc sync is a prerequisite for going from one official rom to another ? whether its downgrading or upgrading ?
i was kinda extending the concepts derived in prior posts...correct me if im wrong.
 

copponex

Senior Member
Aug 7, 2010
141
9
0
do i HAVE to have a goldcard to root my phone?

Because i just heard some say that theire sd cards were broken trying to make a goldcard, and i don't have an ekstra goldcard at my hands, neither do i have a card adapter :(
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone