yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] Xionas:
Any tips for a beginner? Like an "ADB for dummies" guide or anything? Right now I think I'm installing the Android SDK platform but I'm not 100% sure I get everything. I'm guessing that after installing ADB I just input lines in command and it'll use ADB as the program and everything will work. If that's not how it goes I may wait to use the one-click and just spend my time right now learning everything else about android development lol. I've got nothing but time to learn.
[G2 and Desire Z Android Development] tysklai:
I successfully did that. I am totally new to android, after few google search I did it. Thanks.
[G2 and Desire Z Android Development] tysklai:
Use "cd xxxxxxx" to navigate the files. xxxxxx = the location of the files you extracted.
[G2 and Desire Z Android Development] RaffieKol:
Thanks Bro Worked Perfect......

Just Uninstall Visionary, Terminal Emulator And Superuser.apk before doing this.

And It Will Work Perfect

Also After U uninstall your Previous Terminal Emulator download Android Terminal Emulator from the market before doing this

Thanks Again
[G2 and Desire Z Android Development] SynOfDreams:
worked perfectly, thank you!
[G2 and Desire Z Android Development] chibikit0:
One very important question (since this is my first Android phone and my first root attempt): Does rooting actually change any files on the ROM itself?

I ask this because people have had problems with OTA updates simply because they used the Google Goggles removal method to remove files from the still-locked NAND, and I would like to know if I will need to somehow back up the ROM first before doing this.

One more question: can we expect any future OTAs to turn the NAND write-protect on again, hence requiring us to re-apply permaroot?[

Thanks.

EDIT: Really hoping this post doesn't get lost among all the kudos.

One last question: How do you reverse the root process and switch the write-protect back on? Again, I'm thinking forward here and making sure we can undo any changes that might stop us from being able to accept OTAs.
[G2 and Desire Z Android Development] Superfrag:
Works awesome! Very easy!

Although my problem was different, I had VISIONary installed and S-OFF'ed the device, but I uninstalled VISIONary and realized I made a huge mistake as I didn't have root! And since VISIONary got suspended from Market (according to the thread at Modaco), I decided to do the RATC way.

Found this thread, went through the first part for root, ran the command they said not to(since I only needed root, not S-OFF) and it works fine!

Got Perm Root. :)
[G2 and Desire Z Android Development] candy for breakfast:
i am rooted, thanks much :)
[G2 and Desire Z Android Development] dabido:
Many thanx to all the devs that put lots of hard work into rooting our precious G2. Worked like a charm. (although i was nervous throughout the whole process)
[G2 and Desire Z Android Development] PAVNEET101:
yes, i tried that but when i put the command it says cant "-bash: ./adb: No such file or directory" so when i navigate to adb/tools then it says "cannot stat 'su': No such file or directory" so thats where i am stuck please help and thank u very much for response
[G2 and Desire Z Android Development] fxdarkloki:
i have just a few questions about this whole process. if i use this method for rooting my G2, will i still be able to receive ota updates provided i do nothing other than what is described in this tutorial? i'm not really interested in a custom rom atm, but i would really like to be able to uninstall permanently some of the system apps...who needs amazon mp3 lol. in addition to that, is there any list of programs that should never be removed i could be pointed to?

and my second big question is, from this, is it possible to return to a stock 100% default configuration where i do not have root privileges? i'd like to be able to go back if i need to. a tutorial for doing that would be very helpful as well.

finally i read a while back that if you're rooted some market apps will become unavailable to you. so 1, is that true, and 2, if so, what apps/how can i get them anyway? :P

thanks!
[G2 and Desire Z Android Development] KiNG OMaR:
I was perm-rooted last night, I rebooted the phone multiple times to be sure and checked to make sure it was s-off. This morning I got the OTA, I installed it and I've managed to lose my root access, however s-off is still there!

Can anyone help? Greatly appreciated.
[G2 and Desire Z Android Development] Superfrag:
Do only the first part(Temp Root part), and run the /data/local/tmp/root command. It should give you perm root.
[G2 and Desire Z Android Development] KiNG OMaR:
Root doesn't seem so permanent if it went away like that! But thank you so much it worked :)
[G2 and Desire Z Android Development] Ymees:
This worked brilliantly except I could't push files to my sdcard. Permission denied. So I dragged and dropped. Everything else was flawless. Thank you for the howto!
[G2 and Desire Z Android Development] .A.J.:
ADB newb here. Got it installed and recognizing my device. Problems are as follows:

