[Desire HD Android Development] MacDegger:
PREFACE & CRY FOR HELP:

I’m pretty sure this guide works. This is how I got permaroot and write access to my DHD system files and directories. But I might have made mistakes. I hope some experienced people will read this guide and point them out. I hope newbs will wait for a few people to say if this guide is correct or not before trying this.

I mainly used Evostance's guide. Thank you Evostance (and all the others whose work I've ripped off here!) and I hope you understand me for posting this rather longer, newbified guide;

The guide:

This is a guide to rooting and gaining write permission to your Desire HD, written for the Android newb.

You ain’t dumb, you just don’t know Android. Even though I’m learning to program for this OS, I don’t know Android either. Not enough to root and gain write without the help of expert reverse engineers and other guide writers who have much more experience than I do with this OS.

However, all the knowledge is very fragmented right now, due to everyone being VERY EXCITED about root now being available on a NAND locked DHD. The info is there, but it takes some looking around, some warnings, some things I didn’t find in one place, but scattered through many posts on many threads.

That’s why I wrote this: for the Android newb who wants a rooted phone and doesn’t have the time to spend hours tracking down the information and all the caveats.

WARNING: THIS IS DANGEROUS AND CAN BRICK YOUR PHONE. IF YOU TRY THIS, IT IS YOUR OWN RESPONSIBILITY, NOT THE APP WRITTERS, NOT THE GUIDE WRITERS, JUST YOURSELF.

1.

First things first: you might have a lot of programs running which use temproot.

Remove them. ALL.

Check SuperUser which apps have been granted root, and uninstall them, removing all data. For previous (temproot only) versions of Visionary, it might be safer to stop it temprooting at startup, and restart your phone (longpress power, select restart or power off), then remove visionary, just in case.

Finally, remove SuperUser itself.

All the above might not be necessary, but there have been reports of trouble from having these programs running whilst trying to achieve permroot. So be safer rather than sorrier.

2.

Now your phone is essentially running a stock version; no programs running root are active, no surprises at startup. Titanium Backup etc etc are not going to interfere.

Get the following files and programs:

From the Marketplace:

-Gscript (Lite is fine)

-Terminal Emulator

-a root file explorer. The only program I’ve found which does what I need is Root Eplorer. It will cost you money, but Android Mate or Astro haven’t been able to do the job for me.

(DO NOT INSTALL YET -SuperUser; we’ll get this later on; if you install it now you might run into trouble whilst trying to get root, as it might interfere with certain program’s checks to see if you have root already. I mention this program here so you know you’ll need it later, so either have access to the Marketplace or have the .apk ready to install later on.)

Install these on your ‘clean’ phone.

From the internet:

-the files listed in the first post of :

http://xdaforums.com/showthread.php?t=805327 (adwinp’s guide)

or

http://xdaforums.com/showthread.php?t=834427 (Evostance’s guide)

I used the second link (and the guide Evostance wrote which is included). Use this time to read through what Adwinp and Evostance say. Follow the link to their threads and understand what you’re doing.

-get Visionary+ from the awesome Paul O’Brian.

DO NOT INSTALL THIS YET!

http://android.modaco.com/content/t...350/10-nov-r12-test-visionary-one-click-root/

Use a version higher than v11 (v12, v 13, v14 … I don’t know what version he’s on; you might have to look for v13 in that thread, page 6, 7 or 8, if he hasn’t released a newer version).

3.

Now, get all these files and apk’s on your phone. Sync ‘em, download them direct, use wifi, whatever. Just don’t install them (yet). You want the raw files.

Specifically:

-the visionary apk

And from any of those packages you downloaded from the guides listed above:

-the wpx.sh and hboot.sh files (found in the gscript folder of Evostance’s guide’s package): these should be put on your SDCARD, in a directory named gscript (you might be able to put them anywhere, I put them here and the process worked for me).

