[ROOT] G2x Easy Root for Mac and Linux

Search This thread

jnichols959

Senior Member
Mar 1, 2011
156
98
My G2x will not unroot with the one click method. It keeps coming up as no device found. I am using the USB Debugging and my phone is plugged in. I would GREATLY appreciate anyones help. I'm sending my phone back because I finally got a decent replacement!

* open Terminal (Applications -> Utilities)
* type the following (that's a zero)
Code:
sudo tail -Fn 0 /var/log/kernel.log
* plug in your phone
* copy the lines that show in Terminal when you plug it in and post them here

Probably something like this:

Code:
May 11 15:54:46 dr kernel[0]: USBMSC Identifier (non-unique): 02884207426144d7 0x1004 0x618e 0x9999
May 11 15:54:48 dr kernel[0]: AppleUSBCDCACMData: Version number - 4.0.1, Input buffers 8, Output buffers 16
 

baykakes

Senior Member
Apr 24, 2011
57
3
* open Terminal (Applications -> Utilities)
* type the following (that's a zero)
Code:
sudo tail -Fn 0 /var/log/kernel.log
* plug in your phone
* copy the lines that show in Terminal when you plug it in and post them here

Probably something like this:

Code:
May 11 15:54:46 dr kernel[0]: USBMSC Identifier (non-unique): 02884207426144d7 0x1004 0x618e 0x9999
May 11 15:54:48 dr kernel[0]: AppleUSBCDCACMData: Version number - 4.0.1, Input buffers 8, Output buffers 16


It says:
tail: /var/log/kernel.log: No such file or directory
 

baykakes

Senior Member
Apr 24, 2011
57
3
I saw something that said EasyTether disables ADB... I had easytether installed... I may have to dig out the files?
 

VisedMonk

Senior Member
Dec 14, 2010
496
70
Michigan
Hey OP, just wanted to say thanks for these scripts. Both the root and unroot scripts worked flawlessly for me. Thanks again.

Now, if I could just find a friend with a PC running that crappy ass windows thing... ;-)

Imported from Detroit using XDA Premium App
 

jnichols959

Senior Member
Mar 1, 2011
156
98
Hey OP, just wanted to say thanks for these scripts. Both the root and unroot scripts worked flawlessly for me. Thanks again.

Now, if I could just find a friend with a PC running that crappy ass windows thing... ;-)

are you looking for a PC to install clockworkmod recovery and flash roms?

i'm doing a little test right now using virtualbox and ubuntu (all free) to test flashing cwm with nvflash. it seems to be working fine (adb can see the phone in the linux virtual machine though i haven't tested nvflash).
 

VisedMonk

Senior Member
Dec 14, 2010
496
70
Michigan
are you looking for a PC to install clockworkmod recovery and flash roms?

i'm doing a little test right now using virtualbox and ubuntu (all free) to test flashing cwm with nvflash. it seems to be working fine (adb can see the phone in the linux virtual machine though i haven't tested nvflash).

Yes, exactly. I don't own a PC and I'm lucky enough (depending on your viewpoint) to have a workplace w/ mac as well. I'm intrigued.

Imported from Detroit using XDA Premium App
 

andersb

New member
Apr 25, 2011
3
0
Worked for me

Put phone in dev mode, as instructed.
Took very little time. Was able to browse phone with the adb_linux tool

Remember with usb mode, you should get the little "bug" in the status bar. See attached pic.

Also, FWIW, I rebooted my G2x first before rooting, just to ensure I was in a clean state to begin with.

New at rooting android. Not new to linux.

My linux distro:

Code:
> lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 10.10
Release:	10.10
Codename:	maverick
 

Attachments

  • usb_bug.png
    usb_bug.png
    32.2 KB · Views: 24

jnichols959

Senior Member
Mar 1, 2011
156
98
Yes, exactly. I don't own a PC and I'm lucky enough (depending on your viewpoint) to have a workplace w/ mac as well. I'm intrigued.

Imported from Detroit using XDA Premium App

Alrighty then. I'll see if I can post something for Mac users to flash cwm via a Linux vm using nvflash. Once in the vm it will just be like the nvflash on Linux thread in this forum.
 
  • Like
Reactions: baykakes

ROne21

Member
May 4, 2011
37
3
I got this turned ON but when I double click on root.comman, the phone disconnects from my computer....MAC 10.5.8....is my Mac too old for this?


I did it as instructed, the process completed and got this :

