Remove All Ads from XDA

[GUIDE] Root, unlock, and install a custom firmware!

374 posts
Thanks Meter: 254
By carrett, Senior Member on 22nd November 2012, 02:37 AM
Post Reply Email Thread
The aim of this guide is to enable you to install a custom firmware on your Optimus G while being as clear, accurate and succinct as possible. This guide is intended for use by Windows users with an AT&T Optimus G (AKA LGE970).

I've presented the following sections in a specific order for a reason: you need to root to unlock, and you need to unlock to install a custom firmware. If you're currently running what the manufacturer gave you, you need to start with rooting, then unlocking, then trying other firmwares. Be careful, good luck, and have fun!

How to "root" your Optimus G
  1. (Optional if you have another means of un-RARing) Download and install 7-zip from here. You need this to open certain types of archives (specifically .rar, but you might also want to open .tar, .bz2, or other types of archives in the future). This program is supremely awesome in its ability to open almost any archive you throw at it. It's also unobtrusive and efficient.
  2. Download and install LG USB Drivers from here. Without these drivers, your computer won't be able to effectively communicate with your phone. This is vital for the steps we will be taking.
  3. Enable USB debugging by going to Settings->(General)->Developer options" and checking the box next to "USB debugging." You will get warnings. You can probably ignore them. This setting will allow you to run commands on your phone from your computer (via USB). For more info on the Android Debug Bridge, click here.
  4. Download and extract (using 7-zip (or whatever)) the root exploit from here.
  5. Connect your phone to the computer with your USB cable.
  6. Put the phone into "Charge Only" mode at Settings->General->PC connection->USB connection type
  7. Open CurrentRoot.bat and follow its prompts. You will need to change from "Charge Only" to "Media sync (MTP)" mode. The setting is in the same place.
  8. Run SuperSU (now in your apps drawer) it and make sure it works. This program allows others to gain access to superuser privileges. For more info on rooting and what kind of stuff it lets you do, click here and/or use Google.

If that didn't work for you, try following instructions from the thread where this root method came from.

How to unlock the bootloader

The bootloader is the first program your phone runs and its main job is to load the operating system. The stock bootloader is locked and will only run versions of Android that LG and AT&T want it to. Since our goal is to install and run custom firmwares, we must circumvent this locked bootloader. Luckily, thecubed and Shellnut2 have found a way to do this for us. What you want to do is buy Shelnutt's app. There are several reasons you should throw down some cash on this:
  1. It's way easy to use
  2. It'll make backups of your stock recovery/bootloader for you, it'll also make restoring these backups easy
  3. The money is for a good cause

If you're still confused, visit thecubed's thread. He is the man, thank him a billion times. Then thank him again for being a nice guy.

