Install LineageOS on g2m
Back to the overviewBasic requirements
Important: Please read through the instructions at least once before actually following them, so as to avoid any problems due to any missed steps!
- Make sure your computer has
adb
. Setup instructions can be found here. - Enable USB debugging on your device.
Rooting your device
Important: The device must be rooted before proceeding any further.
- Root your device by following this guide.
Installing a custom recovery using dd
-
Download a custom recovery - you can download one here.
- Place the recovery image file on the root of
/sdcard
:- Using adb:
adb push <recovery_filename>.img /sdcard/<recovery_filename>.img
Tip: The file may not be named identically to what stands in this command, so adjust accordingly.- You can use any method you are comfortable with.
adb
is universal across all devices, and works both in Android and recovery mode, providing USB debugging is enabled.
- Using adb:
- Now, open an
adb shell
from a command prompt (on Windows) or terminal (on Linux or macOS) window. In that shell, type the following commands:su dd if=/sdcard/<recovery_filename>.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
- Reboot into recovery.
- From the same shell, type the following command:
reboot recovery
- From the same shell, type the following command:
Installing LineageOS from recovery
- Build a LineageOS installation package.
- Optionally, download an application package add-on such as Google Apps (use the
arm
architecture).
- Optionally, download an application package add-on such as Google Apps (use the
- If you are not in recovery, reboot into recovery:
-
With the device powered off, hold Volume Down + Power. When the LG logo appears, release both buttons and then hold them again. Choose ‘Yes’ twice to confirm.
Note: Accept the factory reset prompt using the hardware buttons. If you have done everything correctly, this will not actually reset your device but instead will boot the custom recovery.
-
- Now tap Wipe.
- Now tap Format Data and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage.
- Return to the previous menu and tap Advanced Wipe, then select the Cache and System partitions and then Swipe to Wipe.
- Sideload the LineageOS
.zip
package:- On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
- On the host machine, sideload the package using:
adb sideload filename.zip
.Tip: If the process succeeds the output will stop at 47% and reportadb: failed to read command: Success
.
-
(Optionally): If you want to install any add-ons, repeat the sideload steps above for those packages in sequence.
Note: If you want the Google Apps add-on on your device, you must follow this step before booting into LineageOS for the first time! - (Optionally): Root your device by installing LineageOS’ AddonSU, (use the
arm
package) or by using any other method you prefer. - Once you have installed everything successfully, run ‘adb reboot’.
Warning: Depending on which recovery you use, you may be prompted to install additional apps and services.
We strongly advise you to opt out of installing these, as they may cause your device to bootloop,
as well as attempt to access or corrupt your data.
Get assistance
If you have any questions or get stuck on any of the steps, feel free to ask on our subreddit or in #LineageOS on freenode.