[GUIDE] Perm-root, write access, Clockwork recovery and overclocking on the Desire Z

Search This thread

stridger

Senior Member
Oct 8, 2010
104
93
Edit: This guide is for EXPERIENCED users ONLY! For less experienced users please check UBERROOT easy full Root, S-OFF, SuperCID AND SIM UNLOCK for DZ/G2/DHD inc Voda .

Remember to always read and research before rooting! Discussion can be found starting on post #101 - #118 ~TheRomMistress

__________________________________________​

Please be aware that I am not responsible for any bricks etc. This is playing around with the phone internals, so be careful.


To get full write access to the Desire Z, we now have an Engineering HBOOT which was posted by MrPaveL (Thanks for that!).

To get your device to the engineering hboot stage [this is not full radio S-OFF, but 99% of people won't need radio S-OFF], please follow the guide below.

If you want full Radio S-OFF, SuperCID or want to remove the simlock on your phone, please follow this guide on instead. Once you have full Radio S-OFF you can use any Desire Z HBOOT and still have access to flash ROMs etc.

Credit goes out to scotty2, and all of the wonderful folks at #G2ROOT!

Donate to scotty2 (for root): walker.scott@gmail.com (PayPal)

This guide was derived from the guide for the G2, created by unrevoked512 on http://xdaforums.com/showthread.php?t=833965. Also many thanks to vro25 for improvement suggestions.

You will need the following files:


Step 1
Download and run VISIONary r14

  • Leave everything uncheck and click "temp root" now.
  • Once that's done click "Attempt Permroot Now!"
  • You now have permaroot.


Step 2
Push the files wpthis-Z.ko and hboot_7230_0.84.2000_100908.nb0 to /data/local/

Note: You might want to verify the MD5 sums, particularly for the hboot file, as if your download was corrupted, the file will brick your phone.

Step 3
Open a terminal on your phone, or open an adb shell from your computer.

Step 4
Code:
$ su
# insmod /data/local/wpthis-Z.ko

Note: make sure your screen is on before doing this as it will raise a root request on your phone (if you haven't previously granted it) - click ok on your phone to grant root.

It should return:

Code:
init_module 'wpthis-Z.ko' failed (Function not implemented)

That is good.

Step 5
FINAL WARNING: THIS STEP COULD SEVERELY DAMAGE YOUR PHONE. USING THE INCORRECT FILE COULD CAUSE IRREPARABLE DAMAGE, MAKING YOUR PHONE NOTHING MORE THAN A BRICK.

That noted, if you would like S-OFF, go ahead and run this command in your terminal.

Code:
# dd if=/data/local/hboot_7230_0.84.2000_100908.nb0 of=/dev/block/mmcblk0p18

Step 6
I think this is optional, but there are controversial opinions at the moment. In any case it will not hurt to run

Code:
# sync

to make absolutely sure everything will be saved.

Now reboot your phone gracefully and check that everything sticks.

Step 7 (optional)
This step is optional, if you want to install Clockwork Recovery.

Download ROM Manager from the market and install Clockwork, telling it that you have an HTC G2 when it asks. It will work without problems on the Desire Z.

Step 8 (optional)

This step is optional if you want to install an overclocked kernel. You might want to do a nandroid backup first, in case you want to go back later (just restore boot).

This overclocked kernel seems to crash the phone after Youtube videos are played in fullscreen. This issue is being investigated, but could take a while to resolve, since HTC hasn't released the actual DZ kernel source...

I have now recompiled the overclocked kernel for the Desire Z (all credit goes again to coolbho3000 for publishing the source!), to get the FM Radio to work as well. To get it to work please follow the guide on http://xdaforums.com/showthread.php?t=834219, but instead of the zImage posted there (which breaks FM Radio on the Desire Z), get the one from http://www.opencodes.org/node/14 . You still need to use the bcm4329.ko file from the other thread. Also note that this will change your kernel version to 2.6.32.17 (instead of 2.6.32.21 stock). Please blame HTC for not releasing the newest kernel source. In any case I have not spotted any disadvantages...

So far I have not spotted any problems with this kernel, but if you do, let me know.

PS Bacon-bits by cyanogen do not fully work on the DZ. It won't boot with that ramdisk and the lights hack seems to fail as well. It is probably safest to wait for a full CM release, but this guide gets you 90% of bacon-bits.
 
Last edited by a moderator:
J

JupiterDroid

Guest
Hi all,

I have just managed to get clockwork recovery work on the Desire Z. It's a bit hacky at the moment, and will probably get much easier in the due course. I am not going to post every little step that you can find out by googling, and please be aware that I am not responsible for any bricks etc. This is playing around with the phone internals, so be careful.

The reason it is this hacky is that we do not have an engineering bootloader for the Desire Z yet.

  1. Download wpthis-Z.ko and wpthis-pre-OTA.ko from
    http://content.modaco.net/dropzone/wpthis-Z.ko and
    http://unforgiven512.udderweb.com/downloads/wpthis-pre-OTA.ko and put them in /data/local on the phone.
  2. Download newest version of ROM Manager
  3. Disable write protection via wpthis-Z.ko
  4. Flash clockwork recovery from ROM Manager
  5. Reboot into recovery
  6. Make a nandroid backup !!!!!
  7. Mount /data in Clockwork
  8. Use wpthis-pre-OTA.ko in recovery to disable write protection.
  9. You now have a fully working recovery. (note you will need to use wpthis-pre-OTA.ko step everytime you boot into recovery and want to write something from recovery [not needed for nandroid backups])

Your a genius dude;) Keep up the good work;)

