This repository contains a Dockerfile to set up an Ubuntu-based environment for building Android 15. The image comes pre-installed with all necessary packages and tools required for the Android build process.
- Ensure you have Docker installed on your host system.
- A directory named
androidon your host machine that will be used to sync the Android source code.
-
Clone this repository:
git clone https://github.com/ShujathMohd/aosp-android-builder.git cd aosp-android-builder -
Build the Docker image:
docker build -t android-build-env .
To start a container with the android folder from your host mapped to /android in the container:
Create a folder in the root directory
mkdir ~/androiddocker run -it --rm -v ~/android:/android android-build-envOnce inside the container, follow these steps:
-
Initialize the repo:
repo init -u https://android.googlesource.com/platform/manifest -b <android branch/tag>
-
Clone the local manifests:
cd .repo git clone https://github.com/ShujathMohd/local_manifests.git -
Sync the repository:
repo sync -c --force-sync --no-tags --no-clone-bundle --optimized-fetch --prune
-
Set up the environment and choose a build target:
source build/envsetup.sh lunch <device_name>-userdebug
-
Start the build:
make -j$(nproc)