yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] djfoo000:
yeah after the last step in the wiki rebooted and launched terminal emulator (still showing # at this point) and keyed in 'su'. Rebooted, launched terminal emulator again and the $ sign appears without doing anything.

As in, it now shows:

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

$ $

I should be getting the # instead?
[G2 and Desire Z Android Development] steviewevie:
That's right that it should be coming up with the $ prompt. But that's the same if you're rooted or not.

The test to see if your root has stuck, i.e. that it is permanent, is if you can now do "su" and get a # prompt.

The root user has a # prompt, everyone else gets a $ prompt.
[G2 and Desire Z Android Development] djfoo000:
so you mean to command as a root user i need to start with 'su', and it should return a # sign to signify that it's successful in recognising me as a root user?

Typed in 'su' and it returned a line starting with # sign.

ROM manager only has one option in 'Flash ClockWorkMod Recovery', which is HTC G2. Is this safe to flash on a Desire Z?
[G2 and Desire Z Android Development] steviewevie:
Yes, it's the same ClockworkMod version for G2 and DZ.

Yes, when you start terminal emulator it will still run as the regular user by default, i.e. the # prompt. So if you want to run a command that needs root permissions, you will need to do the "su" command which will then change your user ID to root (and give you the # prompt).

Congratulations, you have permament root :)
[G2 and Desire Z Android Development] djfoo000:
nice. To complete the questions, what can I do with the part7backup file generated? Am I able to restore from this file? If so, how? And in what conditions am I not able to do so?

How is this different from the backup current ROM function in ROM Manager if I were to backup by current stock ROM now?

And I assume for warranty purposes I would need to use the RUU to unroot and flash the factory stock ROM?
[G2 and Desire Z Android Development] steviewevie:
Just keep a copy of that image somewhere safe, e.g. on your PC as well as on your SD card. You probably won't need it, given that now gfree has options to un-do its settings. But it's handy to have anyway (you'd have to use "dd" to restore it back in place if you wanted).

That's only a backup of your "misc" partition, and is very small. You should definitely do a full backup via ROM Manager/Clockwork now you are done, that's a proper backup for your ROM. Then you can always easily revert back to this point (e.g. go back to stock).
[G2 and Desire Z Android Development] djfoo000:
Alright. So, what is the worst thing that can happen from me playing with custom ROMs? In those cases I can still be able to boot into recovery and restore the backup I did, right
[G2 and Desire Z Android Development] steviewevie:
The *worst* thing that could happen is that something goes very wrong with the flash of the custom ROM and you brick your phone. This is highly unlikely though. Just like the worst thing that could happen if you're not even using a custom ROM is you drop it in the street, a truck runs over it and it's destroyed. Again, not very likely if you're careful with it.

A much more likely problem with a custom ROM is that you just don't like it, and or it has some bugs that annoy you. In which case you can simply restore your backup that you did before the flash via recovery.

Even if you semi-bricked your phone there are various recovery options. Not trying to scare you here, but you do need to accept there are risks, albeit small, when you flash stuff.
[G2 and Desire Z Android Development] no6969el:
thank you worked great

thank you for this awesome guide, i was rooted literally 1 hour after opening the box from ups.. much appreciated..
[G2 and Desire Z Android Development] MacaronyMax:
Sorry if this has been answered before but does this work on an A7272 Desire Z using the OTA update (1.72.405.2)

:D Thanks :)
[G2 and Desire Z Android Development] steviewevie:
There has been more than one report of rage *not* working at 1.72.

http://xdaforums.com/showpost.php?p=10092629&postcount=46

http://xdaforums.com/showpost.php?p=10084756&postcount=45
[G2 and Desire Z Android Development] MacaronyMax:
Oh okay thanks :D Know anyway I can.. or should I just sit tight :p
[G2 and Desire Z Android Development] robwscott83:
all this sounds pretty good but i cant even get passed the first step when i type the commands in the command prompt it says adb is not recognized as an internal or external command.. :s
[G2 and Desire Z Android Development] djfoo000:
^

make sure you update the path variable as in step 4 of this guide

