启动代理

安装依赖
bash
sudo apt update
sudo apt install -y bc bison build-essential ccache curl flex g++-multilib \
gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev \
lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev \
libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush \
rsync schedtool squashfs-tools xsltproc zip zlib1g-dev libncurses5-dev \
python3 python-is-python3 unzip openjdk-17-jdk
安装lfs
bash
sudo apt install git-lfs
git lfs install
创建编译目录
bash
mkdir ~/aosp15
cd ~/aosp15
下载repo
bash
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod +x ~/bin/repo
初始化分支
bash
repo init -u https://android.googlesource.com/platform/manifest -b android-15.0.0_r1
同步源码

同步成功

设置环境变量
bash
source build/envsetup.sh
选择编译目录
bash
lunch aosp_x86_64-userdebug
开始编译
bash
make -j$(nproc)

