Giter Site home page Giter Site logo

islem19 / aosp-build-on-docker Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 10.0 17 KB

A Minimal AOSP Nougat 7.1 build environment as Docker image.

License: GNU General Public License v3.0

Dockerfile 94.02% Makefile 3.45% Shell 2.53%
aosp-build android-nougat docker

aosp-build-on-docker's Introduction

AOSP 7.1 build environment on Docker

A Minimal AOSP Nougat 7.1 build environment as Docker image.

Things to remember

This is an image which provides a build environment (includes any tools required for building AOSP), you should use it as a shell, then do anything you wanted.

Prerequisites

Install Docker in your machine:

$ sudo apt-get update
$ sudo apt install docker.io
$ sudo systemctl start docker
$ sudo systemctl enable docker

if you want to run docker as non-root user then you need to add it to the docker group. 1- Create the docker group.

$ sudo groupadd docker

2- Add your user to the docker group.

$ sudo usermod -aG docker $USER

3- Logout and login again and run (that doesn't work you may need to reboot your machine first)

Build your docker image

first, clone this project in your "WORKING_DIRECTORY"

$ git clone https://github.com/islem19/AOSP-Build-on-Docker.git
$ cd WORKING_DIRECTORY
$ make

Usage

Use it as a independent shell, and mount a local path to save source and result:

$ docker run --rm -it -v /path/to/source:/aosp sabdelkader/aosp
##### or you can run the script
$ bash run.sh

You can map the location of AOSP source code in your host machine with the path in your container. if you haven't got your AOSP yet, you can get it using repo command:

Note: Once you entered the shell, you can start building from Downloading the Source: Initializing a Repo client, every tools required is ready.

$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
####### checkout a branch for AOSP 7.1: android-7.1.2_r39
$ repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.2_r39
$ repo sync

Building AOSP ROM

once you run your docker container, you can build AOSP with usual commands:

$ cpus=$(grep ^processor /proc/cpuinfo | wc -l)
#### set the cache size to 10G
$ prebuilts/misc/linux-x86/ccache/ccache -M 10G
#### build you ARM device
$ source build/envsetup.sh
$ lunch aosp_arm-eng
$ make -j $cpus

License

This application is released under GNU GPLv3 (see LICENSE). Some of the used libraries are released under different licenses.

aosp-build-on-docker's People

Contributors

islem19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.