Android for Automotive IVI development relies on a specialized AOSP car emulator target that replicates the software environment of an in-vehicle infotainment system without requiring physical hardware. Android-based car infotainment platform development begins with setting up this emulator — enabling teams to build, debug, and validate their android infotainment system stack long before silicon arrives. Android offers a few emulators for development purposes. As a part of standard AOSP (Android Open Source Project), these emulators come in handy for customization, debugging, middleware development, and app development. There are a few variants of emulators — including for general Phone/Tablet emulation and for automotive purposes: the Car Emulator. This blog will focus primarily on building the Android for Automotive IVI car emulator and running it in the system. We will also touch up on compiling the kernel from the source and running it as well.
Downloading AOSP Source for the Car Emulator
First thing to start building the Android for Automotive IVI car emulator is to finalize on the release version we want to build against. The list of supported variants is available in the Codenames, Tags, and Build Numbers page from the android web site. Based on the requirements, identify the version – in this case let us assume we want to build for OPM6.171019.030.B1. Note the build version it corresponds to android-8.1.0_r33.
Now we will have to download the source code for the same. Android source code is in fact a collection of git repositories. Each of the major directories in the AOSP corresponds to a separate repository. Since it is difficult to manage such a large code base individually one by one, Google has created a tool called repo that helps in this process. Install this tool with the following steps
mkdir -p ~/bin
wget 'https://storage.googleapis.com/git-repo-downloads/repo' -P ~/bin
chmod +x ~/bin/repo
Now that the tool is downloaded, set up your git configuration using the following commands
git config --global user.name "your name"
git config --global user.email "your_email@your_domain.com"
Assuming you are running Ubuntu 16.04, to prepare the environment, execute the following
sudo apt-get update
Install the dependencies:
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 libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev
Identify the working directory and create it if necessary.
mkdir -p ~/aosp
Switch to the directory
cd ~/aosp
As mentioned earlier, we need the manifest file to begin with. This initial file can be set up using the following commands.
repo init -u https://android.googlesource.com/platform/manifest -b android-8.1.0_r33
The above command will download an XML file called "manifest.xml" that contains information about all the git repositories that constitute the AOSP.
Since the above command will download a large set of objects including previous versions, if you want to limit the download size, you can set the downloaded version depth to 1.
repo init -u https://android.googlesource.com/platform/manifest -b android-8.1.0_r33 --depth=1
With everything set, begin the download using the following command.
repo sync
This command will perform the actual download operation for all the necessary repositories and prepare the directory for further building.
Android-based Car Infotainment Platform Development: Building the Emulator
We can now start the Android-based car infotainment platform development build process. Once again being a large project, it is better to set up a compiler cache so that incremental builds are much faster.
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 15G
Below output confirms that the command executed successfully.
Output
Set cache size limit to 15.0 Gbytes
Powered by the Soong build system, the AOSP employs a variety of tools to build the source and create the images. The Jack compiler employs a server mechanism whereby a single process running in the system compiles files. To configure the same, execute the below commands such that the Java based tool uses the configured amount of RAM for the JVM. In this example, it is limited to 6GB.
export ANDROID_JACK_VM_ARGS="-Xmx6g -Dfile.encoding=UTF-8 -XX:+TieredCompilation"
With everything set up for the Android-based car infotainment platform development build, configure the environment variables used by the Android build system using:
source build/envsetup.sh
The source command simply executes the given script in the same shell so that its environment variables are affected. Below output is shown
root@aosp:/home/user1/aosp/ # source build/envsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/uml/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/google/marlin/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including sdk/bash_completion/adb.bash
Now choose the platform you want to build. For example, we can either build the car emulator for 32-bit X86 system or 64-bit x86 system.
For building for 32-bit, use the below command.
lunch aosp_x86_car_emulator
For 64-bit use,
lunch aosp_x86_64_car_emulator
Typically, you will see the below output.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=aosp_car_x86
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
TARGET_CPU_VARIANT=
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-137-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM6.171019.030.B1
OUT_DIR=out
AUX_OS_VARIANT_LIST=
Initiate the build now with the make command. To leverage the multiple CPU cores present in your host machine, specify a number corresponding to it.
make -j8
It will take about 1 hour to 3 hours for the build to complete depending on the host system configuration.
Creating filesystem with parameters:
Size: 2684354560
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 10240
Label: system
Blocks: 655360
Block groups: 20
Reserved block group size: 159
Created filesystem with 2219/163840 inodes and 219060/655360 blocks
[ 99% 64341/64342] Install system fs image: out/target/product/generic_x86/system.img
out/target/product/generic_x86/system.img+ maxsize=2740556544 blocksize=2112 total=2684354560 reserve=27684096
[100% 64342/64342] Create system-qemu.img
1+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00427205 s, 245 MB/s
2560+0 records in
2560+0 records out
2684354560 bytes (2.7 GB, 2.5 GiB) copied, 3.17107 s, 847 MB/s
1048576+0 records in
1048576+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 1.86999 s, 561 kB/s
Creating new GPT entries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
Setting name!
partNum is 0
REALLY setting name!
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
#### build completed successfully (01:26:36 (hh:mm:ss)) ####
Running the Car Emulator
Once the Android for Automotive IVI emulator build is complete, the images will be created inside the out/target/<product>/ directory. The emulator can now be invoked using:
emulator
Typically, you will see the emulator running as below.

