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

MSe1969

Senior Member
Dec 16, 2016
1,573
2,818
133
Frankfurt Rhine-Main metropolitan region
Probably you are right. (y) I am currently on A10, Superior OS.
Issues: WiFi does not connect & No space for Gapps.

I wish to come to 'LineageOS 14.1' like you have suggested.

Here, I have a question: Should I just flash LOS? I mean, some new devices on A11 have this 'anti roll back' policy.
Is it safe for me to flash LOS 14.1 over A10 Superior OS on falcon?

Any help & response appreciated. Thanks...
As you would have to anyhow perform a clean flash (i.e. wipe /data and wipe /system), I wouldn't see any reason against trying. And if WiFi makes trouble, scroll back to apply the linked solution.
 
  • Like
Reactions: XDAnewone

XDAnewone

Member
Aug 21, 2020
21
4
3
As you would have to anyhow perform a clean flash (i.e. wipe /data and wipe /system), I wouldn't see any reason against trying. And if WiFi makes trouble, scroll back to apply the linked solution.
Thank you. I will try.
My question was more like 'Is there a bricking possibility IF I downgrade from A10 to A07'.
From your reply, looks like there isn't.
 

MSe1969

Senior Member
Dec 16, 2016
1,573
2,818
133
Frankfurt Rhine-Main metropolitan region
Thank you. I will try.
My question was more like 'Is there a bricking possibility IF I downgrade from A10 to A07'.
From your reply, looks like there isn't.
I don't think so, but it's important to really do a clean flash (wipe data, system, cache, dalvik). Also, in case you had to repartition anything for 10, this must be reverted. If you even encrypted in 10, I would go for formatting /data.
 
  • Like
Reactions: XDAnewone

XDAnewone

Member
Aug 21, 2020
21
4
3
I don't think so, but it's important to really do a clean flash (wipe data, system, cache, dalvik). Also, in case you had to repartition anything for 10, this must be reverted. If you even encrypted in 10, I would go for formatting /data.
Done, thanks. From A10 to your A7.1.2.
Everything went smooth. First downgraded from twrp 3.4.0.0 to your 3.2.1
First clean flash (data, system, cache, dalvik). Then flash ROM (B variant). Clear cache & dalvik. Reboot to system, Took (hardly) few minutes to boot to system.

My old issues;
- Wi-fi connects. No problem
- Many GB free in device, so all good.
- And no need of Gapps, right?

Let me see if I face wifi auto-dis-connect issue mentioned in OP in future.
Also, lets see battery life...

Thanks. (y)
 
  • Like
Reactions: MSe1969

qualmelon

New member
Feb 14, 2021
1
1
3
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-02-05, AOSP tag 7.2.1_r36
  • 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)
  • Android System Webview M87
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
  • Bromite System Webview M88
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 manifest: https://github.com/lin14-mGoms/local_manifests/tree/cm-14.1-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:
Code:
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:

Why still on Android 7.1 (Nougat) and not a higher Android version (like 10 or 11)?
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


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: 2021-02-07

Created 2018-06-24
Last Updated 2021-02-07
This worked really well! Thank you for maintaining the package.
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.
After wiping the device I couldn't drag the .zip to my sd card but I was able to push it from the linux terminal with:
adb push lineage2021unofficial.zip /sdcard while booted into the TWRP recovery partition.
where lineage2021unofficial.zip is the unofficial rom which I renamed for convenience. Sharing this here in case others encounter the same issue. Thank you once again for all your hard work.
 
  • Like
Reactions: MSe1969

Apollon.Theos

Member
Apr 16, 2009
33
4
38
I think TWRP does not mount /persist, so you would have to connect via adb in root mode, when your LineageOS is up & running and then copy the file.
TWRP not mount, you is right. I use ADB ROOT before dance with file. ADB SHELL LS / not show any "persist" folder with Lineage 14.1. What I do wrong?
 
Last edited:

Apollon.Theos

Member
Apr 16, 2009
33
4
38
My way to heal "not working Wi-Fi"
1. try to return to stock firmware (I use Android 5.1) , maybe enough only "fastboot flash partition gpt.bin"
2. reboot (maybe not successful)
3. reboot to fastboot (maybe not with first attempt)
4. connect to computer and verify with "fastboot devices"
5. fastboot boot twrp-3.5.0_9-0-falcon.img ( you can use that like)
6. wipe cache, dalvik, system, data ("flash partition" destroy all it early)
7. copy to phone your like version lineage-14.1 ROM ( + logo, at pleasure)
8. flash all your .zip
9. reboot
Wi-Fi now WORK!

all links for ROM, instructions - see messages MSe1969
 
  • Like
Reactions: MSe1969

Apollon.Theos

Member
Apr 16, 2009
33
4
38
Now I try to use ROM with Aurora services. I'm planing use my Moto G as "work phone" with Microsoft Teams and Microsoft Authenificator. May be "Aurora" have not fresh version of program.
My Xiaomi Redmi 3S live only half day, try Moto G :)
 

MSe1969

Senior Member
Dec 16, 2016
1,573
2,818
133
Frankfurt Rhine-Main metropolitan region
Now I try to use ROM with Aurora services. I'm planing use my Moto G as "work phone" with Microsoft Teams and Microsoft Authenificator. May be "Aurora" have not fresh version of program.
My Xiaomi Redmi 3S live only half day, try Moto G :)
Aurora is not an own app store, it accesses Google play store directly. So it offers you the proper apps.
However, there could be two issues:
a. Many apps are offered based on the device, and some app developers put restrictions into the play store meta data, based on device, Android version etc. - if you don't find your app or a too old version would be offered, try spoofing your device.
b. In case you use microG: It is a lean and great spy-free alternative to the genuine Google play services, but it does not cover 100% of its functionality. Some apps (e.g. many games, apps developed by Google itself, ...) very deeply integrate with the play services, and those apps could then have difficulties.
 

Apollon.Theos

Member
Apr 16, 2009
33
4
38
Number format is different from temperature unit of measure. I am not sure, what you are referring to.
Regional setting include number format and units of measure. If I set primary language English and set regional settings for Russia (for me) - I receive needed result, short messages with km, mm Hg, m/s in programs.
 

Apollon.Theos

Member
Apr 16, 2009
33
4
38
Today, all day, cannot update "microG Service Core", update exist but not start update after I touch "update all"
Used ROM (LineageOS version):
14.1-20210206-UNOFFICIAL-mG-oms-falcon
 

Apollon.Theos

Member
Apr 16, 2009
33
4
38
Aurora is not an own app store, it accesses Google play store directly. So it offers you the proper apps.
However, there could be two issues:
a. Many apps are offered based on the device, and some app developers put restrictions into the play store meta data, based on device, Android version etc. - if you don't find your app or a too old version would be offered, try spoofing your device.
b. In case you use microG: It is a lean and great spy-free alternative to the genuine Google play services, but it does not cover 100% of its functionality. Some apps (e.g. many games, apps developed by Google itself, ...) very deeply integrate with the play services, and those apps could then have difficulties.
I understand this, and have no complaints to you, as an author of this ROM
don't worry, be happy (c) :)
 

MSe1969

Senior Member
Dec 16, 2016
1,573
2,818
133
Frankfurt Rhine-Main metropolitan region
Today, all day, cannot update "microG Service Core", update exist but not start update after I touch "update all"
Used ROM (LineageOS version):
14.1-20210206-UNOFFICIAL-mG-oms-falcon
microG is compiled from source with own signature, that is why you can't update it.
I usually compile a new version, with all commits available at Github
 
  • Like
Reactions: ChrisRM