Build Android – Android15

  1. Download the Android source

Download the Android source https://source.android.com/docs/setup/download

repo https://gerrit.googlesource.com/git-repo/+/HEAD/README.md

Source code tags and builds https://source.android.com/docs/setup/reference/build-numbers#source-code-tags-and-builds

1.1 Initialize the Repo client

1.1.1 Install the repo

$ mkdir -p ~/.bin  
$ PATH="${HOME}/.bin:${PATH}"  
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo  
$ chmod a+rx ~/.bin/repo

1.1.2 Create and navigate to a working directory

$ mkdir android-15.0.0_r22
$ cd android-15.0.0_r22

1.1.3 Initialize your working directory for source control using the repo

repo init --partial-clone -b android-15.0.0_r22 -u https://android.googlesource.com/platform/manifest

1.2 Download the Android source

Run the following command to download the Android source tree to your working directory

git config --global user.email "visualbyte.org@gmail.com"
git config --global user.name "VisualByteOrg"

repo sync -c -j8

2. Build Android

2.1 Install required packages

https://source.android.com/docs/setup/start/requirements#install-packages

sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev libc6-dev-i386 x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig

Build Android

https://source.android.com/docs/setup/build/building

2.2 Set up your build environment

source build/envsetup.sh

2.3 Choose a target

lunch aosp_cf_x86_64_pc-aosp_current-userdebug

2.4 Build the code

m