Android Automotive编译

系统准备

安装系统

准备一台安装Ubuntu系统的机器(windows系统的机器可以通过WSL安装ubuntu系统)

安装docker

本文使用docker进行编译,因此提前安装docker。参考网络链接安装docker并设置为不使用sudo进行docker操作。

参考链接:

源码准备

安装依赖软件包

bash 复制代码
apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip libncurses5 openjdk-8-jdk

修改python软链接

  1. 移除已有软链接
bash 复制代码
$ rm -rf /usr/bin/python
  1. 增加新的软链接
bash 复制代码
$ ln -s /usr/bin/python3 /usr/bin/python

下载并配置repo

bash 复制代码
mkdir ~/bin/
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o ~/bin/repo
chmod +x ~/bin/repo
  • 添加环境变量

    1. vi ~/.bashrc

    2. 将如下内容添加到末尾

    3. source ~/.bashrc

bash 复制代码
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'

配置git环境

将email和name配置成自己的

bash 复制代码
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

下载源码

bash 复制代码
mkdir -p ~/work/android-13.0.0_r35
cd ~/work/android-13.0.0_r35
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-13.0.0_r35
repo sync -j32 

代码编译

bash 复制代码
cd ~/work/android-13.0.0_r35
. build/envsetup.sh && lunch sdk_car_x86_64-userdebug && m -j32
相关推荐
还是奇怪29 分钟前
Linux - 安全排查 3
android·linux·安全
Android采码蜂1 小时前
BLASTBufferQueue03-BufferQueueConsumer核心操作
android
Android采码蜂1 小时前
BLASTBufferQueue02-BufferQueueProducer核心操作
android
2501_915921432 小时前
没有Mac如何完成iOS 上架:iOS App 上架App Store流程
android·ios·小程序·https·uni-app·iphone·webview
码农明明2 小时前
Google Play 应用上架二三事
android·google
红橙Darren5 小时前
手写操作系统 - 环境搭建
android·微信·操作系统
_一条咸鱼_5 小时前
Android Runtime直接内存管理原理深度剖析(73)
android·面试·android jetpack
你听得到115 小时前
揭秘Flutter图片编辑器核心技术:从状态驱动架构到高保真图像处理
android·前端·flutter
wilinz5 小时前
Flutter Android 端接入百度地图踩坑记录
android·flutter
小袁拒绝摆烂8 小时前
SQL开窗函数
android·sql·性能优化