Running car-emulator (Android Automotive)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Running car-emulator (Android Automotive)

Kiran Rao
I'm trying to build Android Automotive from source. I'm able to successfully build 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 do I run the emulator? After googling and going through some stackoverflow posts, I came across this:

First, I set an env variable in the command-line (The emulator uses this to determine which emulator to launch)

export ANDROID_PRODUCT_OUT=/path/to/build_root

Next, I created a file car-emulator.sh and put this in it
#!/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


I also tried to download the relevant (darwin-x86_64) files from the build machine to my Mac laptop and tried running there. The emulator starts but crashes immediately.

Also, I see that the CarService.apk has been generated. Is it sufficient to install this APK on a device for it to work? Does it depend on anything else?

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running car-emulator (Android Automotive)

Mayank Agarwal-2

Hi Kiran, were you able to find any solution to this?

On Friday, 22 September 2017 21:47:43 UTC+5:30, Kiran Rao wrote:
I'm trying to build Android Automotive from source. I'm able to successfully build it using the following commands:

repo init -u <a href="https://android.googlesource.com/platform/manifest" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://android.googlesource.com/platform/manifest&#39;;return true;" onclick="this.href=&#39;https://android.googlesource.com/platform/manifest&#39;;return true;">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 do I run the emulator? After googling and going through some stackoverflow posts, I came across this:

First, I set an env variable in the command-line (The emulator uses this to determine which emulator to launch)

export ANDROID_PRODUCT_OUT=/path/to/build_root

Next, I created a file car-emulator.sh and put this in it
#!/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


I also tried to download the relevant (darwin-x86_64) files from the build machine to my Mac laptop and tried running there. The emulator starts but crashes immediately.

Also, I see that the CarService.apk has been generated. Is it sufficient to install this APK on a device for it to work? Does it depend on anything else?

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running car-emulator (Android Automotive)

Renjith Rajagopal
In reply to this post by Kiran Rao
https://android-review.googlesource.com/c/platform/external/adt-infra/+/502579/
Google is working on it to release Car emulator officially.

I could build and run Emulator in x86 version,but not with lunch car_emu_x86_64-userdebug instead aosp_x86_64 configuration.
But still need few hacks to make it up and running.



On Friday, September 22, 2017 at 6:17:43 PM UTC+2, Kiran Rao wrote:
I'm trying to build Android Automotive from source. I'm able to successfully build it using the following commands:

repo init -u <a href="https://android.googlesource.com/platform/manifest" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://android.googlesource.com/platform/manifest&#39;;return true;" onclick="this.href=&#39;https://android.googlesource.com/platform/manifest&#39;;return true;">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 do I run the emulator? After googling and going through some stackoverflow posts, I came across this:

First, I set an env variable in the command-line (The emulator uses this to determine which emulator to launch)

export ANDROID_PRODUCT_OUT=/path/to/build_root

Next, I created a file car-emulator.sh and put this in it
#!/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


I also tried to download the relevant (darwin-x86_64) files from the build machine to my Mac laptop and tried running there. The emulator starts but crashes immediately.

Also, I see that the CarService.apk has been generated. Is it sufficient to install this APK on a device for it to work? Does it depend on anything else?

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running car-emulator (Android Automotive)

Nilesh Khairnar
Hi Renjith,

I am able to build emulator for x86 version using aosp_x86_64 configuration.

>>But still need few hacks to make it up and running.
Could you please share steps for running this emulator?

Regards,
Nilesh


On Sunday, 25 February 2018 00:19:34 UTC+5:30, Renjith Rajagopal wrote:
<a href="https://android-review.googlesource.com/c/platform/external/adt-infra/+/502579/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://android-review.googlesource.com/c/platform/external/adt-infra/+/502579/&#39;;return true;" onclick="this.href=&#39;https://android-review.googlesource.com/c/platform/external/adt-infra/+/502579/&#39;;return true;">https://android-review.googlesource.com/c/platform/external/adt-infra/+/502579/
Google is working on it to release Car emulator officially.

I could build and run Emulator in x86 version,but not with lunch car_emu_x86_64-userdebug instead aosp_x86_64 configuration.
But still need few hacks to make it up and running.



--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running car-emulator (Android Automotive)

Bao Zhu
In reply to this post by Kiran Rao
I have built Android Automotive with Android 9.0.
And After I built it, I run emulator directly in the terminal I built the source.
And the emulator runs well for the Android Automotive.

在 2017年9月23日星期六 UTC+8上午12:17:43,Kiran Rao写道:
I'm trying to build Android Automotive from source. I'm able to successfully build it using the following commands:

repo init -u <a href="https://android.googlesource.com/platform/manifest" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://android.googlesource.com/platform/manifest&#39;;return true;" onclick="this.href=&#39;https://android.googlesource.com/platform/manifest&#39;;return true;">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 do I run the emulator? After googling and going through some stackoverflow posts, I came across this:

First, I set an env variable in the command-line (The emulator uses this to determine which emulator to launch)

export ANDROID_PRODUCT_OUT=/path/to/build_root

Next, I created a file car-emulator.sh and put this in it
#!/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


I also tried to download the relevant (darwin-x86_64) files from the build machine to my Mac laptop and tried running there. The emulator starts but crashes immediately.

Also, I see that the CarService.apk has been generated. Is it sufficient to install this APK on a device for it to work? Does it depend on anything else?

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Running car-emulator (Android Automotive)

Manu Kemppainen
Bao Zhu, can you please share the repo, build and emulator commands you were using? 

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.