yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] steviewevie:
Don't worry, I've just come from WinMo too, so I know the feeling. Though I have a Unix background, so some parts of Android (e.g. the command line !) make me feel at home :D

So you did the temp root bit, did you get the load of text and then "forked xxx children" when you ran the "rage" script ?

Ignore that PATH bit when you start Terminal Emulator, that's normal.

You won't be able to flash a custom ROM unless you've done the S-OFF bit (the dd'ing to a partition on the phone).
[G2 and Desire Z Android Development] Fallen Spartan:
Yes I got the "forked xxxx children" text
[G2 and Desire Z Android Development] steviewevie:
What's the serial number of your phone ? The first bit at least, does it start "SH" ? Because I wonder if you've run into this problem - http://xdaforums.com/showthread.php?t=851421
[G2 and Desire Z Android Development] Fallen Spartan:
SH0B................

Looks like I've some more "light" reading ahead :rolleyes:
[G2 and Desire Z Android Development] steviewevie:
Yeah but there's good news, the procedure has been worked out now for you to permaroot your phone. Before today you couldn't have done so ! :)
[G2 and Desire Z Android Development] Fallen Spartan:
Lucky me :p
[G2 and Desire Z Android Development] steviewevie:
Nice timing :D
[G2 and Desire Z Android Development] nzfalcon:
Hello

Ive followed your guide and have got a root shell in terminal emulator. But im getting some really bizzar issues.

Some times when I boot market and terminal emulator are missing sometimes they are there. sometimes I boot and app X will force quit and app y will be fine but next reboot app Y will force quit and app X will be fine.

When it boots and ive got terminal emulator I can su to root and the installed Superuser app runs and shows terminal as running as su

have your got any suggestions?

every thing appeared to install fine. should I run through the howto again and do everything again?

it looks if I boot up with out the SD card in it boots fine ever time.

Ive been trying to install rom manager but it says installation unsuccessful every time
[G2 and Desire Z Android Development] nzfalcon:
had to factory rest and its working now, tho to my surprise I still have su. So i guess problem resolved?
[G2 and Desire Z Android Development] dash4g:
Hey guys, I just had a quick question about this method of rooting, when I try to execute this command on my HTC Desire Z (Bell):

adb push rage /data/local/tmp/rage

I get an error:

cannot stat 'rage': No such file or directory

I did a google search, and even reinstalled adb... any help much appreciated, thanks!

Windows 7 64 bit

Bell HTC Desire Z

Latest ADB from google
[G2 and Desire Z Android Development] steviewevie:
You need to be running that "adb" command from your PC, not your phone.
[G2 and Desire Z Android Development] composites:
when i run

# /data/local/tmp/busybox md5sum /data/local/*

i get the same "CVE-2010-EASY Android local root exploit (c) 2010 by 743C...

Forked #### childs." message that appeared after running 'rage' instead of seeing the actual file checksums. is this normal?

at this point my mobile sometimes reboots. one time the touchscreen and cap buttons were reversed (home was search and search was home, etc) and had to pull the battery to fix this.

can anyone advise?
[G2 and Desire Z Android Development] steviewevie:
Your mobile is rebooting because you are running rage for a second time. For some reason you have pushed rage over to your phone as busybox. i.e. when you run "busybox" you're actually running the rage program.
[G2 and Desire Z Android Development] composites:
thanks for the quick reply. you're right, i pushed rage as busybox. silly me =/
[G2 and Desire Z Android Development] dash4g:
Thanks for the reply...

I was, but I just rooted with visionary
[G2 and Desire Z Android Development] jonoball88:
i pushed everything onto my phone but when i start the first step on the terminal putting in /data/local/tmp/rage it tells me " permission denied"

anything i can do??
[G2 and Desire Z Android Development] steviewevie:
Did you do the last bit of the previous step, and did it work ? i.e. :

