yashsingh1/xdaforums huggingface dataset:
[Optimus One, P500, V General] skinfingers001:
I'm a Newb Here so please bare with me here. So i recently rooted my LG Optimus v from virgin mobile and i tried to install a custom rom so i put the files onto my SD card and tried to go into recovery mode to flash the files but it does not work it just goes into a dark blue screen. I press HOME+VOL UP+POWER BUTTON and HOME+VOL DOWN+POWER BUTTON and none of them worked so i download app that makes it go into recovery but still a blue screen.So does anyone know how to fix this problem
[Optimus One, P500, V General] somescum:
when it goes to a dark blue screen you are using the wrong button. the menu and home keys might be backwards like on my recovery. I have to use the menu key to select options from recovery. and the code to get into recovery is power, vol down, and home button in that order
[T-Mobile LG G2x] jnichols959:
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:

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
[T-Mobile LG G2x] samir5421:
Works great! Thanks!
[T-Mobile LG G2x] mapin0518:
Very nice, thanks!
[T-Mobile LG G2x] drewtang:
Rad, thank you for this.
[T-Mobile LG G2x] 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

/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
[T-Mobile LG G2x] carm.me:
Worked fine for me, 10.6.

Thanks for the root, worked perfectly.
[T-Mobile LG G2x] suhailtheboss:
was incredibly fast and easy. on 10.6.7 here as well.

thanks for the hard work!
[T-Mobile LG G2x] jnichols959:
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 ;)
[T-Mobile LG G2x] bguzmanz2:
you are awesome!! i prefer not to use adb so i hadn't rooted my g2x until now!! thank you so much.
[T-Mobile LG G2x] baykakes:
Thank you so much it worked like a charm... quick fast and easy... Much better experience than with my returned Atrix (Mac 10.4)
[T-Mobile LG G2x] Kdogg71:
The scripted functions cannot find my device...

Checking for connected device...
No connected device found.
Press Enter to quit:

I use ubuntu 10.10 32-bit and USB Debugging is enabled. I tried disconnecting and reconnecting the device.

Any thoughts? Thanks for the work.

EDIT: adb shows me this:

List of devices attached
????????????	no permissions
[T-Mobile LG G2x] Arcadia310:
Does this work on Windows?
[T-Mobile LG G2x] joackie27:
Thread title clearly says G2x Easy Root for Mac and Linux. Below is the one for Windows.

http://xdaforums.com/showthread.php?t=1039985
[T-Mobile LG G2x] artismyrevolt:
Start your adb server with sudo first. Then try it.

Like this:

adb kill-server

sudo adb devices

Then see if your script works.
[T-Mobile LG G2x] jnichols959:
Yes, sorry, I forgot about the udev permissions on Linux. I'd like it to work without messing with sudo or permissions (manually). Let me see what I can do.
[T-Mobile LG G2x] malickie:
Very good job guys only a few steps away from Custom Roms, Kernels and Sim Unlock it looks like :)
[T-Mobile LG G2x] Kdogg71:
Thanks, that did it. I tried a number of things as root...looks like I overlooked starting adb as root.

