Sign inSign up

ronnyjiang/android

By ronnyjiang

Updated about 5 years ago

android source code build environment

Image
1

654

ronnyjiang/android repository overview

To install Repo:

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

eg: android 2.3.5:

download sourcecode

$ 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

pull docker image , run container and build source code

[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       

run emulator, 启动模拟器

$ cd ~/android-2.3.1_r1
$ source build/envsetup.sh
$  lunch generic-eng
$ emulator

启动模拟器

eg: android 6.0:

download sourcecode

$ 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

pull docker image, run container and build source code

[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       

run emulator, 启动模拟器

$ cd ~/android-6.0.1_r1
$ source build/envsetup.sh
$ lunch aosp_arm-eng
$ emulator

Tag summary

Content type

Image

Digest

Size

702.6 MB

Last updated

about 5 years ago

docker pull ronnyjiang/android:v4.0_1