We need quality devs like you to get this party started;)

JD
 

schriss

Senior Member
Feb 6, 2006
1,449
123
Dublin
As soon as I did this step:
Disable write protection via wpthis-Z.ko

EDIT:
this is exactly what I did:
$ su
# insmod /data/local/wpthis-Z.ko
got this as result: failed (Function not implemented)

then all applications stopped working, ROM Manager crashed as soon as I select G2 from confirmation dialog when trying to flash Clockwork.
I then tried GMails and got loads of error popups, had to restart phone to get back to normal :confused:

EDIT: I do have Visionary installed set to Root on boot.
 
Last edited:

stridger

Senior Member
Oct 8, 2010
104
93
As soon as I did this step:
Disable write protection via wpthis-Z.ko

EDIT:
this is exactly what I did:
$ su
# insmod /data/local/wpthis-Z.ko
got this as result: failed (Function not implemented)

then all applications stopped working, ROM Manager crashed as soon as I select G2 from confirmation dialog when trying to flash Clockwork.
I then tried GMails and got loads of error popups, had to restart phone to get back to normal :confused:

EDIT: I do have Visionary installed set to Root on boot.

I urge you not to do anything in this direction, if you haven't even got permroot yet. Look at the G2 permroot forums, where all of these things are answered. The error is supposed to appear. Please be very careful if you don't want to end up with a brick.
 

schriss

Senior Member
Feb 6, 2006
1,449
123
Dublin
I was afraid to do the G2 permanent root because it involved dd command and some G2 HBOOT file. There was one Desire Z user who ended up stuck in bootloader and have seen no other desire Z owners confirming this to work.
I guess I wait...

Sent from Desire Z
 

g1junky

Senior Member
Feb 3, 2009
849
26
Dolton, IL
I flashed the desire z rom on my g2 yesterday after root, is my g2 now considered a desire z? if so it should be okay for me to follow these instructions right?
 

stridger

Senior Member
Oct 8, 2010
104
93
I was afraid to do the G2 permanent root because it involved dd command and some G2 HBOOT file. There was one Desire Z user who ended up stuck in bootloader and have seen no other desire Z owners confirming this to work.

You don't need the eng hboot to get permroot... You just need to temproot with write-protection disabled. But as you say, it's best to wait until the right tools come out.
 

schriss

Senior Member
Feb 6, 2006
1,449
123
Dublin
You don't need the eng hboot to get permroot... You just need to temproot with write-protection disabled. But as you say, it's best to wait until the right tools come out.

Exactly, that's what the logic sugests.
I was hoping to:
Temp root with Visionary (already done)
Disable write protection via wpthis-Z.ko
then try "sync" command to write changes.
Then, after reboot, I should have perm root and nand on read-only.
But I got scared by the errors I got after I disabled write protection.
 

steviewevie

Retired Forum Moderator
Oct 28, 2009
5,333
616
UK
I flashed the desire z rom on my g2 yesterday after root, is my g2 now considered a desire z? if so it should be okay for me to follow these instructions right?

You've probably still got a G2 hboot, right ? Like the G2 eng hboot ? If so, then it's still really a G2 running a Desire Z ROM. But I can't answer your main question, I'm sure someone else will be able to though.
 

stridger

Senior Member
Oct 8, 2010
104
93
I flashed the desire z rom on my g2 yesterday after root, is my g2 now considered a desire z? if so it should be okay for me to follow these instructions right?

No, your phone still has the G2 partition layout, so none of this is probably needed for you as your bootloader should already show S-OFF...
 

fastludeh22

Senior Member
Mar 22, 2009
369
29
I have a g2 so most of this doesnt pertain to me, but as im trying to help someone currently stuck in a hard place thought maybe u could help.

My question has to do with after clockwork is installed. Why do u have to run wpthis.ko in recovery. Shouldnt wp be turned off in recovery? thats how the phone updates stock.
 

Sphaerophoria

Senior Member
Feb 24, 2010
77
3
I have a g2 so most of this doesnt pertain to me, but as im trying to help someone currently stuck in a hard place thought maybe u could help.

My question has to do with after clockwork is installed. Why do u have to run wpthis.ko in recovery. Shouldnt wp be turned off in recovery? thats how the phone updates stock.

I just tested doing a nand restore without using wpthis-Z.ko and it *seems* to be working. I haven't flashed anything yet so i can't be sure but it seems like it worked
 

stridger

Senior Member
Oct 8, 2010
104
93
I just tested doing a nand restore without using wpthis-Z.ko and it *seems* to be working. I haven't flashed anything yet so i can't be sure but it seems like it worked

