Create a Docker based environment for Android Open Source Project (AOSP) based building
This Dockerfile will create a docker container which is based on Trusted Docker Ubuntu 14.04 build. It will install the "repo" utility and any other build dependencies which are required to compile your flavor of Android.
NOTE: Remember that Android is a huge project. It will consume a large amount of disk space (~80 GB) and it can easily take hours to build.
- You will need to install Docker to proceed!
- If an image does not exist,
docker build
is executed first
- Clone the repo
git clone https://github.com/ikke-t/docker-android-builder
cd docker-android-builder
git checkout remotes/origin/zombi-lp5.1
- Update the build variables located in "config/android-build-vars.sh"
- Optional Update "config/build-android.sh" with the commands needed to build Android. The steps for building Android vary between devices and distributions. If you are new to this, you probably want to run the commands manually before using the automated build file
- Start up Docker
./run.sh
ADDITIONAL NOTES:
-
The container uses a text-based window manager and terminal multiplexer called Byobu to run the shell.
-
Once in the container, begin the build process your desired Android distribution. ONLY If you have updated the build-android script, simply run:
build-android
- Test more builds.
- Add local user permission mapping. Dependent on Docker update
- Add basic documentation for different OS's and helpful tools like Android-Kitchen
Q: Do I need Oracle Java?
A: In most cases, no. However, there have been instances where functionality that only exist in Oracle Java has been committed to AOSP projects (Example).
Q: Using adb devices, on the host system I can see my USB connected device. Why is it not listed through Docker?
A: The USB port needs to be exposed to Docker. See this Stack Overflow post