Post

Build AOSP for Pixel 3 XL

对于AOSP的构建拆分已经比较清晰, 步骤大致分为同步代码,添加对应不同设备的驱动以及内核, 构建对应的target, 之前尝试了构建 AOSP 用来排查一些问题, 但是现在放出的Pixle 3XL适配只有到 Android 12, 最近Chromium的开发想测试一下WebView, 暂时使用 LineageOS21的适配来方便构建

1
2
3
4
mkdir ~/aosp
cd ~/aosp
repo init --partial-clone -b android-12.0.0_r34 -u https://android.googlesource.com/platform/manifest
repo sync -c -j8
1
2
3
4
5
6
7
8
mkdir vendor_backup && cd vendor_backup
wget https://dl.google.com/dl/android/aosp/google_devices-crosshatch-sp1a.210812.016.c2-a4e274b7.tgz
wget https://dl.google.com/dl/android/aosp/qcom-crosshatch-sp1a.210812.016.c2-00a7f1f3.tgz
tar xvf qcom-crosshatch-*.tgz
tar xvf google_devices-crosshatch-*.tgz
./extract-google_devices-crosshatch.sh
./extract-qcom-crosshatch.sh
mv vendor/ ../

以上为AOSP构建,对于其他也是类似,以LineageOS为例

1
2
repo init --partial-clone -u https://github.com/LineageOS/android.git -b lineage-21.0 --git-lfs
repo sync -c -j8

具体参见 Build WIKI

This post is licensed under CC BY 4.0 by the author.