1安装软件
sudo apt-get install 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
2 安装repo
mkdir ~/bin
git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/
cp git-repo/repo ~/bin/
3 设置环境
gedit ~/.bashrcsource ~/.bashrc
alias repo="~/bin/repo" export USE_CCACHE=1 export CCACHE_DIR=/media/changyuet/cache/ccache
4 同步源码
cd /media/changyuet/android/ 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 50Gbrunch xxxorlunchmake -j8 otapackage
时间: 2024-11-05 18:31:12