[Moto G Android Development] MSe1969:
Hi,

this is my unofficial LineageOS 14.1 build for the Moto G (falcon) device with current security patches, microG patch and substratum support.

(This thread is for the falcon device, I have also a thread for preregrine using the same sources)

As announced here, LineageOS has discontinued to deliver official 14.1 builds in the course of providing LineageOS 16.0 builds, but the 14.1 tree will continue to be maintained for security patches by the community (I am one of these contibutors, btw).

So this build will continue.

The build has got the following features:

LineageOS 14.1 with current security patches (from official LineageOS repositories)

Security string 2021-06-05, AOSP tag 7.2.1_r36

Additional custom build release (to indicate ASB backport status)

Adapted LineageOS Jelly Browser (additionally having Startpage and Qwant as search engines)

Root is not included and would need to be flashed separately

Patched for the use of the substratum theme engine (the substratum app and the themes need to be downloaded separately)

System certificates taken from AOSP Oreo branch

Kernel forked from LineageOS and updated with many security patches

OTA Support

Enforcing SELinux

There are two build variants available:

A. Default LineageOS 14.1 with substratum and microG patch

Patched for the use of microG - you can either flash Gapps or manually install microG as apps (or use neither of those)

(forked) Cromite Webview M121

Download here

B. Hardened build with pre-installed microG and F-Droid, patched for substratum

For the security/privacy focused. It has to be said that microG seems to run better if it is pre-installed.

Pre-installed microG same as the LineageOS for microG project

Pre-installed AuroraStore / AuroraServices

Additional security hardening features listed below

SQLite 'secure delete' feature enabled

Access to /proc/net blocked for user apps

Bundled netmonitor app to allow network monitoring

Enhanced Privacy Guard: Switches for motion sensors and other sensors available

Oreo backport: SET_TIME_ZONE permission restricted to system apps

Oreo backport: Access to timers in /proc restricted

Cloudflare as default DNS (instead of Google)

Privacy-preferred default settings

No submission of IMSI/phone number to Google when GPS is in use

(forked) Cromite Webview M121

IPtables block script (to block connections to Facebook and Google)

Download here

Source Code links

LineageOS: https://github.com/LineageOS

Kernel: https://github.com/lin14-mGoms/android_kernel_motorola_msm8226/tree/mse_v1

microG patches:

(1) https://github.com/microg/android_p...aster/patches/android_frameworks_base-N.patch

(2) https://github.com/microg/android_p...aster/patches/android_frameworks_base-N.patch

Patches for Substratum: https://github.com/LineageOMS

local manifests: https://github.com/lin14-mGoms/local_manifests/tree/cm-14.1-oms and https://github.com/lin14-mGoms/local_manifests/tree/cm-14.1-mG-oms

Installation Instructions

YOU ARE RESPONSIBLE SOLELY YOURSELF FOR ANY ACTIONS YOU DO WITH YOUR DEVICE !!!

Please note - I won't explain any single aspect (e.g. how to install 'fastboot' on your PC or troubleshoot USB connectivity issues under Windows). Search the net and consult the search engine of your choice or look here in XDA, there is plenty information available.

Pre-Requisites

Get familiar with the hardware keys of the Motorola Moto G (falcon) device, especially how to enter fastboot mode (switch phone off hold power + volume down together for about 3 seconds) and recovery mode (in fastboot mode, switch with volume down key to the reboot recovery option and select with volume up key)

Have fastboot and adb installed on your PC and make sure, you can connect via USB to your device in fastboot mode and via adb

Download the most current .ZIP file of this ROM and place it to your phone's internal memory

