1安装依赖文件
sudo apt-get install openjdk-7-jdk gedit git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev gcc-multilib maven tmux screen w3m ncftp ccache pngquant maven
2 安装repo
mkdir ~/bin
git clone http://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/
cp git-repo/repo ~/bin/
赋予权限
chmod a+x ~/bin/repo
3 设置环境
echo "export PATH=~/bin:$PATH" >> ~/.bashrc
4 同步源码
mkdir cm13 cd cm13 repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
repo sync --no-clone-bundle -c -j4
5 编译
. build/envsetup.sh prebuilts/misc/linux-x86/ccache/ccache -M 50G brunch xxx or lunch make -j8 otapackage
时间: 2024-11-05 20:36:49