FORUMS

Mysterious GG1 Google Device Stops by FCC. Glass v2?

As the year progresses, we draw further away from Google’s annual I/O … more

Material and Material Dark Hit Samsung’s Theme Store

The latest version of Touchwiz, launched alongside the Galaxy S6 and S6 Edge, … more

Swappa’s New App Helps You Value Your Device

There comes a sad time in everyone’s life where you must part ways with your … more

Xiaomi Sold 34.7 Million Phones In 6 Months

2015 has been a phenomenal year for Xiaomi so far. With a stellar rise in 2014, 2015 saw … more

[ROOT] G2x Easy Root for Mac and Linux

156 posts
Thanks Meter: 98
 
By jnichols959, Senior Member on 24th April 2011, 04:38 AM
Post Reply Subscribe to Thread Email Thread
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://forum.xda-developers.com/show....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://forum.xda-developers.com/show....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/easytet...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
Attached Files
File Type: zip G2xRootMacLinux_v0.5.zip - [Click for QR Code] (1.17 MB, 9255 views)
File Type: txt G2xRootMacLinux_v0.5.md5.txt - [Click for QR Code] (59 Bytes, 1542 views)
Last edited by jnichols959; 26th July 2011 at 04:06 AM. Reason: added a note about this exploit not working on gingerbread
The Following 34 Users Say Thank You to jnichols959 For This Useful Post: [ View ]
 
 
24th April 2011, 05:27 AM |#2  
samir5421's Avatar
Senior Member
Thanks Meter: 56
 
More
Works great! Thanks!
24th April 2011, 05:49 AM |#3  
Senior Member
Thanks Meter: 25
 
More
Very nice, thanks!
The Following User Says Thank You to mapin0518 For This Useful Post: [ View ]
24th April 2011, 07:03 AM |#4  
drewtang's Avatar
Senior Member
Flag Boise
Thanks Meter: 235
 
More
Rad, thank you for this.
24th April 2011, 11:00 AM |#5  
Senior Member
Flag SoCal
Thanks Meter: 16
 
More
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
Last edited by hypmatize; 24th April 2011 at 11:04 AM. Reason: typo
The Following User Says Thank You to hypmatize For This Useful Post: [ View ]
24th April 2011, 03:55 PM |#6  
Junior Member
Thanks Meter: 0
 
Donate to Me
More
Quote:
Originally Posted by hypmatize

I'm running 10.6 (snow leopard) btw

followed everything in the instructions

Worked fine for me, 10.6.

Thanks for the root, worked perfectly.
24th April 2011, 05:58 PM |#7  
Senior Member
Flag Kansas City
Thanks Meter: 80
 
More
was incredibly fast and easy. on 10.6.7 here as well.

thanks for the hard work!
24th April 2011, 06:04 PM |#8  
OP Senior Member
Thanks Meter: 98
 
More
Quote:
Originally Posted by hypmatize

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
The Following User Says Thank You to jnichols959 For This Useful Post: [ View ]
24th April 2011, 07:30 PM |#9  
Member
Thanks Meter: 1
 
More
you are awesome!! i prefer not to use adb so i hadn't rooted my g2x until now!! thank you so much.
24th April 2011, 11:36 PM |#10  
Member
Thanks Meter: 3
 
More
Thank you so much it worked like a charm... quick fast and easy... Much better experience than with my returned Atrix (Mac 10.4)
Last edited by baykakes; 24th April 2011 at 11:43 PM.
The Following User Says Thank You to baykakes For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes