android source code build environment
654
Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the Repo tool and ensure that it is executable:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir ~/android-2.3.1_r1 && cd 2.3.1_r1
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.1_r1
[commands]:
pull image:
$ docker pull ronnyjiang/android:v2.3_1
run container:
$ docker run -it -v ~/android-2.3.1_r1:/home/builder -w /home/builder ronnyjiang/android:v2.3_1 /bin/bash
then start compile :
$ . build/envsetup.sh #或者 source build/envsetup.sh
$ lunch generic-eng #也可以执行lunch,然后自己选
$ make -j8 2>&1 | tee build1.log #这样若有编译出错可以查看 build1.log定位出错原因
编译完成后退出容器(exit container)
$ exit
$ cd ~/android-2.3.1_r1
$ source build/envsetup.sh
$ lunch generic-eng
$ emulator

$ mkdir ~/android-6.0.1_r1 && cd android-6.0.1_r1
$ repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r1
[commands]:
pull image:
$ docker pull ronnyjiang/android:v6.0_1
run container:
$ docker run -it -v ~/android-6.0.1_r1:/home/builder -w /home/builder ronnyjiang/android:v6.0_1 /bin/bash
then start compile :
$ . build/envsetup.sh #或者 source build/envsetup.sh
$ lunch aosp_arm-eng #也可以执行lunch,然后自己选
$ make -j8 2>&1 | tee build1.log #这样若有编译出错可以查看 build1.log定位出错原因
编译完成后退出容器(exit container)
$ exit
$ cd ~/android-6.0.1_r1
$ source build/envsetup.sh
$ lunch aosp_arm-eng
$ emulator

Content type
Image
Digest
Size
702.6 MB
Last updated
about 5 years ago
docker pull ronnyjiang/android:v4.0_1