Car service feature control

By default, most car services are mandatory and are always enabled. However, you can designate a subset of car services to be optional because some features might not be supported in every car.

List of optional features

The optional car control features you can enable and disable are listed in the table below.

Car control feature String value
Car EVS service car_evs_service
Car experimental keyguard service experimental_car_keyguard_service
Car navigation service car_navigation_service
Car occupant connection service car_occupant_connection_service
Car remote access service car_remote_access_service
Car remote device service car_remote_device_service
Car telemetry service car_telemetry_service
Car user notice service com.android.car.user.CarUserNoticeService
Cluster home service cluster_home_service
Diagnostic service diagnostic
Occupant awareness wervice occupant_awareness
Storage monitoring service storage_monitoring
Vehicle map service vehicle_map_service

Enable and disable car control features

You can control support for features in your builds in one of two ways, either with runtime resource overlays (RROs) or through the Vehicle Hardware Abstraction Layer (VHAL).

Use RROs

Use the resource configuration named config_allowed_optional_car_features, which lists all the optional features you can enable. When a car is first booted up, possible optional car features are noted and are enabled if they're not blocklisted by the VHAL. To learn more RROs, see Change the value of an app's resources at runtime.

Use the VHAL

The Vehicle Hardware Abstraction Layer (VHAL) controls features by serving as a blocklist to disable specific optional features. The VHAL property named DISABLED_OPTIONAL_FEATURES lists the optional features in the overlay that are to be disabled. If this property doesn't exist, then the list of optional features from the RROs are all enabled. To learn more about the VHAL, see the VHAL overview.

Use debug shell commands

A third way to control which optional features to enable or disable is through the use of a pair of shell commands, which are available only in user-debug builds and are provided for use by developers. The table in List of optional features contains the values to use instead of <FEATURE_STRING_VALUE>.

To enable a feature:

adb root; adb shell cmd car_service enable-feature <FEATURE_STRING_VALUE>; adb reboot

To disable a feature:

adb root; adb shell cmd car_service disable-feature <FEATURE_STRING_VALUE>; adb reboot

Determine which features are enabled

When debugging issues related to specific features, it can be helpful to know which features are enabled and why. To dump feature-related information, run:

adb shell dumpsys car_service --services CarFeatureController

This command lists the types of information shown below.

Value Description
mEnabledFeatures Currently enabled features.
mDefaultEnabledFeaturesFromConfig Optional features listed in config_allowed_optional_car_features.
mDisabledFeaturesFromVhal Features specified by the VHAL to be disabled in the VHAL property, DISABLED_OPTIONAL_FEATURES.
mPendingEnabledFeatures Features to be enabled upon a reboot.
mPendingDisabledFeatures Features to be disabled after a reboot.