http://xdaforums.com/showthread.php?t=865685
[G2 and Desire Z Android Development] robwscott83:
ok.. i think i figured out the adb and the command prompt thing... did the commands (when i typed each line a bunch of stuff came up so im assuming its doing SOMETHING) but when i get to the step of typing in /data/local/tmp/rage in the emulator im not getting anything just says not found... :( this is very frustrating.... :(
[G2 and Desire Z Android Development] steviewevie:
When you do an "adb push" command you should get a line of output telling you how much data it transferred in how many seconds. If anything else comes up then it didn't work.

One of the steps in the procedure is to do "adb push rage /data/local/tmp/rage"

So if you typed in (on your phone, not your PC) "/data/local/tmp/rage" (correctly) to actually run rage later in the procedure, and you got an error, then something has gone wrong. I suspect the earlier adb push on rage didn't work or you typed it wrong (it's best to copy and paste these commands in).

Go back and do the "adb push" commands again and check that they seem to be working ok, and that you're putting the commands in correctly. It won't do any harm whatsoever to do them again. Then try running rage again.
[G2 and Desire Z Android Development] wayde187:
Instead of doing the command to lock in root you might have to use a different method of pushing su to the phone. I had a similar problem on my g2 and I used the nook method to push su and after that it was locked in. Let me track that link down.. but there is a catch. You have to change 1 piece of a command so that you write to the correct partition. I was told that changing the mmcblk0p5 to mmcblk0p25 would work for both dz and g2. It worked for g2 but I'm not sure about the dz. Found out what partition 18 is and 25 for your phone. If 25 is system then you are set. If 18 is system then replace the 2 with 18 in the mount -o remount command. You will know what I'm talking about when you get the link.
[G2 and Desire Z Android Development] robwscott83:
yes.. i think he problem is that when i am inputting the commands its not actually doing anything... alot of text comes up but nothing to indicate that anything has actually been pushed to the phone so could it be a problem with the way i set up adb??? when i type adb devices i get the serial # do i know its registering my device... so in theory all of the other commands SHOULD work as well...
[G2 and Desire Z Android Development] steviewevie:
If "adb devices" shows your device then it should work ok.

Please post up the exact message you get back from your "adb push" command. It shouldn't post up a lot of text if it's working, just one line.
[G2 and Desire Z Android Development] robwscott83:
i really wish there was i way i could post a picture to show you what is comming up... im on a 42" monitor and its taking me 3 or 4 complete revelutions of the mouse wheel to scroll through all this txt i will give u an example of some of the things its saying... thats about the best i can do... :s... sorry...

if this dosent work out can i not just do the visionary app way?? will it not work for the htc desire z i bought it from bell but i am on rogers.... i am a little behind with this as i had a N1 which i rooted my self but have not really messed with adb or the likes in a while so i am a rusty noob.. haha but here is a "exerpt" lol... just going to give you the last few lines of code

. enviromental variables:

ADB_TRACE -print debug information. A comma seperated list

of the following values

1 or all, adb, sockets. packets. rwx, usb, snc

. sydseps, transport. jdwp

ANDROID_SERIAL -the serial number to connect to.-s takes prior

ity over this if given

ANDROID_LOG_TAGS -when used with the logcat option, only these

de bug tags are printed.

thats pretty much how all of it looks and like i said im spinning the mouse wheel a good three or four times and its on a 42" screen maximized so thats ALOT of txt... nothing about files being transferred for what i can gather.. but kina startin to fele like im lookin into the matrix with all this txt man... i might jus give up on the root till i can find a 1 click dummy proof... way to do it.. but like i said before that visionarry one looked pretty solid... wondering if i did that properly if it would work... and i dont have the 2.2.1 update i heard that might be a problem

but thanks for the help tho buddy
[G2 and Desire Z Android Development] Kal_Zakath:
Well, I just gained pemanent root access ans S-Off with this guide, thank you very much for these clean and straightforward explainations. I don't know if it's the most actual, or best way to gain root access... are there better or more actual way of getting this work done ?

Someone in this theard mention that the guide has to be updated because the dd command that set the s-off hboot has been superseeded by gfree... so do I need to do something more to be up-to-date ?
[G2 and Desire Z Android Development] dummyaja:
very helpfull guide, will try this
[G2 and Desire Z Android Development] Kal_Zakath:
Well, as I read other rooting guide it seems that I just have to run the gfree -f command (after pushing it at the right place and made it executable...) to have a real permanent S-OFF... am I right ? This will not interfer with the command I used with this guide ?
[G2 and Desire Z Android Development] dustrho:
Okay, I have a couple questions regarding flashing Cyanogen on my G2.

1) Here's the device info from my phone, will I be okay to root/flash it?

