Android Automotive

It means that it has not been built … ? Did you add it to the hikey960_car.mk ?
You should have those lines

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

Check on the OUT directory if you have out/target/product/hikey960/obj/EXECUTABLES/android.hardware.automotive.vehicle@2.0-service_intermediates folder

1 Like

Hi,
NO ! i just added --> $(call inherit-product, packages/services/Car/car_product/build/car.mk)
I though the vehicle service is already included in car.mk

thanks. i will check it . if it is not there i will add it to hikey960_car.mk , build again and let you know.

At one point the car.mk (or maybe car_base.mk) did include the service. It was pulled out some time ago.

1 Like

I would like to test the ‘VtsHalEvsV1_0TargetTest’ located in /hardware/interfaces/automotive/evs/1.0/vts/functional. I included the VtsHalEvsV1_0TargetTest to the hikey960_car.mk.

How to execute it ? I do not find any binary with this name. Even the command : “cmd package list instrumentation” does not show anyting.

The Android.bp is like that :
cc_test {
name: “VtsHalEvsV1_0TargetTest”,

srcs: [
    "VtsHalEvsV1_0TargetTest.cpp",
    "FrameHandler.cpp",
    "FormatConvert.cpp"
],

defaults: ["VtsHalTargetTestDefaults"],

shared_libs: [
    "libui",
],

static_libs: ["android.hardware.automotive.evs@1.0"],

cflags: [
    "-O0",
    "-g",
],

}

Hello everyone,

Could someone tell me how can I use SPI pins on Android Automotive ?
I do not see any spidev on /dev.

Thanks

This is really not an automotive question, rather a hikey960/kernel question. The forum search yields a lot of results when searching for “spi”, including this;

If your objective is CAN, here’s a complete writeup for MCP2515:

2 Likes

Hi @doitright I am trying to build hikey_car on master branch but its failing with below errors:
FAILED: build/make/core/base_rules.mk:305: error: overriding commands for target `out/target/product/hikey960/obj/lib/android.hardware.renderscript@1.0-impl.so’, previously defined at build/make/core/base_rules.mk:305
14:49:21 ckati failed with: exit status 1

I followed all the steps correctly from https://source.android.com/setup/build/devices & https://github.com/HiKey960-Car/HiKey960-Car but its failing…
I also tried to use good manifest from here : https://github.com/96boards/aosp-known-good-manifests/tree/master/latest but it fails too with same error.
Any problem with latest AOSP master branch or you suggest a better working way forward.

I’m not really sure how you expect me to help you with that if you don’t provide details.

  1. Have you ever built AOSP before? Were you able to build it before applying my modifications?
  2. Describe in as many details as possible, the configuration of your build machine.
  3. Provide a complete build log, not just a 1 line clipping without any context.
  4. When you tried with a known good manifest, WHICH ONE?

Further, why are you using github? I’ve said it a thousand times that what is on github is DEPRECATED, and even if I hadn’t said so, it is quite plainly obvious based on the fact that nothing there has been updated since APRIL.

There are multiple branches of each of the required repositories. Pick the april branch, and use a known good manifest from april.

Hello,

I’m facing issue to boot HikeyCar with the last known manifest https://github.com/96boards/aosp-known-good-manifests/tree/master/known-good/hikey960

2018-09-11_15:49:35-pinned-manifest.xml

I tried with the last kernel on https://gitlab.com/HiKey960-Car/android_kernel_linaro_hikey/tree/android-hikey-linaro-4.9_apr2018_CAR96

Here are the logs on boot

And after 2 minutes the CPU go in MAX capacity…

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.