请先准备好编译环境,下载/更新必要的package后方可继续 要了解如何初始化编译环境,请前往http://source.android.com/source/initializing.html
You will need to set up some directories in your build environment. 你需要在你的编译环境中先设置某些目录
To create them run:
请打开终端并运行:
mkdir -p ~/bin
mkdir -p ~/carbon
Enter the following to download make executable the "repo" binary:
接着输入以下命令来下载make可执行程序"repo"二进制文件
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
You may need to reboot for these changes to take effect. Now enter the following to initialize the repository: 你可能需要重启才能进行下一步操作 现在输入下面的字符来初始化仓库
cd ~/carbon
repo init -u https://github.com/iCarbon/android.git -b kk && repo sync -f
由于GFW对Google source的封锁,所以加入-f命令来防止同步遇到错误时停止
Initialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation. 执行envsetup.sh初始化环境,注意这里的"."可以用source和sh代替,但为了方便省事,我们采用点号。 . build/envsetup.sh lunch
Enter the number of the build you want to start and press enter 键入你要编译的设备并按下回车
Build Code: 编译开始:
make carbon -j7 = 运行打包器/运行优化
make otapackage -j7 = 不运行打包器/不运行优化