docker-android
Create a Docker based environment to build Android ROMs.
This Dockerfile will create a docker container which is based on Debian Stretch. It will install the "repo" utility and any other build dependencies which are required to compile most Android ROMs. Some ROM distributions may have additional dependencies that need to be fulfilled.
The main working directory is a shared folder on the host system, so the Docker container can be removed at any time.
NOTE: Remember that Android ROMs are huge projects. It will consume a large amount of disk space (~80 GB) and it can easily take hours to build.
How to run/build
NOTES:
- You will need to install Docker to proceed!
- If an image does not exist,
docker buildis executed first
git clone https://github.com/alebcay/docker-android.git
cd docker-android
./run.sh
The run.sh script accepts the following switches:
- -u|--enable-usb - runs the container in privileged mode (this way you can use adb right from the container)
- -r|--rebuild - force rebuild the image from scratch
- -ws|--with-su - Sets the WITH_SU environment variable to true (your builds will include the su binary)
The container uses "tmux" to run the shell. This means that you will be able to open additional shells using tmux shortcuts.
Credits
Based on Michael Stucki's docker-lineageos. This project builds off of docker-lineageos in the following ways:
- Configures
backportsandsidrepositories - Upgrades
gitto>= 2.18and configures it to take advantage of Git protocol version 2 - Installs
libncursesw6, needed by some newer Clang-based toolchains - Uses
tmuxinstead ofscreen - Configures locales correctly to display Unicode characters so that custom ROM build scripts display properly

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
