准备工作
Pixel3 代号blueline,编译配置lunch aosp_bluebline-userdebug,内核代码选择android-msm-crosshatch
1.pixel3解锁
在手机system–>build version点击7下进入developer模式,OEM也要解锁
手机进入BootLoader:adb reboot bootloader
解锁命令:fastboot flashing unlock
利用音量上下键和开机键选择对应选项来解锁
2.准备AOSP
本来想使用之前Hikey970编译的AOSP版本,但是在https://source.android.com/setup/start/build-numbers#source-code-tags-and-builds 查找细分版本号发现,上次repo sync的r8版本不能用来编译Pixel 3的镜像,只好再repo sync一个相近的r21版本。
同时在github上找到前人的教程并学习:https://github.com/shallin123/Android9.0-pixel-3
可供参考的pixel XL编译经验: https://blog.youkuaiyun.com/zz531987464/article/details/94163954
//repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-9.0.0_r21 --no-repo-verify --repo-branch=stable
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-9.0.0_r21
1.清华的repo设置:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
2.ustc的repo设置
//清华的源不可用,换用中科院的源ustc
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-9.0.0_r21
repo sync -j32
log:
输出
Checking out projects: 100% (678/678), done.
repo sync has finished successfully.
again:
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-9.0.0_r37 --no-repo-verify --repo-branch=stable
失败
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-9.0.0_r37
repo sync
输出:
Checking out projects: 90% (613/677) platform/prebuilts/r8Checking out files: 0% (18/4089Checking out files: 100% (4089/4089), done.
Checking out projects: 100% (677/677), done.
repo sync has finished successfully.
3.编译aosp
source build/envsetup.sh
lunch aosp_blueline-userdebug
log:
root@tan-PowerEdge-R730:/mnt/pixel3/aosp# lunch aosp_blueline-userdebug
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=aosp_blueline
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-2a
TARGET_CPU_VARIANT=cortex-a75
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a75
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-x86_64-Ubuntu-16.04.7-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ1A.181205.006
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/google/crosshatch/pixelstats device/google/crosshatch/usb device/google/crosshatch/health hardware/google/av hardware/google/interfaces hardware/qcom/sdm845 vendor/qcom/sdm845
make -j32
log:
Copying resources from program jar [/mnt/pixel3/aosp/out/target/common/obj/APPS/messaging_intermediates/classes.jar]
[ 99% 105415/105439] Target Java: out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar
N

最低0.47元/天 解锁文章
3886

被折叠的 条评论
为什么被折叠?