cmd window I type cd C:\vision (enter) I get:

C:\vision> I type adb push su /sdcard/su (enter) I get: 'adb' is not recognized as an internal or external command, operable program or batch file.

Any help is appreciated.

I understand that the Visionary method is easier but I'd rather do it the safer way.
[G2 and Desire Z Android Development] jeremyritzmann:
make sure you have cd into the folder that contains your android sdk tools folder

I.e. i would enter c:\androidsdk\tools as this is where my sdk setup is.

after hitting enter my screen now reads : C:\androidsdk\tools>

basically you're not in a directory that contains your adb.

also you did enter your adb into your :PATH under environmental variables, right?
[G2 and Desire Z Android Development] michagol2:
Just finish the steps, I bypassed this and it worked.

Thanks everyone involved for this permanent root solution!!
[G2 and Desire Z Android Development] perquisitor_omnia:
Well technically this is a permanent way to write to the eMMC, you can lose root access if the su executable gets removed by say a T-mobe update! Its just a temp-root and reinstall of su that it takes to fix it.

I can also confirm that this works just fine with ConnectBot if you have it instead of the Terminal Emulator.

*Edited for my poor typing ability
[G2 and Desire Z Android Development] .A.J.:
First, thanks for replying.

I also tried entering the following (similar to what you have above):

cd C:\android-sdk-windows\tools (enter)

(then)adb devices (enter) which lists my phone as attatched

(then)adb shell (enter) which returns

$

Now here if I enter the first command of the tutorial (adb push su /sdcard/su)

it returns

adb: permission denied

Under environment variables there are two sections. I added the path C:\android-sdk-windows\tools to system variables and user variables
[G2 and Desire Z Android Development] jakobdroid:
I've tried bypassing it and finishing the steps.

After finishing the process, typing su into terminal results in

su: unknown user root
[G2 and Desire Z Android Development] rijin:
Plz help nb!!

After unzip the root file do I need to put it anywhere on pc?
[G2 and Desire Z Android Development] xblue95:
A.J. after "adb devices" recognizes your phone, DON'T "adb shell", just "adb push su /sdcard/su" or just copy and paste the commands from browser window into CMD window. That's what I did and it worked perfectly!!

Thanks to everyone involved!
[G2 and Desire Z Android Development] malemutekid:
Worked perfectly for me! thanks to everyone who contributed to this.
[G2 and Desire Z Android Development] xblue95:
rijin, to make things easier, put the required files in your "AndroidSDK/tools" folder before entering "push" commands. you should already be in the "tools" folder
[G2 and Desire Z Android Development] .A.J.:
Thanks to you and all who helped me for the tips.

I got it to work and am now rooted.

I moved su and Superuser.apk to the sd card by mounting usb.

I didn't use the "adb shell" command and for whatever reason (surely my lack of experience with this) I had to enter all of my commands as (using rage as an example):

adb push C:\vision\rage /data/local/tmp/rage

(I eventually moved all of the files for this into a file called vision which I put on my drive)

Maybe this is common knowledge or what have you but I was trying to copy/paste the commands and had no luck with that for whatever reason.

So if anyone else has the issue's I've had try what I did.

Once again thanks to the OP, everyone who worked on root and those who helped me in this thread.
[G2 and Desire Z Android Development] rijin:
thanks man
[G2 and Desire Z Android Development] xblue95:
A.J. that's the long way of doing it, but keep in mind next time, to make things easier, put the required files in your "AndroidSDK/tools" folder before entering "push" commands. you should already be in the "tools" folder to run adb. rijin was just asking the same thing a post or two ahead of you. Glad to hear you finally nailed it!
[G2 and Desire Z Android Development] carlosmontanez:
Awesome Job

Great job you guys! These directions are really easy. I had some problems earlier but it was my own fault for not entering the correct directory. AWESOME!!
[G2 and Desire Z Android Development] justj03:
I just got my G2 and want to root, should I apply the OTA update or wait?
[G2 and Desire Z Android Development] mgshute:
Read the WHOLE OP. Look under perm root. You choose which one to push.
[G2 and Desire Z Android Development] osupra:
thanks alot great guide got a lil scared on this line once I read CRUCIAL

