- This shouldn't be any more dangerous than flashing anything else, but as always be careful. If something does break, it's on you.
- When you have a terminal or CMD window open (which you will), keep it open until you're sure you're finished with everything! Unless you know what you're doing, it can be a hassle to CD into the right directory.
- On Windows, make sure you have the LG Mobile drivers installed.
-
Open the Windows Store and install the Ubuntu (by Canonical) app.
-
Open Ubuntu and let it install.
-
Once installed, make sure everything is updated, using
sudo apt update
and thensudo apt dist-upgrade
. -
Make sure you have the following:
sudo apt install git adb fastboot openssl python3-pip
-
Install the needed Python dependencies:
pip3 install cryptography pip3 install PyUSB pip3 install pycryptodome
-
Make sure you're in your user directory:
cd /mnt/c/Users/YOURUSERNAME/
-
Follow the main instructions
-
Install Git BASH, Python 3 and ADB
-
Open Git BASH.
-
Install the needed Python dependencies:
pip install cryptography pip install PyUSB pip install pycryptodome
-
Make sure you're in your user directory:
C: cd C:\Users\YOURUSERNAME\
-
Follow the main instructions
-
Make sure everything is updated, using
sudo apt update
and thensudo apt dist-upgrade
-
Make sure you have the following installed:
sudo apt install git adb fastboot openssl python3-pip
-
Install the needed Python dependencies:
pip3 install cryptography pip3 install PyUSB pip3 install pycryptodome
-
Make sure you're in your user directory:
cd ~/
-
Follow the main instructions
-
If you're this advanced, you should know how to install the needed Python dependencies:
cryptography
andPyUSB
.- Just make sure you're in ~/ and have git, fastboot and ADB installed.
- Enter Download/LAF Mode
- Shut down your device completely, or pull the battery.
- While holding the Volume-Up button, plug your phone into the computer.
- If a screen with a loading symbol and a warning against unplugging come up, you're good.
-
Download the needed files:
git clone https://github.com/runningnak3d/lglaf
-
CD into the newly-created lglaf folder and prepare it:
cd lglaf git checkout h918-miscwrte #for the TMO V20 git checkout v10-miscwrte #for the TMO V10
-
Download TWRP for your device and move it into the lglaf folder (should be under your user directory)
-
Rename the TWRP image to
twrp.img
-
Run the following commands, with your phone connected and in Download Mode:
./partitions.py --dump laf.img laf ./partitions.py --dump misc.img misc ./partitions.py --restoremisc twrp.img laf
- The last command will take a while
- Unplug your device and power it off (remove the battery or hold PWR+VOLUP+VOLDWN until it reboots, then shut it down).
- Try entering Download Mode again. If all went well, you'll be greeted with TWRP.
Right now, TWRP will be installed to the LAF partition, and not recovery, which isn't very convenient if you don't have ready access to a computer. This will guide you on installing TWRP to your recovery partition.
-
Enter Download Mode (or TWRP at this point).
-
In the terminal, run:
adb push twrp.img /sdcard/
-
In TWRP, press
Install
>>Install Image
and selecttwrp.img
. Slide to confirm the flash, and then reboot to recovery.
If you want, you can restore the LAF partition. This isn't required, and personally I think it's better to have two versions of TWRP, especially if the recovery partition breaks or you can't boot to it; TWRP is more robust than LAF.
-
Make sure your device is in TWRP and plugged into your computer, and run these commands in the terminal:
adb push laf.img /sdcard/ adb push misc.img /sdcard/ adb shell dd if=/sdcard/laf.img of=/dev/block/bootdevice/by-name/laf dd if=/sdcard/misc.img of=/dev/block/bootdevice/by-name/misc
runningnak3d has since moved his stuff to https://gitlab.com/runningnak3d/lglaf, update commands above accordingly.