一.环境准备
1.安装ubuntu系统,或者虚拟机。
2.安装java的sdk
3.安装依赖包 ,命令是:sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl
4.安装调试工具,命令是:sudo apt-get install valgrind
二.源码下载
1.首先下载 repo 工具。命令如下:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
然后把repo文件中的REPO_URL = 'https://gerrit.googlesource.com/git-repo'替换成REPO_URL = 'https://aosp.tuna.tsinghua.edu.cn/git-repo'。
2,mkdir android
cd android
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
repo sync