[G2 and Desire Z General] guhl99:
!!! WARNING FOR OTHERS - DO NOT DO THIS IF YOU ARE NOT RADIO S-OFF AND HAVE THE ENGINEERING HBOOT INSTALLED !!!

OK this is good because as you don't have the eng-hboot installed we can safely flash the full stock rom and i assume that you have a custom kernel and a custom recovery installed that we need to get rid off.

Before i go into details of commands i would like to give you the principle procedure:

1. reinstall the stock firmware by copying a PC10IMG.zip to /sdcard and then boot into hboot and let it install the complete stock rom.

2. temproot again using psneuter

3. restore the backup of your partition 7 using gfree 0.4

So what we need is:

- a stock rom from here http://www.multiupload.com/GH26HXLLES

- psneuter from here http://www.thinkthinkdo.com/trac/project1/raw-attachment/wiki/psneuter/psneuter.zip

- gfree 0.4 from here http://www.thinkthinkdo.com/trac/project1/raw-attachment/wiki/gfree/gfree_04.zip

You need to make sure that this PC10IMG.zip really is your stock version (maybe find yours somewhere else)

1. Installing the stock rom:

connect the phone to usb.

download the file and rename it to PC10IMG.zip and put it to the root of your sdcard using:

adb push PCIMG10.zip /sdcard/

shutdown your phone.

boot into hboot by holding the <Vol-Down> key while you press <Power> to boot.

hboot (white screen with surfing androids and the word HBOOT in blue) will scan for the file PCIMG10.img and load it.

Then you can use <Vol-Up> to start the process. In the middle of the process the screen will get dark for some seconds and then it will start again -> don't panic wait until it is completely finished.

When done - reboot

2. Temp-root using psneuter:

On the phone go to Settings - Applications - Development and enable USB debugging again.

Unzip the psneuter.zip, install and execute psneuter on your phone:

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

3. use gfree to restore your partition 7 backup

Unzip gfree_04.zip and install it on the phone

adb push gfree /data/local/
adb shell chmod 777 /data/local/gfree

3.a When you used gfree to get radio s-off it created a backup of the partition named /sdcard/part7backup-<time>.bin (replace <time> with the time number). We will restore this file now.

Get a root shell:

adb shell

The prompt should be # now

Execute gfree to restore the backup (in the root shell) - replace <time> with your time number in the following command.

/data/local/gfree -r /sdcard/part7backup-<time>.bin

3.b Alternative: (if you don't have your partition 7 backup anymore - don't do if you did 3.a):

You need to know the CID that your phone had originaly, it could be HTC__001

Excecute gfree to set S-ON and CID:

/data/local/gfree -s on -c HTC__001

4. clean up (still in the root shell):

rm /data/local/psneuter
rm /data/local/gfree
rm /sdcard/PC10IMG.zip

So now you are back to stock.

You might want to boot to hboot again and use "FACTORY RESET" to wipe data and cache.

And you might format the micro-sd card before you return the phone.

I hope this is it (written without a phone so there might be typos)

have fun - Guhl