Pixel4刷机并下载对应ROM源码

https://blog.csdn.net/zhaohad/article/details/117749815

前提

如果是虚拟机编译,要保证分配至少2核CPU,内存分配16G以上,交换分区至少4G。
https://blog.csdn.net/weixin_43946245/article/details/104921648

0. 解锁bootloader

https://source.android.com/setup/build/running#unlocking-the-bootloader

image.png

1. 驱动决定选择源码分支

https://developers.google.com/android/drivers
先找对应的最新驱动:

image.png

根据驱动找到分支:
https://source.android.com/docs/setup/about/build-numbers?hl=zh-cn#source-code-tags-and-builds

image.png

2. 下载代码

repo init -u https://android.googlesource.com/platform/manifest -b android-12.0.0_r16
repo sync

3. 把驱动放进源码内开始编译

extract-google_devices-flame.sh和extract-qcom-flame.sh,放到AOSP源码根目录,然后执行这两个sh文件,

extract-google_devices-flame.sh

extract-qcom-flame.sh
执行完毕之后会多出几个文件,然后开始编译
source build/envsetup.sh
lunch aosp_flame-userdebug
make -j4

4. 进入out目录进行刷机

fastboot flashall -w

1:找到最新ROM版本

https://developers.google.com/android/images

最新rom

最新版本如下:
11.0.0 (RQ3A.210805.001.A1, Aug 2021)
格式如下:
Android版本号(build ID,时间)

2:根据build ID找到AOSP分支源码

https://github.com/AOSPAlliance/vendor_google_devices/blob/android11/config.json
https://source.android.com/setup/start/build-numbers#source-code-tags-and-builds

build ID

可以看到,RQ3A.210805.001.A1对应的分支是:android-11.0.0_r40

3:下载对应AOSP代码

https://source.android.com/setup/build/downloading

repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r40
repo sync

4:下载驱动,放到AOSP跟目录

https://developers.google.com/android/drivers

5:开始编译代码

https://source.android.com/setup/build/running#selecting-device-build

launch

source build/envsetup.sh
lunch aosp_flame-userdebug
make -j4
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容