dd if=/data/local/hboot-eng.img of=/dev/block/mmcblk0p18

haha but it works great after booting thanks alot man
[G2 and Desire Z Android Development] SFVDan:
Outstanding job! Thanks much for all your hard work. SO glad to have a real backup option.
[G2 and Desire Z Android Development] candy for breakfast:
These instructions worked great, and I was even totally drunk when following them. Thanks much :)
[G2 and Desire Z Android Development] .A.J.:
Yeah, I saw that after I posted. Next time will be much easier. Thanks, again.
[G2 and Desire Z Android Development] fxdarkloki:
so now i'm definitely rooted, i have su and the works via this method, but i seem to still be unable to actually uninstall system apps. they restore themselves after restart just like they did when i was temp rooted. i was under the impression that i could finally get rid of amazon mp3 with root access, but i cant for some reason. trying with titanium backup.

is this normal? i'd really like to get rid of a few of these apps, but they seem to come right back on me :(
[G2 and Desire Z Android Development] teamrinse:
Wow took me awhile...

but the instructions are spot on to the tee!!!!!!! you guys are great...everyone whos' lost just do some research on setting up adb(from adb newb). Im rather greatfull that I didn't wait for visionary's 1 click root; this was way more rewarding.:D
[G2 and Desire Z Android Development] nvietmonkey@hotmail.com:
ok i'm really a noob at this.. but I can't even get pass step 1...

ok so i downloaded the files...

step 1 - unzip it into a folder.. so i unziped a folder to my desktop...

