Background
- Ubuntu 14.04 64-bit, hard disk space greater than 100G
- Update the system to the latest version and enter it under terminal
sudo apt-get updatesudo apt-get upgrade
- Install the required packages for compilation
sudo apt-getInstall Bison Build-essentialCurl Flex git gnupg gperf libesd0-devLibncurses5-devLibsdl1. 2-devLibwxgtk2. 8-devLIBXML2 LIBXML2-utilsLzop OPENJDK-7-JDKOpenJDK-7-jrePngcrush Schedtool SQUASHFS-toolsXsltproc Zip zlib1g-devG++-Multilib GCC-multilibLib32ncurses5-devLib32readline-gplv2-devLib32z1-dev
- Establishing the Repo command
mkdir -p ~/bincurl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod a+x ~/bin/repo"export PATH=~/bin:$PATH" >> ~/.bashrc
This step is important, many people fail here, note that there is a need for a ladder.
Synchronous source
- Create a new folder to store the source code, here take ~/android/cm as an example
mkdir -p ~/android/cmcd ~/android/cm
- Initializing the source directory
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
- Download source code
repo sync
If the intermittent network, or error, re-repo sync a bit can continue ~
Note: 获取预编译的部分文件 not required after CM12
Compile ROM
. build/envsetup.shbreakfast bacon
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Compiling cm12.1