How to build AOSP for Android Automotive OS?
Asked Answered
D

2

5

I have downloaded AOSP codebase for x86 from https://www.android-x86.org/. It builds fine. I wonder how I setup the config or .mk, so that I can compile or build Android with Android Automotive OS flavor.

Any pointers?

Duwe answered 12/11, 2019 at 16:7 Comment(0)
D
8

Refer to /device/generic/car/ repository where AOSP car emulator configuration is available.

The following target variants are available:

aosp_car_arm-userdebug
aosp_car_arm64-userdebug
aosp_car_x86-userdebug
aosp_car_x86_64-userdebug

I recommend to follow the official documentation for downloading and building AOSP: Set up for Android Development. You can choose car emulator as your build target.

In short:

  1. Download some Android repository. In case of Android 10, this could be e.g. using repo:

    $ repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r14
    $ repo sync
    
  2. Setup an environment and choose the car emulator target variant that matches your CPU architecture, e.g.

    $ . build/envsetup.sh
    $ lunch aosp_car_x86-userdebug
    
  3. Build the target:

    $ make
    
  4. After successful build, run the emulator from command line:

    $ emulator
    

    Note: Usually, for development purposes you would like to run the emulator with some additional options, e.g. -selinux permissive (SELinux not enforced) or -writable-system (writable system image). Refer to Start the emulator from the command line documentation for more details.

Dafna answered 18/11, 2019 at 19:17 Comment(1)
If I want to deploy Android Automotive on a physical machine, but not just use in an emulator, will this build option give me ISO, system.sfs and other files?Duwe
F
0

enter image description hereSteps to build Android 14 for automotive emulator

Download some Android repository. In case of Android 10, this could be e.g. using repo:

$repo init -u https://android.googlesource.com/platform/manifest -b android-14.0.0_r21 --depth=1

$ repo sync

$ source build/envsetup.sh

$ lunch sdk_car_x86_64-userdebug

$ make

$ emulator

Forgetmenot answered 7/8 at 8:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.