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
相关推荐
Lei活在当下2 小时前
【项目踩坑实录】并发环境下,Glide缓存引起的图片加载异常
android·debug·glide
my_power5205 小时前
检出git项目到android studio该如何配置
android·git·android studio
三少爷的鞋7 小时前
Repository 方法设计:suspend 与 Flow 的决选择指南(以朋友圈为例)
android
阿里云云原生8 小时前
Android App 崩溃排查指南:阿里云 RUM 如何让你快速从告警到定位根因?
android·java
cmdch201710 小时前
手持机安卓新增推送按钮功能
android
攻城狮201510 小时前
【rk3528/rk3518 android14 kernel-6.10 emcp sdk】
android
何妨呀~10 小时前
mysql 8服务器实验
android·mysql·adb
QuantumLeap丶11 小时前
《Flutter全栈开发实战指南:从零到高级》- 25 -性能优化
android·flutter·ios
木易 士心13 小时前
MVC、MVP 与 MVVM:Android 架构演进之路
android·架构·mvc
百锦再13 小时前
国产数据库的平替亮点——关系型数据库架构适配
android·java·前端·数据库·sql·算法·数据库架构