我已经从https://www.android-x86.org/下载了 x86 的 AOSP 代码库。它构建良好。我想知道如何设置config
or .mk
,以便我可以编译或构建具有 Android Automotive OS 风格的 Android。
任何指针?
我已经从https://www.android-x86.org/下载了 x86 的 AOSP 代码库。它构建良好。我想知道如何设置config
or .mk
,以便我可以编译或构建具有 Android Automotive OS 风格的 Android。
任何指针?
请参阅/device/generic/car/存储库,其中 AOSP 汽车模拟器配置可用。
可以使用以下目标变体:
aosp_car_arm-userdebug
aosp_car_arm64-userdebug
aosp_car_x86-userdebug
aosp_car_x86_64-userdebug
我建议按照官方文档下载和构建 AOSP:为 Android 开发设置。您可以选择汽车模拟器作为构建目标。
简而言之:
下载一些 Android 存储库。在 Android 10 的情况下,这可能是例如使用repo:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r14
$ repo sync
设置环境并选择与您的 CPU 架构匹配的汽车模拟器目标变体,例如
$ . build/envsetup.sh
$ lunch aosp_car_x86-userdebug
构建目标:
$ make
成功构建后,从命令行运行模拟器:
$ emulator
注意:通常,出于开发目的,您希望使用一些附加选项来运行模拟器,例如-selinux permissive
(SELinux 未强制执行)或-writable-system
(可写系统映像)。有关详细信息,请参阅从命令行文档启动模拟器。