Now you can connect to it over ADB and perform various operations such as installing a new App, debugging it, modifying the AOSP source and testing it etc.
Android HMI Testing via the Car Emulator
The car emulator supports android hmi testing through ADB, allowing developers to install android hmi prototypes, debug UI layers, and validate touch input handling on the Android for Automotive IVI stack before physical hardware is available. Embien's Camera Design Services include android hmi camera integration testing on the car emulator — validating camera HAL behavior, preview rendering, and capture pipelines within the Android for Automotive IVI environment prior to hardware bring-up.
Android Infotainment System Development with the Car Emulator
The AOSP car emulator is the primary development environment for an android infotainment system before physical IVI hardware is available. An android infotainment system built on Android for Automotive IVI uses the same HAL interfaces, vehicle signal APIs, and system services as the emulator target, making development directly portable to production hardware. Embien serves a wide range of industries — including automotive, industrial, and consumer electronics — leveraging android infotainment system emulator workflows to accelerate product timelines and reduce hardware dependency during early development phases.
Pure Android Head Unit Development and Validation
A pure android head unit runs Android for Automotive IVI without any GMS (Google Mobile Services) dependencies, relying entirely on the open-source AOSP car stack. The car emulator replicates a pure android head unit environment, enabling developers to validate IVI apps, navigation overlays, vehicle signal integrations, and cluster display behavior before hardware bring-up. Teams building a pure android head unit can use the emulator to run the full Android for Automotive IVI software stack — including CarService, VehicleHAL stubs, and the car launcher — entirely on a development workstation.
Compiling the Kernel
The emulator can be launched to show the kernel output and console by using the show kernel option as below.
emulator --show-kernel
generic_x86:/ $
In the login, we can check the kernel version using the uname command.
We can see this emulator runs kernel version 3.18.74+. Looking for the source, it can be found that it is available in the repository as commit c57e557. Download the same using the below commands:
Get goldfish branch c57e55706abeffafbc52d28155297650dae6e2c0
Build the same using the following commands:
git clone https://android.googlesource.com/kernel/goldfish/ -b android-goldfish-3.18
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
cd goldfish
export CROSS_COMPILE=x86_64-linux-android-
export ARCH=x86_64
export PATH=$PATH:/path/to/x86_64-linux-android-4.9/bin
make x86_64_ranchu_defconfig
make menuconfig # enable overlayfs and namespaces support here
make -j8
The output kernel will now be available at arch/boot/x86/bzImage
This image can be used for the emulator when launching as follows:
emulator -kernel <Path to kernel directory>/arch/boot/x86/bzImage
By giving uname now, it can be seen that the build time/machine reflects the newly compiled kernel.
Building the Android for Automotive IVI car emulator and running it accelerates Android-based car infotainment platform development by enabling platform and application work before the underlying hardware is available. It is possible to complete some parts of underlying driver and HAL development using this approach.
About Embien: Embien Technologies is a leading service provider for Android for Automotive IVI technologies — including Android porting, HAL development, HIDL development, custom android infotainment system services, deployment, and app development. Our team extensively uses the emulator for speeding up Android-based car infotainment platform development even before the underlying hardware is available. Apart from developing Auto-infotainment systems, customized tablets, Home Automation consoles, rugged handhelds, and Industrial HMIs, our SMEs offer corporate training covering topics such as Android Platform development, Android for Automotive, and Linux Device Drivers.
