AOSP 安卓源码6.0编译-模拟器运行
编译环境配置
Ubuntu14.04稳定 |
安装openjdk(7/8/9) |
sudo apt-get install openjdk-7-jdk |
添加依赖 |
sudo apt-get install libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev g++-multilib sudo apt-get install -y git flex bison gperf build-essential libncurses5-dev:i386 sudo apt-get install tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 sudo apt-get install dpkg-dev libsdl1.2-dev libesd0-dev sudo apt-get install git-core gnupg flex bison gperf build-essential sudo apt-get install zip curl zlib1g-dev gcc-multilib g++-multilib sudo apt-get install libc6-dev-i386 sudo apt-get install lib32ncurses5-dev x11proto-core-dev libx11-dev sudo apt-get install libgl1-mesa-dev libxml2-utils xsltproc unzip m4 sudo apt-get install lib32z-dev ccache |
|
|
获取源码
Android6.0 |
下载6.0源码包 |
http://pan.baidu.com/s/1o6N86a2 |
解压源码 |
tar -zxvf Android6_r1.tgz |
|
|
编译源码
编译 |
设置编译器高速缓存(可选) |
echo export USE_CCACE=1 >> ~/.bashrc prebuilts/misc/linux-x86/ccache/ccache -M 30G |
编译步骤 |
source build/envsetup.sh lunch aosp_arm64-eng make -j8 // -j参数来设置参与编译的线程数量 |
运行模拟器 |
source build/envsetup.sh lunch(可以选择2) emulator |
|
|
参考: