[G2 and Desire Z Android Development] Aegishua:
Assuming all as gone well and you now have a rom without superuser but you have a baseband version that is 1.34xxxx.

Alright, let’s begin.

Prerequisites:

Download psneuter

Download gfree 0.5

Download root_psn

Download flash_image

Download the Desire Z hboot

Download Clockwork Recovery

ALL of these are in the attachments section

They all should be extracted into the same folder. Use something simple like C:\RootVision\Root

3. Root your Desire Z!

Before you start:

Enable USB Debugging and Allow Unknown Market Installations again.

Also delete the PC10IMG.zip on your phone if you downgraded.

Okay lets go:

1. Now Assuming you succeeded at the last part you should have a stock-ish rom without superuser. What we want to do is start by pushing all the files across with the following adb commands (use in cmd prompt the same way you pushed files in 2.)

adb push psneuter /data/local/tmp/
adb push gfree /data/local/tmp/
adb push busybox /data/local/tmp/
adb push root_psn /data/local/tmp/
adb push flash_image /data/local/tmp/
adb push su /sdcard/
adb push hboot-eng.img /data/local/tmp/
adb push Superuser.apk /sdcard/
adb shell chmod 755 /data/local/tmp/*

2. Alright now we have all the files we need to root the phone. Input the following command. This is just putting our clockwork recovery in a convenient place with an easy name.

adb push recovery-clockwork-3.0.2.4-vision.img /data/local/tmp/recovery.img

3. Now we’re gonna temp root again by typing in the following:

adb shell /data/local/tmp/psneuter
adb shell

4. This should leave us with another #. Now enter the following commands:

cd /data/local/tmp
./gfree -f -b hboot-eng.img
./flash_image recovery recovery.img
./root_psn
sync

5. Type in: (thanks for the correction john_d1974)

reboot

6. You should have a rooted phone with superuser after the reboot. Also it will have clockworkmod, SuperCID, secu-flag off & an Unlocked HBOOT-ENG.

If gfree 0.5 doesnt work for you then this section is for you:

Prerequisites:

Download psneuter

Download gfree 0.2

Download root_psn

Download flash_image

Download the Desire Z hboot

Download Clockwork Recovery

ALL of these are in the attachments section

They all should be extracted into the same folder. Use something simple like C:\RootVision\Root

1. Now Assuming you succeeded at the last part you should have a stock-ish rom without superuser. What we want to do is start by pushing all the files across with the following adb commands (use in cmd prompt the same way you pushed files in 2.)

adb push psneuter /data/local/tmp/
adb push gfree /data/local/tmp/
adb push busybox /data/local/tmp/
adb push root_psn /data/local/tmp/
adb push flash_image /data/local/tmp/
adb push su /sdcard/
adb push hboot-eng.img /data/local/tmp/
adb push Superuser.apk /sdcard/
adb shell chmod 755 /data/local/tmp/*

2. Alright now we have all the files we need to root the phone. Input the following command. This is just putting our clockwork recovery in a convenient place with an easy name.

adb push recovery-clockwork-3.0.2.4-vision.img /data/local/tmp/recovery.img

3. Now we’re gonna temp root again by typing in the following:

adb shell /data/local/tmp/psneuter
adb shell

4. This should leave us with another #. Now enter the following commands:

cd /data/local/tmp
./gfree -f
./flash_image recovery recovery.img
./root_psn
sync

5. Type in: (thanks for the correction john_d1974)

reboot

6. You should have a rooted phone with superuser after the reboot. Also it will have clockworkmod, SuperCID and secu-flag off.

4. Installing your own custom ROM

This section is just in case you don't know how to install a custom ROM.

Note: Always make sure the ROM you are installing is FOR YOUR PHONE! If you install a ROM meant for another phone you could potentially damage it or brick the phone itself.

1. Download the ROM you want and copy it to your SD Card. (Try to keep it in a folder that is easy to get to)

2. Turn off your phone.

3. Hold down the volume down button and then press the Power Button. This should take you to a white screen with lots of colourful text. One of which says FASTBOOT or FASTBOOT_USB.

4. Press the power button ONCE when BOOTLOADER is selected(BLUE)

5. Navigate using the volume buttons until you get to RECOVERY and then press the Power Button again.

6. The HTC Logo will come up then you will get a black screen with text.

7. From here you should Always do a NANDROID Backup so you can restore a working ROM if something fails.

NANDROID Backup

7a. Navigate to 'backup and restore' and then select it by pressing the trackpad button.

7b. Select 'Backup' and then let it finish. Once done you have a backup of your android.

8. Now you want to do these before you start installing:

a. 'wipe data/factory reset

b. 'wipe cache partition'

c. Go into 'advanced' and select 'Wipe Dalvik Cache'

9. Now you can install the ROM itself. This is done by selecting 'install zip from sdcard' in the main menu. Now you can select 'choose zip from sdcard' and just go ahead and select the ROM you copid to your sd card earlier.

9a. If the phone says verification failed then just toggle the signature verification option.

FAQ - For Anyone with any issues.

1. My version is 1.7xxxx or higher. Can I use this method?

Yes you can. This method will downgrade your phone to 1.34 so your radio is no longer locked thereby allowing you remove the secu-flag, add superCID and allow you to install a custom recovery (like ClockWorkMod)

2. My CID is XXXXXXXX and isn't on that list, will this method still work?

Yes it will. The reason why it will work is because a goldcard is essentially a manufacturers way of bypassing the CID checks used by ROMs. Therefore, by creating our own unique goldcards we can also bypass the CID check.

3. My CID is on the list that you mentioned. Do I need this goldcard?

No, you can skip the 1st step because when the ROM checks your phones CID it will match up perfectly and the phone will install the older radio without issue.

4. What Benefits does rooting a phone grant you?

Simply, it allows you to install any ROM of your choosing onto the phone as well as use custom kernels and certain applications that access locked functions on the phone. This can ultimately lead to; a longer battery life; more stable roms and more frequently updated roms; and finally an overall faster Android experience.

5. What is root access?

Root access essentially gives you access anything locked by the manufacturer on the phone. This most importantly means that you can read and write to any system partitions on the phone that would normally be locked.

6. Whats psneuter?

psneuter is an application used to grant temporary root access. This is done through an exploit in the android system and will give us a window to further exploit the system and ultimately grant us Permanent Root Access.

7. How do I find my CID?

To find your CID you run two commands. Firstly, in your CMD prompt you type 'adb reboot bootloader' when your phone is connected and USB debugging is active. This will restart your phone into its bootloader. Then once you see the words FASTBOOT_USB you type 'fastboot oem boot'. Then look for the words CID and then just read the 8 character CID.

Also there is a post with a screenshot here.

8. My phone will not find PC10IMG.zip

You will need to double check that the PC10IMG.zip is the correct ZIP file from the RUU that has been linked. It should be roughly 250mb in size and should be placed in the root folder of your SD Card. Also your SD Card must be compatible with your device (able to be read/written to). If you cannot access your SD Card from your Desire Z or G2 then there is probably something wrong with your SD Card. It should probably be reformatted.

9. Can I use this on the Desire Z/G2 running Gingerbread?

So far no one has been able to root the gingerbread version of android on the Desire Z/G2. Unfortunately, this guide still cannot root gingerbread desire Zs or G2s.

If there are any more, feel free to post them and I'll add them ;)

10.I'm Missing my AdbWinApi.dll? What now?