ubuntu 24下载aosp 14并编译

1. 用清华源下载最新版本

~/workspace/AOSP14$sudo apt-get install openjdk-8-jdk android-tools-adb bc bison build-essential curl flex g++-multilib gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev git-core python3.8 libncurses5

~/workspace/AOSP14$sudo apt install libwxgtk3.2-dev


~/workspace/AOSP14$repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-14.0.0_r55 --depth=1

~/workspace/AOSP14$repo sync -j8

2. 编译

可能会遇到的问题:

~/workspace/AOSP14$source build/envsetup.sh
~/workspace/AOSP14$lunch sdk_car_x86_64-userdebug

Invalid lunch combo: sdk_car_x86_64-userdebug
Valid combos must be of the form <product>-<release>-<variant>
xxx@xxx-VMware-Virtual-Platform:~/workspace/AOSP14$ lunch

You're building on Linux

Warning: Cannot display lunch menu.

Note: You can invoke lunch with an explicit target:

  usage: lunch [target]

Which would you like? [aosp_cf_x86_64_phone-trunk_staging-eng]
Pick from common choices above (e.g. 13) or specify your own (e.g. aosp_barbet-trunk_staging-eng):

这时,执行以下命令

~/workspace/AOSP14$:build_build_var_cache
21:54:45 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:380:
In file included from build/make/core/envsetup.mk:51:
build/make/core/release_config.mk:136: error: No release config set for target; please set TARGET_RELEASE, or if building on the command line use 'lunch <target>-<release>-<build_type>', where release is one of: ap2a.
21:54:45 dumpvars failed with: exit status 1


~/workspace/AOSP14$export TARGET_RELEASE=ap2a
~/workspace/AOSP14$lunch
~/workspace/AOSP14$lunch aosp_oriole-ap2a-userdebug

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值