Android Automotive

Hi Ahmed,
How did you fix this issue ? i am facing exactly the same.
Just by commenting the two lines ?
thanks for your support

Which two lines ?? Sorry I did not followā€¦

Indeed this can be fix by removing these lines because this sepolicy are new integrated to system natively

1 Like

Hi,

any idea what is the root reson for this issue ā€œjava.lang.IllegalStateException: Vehicle HAL service is not availableā€ (see logcat below)?

service is already added to the make file

PRODUCT_PACKAGES +=
android.hardware.automotive.vehicle@2.0-service

when i do

adb shell ps -Al

i see :

4 S 1054 2336 1 0 19 0 - 4258 0 ? 00:00:02 vehicle@2.0-ser

logcat:

09-17 14:03:41.646 22194-22194/? E/AndroidRuntime: FATAL EXCEPTION: main
_ Process: com.android.car, PID: 22194_
_ java.lang.RuntimeException: Unable to create service com.android.car.CarService: java.lang.IllegalStateException: Vehicle HAL service is not available._
_ at android.app.ActivityThread.handleCreateService(ActivityThread.java:3367)_
_ at android.app.ActivityThread.access$2300(ActivityThread.java:176)_
_ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1679)_
_ at android.os.Handler.dispatchMessage(Handler.java:106)_
_ at android.os.Looper.loop(Looper.java:164)_
_ at android.app.ActivityThread.main(ActivityThread.java:6518)_
_ at java.lang.reflect.Method.invoke(Native Method)_
_ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:486)_
_ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)_
_ Caused by: java.lang.IllegalStateException: Vehicle HAL service is not available._
_ at com.android.car.CarService.onCreate(CarService.java:78)_
_ at android.app.ActivityThread.handleCreateService(ActivityThread.java:3355)_
_ at android.app.ActivityThread.access$2300(ActivityThread.java:176) _
_ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1679) _
_ at android.os.Handler.dispatchMessage(Handler.java:106) _
_ at android.os.Looper.loop(Looper.java:164) _
_ at android.app.ActivityThread.main(ActivityThread.java:6518) _
_ at java.lang.reflect.Method.invoke(Native Method) _
_ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:486) _
_ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) _
09-17 14:03:41.742 22209-22209/? E/CAR.SERVICE: IVehicle service not registered yet

thnks

I have observed the same on my HW. com.android.car/.CarService keeps crashing and restarting.

AndroidRuntime: Shutting down VM
AndroidRuntime: FATAL EXCEPTION: main
AndroidRuntime: Process: com.android.car, PID: 10660
AndroidRuntime: java.lang.RuntimeException: Unable to create service com.android.car.CarService: java.lang.IllegalStateException: Vehicle HAL service is not available.
AndroidRuntime: 	at android.app.ActivityThread.handleCreateService(ActivityThread.java:3366)
AndroidRuntime: 	at android.app.ActivityThread.access$2300(ActivityThread.java:176)
AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1678)
AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6517)
AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:821)
AndroidRuntime: Caused by: java.lang.IllegalStateException: Vehicle HAL service is not available.
AndroidRuntime: 	at com.android.car.CarService.onCreate(CarService.java:78)
AndroidRuntime: 	at android.app.ActivityThread.handleCreateService(ActivityThread.java:3354)
AndroidRuntime: 	... 8 more
RescueParty: Disabled because of active USB connection
ActivityManager: Process com.android.car has crashed too many times: killing!
Process : Sending signal. PID: 10660 SIG: 9
ActivityManager: Process com.android.car (pid 10660) has died: pers PER 
ActivityManager: Scheduling restart of crashed service com.android.car/.CarService in 0ms
ActivityManager: Re-adding persistent process ProcessRecord{50d2890 10660:com.android.car/1000}

Hi @Pawel ,

in my case it was because i was including the wrong Car makefile.
I was including:

$(call inherit-product, device/generic/car/common/car.mk)

instead of

$(call inherit-product, packages/services/Car/car_product/build/car.mk)

Is it working now?
If so, which manifest did you use and which kernel version?

Is what working now?

Sorry,
AhmedX6, 7atech, Pawel they were facing some problems with booting the board, so I was wondering if all issues are gone now.
@doitright: you syncing your changes with one of the latest AOSP version? Most of the discussion here refers to the versions from March/April. In the meantime there were a lot of changes in AOSP, so I guess it would be a good idea to keep up with them, especially for the problems that are located deep down in the system (like gralloc one mentioned by AhmedX6).

The march/april versions work quite well, and Iā€™m not aware of any issues such as those immediately above, if all instructions are followed accurately. Once people start mixing and matching, things may not work well. In addition, there could be some issues related to newer hardware revisions that were not supported well by April AOSP. In any case, there are no systemic issues with it.

If youā€™re interested in AOSP9, you probably should move to the appropriate thread for it.

Hi @MichaelNbg

yes it is working. but as mentioned by doitright in my case i downloaded the sources since long so may be there was changes to AOSP.

for the sources i am using the master branch of the AOSP. kernel is 4.9.

@7atech: thanks for info. Which manifest exactly are you using?

@MichaelNbg

Android sources

mkdir <android_src_path>
cd <android_src_path>
repo init -u platform/manifest - Git at Google -b master
repo sync -j24

Kernel source

cd <android_src_path>/kernel/
git clone kernel/hikey-linaro - Git at Google
cd hikey-linaro
git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9

Hello everyone,

@doitright I noticed you did some modification on the Kernel since 2 weeks.
I have problem with some new hikey960 I bought for my project, there is a new flash firmware so the Kernel from april is unable to boot it even yours from 2 weeks.
the only Kernel that can boot the new hikey960 flash is the Google Kernel
git clone kernel/hikey-linaro - Git at Google git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9

When I compile and flash with that Kernel, we have a regression on bluetooth HFP over USB.
That might be the problem because I donā€™t know exactly all the modifications youā€™ve done to fix that part on the previous kernel.
Iā€™ll provide you the logs I have with your kernel on new hikey960 boards.

#EDIT
Here are the logs
https://gist.github.com/AhmedX6/100e30cbdf670cdadb5bb6d6ef9a8960

The logs arenā€™t needed. git can sort out the differences, just pull mine into the current upstream or current upstream into mine.