Log Collector version: 1.1.0

Device model: T-Mobile G2

Firmware version: 2.2

Kernel version: 2.6.32.17-g9ab3677

htc-kernel@and18-2 )

#1 PREEMPT Tue Oct 26 16:24:40 CST 2010

Build number: FRF91

2) Which method of rooting is better/safer, VISIONary or Rage? I used VISIONary on my previously-owned MT4G with no problem, and used that method to flash three other MT4Gs belonging to friends of mine with no problem. However, after doing extensive research it seems to cause issues with rooting the G2. So, before I go ahead and root my phone, which method is best/safest?

Thanks everyone! Can't wait to get CM on this beautiful phone. :D
[G2 and Desire Z Android Development] steviewevie:
Yes that's right, you now just need to run gfree to get the "real" radio S-OFF and the other stuff. See the Wiki for details. No, it won't interfere with what you've done already.
[G2 and Desire Z Android Development] steviewevie:
:eek:

All that is coming out from running "adb push" ? :confused:

That's very odd and is not right at all. What OS are you running on your PC ? And you can type "adb devices" and that works ok ?

You can do it the Visionary way if you want, but Visionary has a much higher chance of semi-bricking your phone, so I personally recommend that folks use this method and not Visionary.
[G2 and Desire Z Android Development] Kal_Zakath:
Thanks a lot, I did what was not yet done, and everything is fine, gfree_verify tells me it's ok, and my phone just works as expected...