Well, for me it was able to flash system, but not boot. My guess would be hboot wouldn't work either. [Obviously it won't return an error... It will think it had written, when in fact it hadn't.]

As for the post before that, the fact that stock recovery can flash images says nothing about other recoveries being able to do the same. Stock recovery could disable wp for example.

In any case it would be nice to have permanent write-access...
 

fastludeh22

Senior Member
Mar 22, 2009
369
29
Well, for me it was able to flash system, but not boot. My guess would be hboot wouldn't work either. [Obviously it won't return an error... It will think it had written, when in fact it hadn't.]

As for the post before that, the fact that stock recovery can flash images says nothing about other recoveries being able to do the same. Stock recovery could disable wp for example.

In any case it would be nice to have permanent write-access...


Dont take this as arguement, cause as ive said i dont have a z, just going by what ive thought to be right. With that being said, the fact that wp is off in stock recovery does say something. The bootloader is what sets wp on/off so if the bootloader is loading the recovery(which it thinks is stock) wp SHOULD be off. i guess a good way to test would be after a nandroid, flash a zip thats only a boot.img and see if it takes.

Heres another question then, what about using the g2 eng recovery?
 

g1junky

Senior Member
Feb 3, 2009
849
26
Dolton, IL
No, your phone still has the G2 partition layout, so none of this is probably needed for you as your bootloader should already show S-OFF...

i tried the G2 method for obtaining clockwork and it didn't work it says it flashed from the app but when i try to backup rom im still on the stock recovery.. would u recommend i try the D-Z method?
 

Sphaerophoria

Senior Member
Feb 24, 2010
77
3
Dont take this as arguement, cause as ive said i dont have a z, just going by what ive thought to be right. With that being said, the fact that wp is off in stock recovery does say something. The bootloader is what sets wp on/off so if the bootloader is loading the recovery(which it thinks is stock) wp SHOULD be off. i guess a good way to test would be after a nandroid, flash a zip thats only a boot.img and see if it takes.

Heres another question then, what about using the g2 eng recovery?

wp is definately off in recovery but the problem is probably "your update-binary or updater-script (don't use update-script)" in koush's own words. Anyways i hope we find a way around this soon ;)
 

steviewevie

Retired Forum Moderator
Oct 28, 2009
5,333
616
UK
  1. Follow G2 guide on http://xdaforums.com/showthread.php?t=833965, but instead of wpthis-*.ko use the file http://content.modaco.net/dropzone/wpthis-Z.ko. ALSO DO NOT FLASH THE hboot-eng.img INSTEAD USE THE FILE ON http://www.multiupload.com/4U9P14R86Y. IF YOU FLASH THE WRONG FILE IT COULD POTENTIALLY BRICK YOUR DEVICE! .

Good work.

Just a suggestion, but I think it would be a lot clearer if, instead of two lots of "follow this except don't do this bit", you were to copy out the whole procedure and change those two bits appropriately ?

Just trying to help minimise the chances of bricks.
 

stridger

Senior Member
Oct 8, 2010
104
93
Good work.

Just a suggestion, but I think it would be a lot clearer if, instead of two lots of "follow this except don't do this bit", you were to copy out the whole procedure and change those two bits appropriately ?

Just trying to help minimise the chances of bricks.

Yes, I agree and would like to do that, but wanted to ask unforgiven512 first to integrate it into his guide, as it seems to much overhead to maintain two guides of essentially the same procedure...

Now both devices have a fully working eng bootloader, we really need to merge these two forums into an "HTC VISION" one!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    @stridger:
    NOBODY is suggesting that you have to go and do something to your phone. If you already have root and an engineering hboot, and it is enough to satisfy you, then good for you.

    Root guides are intended PRIMARILY for those who have a BONE STOCK PHONE.

    I.e., no root, eMMC locked down.


    @ALL: To make this all very clear to everyone, steviewevie is 100% correct. gfree is MUCH MUCH safer as a first step than running off and flashing the hboot.


    What is lacking here though, is WHY it is safer.
    Basically, if hboot fails to write correctly, you're screwed.
    If gfree fails to operate correctly, you reboot and try again.

    This is because gfree does NOT alter EITHER hboot OR the radio! All it does is it changes certain values within the RADIO'S CONFIGURATION PARTITION. You can totally mess up the entire partition (partition 7, btw), and the phone will STILL WORK AS A PDA -- you can still go back and try again. It does NOT MATTER how completely badly it messes up! Even if it completely wiped it blank! Your phone will STILL WORK.

    In other words, there is ZERO risk of bricking by running gfree.
    The old method, while being LESS EFFECTIVE, also carries with it at least *SOME* risk of bricking. Why take a risk and achieve less when you can take NO risk and achieve MORE?

    Now here's where things get really fun.... AFTER you run gfree, you can THEN go ahead and write your engineering hboot, and THEN, EVEN IF you completely mess it up (flash fails somehow), then BECAUSE you already ran gfree, you can REPAIR it. This is because gfree set radio S-OFF, unleashing your full command over the radio.