adb shell chmod 0755 /data/local/tmp/*
[G2 and Desire Z Android Development] jonoball88:
ok so heres what happened... i got my phone rooted and s-off and got ahead of myself and tried flashing a world PC10IMG.zip... apparently that could have bricked my phone... lucky it didnt flash the rom properly and froze as soon as it tried to access the bootloader.

I booted up the phone and still had the original bell rom working fine. I then noticed that since I tried flashing the world rom it then turned my "s-on" and screwed up the superuser app. So then I found the stock bell ruu and flashed that onto my phone.

I went through all the steps to re-root my phone and turn s-off. Everything worked fine untill I got to the last step to lock in the root (/data/local/tmp/root) and it said " mkdir failed for /system/xbin, File exists"

So Is my phone still rooted and not active?

Busybox tells me the phone is unrooted. The visionary way has also never worked for me as it always got stuck on the " rooting your phone" stage and never did anything.

ill even pay someone to help me!!
[G2 and Desire Z Android Development] steviewevie:
Ignore that error message, it usually does that. Did you have a # prompt at that stage ?

Do you get a # prompt if you type "su" ?
[G2 and Desire Z Android Development] jonoball88:
yes i had a # at that stage, as for the second question whenever i type in "su" in the terminal it says su: permission denied
[G2 and Desire Z Android Development] steviewevie:
When you type in "su" then the Superuser app on the phone should pop up and ask for permission. But if you don't click on it quickly then you'll get "permission denied".
[G2 and Desire Z Android Development] jonoball88:
but when i type in "su" the superuser app dosnt pop up. As soon as i type it in the terminal it says permission denied immediately
[G2 and Desire Z Android Development] steviewevie:
Do you have the Superuser app installed ?

It sounds like you don't have permanent root applied properly. When you ran that root script, did you have a # prompt ? And what error message did you get from running the "insmod" command, if the error isn't "Function not implemented" but something else, it won't work.
[G2 and Desire Z Android Development] jonoball88:
yep i have su installed... the thing is this is the second time im trying to run this root and s-off process. The first time i did it i had full root access, busybox confirmed i had root and su was working fine. i even ran titanium backup to confirm root worked.. The problem was I tried flashing the wrong world rom and when you do that it locks up the phone apparently. So then I flashed the stock bell rom back on and when i installed su and busybox it said i no longer had root. So i figured if i would do this process all over again it would work but no such luck.

thanks for all your help fyi. if you have paypal ill give you 40 bucks if you can help me out!
[G2 and Desire Z Android Development] steviewevie:
I'm happy to try and help but thanks, I don't need any money for it. Rage is very straightforward but you do need to be careful you are doing exactly the right steps in exactly the right order. If you get any unexpected error messages then it won't work, you need to identify which step is going wrong.

Please go back and try the whole rage process again, starting with the temp root bit. When you get to the perm root bit, do not do the "dd" bit to copy the engineering bootloader (that's been superseded by gfree, and this guide really needs updating to reflect that), just skip over that one step but do all the rest.

Tell us where it goes wrong. Make sure you have all the expected prompts and no unexpected error messages. Something is going wrong for you at some stage, it's probably just been overlooked.
[G2 and Desire Z Android Development] jonoball88:
thanks, i really appreciate it! So i tried the whole process all over again and i think i found something now... when im on this step to turn security off for permanent flashing - insmod /data/local/wpthis-Z.ko

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

i type it in and i get a different error message... it says `init_module 'wpthis-Z.ko' failed ( Exec format error)

could that be whats going wrong
[G2 and Desire Z Android Development] steviewevie:
Yep, that's exactly what's going wrong. That command is inserting a kernel module to defeat the write-protection. So when it works, it comes up with that "Function not implemented" error message - that means it worked correctly !

But as you say, you get a different error message, so that means it failed, and nothing was written to internal memory, only cache. So when you reboot you lose root - i.e. it's only a temp root.

What ROM/kernel combination are you running ? That kernel module seems to be incompatible with your kernel, i.e. it's not the standard European Desire Z kernel.
[G2 and Desire Z Android Development] jonoball88:
kernal:

2.6.32.21-gdfdd99d

htc-kernal@and18-2 #1

mon out 18 19:47:51 cst 2010

software number:

1.34.666.1
[G2 and Desire Z Android Development] jonoball88:
i think i found my problem... i flashed to a older rom... the original bell rom was 1.35.666.5.

ill try find a way to flash back to that newer ( original bell shipped) rom then maybe it will fix the root process.
[G2 and Desire Z Android Development] steviewevie:
Yeah I can only presume that the kernel module simply won't work with your older ROM. You can always temporarily flash to a different ROM that does work with that kernel module and then flash back to what you have. Or you can try the other kernel modules e.g the G2 ones (pre- and post-OTA) - check the thread on the G2 forums. The worst that can happen is they'll simply not work and give you that same error message.
[G2 and Desire Z Android Development] jonoball88:
I can't find any kernel or Rom that is the original bell Rom.666.5 one. Can you point me in the right direction? and would I have to use the gold card way to flash since I have no root and s on?
[G2 and Desire Z Android Development] steviewevie:
I'm afraid right now there isn't an RUU or ROM on the forum for the shipping Bell DZ. If anyone can find one, it would be very useful !

Maybe it would be possible to construct one from various dd's of a Bell DZ that has had a factory reset done on it ?

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] jonoball88:
alrighty, guess ill wait till someone can dump the bell dz 1.34.666.5 rom.

thank you for all of your help. i really appreciate it!
[G2 and Desire Z Android Development] djfoo000:
i'm confused. This guide has the directories started with /data/ while another guide starts with /sdcard/. Which one should I follow?

If it's relevant, I have the Desire Z.
[G2 and Desire Z Android Development] Zen_mystic:
Hi I have downloaded the attached file and tried many times, but i could not unzip the files. Anyone could kindly help. Thanks
[G2 and Desire Z Android Development] Ganii:
Why not trying the new method:

http://xdaforums.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
[G2 and Desire Z Android Development] Zen_mystic:
Thank you. I will try it.
[G2 and Desire Z Android Development] Ganii:
Yes,it`s safer,you don`t need to flash the engineering bootloader (hboot)

and now with the new method you can go back to S-ON only with

gfree and a simple command!
[G2 and Desire Z Android Development] steviewevie:
Yeah this guide really needs an update. The most up-to-date method is now in the Wiki. Maybe I will start a new thread on this.
[G2 and Desire Z Android Development] djfoo000:
thanks for pointing me to the right direction. Much appreciated.
[G2 and Desire Z Android Development] breezy169:
Hey I believe I rooted correctly bc I have the S-off when I go into the bootloader but for some reason I keep getting permissions denied on terminal . Any1 know why?
[G2 and Desire Z Android Development] steviewevie:
You used the rage method, right ? S-OFF is different from root.

Did you get the root prompt ok in terminal emulator after running rage ?

When you run su on the phone, it should pop up a box from the Superuser app to check whether you want to grant it root permission. Do you get that ? You have to say "Yes" pretty quickly to that or it times out and says "permission denied".
[G2 and Desire Z Android Development] swimwd:
I just want to temp-root

I don't want to modify my phone too much so that I can **UNDO** everything I do.

So, I just want to temp-root and, overwrite an app under /system/app/.

After the steps mentioned in the temp-root section above,

it seems that I have to do something in order to overwrite something a system app. It seems that simply overwrite part of the Root script will do but.... I am kind of beginner... :confused:

Could anybody kindly give me some hints?
[G2 and Desire Z Android Development] breezy169:
Well I used orginal root method from modacco or somethin like that . And whenever I write "su" nd then enter it just says permission denied without asking yes or deny permission . its really strange
[G2 and Desire Z Android Development] steviewevie:
If you've only done the temp root part of the procedure, you are running as root but the write-protection on parts of the phone (including /system) is still there. So if you make any changes they are only held in cache and not written to permanent storage. Then when you reboot the phone the storage will be re-loaded and your changes are gone.

You don't need to do the "dd" command, but it is the "insmod" command that you need, running that (with the appropriate kernel module pushed to your phone via adb) will turn off the write protection for what you are doing.

I suggest you just permanently root your phone though. It's very easy to undo.
[G2 and Desire Z Android Development] steviewevie:
Sounds like the Superuser might not be there or not installed correctly. Can you run the app ? I suggest reinstalling it, or perhaps just going back to the start and going through the rage method again, looking carefully for error messages.

When you do the "insmod" command then you must get the "correct" error message, or it hasn't worked, and changes won't be written to permanent storage.
[G2 and Desire Z Android Development] breezy169:
Yea I can run it perfectly and its there every time I reboot but whenever I come to an app that requires permission my superuser won't pop up asking yes or deny . And yea every step worked put perfectly . Its just the superuser that seems to mess up . I just now reinstalled it and that didn't work either . It won't ask anythinq . what do ya think I should do now ?
[G2 and Desire Z Android Development] steviewevie:
I would go back to the beginning and check all the files are there and have the correct permissions - i.e. su as well as Superuser.apk, rage, busybox and the "root" script. Run rage again and check it works properly to give you the root prompt via terminal emulator. Then when you get to the insmod check out get the "correct" error message, I wonder if you're getting the "wrong" error message (in which case the other stuff won't stick). You don't need to do the "dd" of the eng hboot.

Alternatively, you can try and use the method in the Wiki, which is the most up-to-date one. This uses gfree to do the breaking of the write-protection (though still based on rage) - http://xdaforums.com/wiki/index.php...cess_.28Permanent_Root_.2F_.22Permaroot.22.29
[G2 and Desire Z Android Development] breezy169:
Okk I'm gonna try to do the root over again but this time I'm going to try wiki's version . But what steps do I skip bc I already have the S-off . ?
[G2 and Desire Z Android Development] steviewevie:
Don't skip any of it, it won't do any harm doing it again.

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] breezy169:
ive been trying to do it but i cant run adb yet. is there another method i can do ? i feel like im really close to actually rooting the g2 but my superuser just wont ask for a yes or deny . its starting to annoy me ..
[G2 and Desire Z Android Development] swimwd:
Hi Steviewevie,

Thank you for your reply.

Could you tell me how to undo the perm-root?

I don't have the original ROM of my DesireZ though...

Thank you in advance.

SWD
[G2 and Desire Z Android Development] Zen_mystic:
Hi guys, basically I have adb setup and ready to start rooting. I could extract all the files gfree_temp-root.zip but i facing the problem with extracting rage. this is the error message i got.

Extracting to "C:\Program Files (x86)\Android\android-sdk-windows\platform-tools\"

Use Path: yes Overlay Files: no

Error: Access is denied.

Cannot create C:\Program Files (x86)\Android\android-sdk-windows\platform-tools\rage.

Administrative privileges may be required.

The archive file cannot be opened for output.

I'm following the latest guide from wiki. Thanks in advance for any help.

Edit: sorry about it. its my anti virus causing this.
[G2 and Desire Z Android Development] steviewevie:
Did you put on the engineering hboot (with the "dd" command) ? Or did you just do the other permanent root stuff ?

If you didn't put that on, then you could just remove the Superuser app, that should do it. Depends on exactly why you want to remove permanent root.
[G2 and Desire Z Android Development] swimwd:
Thank you for your reply!

I still haven't done the perm-root nor the hboot,

What I have done was just running "rage" (temp-root) and

found that I can't overwrite the default mms application... and also couldn't access commands like "cp"...

I want to keep all these things undo-able because, I may sent it to HTC

for repair and, one day I may sell it for many reasons.

Actually, I also wonder if the "reset factory default"

will help me to undo the changes like busybox installation in the root script, system-application reset... (If my guess is right, probably it won't though.)
[G2 and Desire Z Android Development] soypoi:
I apologize for these questions but I wanted to make sure of something because I don't want to brick the G2. I'm used to the one slick roots and placing files on the sd but reading this I'm lost.

When the directions state "On your phone" I take that to mean I can do all of this from terminal emulator, is this right? I have never used adb and never had to so all of that is quite foreign, especially since a lot of it is written for PC and I have a mac.
[G2 and Desire Z Android Development] steviewevie:
With temp root the /system partition (amongst others) is still write protected. So that's why you can't overwrite stuff like that, because you can't write permanently to the NAND storage.

If you want a "cp" command you can install busybox.

I am not sure myself if factory reset will get rid of busybox etc, but why is that an issue, can I ask ? HTC aren't going to be able to say that you've voided the warranty by installing busybox.
[G2 and Desire Z Android Development] steviewevie:
No need to apologise, much better to ask questions if you're not sure about something, than risk messing up your phone.

Yes, in bits for "On your phone" it tells you to use terminal emulator.

The adb commands should work the same way on the Mac as on Windows.
[G2 and Desire Z Android Development] djfoo000:
I plan on following the steps on the Desire Z XDA wiki and before I take the leap (I know I'll laugh at myself for being so worrisome about it once i've rooted) I have a question:

What will flashing the engineering hboot allow me to do? I read (from the cyanogenmod wiki) that it will help unbrick a phone, but doing the steps wrongly will definitely brick a phone.

Assuming that I want knowledge on how to deal with bricking in the event it happens, what other alternatives do I have besides flashing the engineering hboot? Does the RUU do the job?

Really do not want to proceed with Visionary considering that every other post about Visionary is reports of bricking...
[G2 and Desire Z Android Development] steviewevie:
Flashing the eng hboot will give you full access to the "fastboot" options for flashing a new recovery/radio/etc.

If you want to leave that for now, then just use the Wiki method of rage and gfree, and you'll still have full radio S-OFF. All you will be missing is those fastboot options for recovery.

When you're feeling more confident, you can always put on the eng hboot later. As long as you do a checksum of the file you've downloaded onto your phone, before you "dd" it onto the hboot partition, you should be ok.
[G2 and Desire Z Android Development] djfoo000:
ok i hope i'm not screwed. When i typed in "$ /data/local/tmp/rage' suddenly my phone asked for a connection type, and I didn't get to see the 'forked XXX child' msg. but a bunch of text that included 'screwing kids' or something liek that. Can i proceeed? Or I need to type in "$ /data/local/tmp/rage" again? I did not key in the $ sign just the command after it.

Terminal emulator exited and the phone became laggy. I launched it back and instead of a $ sign it was now a # sign.

Help?

I have now put the default connection to 'charge only', previously it was 'disk drive' but i selected 'charge only' for the purpose of rooting when prompted but did not check 'do not ask me again'. I guess it won't prompt me again now.

Or is it easier for me to reboot the phone and resume the steps right after pushing the files?

The connections are still intact as I'm posting.

The phone is still functional though, not laggy anymore.

Summary:

Last command in command prompt = adb shell chmod 0755 /data/local/tmp/*

Last command in Terminal emulator = $ /data/local/tmp/rage

Phone suddenly asked for connection type

Terminal emulator exited

now it's showing (after reopening the app) = export PATH=/data/local/bin:$PATH# #

Panic!
[G2 and Desire Z Android Development] steviewevie:
That sounds ok, though I wonder if you didn't wait long enough for the "forked" message.

What rage does is start up a couple of thousand processes on your phone, to exploit a bug that lets it become root. So your phone will go a bit slower while this is happening.

If you've got the # prompt then that's good news, it means you've got root. At this stage it's only a temp root, but that's what it's supposed to do.

Can you get the terminal emulator back up and open again with the # prompt ?
[G2 and Desire Z Android Development] djfoo000:
thing is my screen turned off and (screen timeout? lol) and connection prompt thingy before I get to see the 'forked ....' msg.

Opened terminal emulator and it's showing me now:

export PATH=/data/local/bin:$PATH#

# #

Proceed? Any way I can check if i'm ok to proceed with perma root?
[G2 and Desire Z Android Development] steviewevie:
ok, well it sounds like "rage" worked fine. So just proceed to the next step. Skip over the "dd" though.
[G2 and Desire Z Android Development] djfoo000:
ok i've proceeded with the perma root steps and the last return was:

mkdir failed for /system/xbin, File exists

I've proceeded with the 'sync' command.

Terminal did not return anything.

Ok to reboot? Been about 5 minutes now i'm still in terminal.
[G2 and Desire Z Android Development] steviewevie:
Yes, go ahead. That "File exists" message is normal.
[G2 and Desire Z Android Development] djfoo000:
YES! Reboot was OK! Man it did take a life time to reboot (longer, I suppose?). How do i check if root access is persistent? Typing 'su' in terminal?

EDIT: nvm, saw the lovely ninja with 'superuser permissions'. (or it's going to be there regardless of outcome?)

steviewevie you are awesome. Glad you're there to help.
[G2 and Desire Z Android Development] steviewevie:
Yes, do an "su" and check you can get the # prompt after a reboot.
[G2 and Desire Z Android Development] djfoo000:
yes after keying in su the ninja came out asking for permission and $ sign appears after reboot in terminal. Awesome.

I guess subsequent questions have to asked else where? It seems when I open ROM Manager and click 'Flash ClockworkMod Recovery', the only option is HTC G2. Safe to flash?
[G2 and Desire Z Android Development] steviewevie:
The # sign, you mean ?