- For health checking, the car watchdog client attemps to get
PERF_VEHICLE_SPEED.
- If successful, it regards VHAL is healhty and responds to the car
watchdog daemon. Otherwise, VHAL will be killed by the daemon.
Bug: 154367059
Bug: 154262220
Test: dumpsys android.automotive.watchdog.ICarWatchdog/default and check
if vehicle hal is registered as a client
Change-Id: I2eb466550c56f25ba550ebbd35dc8fde9681ea59
Use the max/min in areaConfig to indicate the recommended tire
pressure.
Explain areaId for HVAC_MAX_DEFROST
Bug: 153906683
Test: make and flash
Change-Id: Ie71279dba4e87efdec75934dcac1c86e22fffaa3
So it can be used by other Vehicle HAL implementations.
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --help
Test: m -j android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib
Bug: 150167241
Bug: 150409377
Merged-In: I2d0c5039c3b994dfe10d3b411f6d502bebe7cca0
Change-Id: I2d0c5039c3b994dfe10d3b411f6d502bebe7cca0
So it can be used by other Vehicle HAL implementations.
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --help
Test: m -j android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib
Bug: 150167241
Bug: 150409377
Exempt-From-Owner-Approval: already approved on rvc-dev, need to submit here due to merge conflict
Change-Id: I2d0c5039c3b994dfe10d3b411f6d502bebe7cca0
(cherry picked from commit 1847a9b25e191c8258522f30b6d4223458feebd1)
Also removed the hash check on Vehicle HAL files, as they're still being
worked on.
Test: m
Bug: 15249991
Change-Id: I214ebc9b5bbd71e5db1a1332296ceb4e426c50cf
If the statusCode is Ok, we generate the fake data twice which will
break the test.
Bug: 143234180
Test: atest VehicleHALTest
Change-Id: I7754649fb4202239f9eca63a12bc8dd5f2a3d916
Addressing outstanding todo in VehicleHalManager
Bug: 148098383
Test: m vts and atest android.hardware.automotive.vehicle@2.0-manager-unit-tests
Change-Id: I9a222077d0de91f8c7353c80d8a1aeff53cffa61
Other virtualization specific definitions and build rules will be moved
to /device/google/trout in the following patches. Keep them for now so
that we will not break the build.
Test: build
Bug: 148816426
Change-Id: I8a579346b55aa812db3dd30a34050c9515f7a68d
Some of the code in VHAL client implementation contains Android-specific
code, and some of the server operations only works in the native case.
So we split them up so that the AGL VHAL server can selectivly pick the
parts it needs.
It won't change the logic of native VHAL.
Bug: 148877226
Bug: 150791171
Test: Build
Change-Id: Ie142b19a5c435a0b4252ffd297504bde69eb44b0
(cherry picked from commit 7e9e37fa0a)
Merged-In: Ie142b19a5c435a0b4252ffd297504bde69eb44b0
Since vehicle client may contains some Android-specific types/headers
that may not exist on AGL, we split the header into "client" and "server".
It won't change the logic of Android codes.
Bug: 148877226
Bug: 150791171
Test: build
Change-Id: I550034b071ca6a7ca322fb26b61d76ed4a7307ee
(cherry picked from commit 8dfac92fee)
Merged-In: I550034b071ca6a7ca322fb26b61d76ed4a7307ee
Bug: 146207078
Bug: 150409377
Bug: 150413515
Test: not really
Exempt-From-Owner-Approval: only changed bug numbers on TODO omments
Change-Id: If71f62ed0ca5e2a088e4663cacdf8c9504c5df5d
* changes:
Merge nested namesapces
Split client and server impl
Split vehicle client and server interface header
Add headers and macros for building VHAL server for AGL
Some of the code in VHAL client implementation contains Android-specific
code, and some of the server operations only works in the native case.
So we split them up so that the AGL VHAL server can selectivly pick the
parts it needs.
It won't change the logic of native VHAL.
Bug: 148877226
Test: Build
Change-Id: Ie142b19a5c435a0b4252ffd297504bde69eb44b0
Since vehicle client may contains some Android-specific types/headers
that may not exist on AGL, we split the header into "client" and "server".
It won't change the logic of Android codes.
Bug: 148877226
Test: build
Change-Id: I550034b071ca6a7ca322fb26b61d76ed4a7307ee
Adds a new property for rotary knobs that can spin indefinitely.
Test: Changed Hawk VHAL to use new property for volume
Change-Id: I74eb664e243b5796f7bccb2debd9c440bf430f7d
Clarify the descriptions of VehicleApPowerStateReq and
VehicleApPowerStateReport.
Fixes: 128841180
Test: None. Documentation only.
Change-Id: Icbe86e2e6a761e37adf2689596eb81bb68295fa7
It was not validating the input before storing the response form lshal, which
would crash it later.
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896583 a 2
Bug: 146207078
Change-Id: I49a38041e2881224c61e3c645db7c9103d024040
AAOS virtualization work is happening under the trout tree, and
we should be building reference HAL implementations for the
virtualized deployment under that tree
Bug: 148816426
Test: build
Change-Id: I90fd2bc4191f8076475e034c7feb07b2664e63c8
This (optional) function allows the HAL implementation customize lshal debug;
for example, it could:
- augment dump() by dumping its own state
- disable dump()
- dump specific state based on arguments
- run custom commands based on arguments
This CL also implements this method in the emulated vehicle HAL, where it adds
options to dump the user-related state.
Bug: 146207078
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal
Test: atest android.hardware.automotive.vehicle@2.0-manager-unit-tests \
android.hardware.automotive.vehicle@2.0-default-impl-unit-tests
Change-Id: If04e8222a31448f170ab2b54552051196b6ab958
This property is called by Android when it starts, and it's expecting a
property change indicating what the initial user should be.
During normal circumstances, the emulator will reply right away, passing a
response if InitialUserInfoResponseAction::DEFAULT (so Android could use its
own logic to decide which user to boot).
But during development / testing, the behavior can be changed using lshal dump,
so the following scenarios can be tested:
- property timeout
- HAL response using a different request id
- user switch
- user creation
Bug: 146207078
Test: manual tests with lshal and a modified CarServiceHelper
Test: atest android.hardware.automotive.vehicle@2.0-manager-unit-tests \
android.hardware.automotive.vehicle@2.0-default-impl-unit-tests
Change-Id: Ia5be62c8b19a168c0c6da5307169fc14bf3069c9
- CREATE_USER: called after an Android user is created.
- REMOVE_USER: called after an Android user is removed.
- USER_IDENTIFICATION_ASSOCIATION: associates an Android user with
vehicle artifacts like a key FOB.
This CL only defines the new types, they're not implemented or used yet.
Test: m -j android.hardware.automotive.vehicle@2.0-service
Bug: 146207078
Change-Id: Idb399df55567402edb1b954b1c4b25f69e810a81
Provide helper functions that create VsockServerInfo objects
from either the command line or the property storage, and
have them return optional instead of relying on default values.
Also, avoid atoi() since it has the potential for undefined behavior.
Test: build
Change-Id: I0aab6b7d84e5084580e25217ac5ba4f5a1db6e2a
These initial properties are:
- INITIAL_USER_INFO: gets information about the initial user, it will
replace the android.car.systemuser.bootuseroverrideid system property
approach.
- SWITCH_USER_REQUEST: used to communicate a user switch request from
Android to HAL, or vice versa.
This CL only defines the new types, they're not implemented or used yet.
Test: m -j android.hardware.automotive.vehicle@2.0-service
Bug: 146207078
Change-Id: I25055f8adc90aaebaf3a3faa9a9b73c284440624
Test: tested on Cuttlefish VM
- Use virtualization HAL implementation, device/google/cuttlefish/shared/auto/device.mk, PRODUCT_PACKAGES:
remove android.hardware.automotive.vehicle@2.0-service
add:
android.hardware.automotive.vehicle@2.0-virtualization-service
android.hardware.automotive.vehicle@2.0-virtualization-grpc-server
- configure the server CID and port, add the following device/google/cuttlefish/shared/config/init.vendor.rc:
setprop ro.vendor.vehiclehal.server.cid 3
setprop ro.vendor.vehiclehal.server.port 9210
- Build and Launch cuttlefish VM
m && acloud create --boot-timeout 3600 -vv --local-instance --local-image
- VHAL should work as normal, see tests in ag/9693857
Bug: b/141493212
Change-Id: I97df02dd26b89f60d3d87b2c32c4f4f8919b1294
Make VHAL to use the connector/server interfaces instead of talking to
the (faked) vehicle directly. Use passthrough connector for now since we
have not moved to the virtualized scenario yet (but soon :)
Bug: b/141493212
Test: On both Osprey and Hawk. Build and flash the image. If on Osprey, see
go/enable-google-vhal-on-osprey; if on hawk, `aae app vhal apply google`
to enable Google VHAL
```
# no VHAL crash
$ adb logcat
$ vts-tradefed
> run vts-hal-auto -m VtsHalAutomotiveVehicleV2_0Host
# 30 passed, 2 failed, the same as the result before this patch
# See value changed in Vehicle HAL tab, KitchenSink app:
$ python packages/services/Car/tools/emulator/prop_event_simulator.py --property
VEHICLEPROPERTY_HVAC_AC_ON --area 0 --value 1
# unit tests
$ atest packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java
```
Change-Id: Iab77a0ae32db2c55b4c65aa8f3e4f73ec9ef2644
Some functions are copyed from the original VHAL implementation. The
ones left in the old implementation will be removed after enabling the
Vehicle Connector. Keeping them right now because otherwise it will
break the build.
Bug: b/141493212
Test: since nothing changed in the "active" code, just compiled by `mm`
Change-Id: Ibf525ffe056d6a4c789a7a407eb0b54f61858041
- This allows disabling specific optional features in car service from
vehicle hal layer.
Bug: 144504820
Test: run with car service
Change-Id: I419ad86b75151aba129730bdc75c9bc1e47333cf
These methods are needed in the HAL client to parse sequence number and
associated layers when the availablity of the VMS layers change.
HAL client relies on these messages by either explicitly requesting the
availability or through availability change message sent by the Car
service.
Bug: 144434783
Fixes: 144434783
Test: Added new tests for the new methods. Ran the tests on Hawk.
Change-Id: I09497640367a894e1dfb6143ac3bbdb63d64b53e
Add property SUPPORT_CUSTOMIZE_VENDOR_PERMISSION.
Add enum VehicleVendorPermission.
The configArray of new property indicate vendor property Id and
the permission selected by vendor.
Update google VHAL as an example how to use it.
Bug: 109950289
Test: build and flash with google HAL
check permission via property test in KitchenSink
Change-Id: Ic8dcb661ce69bfb82ebc00781426dfbb98fb393d
C++20 will require members in a designated initializer to be in order
unlike C99.
Bug: 139945549
Test: mm
Merged-In: I17d1d262d71eefa0aa5b89da7acc659bc2f97bbd
Change-Id: I4e18c0f68606c3e8d965aab194f2a5fd5000c59a
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
C++20 will require members in a designated initializer to be in order
unlike C99.
Bug: 139945549
Test: mm
Change-Id: I17d1d262d71eefa0aa5b89da7acc659bc2f97bbd
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
The Vehicle HAL can tell us to shut down immediately, but it cannot
tell us to suspend immediately. Add that capability.
This capability will be needed when the VHAL initiates a Silent
Boot and then asks for suspension. In this case, we do not want
to postpone the suspension by entering Garage Mode.
Bug: 134521909
Test: Added CarPowerManagementTest.testSleepImmediateEntry()
Test: Added CarPowerManagementServiceTest.testSleepImmediately()
Change-Id: I8190d16cb6faa15672ec3d61f126f6d283d1189e
Chaining the method calls in such a way otherwise returns a dangling
pointer to a temporary object.
Bug: 139945549
Test: mm
Change-Id: I0783fccbb6f11e7e37bd059445265227359649cf
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
There is nothing named enum_vehicle_ap_power_state_shutdown_param_type
in the Vehicle HAL source tree. The right greppable type name is
VehicleApPowerStateShutdownParam.
Test: git diff
Change-Id: Ib6c8be491df9aa6cb3143b28a12b70bd4b8c29cc
Change AP_POWER_STATE_REPORT's access property from WRITE to READ_WRITE.
In Vehicle environment some hals communicate with external ecu,
so they must know the boot reason.
(Not only on, but DEEP_SLEEPY_EXIT, ON, CANCELD)
To handle this, AOSP provide CarPowerManager, but it use AIDL.
But, in treble, vendor process must communicate with system process via hidl.
So, vendor processes(almost hal), can't use CarPowerManager.
(Beside, CarPowerManager use /dev/binder but vendor process use /dev/vndbinder).
If hals subscribe AP_POWER_STATE_REPORT via vehicle hal,
they can handle the power state.
bug: 140370318
Merged-In: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Change-Id: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Change AP_POWER_STATE_REPORT's access property from WRITE to READ_WRITE.
In Vehicle environment some hals communicate with external ecu,
so they must know the boot reason.
(Not only on, but DEEP_SLEEP_EXIT, ON, CANCELED)
To handle this, AOSP provide CarPowerManager, but it use AIDL.
But, in treble, vendor process must communicate with system process via hidl.
So, vendor processes(almost hal), can't use CarPowerManager.
(Beside, CarPowerManager use /dev/binder but vendor process use /dev/vndbinder).
If hals subscribe AP_POWER_STATE_REPORT via vehicle hal,
they can handle the power state.
Bug: 140370318
Test: Verified on Hawk
Change-Id: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Add three vendor properties for e2e test. By using those
properties, it will mock the behavior of car's ECU.
Bug: 140581574
Test: run test in VehcileHAL_test
Change-Id: Ibf80419fb56532878fa8e6d4b4b105bcc6c41045
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
Check timestamp before updating property value.
Use timestamp in generating fake property event.
Bug: 134963097
Test: end to end test in VehcileHal_test
Change-Id: I60f8c0eb3a19db2c165469bb45b3b80b39388b37
Currently, we do not have a way to parse subscriptions response
messages. But we have parsing methods for SUBSCRIPTIONS_CHANGE type of
messages. These messages have the exact same payload as SUBSCRIPTIONS_RESPONSE
messages. So all we need to do is allow existing methods to parse
SUBSCRIPTIONS_RESPONSE messages along with SUBSCRIPTIONS_CHANGE
messages.
Bug: 138664881
Fixes: 138664881, 137955333
Test: Added more tests for the new message type. Ran tests on Hawk.
Change-Id: I53432e2215e03bb94fd36b7d62f42fe0be1994cf
Add kMixedTypePropertyForTest for E2E test
Bug: 133334962
Test: change VHAL to google HAL and run vehiclehal_test
Change-Id: Ib9a9708830c4357f9cfc3de6e29d951072e2d2aa
Add a new property stands for electric defrosters.
Add a enum unknown in VehicleHvacFanDirection.
Add the new property into Google VHAL config file.
Bug: 126756367
Bug: 132187457
Test: build and flash
Change-Id: I853666ebbb0f5286ce59faeb02f0f37259a88c54
Root cause: Default (without specification in implementation) minimum sample rate is 0.0f. VTS tests minimum sample rate should be larger than 0.0f.
Adds minimum and maximum sample rate for continuous property.
Bug: 136215520, 138316549
Test: vts-tradefed run vts-hal-auto -m VtsHalAutomotiveVehicleV2_0Host
Change-Id: I324c3e05f4d8c6100d370031d0072e8231a43267
Update defaultConfig according to types.hal
Bug: 136215520
Test: 1. replace vhal to default vhal
2. run unit tests under vehicleHal_test
Change-Id: Id0b58bc9e2cc18d68ea44387ce7634f053e51e1c
Removed the dependency on the fact that the core's new ID is always >= existing ID.
New ID and the old ID may not have any such relation.
Bug: 135475397
Fixes: 135475397
Test: Updated unit tests in VmsUtilsTest. Ran the tests on Hawk.
Change-Id: I5a7e72f36a84f5bf2d3c7bf1ccb89d27c5c0da97
Update properties for DefaultHal and it is also be a code
sample for adding new properties.
Bug: 134988550
Test: flash it and verify property by kitchenSink
Change-Id: Iedf3ea5b288acfe95b3c676d90660435b34ed367
Corrected "CreateDataMessageWithLayerPublisherInfo" to "createDataMessageWithLayerPublisherInfo"
Bug: 135051289
Fixes: 135051289
Test: Updated tests in VmsUtilsTest. Ran the tests on Hawk.
Change-Id: Ie5e130e125b90689d13a3f9bb8fa1f2f8a2bcbe0
Before, it used to process only the payload but now it also
takes in VMS layer info and publisher ID.
Bug: 135051289
Fixes: 135051289
Test: Updated unit tests in VmsUtilsTest. Ran the tests on Hawk.
Change-Id: I6c11f95a815af5d7b9fc9288692285766d2ca98f
Clarify when range in VehcileAreaConfig need to be specified.
Change Range_remaining to be read only.
Update docmentation about Night Mode.
Bug: 126908895
Bug: 128607457
Test: Flash and build
Change-Id: Ifcf92bcc9eed3859d8a846d55e824c2b00d61d19
Bug:131165419
Fixes: 131165419
Test: Added new unit tests for both the new functions in VmsUtilsTest.
Ran the tests on Hawk.
Change-Id: Ie750983762b5706054ace35c5671f88b6457477a
hidl-generated makefiles are now generated such that bpfmt(file) == file.
Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
1. Added new API/utility functions to support publishing VMS messages from HAL client.
2. Fixed creation of offering message by adding publisher ID
3. Fixed an existing failing test from VmsHalManager_test.cpp
Bug: 129475485
Bug: 129163926
Fixes: 129475485
Fixes: 129163926
Test: Added tests for all the new and updated functions in VmsUtilsTest.
Ran the tests on Hawk.
Change-Id: Ie561dafb86d137a4fdf3042e033f8cb133b4aca7
Add and update VHAL properties and permissions.
Bug: 112435211, 120095752
Test: build and run on HAWK
Change-Id: Ia750a472e0185a6f858d23e638c535f67bc86c00
(cherry picked from commit fa638809675178b2f517f02b85bd372b47c08cf2)
Add min/maxSampleRate for some properties and add new static
properties.
Bug: 112596543
Test: Build and flash into Mojave
Run vts-hal-auto test
Change-Id: Ide0c09e4790770e5415ca223b2e09f5958b5e783
(cherry picked from commit 3acc549fa87fbe19b181edea39eead0772f75822)
Bug: b/118139582
Test: Get and set the VHAL properties.
Exempt-From-Owner-Approval: Nobody on the owners list works on AAE.
Change-Id: Ib2274a7f347d962d80ce9213c4ae17a2f44b74ad
(cherry picked from commit 6ef517989fb25a39536c65b1636c1292f8bdcec1)
Descible hebavior for VHAL property set with value out of bounds
Change comments.
Bug: 112204545
Test: build and flash
Change-Id: I48cf2f8dfb8a175992535db17d8f69e8fde1f34c
(cherry picked from commit 2234dc2e4f3d55ea9e8cbb4ec11544ca0207625d)
Bug: b/111797715
Test: Set and get the properties.
Exempt-From-Owner-Approval: Nobody on the owners list is left on AAE.
Change-Id: I24b79ffed2e53dd260f482d6fa00ea05f3fb073a
(cherry picked from commit 6e90b0e9660e5bb9fa5c48a7c601ac4a9117f398)
Bug: 119687687
Test: Build and install.
Exempt-From-Owner-Approval: Trivial change. Updating old int value.
Change-Id: Idf3c89f330303b79a2ddfd336402546ccae31f16
(cherry picked from commit 005ec2d45418c190391a1ad17fba3e8bd64e3198)
Bug: 117947229
Test: Reboot Mojave, it stays on
Change-Id: Ia36d71343e43d59c07dc76b3cc7b7d45376d898c
(cherry picked from commit b91f9c3bad3948cb5804949a858835219e9aeac3)
Bug: 110105682
Test: build, deploy, test updating temp via app UI, temp change reflected in subscribed system UI
Change-Id: I75e6825ff9450f977c1f5d7f2b97bca6c78f1883
(cherry picked from commit 6d8110ffbf7e964246c13810d909b3a5cf7818b6)
Previously, when running under the emulator, it would only connect to
the emulator's qemu pipe and you couldn't script the emulated VHAL.
Also changed the logic of SocketComm so that it supports connections
from more than one client at a time.
Bug: 87643732
Test: tested locally
Change-Id: I504cd806f0a95799a68b75c3515c1f230109f1d0
(cherry picked from commit 8dad67a0148114cb60f3567268bc2cf40ff18f82)
Cleanup defaultconfig.h to have proper initial values so that all
properties may be tested with EmbeddedKitchenSink.
Bug: 109674339
Test: Embedded Kitchen Sink
Change-Id: I3007c645b90b0e6805b8d1011c3a8d659eb13d2b
All but this enum follow the naming pattern. Now Wheels do too.
Test: Build Mojave and Owl
Bug: 79995183
Change-Id: Ifa9efd50aaae13ac7f437c5efe8cf70aa64218e9
ConfigArray replaces the need for configFlags. Deprecate this before it
gets released.
Bug: 74133619
Test: grep -ril configflag shows all instances removed
Change-Id: I645862507959738eb2739e70a53827b749e88aeb
(1) Specify rules for property to area mapping
(2) Fix comment for WHEEL_TICK property
(3) Document the need for supported gears from vhal. CURRENT_GEAR and GEAR_SELECTION should report the list of available gears in the vehicle. This helps in determining the driving state of the vehicle.
Merge changes from ag/4051112 ag/4026897
Bug: 79434788
Bug: 77849652
Bug: 79260189
Test: Build and Flash
Change-Id: Ib2bd488a5ec09fe3bdf8807c253aebcdb240324b