Ubuntu 22.04上编译Android13 AOSP系统并刷入Pixel 6
2023-6-9 07:40:20 Author: 哆啦安全(查看原文) 阅读量:73 收藏

背景

编译aosp13刷入Pixel6中。

环境:

vm 22.04
空间500g
内存24g

环境配置

以下所有操作需要全球通上网,已经安装git环境。

把Ubuntu源切到国内,下载速度快很多

sudo apt install unzip zip libssl-dev  libffi-dev gnupg flex bison gperf build-essential  curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev libz-dev ccache libgl1-mesa-dev libxml2-utils xsltproc

开始下载repo,如果已经有可以跳过。

# 根目录下mkdir ~/binPATH=~/bin:$PATHcurl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod a+x ~/bin/repo# 如果想修改repo地址,可以打开repo文件,修改REPO_URL对应地址

下载代码。

mkdir android13cd android13repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifestDownloading Repo source from https://gerrit-googlesource.proxy.ustclug.org/git-reporemote: Finding sources: 100% (10/10)remote: Total 10 (delta 1), reused 10 (delta 1)
Your identity is: Your Name <[email protected]>If you want to change this, please re-run 'repo init' with --config-name
repo has been initialized in /home/android/android13repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-13.0.0_r7repo: reusing existing repo client checkout in /home/android/aosp.repo/manifests/: discarding 619 commits
repo has been initialized in /home/android/android13

开始同步代码:

repo sync -qcj4 --force-sync --current-branch --no-clone-bundle --no-tags

这里需要下载100g工具和代码,通常都是晚上下载比较快一点。

开始编译

下载手机对应的驱动文件。
到这个地址下,下载驱动文件[Nexus 和 Pixel 设备的驱动程序二进制文件  | Google Play services  | Google for Developers]()

驱动下载

https://developers.google.com/android/drivers?hl=zh-cn#orioletp1a.221005.002

在代码目录下解压得到sh文件。执行./extra_xx文件,最后授权。

解压完成之后,授予vender目录权限:

sudo chmod -R 777 vendor

开始编译:

source build/envsetup.shlunch 24# 使用8线程编译make -j8# 接下里就是等编译完成了。

可以刷入手机了。

手机先重启到BootLoader。(未安装adb的自己解决)

adb reboot bootloader# 查看是手机的连接状态,如果已经连接,会显示一串英文fastboot decices# 手机已经连接执行一下命令fastboot flashall -w

刷入完成,手机自动重启:

Ubuntu编译aosp10-刷入pixel4XL设备
AOSP Android 10定制su名字隐藏root


文章来源: http://mp.weixin.qq.com/s?__biz=Mzg2NzUzNzk1Mw==&mid=2247495551&idx=1&sn=cdd80527232cfc86acd204975be35b63&chksm=ceb8aa31f9cf2327dcfe0eb0552b5c2d155a770c120d5ee17a238500d4400378cf71bc2194b5#rd
如有侵权请联系:admin#unsafe.sh