Ubuntu 14.04 or + required.
[B]Official CM 13 support.
1: Setting up Environment.
1.1 Build Essentials
sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \ lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \ libgl1-mesa-dev libxml2-utils xsltproc unzip
sudo apt-get update sudo apt-get install openjdk-8-jdk
2. Download Repo.
mkdir WORKING-DIR && cd WORKING-DIR repo init -u https://github.com/lj50036/platform_manifest_twrp_cm -b twrp-13.0 repo sync -j# --force-sync (replace '#' with Number of Cores + '1' )
you can find your device tree @ github.com/CyanogenMod
Mine: Sprout! Android One so https://github.com/CyanogenMod/andro...t/tree/cm-13.0
mkdir -p device/<your-brand>/<codename>
mkdir -p device/google/sprout4 git clone https://github.com/CyanogenMod/android_device_google_sprout.git -b cm-13.0 device/google/sprout4
you will find it on github.com/CyanogenMod
you can clone it anywhere.
4.Merging Common and Device Tree
open cm.dependencies in device tree. empty all the text in it!.
go to common tree if MTK Device: common/rootdir/
if MSM Device: common/rootdir/etc/
copy and if-needed replace all rootdir files from common to device tree.
Open BoardConfig.mk in Device Tree
Open BoardConfigCommon.mk in Common Tree
Add All the missing text in device tree from common tree.
if vendorsetup.sh file is not there in device tree then make a file named vendorsetup.sh
open vendorsetup.sh, add this lines in same format with your device requirements.
5. Deleting Unwanted lines which will cause errors while compiling!
open cm.mk, device.mk, <your-codename>.mk, if-exist full_<your-codename>.mk any other .mk files.
delete all the lines which are calling vendor, kernel and any other bull crap!.
6. Adding Prebuilt-kernel Instead of Source
Download Latest cm-nightly-<your-codename>.zip
extract boot.img from zip
unpack the boot.img using carlivkitchen
open extracted dir, copy <recovery-file-name>-kernel to devicetree/rootdir/
rename <recovery-file-name>-kernel to kernel
open BoardConfig.mk in device tree
go to #kernel
you will find TARGET_KERNEL_SOURCE := <make this line empty>
you will find TARGET_KERNEL_CONFIG := <make this line empty>
add line TARGET_PREBUILT_KERNEL := device/<your-brand>/<your-codename>/rootdir/kernel
save and exit
you can run any command:
Once lunching is successfull.
make -j# recoveryimage (replace # with number of cores + 1)