Checking for connected device...
/Users/ruel/Desktop/root.command: line 13: ensureDevice: command not found
/Users/ruel/Desktop/root.command: line 15: isRooted: command not found
/Users/ruel/Desktop/root.command: line 24: checkForExitEarly: command not found
/Users/ruel/Desktop/root.command: line 26: pushAndRunPsneuter: command not found
Waiting for device...
/Users/ruel/Desktop/root.command: line 31: ensureDevice: command not found
Remounting /system read/write...
/Users/ruel/Desktop/root.command: line 38: remount: command not found
Pushing su to /system/bin/su...
/Users/ruel/Desktop/root.command: line 41: push: command not found
/Users/ruel/Desktop/root.command: line 42: shell: command not found
Pushing busybox to /system/bin/busybox...
/Users/ruel/Desktop/root.command: line 45: push: command not found
/Users/ruel/Desktop/root.command: line 46: shell: command not found
Installing Superuser.apk android application...
/Users/ruel/Desktop/root.command: line 49: push: command not found
Removing psneuter from device...
/Users/ruel/Desktop/root.command: line 52: removePsneuter: command not found

Rebooting device...
reboot: Operation not permitted

Once device has rebooted you should be rooted.
Press Enter when you're ready to quit:


....but when I check if my phone is rooted, it is not....I'm using the ConnectBot app...when I'm at the $ prompt, I would enter 'su' and I would get "permission denied".

Noob question.....how would my phone look once rooted? What are the obvious things to look for to confirm it being rooted?
 

jnichols959

Senior Member
Mar 1, 2011
156
98
I did it as instructed, the process completed and got this :

Checking for connected device...
/Users/ruel/Desktop/root.command: line 13: ensureDevice: command not found

...

Removing psneuter from device...
/Users/ruel/Desktop/root.command: line 52: removePsneuter: command not found

Rebooting device...
reboot: Operation not permitted

Once device has rebooted you should be rooted.
Press Enter when you're ready to quit:


....but when I check if my phone is rooted, it is not....I'm using the ConnectBot app...when I'm at the $ prompt, I would enter 'su' and I would get "permission denied".

Noob question.....how would my phone look once rooted? What are the obvious things to look for to confirm it being rooted?

can you explain exactly what you did with the downloaded zip file? it looks like all of the files are on your desktop and not inside the G2xRootMacLinux_v0.5 folder they should be in. when you unzip the G2xRootMacLinux_v0.5.zip file you should end up with this setup

Code:
  G2xRootMacLinux_v0.5 (folder)
      Readme.txt (file inside)
      root.command (file inside)
      unroot.command (file inside)
      files (folder inside)
            ... (lots of files in here)
 

ROne21

Member
May 4, 2011
37
3
can you explain exactly what you did with the downloaded zip file? it looks like all of the files are on your desktop and not inside the G2xRootMacLinux_v0.5 folder they should be in. when you unzip the G2xRootMacLinux_v0.5.zip file you should end up with this setup

Code:
  G2xRootMacLinux_v0.5 (folder)
      Readme.txt (file inside)
      root.command (file inside)
      unroot.command (file inside)
      files (folder inside)
            ... (lots of files in here)


I put it on my desktop and what you posted is exactly what I have.....I've tried it over and over, no joy....now, it's saying no device connected.
 

jnichols959

Senior Member
Mar 1, 2011
156
98
I put it on my desktop and what you posted is exactly what I have.....I've tried it over and over, no joy....now, it's saying no device connected.

are you running EasyTether on your mac? if so re-read the original post - there is a link about EasyTether that may help you. If you're not running EasyTether could you follow the instructions on the original post for getting kernel log output? it would help if you posted with two things: 1) all of the text from Terminal when you double click root.command and 2) the output of the kernel.log as described in the original post.
 
  • Like
Reactions: baykakes

baykakes

Senior Member
Apr 24, 2011
57
3
are you looking for a PC to install clockworkmod recovery and flash roms?

i'm doing a little test right now using virtualbox and ubuntu (all free) to test flashing cwm with nvflash. it seems to be working fine (adb can see the phone in the linux virtual machine though i haven't tested nvflash).

Hey, have you finished your testing with NVFlash on Mac? I too don't own a PC or Linux system :-(
 

soxsfan10

Member
Oct 2, 2010
8
0
Wow, very simple to do!!

I am going to sound like a noob but...now what?

What exactly do I do from here? Suggestions?
 

hypmatize

Senior Member
Jul 19, 2009
202
16
SoCal
Wow, very simple to do!!

I am going to sound like a noob but...now what?

What exactly do I do from here? Suggestions?

Flash a custom recovery http://xdaforums.com/showthread.php?t=1056847

Then......

Flash one of the custom ROMs in the dev section.... A lot of people are using either EagleBlood by Team Shockwave, Bionix 2 by krylon360, AOSP Gingerbread by faux123 and CM 7 (its still a nightly aka still in beta)

I pretty sure I missed 1 or 2... look into each one and flash the one you want or flash one a day to see which one you like the most ;)
 

JoreVer

New member
May 21, 2011
1
0
G2X is not recognised via USB connection (Mac)

