Giter VIP home page Giter VIP logo

aosp-build-docker's Introduction

AOSP-Build Docker

Based on Ubuntu 22.04

AOSP Codebase

Until 2024-06-07, The latest AOSP version is android-14.

Assume we have downloaded the AOSP codebase to the /aosp_src directory with repo on the host machine.

Refer to Download the Android source or AOSP Mirror Help for further help.

Build Docker Image

The official AOSP build env is maintained on X86_64 platform only, so we specify the --platform option regardless of the host platform.

Now we build the docker image named aosp-build.

docker build --platform linux/amd64 -t aosp-build:latest -f Dockerfile .

NOTE, until 2024.6, there may be a rosetta bug on MacOS with Apple Chip M2 and M3, so we may have to disable rosetta in Docker DesktopSettingsGeneral.

Run A Build Docker Container

Run a container named aosp of the aosp-build image with -h, -v and -w options.

docker run --platform linux/amd64 --rm -d --name -m 16g aosp -h aosp -v /aosp_src:/aosp -w /aosp aosp-build

Note, the default memory limit of Docker Desktop is 8GB, but more than 16GB is required to build the AOSP, enlarge the limit before run the container:

Docker DesktopSettingsResourcesMemory limit

Open A Bash To The Build Docker Container

docker exec -it aosp /bin/bash

Helper

./helper build
./helper run ../android-14.0.0_r1
./helper bash
./helper stop
./helper clean

aosp-build-docker's People

Contributors

huipengzhao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.