yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] trench619:
A few questions before I start... I'm kind of new to this so go easy on me, I’m scared about fukkin **** up.

1)	Before I start imputing any codes in ADB, do I need to type the commands first that are described in the unlocker site on setting up ADB. The commands I’m speaking of are:

cd\

cd AndroidSDK\tools\

adb devices

2)	When imputing the code as shown in this guide, do I need to press return after each line? Or can I copy and past the entire 7 lines or so at a time...

adb push su /sdcard/su

adb push Superuser.apk /sdcard/Superuser.apk

adb push rage /data/local/tmp/rage

adb push busybox /data/local/tmp/busybox

adb push root /data/local/tmp/root

adb shell chmod 0755 /data/local/tmp/*

Like, could I copy and the past the entire above script? Or do I need to type each line and then press return? Also, after all lines are added do I need to press return?

3) When speaking of the OTA update, are you talking about the update my phone did a month after I bout it? Were it said there was an update and I clicked on it and it installed and rebooted? And if so, if I reset my phone to factory would it be considered “Pre-OTA”?
[G2 and Desire Z Android Development] TheRealEvo:
this is the best tut i have seen in a while :) , i tried to do the other one with visionary, i ended up doing it 3 times and it didnt work, but i gave this a chance and it worked on the first try! thanks you so much for the excellent tut bro! And thank you to all that supported the G2 scene.
[G2 and Desire Z Android Development] steviewevie:
Yes, you either need to go specifically to the directory where you installed adb, or you need to add adb to your "PATH" variable in Windows. The first command there needs a space between the "cd" and the "/".

They are separate commands, not a script. So copy and paste them one at a time, so you can check each one works and if you should get an error message (unlikely) then you know which command it came from. If you copy and paste it reduces the chances of error compared to typing each line manually.

Don't worry too much, those particular commands do need doing, but you really can't mess up your phone if you do them wrong (just that the rooting won't work).

Yes, that's the OTA (Over The Air) update. If you reset your phone to factory then I don't think it'll lose the OTA, just all its settings, but it'll still stay at OTA.
[G2 and Desire Z Android Development] equi_design:
Thanks for the help @Kalipedia and @Trigeek

I just wanted to thank kalipedia and trigeek for the help in rooting my G2. I did my G1 back when it first came out, but for some reason this one was a bit more difficult. I really appreciate Kalipedia's help with the terminal prompts for Mac (since I'm a Mac user too), and for Trigeek's great original tutorial.

My G2 is now rooted, running Wireless tether, and I'm continuing to geek out by researching ROMs. :)
[G2 and Desire Z Android Development] f4phantomii:
I was getting the same error. Took me a few minutes to work through it.

Try this:

.\adb push su /sdcard/su

This worked for me.
[G2 and Desire Z Android Development] Crey23:
F4, thanks for the reply...it's a no go! Tried it and got the same error.... permission denied.

I can't get to push while using the terminal emulator on the phone either....loosing confidence on rootability of my device, or the lack of ability that I have to do so....either way it seems destined to be temp-rooted for a while longer.
[G2 and Desire Z Android Development] kalipedia:
My pleasure! I'm glad to be able to contribute since I'm appreciative of all the good work done here by everyone. Xda-devs rock!
[G2 and Desire Z Android Development] trock62:
Manny thanks to all. I just perm rooted my G2. I was worried after reading all the posts for the last month. But I used this method and all went well the first time. I had a problem with Clockwork recovery. But all I did was fastboot install and it worked. Now to make a backup and stat flashing ROMS.

Yay:D:D
[G2 and Desire Z Android Development] Crey23:
Frustrated with root process...sigh!

Wekend past with absolutely no progress....well maybe I learned a few things about adb, but without succesful root...so i guess I didn't learn much LOL!
[G2 and Desire Z Android Development] istarin:
Wow, I seem to be the first to describe this problem.

My phone goes to force reboot after running /data/local/tmp/root. I got to see the welcoming screen of the root script for two times one after another and a message that it forked ##### children, T-Mobile G2 with Google screen goes next.

Phone was connected to ADB all right.

I repeated the procedure for a couple of times. Can someone please suggest what can be done further?
[G2 and Desire Z Android Development] steviewevie:
Sorry, but I don't quite follow this. Which script is causing the problem ? It's the "rage" script that gives you several lines of messages, and says it has forked so many child processes. The "root" script is the one that you run to lock in the rooting, which you run several steps later.
[G2 and Desire Z Android Development] istarin:
I checked cmd's history(maybe I did adb push rage /data/local/tmp/root, but it's correct).

Downloaded root from a mirror and copied to /data/local/tmp/ again. Same result.

I definitely run /data/local/tmp/root and I don't know why but it seems to launch rage. I will maybe try manually enter commands from it and see what triggers the problem.

I ran

$/data/local/tmp/busybox killall rage

it launched rage after that my phone reboots. I ran it after getting temporary root, doing insmod and dd.
[G2 and Desire Z Android Development] steviewevie:
There's something very odd going on there. Are you sure "busybox" isn't the rage script instead of really being busybox ?
[G2 and Desire Z Android Development] istarin:
It was.

adb.exe push busybox /data/local/tmp/busybox

877 KB/s (5392 bytes in 0.006s)

rage size is 5392. They are in the same G2TempRoot directory, untouched after unzipping. WTF.

Sorry about that.
[G2 and Desire Z Android Development] trench619:
1) Before I start imputing any codes in ADB, do I need to type the commands first that are described in the unlocker site on setting up ADB. The commands I’m speaking of are:

cd\

cd AndroidSDK\tools\

adb devices

Okay, so ill go an type the above code in before I do any inputing. How do I know if im pointed to the correct place? Will i get the serial number that they speak about in the ADB setup on the unlockers site? I see you said "yes" to my questions... which I understand. But then you lost me with all the adb "path" and everything... Sorry, im kind of new to this.
[G2 and Desire Z Android Development] rangercaptain:
Put all the files needed into your tools directory. Then follow the steps to get your command prompt to the tools directory. Then stay there and do each step until the reboot after the last command (sync). That way you don't have to make a PATH change.
[G2 and Desire Z Android Development] QaeadarDAzeal:
Just wanted to stop by and say thanks a ton for the guide. Easily perma-rooted my G2 with no issues whatsoever. Honestly, the most difficult part of the whole thing was just getting ADB to recognize my phone, and after that, it was cake.

Thanks again. Gonna go try out some Cyanogen. =)
[G2 and Desire Z Android Development] FallingEdge:
Just dropping in to say thank you for the easy to follow guide. Took a little longer than expected due to my dumbness but in the end, it is working out great. Flashed it with CM and love it.

Thanks!
[G2 and Desire Z Android Development] daweeze02:
Wait I am confused I see in your info it states this "Visionary has caused filesystem corruption" but in the instructions you use visionary to perm root, am I missing something here?
[G2 and Desire Z Android Development] steviewevie:
Some people have had Visionary work absolutely fine for them, others have had problems. I personally think the rage method is a lot better because you're in control of what it's doing, and it's very reliable and works every time. Though now we have the new "gfree" method to do all the S-OFF stuff.
[G2 and Desire Z Android Development] daweeze02:
Thanks for the info, I got one coming from Tmobile for free adding a line....guess its time to sell the modded HD2 for the new toy
[G2 and Desire Z Android Development] stevedawg85:
How can I tell if my phone has the OTA applied. I bought the phone off of C-list and not sure.
[G2 and Desire Z Android Development] Nelliel:
Alright, time for some noobish questions. Pardon me, and my non-advanced self, but I'm trying to figure as much of this out before I get the phone so I'm like a pro when I get it in my hand.

How exactly do I get the ADB out and running for me to use it? Is that something that comes on the phone? Or is it something I have to download.

How do I find out if the phone has the OTA update yet or not? Is that said on the phone? Or should i just update the phone with it to be sure and precise? :S

I'm new to Android (been craving an android phone in the longest) and I cant wait for this one. Just don't want to screw it up..
[G2 and Desire Z Android Development] steviewevie:
You can download it from http://developer.android.com/sdk/index.html . It's something that you install and run on your PC, and it communicates with Android on the phone.
[G2 and Desire Z Android Development] neophyte8:
One way could be:

go to settings> wireless and network settings and check if you have "Tethering & Portable hotspot" as an option, if you do your phone received the OTA update. This wasn't avaliable prior to the update.
[G2 and Desire Z Android Development] Nelliel:
Thanks!!! I understand now =P haha
[G2 and Desire Z Android Development] stevedawg85:
Thanks for the tip, turns out I got the update.... time to read up on what's next
[G2 and Desire Z Android Development] marvinmartinez888:
Hello everyone,

im getting "system/xbin, file exists" after typing in this "# /data/local/tmp/root"

any suggestions guys?
[G2 and Desire Z Android Development] steviewevie:
Don't worry, that's normal. It still should have worked fine.
[G2 and Desire Z Android Development] Jamesusd_ca:
Works Great - Thanks

After hell trying to get ADB drivers installed and then to get the Path updated in windows 7 which never worked. I eventually got it to push etc by dropping all files in the ADB.exe folder and running in cmd prompt. Thanks for the awesomeness since Visionary did not work.
[G2 and Desire Z Android Development] Abn0rmal:
Cleaning up afterward

I had no problems using these instructions.

Am I correct in assuming that the files in /data/local are no longer necessary and can be deleted?
[G2 and Desire Z Android Development] artheru:
Brilliant! simple and safe
[G2 and Desire Z Android Development] Jaded1:
So I have read everything possible on doing the temp root. I am obviously a noob. I have also been checking for a one click root and cant find this either. Is anyone in the MN twin cities area able to help me. Obviously for a price. Or at least point me in the right direction of a 1 click perm root, or understanding

Thx
[G2 and Desire Z Android Development] imarq:
G2 TempRoot not recognized.... in cmd windows 7

'G2 Temproot' is not recognized as an internal or external command, operable program or batch file. WTF?! I just unzipped the files to its own folder, now the cmd prompt is saying its not there??? Any help would be appreciated. Thank you.
[G2 and Desire Z Android Development] steviewevie:
What did you try to do exactly that caused that message ? What did you type at the command prompt. Sounds like you were trying to execute G2temproot rather than just cd to it.
[G2 and Desire Z Android Development] imarq:
G2 TempRoot not recognized.... in cmd windows 7

Thanks for the response!!! I was trying to root with rage instead of visionary. The instructions said to direct it to the temproot files, so the cmd screen read: "C:\Users\Ebz>", then I typed G2TempRoot... Did I not cd to it?
[G2 and Desire Z Android Development] steviewevie:
"cd" means "change directory". You need to change directory (folder) to where you have put those files. So if G2TempRoot is under c:\users\ebz, then when you're in \users\ebz (as the command prompt is telling you), then you need to do "cd G2TempRoot", which will put you in that folder/directory.
[G2 and Desire Z Android Development] imarq:
G2 TempRoot not recognized.... in cmd windows 7

thanks i did it!!!:d
[G2 and Desire Z Android Development] Roelosaurus:
Gonna try on my Desire HD now!
[G2 and Desire Z Android Development] hannahlin:
I'm having a similar problem. I'm very new to this, but I'm usually pretty good at following instructions.

However, when I follow the instructions here, I get as far as:

# /data/local/tmp/root

and then I get the following:

killall: rage: no process killed

mkdir failed for /system/xbin, File exists

cp: can't stat '/system/xbin/busybox': Not a directory

Unable to chmod /system/xbin/busybox: Not a directory

/data/local/tmp/root: /system/xbin/busybox: not found

cp: not found

cp: not found

Unable to chmod /system/bin/su: No such file or directory

The original directions tell me to push su to the sdcard and busybox to /data/local/tmp. Should I move them to where it's looking for them?

Any advice would be appreciated.
[G2 and Desire Z Android Development] jamesfrom818:
This looks so much more difficult than rooting a N1. Well, here...I...go...
[G2 and Desire Z Android Development] steviewevie:
No, they should be fine where the instructions tell you to put them. But something's obviously going wrong.

The error messages imply that the rage program hasn't been run. What happened in the previous steps when you got temp root ? Did you run rage, did it produce its messages and say "forked xxx children" (where xxx is a number), and you ended up getting a root shell (temp root) ?
[G2 and Desire Z Android Development] SpicyCurry:
Hello all. I'm fairly new to Android, and I'm stuck on this one issue.

I just permanently rooted my phone following the instructions found on the G2 Wiki (http://xdaforums.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2). The procedure described here is very similar to the Rage method in this thread. However, the wiki uses gfree instead of wpthis-OTA.ko. After doing the sync, I do believe I am perma-rooted. I rebooted my phone and I'm able to give SU permissions to setCPU and ROM Manager.

Now here's where the problem comes in. I wanted to flash a custom ROM, so I loaded up ROM Manager and flashed ClockworkMod Recovery (version 2.5.1.3). After this, I pushed the button for "Backup Current ROM" to do a nandroid backup. I specify a name for the backup, then the phone immediately reboots. After the green HTC logo, I get an error screen. I tried searching on google images for the error screen to show you guys, but I get no results. The image that shows up is a small black phone, and next to it is a red exclamation enclosed by a red triangle. The phone didn't respond to the power button, so I removed the battery and put it back in. Luckily, the phone boots up as normal.

Did I perform the root incorrectly or using a bad method? Am I S-Off? I couldn't find a thread in the XDA forums that uses the gfree method found in the wiki. I'm worried that I used a faulty method to root. To be clear, I've followed the G2 Wiki permaroot instructions up to the part where it suggests to do a nandroid backup. I have not followed the INSTALLING ENGINEERING HBOOT instructions.

Any insight into this issue would be greatly appreciated. Thanks!
[G2 and Desire Z Android Development] steviewevie:
Sounds like you've done it right. You can check if you are S-OFF by powering off the phone, then holding the Volume Down button and then holding Power until it boots. Then you should see a white screen with various writing. At the top it will either say S-ON or S-OFF along with some stuff about "HBOOT". Then take out the battery and replace to power up normally.

I think you've just hit the usual problem where you need to flash Clockwork for a second time before it "sticks". This is very common. You won't be able to do the Nandroid backup until Clockwork is flashed correctly.
[G2 and Desire Z Android Development] slackintim:
I/O Error

This is solved.

Sucks that I burned post #300 for a self-answered post! But...the problem is that /system/xbin somehow became corrupted. I rewrote the scripts to use /system/x instead, and everything functions properly now and I have perm root. I was also stymied by the "I/O Error" being thrown --- if commands do not exist, that's what you get versus what you'd expect ("Command not found") even as a Unix guy I was thrown for a loop there. Were it not for me mashing the keyboard in frustration and getting an I/O error, I'd have never figured that out.

Hey all.

First, thanks very much for everyone's contribs. This is a great resource.

Now here's /my/ particular problem. :)

I am S-OFF. That part worked. I've had temproot for a while via Visionary and attempted the permroot method using Visionary as well. Something went wrong mid-root I believe, and I'm in a weird limbo state.

- I am using the eng hboot.

- Out of desperation I restored via upgrade.zip, which was fine.

- Phone seems to work just fine - no errors or app crashes.

- /system is still mounted ro

...but....

If I try to get root via visionary (you know, to finish the perm root bits), it stays in a loop and fails. Running 'su' at CLI local or via tether throws an I/O error. I can get root via the rage exploit, but still have I/O errors being thrown after I get root and try to do anything. Naturally, nothing that requires root will run even after I've obtained root due to the I/O errors that prevent me from doing much of anything under the hood.

I threw busybox on sdcard, managed to get it suid such that I could remount /system rw, but I still get I/O errors when I run common commands like su, and thus cannot perform the last tasks required to actually permroot the device. If I run busybox commands (e.g., 'busybox uptime') it works, but if I run the command natively (e.g., 'uptime') I'll get an I/O error.

Any ideas how to overcome this? I figured after restoring bootrom (via PC101.ZIP (or whatever the filename was, I don't remember..) and base OS via the OTA install.zip, it would give me a fresh start and I could try again -- but it didn't.

Thanks for any pointers. I've tried as much as I can but I'm stumped.
[G2 and Desire Z Android Development] Eigenwaarde:
Hi all. I am new to all this (Android rooting, S-OFF etc) but I want to root my Desire Z and afterwards install CM 6.1.

I have decided that I want to use the Rage method because it is a bit cleaner (from what I have read). Following the guide won't be I problem I guess since I have some Linux (terminal) knowlegde. But what to do after I perm rooted my device with the Rage method. What guide for S-OFF and flashing should I use?

Ow, btw, I have installed VISIONary r14 just to try the temp-root option. Afterwards I rebooted the device a couple of times and I just tried su in the terminal emulator app, it said "permission denied", so indeed it was a temp root. The Superuser and VISIONary app are now deleted of my phone. I can safely use the Rage guide?

And a last question: should I backup my device before perm rooting / S-OFF. With this I mean a full ROM backup? (all my personal data is safe :))

Thanks in advance for the help and keep up the good work folks! _o_
[G2 and Desire Z Android Development] steviewevie:
Thanks for sharing the solution. Some folks have experienced filesystem corruption from Visionary, I suspect that was your problem.
[G2 and Desire Z Android Development] steviewevie:
When you use rage to perm root, don't do the "dd" bit towards the end to write a new hboot. That isn't needed any more, now that we've got gfree to give a "true" S-OFF. The guide in this thread really needs updating.

Yes you should be safe to try rage if you have removed Visionary.

S-OFF via gfree only touches the radio config partition really (and even if that messed up, you can still boot your phone ok), so all the rest of your ROM/data is safe. And rage doesn't really do anything to the file system, it's very safe. You are limited in your backup options before you've got root anyway, e.g. no Titanium Backup and no Nandroid backup (Clockwork recovery).
[G2 and Desire Z Android Development] berju:
Hello, i am new on android phone, just have my desire Z ( also know as vision or G2 ). So i would like to permanent root, i red many of thing about but i have a question about the two file OTA update or no OTA update.

I don't know the right file i have to use, i just have my G2, it's froyo 2.2.

could you help me ?

Thanks by advance and great job ...
[G2 and Desire Z Android Development] SpicyCurry:
Thanks for the help. Flashing clockworkmod twice fixed the issue. I'm now ready to try some custom ROMs.
[G2 and Desire Z Android Development] Eigenwaarde:
Thanks for the comment, very helpful. But can you precisely tell me which commands I should skip if I want to S-OFF using the Gfree method. The "dd" command in this guide seems rather important!

I searched the G2 and Desire Z forums, but I can't find I guide for just S-OFF using Gfree. Should I use "Section b)" from this guide after perm rooting with Rage? [GUIDE]UBERROOT easy full Root, S-OFF, SuperCID AND SIM UNLOCK for DZ/G2/DHD inc Voda

Are there differences between the T-mobile G2 and the HTC Desire Z? Are they identical and can guides for these devices be cross-used or are there (minor) differences? If they are identical I found it very annoying that there are 2 different forums :confused:

Thanks for the help mate! :D
[G2 and Desire Z Android Development] stevedawg85:
So this guide is out of date huh? Im think I'm ready to take the plunge but haven't rooted since the G1. So I'll need step by step directions like this thread, but I guess I'll wait for an updated version. you know if any gfree how to's are out therE?
[G2 and Desire Z Android Development] hightechlive:
what and where can i get adb?
[G2 and Desire Z Android Development] steviewevie:
See this guide - http://xdaforums.com/showthread.php?t=865685
[G2 and Desire Z Android Development] steviewevie:
The gfree thread is at http://xdaforums.com/showthread.php?t=855764
[G2 and Desire Z Android Development] steviewevie:
Do the whole "rage" guide for temp root and perm root, *except* just skip the one step that tells you to do a "dd" command. You don't need that any more with gfree, and it was always a bit of a risky step. You can do everything else in that guide though, and should still end up with perm root.

The "gfree" method of S-OFF (and SuperCID/SIM Unlock) is at http://xdaforums.com/showthread.php?t=855764 here in the G2 dev forum. It's the same process as the DZ though, anyway. But the guide here on the G2 side assumes you have perm root already, so simply follow that whole thing.

The differences are very very minor. The only real difference you'd notice is different hardware keyboard layouts. They run different ROMs as stock, but they can both run the same custom ROMs. For critical things like rooting/S-OFF, right now you should make sure you follow the guide in your specific forum, G2 or DZ. Though in fact the same "gfree" program works identically on both phones.

The two sets of forums are set to be merged very very soon, there's a thread in the General section on that.
[G2 and Desire Z Android Development] berju:
Hello, i follow this to root. It's fine thanks.

http://xdaforums.com/wiki/index.php?title=HTC_Vision#Intro
[G2 and Desire Z Android Development] hightechlive:
From a cmd window or terminal, navigate to that folder and execute these commands:

how do i do this?
[G2 and Desire Z Android Development] steviewevie:
Assumng you are using Windows, you need to start a Command Prompt session. There is normally an option in the menus for this. Or on XP, you can do Start->Run and type "cmd". On Windows 7 if you search for "cmd" it will do it too.

Then when you have the command prompt window open, you need to go to the folder where you unzipped that stuff you downloaded and extracted. Use the "cd" command to change to that folder, e.g. if the files are in \users\bob\desktop\G2TempRoot, then type :

cd \users\bob\desktop\G2TempRoot