I'm still on stock HTC rom, but this shouldn't last too long...
[G2 and Desire Z Android Development] robwscott83:
YUP.........:(

im using windows 7 and it turns out that my phone is ROOTED(super user permisson) jus not s-offed i did a root with the visionary when i FIRST got it as that was the FIRST method i cam across.... i would really like to flash the cyanogen mod as that was the one i had on my n1 and really became acustomed to his ui's...:s

OHHH and another thing i saw something about revesion 7 opposed to 8 when downloading the sdk's.. cuz i got 8 if thats an isssue... :S.... this is wayyyyy more complicated then rooting the n1
[G2 and Desire Z Android Development] dustrho:
Never mind, I was able to successfully root my G2 using the Rage method as detailed in the Wiki. Now it's time to flash a ROM, more than likely Cyanogen.
[G2 and Desire Z Android Development] steviewevie:
Well done ! :D
[G2 and Desire Z Android Development] steviewevie:
ok, well it should work fine on Windows 7. You downloaded the Windows version of the SDK, right ? Not the Linux or Mac versions by mistake ? Version 8 should be fine, that's absolutely fine. It's just that if you have version 8 there is an extra step to get adb, which is running the SDK manager and downloading the platform tools - this is all documented in the adb guide in this forum. Did you do that step ?

Can you confirm what output you get if you run "adb devices" ?

HTC significantly increased the security on the Vision compared to earlier phones like the N1 and Desire, so there are a few steps to go through here, but it's often a lot easier than you're finding !
[G2 and Desire Z Android Development] robwscott83:
when typing in adb devices this is exactly what comes up

adb server is out of date. killing...

* daemon started successfully *

list of devices attached

*********** device (*=my s.)

as for the platform-tools when i open sdk manager the list of installed packages comes up first two items are

android sdk tools, revision 8

android sdk platform-tools revision 1

so i would assume that is what you are talking about??? i dont really recall having to do any "extra" steps to get the tools i think i jus clicked on them and hit install or somethin to that affect... should i uninstall sdk and try it again and see what comes up and go from there???
[G2 and Desire Z Android Development] steviewevie:
That sounds exactly right, you have everything you need, and adb appears to be working.

What happens if you type "adb shell", that should come up with a $ prompt which is then running on your phone (and you can type 'exit' to come out of it) ?
[G2 and Desire Z Android Development] robwscott83:
yes i get the $
[G2 and Desire Z Android Development] steviewevie:
ok, so adb is working fine.

What doesn't work exactly, what are you typing when you get that huge long list of output ? And which directory are you in on the PC when you type it ?
[G2 and Desire Z Android Development] robwscott83:
the code found here:

http ://www . techhackz.com/2010/12/how-to-permanently-root-your-htc-desire.html?m=1
[G2 and Desire Z Android Development] steviewevie:
So does it go wrong like that (with the big list of output) when you type "adb push su /sdcard/su" ?

Have you got an SD card in your phone ? (just checking)

Is there a file called "su" in your current directory on the PC where you are running that command from ?

By the way, that guide is a bit out of date, I recommend using the version in the Wiki.
[G2 and Desire Z Android Development] robwscott83:
i do have an sd card .. and yes as soon as i type the push su /sdcard/su

thats when that output comes up.... from the very first line of code...

and this is where i got a bit confused in the process... one of the steps of seting up adb was "update your Path variable" i am not 100% confident i did this correctly i followed the steps exactly and the end result looks like what the example they gave... but i may have accidently deleted a semi colon in the line or something so i tried to fix it to what i thought made sense so i might have messed something up in there.. and i do not know anything about that path variable first time ive ever seen or heard of it... so .. :s....

and that process came from

http://xdaforums.com/showthread.php?t=865685
[G2 and Desire Z Android Development] steviewevie:
Yes, a semi-colon problem might be all it takes to mess it up. Copy your PATH variable and paste it up here.
[G2 and Desire Z Android Development] robwscott83:
this is what the entire thing looks like as there were other paths in there... and when i copied and pasted the android paths in there this is where i may have overwritted part of the previous paths that where in there... but i dont think that would effect the android paths tho??

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec MyWinLocker\x86;C:\Program Files (x86)\EgisTec MyWinLocker\x64;C:\Program Files (x86)\EgisTec MyWinLocker\x86;C:\Program Files (x86)\Android\android-sdk-windows\tools;C:\Program Files (x86)\Android\android-sdk-windows\platform-tools;C:\Users\Robnmandy\Desktop\new root

the last one i added later on just to see.. but it didnt work even before i added that path
[G2 and Desire Z Android Development] robwscott83:
looking through the folders i DON'T see a file named "su" in the tools or platform-tools folders... what does this mean??? am i missing somethin.... :s
[G2 and Desire Z Android Development] steviewevie:
"su" is in the zip file that you should have downloaded and unzipped as part of the procedure, and you should be running these commands from the directory where those files are stored.

Did you download and unzip the files ?
[G2 and Desire Z Android Development] robwscott83:
i did not see anything about downloding a su.zip here:

http://www.techhackz.com/2010/12/how-to-permanently-root-your-htc-desire.html?m=1

where would i find that zip file... again.. thank you so much for this help and i apologize for taking up so much of your time.. but i really do apprecieate it... :)
[G2 and Desire Z Android Development] steviewevie:
Your PATH looks fine. And when you run "adb devices" and "adb shell" it picks up adb and runs it ok, so there's nothing wrong with your PATH.

Sorry I am getting confused with trying to help people with slightly differing problems in different threads lol.

We just need to figure out what is going on with "adb push".
[G2 and Desire Z Android Development] steviewevie:
Step 3 in that procedure is to download a zip file, and su should be in there, along with other stuff.
[G2 and Desire Z Android Development] robwscott83:
sorry i did download a .zip and saved it to my desktop and there is a file named su along with busybox rage root su and superuser.apk

are these the folders i should have in path variable???
[G2 and Desire Z Android Development] steviewevie:
No, they shouldn't be in your PATH.

What we are trying to do in this procedure is to copy those files from the zip file over to your phone. We do this with the "adb push" command, which "pushes" the files from the PC to your phone.

So you need to unzip those files somewhere convenient, then "cd" to where you have put them, then run adb from there. Then when you do "adb push su /sdcard/su", adb will look for a file called "su" in your current working directory (folder), and we want it to find it there. Similarly with the other commands.
[G2 and Desire Z Android Development] robwscott83:
ahhh..ok... soooo how do i cd to where i put them.... sorry this is where my lack of cmd knowlege may be a hinderence... im sorry....
[G2 and Desire Z Android Development] robwscott83:
AHHH i figured out how to get into the folder ... im going to try this out now.. thank you so much hope it works out...
[G2 and Desire Z Android Development] steviewevie:
Good luck, let us know how it goes.

