Building Android Auto from Source

TL DR

After creating Android Carotive from a source like me

  • Launch an auto emulator?
  • Install CarService and related packages on the device?

More details

I am trying to build Android Automotive from a source. I can successfully create it using the following commands:

$ repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r11 $ source build/envsetup.sh $ lunch car_emu_x86_64-userdebug $ make -j8 V=1 &>> make.log

My question is: how to start the emulator? After googling and going through some stackoverflow posts, I came across this:

First I set the env variable on the command line (the emulator uses this to determine which emulator to run)

export ANDROID_PRODUCT_OUT=/path/to/build_root

Then I created the file car-emulator.shand put it in it (the assembly was done on an Ubuntu machine)

#!/usr/bin/env bash

ANDROID_BUILD_OUT=/path/to/build_root/out
PREBUILT=/path/to/build_root/prebuilts
EMULATOR_OUT=${ANDROID_BUILD_OUT}/target/product/car-x86_64

${PREBUILT}/android-emulator/linux-x86_64/emulator \
    -sysdir ${EMULATOR_OUT} \
    -system ${EMULATOR_OUT}/system.img \
    -ramdisk ${EMULATOR_OUT}/ramdisk.img \
    -data ${EMULATOR_OUT}/userdata.img \
    -kernel ${PREBUILT}/qemu-kernel/x86_64/kernel-qemu \
    -scale 0.7 \
    -memory 512 \
    -partition-size 1024

(darwin-x86_64) Mac . , .

, ? , CarService.apk . APK ? CarService , ?

+11
2

Android 8.1.0 OPM5.171019.017:

$ source ./build/envsetup.sh
$ lunch aosp_car_x86_64-eng
$ emulator

:

: : (2562 > 200 )

: : (550 > 200 )

: : CPUID.80000001H: ECX.sse4a [ 6]

: : CPUID.80000001H: ECX.sse4a [ 6]

Android Android . , . , .

. , .

Android Auto - , / APK , Android Automotive - Android, . , APK.

+2

env, Android Car Emulator Ubuntu 16 Ram 16G Ram, 1T Disk

$ repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r39
$ source build/envsetup.sh
$ lunch car_emu_x86_64-userdebug
$ make -j8
$ emulator 

Android Emulator , .

Android

0

All Articles