(i think i have to put it somewhere but I don't know where..)

so when I run the cmd $ adb push su /sdcard/su it came back with "cannot stat 'su': No such file or directory... soo Im totally lost... sorry noob here
[G2 and Desire Z Android Development] ddgarcia05:
do you have adb and skd installed onto your computer?
[G2 and Desire Z Android Development] holdfastxhope:
pushing su to sdcard but getting "failed to copy 'su' to '/sdcard/su' : permission denied
[G2 and Desire Z Android Development] nvietmonkey@hotmail.com:
yes I do, I created a folder for adb in C: directory under android from other guides if that's what you're asking. skd, yes as well
[G2 and Desire Z Android Development] holdfastxhope:
what i had problems with is that all the files you dl - everything in the vision-perm and g2temp folders, just put them directly in your tools folder - not the folders themselves, just the files directly in there.

i got everything else to work, except su and superuser wont push - still telling me i dont have permission. i tried just putting them on my sdcard but when i continued on the step before i input sync, terminal tells me it cant "stat" because there is no such file or directory.
[G2 and Desire Z Android Development] recasper:
Kinda getting the same thing myself. And I am sure this is so simple that whoever can help is looking at this reply and saying "Buddy, you're an idiot" haha, but never the less I thought it worth while to tap the vast knowledge of you cats here...

I've been through the rooting process before when the G1 root procedure was in its infancy and just as complex and I got through that much easier. Some reason this time around I cannot even get past the push commands. haha... Believe I am a bit rusty

... Keep in mind I am doing this on a mac so the initial parts are gonna be a bit different when copied below (EG. "./adb" rather than "adb"). But when I try to push files to my G2 I get the following as well.

I am positive that I am in the proper directory. I have even tried pushing normal picture files or music files to simple directories and still get the same error.

Any thoughts?

EDITED: Followed the tip from the above post and put all the files in the "Tools" folder but starting to get the permission denied error as well.
[G2 and Desire Z Android Development] recasper:
Looks like its just happening with the "push to sdcard" files... All others worked fine. Well the final push action for "shell chmod" gave no response...
[G2 and Desire Z Android Development] holdfastxhope:
EDIT - found the reason for not seeing files in last steps. posted below.
[G2 and Desire Z Android Development] holdfastxhope:
exactly. everything else worked FINE for me except pushing those two files. except im at the second to the last step and its telling me su and superuser.apk dont exist (even though i manually copied them to my sd card) and im assuming therefore it wont complete the process when i enter "sync".
[G2 and Desire Z Android Development] sonser:
Works just fine for me. Great guide, easy to follow. THANKS! 5stars
[G2 and Desire Z Android Development] holdfastxhope:
GOT IT finally!

okay, if you had the permission error pushing su and superuser.apk, just put them on your sd card manually directly in the sdcard directory.

got through all the rest of the steps.

this is what fixed my last step before SYNC error -

********TURN OFF USB FILE SHARING**********

then run the "/data/local/tmp/root" after "dd if=/data/local/hboot-eng.img of=/dev/block/mmcblk0p18" and itll find su and superuser.apk

with file sharing on, it wasnt seeing any sdcard files.

*facepalm*
[G2 and Desire Z Android Development] urmybaby:
a very noob question, what is root and no root difference? is root a must do? what is the root benefit? thank u
[G2 and Desire Z Android Development] ZombieUsr:
This may sound contrite, but in the OP; line 2 of ON YOUR PHONE

2. /data/local/tmp/rage

What is rage? (I know the dictionary term for rage, just not this file path). Is it a file I am not seeing on the OP? Is it a cmd within the terminal emulator?

Any clarification would be most welcomed. Thank you
[G2 and Desire Z Android Development] recasper:
Great insight there holdfastxhope. Worked like a charm..

S-OFF AWESOME!!!!!!!!!!!!!

Thank you all so much... This is a much more comfortable procedure than VISIONary procedure. That was not to infer either a better way. This one just worked better for me.

AMAZING job everyone. I will be send some paypal your ways soon.

Thank you so much. XDA, taxes and death... All three are equally efficient at completing their predefined goals.

Footnote: To the OP, first I want to thank you for the Wonderful tutorial. Not that I really have a place to make even the slightest recommendation... But after seeing this particular aspect pop up for some. It might be beneficial to the Tutorial to add a lil sidenote regarding the need to cut off USB data syncing and to make sure all the files are in the "tools" folder for easier Pushing. Not trying to critique at all, I can't express my gratitude enough, but it could alleviate possible future similar questions when the thread adds more pages and these last couple pages gets a lil buried.

Thanks again
[G2 and Desire Z Android Development] babauv:
i'm having a little trouble with the change mode command, it returns Operation not permitted. Any ideas anybody?

Thank you
[G2 and Desire Z Android Development] nvietmonkey@hotmail.com:
i manually put them into sdcard directory and still didn't work... Am I missing something here?? is there any video that shows how to do these processes? I'm totally lost...
[G2 and Desire Z Android Development] Acid_Wir3:
ROOTED MY PHONE HOORRAAAYYY

installed OTA firsts because the wpthis-pre-ota.ko isnt working :D THANKS A BUNCH MWAHHH
[G2 and Desire Z Android Development] Acid_Wir3:
what do you mean by that? the Temp-Root that the OP posted? if so, Yes. Because it installs rage onto your phone, instead of using visionary.
[G2 and Desire Z Android Development] nvietmonkey@hotmail.com:
my phone keep saying can't open '/data/local/wpthis-OTA.ko...

¿¿¿por que???
[G2 and Desire Z Android Development] chaose:
Hi,

just got my g2 yesterday. I'm pretty new to the android stuff, but I had it perm-rooted this morning without any problems.

Correct me if I'm wrong, but after the perm-root we can delete all the files in /data/local/ right?

I'm referring to the wpthis-OTA.ko, hboot-eng.img, and the stuff in the tmp folder:root,busybox,rage.

I'm thinking that since these are just scripts, it should be safe to delete them - unless it's called each time?
[G2 and Desire Z Android Development] Modernly:
Rooted like a charm, thanks for your post. On to the overclocking and such!
[G2 and Desire Z Android Development] rraxda:
Op and others that worked on this, thanks. Easy to follow instructions worked great and I am rooted.

I do have one question though.... I went to download the latest version of SuperUser by ChainsDD through the market. I got an installation unsuccessful and have not been able to install it. Anyone else having an issue with this?

Other than that, everything else seems to be working great.
[G2 and Desire Z Android Development] lindellmm:
Rooted with RAGE! I am speechless with JOY!!!!!!!
[G2 and Desire Z Android Development] under0ath888:
I rooted my phone using the rage method and titanium back up(says I don't have root access) or set cpu aren't working. Shootme, cache cleaner, and wireless tether are though. Is this happening to anyone else?
[G2 and Desire Z Android Development] gtny930:
hELP PLEASE

my phone keep saying can't open '/data/local/wpthis-OTA.ko...
[G2 and Desire Z Android Development] Jartrip:
ADB: permission denied

I get this when I try to push a file.

C:\android-sdk-windows\tools>adb shell

$ adb push su /sdcard/su

adb push su /sdcard/su

adb: permission denied

Anyone know what I am doing wrong?

Solved.....don't "adb shell"
[G2 and Desire Z Android Development] ztmike:
2 questions:

1.) Can someone please post a video how-to on Youtube?

2.) I'm currently temp rooted with VISIONary, what do I need to do to get that stuff off to do this new root with RAGE?

