From faa582d942854202cfc9978bcbf40a57f5a9e7cf Mon Sep 17 00:00:00 2001 From: Philip Chen Date: Fri, 3 Feb 2023 14:35:09 -0800 Subject: Convert sdk_car_* from 32/64-bit-mixed to 64-bit-only build Drop legacy 32-bit app support for sdk_car_arm64, sdk_car_x86_64, and sdk_car_md_x86_64.mk to align with Google car emulators (sdk_gcar_* and gcar_emu_*). Bug: 262800138 Test: build and launch sdk_car_x86_64 emulator Change-Id: Ib5119cd98138e6f840c7a591dd049c7f72f69f14 --- emulator/car_emulator_vendor.mk | 8 ++++++-- sdk_car_arm64.mk | 8 ++++---- sdk_car_md_x86_64.mk | 2 +- sdk_car_x86_64.mk | 8 ++++---- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/emulator/car_emulator_vendor.mk b/emulator/car_emulator_vendor.mk index 02cf492..f35a57e 100644 --- a/emulator/car_emulator_vendor.mk +++ b/emulator/car_emulator_vendor.mk @@ -39,9 +39,13 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES += \ ro.carwatchdog.client_healthcheck.interval=20 \ ro.carwatchdog.vhal_healthcheck.interval=10 \ + ro.surface_flinger.has_wide_color_display=false \ + ro.surface_flinger.has_HDR_display=false \ + ro.surface_flinger.protected_contents=false \ + ro.surface_flinger.use_color_management=false ifeq (,$(ENABLE_REAR_VIEW_CAMERA_SAMPLE)) -ENABLE_REAR_VIEW_CAMERA_SAMPLE:=true +ENABLE_REAR_VIEW_CAMERA_SAMPLE := true endif # Auto modules @@ -137,4 +141,4 @@ endif # BUILD_EMULATOR_CLUSTER_DISPLAY endif # EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG # Goldfish vendor partition configurations -$(call inherit-product-if-exists, device/generic/goldfish/vendor.mk) +$(call inherit-product-if-exists, device/generic/goldfish/64bitonly/product/vendor.mk) diff --git a/sdk_car_arm64.mk b/sdk_car_arm64.mk index 8b2dad5..aff0f52 100644 --- a/sdk_car_arm64.mk +++ b/sdk_car_arm64.mk @@ -21,7 +21,7 @@ PRODUCT_USE_DYNAMIC_PARTITIONS := true # # All components inherited here go to system image # -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) $(call inherit-product, packages/services/Car/car_product/build/car_generic_system.mk) PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := strict @@ -40,11 +40,11 @@ $(call inherit-product, device/generic/car/emulator/car_emulator_product.mk) # All components inherited here go to vendor image # $(call inherit-product, device/generic/car/emulator/car_emulator_vendor.mk) -$(call inherit-product-if-exists, device/generic/goldfish/arm64-vendor.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/board/emulator_arm64/device.mk) +$(call inherit-product, device/generic/goldfish/64bitonly/product/arm64-vendor.mk) +$(call inherit-product, device/generic/goldfish/emulator64_arm64/device.mk) EMULATOR_VENDOR_NO_SOUND := true PRODUCT_NAME := sdk_car_arm64 -PRODUCT_DEVICE := emulator_arm64 +PRODUCT_DEVICE := emulator_car64_arm64 PRODUCT_BRAND := Android PRODUCT_MODEL := Car on arm64 emulator diff --git a/sdk_car_md_x86_64.mk b/sdk_car_md_x86_64.mk index 5591261..b2c7716 100644 --- a/sdk_car_md_x86_64.mk +++ b/sdk_car_md_x86_64.mk @@ -59,6 +59,6 @@ $(call inherit-product, device/generic/car/sdk_car_x86_64.mk) PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := false PRODUCT_NAME := sdk_car_md_x86_64 -PRODUCT_DEVICE := emulator_car_x86_64 +PRODUCT_DEVICE := emulator_car64_x86_64 PRODUCT_BRAND := Android PRODUCT_MODEL := Car multi-display on x86_64 emulator diff --git a/sdk_car_x86_64.mk b/sdk_car_x86_64.mk index 79a3ce2..9c97307 100644 --- a/sdk_car_x86_64.mk +++ b/sdk_car_x86_64.mk @@ -21,7 +21,7 @@ PRODUCT_USE_DYNAMIC_PARTITIONS := true # # All components inherited here go to system image # -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) $(call inherit-product, packages/services/Car/car_product/build/car_generic_system.mk) PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := strict @@ -40,11 +40,11 @@ $(call inherit-product, device/generic/car/emulator/car_emulator_product.mk) # All components inherited here go to vendor image # $(call inherit-product, device/generic/car/emulator/car_emulator_vendor.mk) -$(call inherit-product-if-exists, device/generic/goldfish/x86_64-vendor.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/board/emulator_x86_64/device.mk) +$(call inherit-product, device/generic/goldfish/64bitonly/product/x86_64-vendor.mk) +$(call inherit-product, device/generic/goldfish/emulator64_x86_64/device.mk) EMULATOR_VENDOR_NO_SOUND := true PRODUCT_NAME := sdk_car_x86_64 -PRODUCT_DEVICE := emulator_car_x86_64 +PRODUCT_DEVICE := emulator_car64_x86_64 PRODUCT_BRAND := Android PRODUCT_MODEL := Car on x86_64 emulator -- cgit v1.2.3 From 6d1d10181e44ec7799d1e02d6841f171654bd9a6 Mon Sep 17 00:00:00 2001 From: Howard Date: Mon, 27 Feb 2023 14:06:56 -0800 Subject: Remove deprecated DataCenter from preinstalled packages config. Bug: 269520654 Test: None required, app disabled Change-Id: I56b1a04923703faab737b4033f0cfdff2596973f --- common/preinstalled-packages-product-car-emulator.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/common/preinstalled-packages-product-car-emulator.xml b/common/preinstalled-packages-product-car-emulator.xml index 75ac5c8..8fa279a 100644 --- a/common/preinstalled-packages-product-car-emulator.xml +++ b/common/preinstalled-packages-product-car-emulator.xml @@ -85,9 +85,6 @@ Apps that do need to run on SYSTEM and evaluated by package owner. Here the apps will have FULL only. --> - - - @@ -151,9 +148,6 @@ - - - -- cgit v1.2.3 From 9d4b1a40fbb4dd7856eebf07a841ebcedce23b44 Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Wed, 8 Mar 2023 22:47:05 +0000 Subject: Added car mirror devices to emulator Bug: 265973263 Test: atest com.android.car.audio Change-Id: Ic10479e9b82b80e56553c06fd239115cc6e714fd --- emulator/audio/audio_policy_configuration.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/emulator/audio/audio_policy_configuration.xml b/emulator/audio/audio_policy_configuration.xml index 6d53592..f8a05ed 100644 --- a/emulator/audio/audio_policy_configuration.xml +++ b/emulator/audio/audio_policy_configuration.xml @@ -65,6 +65,7 @@ bus101_audio_zone_1 bus200_audio_zone_2 bus201_audio_zone_2 + bus1000_mirror_device Built-In Mic Built-In Back Mic Echo-Reference Mic @@ -131,6 +132,11 @@ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + + + @@ -248,7 +254,17 @@ + address="bus101_audio_zone_1"> + + + + + + @@ -340,6 +356,7 @@ sources="mixport_bus7_system_sound_out"/> + Date: Mon, 15 May 2023 17:34:08 -0700 Subject: Update the occupant zone configs to match magpie Change occupant zone configuration to driver + 2 rear passengers for a more consistent multidisplay reference experience. Bug: 277822560 Test: Launched gcar_md_emu emulator and verified user picker and control center naming was consistent. Change-Id: I745fc8d08029c84126450effdae3bcf25c4be0f7 --- .../rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml index d88c016..c314467 100644 --- a/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml +++ b/emulator/cluster/rro_overlays/CarServiceOverlay_MdOsDouble/res/values/config.xml @@ -40,9 +40,9 @@ --> occupantZoneId=0,occupantType=DRIVER,seatRow=1,seatSide=driver - occupantZoneId=1,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=oppositeDriver - occupantZoneId=2,occupantType=REAR_PASSENGER,seatRow=2,seatSide=left - occupantZoneId=3,occupantType=REAR_PASSENGER,seatRow=2,seatSide=right + occupantZoneId=1,occupantType=REAR_PASSENGER,seatRow=2,seatSide=left + occupantZoneId=2,occupantType=REAR_PASSENGER,seatRow=2,seatSide=right + occupantZoneId=3,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=oppositeDriver true - - com.android.server.inputmethod.InputMethodManagerServiceProxy$Lifecycle false -- cgit v1.2.3 From 8468a48fd8a2b406c4d9f350f292f7ec5094ad6a Mon Sep 17 00:00:00 2001 From: Marcell Kovacs Date: Fri, 23 Jun 2023 22:06:48 +0000 Subject: Revert "Revert "Add UWB goldfish HAL"" This reverts commit b6a8216a79f55807de33bdded09055810e02ba83. Reason for revert: Resubmit with a fix Change-Id: I133c175fd2e51c6af91656d899ad44f5347a4877 --- emulator/aosp_car_emulator.mk | 2 + emulator/car_emulator_vendor.mk | 9 +- emulator/uwb_hal/Android.bp | 40 +++++ emulator/uwb_hal/sepolicy/file_contexts | 2 + emulator/uwb_hal/sepolicy/property_contexts | 3 + emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te | 20 +++ emulator/uwb_hal/service.cpp | 44 ++++++ emulator/uwb_hal/uwb-goldfish.mk | 31 ++++ emulator/uwb_hal/uwb-service-goldfish.rc | 8 + emulator/uwb_hal/uwb-service-goldfish.xml | 10 ++ emulator/uwb_hal/uwb.cpp | 56 +++++++ emulator/uwb_hal/uwb.h | 49 +++++++ emulator/uwb_hal/uwb_chip.cpp | 203 ++++++++++++++++++++++++++ emulator/uwb_hal/uwb_chip.h | 65 +++++++++ 14 files changed, 541 insertions(+), 1 deletion(-) create mode 100644 emulator/uwb_hal/Android.bp create mode 100644 emulator/uwb_hal/sepolicy/file_contexts create mode 100644 emulator/uwb_hal/sepolicy/property_contexts create mode 100644 emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te create mode 100644 emulator/uwb_hal/service.cpp create mode 100644 emulator/uwb_hal/uwb-goldfish.mk create mode 100644 emulator/uwb_hal/uwb-service-goldfish.rc create mode 100644 emulator/uwb_hal/uwb-service-goldfish.xml create mode 100644 emulator/uwb_hal/uwb.cpp create mode 100644 emulator/uwb_hal/uwb.h create mode 100644 emulator/uwb_hal/uwb_chip.cpp create mode 100644 emulator/uwb_hal/uwb_chip.h diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 85e18ac..2add36c 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -29,6 +29,8 @@ $(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk) $(call inherit-product, device/generic/car/emulator/rotary/car_rotary.mk) # Enables USB related passthrough $(call inherit-product, device/generic/car/emulator/usbpt/car_usbpt.mk) +# Enable simulated UWB. +$(call inherit-product, device/generic/car/emulator/uwb_hal/uwb-goldfish.mk) TARGET_PRODUCT_PROP := device/generic/car/emulator/usbpt/bluetooth/bluetooth.prop diff --git a/emulator/car_emulator_vendor.mk b/emulator/car_emulator_vendor.mk index 37669d9..b910400 100644 --- a/emulator/car_emulator_vendor.mk +++ b/emulator/car_emulator_vendor.mk @@ -48,13 +48,20 @@ ifeq (,$(ENABLE_REAR_VIEW_CAMERA_SAMPLE)) ENABLE_REAR_VIEW_CAMERA_SAMPLE := true endif +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml # Auto modules PRODUCT_PACKAGES += \ android.hardware.automotive.vehicle@V1-emulator-service \ android.hardware.broadcastradio-service.default \ android.hardware.audio.service-caremu \ android.hardware.automotive.remoteaccess@V1-default-service \ - android.hardware.automotive.ivn@V1-default-service + android.hardware.automotive.ivn@V1-default-service \ + android.hardware.uwb-goldfish-service \ + ServiceUwbResources \ + com.google.android.uwb \ + android.hardware.uwb \ + com.android.uwb \ # Copy car_core_hardware and overwrite handheld_core_hardware.xml with a disable config. # Overwrite goldfish related xml with a disable config. diff --git a/emulator/uwb_hal/Android.bp b/emulator/uwb_hal/Android.bp new file mode 100644 index 0000000..075be15 --- /dev/null +++ b/emulator/uwb_hal/Android.bp @@ -0,0 +1,40 @@ +// TODO: add license +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "hardware_interfaces_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + + //default_applicable_licenses: ["hardware_interfaces_license"], +} + +cc_binary { + name: "android.hardware.uwb-goldfish-service", + relative_install_path: "hw", + init_rc: ["uwb-service-goldfish.rc"], + vintf_fragments: ["uwb-service-goldfish.xml"], + vendor: true, + cflags: [ + "-Wall", + "-Wextra", + "-g", + ], + shared_libs: [ + "liblog", + "libbinder_ndk", + ], + static_libs: [ + "libbase", + "libutils", + "android.hardware.uwb-V1-ndk", + ], + whole_static_libs: [ + "//device/generic/goldfish:libqemud.ranchu", + ], + srcs: [ + "service.cpp", + "uwb.cpp", + "uwb_chip.cpp", + ], +} diff --git a/emulator/uwb_hal/sepolicy/file_contexts b/emulator/uwb_hal/sepolicy/file_contexts new file mode 100644 index 0000000..a908682 --- /dev/null +++ b/emulator/uwb_hal/sepolicy/file_contexts @@ -0,0 +1,2 @@ +# UWB Goldfish HAL +/vendor/bin/hw/android\.hardware\.uwb-goldfish-service u:object_r:hal_uwb_vendor_goldfish_exec:s0 diff --git a/emulator/uwb_hal/sepolicy/property_contexts b/emulator/uwb_hal/sepolicy/property_contexts new file mode 100644 index 0000000..cd69580 --- /dev/null +++ b/emulator/uwb_hal/sepolicy/property_contexts @@ -0,0 +1,3 @@ +vendor.qemu.preferred.uwb.service u:object_r:vendor_qemu_prop:s0 +vendor.qemu.preferred.uwb.service.ip u:object_r:vendor_qemu_prop:s0 +vendor.qemu.preferred.uwb.service.port u:object_r:vendor_qemu_prop:s0 diff --git a/emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te b/emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te new file mode 100644 index 0000000..0346d39 --- /dev/null +++ b/emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te @@ -0,0 +1,20 @@ +type hal_uwb_vendor_goldfish, domain; +type hal_uwb_vendor_goldfish_exec, vendor_file_type, exec_type, file_type; +init_daemon_domain(hal_uwb_vendor_goldfish) + +#============= hal_uwb_vendor_goldfish ============== +allow hal_uwb_vendor_goldfish fwmarkd_socket:sock_file write; +# TODO: The next line conflicts with a neverallow declaration. +# allow hal_uwb_vendor_goldfish hal_uwb_service:service_manager add; +allow hal_uwb_vendor_goldfish netd:unix_stream_socket connectto; +allow hal_uwb_vendor_goldfish port:tcp_socket name_connect; +allow hal_uwb_vendor_goldfish self:tcp_socket { connect create getopt read write }; +allow hal_uwb_vendor_goldfish servicemanager:binder { call transfer }; +allow hal_uwb_vendor_goldfish system_server:binder { call transfer }; + +#============= netd ============== +allow netd hal_uwb_vendor_goldfish:fd use; +allow netd hal_uwb_vendor_goldfish:tcp_socket { getopt read setopt write }; + +#============= system_server ============== +allow system_server hal_uwb_vendor_goldfish:binder { call transfer }; \ No newline at end of file diff --git a/emulator/uwb_hal/service.cpp b/emulator/uwb_hal/service.cpp new file mode 100644 index 0000000..f814f69 --- /dev/null +++ b/emulator/uwb_hal/service.cpp @@ -0,0 +1,44 @@ +/* + * Copyright 2021, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include "uwb.h" + +#define LOG_TAG "android.hardware.uwb" + +using ::aidl::android::hardware::uwb::IUwb; +using ::android::sp; +using ::android::base::InitLogging; +using ::android::base::StderrLogger; +using ::android::hardware::uwb::impl::Uwb; + +int main(int /*argc*/, char* argv[]) { + InitLogging(argv); + LOG(INFO) << "UWB Goldfish HAL starting up"; + + ABinderProcess_setThreadPoolMaxThreadCount(0); + std::shared_ptr uwb = ndk::SharedRefBase::make(); + const std::string instance = std::string() + IUwb::descriptor + "/default"; + binder_status_t status = AServiceManager_addService(uwb->asBinder().get(), instance.c_str()); + CHECK(status == STATUS_OK); + + ABinderProcess_joinThreadPool(); + return EXIT_FAILURE; // should not reach +} diff --git a/emulator/uwb_hal/uwb-goldfish.mk b/emulator/uwb_hal/uwb-goldfish.mk new file mode 100644 index 0000000..cd964cb --- /dev/null +++ b/emulator/uwb_hal/uwb-goldfish.mk @@ -0,0 +1,31 @@ +# +# Copyright (C) 2022 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Declare UWB support +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml + +# TODO: some might be redundant here. +# Install relevant packages +PRODUCT_PACKAGES += \ + android.hardware.uwb-goldfish-service \ + ServiceUwbResources \ + com.google.android.uwb \ + android.hardware.uwb \ + com.android.uwb \ + +# Additional selinux policy +BOARD_SEPOLICY_DIRS += device/generic/car/emulator/uwb_hal/sepolicy diff --git a/emulator/uwb_hal/uwb-service-goldfish.rc b/emulator/uwb_hal/uwb-service-goldfish.rc new file mode 100644 index 0000000..eae2bd1 --- /dev/null +++ b/emulator/uwb_hal/uwb-service-goldfish.rc @@ -0,0 +1,8 @@ +service vendor.uwb_hal_goldfish /vendor/bin/hw/android.hardware.uwb-goldfish-service + class hal + user uwb + group system inet root uwb + capabilities NET_ADMIN NET_RAW + +on property:vendor.qemu.preferred.uwb.service=* + restart vendor.uwb_hal_goldfish diff --git a/emulator/uwb_hal/uwb-service-goldfish.xml b/emulator/uwb_hal/uwb-service-goldfish.xml new file mode 100644 index 0000000..013d9de --- /dev/null +++ b/emulator/uwb_hal/uwb-service-goldfish.xml @@ -0,0 +1,10 @@ + + + android.hardware.uwb + 1 + + IUwb + default + + + diff --git a/emulator/uwb_hal/uwb.cpp b/emulator/uwb_hal/uwb.cpp new file mode 100644 index 0000000..8c357ca --- /dev/null +++ b/emulator/uwb_hal/uwb.cpp @@ -0,0 +1,56 @@ +/* + * Copyright 2021, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "uwb.h" + +namespace { +static constexpr char kDefaultChipName[] = "default"; + +} // namespace + +namespace android { +namespace hardware { +namespace uwb { +namespace impl { +using namespace ::aidl::android::hardware::uwb; + +// More chips can be added here. +// TODO: Use a property to set up chip count with default to 1. +Uwb::Uwb() : chips_({{kDefaultChipName, ndk::SharedRefBase::make(kDefaultChipName)}}) {} + +Uwb::~Uwb() {} + +::ndk::ScopedAStatus Uwb::getChips(std::vector* names) { + for (const auto& chip : chips_) { + names->push_back(chip.first); + } + return ndk::ScopedAStatus::ok(); +} + +::ndk::ScopedAStatus Uwb::getChip(const std::string& name, std::shared_ptr* chip) { + const auto chip_found = chips_.find(name); + if (chip_found == chips_.end()) { + LOG(ERROR) << "Unknown chip name" << name; + return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); + } + *chip = chip_found->second; + return ndk::ScopedAStatus::ok(); +} +} // namespace impl +} // namespace uwb +} // namespace hardware +} // namespace android diff --git a/emulator/uwb_hal/uwb.h b/emulator/uwb_hal/uwb.h new file mode 100644 index 0000000..ec51fd8 --- /dev/null +++ b/emulator/uwb_hal/uwb.h @@ -0,0 +1,49 @@ +/* + * Copyright 2021, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef ANDROID_HARDWARE_UWB_UWB +#define ANDROID_HARDWARE_UWB_UWB + +#include +#include + +#include +#include + +#include "uwb_chip.h" + +namespace android { +namespace hardware { +namespace uwb { +namespace impl { +using namespace ::aidl::android::hardware::uwb; +// Default implementation mean't to be used on simulator targets. +class Uwb : public BnUwb { + public: + Uwb(); + virtual ~Uwb(); + + ::ndk::ScopedAStatus getChips(std::vector* names) override; + ::ndk::ScopedAStatus getChip(const std::string& name, std::shared_ptr* chip) override; + + private: + std::map> chips_; +}; +} // namespace impl +} // namespace uwb +} // namespace hardware +} // namespace android + +#endif // ANDROID_HARDWARE_UWB_UWB \ No newline at end of file diff --git a/emulator/uwb_hal/uwb_chip.cpp b/emulator/uwb_hal/uwb_chip.cpp new file mode 100644 index 0000000..3e2d8de --- /dev/null +++ b/emulator/uwb_hal/uwb_chip.cpp @@ -0,0 +1,203 @@ +/* + * Copyright 2021, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "android.hardware.uwb" + +#include +#include + +#include "uwb.h" +#include +#include +#include + +#include +#include +#include + +namespace { +constexpr static int32_t kAndroidUciVersion = 1; +} + +namespace android { +namespace hardware { +namespace uwb { +namespace impl { +using namespace ::aidl::android::hardware::uwb; + +int read_fully(int fd, uint8_t* buffer, int size) { + int bytes_read = 0; + while (size > bytes_read) { + int n = read(fd, buffer + bytes_read, size - bytes_read); + LOG(INFO) << "UWB HAL attempting to read "<< size-bytes_read << ", got " << n; + if (n <= 0) return n; + bytes_read += n; + } + + return 0; +} + +UwbChip::UwbChip(const std::string& name) : name_(name), mClientCallback(nullptr) { + int len; + char service_name[PROP_VALUE_MAX]; + len = __system_property_get(PROPERTY_UWB_SERVICE, service_name); + LOG(INFO) << "UWB HAL " << PROPERTY_UWB_SERVICE << "='" << service_name << "'"; + if (strcmp(service_name, PROPERTY_UWB_SERVICE_GOLDFISH) == 0) { + LOG(INFO) << "UWB HAL goldfish service enabled."; + enabled = true; + } else { + enabled = false; + } +} +UwbChip::~UwbChip() {} + +::ndk::ScopedAStatus UwbChip::getName(std::string* name) { + *name = name_; + return ndk::ScopedAStatus::ok(); +} + +::ndk::ScopedAStatus UwbChip::open(const std::shared_ptr& clientCallback) { + if (!enabled) { + LOG(INFO) << "UWB HAL is not enabled. Not opening connection to UWB backend."; + mClientCallback = clientCallback; + mClientCallback->onHalEvent(UwbEvent::OPEN_CPLT, UwbStatus::OK); + return ndk::ScopedAStatus::ok(); + } + + struct sockaddr_in serv_addr; + serv_addr.sin_family = AF_INET; + + char ip_prop[PROP_VALUE_MAX]; + char port_prop[PROP_VALUE_MAX]; + int len; + len = __system_property_get(PROPERTY_UWB_SERVICE_IP, ip_prop); + if (len == 0) { + LOG(INFO) << "UWB HAL Using default ip: 127.0.0.1."; + strcpy(ip_prop, "127.0.0.1"); + } + len = __system_property_get(PROPERTY_UWB_SERVICE_PORT, port_prop); + if (len == 0) { + LOG(INFO) << "UWB HAL Using default port: 7654."; + strcpy(port_prop, "7654"); + } + if (inet_pton(AF_INET, ip_prop, &serv_addr.sin_addr) <= 0) { + LOG(INFO) << "UWB HAL Invalid address: " << ip_prop; + return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-1, "Invalid address"); + } + int port_int = atoi(port_prop); + if (port_int <= 0) { + LOG(INFO) << "UWB HAL Invalid port: " << port_prop; + return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-2, "Invalid port"); + } + serv_addr.sin_port = htons(port_int); + + int status; + if ((fd_ = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + LOG(INFO) << "UWB HAL Error creating socket."; + return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-3, "Connection failed"); + } + + if ((status = connect(fd_, (struct sockaddr*)&serv_addr, sizeof(serv_addr))) < 0) { + LOG(INFO) << "UWB HAL Connection failed: \"" << ip_prop << ":" << port_prop << "\""; + return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-4, "Connection failed"); + } else { + LOG(INFO) << "UWB HAL Connected to: \"" << ip_prop << ":" << port_prop << "\""; + } + + connected = true; + read_thread_ = std::thread([this]() { + while (connected) { + std::vector buffer(1024); + // Read the packet header + if (read_fully(fd_, buffer.data(), 4) != 0) { + LOG(INFO) << "UWB HAL: Cannot read packet header. Closing connection."; + connected = false; + break; + } + size_t payload_length = buffer[3]; + if (payload_length > 0) { + if (read_fully(fd_, buffer.data() + 4, payload_length) != 0) { + LOG(INFO) << "UWB HAL Could not read the complete packet. Closing connection."; + connected = false; + break; + } + } + + buffer.resize(payload_length + 4); + mClientCallback->onUciMessage(buffer); + } + }); + mClientCallback = clientCallback; + mClientCallback->onHalEvent(UwbEvent::OPEN_CPLT, UwbStatus::OK); + LOG(INFO) << "UWB HAL Initialization complete."; + return ndk::ScopedAStatus::ok(); +} + +::ndk::ScopedAStatus UwbChip::close() { + if (enabled && connected) { + LOG(INFO) << "UWB HAL Closing connection."; + ::close(fd_); + connected = false; + read_thread_.join(); + } + // Return success even when the stub implementation is running. + mClientCallback->onHalEvent(UwbEvent::CLOSE_CPLT, UwbStatus::OK); + mClientCallback = nullptr; + return ndk::ScopedAStatus::ok(); +} + +::ndk::ScopedAStatus UwbChip::coreInit() { + auto status = mClientCallback->onHalEvent(UwbEvent::POST_INIT_CPLT, UwbStatus::OK); + if (!status.isOk()) { + return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_STATE, + "onHalEvent POST_INIT_CPLT failed"); + } + + return ndk::ScopedAStatus::ok(); +} + +::ndk::ScopedAStatus UwbChip::sessionInit(int sessionId) { + LOG(INFO) << "UWB HAL sessionInit sid=" << sessionId; + return ndk::ScopedAStatus::ok(); +} + +::ndk::ScopedAStatus UwbChip::getSupportedAndroidUciVersion(int32_t* version) { + *version = kAndroidUciVersion; + return ndk::ScopedAStatus::ok(); +} + +::ndk::ScopedAStatus UwbChip::sendUciMessage(const std::vector& data, + int32_t* bytes_written) { + if (!enabled) { + LOG(INFO) << "UWB HAL is not enabled. Not sending message."; + return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); + } + + LOG(VERBOSE) << "UWB HAL sendUciMessage. Size=" << data.size(); + + int ret = write(fd_, data.data(), data.size()); + + if (ret != data.size()) { + LOG(WARNING) << "UWB HAL sendUciMessage Illegal argument. Bytes missed=" << ret; + return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); + } + *bytes_written = (int32_t)data.size(); + return ndk::ScopedAStatus::ok(); +} +} // namespace impl +} // namespace uwb +} // namespace hardware +} // namespace android diff --git a/emulator/uwb_hal/uwb_chip.h b/emulator/uwb_hal/uwb_chip.h new file mode 100644 index 0000000..c044096 --- /dev/null +++ b/emulator/uwb_hal/uwb_chip.h @@ -0,0 +1,65 @@ +/* + * Copyright 2021, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ANDROID_HARDWARE_UWB_UWBCHIP +#define ANDROID_HARDWARE_UWB_UWBCHIP + +#include +#include + +#include +#include +#include + +#define PROPERTY_UWB_SERVICE "vendor.qemu.preferred.uwb.service" // The preferred UWB service name +#define PROPERTY_UWB_SERVICE_GOLDFISH "goldfish" // The supported service name for PROPERTY_UWB_SERVICE +#define PROPERTY_UWB_SERVICE_IP "vendor.qemu.preferred.uwb.service.ip" // The IP of the UWB simulation server +#define PROPERTY_UWB_SERVICE_PORT "vendor.qemu.preferred.uwb.service.port" // The port of the UWB simulation server + +namespace android { +namespace hardware { +namespace uwb { +namespace impl { +using namespace ::aidl::android::hardware::uwb; +// Default implementation mean't to be used on simulator targets. +class UwbChip : public BnUwbChip { + public: + UwbChip(const std::string& name); + virtual ~UwbChip(); + + ::ndk::ScopedAStatus getName(std::string* name) override; + ::ndk::ScopedAStatus open(const std::shared_ptr& clientCallback) override; + ::ndk::ScopedAStatus close() override; + ::ndk::ScopedAStatus coreInit() override; + ::ndk::ScopedAStatus sessionInit(int sesionId) override; + ::ndk::ScopedAStatus getSupportedAndroidUciVersion(int32_t* version) override; + ::ndk::ScopedAStatus sendUciMessage(const std::vector& data, + int32_t* bytes_written) override; + + private: + std::string name_; + bool enabled; + bool connected; + int fd_; + std::thread read_thread_; + std::shared_ptr mClientCallback; +}; +} // namespace impl +} // namespace uwb +} // namespace hardware +} // namespace android + +#endif // ANDROID_HARDWARE_UWB_UWBCHIP \ No newline at end of file -- cgit v1.2.3 From 73b0c7af18c0bb165063b410dc4bde852a2d241c Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Tue, 27 Jun 2023 11:11:21 +0000 Subject: Revert^3 "Add UWB goldfish HAL" This reverts commit 8468a48fd8a2b406c4d9f350f292f7ec5094ad6a. Reason for revert: Potentially caused b/289027089 Change-Id: I2852f0082e70e3a09b87d176494930e4dba9836e --- emulator/aosp_car_emulator.mk | 2 - emulator/car_emulator_vendor.mk | 9 +- emulator/uwb_hal/Android.bp | 40 ----- emulator/uwb_hal/sepolicy/file_contexts | 2 - emulator/uwb_hal/sepolicy/property_contexts | 3 - emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te | 20 --- emulator/uwb_hal/service.cpp | 44 ------ emulator/uwb_hal/uwb-goldfish.mk | 31 ---- emulator/uwb_hal/uwb-service-goldfish.rc | 8 - emulator/uwb_hal/uwb-service-goldfish.xml | 10 -- emulator/uwb_hal/uwb.cpp | 56 ------- emulator/uwb_hal/uwb.h | 49 ------- emulator/uwb_hal/uwb_chip.cpp | 203 -------------------------- emulator/uwb_hal/uwb_chip.h | 65 --------- 14 files changed, 1 insertion(+), 541 deletions(-) delete mode 100644 emulator/uwb_hal/Android.bp delete mode 100644 emulator/uwb_hal/sepolicy/file_contexts delete mode 100644 emulator/uwb_hal/sepolicy/property_contexts delete mode 100644 emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te delete mode 100644 emulator/uwb_hal/service.cpp delete mode 100644 emulator/uwb_hal/uwb-goldfish.mk delete mode 100644 emulator/uwb_hal/uwb-service-goldfish.rc delete mode 100644 emulator/uwb_hal/uwb-service-goldfish.xml delete mode 100644 emulator/uwb_hal/uwb.cpp delete mode 100644 emulator/uwb_hal/uwb.h delete mode 100644 emulator/uwb_hal/uwb_chip.cpp delete mode 100644 emulator/uwb_hal/uwb_chip.h diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 2add36c..85e18ac 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -29,8 +29,6 @@ $(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk) $(call inherit-product, device/generic/car/emulator/rotary/car_rotary.mk) # Enables USB related passthrough $(call inherit-product, device/generic/car/emulator/usbpt/car_usbpt.mk) -# Enable simulated UWB. -$(call inherit-product, device/generic/car/emulator/uwb_hal/uwb-goldfish.mk) TARGET_PRODUCT_PROP := device/generic/car/emulator/usbpt/bluetooth/bluetooth.prop diff --git a/emulator/car_emulator_vendor.mk b/emulator/car_emulator_vendor.mk index b910400..37669d9 100644 --- a/emulator/car_emulator_vendor.mk +++ b/emulator/car_emulator_vendor.mk @@ -48,20 +48,13 @@ ifeq (,$(ENABLE_REAR_VIEW_CAMERA_SAMPLE)) ENABLE_REAR_VIEW_CAMERA_SAMPLE := true endif -PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml # Auto modules PRODUCT_PACKAGES += \ android.hardware.automotive.vehicle@V1-emulator-service \ android.hardware.broadcastradio-service.default \ android.hardware.audio.service-caremu \ android.hardware.automotive.remoteaccess@V1-default-service \ - android.hardware.automotive.ivn@V1-default-service \ - android.hardware.uwb-goldfish-service \ - ServiceUwbResources \ - com.google.android.uwb \ - android.hardware.uwb \ - com.android.uwb \ + android.hardware.automotive.ivn@V1-default-service # Copy car_core_hardware and overwrite handheld_core_hardware.xml with a disable config. # Overwrite goldfish related xml with a disable config. diff --git a/emulator/uwb_hal/Android.bp b/emulator/uwb_hal/Android.bp deleted file mode 100644 index 075be15..0000000 --- a/emulator/uwb_hal/Android.bp +++ /dev/null @@ -1,40 +0,0 @@ -// TODO: add license -package { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "hardware_interfaces_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - - //default_applicable_licenses: ["hardware_interfaces_license"], -} - -cc_binary { - name: "android.hardware.uwb-goldfish-service", - relative_install_path: "hw", - init_rc: ["uwb-service-goldfish.rc"], - vintf_fragments: ["uwb-service-goldfish.xml"], - vendor: true, - cflags: [ - "-Wall", - "-Wextra", - "-g", - ], - shared_libs: [ - "liblog", - "libbinder_ndk", - ], - static_libs: [ - "libbase", - "libutils", - "android.hardware.uwb-V1-ndk", - ], - whole_static_libs: [ - "//device/generic/goldfish:libqemud.ranchu", - ], - srcs: [ - "service.cpp", - "uwb.cpp", - "uwb_chip.cpp", - ], -} diff --git a/emulator/uwb_hal/sepolicy/file_contexts b/emulator/uwb_hal/sepolicy/file_contexts deleted file mode 100644 index a908682..0000000 --- a/emulator/uwb_hal/sepolicy/file_contexts +++ /dev/null @@ -1,2 +0,0 @@ -# UWB Goldfish HAL -/vendor/bin/hw/android\.hardware\.uwb-goldfish-service u:object_r:hal_uwb_vendor_goldfish_exec:s0 diff --git a/emulator/uwb_hal/sepolicy/property_contexts b/emulator/uwb_hal/sepolicy/property_contexts deleted file mode 100644 index cd69580..0000000 --- a/emulator/uwb_hal/sepolicy/property_contexts +++ /dev/null @@ -1,3 +0,0 @@ -vendor.qemu.preferred.uwb.service u:object_r:vendor_qemu_prop:s0 -vendor.qemu.preferred.uwb.service.ip u:object_r:vendor_qemu_prop:s0 -vendor.qemu.preferred.uwb.service.port u:object_r:vendor_qemu_prop:s0 diff --git a/emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te b/emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te deleted file mode 100644 index 0346d39..0000000 --- a/emulator/uwb_hal/sepolicy/uwb-goldfish-hal.te +++ /dev/null @@ -1,20 +0,0 @@ -type hal_uwb_vendor_goldfish, domain; -type hal_uwb_vendor_goldfish_exec, vendor_file_type, exec_type, file_type; -init_daemon_domain(hal_uwb_vendor_goldfish) - -#============= hal_uwb_vendor_goldfish ============== -allow hal_uwb_vendor_goldfish fwmarkd_socket:sock_file write; -# TODO: The next line conflicts with a neverallow declaration. -# allow hal_uwb_vendor_goldfish hal_uwb_service:service_manager add; -allow hal_uwb_vendor_goldfish netd:unix_stream_socket connectto; -allow hal_uwb_vendor_goldfish port:tcp_socket name_connect; -allow hal_uwb_vendor_goldfish self:tcp_socket { connect create getopt read write }; -allow hal_uwb_vendor_goldfish servicemanager:binder { call transfer }; -allow hal_uwb_vendor_goldfish system_server:binder { call transfer }; - -#============= netd ============== -allow netd hal_uwb_vendor_goldfish:fd use; -allow netd hal_uwb_vendor_goldfish:tcp_socket { getopt read setopt write }; - -#============= system_server ============== -allow system_server hal_uwb_vendor_goldfish:binder { call transfer }; \ No newline at end of file diff --git a/emulator/uwb_hal/service.cpp b/emulator/uwb_hal/service.cpp deleted file mode 100644 index f814f69..0000000 --- a/emulator/uwb_hal/service.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include - -#include "uwb.h" - -#define LOG_TAG "android.hardware.uwb" - -using ::aidl::android::hardware::uwb::IUwb; -using ::android::sp; -using ::android::base::InitLogging; -using ::android::base::StderrLogger; -using ::android::hardware::uwb::impl::Uwb; - -int main(int /*argc*/, char* argv[]) { - InitLogging(argv); - LOG(INFO) << "UWB Goldfish HAL starting up"; - - ABinderProcess_setThreadPoolMaxThreadCount(0); - std::shared_ptr uwb = ndk::SharedRefBase::make(); - const std::string instance = std::string() + IUwb::descriptor + "/default"; - binder_status_t status = AServiceManager_addService(uwb->asBinder().get(), instance.c_str()); - CHECK(status == STATUS_OK); - - ABinderProcess_joinThreadPool(); - return EXIT_FAILURE; // should not reach -} diff --git a/emulator/uwb_hal/uwb-goldfish.mk b/emulator/uwb_hal/uwb-goldfish.mk deleted file mode 100644 index cd964cb..0000000 --- a/emulator/uwb_hal/uwb-goldfish.mk +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2022 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Declare UWB support -PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml - -# TODO: some might be redundant here. -# Install relevant packages -PRODUCT_PACKAGES += \ - android.hardware.uwb-goldfish-service \ - ServiceUwbResources \ - com.google.android.uwb \ - android.hardware.uwb \ - com.android.uwb \ - -# Additional selinux policy -BOARD_SEPOLICY_DIRS += device/generic/car/emulator/uwb_hal/sepolicy diff --git a/emulator/uwb_hal/uwb-service-goldfish.rc b/emulator/uwb_hal/uwb-service-goldfish.rc deleted file mode 100644 index eae2bd1..0000000 --- a/emulator/uwb_hal/uwb-service-goldfish.rc +++ /dev/null @@ -1,8 +0,0 @@ -service vendor.uwb_hal_goldfish /vendor/bin/hw/android.hardware.uwb-goldfish-service - class hal - user uwb - group system inet root uwb - capabilities NET_ADMIN NET_RAW - -on property:vendor.qemu.preferred.uwb.service=* - restart vendor.uwb_hal_goldfish diff --git a/emulator/uwb_hal/uwb-service-goldfish.xml b/emulator/uwb_hal/uwb-service-goldfish.xml deleted file mode 100644 index 013d9de..0000000 --- a/emulator/uwb_hal/uwb-service-goldfish.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - android.hardware.uwb - 1 - - IUwb - default - - - diff --git a/emulator/uwb_hal/uwb.cpp b/emulator/uwb_hal/uwb.cpp deleted file mode 100644 index 8c357ca..0000000 --- a/emulator/uwb_hal/uwb.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2021, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -#include "uwb.h" - -namespace { -static constexpr char kDefaultChipName[] = "default"; - -} // namespace - -namespace android { -namespace hardware { -namespace uwb { -namespace impl { -using namespace ::aidl::android::hardware::uwb; - -// More chips can be added here. -// TODO: Use a property to set up chip count with default to 1. -Uwb::Uwb() : chips_({{kDefaultChipName, ndk::SharedRefBase::make(kDefaultChipName)}}) {} - -Uwb::~Uwb() {} - -::ndk::ScopedAStatus Uwb::getChips(std::vector* names) { - for (const auto& chip : chips_) { - names->push_back(chip.first); - } - return ndk::ScopedAStatus::ok(); -} - -::ndk::ScopedAStatus Uwb::getChip(const std::string& name, std::shared_ptr* chip) { - const auto chip_found = chips_.find(name); - if (chip_found == chips_.end()) { - LOG(ERROR) << "Unknown chip name" << name; - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - *chip = chip_found->second; - return ndk::ScopedAStatus::ok(); -} -} // namespace impl -} // namespace uwb -} // namespace hardware -} // namespace android diff --git a/emulator/uwb_hal/uwb.h b/emulator/uwb_hal/uwb.h deleted file mode 100644 index ec51fd8..0000000 --- a/emulator/uwb_hal/uwb.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2021, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef ANDROID_HARDWARE_UWB_UWB -#define ANDROID_HARDWARE_UWB_UWB - -#include -#include - -#include -#include - -#include "uwb_chip.h" - -namespace android { -namespace hardware { -namespace uwb { -namespace impl { -using namespace ::aidl::android::hardware::uwb; -// Default implementation mean't to be used on simulator targets. -class Uwb : public BnUwb { - public: - Uwb(); - virtual ~Uwb(); - - ::ndk::ScopedAStatus getChips(std::vector* names) override; - ::ndk::ScopedAStatus getChip(const std::string& name, std::shared_ptr* chip) override; - - private: - std::map> chips_; -}; -} // namespace impl -} // namespace uwb -} // namespace hardware -} // namespace android - -#endif // ANDROID_HARDWARE_UWB_UWB \ No newline at end of file diff --git a/emulator/uwb_hal/uwb_chip.cpp b/emulator/uwb_hal/uwb_chip.cpp deleted file mode 100644 index 3e2d8de..0000000 --- a/emulator/uwb_hal/uwb_chip.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright 2021, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "android.hardware.uwb" - -#include -#include - -#include "uwb.h" -#include -#include -#include - -#include -#include -#include - -namespace { -constexpr static int32_t kAndroidUciVersion = 1; -} - -namespace android { -namespace hardware { -namespace uwb { -namespace impl { -using namespace ::aidl::android::hardware::uwb; - -int read_fully(int fd, uint8_t* buffer, int size) { - int bytes_read = 0; - while (size > bytes_read) { - int n = read(fd, buffer + bytes_read, size - bytes_read); - LOG(INFO) << "UWB HAL attempting to read "<< size-bytes_read << ", got " << n; - if (n <= 0) return n; - bytes_read += n; - } - - return 0; -} - -UwbChip::UwbChip(const std::string& name) : name_(name), mClientCallback(nullptr) { - int len; - char service_name[PROP_VALUE_MAX]; - len = __system_property_get(PROPERTY_UWB_SERVICE, service_name); - LOG(INFO) << "UWB HAL " << PROPERTY_UWB_SERVICE << "='" << service_name << "'"; - if (strcmp(service_name, PROPERTY_UWB_SERVICE_GOLDFISH) == 0) { - LOG(INFO) << "UWB HAL goldfish service enabled."; - enabled = true; - } else { - enabled = false; - } -} -UwbChip::~UwbChip() {} - -::ndk::ScopedAStatus UwbChip::getName(std::string* name) { - *name = name_; - return ndk::ScopedAStatus::ok(); -} - -::ndk::ScopedAStatus UwbChip::open(const std::shared_ptr& clientCallback) { - if (!enabled) { - LOG(INFO) << "UWB HAL is not enabled. Not opening connection to UWB backend."; - mClientCallback = clientCallback; - mClientCallback->onHalEvent(UwbEvent::OPEN_CPLT, UwbStatus::OK); - return ndk::ScopedAStatus::ok(); - } - - struct sockaddr_in serv_addr; - serv_addr.sin_family = AF_INET; - - char ip_prop[PROP_VALUE_MAX]; - char port_prop[PROP_VALUE_MAX]; - int len; - len = __system_property_get(PROPERTY_UWB_SERVICE_IP, ip_prop); - if (len == 0) { - LOG(INFO) << "UWB HAL Using default ip: 127.0.0.1."; - strcpy(ip_prop, "127.0.0.1"); - } - len = __system_property_get(PROPERTY_UWB_SERVICE_PORT, port_prop); - if (len == 0) { - LOG(INFO) << "UWB HAL Using default port: 7654."; - strcpy(port_prop, "7654"); - } - if (inet_pton(AF_INET, ip_prop, &serv_addr.sin_addr) <= 0) { - LOG(INFO) << "UWB HAL Invalid address: " << ip_prop; - return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-1, "Invalid address"); - } - int port_int = atoi(port_prop); - if (port_int <= 0) { - LOG(INFO) << "UWB HAL Invalid port: " << port_prop; - return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-2, "Invalid port"); - } - serv_addr.sin_port = htons(port_int); - - int status; - if ((fd_ = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - LOG(INFO) << "UWB HAL Error creating socket."; - return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-3, "Connection failed"); - } - - if ((status = connect(fd_, (struct sockaddr*)&serv_addr, sizeof(serv_addr))) < 0) { - LOG(INFO) << "UWB HAL Connection failed: \"" << ip_prop << ":" << port_prop << "\""; - return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(-4, "Connection failed"); - } else { - LOG(INFO) << "UWB HAL Connected to: \"" << ip_prop << ":" << port_prop << "\""; - } - - connected = true; - read_thread_ = std::thread([this]() { - while (connected) { - std::vector buffer(1024); - // Read the packet header - if (read_fully(fd_, buffer.data(), 4) != 0) { - LOG(INFO) << "UWB HAL: Cannot read packet header. Closing connection."; - connected = false; - break; - } - size_t payload_length = buffer[3]; - if (payload_length > 0) { - if (read_fully(fd_, buffer.data() + 4, payload_length) != 0) { - LOG(INFO) << "UWB HAL Could not read the complete packet. Closing connection."; - connected = false; - break; - } - } - - buffer.resize(payload_length + 4); - mClientCallback->onUciMessage(buffer); - } - }); - mClientCallback = clientCallback; - mClientCallback->onHalEvent(UwbEvent::OPEN_CPLT, UwbStatus::OK); - LOG(INFO) << "UWB HAL Initialization complete."; - return ndk::ScopedAStatus::ok(); -} - -::ndk::ScopedAStatus UwbChip::close() { - if (enabled && connected) { - LOG(INFO) << "UWB HAL Closing connection."; - ::close(fd_); - connected = false; - read_thread_.join(); - } - // Return success even when the stub implementation is running. - mClientCallback->onHalEvent(UwbEvent::CLOSE_CPLT, UwbStatus::OK); - mClientCallback = nullptr; - return ndk::ScopedAStatus::ok(); -} - -::ndk::ScopedAStatus UwbChip::coreInit() { - auto status = mClientCallback->onHalEvent(UwbEvent::POST_INIT_CPLT, UwbStatus::OK); - if (!status.isOk()) { - return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_STATE, - "onHalEvent POST_INIT_CPLT failed"); - } - - return ndk::ScopedAStatus::ok(); -} - -::ndk::ScopedAStatus UwbChip::sessionInit(int sessionId) { - LOG(INFO) << "UWB HAL sessionInit sid=" << sessionId; - return ndk::ScopedAStatus::ok(); -} - -::ndk::ScopedAStatus UwbChip::getSupportedAndroidUciVersion(int32_t* version) { - *version = kAndroidUciVersion; - return ndk::ScopedAStatus::ok(); -} - -::ndk::ScopedAStatus UwbChip::sendUciMessage(const std::vector& data, - int32_t* bytes_written) { - if (!enabled) { - LOG(INFO) << "UWB HAL is not enabled. Not sending message."; - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } - - LOG(VERBOSE) << "UWB HAL sendUciMessage. Size=" << data.size(); - - int ret = write(fd_, data.data(), data.size()); - - if (ret != data.size()) { - LOG(WARNING) << "UWB HAL sendUciMessage Illegal argument. Bytes missed=" << ret; - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - *bytes_written = (int32_t)data.size(); - return ndk::ScopedAStatus::ok(); -} -} // namespace impl -} // namespace uwb -} // namespace hardware -} // namespace android diff --git a/emulator/uwb_hal/uwb_chip.h b/emulator/uwb_hal/uwb_chip.h deleted file mode 100644 index c044096..0000000 --- a/emulator/uwb_hal/uwb_chip.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2021, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_HARDWARE_UWB_UWBCHIP -#define ANDROID_HARDWARE_UWB_UWBCHIP - -#include -#include - -#include -#include -#include - -#define PROPERTY_UWB_SERVICE "vendor.qemu.preferred.uwb.service" // The preferred UWB service name -#define PROPERTY_UWB_SERVICE_GOLDFISH "goldfish" // The supported service name for PROPERTY_UWB_SERVICE -#define PROPERTY_UWB_SERVICE_IP "vendor.qemu.preferred.uwb.service.ip" // The IP of the UWB simulation server -#define PROPERTY_UWB_SERVICE_PORT "vendor.qemu.preferred.uwb.service.port" // The port of the UWB simulation server - -namespace android { -namespace hardware { -namespace uwb { -namespace impl { -using namespace ::aidl::android::hardware::uwb; -// Default implementation mean't to be used on simulator targets. -class UwbChip : public BnUwbChip { - public: - UwbChip(const std::string& name); - virtual ~UwbChip(); - - ::ndk::ScopedAStatus getName(std::string* name) override; - ::ndk::ScopedAStatus open(const std::shared_ptr& clientCallback) override; - ::ndk::ScopedAStatus close() override; - ::ndk::ScopedAStatus coreInit() override; - ::ndk::ScopedAStatus sessionInit(int sesionId) override; - ::ndk::ScopedAStatus getSupportedAndroidUciVersion(int32_t* version) override; - ::ndk::ScopedAStatus sendUciMessage(const std::vector& data, - int32_t* bytes_written) override; - - private: - std::string name_; - bool enabled; - bool connected; - int fd_; - std::thread read_thread_; - std::shared_ptr mClientCallback; -}; -} // namespace impl -} // namespace uwb -} // namespace hardware -} // namespace android - -#endif // ANDROID_HARDWARE_UWB_UWBCHIP \ No newline at end of file -- cgit v1.2.3 From 02d1c730adc398bc3421b4bb3033ef1b99d9e95c Mon Sep 17 00:00:00 2001 From: shrikar Date: Thu, 29 Jun 2023 01:45:33 +0000 Subject: Removed some highly repetitive debug messages. These debug messages tend to crowd out the adb shell logcat buffer in the emulator. Bug: 290817326 Test: manual build of emulator Change-Id: I961bb19a61db0efcb15fecba19c2cd205fafeed0 --- emulator/audio/driver/audio_hw.c | 2 +- emulator/audio/driver/audio_vbuffer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emulator/audio/driver/audio_hw.c b/emulator/audio/driver/audio_hw.c index 7714087..9f64a72 100644 --- a/emulator/audio/driver/audio_hw.c +++ b/emulator/audio/driver/audio_hw.c @@ -1018,7 +1018,7 @@ static void *in_read_worker(void *args) { pthread_mutex_unlock(&in->lock); if (frames_written != buffer_frames) { - ALOGW("in_read_worker only could write %zu / %zu frames", + ALOGV("in_read_worker only could write %zu / %zu frames", frames_written, buffer_frames); } } diff --git a/emulator/audio/driver/audio_vbuffer.c b/emulator/audio/driver/audio_vbuffer.c index 8377f5c..9884048 100644 --- a/emulator/audio/driver/audio_vbuffer.c +++ b/emulator/audio/driver/audio_vbuffer.c @@ -88,7 +88,7 @@ size_t audio_vbuffer_write(audio_vbuffer_t *audio_vbuffer, const void *buffer, } else if (audio_vbuffer->head < audio_vbuffer->tail) { frames = MIN(frame_count, audio_vbuffer->tail - (audio_vbuffer->head)); } else { - ALOGD("%s audio_vbuffer is full", __func__); + ALOGV("%s audio_vbuffer is full", __func__); break; } memcpy( -- cgit v1.2.3 From ee886adcbb2bada87a6d88d0d8fff877f62cf047 Mon Sep 17 00:00:00 2001 From: Weilin Xu Date: Wed, 19 Jul 2023 21:49:11 +0000 Subject: Update zone config in emulator audio configuration Updated documentation in car audio configuration of emulator with zone config. Bug: 289137791 Test: m -j Change-Id: I62831b552d12121976b035c52d1d6f8753db7177 --- emulator/audio/car_audio_configuration.xml | 5 +++-- emulator/multi-display/car_audio_configuration.xml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/emulator/audio/car_audio_configuration.xml b/emulator/audio/car_audio_configuration.xml index 81ccbfa..2e40b16 100644 --- a/emulator/audio/car_audio_configuration.xml +++ b/emulator/audio/car_audio_configuration.xml @@ -17,8 +17,9 @@ diff --git a/emulator/multi-display/car_audio_configuration.xml b/emulator/multi-display/car_audio_configuration.xml index 7109d3e..9aaff9a 100644 --- a/emulator/multi-display/car_audio_configuration.xml +++ b/emulator/multi-display/car_audio_configuration.xml @@ -17,8 +17,9 @@ -- cgit v1.2.3 From d00dbd384db6d1e0a09d6dfea112c6d4fa90e615 Mon Sep 17 00:00:00 2001 From: Eric Jeong Date: Wed, 9 Aug 2023 22:49:12 -0700 Subject: Add sepolicy for reference VHAL Bug: 295231285 Test: build okay && no sepolicy violation Change-Id: I85b8bc997d42c9d543b48f536a077ed42c3cb606 --- emulator/aosp_car_emulator.mk | 1 - emulator/sepolicy/hal_vehicle_default.te | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 85e18ac..7c74015 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -74,4 +74,3 @@ PRODUCT_PACKAGES += \ # Enable socket for qemu VHAL BOARD_SEPOLICY_DIRS += device/generic/car/emulator/sepolicy - diff --git a/emulator/sepolicy/hal_vehicle_default.te b/emulator/sepolicy/hal_vehicle_default.te index e201b75..194f0c9 100644 --- a/emulator/sepolicy/hal_vehicle_default.te +++ b/emulator/sepolicy/hal_vehicle_default.te @@ -1 +1,7 @@ allow hal_vehicle_default self:vsock_socket { connect create read write }; + +# For communication between VHAL and the host +typeattribute hal_vehicle_default hal_automotive_socket_exemption; + +allow hal_vehicle_default self:tcp_socket { create bind listen accept }; +allow hal_vehicle_default node:tcp_socket { node_bind }; -- cgit v1.2.3 From 22dafe38e9887418f7ee0e4d1606250e0fced692 Mon Sep 17 00:00:00 2001 From: Eva Chen Date: Thu, 10 Aug 2023 18:06:15 -0700 Subject: Update VehicleEmulator VHAL property version to v3. Bug: 295405997 Test: Manual Build Change-Id: I243d2858426c62e272b1628a39c021f477f2832e --- emulator/vhal_v2_0/interfaces/aidl/Android.bp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emulator/vhal_v2_0/interfaces/aidl/Android.bp b/emulator/vhal_v2_0/interfaces/aidl/Android.bp index 9d59cd2..a505ecc 100644 --- a/emulator/vhal_v2_0/interfaces/aidl/Android.bp +++ b/emulator/vhal_v2_0/interfaces/aidl/Android.bp @@ -15,7 +15,7 @@ aidl_interface { srcs: ["device/generic/car/emulator/*.aidl"], imports: [ "android.hardware.automotive.vehicle-V2", - "android.hardware.automotive.vehicle.property-V2", + "android.hardware.automotive.vehicle.property-V3", ], stability: "vintf", backend: { @@ -34,7 +34,7 @@ aidl_interface { version: "1", imports: [ "android.hardware.automotive.vehicle-V2", - "android.hardware.automotive.vehicle.property-V2", + "android.hardware.automotive.vehicle.property-V3", ], }, ], -- cgit v1.2.3 From 24f241fb63a4c49399010aa4e4e89c0903856bb2 Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Wed, 23 Aug 2023 17:25:09 -0700 Subject: Move emulator AIDL interface location. Move it out from vhal_v2_0 since it is used by AIDL VHAL as well. Test: Local build Bug: 295393732 Change-Id: I58c18f6a34984742e23c794c0d524d6d21990584 --- emulator/car_emulator_interfaces/aidl/Android.bp | 42 ++++++++++++++++++++++ .../device.generic.car.emulator-aidl/1/.hash | 1 + .../1/device/generic/car/emulator/IVehicleBus.aidl | 24 +++++++++++++ .../generic/car/emulator/IVehicleBusCallback.aidl | 23 ++++++++++++ .../device/generic/car/emulator/IVehicleBus.aidl | 24 +++++++++++++ .../generic/car/emulator/IVehicleBusCallback.aidl | 23 ++++++++++++ .../device/generic/car/emulator/IVehicleBus.aidl | 32 +++++++++++++++++ .../generic/car/emulator/IVehicleBusCallback.aidl | 14 ++++++++ emulator/vhal_v2_0/interfaces/aidl/Android.bp | 42 ---------------------- .../device.generic.car.emulator-aidl/1/.hash | 1 - .../1/device/generic/car/emulator/IVehicleBus.aidl | 24 ------------- .../generic/car/emulator/IVehicleBusCallback.aidl | 23 ------------ .../device/generic/car/emulator/IVehicleBus.aidl | 24 ------------- .../generic/car/emulator/IVehicleBusCallback.aidl | 23 ------------ .../device/generic/car/emulator/IVehicleBus.aidl | 32 ----------------- .../generic/car/emulator/IVehicleBusCallback.aidl | 14 -------- 16 files changed, 183 insertions(+), 183 deletions(-) create mode 100644 emulator/car_emulator_interfaces/aidl/Android.bp create mode 100644 emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash create mode 100644 emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl create mode 100644 emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl create mode 100644 emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl create mode 100644 emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl create mode 100644 emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl create mode 100644 emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/Android.bp delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl delete mode 100644 emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl diff --git a/emulator/car_emulator_interfaces/aidl/Android.bp b/emulator/car_emulator_interfaces/aidl/Android.bp new file mode 100644 index 0000000..a505ecc --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/Android.bp @@ -0,0 +1,42 @@ +// This is the expected build file, but it may not be right in all cases + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "device_generic_car_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["device_generic_car_license"], +} + +aidl_interface { + name: "device.generic.car.emulator-aidl", + vendor_available: true, + srcs: ["device/generic/car/emulator/*.aidl"], + imports: [ + "android.hardware.automotive.vehicle-V2", + "android.hardware.automotive.vehicle.property-V3", + ], + stability: "vintf", + backend: { + cpp: { + enabled: false, + }, + java: { + enabled: false, + }, + ndk: { + enabled: true, + }, + }, + versions_with_info: [ + { + version: "1", + imports: [ + "android.hardware.automotive.vehicle-V2", + "android.hardware.automotive.vehicle.property-V3", + ], + }, + ], + +} diff --git a/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash new file mode 100644 index 0000000..34b9cf1 --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash @@ -0,0 +1 @@ +8f02e63cbb8524d7c81a20ca5524d4a27da138a8 diff --git a/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl new file mode 100644 index 0000000..a2ff948 --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package device.generic.car.emulator; +@VintfStability +interface IVehicleBus { + void setOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); + void unsetOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); +} diff --git a/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl new file mode 100644 index 0000000..b5cc3a4 --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package device.generic.car.emulator; +@VintfStability +interface IVehicleBusCallback { + oneway void onNewPropValues(in android.hardware.automotive.vehicle.VehiclePropValue[] values); +} diff --git a/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl new file mode 100644 index 0000000..a2ff948 --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package device.generic.car.emulator; +@VintfStability +interface IVehicleBus { + void setOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); + void unsetOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); +} diff --git a/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl new file mode 100644 index 0000000..b5cc3a4 --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package device.generic.car.emulator; +@VintfStability +interface IVehicleBusCallback { + oneway void onNewPropValues(in android.hardware.automotive.vehicle.VehiclePropValue[] values); +} diff --git a/emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl b/emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl new file mode 100644 index 0000000..ed06d96 --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl @@ -0,0 +1,32 @@ +package device.generic.car.emulator; + +import device.generic.car.emulator.IVehicleBusCallback; + +/** + * IVehicleBus provides generic interface for various bus interpreters + * (emulated/virtual/physical/etc) to connect to Emulator VHAL and provides + * VehiclePropValue update as if it were generated from real car. + * + * This separates bus implementation details from emulator. For example, + * hard-coded rotary controller vendor specific key mapping can separately + * run as a service, allowing emulator to be spinned separately from the + * particular hardware of interest to be tested at the time. + */ + +import android.hardware.automotive.vehicle.VehiclePropValue; + +@VintfStability +interface IVehicleBus { + /** + * Sets a callback function for whenever new property value is generated + * from the bus. Calling this function twice will result in error. To + * change callback function, call unset function first. + */ + void setOnNewPropValuesCallback(IVehicleBusCallback callback); + + /** + * Unregisters a callback function that is currently active. Expected to + * receive the same Callback that was used to set for successful unset. + */ + void unsetOnNewPropValuesCallback(IVehicleBusCallback callback); +} diff --git a/emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl b/emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl new file mode 100644 index 0000000..0cbb905 --- /dev/null +++ b/emulator/car_emulator_interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl @@ -0,0 +1,14 @@ +package device.generic.car.emulator; + +import device.generic.car.emulator.IVehicleBusCallback; +import android.hardware.automotive.vehicle.VehiclePropValue; + +@VintfStability +interface IVehicleBusCallback { + + /** + * This callback is called whenever there is a new propValue detected + * from the bus. + */ + oneway void onNewPropValues(in VehiclePropValue[] values); +} diff --git a/emulator/vhal_v2_0/interfaces/aidl/Android.bp b/emulator/vhal_v2_0/interfaces/aidl/Android.bp deleted file mode 100644 index a505ecc..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/Android.bp +++ /dev/null @@ -1,42 +0,0 @@ -// This is the expected build file, but it may not be right in all cases - -package { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "device_generic_car_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - default_applicable_licenses: ["device_generic_car_license"], -} - -aidl_interface { - name: "device.generic.car.emulator-aidl", - vendor_available: true, - srcs: ["device/generic/car/emulator/*.aidl"], - imports: [ - "android.hardware.automotive.vehicle-V2", - "android.hardware.automotive.vehicle.property-V3", - ], - stability: "vintf", - backend: { - cpp: { - enabled: false, - }, - java: { - enabled: false, - }, - ndk: { - enabled: true, - }, - }, - versions_with_info: [ - { - version: "1", - imports: [ - "android.hardware.automotive.vehicle-V2", - "android.hardware.automotive.vehicle.property-V3", - ], - }, - ], - -} diff --git a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash b/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash deleted file mode 100644 index 34b9cf1..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/.hash +++ /dev/null @@ -1 +0,0 @@ -8f02e63cbb8524d7c81a20ca5524d4a27da138a8 diff --git a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl b/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl deleted file mode 100644 index a2ff948..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBus.aidl +++ /dev/null @@ -1,24 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // -/////////////////////////////////////////////////////////////////////////////// - -// This file is a snapshot of an AIDL file. Do not edit it manually. There are -// two cases: -// 1). this is a frozen version file - do not edit this in any case. -// 2). this is a 'current' file. If you make a backwards compatible change to -// the interface (from the latest frozen version), the build system will -// prompt you to update this file with `m -update-api`. -// -// You must not make a backward incompatible change to any AIDL file built -// with the aidl_interface module type with versions property set. The module -// type is used to build AIDL files in a way that they can be used across -// independently updatable components of the system. If a device is shipped -// with such a backward incompatible change, it has a high risk of breaking -// later when a module using the interface is updated, e.g., Mainline modules. - -package device.generic.car.emulator; -@VintfStability -interface IVehicleBus { - void setOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); - void unsetOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); -} diff --git a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl b/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl deleted file mode 100644 index b5cc3a4..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/1/device/generic/car/emulator/IVehicleBusCallback.aidl +++ /dev/null @@ -1,23 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // -/////////////////////////////////////////////////////////////////////////////// - -// This file is a snapshot of an AIDL file. Do not edit it manually. There are -// two cases: -// 1). this is a frozen version file - do not edit this in any case. -// 2). this is a 'current' file. If you make a backwards compatible change to -// the interface (from the latest frozen version), the build system will -// prompt you to update this file with `m -update-api`. -// -// You must not make a backward incompatible change to any AIDL file built -// with the aidl_interface module type with versions property set. The module -// type is used to build AIDL files in a way that they can be used across -// independently updatable components of the system. If a device is shipped -// with such a backward incompatible change, it has a high risk of breaking -// later when a module using the interface is updated, e.g., Mainline modules. - -package device.generic.car.emulator; -@VintfStability -interface IVehicleBusCallback { - oneway void onNewPropValues(in android.hardware.automotive.vehicle.VehiclePropValue[] values); -} diff --git a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl b/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl deleted file mode 100644 index a2ff948..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBus.aidl +++ /dev/null @@ -1,24 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // -/////////////////////////////////////////////////////////////////////////////// - -// This file is a snapshot of an AIDL file. Do not edit it manually. There are -// two cases: -// 1). this is a frozen version file - do not edit this in any case. -// 2). this is a 'current' file. If you make a backwards compatible change to -// the interface (from the latest frozen version), the build system will -// prompt you to update this file with `m -update-api`. -// -// You must not make a backward incompatible change to any AIDL file built -// with the aidl_interface module type with versions property set. The module -// type is used to build AIDL files in a way that they can be used across -// independently updatable components of the system. If a device is shipped -// with such a backward incompatible change, it has a high risk of breaking -// later when a module using the interface is updated, e.g., Mainline modules. - -package device.generic.car.emulator; -@VintfStability -interface IVehicleBus { - void setOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); - void unsetOnNewPropValuesCallback(device.generic.car.emulator.IVehicleBusCallback callback); -} diff --git a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl b/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl deleted file mode 100644 index b5cc3a4..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/aidl_api/device.generic.car.emulator-aidl/current/device/generic/car/emulator/IVehicleBusCallback.aidl +++ /dev/null @@ -1,23 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // -/////////////////////////////////////////////////////////////////////////////// - -// This file is a snapshot of an AIDL file. Do not edit it manually. There are -// two cases: -// 1). this is a frozen version file - do not edit this in any case. -// 2). this is a 'current' file. If you make a backwards compatible change to -// the interface (from the latest frozen version), the build system will -// prompt you to update this file with `m -update-api`. -// -// You must not make a backward incompatible change to any AIDL file built -// with the aidl_interface module type with versions property set. The module -// type is used to build AIDL files in a way that they can be used across -// independently updatable components of the system. If a device is shipped -// with such a backward incompatible change, it has a high risk of breaking -// later when a module using the interface is updated, e.g., Mainline modules. - -package device.generic.car.emulator; -@VintfStability -interface IVehicleBusCallback { - oneway void onNewPropValues(in android.hardware.automotive.vehicle.VehiclePropValue[] values); -} diff --git a/emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl b/emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl deleted file mode 100644 index ed06d96..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBus.aidl +++ /dev/null @@ -1,32 +0,0 @@ -package device.generic.car.emulator; - -import device.generic.car.emulator.IVehicleBusCallback; - -/** - * IVehicleBus provides generic interface for various bus interpreters - * (emulated/virtual/physical/etc) to connect to Emulator VHAL and provides - * VehiclePropValue update as if it were generated from real car. - * - * This separates bus implementation details from emulator. For example, - * hard-coded rotary controller vendor specific key mapping can separately - * run as a service, allowing emulator to be spinned separately from the - * particular hardware of interest to be tested at the time. - */ - -import android.hardware.automotive.vehicle.VehiclePropValue; - -@VintfStability -interface IVehicleBus { - /** - * Sets a callback function for whenever new property value is generated - * from the bus. Calling this function twice will result in error. To - * change callback function, call unset function first. - */ - void setOnNewPropValuesCallback(IVehicleBusCallback callback); - - /** - * Unregisters a callback function that is currently active. Expected to - * receive the same Callback that was used to set for successful unset. - */ - void unsetOnNewPropValuesCallback(IVehicleBusCallback callback); -} diff --git a/emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl b/emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl deleted file mode 100644 index 0cbb905..0000000 --- a/emulator/vhal_v2_0/interfaces/aidl/device/generic/car/emulator/IVehicleBusCallback.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package device.generic.car.emulator; - -import device.generic.car.emulator.IVehicleBusCallback; -import android.hardware.automotive.vehicle.VehiclePropValue; - -@VintfStability -interface IVehicleBusCallback { - - /** - * This callback is called whenever there is a new propValue detected - * from the bus. - */ - oneway void onNewPropValues(in VehiclePropValue[] values); -} -- cgit v1.2.3 From 55f5016d7027373d2b989e5a7ab6a4bf8e9c742c Mon Sep 17 00:00:00 2001 From: shrikar Date: Tue, 12 Sep 2023 23:23:25 +0000 Subject: Updated vehicle emulator VHAL version from V2 to V3 Bug: 290801790 Test: presubmit Change-Id: I476018d7aa53553c0e4049d241516503128fd1bc --- emulator/car_emulator_interfaces/aidl/Android.bp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emulator/car_emulator_interfaces/aidl/Android.bp b/emulator/car_emulator_interfaces/aidl/Android.bp index a505ecc..a3345b6 100644 --- a/emulator/car_emulator_interfaces/aidl/Android.bp +++ b/emulator/car_emulator_interfaces/aidl/Android.bp @@ -14,7 +14,7 @@ aidl_interface { vendor_available: true, srcs: ["device/generic/car/emulator/*.aidl"], imports: [ - "android.hardware.automotive.vehicle-V2", + "android.hardware.automotive.vehicle-V3", "android.hardware.automotive.vehicle.property-V3", ], stability: "vintf", @@ -33,7 +33,7 @@ aidl_interface { { version: "1", imports: [ - "android.hardware.automotive.vehicle-V2", + "android.hardware.automotive.vehicle-V3", "android.hardware.automotive.vehicle.property-V3", ], }, -- cgit v1.2.3 From 26d7b37b05f09ecfa4bc1370fec43b0828be218b Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Fri, 15 Sep 2023 17:44:51 -0700 Subject: Update emulator VHAL name to V3. Update emulator VHAL name to v3 since it's going to support VHAL v3 interface. Test: Presubmit Bug: 300694866 Change-Id: Ic11fb8ecb8b47f66d5b45ef05afd348b59c70d6a --- common/car.mk | 2 +- emulator/car_emulator_vendor.mk | 2 +- emulator/vhal_aidl/Android.bp | 2 +- emulator/vhal_aidl/vhal-emulator-service.rc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/car.mk b/common/car.mk index 11471fb..41db13a 100644 --- a/common/car.mk +++ b/common/car.mk @@ -16,7 +16,7 @@ # Auto modules PRODUCT_PACKAGES += \ - android.hardware.automotive.vehicle@V1-emulator-service \ + android.hardware.automotive.vehicle@V3-emulator-service \ android.hardware.broadcastradio-service.default \ android.hardware.audio.service-caremu \ android.hardware.automotive.remoteaccess@V1-default-service \ diff --git a/emulator/car_emulator_vendor.mk b/emulator/car_emulator_vendor.mk index 64033f5..85398b5 100644 --- a/emulator/car_emulator_vendor.mk +++ b/emulator/car_emulator_vendor.mk @@ -50,7 +50,7 @@ endif # Auto modules PRODUCT_PACKAGES += \ - android.hardware.automotive.vehicle@V1-emulator-service \ + android.hardware.automotive.vehicle@V3-emulator-service \ android.hardware.broadcastradio-service.default \ android.hardware.audio.service-caremu \ android.hardware.automotive.remoteaccess@V1-default-service \ diff --git a/emulator/vhal_aidl/Android.bp b/emulator/vhal_aidl/Android.bp index 4f843fa..0b50eb7 100644 --- a/emulator/vhal_aidl/Android.bp +++ b/emulator/vhal_aidl/Android.bp @@ -19,7 +19,7 @@ package { } cc_binary { - name: "android.hardware.automotive.vehicle@V1-emulator-service", + name: "android.hardware.automotive.vehicle@V3-emulator-service", vendor: true, defaults: [ "FakeVehicleHardwareDefaults", diff --git a/emulator/vhal_aidl/vhal-emulator-service.rc b/emulator/vhal_aidl/vhal-emulator-service.rc index d311ece..db087c0 100644 --- a/emulator/vhal_aidl/vhal-emulator-service.rc +++ b/emulator/vhal_aidl/vhal-emulator-service.rc @@ -1,4 +1,4 @@ -service vendor.vehicle-hal-emulator /vendor/bin/hw/android.hardware.automotive.vehicle@V1-emulator-service +service vendor.vehicle-hal-emulator /vendor/bin/hw/android.hardware.automotive.vehicle@V3-emulator-service class early_hal user vehicle_network group system inet -- cgit v1.2.3 From 13b7225ab7b650abdcf46a302e2b8cca99097ccc Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Wed, 23 Aug 2023 17:31:43 -0700 Subject: Use remoteaccess ref impl V2. Test: Build Bug: 297271235 Change-Id: Ia087daf4986bd990bb666b9a508c898bc0b33c1b --- common/car.mk | 2 +- emulator/car_emulator_vendor.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/car.mk b/common/car.mk index 41db13a..e33f339 100644 --- a/common/car.mk +++ b/common/car.mk @@ -19,7 +19,7 @@ PRODUCT_PACKAGES += \ android.hardware.automotive.vehicle@V3-emulator-service \ android.hardware.broadcastradio-service.default \ android.hardware.audio.service-caremu \ - android.hardware.automotive.remoteaccess@V1-default-service \ + android.hardware.automotive.remoteaccess@V2-default-service \ android.hardware.automotive.ivn@V1-default-service # Runtime Resource Overlay for Connectivity diff --git a/emulator/car_emulator_vendor.mk b/emulator/car_emulator_vendor.mk index 85398b5..c0388ac 100644 --- a/emulator/car_emulator_vendor.mk +++ b/emulator/car_emulator_vendor.mk @@ -53,7 +53,7 @@ PRODUCT_PACKAGES += \ android.hardware.automotive.vehicle@V3-emulator-service \ android.hardware.broadcastradio-service.default \ android.hardware.audio.service-caremu \ - android.hardware.automotive.remoteaccess@V1-default-service \ + android.hardware.automotive.remoteaccess@V2-default-service \ android.hardware.automotive.ivn@V1-default-service # Copy car_core_hardware and overwrite handheld_core_hardware.xml with a disable config. -- cgit v1.2.3 From 612a4a3847cc05ac6b691d7f71e80f24d2029038 Mon Sep 17 00:00:00 2001 From: Aaqib Ismail Date: Thu, 21 Sep 2023 12:54:34 -0700 Subject: Increase board size for gcar Fix: 301326791 Test: m Change-Id: I23395a9a1d71aaa9802546c2f4cb89e59cdc8646 --- emulator_car64_arm64/BoardConfig.mk | 4 ++-- emulator_car64_x86_64/BoardConfig.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emulator_car64_arm64/BoardConfig.mk b/emulator_car64_arm64/BoardConfig.mk index 87783a2..1dcaf73 100644 --- a/emulator_car64_arm64/BoardConfig.mk +++ b/emulator_car64_arm64/BoardConfig.mk @@ -20,5 +20,5 @@ include device/generic/car/emulator/usbpt/BoardConfig.mk # Override BOARD_SUPER_PARTITION_SIZE to inclease the mounted system partition. BOARD_SUPER_PARTITION_SIZE := 5856296960 -# 3.5G -BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE = 3758096384 +# 3.8G +BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE = 3800000000 diff --git a/emulator_car64_x86_64/BoardConfig.mk b/emulator_car64_x86_64/BoardConfig.mk index 977e8a4..4317ab0 100644 --- a/emulator_car64_x86_64/BoardConfig.mk +++ b/emulator_car64_x86_64/BoardConfig.mk @@ -20,5 +20,5 @@ include device/generic/car/emulator/usbpt/BoardConfig.mk # Override BOARD_SUPER_PARTITION_SIZE to inclease the mounted system partition. BOARD_SUPER_PARTITION_SIZE := 5856296960 -# 3.5G -BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE = 3758096384 +# 3.8G +BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE = 3800000000 -- cgit v1.2.3 From 869004b409c01581365818f65b4e3d81e3c7a46b Mon Sep 17 00:00:00 2001 From: Aaqib Ismail Date: Thu, 21 Sep 2023 15:43:16 -0700 Subject: Fix typo in mk comment Bug: 301326791 Test: m Change-Id: I38db8b245f107caa610988e7231162fb96de8605 --- emulator_car64_arm64/BoardConfig.mk | 4 ++-- emulator_car64_x86_64/BoardConfig.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emulator_car64_arm64/BoardConfig.mk b/emulator_car64_arm64/BoardConfig.mk index 1dcaf73..8102f92 100644 --- a/emulator_car64_arm64/BoardConfig.mk +++ b/emulator_car64_arm64/BoardConfig.mk @@ -17,8 +17,8 @@ include device/generic/goldfish/emulator64_arm64/BoardConfig.mk include device/generic/car/emulator/usbpt/BoardConfig.mk -# Override BOARD_SUPER_PARTITION_SIZE to inclease the mounted system partition. +# Override BOARD_SUPER_PARTITION_SIZE to increase the mounted system partition. BOARD_SUPER_PARTITION_SIZE := 5856296960 -# 3.8G +# 3.6G BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE = 3800000000 diff --git a/emulator_car64_x86_64/BoardConfig.mk b/emulator_car64_x86_64/BoardConfig.mk index 4317ab0..89d8bea 100644 --- a/emulator_car64_x86_64/BoardConfig.mk +++ b/emulator_car64_x86_64/BoardConfig.mk @@ -17,8 +17,8 @@ include device/generic/goldfish/emulator64_x86_64/BoardConfig.mk include device/generic/car/emulator/usbpt/BoardConfig.mk -# Override BOARD_SUPER_PARTITION_SIZE to inclease the mounted system partition. +# Override BOARD_SUPER_PARTITION_SIZE to increase the mounted system partition. BOARD_SUPER_PARTITION_SIZE := 5856296960 -# 3.8G +# 3.6G BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE = 3800000000 -- cgit v1.2.3 From f8f7494b72617d837566b5fe7e9e8b09a320163f Mon Sep 17 00:00:00 2001 From: Prince Date: Fri, 22 Sep 2023 18:12:45 +0000 Subject: Adding a flag to disable dreams for auto Test: atest DreamManagerServiceTests Fixes: b/290163250 Change-Id: Ic631ca2b87d6a6ff3f3d4f2098e78491298fd64f --- common/overlay/frameworks/base/core/res/res/values/config.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/overlay/frameworks/base/core/res/res/values/config.xml b/common/overlay/frameworks/base/core/res/res/values/config.xml index b66aa87..92b145a 100644 --- a/common/overlay/frameworks/base/core/res/res/values/config.xml +++ b/common/overlay/frameworks/base/core/res/res/values/config.xml @@ -29,6 +29,8 @@ 0 + + false false false -- cgit v1.2.3 From b0bf46e3807c55e54a24e2e0912015d0c24a6a4e Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Mon, 25 Sep 2023 18:20:03 -0700 Subject: Add dump state selinux policy for new HALs. Dump state needs to dump IVN and remote access HAL. Add selinux policy rules. Test: atest android.security.cts.SELinuxHostTest#testNoBugreportDenials Bug: 280837170 Change-Id: I1b28521db04b3e3ee64ffd4863b5cacb140e267e --- common/sepolicy/dumpstate.te | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/sepolicy/dumpstate.te b/common/sepolicy/dumpstate.te index ad16894..6ecf7a3 100644 --- a/common/sepolicy/dumpstate.te +++ b/common/sepolicy/dumpstate.te @@ -1,7 +1,9 @@ -# Signal java processes to dump hal_vehicle_default, hal_audiocontrol_default +# Signal java processes to dump HALs. allow dumpstate { hal_vehicle_default hal_audiocontrol_default + hal_ivn_default + hal_remoteaccess_default }:process signal; @@ -15,3 +17,5 @@ dump_hal(hal_audiocontrol) dump_hal(hal_identity) dump_hal(hal_light) dump_hal(hal_power) +dump_hal(hal_ivn) +dump_hal(hal_remoteaccess) -- cgit v1.2.3 From e3cb2f9f206d8fb4625fad2d10f09c1f54ecae0a Mon Sep 17 00:00:00 2001 From: Calvin Huang Date: Thu, 28 Sep 2023 11:12:35 -0700 Subject: Add missing features to aosp portrait emulators Fix: 302558145 Test: build & adb shell pm list features -f | grep split Change-Id: I3acb0eee6ec50f2b4879399c04305b4d77c4b8ce --- car_ui_portrait.mk | 3 +++ sdk_car_portrait_x86_64.mk | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/car_ui_portrait.mk b/car_ui_portrait.mk index 6c6b5f4..06127e0 100644 --- a/car_ui_portrait.mk +++ b/car_ui_portrait.mk @@ -58,3 +58,6 @@ PRODUCT_SDK_ADDON_NAME := car_ui_portrait PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \ device/generic/car/car_x86_64/source.properties + +PRODUCT_COPY_FILES += \ + packages/services/Car/car_product/car_ui_portrait/car_ui_portrait_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_ui_portrait_hardware.xml \ No newline at end of file diff --git a/sdk_car_portrait_x86_64.mk b/sdk_car_portrait_x86_64.mk index 4684efb..8f93309 100644 --- a/sdk_car_portrait_x86_64.mk +++ b/sdk_car_portrait_x86_64.mk @@ -44,4 +44,7 @@ $(call inherit-product, packages/services/Car/car_product/car_ui_portrait/apps/c $(call inherit-product, packages/services/Car/car_product/car_ui_portrait/rro/car_ui_portrait_rro.mk) # Use the default goldfish audio implementation -EMULATOR_VENDOR_NO_SOUND := true \ No newline at end of file +EMULATOR_VENDOR_NO_SOUND := true + +PRODUCT_COPY_FILES += \ + packages/services/Car/car_product/car_ui_portrait/car_ui_portrait_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_ui_portrait_hardware.xml \ No newline at end of file -- cgit v1.2.3 From bef4b6c1dc3faa4d7329329d3a8159e7f7a6f566 Mon Sep 17 00:00:00 2001 From: Philip Chen Date: Fri, 6 Oct 2023 21:30:37 +0000 Subject: sdk_car_portrait_x86_64: Inherit sdk_car_x86_64 Refactor sdk_car_portrait_x86_64 to inherit sdk_car_x86_64 so that Car SSI (Shared System Image) can be applied to sdk_car_portrait_x86_64 later. Bug: 303863968 Test: build sdk_car_portrait_x86_64 and run emulator Change-Id: I795d68ffe64e5812bd214911f37c260ff25092ad --- sdk_car_portrait_x86_64.mk | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sdk_car_portrait_x86_64.mk b/sdk_car_portrait_x86_64.mk index 8f93309..12dd357 100644 --- a/sdk_car_portrait_x86_64.mk +++ b/sdk_car_portrait_x86_64.mk @@ -24,16 +24,16 @@ DO_NOT_INCLUDE_CAR_UI_REFERENCE_DESIGN := true # Exclude Car Visual Overlay DISABLE_CAR_PRODUCT_VISUAL_OVERLAY := true -# Use the common Car Overlay -PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay - # Copy additional files PRODUCT_COPY_FILES += \ packages/services/Car/car_product/car_ui_portrait/car_ui_portrait.ini:config.ini \ packages/services/Car/car_product/car_ui_portrait/bootanimation/bootanimation.zip:system/media/bootanimation.zip -$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/sdk_phone_x86_64.mk) +$(call inherit-product, device/generic/car/sdk_car_x86_64.mk) + +# TODO(b/303863968): Set it to true after cleaning up the system partition +# changes from this makefile +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := false PRODUCT_NAME := sdk_car_portrait_x86_64 PRODUCT_MODEL := CarUiPortrait on x86_64 emulator @@ -43,8 +43,5 @@ PRODUCT_SDK_ADDON_NAME := sdk_car_portrait_x86_64 $(call inherit-product, packages/services/Car/car_product/car_ui_portrait/apps/car_ui_portrait_apps.mk) $(call inherit-product, packages/services/Car/car_product/car_ui_portrait/rro/car_ui_portrait_rro.mk) -# Use the default goldfish audio implementation -EMULATOR_VENDOR_NO_SOUND := true - PRODUCT_COPY_FILES += \ - packages/services/Car/car_product/car_ui_portrait/car_ui_portrait_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_ui_portrait_hardware.xml \ No newline at end of file + packages/services/Car/car_product/car_ui_portrait/car_ui_portrait_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_ui_portrait_hardware.xml -- cgit v1.2.3 From 00df357ac32eea3010d86a0d48e6134c6ba56b3f Mon Sep 17 00:00:00 2001 From: Sihu Song Date: Wed, 11 Oct 2023 18:31:54 +0900 Subject: Removed targets car_ui_portrait, car_x86_64 Bug: 302562369 Test: Confirmed those files are not referred anywhere Change-Id: Idb58b1212d7f8d4a203d09f1c6f3bd6b566e3935 --- AndroidProducts.mk | 4 ---- car_ui_portrait.mk | 63 ------------------------------------------------------ car_x86_64.mk | 46 --------------------------------------- 3 files changed, 113 deletions(-) delete mode 100644 car_ui_portrait.mk delete mode 100644 car_x86_64.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 047c5e1..f2a74c8 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -15,8 +15,6 @@ # PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/car_ui_portrait.mk \ - $(LOCAL_DIR)/car_x86_64.mk \ $(LOCAL_DIR)/gsi_car_arm64.mk \ $(LOCAL_DIR)/gsi_car_x86_64.mk \ $(LOCAL_DIR)/sdk_car_arm64.mk \ @@ -28,8 +26,6 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/sdk_car_x86_64.mk \ COMMON_LUNCH_CHOICES := \ - car_ui_portrait-userdebug \ - car_x86_64-userdebug \ gsi_car_arm64-userdebug \ gsi_car_x86_64-userdebug \ sdk_car_arm-userdebug \ diff --git a/car_ui_portrait.mk b/car_ui_portrait.mk deleted file mode 100644 index 06127e0..0000000 --- a/car_ui_portrait.mk +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2021 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -PRODUCT_COPY_FILES += \ - packages/services/Car/car_product/car_ui_portrait/car_ui_portrait.ini:config.ini \ - packages/services/Car/car_product/car_ui_portrait/bootanimation/bootanimation.zip:system/media/bootanimation.zip - -$(call inherit-product, device/generic/goldfish/soong_namespaces.mk) - -PRODUCT_PACKAGE_OVERLAYS := \ - device/generic/car/common/overlay - -# Disable the Setup Wizard. This overrides the setting in gms.mk -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - ro.setupwizard.mode=DISABLED - -$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk) - -$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_x86_64.mk) -$(call inherit-product, device/generic/goldfish/64bitonly/product/x86_64-vendor.mk) -$(call inherit-product, device/generic/goldfish/64bitonly/product/emulator64_vendor.mk) -$(call inherit-product, device/generic/goldfish/emulator64_x86_64/device.mk) - -$(call inherit-product, packages/services/Car/car_product/car_ui_portrait/apps/car_ui_portrait_apps.mk) -$(call inherit-product, packages/services/Car/car_product/car_ui_portrait/rro/car_ui_portrait_rro.mk) -$(call inherit-product, packages/services/Car/car_product/car_ui_portrait/emu/car_ui_portrait_emu.mk) - -PRODUCT_SDK_ADDON_NAME := car_emu_x86_64 - -# Extra files needed by the addon. -PRODUCT_SDK_ADDON_COPY_FILES := \ - device/generic/goldfish/data/etc/encryptionkey.img:images/${TARGET_CPU_ABI}/encryptionkey.img\ - device/generic/car/car_x86_64/manifest.ini:manifest.ini - -PRODUCT_SDK_ADDON_COPY_MODULES := \ - com.android.future.usb.accessory:libs/usb.jar - -DEVICE_PACKAGE_OVERLAYS += device/generic/car/car_x86_64/overlay - -EMULATOR_VENDOR_NO_SOUND := true -PRODUCT_NAME := car_ui_portrait -PRODUCT_DEVICE := emulator_car64_x86_64 -PRODUCT_BRAND := Android -PRODUCT_MODEL := CarUiPortrait on x86_64 emulator -PRODUCT_SDK_ADDON_NAME := car_ui_portrait - -PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \ - device/generic/car/car_x86_64/source.properties - -PRODUCT_COPY_FILES += \ - packages/services/Car/car_product/car_ui_portrait/car_ui_portrait_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_ui_portrait_hardware.xml \ No newline at end of file diff --git a/car_x86_64.mk b/car_x86_64.mk deleted file mode 100644 index 44d551d..0000000 --- a/car_x86_64.mk +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay - -$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_x86_64.mk) -$(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk) - -$(call inherit-product, device/generic/goldfish/64bitonly/product/x86_64-vendor.mk) -$(call inherit-product, device/generic/goldfish/64bitonly/product/emulator64_vendor.mk) -$(call inherit-product, device/generic/goldfish/emulator64_x86_64/device.mk) - -PRODUCT_SDK_ADDON_NAME := car_emu_x86_64 - -# Extra files needed by the addon. -PRODUCT_SDK_ADDON_COPY_FILES := \ - device/generic/goldfish/data/etc/encryptionkey.img:images/${TARGET_CPU_ABI}/encryptionkey.img\ - device/generic/car/car_x86_64/manifest.ini:manifest.ini - -PRODUCT_SDK_ADDON_COPY_MODULES := \ - com.android.future.usb.accessory:libs/usb.jar - -DEVICE_PACKAGE_OVERLAYS += device/generic/car/car_x86_64/overlay - -EMULATOR_VENDOR_NO_SOUND := true -PRODUCT_NAME := car_x86_64 -PRODUCT_DEVICE := emulator_car64_x86_64 -PRODUCT_BRAND := Google -PRODUCT_MODEL := Car on x86_64 emulator -PRODUCT_SDK_ADDON_NAME := car_x86_64 - -PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \ - device/generic/car/car_x86_64/source.properties -- cgit v1.2.3 From d7e11034d4ad2493efcc077a74f0b6dba1b29ff1 Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Wed, 19 Jul 2023 15:49:08 -0700 Subject: Upgrade emulator HAL version. Test: Presubmit Bug: 306754638 Change-Id: I276d426bd8322612ce6cef92dbbfe29480fbacde --- emulator/usbpt/protocan/protocanbus/Android.bp | 2 +- emulator/vhal_aidl/Android.bp | 2 +- emulator/vhal_aidl/VehicleEmulator/Android.bp | 2 +- emulator/vhal_aidl/VehicleEmulator/test/Android.bp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emulator/usbpt/protocan/protocanbus/Android.bp b/emulator/usbpt/protocan/protocanbus/Android.bp index f35dfa7..92fcc5d 100644 --- a/emulator/usbpt/protocan/protocanbus/Android.bp +++ b/emulator/usbpt/protocan/protocanbus/Android.bp @@ -45,7 +45,7 @@ cc_binary { include_dirs: ["frameworks/native/include"], shared_libs: [ "android.hardware.automotive.can@1.0", - "device.generic.car.emulator-aidl-V1-ndk", + "device.generic.car.emulator-aidl-V2-ndk", "libbinder_ndk", "libhidlbase", "libcutils", diff --git a/emulator/vhal_aidl/Android.bp b/emulator/vhal_aidl/Android.bp index 0b50eb7..44c27a7 100644 --- a/emulator/vhal_aidl/Android.bp +++ b/emulator/vhal_aidl/Android.bp @@ -52,6 +52,6 @@ cc_binary { "libutils", "libprotobuf-cpp-lite", "libbinder_ndk", - "device.generic.car.emulator-aidl-V1-ndk", + "device.generic.car.emulator-aidl-V2-ndk", ], } diff --git a/emulator/vhal_aidl/VehicleEmulator/Android.bp b/emulator/vhal_aidl/VehicleEmulator/Android.bp index e301233..56f2522 100644 --- a/emulator/vhal_aidl/VehicleEmulator/Android.bp +++ b/emulator/vhal_aidl/VehicleEmulator/Android.bp @@ -38,7 +38,7 @@ cc_library { "libutils", "libprotobuf-cpp-lite", "libbinder_ndk", - "device.generic.car.emulator-aidl-V1-ndk", + "device.generic.car.emulator-aidl-V2-ndk", ], local_include_dirs: ["include"], export_include_dirs: ["include"], diff --git a/emulator/vhal_aidl/VehicleEmulator/test/Android.bp b/emulator/vhal_aidl/VehicleEmulator/test/Android.bp index 700ee42..1c7d950 100644 --- a/emulator/vhal_aidl/VehicleEmulator/test/Android.bp +++ b/emulator/vhal_aidl/VehicleEmulator/test/Android.bp @@ -39,7 +39,7 @@ cc_test { "libutils", "libprotobuf-cpp-lite", "libbinder_ndk", - "device.generic.car.emulator-aidl-V1-ndk", + "device.generic.car.emulator-aidl-V2-ndk", ], defaults: [ "VehicleHalDefaults", -- cgit v1.2.3 From 7876d3b499c4b96a9943e8dbacf23cedf2295c24 Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Wed, 25 Oct 2023 14:43:11 -0600 Subject: Fix lunch choices for git_main We add "trunk_staging-" for all COMMON_LUNCH_CHOICES so they are valid in the trunk stable setup. Bug: 307738446 Test: lunch Change-Id: I59f0d19756f280ad71e3a0755a6c2ccc62f5060c --- AndroidProducts.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 298bc26..9fac755 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -24,11 +24,11 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/sdk_car_x86_64.mk \ COMMON_LUNCH_CHOICES := \ - gsi_car_arm64-userdebug \ - gsi_car_x86_64-userdebug \ - sdk_car_arm64-userdebug \ - sdk_car_md_x86_64-userdebug \ - sdk_car_portrait_x86_64-userdebug \ - sdk_car_x86_64-userdebug \ + gsi_car_arm64-trunk_staging-userdebug \ + gsi_car_x86_64-trunk_staging-userdebug \ + sdk_car_arm64-trunk_staging-userdebug \ + sdk_car_md_x86_64-trunk_staging-userdebug \ + sdk_car_portrait_x86_64-trunk_staging-userdebug \ + sdk_car_x86_64-trunk_staging-userdebug \ EMULATOR_VENDOR_NO_SOUND_TRIGGER := false -- cgit v1.2.3 From 7222c37bc630561d3a7b28c845dda7a3075f34c2 Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Wed, 25 Oct 2023 21:40:35 +0000 Subject: Revert "Upgrade emulator HAL version." Revert submission 24137210-car_emulator_v2 Reason for revert: Not necessary since V2 and V1 are the same, also we do not want to break SDV in U branch. Reverted changes: /q/submissionid:24137210-car_emulator_v2 Change-Id: I6b54e532035d42c7967090c002f2b12eb7803906 --- emulator/usbpt/protocan/protocanbus/Android.bp | 2 +- emulator/vhal_aidl/Android.bp | 2 +- emulator/vhal_aidl/VehicleEmulator/Android.bp | 2 +- emulator/vhal_aidl/VehicleEmulator/test/Android.bp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emulator/usbpt/protocan/protocanbus/Android.bp b/emulator/usbpt/protocan/protocanbus/Android.bp index 92fcc5d..f35dfa7 100644 --- a/emulator/usbpt/protocan/protocanbus/Android.bp +++ b/emulator/usbpt/protocan/protocanbus/Android.bp @@ -45,7 +45,7 @@ cc_binary { include_dirs: ["frameworks/native/include"], shared_libs: [ "android.hardware.automotive.can@1.0", - "device.generic.car.emulator-aidl-V2-ndk", + "device.generic.car.emulator-aidl-V1-ndk", "libbinder_ndk", "libhidlbase", "libcutils", diff --git a/emulator/vhal_aidl/Android.bp b/emulator/vhal_aidl/Android.bp index 44c27a7..0b50eb7 100644 --- a/emulator/vhal_aidl/Android.bp +++ b/emulator/vhal_aidl/Android.bp @@ -52,6 +52,6 @@ cc_binary { "libutils", "libprotobuf-cpp-lite", "libbinder_ndk", - "device.generic.car.emulator-aidl-V2-ndk", + "device.generic.car.emulator-aidl-V1-ndk", ], } diff --git a/emulator/vhal_aidl/VehicleEmulator/Android.bp b/emulator/vhal_aidl/VehicleEmulator/Android.bp index 56f2522..e301233 100644 --- a/emulator/vhal_aidl/VehicleEmulator/Android.bp +++ b/emulator/vhal_aidl/VehicleEmulator/Android.bp @@ -38,7 +38,7 @@ cc_library { "libutils", "libprotobuf-cpp-lite", "libbinder_ndk", - "device.generic.car.emulator-aidl-V2-ndk", + "device.generic.car.emulator-aidl-V1-ndk", ], local_include_dirs: ["include"], export_include_dirs: ["include"], diff --git a/emulator/vhal_aidl/VehicleEmulator/test/Android.bp b/emulator/vhal_aidl/VehicleEmulator/test/Android.bp index 1c7d950..700ee42 100644 --- a/emulator/vhal_aidl/VehicleEmulator/test/Android.bp +++ b/emulator/vhal_aidl/VehicleEmulator/test/Android.bp @@ -39,7 +39,7 @@ cc_test { "libutils", "libprotobuf-cpp-lite", "libbinder_ndk", - "device.generic.car.emulator-aidl-V2-ndk", + "device.generic.car.emulator-aidl-V1-ndk", ], defaults: [ "VehicleHalDefaults", -- cgit v1.2.3 From 89bc777f94a6b4299fe710f5ab750069869470e4 Mon Sep 17 00:00:00 2001 From: Roman Kiryanov Date: Wed, 25 Oct 2023 23:34:35 -0700 Subject: Use emu64*/device.mk instead of emulator64*/device.mk the emulator64* folders will be retired. Bug: 295259752 Test: presubmit Change-Id: Ifef612f304090b512e3d34ab87feb4ac7495d038 Signed-off-by: Roman Kiryanov --- emulator_car64_arm64/BoardConfig.mk | 2 +- emulator_car64_x86_64/BoardConfig.mk | 2 +- sdk_car_arm64.mk | 2 +- sdk_car_x86_64.mk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emulator_car64_arm64/BoardConfig.mk b/emulator_car64_arm64/BoardConfig.mk index 8102f92..b22e303 100644 --- a/emulator_car64_arm64/BoardConfig.mk +++ b/emulator_car64_arm64/BoardConfig.mk @@ -14,7 +14,7 @@ # # Use emulator64_arm64 BoardConfig as base -include device/generic/goldfish/emulator64_arm64/BoardConfig.mk +include device/generic/goldfish/emu64a/BoardConfig.mk include device/generic/car/emulator/usbpt/BoardConfig.mk # Override BOARD_SUPER_PARTITION_SIZE to increase the mounted system partition. diff --git a/emulator_car64_x86_64/BoardConfig.mk b/emulator_car64_x86_64/BoardConfig.mk index 89d8bea..37aa391 100644 --- a/emulator_car64_x86_64/BoardConfig.mk +++ b/emulator_car64_x86_64/BoardConfig.mk @@ -14,7 +14,7 @@ # # Use emulator64_x86_64_arm64 BoardConfig as base -include device/generic/goldfish/emulator64_x86_64/BoardConfig.mk +include device/generic/goldfish/emu64x/BoardConfig.mk include device/generic/car/emulator/usbpt/BoardConfig.mk # Override BOARD_SUPER_PARTITION_SIZE to increase the mounted system partition. diff --git a/sdk_car_arm64.mk b/sdk_car_arm64.mk index b5b1501..614cf4a 100644 --- a/sdk_car_arm64.mk +++ b/sdk_car_arm64.mk @@ -47,7 +47,7 @@ $(call inherit-product, device/generic/car/emulator/car_emulator_product.mk) # $(call inherit-product, device/generic/car/emulator/car_emulator_vendor.mk) $(call inherit-product, device/generic/goldfish/64bitonly/product/arm64-vendor.mk) -$(call inherit-product, device/generic/goldfish/emulator64_arm64/device.mk) +$(call inherit-product, device/generic/goldfish/emu64a/device.mk) EMULATOR_VENDOR_NO_SOUND := true PRODUCT_NAME := sdk_car_arm64 diff --git a/sdk_car_x86_64.mk b/sdk_car_x86_64.mk index e98f0a0..2e751cf 100644 --- a/sdk_car_x86_64.mk +++ b/sdk_car_x86_64.mk @@ -47,7 +47,7 @@ $(call inherit-product, device/generic/car/emulator/car_emulator_product.mk) # $(call inherit-product, device/generic/car/emulator/car_emulator_vendor.mk) $(call inherit-product, device/generic/goldfish/64bitonly/product/x86_64-vendor.mk) -$(call inherit-product, device/generic/goldfish/emulator64_x86_64/device.mk) +$(call inherit-product, device/generic/goldfish/emu64x/device.mk) EMULATOR_VENDOR_NO_SOUND := true PRODUCT_NAME := sdk_car_x86_64 -- cgit v1.2.3 From 38860dce83075760291da7df10e907437511913a Mon Sep 17 00:00:00 2001 From: Rachit Jain Date: Thu, 26 Oct 2023 19:56:13 +0000 Subject: Update configs with MAIN display type to have inputType TOUCH_SCREEN Bug: 307807755 Test: atest CarOccupantZoneManagerTest Change-Id: Ia167a02c66e5153ee44bae46751ce3ea879653e9 --- .../cluster/rro_overlays/CarServiceOverlay/res/values/config.xml | 6 +++--- .../CarServiceMultiDisplayOverlayEmulator/res/values/config.xml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml b/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml index c77764d..3bb1c93 100644 --- a/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml +++ b/emulator/cluster/rro_overlays/CarServiceOverlay/res/values/config.xml @@ -29,11 +29,11 @@ displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0, inputTypes=DPAD_KEYS displayPort=2,displayType=MAIN,occupantZoneId=1, - inputTypes=NAVIGATE_KEYS + inputTypes=TOUCH_SCREEN displayPort=3,displayType=MAIN,occupantZoneId=2, - inputTypes=NAVIGATE_KEYS + inputTypes=TOUCH_SCREEN displayUniqueId=virtual:com.example:MainD,displayType=MAIN,occupantZoneId=3, - inputTypes=NAVIGATE_KEYS + inputTypes=TOUCH_SCREEN displayPort: Unique port id for the display. displayType: Display type for the display. Use * part from diff --git a/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/values/config.xml b/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/values/config.xml index 8463455..fe55a0e 100644 --- a/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/values/config.xml +++ b/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/values/config.xml @@ -35,10 +35,10 @@ displayPort=0,displayType=MAIN,occupantZoneId=0,inputTypes=TOUCH_SCREEN|DPAD_KEYS|NAVIGATE_KEYS|ROTARY_NAVIGATION displayUniqueId=virtual:com.android.car.cluster.osdouble:ClusterDisplay,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0,inputTypes=DPAD_KEYS - displayUniqueId=virtual:com.android.emulator.multidisplay:1234563,displayType=MAIN,occupantZoneId=1,inputTypes=DPAD_KEYS - displayUniqueId=virtual:com.android.emulator.multidisplay:1234564,displayType=MAIN,occupantZoneId=2,inputTypes=DPAD_KEYS - displayUniqueId=virtual:com.android.emulator.multidisplay:1234565,displayType=MAIN,occupantZoneId=3,inputTypes=DPAD_KEYS - displayUniqueId=virtual:com.android.emulator.multidisplay:1234566,displayType=MAIN,occupantZoneId=4,inputTypes=DPAD_KEYS + displayUniqueId=virtual:com.android.emulator.multidisplay:1234563,displayType=MAIN,occupantZoneId=1,inputTypes=TOUCH_SCREEN + displayUniqueId=virtual:com.android.emulator.multidisplay:1234564,displayType=MAIN,occupantZoneId=2,inputTypes=TOUCH_SCREEN + displayUniqueId=virtual:com.android.emulator.multidisplay:1234565,displayType=MAIN,occupantZoneId=3,inputTypes=TOUCH_SCREEN + displayUniqueId=virtual:com.android.emulator.multidisplay:1234566,displayType=MAIN,occupantZoneId=4,inputTypes=TOUCH_SCREEN diff --git a/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/xml/car_ux_restrictions_map.xml b/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/xml/car_ux_restrictions_map.xml index c2a242b..798873f 100644 --- a/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/xml/car_ux_restrictions_map.xml +++ b/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/xml/car_ux_restrictions_map.xml @@ -33,7 +33,7 @@ - + -- cgit v1.2.3 From 40bff94fa14b9c7bfcf1f1a65d930b9f355554dc Mon Sep 17 00:00:00 2001 From: Sal Savage Date: Tue, 28 Nov 2023 13:09:02 -0800 Subject: Update car COD to account for format bits so we can be Car Audio again Our minor class is 0x8 - Car Audio, but that is supposed to set the 5th bit to account for the format bits, not the 3rd bit. This is causing our device to be interpreted as an 0x2 - Handsfree Device by remote devices This change updates the byte in question, as well as the documentation so its clearer how COD gets applied by spec, in case we ever need to change it in the future. Bug: 312759291 Test: make -j; adb logcat | grep -ie "Using class of device" Test: Boot device, check HCI snoop logs for HCI COD Write packet Change-Id: Idbb6b0403b52939663d38f7b4653639a4eec1ba5 --- emulator/usbpt/bluetooth/bluetooth.prop | 38 +++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/emulator/usbpt/bluetooth/bluetooth.prop b/emulator/usbpt/bluetooth/bluetooth.prop index fdd00c0..e84275d 100644 --- a/emulator/usbpt/bluetooth/bluetooth.prop +++ b/emulator/usbpt/bluetooth/bluetooth.prop @@ -1,11 +1,35 @@ # The default Bluetooth Class of Device -# Service Field: 0x26 -> 38 -# - Bit 17: Networking -# - Bit 18: Rendering -# - Bit 21: Audio -# Major Class: 0x04 -> 4 (Audio / Video) -# Minor Class: 0x08 -> 8 (Car Audio) -bluetooth.device.class_of_device=38,4,8 +# +# Bluetooth uses "format 1" for class of device, which consists of 4 fields: +# * Major Service Class +# * Major Device Class +# * Minor Device Class +# * Format indicator (Fixed: 0b00) +# +# Class of device is represented by a 3-tuple. However, each value in the tuple does +# *NOT* correspond to a field. Instead, class of device is stored internally as 24 bits, +# and each value in the tuple corresponds to an octet. +# +# Format (24 Bits): +# Service Major Minor fmt +# (11 bits) (5 bits) (6 bits) 0b00 +# |23 13|12 8|7 2|1 0| +# |<------------------->|<------->|<--------->|<->| +# |0|0|1|0|0|1|1|0|0|0|0|0|0|1|0|0|0|0|1|0|0|0|0|0| +# |<------------->|<------------->|<------------->| +# |23 16|15 8|7 0| +# | octet[0] = 38 | octet[1] = 4 | octet[2] = 32 | +# +# Major Service Class: +# - Bit 21: Audio +# - Bit 18: Rendering +# - Bit 17: Networking +# Major Device Class: +# - Bit 10: Audio / Video +# Minor Device Class: +# - Bit 5: Car Audio +# Format Bits (Fixed): 0b00 -> "Format 1" +bluetooth.device.class_of_device=38,4,32 bluetooth.device.default_name=gCar Emulator # The Bluetooth profiles that cars expect to have enabled. All other profiles -- cgit v1.2.3 From 255db26fe2160d926a3ea8287e3c457f06f0f90a Mon Sep 17 00:00:00 2001 From: Sihu Song Date: Mon, 4 Dec 2023 14:00:19 +0900 Subject: Add hw.lcd.height/width in config.ini to mitigate rotated launch issue Bug: 307180733 Test: Local build and test Change-Id: I7b0a9d2e493925f34109994116b0c5c6b921c95e --- emulator/multi-display-dynamic/config.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emulator/multi-display-dynamic/config.ini b/emulator/multi-display-dynamic/config.ini index b8c7f76..8d7238d 100644 --- a/emulator/multi-display-dynamic/config.ini +++ b/emulator/multi-display-dynamic/config.ini @@ -1,4 +1,6 @@ hw.audioInput=yes +hw.lcd.width=1408 +hw.lcd.height=792 hw.lcd.density=160 hw.cpu.ncore=6 hw.gpu.enabled=yes -- cgit v1.2.3 From bdd2622257b663ee6018649e5789927f5a01d314 Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Mon, 4 Dec 2023 18:37:50 -0800 Subject: Use getPropConfig instead of getConfig. getPropConfig returns a copy of the config, which is safer to use. Test: Presubmit Bug: 308202443 Change-Id: I7ed7e7af2297b4e6536213994c031abd17bc1e7e --- emulator/vhal_aidl/VehicleEmulator/EmulatedVehicleHardware.cpp | 2 +- emulator/vhal_aidl/VehicleEmulator/VehicleEmulator.cpp | 2 +- emulator/vhal_aidl/VehicleEmulator/include/EmulatedVehicleHardware.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emulator/vhal_aidl/VehicleEmulator/EmulatedVehicleHardware.cpp b/emulator/vhal_aidl/VehicleEmulator/EmulatedVehicleHardware.cpp index 941d4f8..6eb7010 100644 --- a/emulator/vhal_aidl/VehicleEmulator/EmulatedVehicleHardware.cpp +++ b/emulator/vhal_aidl/VehicleEmulator/EmulatedVehicleHardware.cpp @@ -175,7 +175,7 @@ std::vector EmulatedVehicleHardware::getAl EmulatedVehicleHardware::ConfigResultType EmulatedVehicleHardware::getPropConfig(int32_t propId) const { - return mServerSidePropStore->getConfig(propId); + return mServerSidePropStore->getPropConfig(propId); } bool EmulatedVehicleHardware::isInQemu() { diff --git a/emulator/vhal_aidl/VehicleEmulator/VehicleEmulator.cpp b/emulator/vhal_aidl/VehicleEmulator/VehicleEmulator.cpp index b09b8b9..73ffeef 100644 --- a/emulator/vhal_aidl/VehicleEmulator/VehicleEmulator.cpp +++ b/emulator/vhal_aidl/VehicleEmulator/VehicleEmulator.cpp @@ -105,7 +105,7 @@ void VehicleEmulator::doGetConfig(const VehicleEmulator::EmulatorMessage& rxMsg, } vhal_proto::VehiclePropConfig* protoCfg = respMsg->add_config(); - populateProtoVehicleConfig(*result.value(), protoCfg); + populateProtoVehicleConfig(result.value(), protoCfg); respMsg->set_status(vhal_proto::RESULT_OK); } diff --git a/emulator/vhal_aidl/VehicleEmulator/include/EmulatedVehicleHardware.h b/emulator/vhal_aidl/VehicleEmulator/include/EmulatedVehicleHardware.h index f5aaed1..c4a7b01 100644 --- a/emulator/vhal_aidl/VehicleEmulator/include/EmulatedVehicleHardware.h +++ b/emulator/vhal_aidl/VehicleEmulator/include/EmulatedVehicleHardware.h @@ -38,7 +38,7 @@ class EmulatedVehicleHardware : public FakeVehicleHardware { using AidlVehiclePropValue = aidl::android::hardware::automotive::vehicle::VehiclePropValue; using IVehicleBus = aidl::device::generic::car::emulator::IVehicleBus; using BnVehicleBusCallback = aidl::device::generic::car::emulator::BnVehicleBusCallback; - using ConfigResultType = android::base::Result; + using ConfigResultType = android::base::Result; EmulatedVehicleHardware(); EmulatedVehicleHardware(std::string_view default_config_dir, -- cgit v1.2.3 From de6b992071b233019052dc0f37640c5f50182c81 Mon Sep 17 00:00:00 2001 From: Sihu Song Date: Tue, 5 Dec 2023 14:27:26 +0900 Subject: Additionally add hw.lcd.width/height on two more config.ini Bug: 307180733 Test: Local build Change-Id: I5787687181a5de21d315feda301d19081c2e6dbe --- common/config.ini | 2 ++ common/config.ini.car_md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/common/config.ini b/common/config.ini index 8576698..d7c5abb 100644 --- a/common/config.ini +++ b/common/config.ini @@ -1,4 +1,6 @@ hw.audioInput=yes +hw.lcd.width=1408 +hw.lcd.height=792 hw.lcd.density=160 hw.cpu.ncore=6 hw.gpu.enabled=yes diff --git a/common/config.ini.car_md b/common/config.ini.car_md index 74e6abe..c290caf 100644 --- a/common/config.ini.car_md +++ b/common/config.ini.car_md @@ -1,4 +1,6 @@ hw.audioInput=yes +hw.lcd.width=1848 +hw.lcd.height=792 hw.lcd.density=160 hw.cpu.ncore=6 hw.gpu.enabled=yes -- cgit v1.2.3 From 0a39f24be91480e154a3c06538c7881b035e69fe Mon Sep 17 00:00:00 2001 From: Calvin Huang Date: Tue, 5 Dec 2023 14:37:05 -0800 Subject: Add basic skins for 3 presets These skins only defined dimensions. 1. automotive_landscape 2. automotive_ultrawide 3. automotive_portrait Add extar margin in layouts so user can use it to move the emu. TODO: Add background/foregounds Bug: 315032735 Test: Add skin absolute path to config.ini then boots emu Change-Id: I92620006af0e4273b28fa0ec89911c3f107137b0 --- emulator/skins/automotive_landscape/layout | 38 ++++++++++++++++++++++++++++++ emulator/skins/automotive_portrait/layout | 35 +++++++++++++++++++++++++++ emulator/skins/automotive_ultrawide/layout | 35 +++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 emulator/skins/automotive_landscape/layout create mode 100644 emulator/skins/automotive_portrait/layout create mode 100644 emulator/skins/automotive_ultrawide/layout diff --git a/emulator/skins/automotive_landscape/layout b/emulator/skins/automotive_landscape/layout new file mode 100644 index 0000000..be1e1a8 --- /dev/null +++ b/emulator/skins/automotive_landscape/layout @@ -0,0 +1,38 @@ +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +parts { + device { + display { + width 1408 + height 792 + } + } + landscape { + background { + image back.png + } + } +} +layouts { + landscape { + width 1500 + height 837 + part1 { + name device + x 50 + y 30 + } + } +} diff --git a/emulator/skins/automotive_portrait/layout b/emulator/skins/automotive_portrait/layout new file mode 100644 index 0000000..a4c22b6 --- /dev/null +++ b/emulator/skins/automotive_portrait/layout @@ -0,0 +1,35 @@ +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +parts { + device { + display { + width 1280 + height 1606 + x 0 + y 0 + } + } +} +layouts { + landscape { + width 1280 + height 1650 + part1 { + name device + x 0 + y 0 + } + } +} diff --git a/emulator/skins/automotive_ultrawide/layout b/emulator/skins/automotive_ultrawide/layout new file mode 100644 index 0000000..6135b9f --- /dev/null +++ b/emulator/skins/automotive_ultrawide/layout @@ -0,0 +1,35 @@ +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +parts { + device { + display { + width 3904 + height 1320 + x 0 + y 0 + } + } +} +layouts { + landscape { + width 3904 + height 1340 + part1 { + name device + x 0 + y 0 + } + } +} -- cgit v1.2.3