[Moto G 4G Android Development] sdembiske:
For those of you wishing to update to the APRIL '22 Security Patches (+MARCH), I've uploaded one of my unofficial builds that is based off the latest build files available with the most recent posted security patches added (I know there are a number of members who for one reason or another are unable to or unwilling to build it themselves).

*

Weird Magisk bug is occurring

(reported by other members on different roms and phones as well):

After flashing the patched boot image, on reboot if you open the Magisk app it will indicate it has to do more to install on the device. If you tell it to go ahead the issue will just keep recurring. It appears something is being retained in the Magisk app cache that isn't properly removed on the reboot after flashing the patched image.

Best way to fix

:

After installing (regular clean flash) the latest LineageOS rom and Open Gapps while in TWRP, reboot to recovery and install the Magisk app as a zip (simply remove the .apk extension and add the .zip extension, i.e., for example, Magisk-v24.3.apk changes to Magisk-v24.3.zip). On system reboot, do not open the Magisk app, reboot the system again and then the app can be opened without the issue recurring.

Raising the Dead (Moto G LTE Peregrine):

As I indicated in my last post, I totally bricked the phone using Parted to try and increase the System partition size given the issues with installing the latest Open Gapps Pico versions. Imagine, absolutely no response when trying to turn the phone on, no response from the PC when plugged in, no charging etc., etc., just a totally dead phone for all intents and purposes. The issue wasn't so much using Parted, it's just that it is very unforgiving once a command is typed in - i.e., no way to correct what you've typed in beforehand.

After taking the time to do a little research, I discovered it is almost impossible to totally hardbrick the Qualcomm Snapdragon processor. One has to download the Qualcomm USB driver, get the phone recognized in Windows Device Manager, find the appropriate blank flash file in order to unbrick the phone and get it into fastboot mode. Once back in fastboot mode an original stock rom has to be extracted and the individual items in the extracted folder fastboot flashed to the phone. For my issue, the gpt.bin file seemed to be the primary restore file as it contained the partition table. A lot of the files in the extracted stock rom returned a pre-flash validation error when being fastboot flashed which meant in my case the correct file was already in the phone (took me a while to figure that one out). Any way, to make a long story shorter, I was able to eventually reboot the phone and restore everything, raising the phone from the dead.

Note

: Recent updates are large and may require downgrading to Open Gapps PICO in order to fully install to the system partition.

Note:

The recent security updates have been large and together with the increased Open Gapps file sizes may require a smaller version of Open Gapps than you've been installing, the removal of some apps or, as a last resort, resizing the system partition. Pico is the recommended version of Open Gapps, currently.

Note

: Once again some members are experiencing issues with installing the latest versions of Open Gapps Pico. I have tested this one dated June 10 '21 and it installed with no issues for me. So give it a try if you run into an install problem:

Link

: open_gapps-arm-9.0-pico-20210610.zip

https://mega.nz/file/4XpE0KzJ#p8wCqZTc50mCuKUkUzypeNrTrXQvnjiVwoz0WqwiLDs

Note

:

Requires

Full Clean Flash

when installing rom for 1st time I.E.,

coming from 14.1

(official or unofficial), etc. - in TWRP wipe Cache, Dalvik cache, System and importantly

format

Data > Yes before flashing the rom and appropriate Open Gapps (pico) - reboot, then in TWRP install preferred root (latest Magisk version recommended). I do not recommend the Xposed framework that's available for pie as it is closed-source.

Very Important

: Do a nandroid backup first, including your data - copy any data/media files (e.g., photos, videos etc.), on your SD card over to your PC.

Note

: Encryption is not working fully - If you need it, check out the 14.1 rom -

Note

: it appears that 15.1 and lower versions are no longer receiving Google security and OS updates.

If you're coming from one of the unofficial updates I uploaded previously, I recommend you do a regular clean flash (wipe Cache, Dalvik cache & System), re-install Open Gapps, reboot to recovery & install preferred root (latest Magisk recommended).

You will not lose any data

. I do not recommend the Xposed framework that's available for pie as it is closed-source, i.e., you really don't know what you're installing).

Download Link for lineage-16.0-2022-04-16-UNOFFICIAL-peregrine.zip

File on MEGA

mega.nz

I give full credit to the author of this thread @Allstargaurav and in particular to @sevenrock and @RenanQueiroz for their excellent work in getting this rom to this point. Those of you who have not been building this rom for themselves but using the last posted upload by the author of this thread will notice some substantial improvements and should be relatively pleased with how it performs now. After flashing let the rom settle in for a number of hours to start to see the improvements and reap the full benefit.

I do, however, recommend you learn to build it yourselves: refer to post # 230 for the full build instructions.