1. Download Environment
Virtualbox4.1.2 ubuntu11.10 (32-bit)
2. Install git and curl
Command: $ sudo apt-Get install Git-core curl
(Curl is a tool used to transmit data with the server. Git is a distributed version control system and is responsible for cloning the source code of the remote version library .)
3. Install Repo
$ Mkdir Bin
// In ubuntu system directly download the repo script copy to the bin folder, Repo: http://115.com/file/d15goo2#repo
$ Chmod A + x ~ /Bin/Repo
$ Alias repo = "~ /Bin/repo"
4. install Java 6
$ Sudo add-Apt-repository "debhttp: // archive.canonical.com/lucid
Partner"
$ Sudo add-Apt-repository "Deb-srchttp: // archive.canonical.com/#tulucid
Partner"
// This sentence may prompt an error and will not be affected. proceed directly to the next step.
(Note: If you are prompted that the sun-java6-jdk does not have a candidate for installation, run the following code $ sudo add-Apt-repository "debhttp: // us.archive.ubuntu.com/ubuntu/hard
Multiverse ")
$ Sudo apt-Get update
$ Sudo apt-Get installsun-java6-jdk
(Note: If an interface is being configured for the sun-java6-jre, press the tab key, select OK, and then agree to the DLJ protocol to select YES ")
$ Sudo apt-Get installgit-core GnuPG flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-devsquashfs-Tools Build-essential zip curl libncurses5-dev zlib1g-devsun-java6-jdk pngcrush schedtool
5. Download cyanogenmod source code
// Create a cyanogenmod folder to store the source code
$ Mkdir cyanogenmod
// Obtain the source code
$ Repo init-u git: // github.com/cyanogenmod/android.git-B cm-10.1
// Synchronize the server code to the local device.-j16 indicates that multiple network connections are enabled, which improves the download speed.
$ Repo sync-j16
The source code download process is very long.