I am rooted now, tested with "su" from terminal emulator; it is persistent through reboots, in case anyone was doubtful.
[T-Mobile LG G2x] swat808:
That was too easy. Thank You!!!!!!!!
[T-Mobile LG G2x] minispiney:
Perfect! Used this to get the stock signature line in email (see http://xdaforums.com/showthread.php?t=1048757&highlight=signature)

Worked like a charm!
[T-Mobile LG G2x] pastime1971:
O2x P990 rooted as well

It works fine with O2x P990.

Time to get UMA functionality from T-mobile stock rom...
[T-Mobile LG G2x] mpmilestogo:
A thing of beauty!

Wow! What an easy root thing. Always seems to me that this kind of stuff is so much easier on Linux than installing this and that driver, etc. Thanks so much for the great script. Works like a joy.

Have one question. On my G2 we also got a subsidy unlock which basically opened the phone up to other Sim cards. I tested this out in Australia and it worked great. Is this something we can also get for the G2X? There are sites that promise unlock codes but I really liked how it happened with the G2.

The community nature of the Android experience truly rules.
[T-Mobile LG G2x] N3xt2N0N3:
This is exactly what I needed. Thanks!
[T-Mobile LG G2x] bobreiter:
do i need anything else installed?

Do I need anything besides the files on the op installed?

Trying to do this on my work Mac and have no android tools installed.

Noob here, let me know what else (if anything) I need to install.
[T-Mobile LG G2x] jnichols959:
All you should need is the zip file from the original post.
[T-Mobile LG G2x] jchp598:
worked nice for me know just need roms
[T-Mobile LG G2x] drewtang:
derp?

I can't seem to get this working, not sure what it is I'm doing wrong, here's the output I get from terminal:

/home/mandrew/androidsdk/platform-tools/root.command: line 8: files/shared.sh: No such file or directory

/home/mandrew/androidsdk/platform-tools/root.command: line 10: initialTest: command not found

Checking for connected device...

/home/mandrew/androidsdk/platform-tools/root.command: line 13: ensureDevice: command not found

/home/mandrew/androidsdk/platform-tools/root.command: line 15: isRooted: command not found

/home/mandrew/androidsdk/platform-tools/root.command: line 24: checkForExitEarly: command not found

/home/mandrew/androidsdk/platform-tools/root.command: line 26: pushAndRunPsneuter: command not found

Waiting for device...

/home/mandrew/androidsdk/platform-tools/root.command: line 31: ensureDevice: command not found

Remounting /system read/write...

/home/mandrew/androidsdk/platform-tools/root.command: line 38: remount: command not found

Pushing su to /system/bin/su...

/home/mandrew/androidsdk/platform-tools/root.command: line 41: push: command not found

Linux mandrew-Dimension-8400 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 19:00:26 UTC 2011 i686 GNU/Linux

Ubuntu 10.10

Welcome to Ubuntu!

* Documentation: https://help.ubuntu.com/

0 packages can be updated.

0 updates are security updates.

any thoughts?
[T-Mobile LG G2x] jnichols959:
You're on 64-bit Ubuntu 10.10? With the android sdk installed? Which version of the zip did you download? Where did you expand it and how exactly did your run the root command?

I'll take a closer look on my end tomorrow morning and will look forward to more info on your setup.
[T-Mobile LG G2x] drewtang:
32 bit. I have the latest android sdk. Extracted the files in the platform-tools folder double clicked on the file and ran through terminal.
[T-Mobile LG G2x] jnichols959:
Try extracting it to any other folder, i.e. not inside the sdk folder. Maybe inside your home directory so it's something like /home/mandrew/G2xRootMacLinux_v0.5 then double-click the root.command and choose Run in Terminal like you did before.

I just tested this very scenario (with the sdk installed on 32-bit Ubuntu 10.10) and it worked fine for me. Let me know how that goes - and sorry for the hassle. You're using 0.5 right?
[T-Mobile LG G2x] mehmet22:
Hey guys, I am a noob to smartphones and rooting.

Couple of questions for the more knowledgeable members.

What kind of a differences will I see once my phone is rooted?

Will I be able to upgrade my phone to 2.3 once my phone is rooted?

What happens if this messes my phone up?
[T-Mobile LG G2x] tangyoulei:
very easy to use. thanks!
[T-Mobile LG G2x] .me:
Can't seem to root it on pc or mac.

both PC/mac say that G2x is not found.

read the readme - tried adb commands -- says command not found

I enabled/disabled debugging.. plugged/unplugged.. all other devices rooted like a charm.. not this one.. :(

tips?
[T-Mobile LG G2x] jnichols959:
if it shows up as a modem and you have USB debugging enabled before you plug it in but it's still not showing up as "connected" for adb (from the root.command script) i'm stumped.

if you open up Console from the Utilities folder, Selecte Database Searches -> All Messages, do you get something like this when you plug it in?

4/27/11 11:10:17 PM	kernel	USBMSC Identifier (non-unique): 02884207426144d7 0x1004 0x618e 0x9999
4/27/11 11:10:18 PM	kernel	AppleUSBCDCACMData: Version number - 4.0.1, Input buffers 8, Output buffers 16
4/27/11 11:10:18 PM	kernel	Block Storage Driver on-line.
4/27/11 11:10:18 PM	kernel	Block Storage Driver on-line.
[T-Mobile LG G2x] knight4linux:
Wow...could you of made this any easier??? HAHA I think not!!! :p

Thanks, and nice job man!
[T-Mobile LG G2x] Arcadia310:
Wow that was too easy! If the author could make this compatible with Windows I'd be really grateful!
[T-Mobile LG G2x] 24861:
DAMN!!! That was sick EZ!!!! Next time if I didn't have to push the button & you could make my phone get root when I simply think about it........:D VERY NICE!!!!!

Mac OS X 10.7 Lion

Thanks!!!!!!
[T-Mobile LG G2x] bahram4000:
10.6 (snow leopard)

enable USB debugging on your phone (Settings -> Applications -> Development)
[T-Mobile LG G2x] Mikeglongo:
After root, what's the best and easiest way to backup yourROM?

I've used ROM manager yesterday and when I did a backup, it wasn't showing my backup file, and when it rebooted, it didn't work.

The LG sign came up and it never reloaded, I had to get an exchange. Someone help
[T-Mobile LG G2x] GTRACER88:
Wow!! AMAZING way to root it!
[T-Mobile LG G2x] FightinTrojan:
I'd like to know this also. The G2X will be my first Android device and I want to make sure I get familiar with everything. Thanks for the help...
[T-Mobile LG G2x] jchp598:
is there a way to flash cm recovery this way, or a way to setup nvflasher on a mac. i have cm recovery flashed now through app but i herd this was not a true recovery flash. please help
[T-Mobile LG G2x] jnichols959:
nvflash is only available for linux and windows afaik so if you want to manually flash cwm I think you'll need one of those. nvflash runs fine in a vm (I use vmware fusion) so that's a valid option.

If you want to try clockworkmod on your G2x the cm folks actually say to get cwm via rom manager - but cwm via rom manager doesn't seem to work on a rooted stock G2x, only a cm7 G2x. Koush tweeted rom manager needs some work for the G2x: http://twitter.com/clockworkmod/status/64547257155993600

Having said all that I used nvflash (Linux) to install the test2 cwm recovery and installed the cm7 nightly without any issues.
[T-Mobile LG G2x] doschico:
yeehawww!

Worked like a charm.

Kind of needs a donate button :D
[T-Mobile LG G2x] jnichols959:
Glad it helped.

I just spent a couple hours packaging up the work of others so no need to donate. If you can find a donate link for the psneuter or Superuser.apk folks I'd hit that up. Heck, the scripts make root/unroot easier for me too ;)
[T-Mobile LG G2x] Arcadia310:
I made a short video tutorial in case anyone needs it: http://www.youtube.com/watch?v=ob4TCJ_K_S0
[T-Mobile LG G2x] ewagner93:
Idk

Hey, I'm new to this and I followed the instructions for my mac, but yet when I double click the root.command it asks me to pick a document to run this with. What do I do? :confused:
[T-Mobile LG G2x] hypmatize:
You might have scripts open in textedit or something by default... right click on the root script and then open with terminal

That should do the trick
[T-Mobile LG G2x] jnichols959:
if the right-click tip above doesn't work let me know and we can try to debug your setup. there are other ways to run that script, i just wanted to make it double-clickable if possible.
[T-Mobile LG G2x] Saikai94:
sorry for this, but does this also work for o2x (uk)?
[T-Mobile LG G2x] jnichols959:
one person posted earlier in this thread that it worked for their o2x http://xdaforums.com/showpost.php?p=13197621&postcount=20 though i haven't tested it myself.
[T-Mobile LG G2x] Saikai94:
Ah thanks didn't see the post :)

EDIT: can confirm it does indeed work for the p990
[T-Mobile LG G2x] crawler9:
An alternative option for anyone having any trouble at all is to use Gingerbreak. No computer needed to root your device. It doesn't matter that it's made for gingerbread; the exploit works just fine for Froyo as well. It's how I rooted my G2x.
[T-Mobile LG G2x] jnichols959:
True, but it seems that they've already fixed the security issue in the source code that allows gingerbreak to work: https://review.source.android.com/#change,22646

We won't see that code on our phone for who knows how long so gingerbreak will continue to work for a lot of folks I imagine. I read about it and the comments about some of the problems led me to give it a pass but I'm glad it worked for you. The psneuter exploit used in the scripts in this thread should work indefinitely.

In any case I'll add a link in the OP to the xda thread that discusses it.
[T-Mobile LG G2x] elskerhinanden:
Every time I try to use this I keep getting

Checking for connected device...

No connected device found.

Press Enter to quit:

I am new to this, any help would be appreciated. I am typically an Iphone user and have that down, this is foreign to me, but I am eager to learn. Please help, not sure what i am doing wrong. Thanks
[T-Mobile LG G2x] elskerhinanden:
Think you could also help me? I keep getting

Checking for connected device...

No connected device found.

Press Enter to quit:

don't know what i am doing wrong. Thanks
[T-Mobile LG G2x] jnichols959:
Your computer is not seeing your phone connected in debug mode. Make sure you have usb debugging enabled as described in the original post and the phone connected via USB.
[T-Mobile LG G2x] mprziv:
If mac users are getting a cannot connect to device error, make sure that your firewall is set to off!
[T-Mobile LG G2x] jnichols959:
i don't think this has anything to do with cannot connect. the firewall is for the network and the cannot connect is about the usb connection. maybe i'm missing something but i think it's another issue.
[T-Mobile LG G2x] h3ck:
This worked like a charm! Definitely a great idea with props to you for porting and for Shortfuse for original. :-D
[T-Mobile LG G2x] razaim:
i'm double clicking the root.command file and running it via terminal and it tells me device not found. please help me. thank you!
[T-Mobile LG G2x] hypmatize:
Do you have USB Debugging turned on?
[T-Mobile LG G2x] ROne21:
It seems to me that everyone is ignoring this question. I would like to know this also. I'm not new to smartphones, coming from mostly Nokias....N900 as my last phone before this.
[T-Mobile LG G2x] jnichols959:
It's highly unlikely that root will prevent an OTA update. You can always unroot at anytime as well.

There's always a chance that something could go wrong but rooting is pretty low risk compared to installing new roms. If something did go wrong you could probably do a stock recovery pretty easily. If recovery somehow got borked you could probably use nvflash to flash back to stock from a windows or Linux PC/vm.
[T-Mobile LG G2x] Seacop76:
I have followed everything that is listed in the steps and I get the same message as some of the others saying no device found. I did activate the USB debugging and I still have no luck. I originally tried to root using windows, but that didn't work so I tried on my Mac. Again no luck, please help. Is my G2X jacked or something? Thanks for any help.
[T-Mobile LG G2x] ROne21:
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?
[T-Mobile LG G2x] mehmet22:
Just rooted my phone. It was easy as other members have mentioned.
[T-Mobile LG G2x] razaim:
yess.. i did have usb debugging on.. and it did not detect my phone. im using a mac.. i downloaded it, brought it out to my home screen.. unziped the file.. and hit the root.command. i don't know what i'm doing wrong.
[T-Mobile LG G2x] hypmatize:
What does it say?

Try doing it without mounting the sd card (that is if you are mounting it)

not sure if that will do anything though
[T-Mobile LG G2x] razaim:
it says:

checking for connected devices

no connected devices found

press enter to quit

And this showed up without me mounting the sd card.

im running mac 10.5.8.

do i need to open the file in a different folder? if so, how? i'm not much familiar with mac or rooting. thank you.
[T-Mobile LG G2x] hypmatize:
try to turn off usb debugging and then turn it on again
[T-Mobile LG G2x] dimitrinyc:
I have the same problem - I turned on debugging mode - I clicked on the root.command and in the terminal I get:

Checking for connected device...

No connected device found.

Press Enter to quit:

logout

[Process completed]

I tried turning off and turning on debugging, I even restarted the computer and I rebooted my phone - still the same message - no connected device found.

I am running Mac OS X 10.6.7

Please help.
[T-Mobile LG G2x] hypmatize:
Is everyone having problems running something other then snow leopard?
[T-Mobile LG G2x] jnichols959:
let's compare what goes into the console when you plug in your phone. hopefully these steps are easy enough to follow:

Open Console (Applications -> Utilities -> Console)

Click "Show Log List" on the left side of the Console app toolbar (if it says Hide Log List skip this step)

Select "All Messages" from the "Database Searches" ("Log Database Queries" for 10.5.*) section in the list on the left

click the "Clear Display" button in the toolbar of the Console window

Turn on your phone

Enable USB Debugging: Home, Menu, Settings -> Applications -> Development -> USB debugging (checked)

Plug in the phone USB cable directly to the computer

Plug in the phone USB cable to the phone

Watch the Console app output

Click on the first line

Hold down shift on the keyboard and click on the last line

Select Edit -> Copy

Paste the lines into a message here

This is what I get on my 10.6.4 mac (there are actually a couple more lines from PGP because my drive is encrypted by it):

5/10/11 5:17:03 PM kernel USBMSC Identifier (non-unique): 02884207426144d7 0x1004 0x618e 0x9999
5/10/11 5:17:03 PM kernel AppleUSBCDCACMData: Version number - 4.0.1, Input buffers 8, Output buffers 16
5/10/11 5:17:04 PM kernel Block Storage Driver on-line.
5/10/11 5:17:04 PM kernel Block Storage Driver on-line.

p.s. I realized the scripts won't work on a PowerPC mac because the adb binary is for intel macs - but I've yet to see the message that is displayed when that happens.
[T-Mobile LG G2x] Seacop76:
Hello everyone that's having trouble here. I posted earlier the same problem of my Mac not recognizing my phone. So I finally went to a Windows computer and with only one try my phone is now rooted. Super easy. If you only have a Mac, then I'm sure you know someone with Windows that you can use. And Im talking less that five minutes. Good luck.
[T-Mobile LG G2x] hypmatize:
doing it on my mac took about 15 seconds :p

but yeah i guess if doing it on a mac is giving you problems......... download linux :p
[T-Mobile LG G2x] jnichols959:
yeah, linux doesn't require any drivers either. i've rooted on all three platforms and (when it's not mysteriously broken) mac and linux are a bit easier because of the lack of drivers. but whatever works for ya.