Root a LG G2 on OSX
2 min read

Root a LG G2 on OSX

Root a LG G2 on OSX

I've got a LG G2 the other day to replace my old Galaxy Nexus (RIP). I've seen a lot of info about benefits of having different ROMs like Cyanogen, and I've decided to have a go. However, in order to do it, I needed to root the phone... on OSX. Since all tutorials show the windows install, here are the steps I did for mine.

TL;DR: Get the SDK and the windows tutorial and execute the relevant lines from the batch files.

Disclaimer: The below tutorial is provided "AS IS". It worked for me but it may not work for you. I'm not responsible for any damage to your phone/data/etc..

Prerequisites:

  • A LG G2 in its initial state
  • One of the windows tutorials
  • IRoot10 package from here
  • Android developer SDK (to get access to adb). Make sure that adb is on your path for convenience.

The steps

As a prerequisite, extract IRoot10 archive. You'll find a file named root.bat. Following steps will actually mimic the execution of the .bat file.

Check your device using adb shell getprop ro.build.target_operator and lok into the root.bat file to see which process matches your descriptor.

For my European D802 (code OPEN), the sequence is the following:

  1. Make yourself a developer on the phone (see here)

  2. Enable USB debugging (System Settings > General > Developer Options)

  3. Execute:

    adb wait-for-device
    adb push g2_security /sdcard/g2_security
    

    Note: If your device is not a D802, please look at the relevant section for your phone type in root.bat.

  4. Unplug the phone from the computer

  5. Disable and re-enable USB debugging

  6. Run:

    adb wait-for-device
    adb shell "mount -o remount,rw /system"
    adb push su /system/xbin/su
    adb shell "chown 0.0 /system/xbin/su;chmod 06755 /system/xbin/su;sync;mount -o remount,ro /system"
    echo "Installing superuser"
    adb install superuser.apk
    
  7. Plug in the USB cable in your phone and let the script do its magic

This is it. Now you can go to the Superuser app and see if it's OK.

HTH,