-the correct wpx.ko and hboot-XXXXXX.nbo files. The XXXXXX refers to a specific hboot file, corresponding to if you updated your phone over the air with the HTC fixes or not. These files are found in rar/zip packages found in the previous mentioned guides (and probably many other mirrors). Pick the files which are located in the folder whose name corresponds to your kernel version (found on your phone using menu -> settings -> About phone -> Software Information -> kernel version).

These .ko files should be put in your SDCARD’s root directory

4. RECAP:

Now you should have

-Gscript and Terminal Emulator installed

-the Visionary .apk on your sd card somewhere

-wpx.sh and hboot.sh in the SDCARD\gscript directory

-wpx.ko and hboot-XXXXXX.nbo on your SDCARD’s root.

5.

Now we’re almost at the point of no return.

Run Gscript.

Hit the menu, “add script” and hit “load from file”. Select the wxp.sh file. Have “run as superuser” selected.

Do the same for hboot.sh.

Exit gscript.

6.

Install Visionary.

Don’t do anything except get temproot. ONLY hit the temproot button; don’t change anything else.

Wait.

You should have temproot now. To be sure, go and select ‘run at boot’ (the ‘re-get temproot’ checkbox) in Visionary and reboot your phone (long powerkey press, restart or shutdown, then restart your phone).

You should have temproot again. You can check this after the next step:

7.

Install SuperUser (preffereably from the Market, so you have the latest version).

If you start the Terminal Emulator, you should now be able to type

su

and hit enter, and the prompt will change from a $ to a #. If so, you have root. You might have to allow SuperUser access to the Terminal Emulator. Do so.

7.

After you have temproot, you should now start Gscript. In the next bits, you might get “Gscript is trying to use SuperUser status” (or somesuch) popup message. Allow this.

Run the wxp script. It should report an error. This is OK.

Run the hboot script. If all is well, you should get a three (actually four) line report saying that something worked.

If you get a message saying that this operation couldn’t run, you’ve done something wrong, somewhere. I can’t help you: try from the beginning or something. Sorry I can’t be more helpful than that.

8.

Point of no-return:

You have temproot, you have installed SuperUser and you have run the two Gscript commands.

In this next bit, SuperUser might prompt that Visionary is seeking root permission. DENY THIS. It’s my belief that Visionary expects NOT to get that permission and only then runs. Giving permission leads to not much happening after you press the root button. I suspect a few problems happen due to this. Anyway:

Startup Visionary again. (maybe select ‘mount system as r/w’ … for me it didn’t, which is part of why I’m writing this guide).

Now, in Visionary, hit the ‘get permroot’ button. This process might take a while. If it’s working, the menu you pushed the button on should whisk away to the side: that way, you know Visionary is getting you permroot. Your phone should reset and you should have permroot.

8.

Making it stick.

Use Root Explorer for this next part. I tried using other programs, but they wouldn’t work. Mainly because granting write access hadn’t worked properly.

Now copy

su to /system/bin/

and

Superuser.apk to /system/app/

You can find su in system/xbin/ and SuperUser.apk in /data/app/. You might have to mount the system directories as r/w (from r/o) using Root Explorer. I had to do this, as I didn’t have write access to system files, even though I asked Visionary to do this. No biggy, but it did mean I had to buy Root Explorer. Not a bad price to pay for permroot, write access and a pretty good file explorer 

Now, finally, open Terminal Emulator and type:

su <enter>

chmod 4755 /system/bin/su <enter>

After typing ‘su’, the prompt should change. If it doesn’t, as mentioned before, you don’t have any kind of root (or Term.Emu doesn’t have it, maybe resetting SuperUser’s settings will help) and I can’t help you.

Now you should have total control over your system files. You now finally own your phone.

9.

Thanks to everyone involved, from the hackers to the helpers to the guide writers to those who just chimed in. I didn’t do anything except steal all this info from them, use their files and programs and write this down.

Thank you; we NAND locked phone users are in your debt.