This article is a quick summary of the steps I used to get a working Lineage + microg setup on my European LG G6 (h870), acting as a reminder for me and hoping it can help others. I voluntarily give little details since I expect the reader to be already familiar with Android alternative ROMs and flashing them.
- First, you should unlock your bootloader.
- (Windows required for this step) Then, you should update to the latest official firmware (v30b) using LG Bridge. Pro-tip: to make sure the upgrade process works smoothly, go into “Download Mode” (phone powered off, press volume up and connect USB cable). Make sure you do all the available official upgrades.
- Then, you can install a custom recovery. You should install
is maintained and Android 10 compatible. Otherwise, the only working
version of TWRP I could find for the LG G6 is the
3.3.0-0 version. This
however is not fully compatible with Android 10 and has issues with the
/datapartition (it works perfectly fine for Lineage 15.1 / 16.0 though!). Other versions would result in boot loops (recovery boot loops or, worse, boot logo boot loops) or be unable to mount the system partition (red error message “Failed to mount /system (device or resource busy)”).
- Then, format data, reboot and go to “Wipe” > “Advanced wipe” and select “cache Dalvik / ART”, “cache”, “data” et “system”). Be advised that checking “system” here will wipe your existing operating system on your device, I used it here to be sure to make a clean flash of the Lineage ROM. Reboot in recovery afterwards.
adb pushthe Lineage 17.1 ROM and install it through TWRP.
- Flash Magisk to get root abilities (this is now the standard way of having root, see https://www.xda-developers.com/lineageos-dropping-superuser-addonsu-implementation-favor-magisk-manager/. Also flash [https://f-droid.org/fr/packages/org.fdroid.fdroid.privileged.ota/] if you want F-Droid to be able to automatically update your apps.
- Reboot the normal system and go through the initial configuration wizard.
- Install F-Droid.
- Install NanoDroid patcher,
following the deodexing procedure in their
(I had both the vdex and odex file, but following vdex instructions were
enough) and flashing the
NanoDroid-patcher-*.zipfile through recovery (this one takes quite a few minutes, this is normal).
- Use a barcode scanner to scan the microg F-Droid repo QRCode and install “Services Core” (GmsCore), “Services Framework Proxy” and “Fake Store” through F-Droid. Also install “DroidGuard Helper” if you need to pass SafetyNet. Note that on Android 7 or later, GmsCore has to be installed as a system app, see microG wiki.
- Install a network geolocation backend, such as “Apple UnifiedNip” (or any other of your preference).
- Start the “GmsCore” app and run the autotest (checking signature spoofing is enabled, permissions are granted, etc.).
- You might be interested in Shelter from F-Droid if you plan on installing non-opensource apps.
- If you want to download APKs from the Play Store, you can install Aurora Store from F-Droid.
- I got stuck once in a boot logo boot loop (device would reboot automatically, never going further than the LG boot logo). This is very annoying and I did not find any way to do a hard power-off of this device. Since the battery is not removable, it seems the only option is to let the device run out of battery.
- I got stuck in a reboot recovery loop sometimes, although I did have a system (ROM) installed on the device. The device would never boot into the OS. This post did the trick: powering off the device, going into normal recovery (power + volume down until LG logo, then release power and push it again) and picking “yes” twice would get you into recovery and fix the boot loop.
- I got stuck once in the LG “Firmware update” mode, with the device waiting for a firmware on USB and no possibility to exit. You can exit this mode by pressing simultaneously volume up + volume down + power for a few seconds.
- NanoDroid promises to give an easy way to install the full microg suite. It is however bloated with features you do not necessarily want (see this comment).
- XPosed Installer is an alternative option, letting you install the XPosed Framework and use the “Fake GApps” XPosed module for signature spoofing. This however requires adding the whole XPosed framework, which seems unmaintained and latest version source code is not published. It seems XPosed has been superseded by EdXPosed.
- If you want to flash Lineage 15.1 or Lineage 16.0, you might end up with a message such as
Comparing TZ versions: Max TZ version: TZ.BF.4.0.1.C4-126433 Current TZ version: TZ.BF.4.0.1-143200
and an error due to a failed assertion. This is because your bootloader is too high version, and you should flash a Nougat bootloader (downgrade).
- If you want to dump the official KDZ images, copy the files appearing in
C:\Users\YourUsername\AppData\Local\LG Electronics\LG Bridge\SWUpgrade\Imagesomewhere safe. These files are automatically purged after a successful upgrade!
- Special boot modes of the LG G6 are described in the Lineage wiki.
- If you want to go back to Stock mode, simply start the device in Download Mode and use the official “LG Bridge” tool to perform update / reinitialization.