[GUIDE] Root, unlock, and install a custom firmware!
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
(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.
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.
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.
Download and extract (using 7-zip (or whatever)) the root exploit from here.
Connect your phone to the computer with your USB cable.
Put the phone into "Charge Only" mode at Settings->General->PC connection->USB connection type
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.
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.
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:
It's way easy to use
It'll make backups of your stock recovery/bootloader for you, it'll also make restoring these backups easy
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):
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).
Download the latest version of the bootloader unlock here (latest version has the highest version number).
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.
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.
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.
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:
Start - boot the phone normally [highlighted by default]
Restart Bootloader - reboot into bootloader
Recovery Mode - enter ClockworkMod recovery (more on this later)
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 developmentthreads 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.
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).
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
How can I re-lock and un-root my phone?
How to LGNPST to restore a factory image.
Obtain the following files: AutoLGNPST-tSilenzio.zip (available on IRC), and the firmware. Unzip AutoLGNPST-tSilenzio.zip and follow the instructions in "READ ME FIRST.txt" (mad props to tSilenzio for automating this process).
Here's the laborious/error prone/manual method for LGNPST-ing back to stock.
You need to obtain the following files: LGNPST-PhantomPhreak53.zip, LGNPST_ACG_2.2.3_Lab.zip, 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.
(Install LG USB drivers)
Extract LGNPST_ACG_2.2.3_Lab.zip, 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)
Extract LGNPST-PhantomPhreak53.zip and run LGNPST_GenericModels_Ver_5_0_12_0.exe and then run LGNPST_Components_Ver_5_0_20_0.exe
In file exlorer, navigate to C:\LG Electronics\LGNPST and copy over the "Models" folder from the extracted Phantom zip folder
Run cmd as administrator and execute the following
Extract LGE970AT-01-V20j-310-410-MAR-08-2013.zip and change the extension of the .tot file to .bin
Connect phone to computer, power off, and then power on, holding down the power button and both volume buttons
Run the newly replaced LGNPST_ACG.exe from step 2. Select the DLL from step 5 and the .bin from step 6.
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.
(If you are using Shelnutt's app, simply use the button in the app to re-lock and install the stock stuff).
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:
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).
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
Android live wallpapers
Aspect ratio correction AT&T address book
AT&T code scanner
AT&T family map
AT&T hot spots
AT&T smart wi-fi
Certificate installer City ID
Contacts storage DeviceHelp
DRM protected content storage
DRM service Email
Face unlock Facebook
Favorite contacts widget
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 services framework
Google text-to-speech engine Google+
Home theme - Biz
Home theme - cozywall
Home theme - marshmallow
Lg voicecommand speechpack
Lgsystemserver Live tv
Live wallpaper picker Local search
Lock screen settings
Market feedback agent
Multi-photo live wallpaper
My uploads MyAT&T
Note pad widget
Package access helper
Playready cert test
Polaris office 4.0
Power control widget
Search applications provider
Sim toolkit Smartshare
Tom's diner Twitter
Widevine keybox test
World clock widget
YouTube Yp mobile
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).
Why shouldn't I run the Nexus 4 conversion?
See this post by thecubed. Don't be impatient, a legit, safe ROM is forthcominghere. Messing with partition tables is needlessly risky.
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!
Check out my guide on rooting, unlocking, and installing custom firmware on the LGE970!
I'm against picketing but I don't know how to show it.
Every hour my servant takes my temperature and gives me another.
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.
For some of us, summer vacation is alreadyover. For those getting ready to school, work, or … more
30 Aug 2014
By Tomek Kondrat
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?