AOSP14 — Download & build
2 min readJan 1, 2024
Greetings reader,
Recently i downloaded aosp14, sync, build
In between i faced some error. So want to share all steps with proper procedure.
My system specification
1 TB SSD (min: 512 SSD), 32 GB RAM (min: 16 GB), Ubuntu 20.04
Step 1
Install all the required packages
sudo apt-get install openjdk-8-jdk android-tools-adb bc bison build-essential curl flex g++-multilib gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev git-core python3.8 libncurses5
Step 2
Download & give path for git repo
sudo apt-get update
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Step 3
Initialise AOSP-git repo
mkdir aosp14
cd aosp14
repo init -u https://android.googlesource.com/platform/manifest -b android-14.0.0_r1
repo sync -j16
Step 4
Increase swap memory (for AOSP14 only)
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=8G count=16
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
sudo swapon --show
Step 5
Build AOSP
source build/envsetup.sh
lunch sdk_car_x86_64-userdebug
make -j16
Error & Solution
Error 1 : /usr/bin/env: ‘python’: No such file or directory
Solution
sudo ln -s /usr/bin/python3 /usr/bin/python
Error 2: Git *** Please tell me who you are.
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Thanks