[G2 and Desire Z Android Development] Aegishua:
This guide is now obsolete. Please use this guide instead.

For Gingerbread Phones, Please use this guide.

Hey guys, this is probably the easiest guide to follow for rooting a branded desire Z. The reason why this can sometimes be hard is cause it uses a unique identifier (INFOCID) and the companies that brand the phones ONLY want roms from their company on them. This stops us from using a WWE rom like every else to downgrade and then root.

But ultimately, the reason I'm making this is because every other guide I've read constantly links you to other guides or other pages and it sorta annoyed me. So after I figured it all out I posted one concise guide that doesn't redirect you 50 times.

Now I’m gonna run you through EVERYTHING so you won’t get stuck anywhere.

This guide will work with:

Device: Desire Z or G2

Firmware Version: Any Firmware version will be fine (All you need to do is downgrade using step 1)

Android Version: Froyo or any previous variation of Android (Absolutely no gingerbread device will root with this method)

Btw, I take no responsibility for any damage taken by using these procedures. Sorry =P

Also if you don't have ADB and Fastboot set up then go ahead and follow the guides on the first two posts here.

-Thanks nephron

If your CID matches one of the CID's above then you can skip Step 1.

1. Creating a Goldcard:

Prerequisites:

ADB Set up and running fine (to check if it is working just connect your phone and have USB debugging enabled. Then type adb devices in your CMD Prompt)

HxD Hex Editor (see attachments of post 1)

USB Debugging enabled on your phone

1.Firstly we need to mount the memory card on a windows PC.

2. Format the memory card as FAT32 using all the default options.

3. Mount the memory card on your Phone. Then give it a couple of seconds.

4. Remount the memory card on your PC.

5. Find your CID by using the follow command in your cmd prompt (YOU NEED ADB)

adb shell cat /sys/class/mmc_host/mmc2/mmc2:*/cid

6. Use the excel sheet provided to reverse the CID (see Attachments)

7. Goto this website and send yourself a goldcard.img

http://psas.revskills.de/?q=goldcard

8. Run HxD hex editor AS AN ADMINISTRATOR! (I can’t stress how important having admin rights is)

9. Go to Extras > Open Disk Image. Then select your goldcard.img

10. Go to Extras > Open Disk. IMPORTANT: Select your memory card UNDER the Physical Drives category. DO NOT open the logical drive.

11. Switch to your goldcard.img tab. Go to Edit > Select All. Then Edit > Copy.

12. Go to the physical drive tab and select the lines 00000000 until you get to the one with 00000170.

13. Go To Edit > Paste Write.

14. You should have a huge block of red characters now. This is good btw.

15. Mount your SD card on your Phone and let it detect it. If it comes up with a corrupt SD card error you have done it wrong and you may have to start over.

16. You are done with the goldcard.

2. Downgrading and Debranding

Before you start this please do the following:

1a. Download the RUU I’ve linked (it should be a ~300mb exe file) -Thanks g4rb4g3

ii. If you are a BELL User. Please download this RUU instead.

1b. Run the setup until you get to the screen with the tick boxes (Some Users may have to run this as an Administrator)

1c. Leave the setup running and go to C:\Users\<your account name>\AppData\local\temp ( Or Try %AppData%\Local\Temp\ ). Then right click and Sort By Date Modified. Look for the most recently created folder which should look like {xxxxxxx-xxxxxx-xxxxxxxx}. Then navigate into it and its then into its one folder. Look for rom.zip and copy that to your goldcard/memory card.

1d. Rename the rom.zip on your memory card to PC10IMG.zip (Make sure it is exactly the same as the way I've typed it there)

1e. Mount your sd card back onto your phone.

2. Download the attachments (misc_version & psneuters) and extract them in a folder like C:\RootVision\

Now you are ready to begin:

1. Open a CMD prompt window

2. Navigate your way to the folder with psneuter & misc_version IN CMD PROMPT. (So the cmd prompt window should be something like this C:\RootVision> )

3. Now we will use the following 5 commands one after the other

adb push psneuter /data/local/tmp
adb push misc_version /data/local/tmp
adb shell chmod 777 /data/local/tmp/psneuter
adb shell chmod 777 /data/local/tmp/misc_version
adb shell /data/local/tmp/psneuter
adb shell

4. After the last command you should have a # and a flashing line for you to enter text. This is good. (If you get a $ you have done it wrong and should try typing the commands out again)

5. Now you have the # type the following command in: (This will spoof the radio version)

/data/local/tmp/misc_version –s 1.33.405.5

Then go ahead and type:

exit

6. Type this command into your cmd prompt (btw you should be back with the normal C:\RootVision>)

adb reboot bootloader

7. Once on your white screen with colourful text you can go ahead and press the power button ONCE

8. Now just wait for the rom to install and verify. If you get INCORRECT CID your gold card doesn’t work or your CID doesn't match and you'll need a goldcard. (Go to Step 1. and make a goldcard for your phone)

9. Go ahead and install the rom when it asks you.

10. You are done downgrading and can now begin the Rooting process.

See Post 2 For Rooting