vhal emulator in Android P

626 views
Skip to first unread message

Tommy potocki

unread,
Jan 20, 2019, 6:10:11 PM1/20/19
to android-porting
Hello,

I'm trying to get the vhal emulator (platform/packages/service/Car/tools/emulator) to run

I have include VHAL in my build based on (aosp_car_emu_x86) and i can confirm the vhal service is running

When i try to run vhal_emulator_test.py against the running emulator, it just response with connection refused

I have tried to forward all traffic from host to target (adb forward tcp:0:tcp:33452) but still getting same results

I have also tried to remove all iptables rules but i'm still getting connection refused

This make me suspect qemu to be the issue but i'm not sure how to confirm this

Have anyone got vhal emulator to work on Android P?

All help is welcome :)

johan....@se.bosch.com

unread,
Mar 21, 2019, 11:24:34 AM3/21/19
to android-porting
I had the same problem on a real target until I put the HAL in emulation mode.
So, before running the vhal tests I issued this command: "adb shell setprop persist.boot.vhal.mode emulator". After this and a reboot everything worked fine.
You reset the vhal to normal mode by this command: "adb shell setprop persist.boot.vhal.mode normal".

Shriya Nayak

unread,
May 6, 2020, 10:54:56 AM5/6/20
to android-porting

Hi Johan,

I would like to know how to run those emulator tools?
<sources>/packages/services/Car/tools/emulators/vhal_emulator.py?

Regards,
Sriraksha

Johan Wiezell

unread,
May 11, 2020, 2:01:34 PM5/11/20
to android-porting
Hi Sriraksha,
this was awhile ago, but as far as I can recall it was very limited. I think it had a gear selector (forward, neutral and reverse) and a turn indicator.
The "emulator" was executed on the host and talked to my target using adb. I started it by executing the gui.py script which gives you a simple GUI to interact with.
Reply all
Reply to author
Forward
0 new messages