Lets go straight into topic.
Requirements.
Ubuntu 14.04 or + required.
[B]Official CM 13 support.
1: Setting up Environment.
1.1 Build Essentials
1.2 Settingup Java
3.Cloning
you can find your device tree @ http://ift.tt/WVTsEy
Mine: Sprout! Android One so http://ift.tt/1WXJXxs
mkdir -p device/<your-brand>/<codename>
example:
open cm.dependencies file you will find the additional repository required: for me sprout-common
you will find it on http://ift.tt/WVTsEy
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.
add_lunch_combo cm_<your-codename>-eng
add_lunch_combo cm_<your-codename>-userdebug
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
7.Compiling
cd WORKING-DIR
. build/envsetup.sh
you can run any command:
lunch cm_<your-codename>-eng
(or)
lunch cm_<your-codename>-userdebug
Once lunching is successfull.
make -j# recoveryimage (replace # with number of cores + 1)
8. OUT/target/product/<your-codename>/recovery.img
Requirements.
Ubuntu 14.04 or + required.
[B]Official CM 13 support.
1: Setting up Environment.
1.1 Build Essentials
Code:
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
Code:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
Code:
2. Download Repo.
Code:
mkdir WORKING-DIR && cd WORKING-DIR
repo init -u http://ift.tt/1PcJ80o -b twrp-13.0
repo sync -j# --force-sync (replace '#' with Number of Cores + '1' )
you can find your device tree @ http://ift.tt/WVTsEy
Mine: Sprout! Android One so http://ift.tt/1WXJXxs
mkdir -p device/<your-brand>/<codename>
example:
Code:
mkdir -p device/google/sprout4
git clone http://ift.tt/1O93MDD -b cm-13.0 device/google/sprout4
you will find it on http://ift.tt/WVTsEy
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.
add_lunch_combo cm_<your-codename>-eng
add_lunch_combo cm_<your-codename>-userdebug
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
7.Compiling
cd WORKING-DIR
. build/envsetup.sh
you can run any command:
lunch cm_<your-codename>-eng
(or)
lunch cm_<your-codename>-userdebug
Once lunching is successfull.
make -j# recoveryimage (replace # with number of cores + 1)
8. OUT/target/product/<your-codename>/recovery.img
from xda-developers http://ift.tt/1PcIOyB
via IFTTT
Aucun commentaire:
Enregistrer un commentaire