If you're still getting "No connected device found" and you're on a mac, try the following and post the results:

  1. open Terminal (Applications -> Utilities)
  2. type the following: sudo tail -Fn 0 /var/log/kernel.log (that's a zero)
  3. plug the phone into the computer
  4. copy the lines that show up in Terminal and post them here


After doing this, nothing shows up. What can I do for my device to be recognized on my mac? Last time I connected this device, it worked flawlessly. Now that I wanted to root this device for the first time, this problem shows up.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    NOTE: does not work with gingerbread 2.3.x. The exploit used by this (and SuperOneClick) does not work on gingerbread. It won't hurt anything if you try to run it (at least not in my experience) but it does not root the phone.

    I put together a couple shell scripts that are meant to make rooting and unrooting a G2x on Mac or Linux dead simple (folks claim it works on the Optimus 2X as well). I only tested the linux version on Ubuntu 10.10 (32 and 64-bit) so let me know if you run into any issues. Some folks have had success using the gingerbreak app to root the G2x so that may be an option too - though I haven't tried it myself.

    I was motived to do so after reading mhaedo's excellent thread that uses SuperOneClick (http://xdaforums.com/showthread.php?t=1039985). Head over there if you want to root from Windows or want to use SuperOneClick via mono on Linux/Mac.

    The scripts use the same files as SuperOneClick 1.8 so mad props to CLShortFuse. Note that they won't work on PowerPC macs.

    If you like the scripts please click the Thanks button. To root, download the attached G2xRootMacLinux zip file, expand it and:

    1. enable USB debugging on your phone (Settings -> Applications -> Development)
    2. connect your phone via USB. no drivers or android sdk needed.
    3. double-click root.command (Mac) or run it as you would any shell script (Linux)
    4. wait for the script to finish and your phone to reboot

    Unroot is similar but run unroot.command instead of root.command. It's only designed to unroot devices rooted with the root.command script.

    I also created a thread for flashing clockworkmod (or stock) recovery from the mac though it's not as simple. If you want clockworkmod for a safety net when installing ROMs (highly recommended) check it out and click Thanks if it helps: http://xdaforums.com/showthread.php?t=1099281

    Problems/Issues

    If you get something like "No connected device found" when running the script make sure usb debugging is enabled, the phone is powered on and plugged in to the computer via USB.

    On Mac OS X EasyTether is known to cause adb to break, which is what the scripts use to talk to the phone. I'll look into a fix in the scripts to disable/enable the kernel module automatically but if you have EasyTether installed you can try the steps at http://www.mobile-stream.com/easytether/android_faq.html#adbmacosx before running root/unroot.

    If you're still getting "No connected device found" and you're on a mac, try the following and post the results:

    1. open Terminal (Applications -> Utilities)
    2. type the following: sudo tail -Fn 0 /var/log/kernel.log (that's a zero)
    3. plug the phone into the computer
    4. copy the lines that show up in Terminal and post them here

    If you want to learn more about how the G2x is rooted I put a small Readme.txt file in the tar that explains what the scripts do. You could always read the shell scripts too :)

    Edit: hypmatize helped me find a bug when the path to the script had a space in it. fixed in 0.4
    Edit: Kdogg71 and artismyrevolt helped me find and fix some permissions problems on some stock linux distros. fixed in 0.5
    1
    Very nice, thanks!
    1
    I keep getting command not found... do I need to run this with su privileges? if so, how? This is what I see in the Terminal window:


    Checking for connected device...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 10: ensureDevice: command not found
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 12: isRooted: command not found
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 21: checkForExitEarly: command not found
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 23: pushAndRunPsneuter: command not found
    Waiting for device...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 28: ensureDevice: command not found
    Remounting /system read/write...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 35: remount: command not found
    Pushing su to /system/bin/su...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 38: push: command not found
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 39: shell: command not found
    Pushing busybox to /system/bin/busybox...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 42: push: command not found
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 43: shell: command not found
    Installing Superuser.apk android application...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 46: push: command not found
    Removing psneuter from device...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 49: removePsneuter: command not found

    Rebooting device...
    reboot: Operation not permitted


    I'm running 10.6 (snow leopard) btw

    followed everything in the instructions
    1
    I keep getting command not found... do I need to run this with su privileges? if so, how? This is what I see in the Terminal window:


    Checking for connected device...
    /Users/Ahmed/Documents/android stuff/G2X /rooting stuff/G2xRootMacLinux_v0.3/root.command: line 10: ensureDevice: command not found
    ...

    Rebooting device...
    reboot: Operation not permitted


    I'm running 10.6 (snow leopard) btw

    followed everything in the instructions

    Are you running this by double clicking the root.command file or are you running it via terminal? I'll PM you with some more info not fit for public consumption ;)
    1
    Thank you so much it worked like a charm... quick fast and easy... Much better experience than with my returned Atrix (Mac 10.4)