[Moto G7 Power Guides, News, & Discussion] Bernie_nix:
In the spirit of open-source, if there's one ROM that deserves to be "home-brewed" in addition to AOSP and Lineage, it's LineageOS4Microg. This guide will explain how to do so using Docker. LineageOS and Microg are explained below followed by the guide.

[IMG="LineageOS4Microg"]http://lineage.microg.org/images/screen_logo.jpg[/IMG]

/*
* I'm not responsible for bricked devices, damage, loss of Google services, you getting fired because the alarm app failed, etc. Do this at your own risk.
* Please do some research if you have any concerns about features included in the products you find here before flashing it!
* YOU are choosing to make these modifications.
* Your warranty may/will be void if you tamper with any part of your device / software.
* Same statement for XDA.
*/

About LineageOS4MicroG & LineageOS

Rom Built by Bernie_nix​

Known issues:

USB-C headphones work for music, watching videos, etc. They don't work in the phone app...yet. (working on this)

Some users report VOIP calls don't work properly. YMMV. Skype, Whatsapp, Nextcloud Talk, working great for me.

Automatic updates not yet implemented but will be in a future build.

You tell me.

Building Requirements

1. A fast PC or VPS account such as Google Compute Engine. Minimum PC recommended requirements are Intel i5 or equivalent, 4 cores 8 threads minimum (more cores and better CPU recommended), 16GB ram, SSD and 300GB free drive space minimum, fast internet connection (you will download over 30GB of sources).

2. Ubuntu 18.04 is supported here. If you use Windows or another version of Linux, let others know of your tweaks and workarounds.

3. Patience and time. Downloading sources, setting up and building a rom will take hours if not days (depending on your PC hardware and internet speed).

Environment Setup & Build​

1. Install Docker on Ubuntu (run each command once in terminal)

sudo apt-get update
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker

2. Test that docker is running (run command in terminal)

docker run hello-world

You should see something like this, "docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world ca4f61b1923c: Pull complete Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ..."

3. Pull lineageos4microg docker onto your pc (run command in terminal)

docker pull lineageos4microg/docker-lineage-cicd

4. After pull is complete, create the following directories in your home/YOURUSERNAME directory

lineageos4microg

lineageos4microg/src

lineageos4microg/ccache

lineageos4microg/local_manifests

lineageos4microg/keys

lineageos4microg/logs

lineageos4microg/zips

So it might look something like this: home/JoeAndroid/lineageos4microg

5. Copy the 4 attached xml files (bottom of this post) to your local_manifests folder

These are: ocean.xml, include_proprietary.xml, proprietary.xml, and custom_packages.xml

6. In terminal, cd into the lineage4microg folder, and copy and paste the following commands all at once after changing YOURUSERNAME to your username in ubuntu. For an explanation of options, see the link at bottom of post. This code will download sources, sync your repos with newest updates and start your build. This step could take hours. It is downloading sources, syncing repos and building your rom!

sudo docker run \
-e "BRANCH_NAME=lineage-16.0" \
-e "DEVICE_LIST=ocean" \
-e "SIGN_BUILDS=true" \
-e "SIGNATURE_SPOOFING=restricted" \
-e "WITH_SU=true" \
-e "CUSTOM_PACKAGES=GmsCore GsfProxy FakeStore MozillaNlpBackend NominatimNlpBackend com.google.android.maps.jar FDroid FDroidPrivilegedExtension " \
-e "INCLUDE_PROPRIETARY=false" \
-v "/home/YOURUSERNAME/lineageos4microg/lineage:/srv/src" \
-v "/home/YOURUSERNAME/lineageos4microg/zips:/srv/zips" \
-v "/home/YOURUSERNAME/lineageos4microg/logs:/srv/logs" \
-v "/home/YOURUSERNAME/lineageos4microg/cache:/srv/ccache" \
-v "/home/YOURUSERNAME/lineageos4microg/keys:/srv/keys" \
-v "/home/YOURUSERNAME/lineageos4microg/manifests:/srv/local_manifests" \
lineageos4microg/docker-lineage-cicd

7. Your build should be in the zips folder when complete! Flash in twrp/ofox.

8. If your build fails, check the log in lineageos4microg/logs/ocean folder. If you receive the following error, "Can not locate config makefile for product "lineage_ocean"" you will need to copy the 4 xmls from lineageos4microg/local_manifests to lineageos4microg/manifests.​

References and links:

https://phoenixnap.com/kb/how-to-install-docker-on-ubuntu-18-04

https://github.com/lineageos4microg/docker-lineage-cicd

Telegram group for additional ROMS, files and support: https://t.me/mG7Power

Thanks to Dark98, Electimon, Barry and many others for initial help and repos when building this rom.