[Moto G 4G Android Development] sdembiske:
For those of you wishing to update to the currently posted APRIL '22 Security Patches (+MARCH). (

Note

: the June security patches were the last to be merged in officially, this update is missing two patches from July and has not been officially merged in - the security patch level has to therefore legitimately show June '21 still for now). Relevant security patches for this rom version are getting fewer and fewer. Members should therefore give serious consideration to moving up to LineageOS 16.0 for somewhat better security.

I've uploaded one of my unofficial builds here that is based off the original official build files with the latest available relevant security patches added (refer to post # 1350 for further elucidation).

*

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

: Requires

Full Clean Flash

when installing rom for 1st time from an official build

or

encrypting for first time - in TWRP wipe Cache, Dalvik cache, System and importantly

format

Data > Yes before flashing the appropriate Open Gapps - reboot, encrypt if desired, then in TWRP install preferred root (latest Magisk version recommended) and Xposed, if desired as well.

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.

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, preferred root & Xposed (if required).

Re:

Encryption issues

- use twrp-3.1.0-0-peregrine

or

twrp-3.1.1-0-peregrine. I've tested them and they work.

Note

: Refer to post # 1274 by @pigeons9 (and remember to hit the Thanks button at the bottom of his post if it helps) for a possible solution to solving encryption issues with newer TWRP versions.

Download Link for lineage-14.1-202204-16 UNOFFICIAL-peregrine.zip:

File on MEGA

mega.nz

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