[Moto G 4G Android Development] Kayant:
Please search the thread and read the OP before postings to reduce the numbers of unneeded reposting by everyone.

​

CyanogenMod is a free, community built, aftermarket firmware distribution of Android 6.0(MM), which is designed to increase performance and reliability over stock Android for your device.

#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for CyanogenMod is available in the CyanogenMod Github repo. And if you would like to contribute to CyanogenMod, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

Tips and notes:

When choosing a Gapps package ensure it can fit into /system when flashed. Micro gapps is recommend as it fits and provides everything in a base package you will need for gapps support you can install the other google apps from the store as want later on.

Remember nightly builds are experimental they can and will be broken from time to time. Always have a backup at hand.

Storage in Marshmallow is dynamically mounted. That means you will get a prompt at boot to mount as either portable storage or internal storage. Use portable storage to continue using it as like in previous versions of android.

To transfer file to PC when plugged in you will get the charging mode prompt status in the status bar click it to change from charging mode to transfer files.

TWRP cannot read internal formatted sdcards at the moment in order to flash a new nightly try one of these suggestions -

Adb sideloading - http://xdaforums.com/showpost.php?p=64194455&postcount=398

USB OTG - http://xdaforums.com/showpost.php?p=64194957&postcount=401

Using PC file manager to place the file where TWRP can see it - http://xdaforums.com/showpost.php?p=64194157&postcount=397

TWRP 3 now supports internal formatted sdcards - http://xdaforums.com/moto-g/4g-development/unofficial-twrp-3-0-0-0-moto-g-lte-t3310450

If you want to use Supersu see here for non-systemless root. For systemless root use a zip from the SuperSu page othwerwise inbuilt superuser from development settings works fine.

Having issues with Titanium Backup? This should help - https://www.youtube.com/watch?v=DrOuUtlqz9w&ab_channel=AbhinavSrivastava

Want to mount system as read write for apps like Adaway use this(For builds before 29 Nov 2015)

Builds 29Nov 2015+ from a terminal app use

su
mount -o rw,remount /system

then after changes use

mount -o ro,remount /system

to mount it back as read-only or reboot.

what doesn't work:

-You tell me as am not sure atm [emoji14]

Downloads:

Older Unofficial builds

Official builds nightly builds

Install instructions:

IMPORTANT! When coming from older builds to CM13 24 Nov+ builds if you have FCs with phone

Contrary to popular belief(me included) wiping between versions is not needed - https://plus.google.com/u/0/+DanPasanen/posts/GKnirTFjojg

Coming from an official CM12.1 rom

Reboot to recovery

Install Rom

Optional Gapps, Kernel, etc

Reboot

Make sure to install Gapps before booting are you will have FCs with Setup wizard.

Coming from a different rom or stock

Wipe data and cache

Flash the CM13zip

Install opengapps or any other perffered gapps if you want

Reboot

Profit

Changelog - http://www.cmxlog.com/13/peregrine/

Source:

base: https://github.com/CyanogenMod

kernel: https://github.com/CyanogenMod/android_kernel_motorola_msm8226/tree/cm-13.0

Device: https://github.com/CyanogenMod/android_device_motorola_msm8226-common/tree/cm-13.0, https://github.com/CyanogenMod/android_device_motorola_peregrine/tree/cm-13.0

Vendor: https://github.com/TheMuppets/proprietary_vendor_motorola/tree/cm-13.0

Rest of the stuff is all unmerged stuff from gerrit

Credits:- (not in a order)

AOSParadox team [MENTION=4792450]h2o64[/MENTION]

[MENTION=5778309]luca020400[/MENTION] [MENTION=5075128]LuK1337[/MENTION]

[MENTION=5272996]srisurya95[/MENTION] for helping me spot my error with compiling.

CM Team

Google

Motorola

And any one else that I forgot to mention [emoji14]