I just realised, all that stuff that appeared for you before is just the "usage" method from adb if you try and do something it doesn't like. I should have worked that out before lol.
[G2 and Desire Z Android Development] robwscott83:
well... i tried the adb push su/sdcard/su command from the path that the files are in on the pc... and no luck still comes up with all of the output as mentioned before..... EPIC FAIL!!!!!!! :(
[G2 and Desire Z Android Development] steviewevie:
You didn't type it like that, did you ? It should be :

adb push su /sdcard/su
[G2 and Desire Z Android Development] robwscott83:
holey crap it worked.... ha... i was typing it wrong... but now when i get to the emulator part its telling me permission denied uuugghhh :(
[G2 and Desire Z Android Development] steviewevie:
When you try to run the "rage" program, you mean ? Did the previous command "adb shell chmod 0755 /data/local/tmp/*" work ok ? It shouldn't produce any output, just come back to the prompt.
[G2 and Desire Z Android Development] superspacey:
dont worry... you are doing something wrong, tell us specifically what step you are trying.

i am on rogers as well with a bell desire z and i did this just a couple days ago.
[G2 and Desire Z Android Development] robwscott83:
yup ran that code and it went back to the prompt... i put / data/local/tmp/rage in terminal and it says

/: permission denied
[G2 and Desire Z Android Development] steviewevie:
There shouldn't be a space between that first "/" and the "data", i.e. :

/data/local/tmp/rage
[G2 and Desire Z Android Development] robwscott83:
ugh im soo close im at one of the final steps in terminal i have to type

insmod /data/local/wpthis-Z.ko

is this the correct typting because now its saying cant open ^^ in terminal and it did tranfer through the cmd it says 2310 kb/s etc so i know it transfered

nvm..... :D

now for the crucial part i have to type in this long peice of code and the guide gave a warning that if i mess this up it could brick my phone... :s.... im almost too afraid to attempt it.. givin my trackrecord for mis typing it... :(
[G2 and Desire Z Android Development] steviewevie:
That step on its own won't brick your phone. But don't do the "dd" command that comes afterwards, it's not necessary right now, and you should use the "gfree" command that is documented in the wiki. It's just the "dd" command that has a danger of bricking.

Yes, that insmod command is correct there.

I noticed that site you linked to doesn't use a good font for coding, so it does look like there are some spaces where there aren't really.
[G2 and Desire Z Android Development] steviewevie:
After running "rage", use this procedure - http://xdaforums.com/wiki/index.php...verify_sdcard_is_not_mounted_by_your_computer

You can download the required "gfree" stuff from a link there. This is safer than the "dd" command.
[G2 and Desire Z Android Development] robwscott83:
im on the dd stage right now... i copied and pasted that code right from the site into emulator so there shouldnt be any mistakes in it correct??? im not sure how to do the whole gfree thing... do you think i will be fine doing it the copy and paste way??
[G2 and Desire Z Android Development] steviewevie:
Did you do a checksum on the file you are going to use with the dd first, to make sure it's ok ? Because that's a danger, e.g. transferring a partial/corrupted file.

The gfree procedure I linked to comes right after running rage to get your root prompt, which I presume is where you are right now. So you can switch straight to that and download gfree and continue from that link.

By the way, I'm just about to go out I'm afraid, so good luck and I hope when I login later I see you're all done ! :D
[G2 and Desire Z Android Development] robwscott83:
got to this

adb shell

$ su

su

PERMISSION DENIED

$
[G2 and Desire Z Android Development] robwscott83:
:D...... SUCCCEESSSSSS!!!!!! wheeeew... flashing cyanogens mod right now... ... thank you SOOOOOOOO friggen much... i admire your patience sir.... thank you
[G2 and Desire Z Android Development] steviewevie:
I knew you could do it :D
[G2 and Desire Z Android Development] ahalp:
Thanks for this wonderful guide, worked flawlessly! :)