-Thanks for any help.........
[G2 and Desire Z Android Development] boogsta161:
Thanks to all

I just wanted to pop in and thank the Devs. I greatly appreciate your determination and dedication. Ya'll are a badazz bunch. I tried my best to keep up, but by the time I got to understanding the layout of the source I looked back at the screen and all was done. :D

Thanks guys!! XDA or die!!
[G2 and Desire Z Android Development] CarpeNoctem:
Thanks for this guide, it worked flawlessly!
[G2 and Desire Z Android Development] drumking:
Need a little help with ADB. When I enter adb remount it is not showing my device. i need help to find the right ADB usb driver for windows 7.
[G2 and Desire Z Android Development] ShotgunPR:
Just performed your procedure and it worked flawlessly!

The VISIONary r12 download required for the other method was removed due to installation issues, and I had no choice for rooting my G2. Browsing the forums I stumbled upon your post and I THANK YOU for your alternate method!

THANK YOU x 1000! :)
[G2 and Desire Z Android Development] brzgw:
cant adb remount

i wish there was a video that showed this. i try adb remount it says "remount failed: operation not permitted."

when i try adb push su /sdcard/su it says failed to copy 'su' to '/sdcard/su' : Permission denied.

it sees my device when i write adb devices.

what am I suppose to do next? how to remount so that i can copy over the files

EDIT: I ROOTED!! :) never mind my post. thanks soooo much, i will donate after i get my paycheck. i love you guys :)
[G2 and Desire Z Android Development] bmaing2:
Can some one please please please make a youtube video or somthing showing step by step on how to do this. I would feel so much more confertable watching it being done first. I know there's got to be a lot of people who feel the same way
[G2 and Desire Z Android Development] drumking:
just did it and works fantastic thank you. :D
[G2 and Desire Z Android Development] Snap Jackel Pop:
Awesome. First time rooting and it worked great with no problems. Thanks for the guide.
[G2 and Desire Z Android Development] solaire:
Just want to thank the op for a great guide that made it easy for a first timer using adb.

I ran into one issue that had me about to give up when I was trying to adb push su /sdcard/su and push superuser.apk /sdcard/superuser.apk it was not going thru and I kept getting a permission denied msg.

This was caused by having usb storage enabled along with usb debugging apparently you can only have usb debugging enabled.

This might be apparent to long time adb pro's but if your doing this for the first time and running into this error this it what was causing it for me.

Again thks to the op for a awesome guide.
[G2 and Desire Z Android Development] ayalah1986:
everything worked until secon to last step when i enter

# /data/local/tmp/root

it says,

killall: rage: no process killed

mkdir failed for '/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

#

anyone have an idea what i did wrong??? i followed the instrutions to the letter and it looked like every package was installed properly prolly a noob error somewhere lol plz help!!
[G2 and Desire Z Android Development] potentdro:
Success! Took me like 30 minutes (first time rooting manually lke this). I went slow and double checked everything. This whole process actually took longer because I could never get ADB to work. I followed a couple guides and it was a no go.

Searched around the net for like 2 days before I finally found a guide just earlier and bam, ADB up and running.

Proceeded to root and the rest is history.

SU permission actually popped up when the phone was done booting. Double checked in Terminal and success.

Thank you everyone
[G2 and Desire Z Android Development] ayalah1986:
i just reset to factory settings started from scratch n im still stuck...

everything worked until secon to last step when i enter

# /data/local/tmp/root

it says,

killall: rage: no process killed

mkdir failed for '/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

#

anyone have an idea what i did wrong??? i followed the instrutions to the letter and it looked like every package was installed properly prolly a noob error somewhere lol plz help!!
[G2 and Desire Z Android Development] t24moore:
Which sdk did you use? 2.2 or an older one? I keep getting a problem with adb telling me permission denied. So im not sure if my adb is set up right or what.....