设备
pixel 2
准备源码
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/'
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-8.0.0_r4
repo sync -j2
android 源码版本更换
repo init -bandroid-8.1.0_r2
repo sync
设置java环境
android源码中自带java环境。
PATH=$PATH:/home/pareto/data/prebuilts/jdk/jdk8/linux-x86/bin/:/home/pareto/data/prebuilts/jdk/jdk8/linux-x86/jre/bin
设置环境变量
编译
source build/envsetup.sh
lunch aosp_walleye-eng # 根据设备进行修改
部分编译
mm bionic/linker/.
全编译
make -j4
生成的文件在out目录下。
https://www.jianshu.com/p/8ec0f1f1863a
https://www.jianshu.com/p/82a7eef74aae
https://source.android.google.cn/setup/build/building-kernels?hl=zh-cn#building 官方内核构建
0 条评论