aosp
code下载
https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
编译
source build/envsetup.sh
aosp_blueline-userdebug
mm systemimage -j24
镜像
https://developers.google.com/android/drivers?hl=zh-cn#raven
https://source.android.com/setup/start/build-numbers#honeycomb-gpl-modules
一定要注意一下说明: 防止变黑转
https://developers.google.com/android/images?hl=zh-cn
实操如下:
pixel 6pro 代号raven.
1.下载手机特定版本
https://source.android.com/docs/setup/about/build-numbers#source-code-tags-and-builds
pixel 6 pro,使用build ID TP1A.221005.002 分支android-13.0.0_r7
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-13.0.0_r7
(
如果下错, 或者master, 可以切换
查看可切换的分支
cd .repo/manifests
git branch -a | cut -d / -f 3
repo init -b android-13.0.0_r7
repo sync
repo start android-13.0.0_r7 --all
)
-
下载vendor部分.
https://developers.google.com/android/drivers#raven
找到对应build id的vendor image, 并放置在source code工程的根目录, 会自动编译到out下生成vendor image
并将vendor image 解压放到code根目录
-
正常编译
source build/envsetup.sh
lunch aosp_raven-userdebug
mm systemimage -j24 -
下载完整image
https://developers.google.cn/android/images#raven
-
烧录
如果只刷google image, 直接执行脚本, 如果需要root ,需要替换image. 将编译好的image替换到上面image-raven中, 打包.并执行脚本
如果需要烧录root, 需要先编译工程, 然后将上述image-raven的包解压,
对比上述img, 将out下的同名文件拷贝并压缩(注意zip打开即为img文件, 否者烧录会提示文件缺失), 并修改脚本中
fastboot -w update reven_local.zip