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

Note

: the June '21 security patches were the last to be merged in officially, this update is missing two patches from July '21 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 some 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).

IMPORTANT

: I had quite a bit of an issue figuring out why this latest upload with the latest posted security patches would stall to just under halfway and stay there when installing it in TWRP. In the end, it turned out to be Magisk was still installed even after wiping 'System', 'Cache' & 'Dalvik cache' which I believe created a signature verification issue because Magisk was still installed. I couldn't uninstall Magisk through the app itself as it indicated that 'Data' couldn't be unmounted.

The solution

was to rename the latest Magisk apk to uninstall.zip (as per the Magisk info on it's github site) and flash it in recovery, then wipe Cache, Dalvik cache and System, reboot to recovery and install the newly patched rom & Open GApps, reboot to recovery and flash the latest Magisk .apk renamed to .zip before rebooting the system. I don't know if this will be a one off situation at this stage or not.

*

Weird Magisk bug has been 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.

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 (Magisk) & 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-202207-11 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 instruction