An unlocked bootloader (read the warnings carefully and backup your data!

Your bootloader must at least be on version 41.18 (find out via fastboot getvar version-bootloader) - if your bootloader is below that version, the ROM will refuse to install. In that case, you need to upgrade the BL first. See e.g. here for more info. (I currently do not find the link, which I have used some years back, but the provided link should be helpful, too)

Install TWRP recovery

If you come from stock ROM and have just unlocked your boot loader, this is the next thing to do. If you have already a working custom recovery on your device, there is no necessity to replace it.

However - I recommend to use the TWRP recovery. The following instructions are based on TWRP.

NOTE: There have been reports of encryption issues in this thread, when using TWRP 3.3.x, which disappear, when TWRP 3.2.1 is used - I myself use the

TWRP 3.2.1

, as higher versions have mainly been developed for higher Android versions. I can't technically confirm or prove the situation, but based on the reports and the fact, that I myself did not encounter ANY issues for my own device with TWRP 3.2.1, I recommend this version

To install TWRP, download the TWRP.img file (Note: replace "TWRP.img" in the following instructions with the real file name) from this section to your PC, get it into 'fastboot mode', connect the device via USB to your PC and enter the following command on your PC:

fastboot flash recovery TWRP.img

Afterwards, directly boot into 'recovery mode' (see above) - I recommend not to boot the phone's Android system after having flashed TWRP. Once TWRP has been launched, you may decide to reboot your phone and install the ROM at any time later. But the first boot after flashing TWRP should be TWRP in recovery mode.

Advanced Wipe

ONLY perform the steps described here, if you come from Stock ROM or a different Custom ROM!

Boot into recovery mode. In TWRP, choose "Wipe", "Advanced" and specify "Dalvik", "System", "Cache" and "Data" to be wiped.

Make sure NOT to wipe "Internal memory" (or "SD Card", if shown). Swipe to confirm the deletion and get back into the main menu.

GApps (only for build variant A - do not flash on build variant B!)

You have the choice: a. Use microG - b. Flash GApps - c. Neither of those (obviously, you

cannot

combine those options!)

'microG' is installed simply by installing the respective apps, no flashing necessary. If you wish to have GApps, they need to be flashed together with the ROM. Download GApps in that case only from opengapps.org and put the .ZIP also to the Internal memory of your device. Choose ARM as platform, Android 7.1 and the flavor of your choice. I strongly recommend "pico" for two reasons:

1. The Moto G has not much internal memory (8 or 16GB) and no SD card and GApps are notoriously known to waste a lot of space

2. It leaves you the most freedom to only install, what you really need; you can later download and still install all the Google products you want from the play store, so you do not need to live with pre-installed Google stuff you have no use for.

The 'microG patch' in this ROM has no negative impact on installing Gapps.

Install the ROM

In the TWRP main menu, choose "Install". A file manager appears to let you navigate to your internal memory (path /sdcard).

Choose the .ZIP file of this ROM and swipe to flash. If you update from a previous version of

this

ROM, you don't need to perform a wipe. If in that case, you had GApps already installed before the update, there is no need to flash them again. They will be automatically restored during the flash process.

If you come from a different ROM (or stock firmware), make sure that you have performed the Wipe steps above. If you want to install GApps, flash them directly after the ROM, do not reboot in between. (Note: If you wish to get rid of previously installed GApps, navigate to TWRP's file manager in the Advanced section of the main menu, go to path /system/addon.d and delete the file 70-gapps.sh, before flashing the ROM update)

When finished flashing, return to the main menu, choose "Reboot" and then "System", which will cause your phone to boot into Lineage OS 14.1 - be patient, the first boot after flashing a new ROM takes quite long!

Current / reported issues

WiFi hotspot needs to be toggled on/off/on after a reboot to work

WiFi hotspot enabled longer than 2 hours may cause a sudden reboot

Sometimes (root cause not clear), WiFi switches itself off after a couple of hours (fix by enabling/disabling flight mode)

It has been reported by some forum participants, that after messing with some Android-10 test builds for this device, WiFi wouldn't work any more: In this case, the solution can be found here:

https://xdaforums.com/t/fix-cant-turn-wifi-on-you-are-missing-this-file.3007540/

or here (scroll down and use the manual unpack option):

https://xdaforums.com/t/tutorial-fix-wi-fi-cant-on-problem-without-pc.3389538/

Why still on Android 7.1 (Nougat) and not a higher Android version (like 10, 11 or 12)?

The falcon device is low on memory (RAM and storage flash memory), each newer Android release increases the resource demand and thus decreases performance and available memory - so higher versions won't really make sense for this device.

Further, I haven't seen any ROM for this device on a higher Android version than Nougat with enforcing SELinux (yes, coming there indeed is "slave work"; none of the devs, including me for above stated reasons, is willing to invest this time...) - which is a No-Go for any daily-driver use (in that case, your device simply is fully open many vulnerabilities and applying monthly ASB patches on a permissive SELinux is close to a complete waste of time).

Credits

Android Open Source project (AOSP)

LineageOS project

microG project

Substratum team

SkewedZeppelin (Kernel patches)

XDA:DevDB Information

[ROM][LineageOS 14.1][substratum] for Moto G [falcon], ROM for the Moto G

Contributors

MSe1969

Source Code: https://github.com/lin14-mGoms/local_manifests/tree/cm-14.1-oms

ROM OS Version: 7.x Nougat

ROM Kernel: Linux 3.4.x

Based On: LineageOS 14.1

Version Information

Status: Stable

Current Stable Version: cm-14.1

Stable Release Date: 2024-07-19

Created 2018-06-24

Last Updated 2024-07-19