For the convenience of those interested, here is the more laborious/error prone/manual way to unlock (NOTE: this method does NOT work if you've updated to Jelly Bean, you need to use the app):
  1. If you haven't already, download and install 7-Zip and the LG USB drivers, and make sure you have USB Debugging turned on (see above).
  2. Download the latest version of the bootloader unlock here (latest version has the highest version number).
  3. Ensure that your screen is on and unlocked (I'd go to "Settings->Display->Screen timeout" and set the timeout to never to make sure the screen doesn't go off during this process). Your screen must remain on because SuperSU will ask you to grant superuser privileges to the unlock script and you want to be able to tap "Yes" when the time comes.
  4. Connect your phone to the computer with your USB cable, and run the freegee.bat script in extracted files on your computer. Do NOT run this script as administrator. The install will fail if you do. Follow the prompts. You can ignore "No space left on the device" errors, but "adb.exe not found" or "tar: invalid magic" errors are not negligible and indicate either you skipping a step, a funky download, or something very bad.
  5. Once the script finishes, make sure you have a populated "backups" folder in the folder where freegee.bat lives. The backups folder contains your original stock/locked bootloader, which you might want if you ever want to revert to stock.
  6. If you're sure the script ran successfully, power off the phone. Next, hold down the power and volume up keys simultaneously to enter fastboot mode. You should see a screen that looks like this:

In fastboot mode, there is a menu, but it's hidden. To navigate it, remember that volume up moves the cursor up, volume down moves it down, and power selects the currently highlighted option. The options are, in order:
  1. Start - boot the phone normally [highlighted by default]
  2. Restart Bootloader - reboot into bootloader
  3. Recovery Mode - enter ClockworkMod recovery (more on this later)
  4. Power Off - (duh)

Here is a video of thecubed showing you how to get to ClockworkMod from the bootloader (like a boss):

Using Team Win Recovery Project

Team Win Recovery Project (AKA TWRP) is a recovery, which basically allows you to install new firmwares and apply updates/modifications to already-installed firmwares (and a bunch of other things, like mounting and formatting portions of your phone's memory). It is the default recovery option when you use the Freegee app to unlock your phone (the other is Clockworkmod, which is so similar I won't be writing a separate guide on how to use it). Navigating TWRP is fairly self explanatory. Many great guides on how to use TWRP have been written and can be found via Google. Here is the first search result that came up for me. It's a pretty good guide.

One thing I will vehemently recommend is that you make a backup every time you install a new firmware. Personally, I backup apps and texts with Titanium Backup and my current firmware via TWRP (the linked guide explains how to make a backup in TWRP). Backups are a good idea and people should always make them. ALWAYS.

Installing custom firmwares

Follow the firmware author's instructions EXACTLY. These guys know what they are doing, certainly more than you or I. Check out the development threads for ROMs to try out.

Note: Be sure that if you are installing ROMs that require the Jelly Bean OTA update that you have taken that update.
There are two ways to do this: receive the update as intended (Over The Air) or use LGNPST (guide on using that under FAQ 3.a of this post) or autoprime's awesome tool, TeenyBin.

  1. How do I upgrade FreeGee? The easiest thing to do is simply install the new version of FreeGee the way you did the old one. It will work. Make sure you keep your original locked bootloader in a different, safe place though, just in case you ever want to revert to stock (if you try to return your phone, for example).
  2. How do I disable that pesky OTA update notification? This comes courtesy of shawnchalfant and adfurgerson (visit ad's thread for more details): go into Titanium Backup and freeze the following programs: com.lge.lgfota.permission 4.0.4-91f513f88d AND com.lge.omadmclient 3.2.21
  3. How can I re-lock and un-root my phone?
    1. How to LGNPST to restore a factory image.
      Obtain the following files: (available on IRC), and the firmware. Unzip and follow the instructions in "READ ME FIRST.txt" (mad props to tSilenzio for automating this process).

    2. Here's the laborious/error prone/manual method for LGNPST-ing back to stock.
      You need to obtain the following files:,, and the firmware. Follow the following steps (please note: I am less experienced with this process and find it much more tedious. Also, IMHO, I don't think the people you're returning the phone to will care if you leave some minor traces of your unlocking shenanigans. I think the process above this is more than sufficient and simpler). Credits go to Jhoopes517 for this process, he showed me how to do it in his thread.
      1. (Install LG USB drivers)
      2. Extract, run the installer. Open file explorer to C:\Program Files\LG Electronics\LGNPST and replace the current LGNPST_ACG.exe with the one in the extracted folder (if you are on a 64-bit version of windows, go to C:\Program Files (x86)\LG Electronics\LGNPST)
      3. Extract and run LGNPST_GenericModels_Ver_5_0_12_0.exe and then run LGNPST_Components_Ver_5_0_20_0.exe
      4. In file exlorer, navigate to C:\LG Electronics\LGNPST and copy over the "Models" folder from the extracted Phantom zip folder
      5. Run cmd as administrator and execute the following

        regsvr32 "C:\LG Electronics\LGNPST\Models\LGNPST_LS970.dll"
      6. Extract and change the extension of the .tot file to .bin
      7. Connect phone to computer, power off, and then power on, holding down the power button and both volume buttons
      8. Run the newly replaced LGNPST_ACG.exe from step 2. Select the DLL from step 5 and the .bin from step 6.
      9. Press Start
      10. If LGNPST errors out at 85%, turn your phone off and hold the power button until the phone powers on, then release. DO NOT disconnect the cable before LGNPST is done doing its thing. Your phone may reboot. This is OK.

    3. (If you are using Shelnutt's app, simply use the button in the app to re-lock and install the stock stuff).
    4. Here's the laborious/error prone/manual method for re-locking the phone and installing the stock recovery/bootloader/kernel.
      Remember the backups of the locked bootloader that you kept? You're going to need them. Obviously, you'll need USB Debugging enabled and LG USB drivers installed. Copy them to your phone's "Internal Storage" in a folder, in this example it's called "backups." Connect the phone to your computer via USB, open a command line (cmd) and type the following:

      cd C:/some/folder/where/you/have/adb.exe/eg/your/freegee/download
      adb shell
      dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/recovery
      dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/boot
      dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/aboot
      dd if=/sdcard/backups/aboot-att-backup.img of=/dev/block/platform/msm_sdcc.1/by-name/aboot
      dd if=/sdcard/recovery-att-backup of=/dev/block/platform/msm_sdcc.1/by-name/recovery
      dd if=/sdcard/boot-att-backup.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
      dd basically copies from the if= location and writes to the of= location. The first three dd steps write a bunch of zeros to the recovery, boot, and aboot partitons, the last three write the backups to aboot, recovery, and boot. If you want to know more, read all about dd here and/or Google. If you lost your backups, you can try writing mine.

      Now you've restored the stock bootloader and recovery, but your phone is still rooted. To unroot it, open SuperSU, go to its settings, and tap "Full unroot." Do a factory reset (Settings->General->Backup & reset->Factory data reset) and you should be good to return the phone to AT&T (or whatever).

    Be careful with these last two methods if you have removed any bloatware or installed a custom firmware, you may prefer to LGNPST back to stock (LGNPST is almost always a safe way to return to stock).
  4. Quote:
    Originally Posted by blenkows

    Haha I wish I had seen this earlier. I had screenshots before and after so I could see exactly what was removed but I had just deleted them. From memory, it doesn't seem like too much was removed. All the AT&T apps are gone but it appears LG's apps are still here.

    Here is a list of apps I had shortly after factory reset on stock for people to compare with theirs. I have struck out the ones I was able to remove without my phone blowing up. Let me know if you safely removed one and I'll strike it out. Also let me know if I missed any or included an app which isn't part of stock. Thanks!

    Adobe Flash Player 11.1
    Adobe Reader
    Amazon Kindle

    Android keyboard
    Android live wallpapers
    Android system
    Aspect ratio correction
    AT&T address book
    AT&T code scanner
    AT&T family map
    AT&T hot spots
    AT&T locker
    AT&T messages
    AT&T navigator
    AT&T ready2go
    AT&T smart wi-fi

    Bluetooth share
    Bt/wifi test
    Calendar storage
    Calendar widget
    Car home
    Certificate installer
    City ID
    Contacts storage
    Download manager
    DRM protected content storage
    DRM service
    Email widget

    Face unlock
    Favorite contacts widget
    File manager
    File networking
    Google account manager
    Google backup transport
    Google calendar sync
    Google contacts sync
    Google partner setup
    Google play books
    Google play magazines
    Google play movies & tv
    Google play music

    Google play services
    Google play store
    Google search
    Google services framework
    Google text-to-speech engine
    Home selector
    Home theme - Biz
    Home theme - cozywall
    Home theme - marshmallow
    HTML viewer
    Key chain
    Lg keyboard
    Lg tag+
    Lg voicecommand speechpack
    Lgatcmd service
    Lgsmartcard service
    Live tv
    Live wallpaper picker
    Local search
    Lock screen settings
    Market feedback agent
    Media home
    Media storage
    Multi-photo live wallpaper
    My uploads
    Network location
    NFC service
    Note pad
    Note pad widget
    On-screen phone
    Package access helper
    Package installer
    Phone/messaging storage
    Photo frame
    Playready cert test
    Polaris office 4.0
    Power control widget
    Search applications provider
    Setup wizard
    Shutdown monitor
    Sim toolkit

    Streaming player
    System ui
    Task manager
    Today+ widget
    Tom's diner
    User dictionary
    Video wiz
    Voice command
    Voice search
    VPN client
    Wap service
    Widevine keybox test
    Wiper app
    Wise screen
    World clock widget
    Yp mobile
  5. I can't root. What do I do?
    Double check that you have followed all the steps in this guide (USB drivers, correct settings, etc.) If your software version ends in "c," you need to LGNPST to the version that ends in "o" (see the section on LGNPST in this post).
  6. Why shouldn't I run the Nexus 4 conversion?
    See this post by thecubed. Don't be impatient, a legit, safe ROM is forthcoming here. Messing with partition tables is needlessly risky.
  7. My shiny new firmware has no APNs and I don't get mobile data! What do I do?
    Use the APN settings in this post. They have always worked for me. If they don't try setting the "APN" variable to "pta" instead of "Phone."
... (ask me more questions!)

I hope you found this useful. Obviously this is a work in progress. I am way open to suggestion, please leave a comment below! If you liked this post, hit the thanks button and/or rate this thread so that others know this guide is legit. Thanks!
The Following 136 Users Say Thank You to carrett For This Useful Post: [ View ] Gift carrett Ad-Free
22nd November 2012, 04:26 AM |#2  
Kiserai's Avatar
Senior Member
Flag Spokane, WA
Thanks Meter: 20
Very nice, man. This is great for people who don't want to have to hop between threads for all the different information.

I recommend we sticky it.
22nd November 2012, 04:39 AM |#3  
Flag Rochester
Thanks Meter: 20
this is definitely appreciated. i was looking for a guide when i first rooted and unlocked, just to read along with making sure i was doing it right. more just to double check my process than actually needing it.
The Following User Says Thank You to sawdey21 For This Useful Post: [ View ] Gift sawdey21 Ad-Free
22nd November 2012, 04:51 AM |#4  
Senior Member
Thanks Meter: 31
This is the best root/ROM guide I've ever seen. Excellent job.

Sent from my LG Optimus G
The Following User Says Thank You to IrateCustomer For This Useful Post: [ View ] Gift IrateCustomer Ad-Free
22nd November 2012, 05:06 AM |#5  
Junior Member
Thanks Meter: 1
anyone try this on E97110d

should it work?
22nd November 2012, 05:19 AM |#6  
carrett's Avatar
OP Senior Member
Flag Los Angeles, CA
Thanks Meter: 254
Originally Posted by cpus456

anyone try this on E97110d

should it work?

I haven't so I can't recommend trying it.
22nd November 2012, 06:24 PM |#7  
Senior Member
Thanks Meter: 23
Awesome work! someone please sticky
22nd November 2012, 07:07 PM |#8  
Junior Member
Thanks Meter: 3
all worked great!
22nd November 2012, 08:32 PM |#9  
Senior Member
Thanks Meter: 15
can you please also post a guide on how to lock back the device and unroot.
and also how to update to a new version of freegee if it comes out.


Thank you.
22nd November 2012, 08:44 PM |#10  
carrett's Avatar
OP Senior Member
Flag Los Angeles, CA
Thanks Meter: 254
Originally Posted by karelson

can you please also post a guide on how to lock back the device and unroot.
and also how to update to a new version of freegee if it comes out.


Thank you.

Both of those requests are covered in the OP. Specifically, look at FAQ #2...If you can't understand that, I can't help you.
23rd November 2012, 07:35 AM |#11  
martyotaku's Avatar
Senior Member
Flag NYC
Thanks Meter: 18
Carrett can u do a guide for going back to stock? Flashing a stock the files I need just have no clue what to do. .need to return my phone.thanx

Sent from my LG-E970 using xda premium
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes