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:
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:
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
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:
- enable USB debugging on your phone (Settings -> Applications -> Development)
- connect your phone via USB. no drivers or android sdk needed.
- double-click root.command (Mac) or run it as you would any shell script (Linux)
- 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:
- open Terminal (Applications -> Utilities)
- type the following: sudo tail -Fn 0 /var/log/kernel.log (that's a zero)
- plug the phone into the computer
- 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
Attachments
Last edited: