[GUIDE] Instructions to Root G2 [Temp Root]

Search This thread

hendusoone

Senior Member
Dec 13, 2009
113
42
Boston, MA
NOTE: The below info is all pretty outdated now that the fantastic Paul O'Brien has created a one-click temp root app called VISIONary. I recommend using that - get it from his thread! In case you don't want to do that (what are you, some kind of masochist?), or want to see the old way of getting temp root, keep reading this thread.

Insert the usual disclaimers about "if this breaks your device, it's not my fault... do this at your own risk... voiding warranty... etc."

Note that for now, this is a TEMPORARY root. And things are now well over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent, and will help out wherever I can.

Update 10/6/2010:

Per suggestions later in the thread, I've compiled a zip file of everything needed to set up a temp root. I've also made some tweaks to the root script, included in the archive as "root" - notably, it will now create symlinks to busybox for commands not included with default android (example: cp).

Here are updated instructions to use with the attached zip file. USB Debugging needs to be enabled:

Stage 1: On your PC
1. adb push su /sdcard/su
2. adb push Superuser.apk /sdcard/Superuser.apk
3. adb push rage /data/local/tmp/rage
4. adb push busybox /data/local/tmp/busybox
5. adb push root /data/local/tmp/root
6. adb shell chmod 0755 /data/local/tmp/rage /data/local/tmp/busybox /data/local/tmp/root
7. Disconnect phone from pc

Here's an alternate Stage 1, thanks to Aphotix:
If you really want to optimize (or be lazy if you are like me), just use this batch file (for windows obviously) using the pc side of the instructions already provided.

Code:
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 cd /data/local/tmp; chmod 0755 rage busybox root;

just place it inside of the G2TempRoot folder and double click. Then its just two commands on the phones terminal and you have root.
BATCH FILE DOWNLOAD HERE

Stage 2: On your phone (Assumes you have already installed Android Terminal Emulator from the market)
1. Launch Terminal Emulator
2. /data/local/tmp/rage
3. Wait for the message: "Forked #### childs."
4. Menu > Reset Term - Terminal Emulator will exit.
5. Launch Terminal Emulator, it Force Closes. Launch a second time, and you'll have a root shell
6. /data/local/tmp/root

Stage One only needs to be done once. Stage 2 needs to be repeated every time you reboot your phone.

Follow the Thinktank thread for progress on a permanent root solution.

Special Thanks:
The dude that made rageagainstthecage - http://c-skills.blogspot.com
gariak, for the ideas in the root script
rpmccormick - improvements in the later PC steps
Aphotix - Windows batch file to make the first part easier
 

Attachments

  • G2TempRoot.zip
    1 MB · Views: 8,393
Last edited:
  • Like
Reactions: Testrunner

G1rome

Senior Member
Apr 19, 2009
180
1
So do we get any roms soon after rooting?

Sent from my T-Mobile G2 using XDA App
 

hendusoone

Senior Member
Dec 13, 2009
113
42
Boston, MA
Well, that's up to the rom developers. Will probably take time.

Note that currently, this is a TEMPORARY root. And things are starting to get a bit over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent. I'm working to figure out what I can, but I fear my own usefulness is fading :p

(added that info to OP, since it's probably important)
 
Last edited:

ceas909

Senior Member
Oct 8, 2009
310
2
This is interesting.. you need to try to get a rooted recovery made.. from there once you get this temp root working try to flash the recovery through terminal.. if it takes then you would be able to flash rooted roms... i wonder if clockwork is working on a recovery already??...
 

OgBrog

Member
Jul 10, 2010
35
0
Whew, I was starting to think the phone might be unrootable.

Sent from my T-Mobile G2 using XDA App
 

sino8r

Senior Member
Sep 7, 2006
3,549
735
Birmingham, Alabama
Whew, I was starting to think the phone might be unrootable.

Sent from my T-Mobile G2 using XDA App

What the heck are you talking about? This phone hasn't even been released officially and you are already tired of waiting on root? why don't you learn some stuff and crotribute to helping us get root?

Guys, I know the thought of developing on linux is scary but you can always start with simple stuff like boot animations and themes. Don't you notice how most developers have left xda because all people do here is ask and not give. quit crying, complaining, and posting stupid ****! learn to contribute!

sorry I was up all night last night and got no sleep working on trying to ROOT this damn phone and figuring out what the deal is with our missing storage space on the g2. I'm just cranky. and btw, this isn't directed just at this guy but a lot of people here. sorry to single you out. nothing personal.
 

M9x3mos

Senior Member
May 12, 2008
776
58
Around
weird I dont know what I messed up because the commands for the phone are alot of typing so I copied that text and made a script minus the '#' symbol for all lines and when I run it can;t kill process says can't find and won't remount but if I type it into the phone working fine
here is exactly what I put in on the script for terminal on device

/data/local/tmp/busybox killall rageagainstthecage-arm5.bin
mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
/data/local/tmp/busybox cp /sdcard/Superuser.apk /system/app/Superuser.apk
/data/local/tmp/busybox cp /sdcard/su /system/bin/su
/data/local/tmp/busybox cp /sdcard/busybox /system/bin/busybox
chmod 4755 /system/bin/su
chmod 4755 /system/bin/busybox
mount -o ro,remount -t ext3 /dev/block/mmcblk0p25 /system
 

InGeNeTiCs

Senior Member
May 31, 2007
834
73
What the heck are you talking about? This phone hasn't even been released officially and you are already tired of waiting on root? why don't you learn some stuff and crotribute to helping us get root?

Guys, I know the thought of developing on linux is scary but you can always start with simple stuff like boot animations and themes. Don't you notice how most developers have left xda because all people do here is ask and not give. quit crying, complaining, and posting stupid ****! learn to contribute!

sorry I was up all night last night and got no sleep working on trying to ROOT this damn phone and figuring out what the deal is with our missing storage space on the g2. I'm just cranky. and btw, this isn't directed just at this guy but a lot of people here. sorry to single you out. nothing personal.

I think you may have singled out the wrong person. As I understood it, his post was stating that he was worried we weren't going to be able to root the phone at all...intending the post to be a 'sigh of relief' if you will. There was no implication of being impatient.

And I know it's annoying when people demand stuff without contributing, but if were to open a restaurant and everything on the menu was free, guess what? You'd have a crapload of customers, and they'd all be asking for stuff for free. Once development picks up, there will be a lot less posts about people wanting root and such...just be patient. Coming from a guy who pre-ordered the g1, I think I know a little bit about waiting for good things to happen.
 

InGeNeTiCs

Senior Member
May 31, 2007
834
73
weird I dont know what I messed up because the commands for the phone are alot of typing so I copied that text and made a script minus the '#' symbol for all lines and when I run it can;t kill process says can't find and won't remount but if I type it into the phone working fine
here is exactly what I put in on the script for terminal on device

/data/local/tmp/busybox killall rageagainstthecage-arm5.bin
mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
/data/local/tmp/busybox cp /sdcard/Superuser.apk /system/app/Superuser.apk
/data/local/tmp/busybox cp /sdcard/su /system/bin/su
/data/local/tmp/busybox cp /sdcard/busybox /system/bin/busybox
chmod 4755 /system/bin/su
chmod 4755 /system/bin/busybox
mount -o ro,remount -t ext3 /dev/block/mmcblk0p25 /system

That IS strange...I don't see anything wrong with what you've posted here...but I can say that I've seen some strange happenings lately. I'm getting rid of a samsung epic for the g2, and if I used the cable that came with it, nothing through adb would work properly, I had to use a better quality one I got off amazon.
 

sino8r

Senior Member
Sep 7, 2006
3,549
735
Birmingham, Alabama
That IS strange...I don't see anything wrong with what you've posted here...but I can say that I've seen some strange happenings lately. I'm getting rid of a samsung epic for the g2, and if I used the cable that came with it, nothing through adb would work properly, I had to use a better quality one I got off amazon.


I agree or try a different driver (pdanet one). It is showing under adb devices right? that cable that came with was giving me hell while trying to charge it last night. I'm not sure as using it to tether for adb because I used my old one for the pc.
 

OgBrog

Member
Jul 10, 2010
35
0
What the heck are you talking about? This phone hasn't even been released officially and you are already tired of waiting on root? why don't you learn some stuff and crotribute to helping us get root?

I didn't mean to sound ungrateful, it's just that every other phone I've ever
owned already had a root method when I got it. After reading that no previous
root methods work I worried it might be locked like the droid X.
I really don't know too much about rooting and I doubt that there's anything that
I could think of or do that someone more knowledgeable hasn't already done.
 

perdid0

Member
Mar 9, 2009
19
0
CM on G2

Cyanogen said he has already written the device config profile. So as soon as there is root ans the BBQ is over there will be CM!

Well, that's up to the rom developers. Will probably take time.

Note that currently, this is a TEMPORARY root. And things are starting to get a bit over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent. I'm working to figure out what I can, but I fear my own usefulness is fading :p

(added that info to OP, since it's probably important)
 

tubaking182

Senior Member
Mar 28, 2008
1,081
10
I didn't mean to sound ungrateful, it's just that every other phone I've ever
owned already had a root method when I got it. After reading that no previous
root methods work I worried it might be locked like the droid X.
I really don't know too much about rooting and I doubt that there's anything that
I could think of or do that someone more knowledgeable hasn't already done.

The reson none of the old methods have worked so far is because this is an entirely new device. With this device we have new hardware and stock software that has not been seen/hacked yet. We are getting there so just hold out a little while, this device will rock when rooted, and after the BBQ this weekend we should have a few more guys looking into this with us.

Back on topic now



Sent from my T-Mobile myTouch 3G Slide using XDA App
 

khaosxiii

Senior Member
Feb 26, 2009
146
16
AWESOME!

Insert the usual disclaimers about "if this breaks your device, it's not my fault... do this at your own risk... voiding warranty... etc."

I used the rageagainstthecage binary from the download in this blog post: http://c-skills.blogspot.com/2010/08/droid2.html

On PC:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell
cd /data/local/tmp
chmod 0755 rageagainstthecage-arm5.bin
exit

On G2:
Open terminal emulator
cd /data/local/tmp
./rageagainstthecage-arm5.bin
Wait a bit for it to say "Forked #### childs." Then hit enter. Should have a $ prompt.
Try running "ps" - should say Cannot fork.
Exit terminal emulator with back button, launch an app (I launched Twidroid, probably doesn't matter which app you pick)
Launch Terminal Emulator again - it will force close, hit Force Close
Launch Terminal Emulator a second time and you have a root shell

Additional info from gariak, from here:

Currently working on further instructions to make this a permanent root... will edit those in once ready. Others are doing a bunch of work on it, too... keep an eye on the root thinktank thread for further developments - the fun starts at this post!

Note that for now, this is a TEMPORARY root. And things are starting to get a bit over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent. I'm working to figure out what I can, but I fear my own usefulness is fading :p

This is awesome! Will certainty be following this rather then all of the ghey fags in general complaining like a bunch of women.

Now we just need a root SPL or something to flash in the root shell right?

:D
 

tubaking182

Senior Member
Mar 28, 2008
1,081
10
You can follow the happenings in the thinktank thread. Best to just follow or test what is suggested if you feel comfortable.

On a side note the other build posted makes for a good un-root so I would keep it named PC10IMG.ZIP on the root of your sdcard, should anything bad happen to your phone you should be able to flash that from bootloader

Sent from my T-Mobile myTouch 3G Slide using XDA App
 

grankin01

Senior Member
Feb 9, 2008
973
658
Georgetown, KY
The other build has radio 12.21.something. My g2 came with 12.22.something. So you would have to downgrade your radio. Should work though. :)

Everything else looked to be the same though.

edit: Nevermind, after reviewing the numbers I read them wrong. Everything does look to be the same. Apologies, with my first drill weekend with the army reserves and still moving into a new house I guess my head wasn't completely in the game. :rolleyes:
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    NOTE: The below info is all pretty outdated now that the fantastic Paul O'Brien has created a one-click temp root app called VISIONary. I recommend using that - get it from his thread! In case you don't want to do that (what are you, some kind of masochist?), or want to see the old way of getting temp root, keep reading this thread.

    Insert the usual disclaimers about "if this breaks your device, it's not my fault... do this at your own risk... voiding warranty... etc."

    Note that for now, this is a TEMPORARY root. And things are now well over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent, and will help out wherever I can.

    Update 10/6/2010:

    Per suggestions later in the thread, I've compiled a zip file of everything needed to set up a temp root. I've also made some tweaks to the root script, included in the archive as "root" - notably, it will now create symlinks to busybox for commands not included with default android (example: cp).

    Here are updated instructions to use with the attached zip file. USB Debugging needs to be enabled:

    Stage 1: On your PC
    1. adb push su /sdcard/su
    2. adb push Superuser.apk /sdcard/Superuser.apk
    3. adb push rage /data/local/tmp/rage
    4. adb push busybox /data/local/tmp/busybox
    5. adb push root /data/local/tmp/root
    6. adb shell chmod 0755 /data/local/tmp/rage /data/local/tmp/busybox /data/local/tmp/root
    7. Disconnect phone from pc

    Here's an alternate Stage 1, thanks to Aphotix:
    If you really want to optimize (or be lazy if you are like me), just use this batch file (for windows obviously) using the pc side of the instructions already provided.

    Code:
    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 cd /data/local/tmp; chmod 0755 rage busybox root;

    just place it inside of the G2TempRoot folder and double click. Then its just two commands on the phones terminal and you have root.
    BATCH FILE DOWNLOAD HERE

    Stage 2: On your phone (Assumes you have already installed Android Terminal Emulator from the market)
    1. Launch Terminal Emulator
    2. /data/local/tmp/rage
    3. Wait for the message: "Forked #### childs."
    4. Menu > Reset Term - Terminal Emulator will exit.
    5. Launch Terminal Emulator, it Force Closes. Launch a second time, and you'll have a root shell
    6. /data/local/tmp/root

    Stage One only needs to be done once. Stage 2 needs to be repeated every time you reboot your phone.

    Follow the Thinktank thread for progress on a permanent root solution.

    Special Thanks:
    The dude that made rageagainstthecage - http://c-skills.blogspot.com
    gariak, for the ideas in the root script
    rpmccormick - improvements in the later PC steps
    Aphotix - Windows batch file to make the first part easier