# 安装所需的包
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev default-jdk
sudo apt-get install squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
mkdir -p ~/bin
mkdir -p ~/Source/Ics/
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
sudo chmod a+x ~/bin/repo
cd ~/Source/Ics/
~/bin/repo init -u git://github.com/CyanogenMod/android.git -b ics
#以下用于解决同步过程出现无法断点续传,或是git太繁忙出现同步错误
mkdir ~/.ssh
cd ~/.ssh
ssh-keygen -t rsa -C "linkscue@gmail.com"
ssh -T git@github.com yes
cat ~/.ssh/id_rsa.pub
#登录https://gitorious.org,注册账号并登录,点击Manage SSH Keys, 点击Add SSH Key
cd ~/Source/Ics
~/bin/repo sync -j16
# 把CM9源代码导入Eclipse
gedit ~/Source/Ics/development/ide/eclipse/README.importing-to-eclipse.txt
#照里边的提示步骤操作
cp ~/Source/Ics/development/ide/eclipse/.classpath ~/Source/Ics/
# 最终在Eclipse新建一个“Java Project”,使用已存在目录,直指~/Source/Ics/即可!