diff --git a/audio/aidl/android/hardware/audio/core/IModule.aidl b/audio/aidl/android/hardware/audio/core/IModule.aidl
index 7622d9a..e736c32 100644
--- a/audio/aidl/android/hardware/audio/core/IModule.aidl
+++ b/audio/aidl/android/hardware/audio/core/IModule.aidl
@@ -234,6 +234,12 @@
      * instance previously instantiated using the 'connectExternalDevice'
      * method.
      *
+     * The framework will call this method before closing streams and resetting
+     * patches. This call can be used by the HAL module to prepare itself to
+     * device disconnection. If the HAL module indicates an error after the first
+     * call, the framework will call this method once again after closing associated
+     * streams and patches.
+     *
      * @throws EX_ILLEGAL_ARGUMENT In the following cases:
      *                             - If the port can not be found by the ID.
      *                             - If this is not a connected device port.
diff --git a/automotive/ivn_android_device/impl/default/include/IvnAndroidDeviceService.h b/automotive/ivn_android_device/impl/default/include/IvnAndroidDeviceService.h
index c0cc9fe..0cff8fe 100644
--- a/automotive/ivn_android_device/impl/default/include/IvnAndroidDeviceService.h
+++ b/automotive/ivn_android_device/impl/default/include/IvnAndroidDeviceService.h
@@ -20,6 +20,7 @@
 #include <aidl/android/hardware/automotive/ivn/EndpointInfo.h>
 #include <aidl/android/hardware/automotive/ivn/OccupantZoneInfo.h>
 #include <android/binder_auto_utils.h>
+#include <json/json.h>
 #include <vector>
 
 #include <unordered_map>
@@ -60,7 +61,10 @@
             int androidDeviceId,
             aidl::android::hardware::automotive::ivn::EndpointInfo* endpointInfo) override;
 
+    binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
+
   private:
+    Json::Value mConfigRootNode;
     int mMyDeviceId;
     std::unordered_map<int, DeviceInfo> mDeviceInfoById;
     std::string_view mConfigPath;
diff --git a/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp b/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp
index 71454d5..81f18b2 100644
--- a/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp
+++ b/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp
@@ -54,26 +54,25 @@
         return false;
     }
     Json::CharReaderBuilder builder;
-    Json::Value root;
     std::string errs;
-    if (!Json::parseFromStream(builder, configStream, &root, &errs)) {
+    if (!Json::parseFromStream(builder, configStream, &mConfigRootNode, &errs)) {
         LOG(ERROR) << "Failed to parse config JSON stream, error: " << errs;
         return false;
     }
-    if (!root.isObject()) {
+    if (!mConfigRootNode.isObject()) {
         LOG(ERROR) << "Root must be an object";
         return false;
     }
-    if (!root.isMember("MyDeviceId")) {
+    if (!mConfigRootNode.isMember("MyDeviceId")) {
         LOG(ERROR) << "Must contain 'MyDeviceId' field";
         return false;
     }
-    mMyDeviceId = root["MyDeviceId"].asInt();
-    if (!root.isMember("Devices") || !root["Devices"].isArray()) {
+    mMyDeviceId = mConfigRootNode["MyDeviceId"].asInt();
+    if (!mConfigRootNode.isMember("Devices") || !mConfigRootNode["Devices"].isArray()) {
         LOG(ERROR) << "Must contain 'Devices' field as array";
         return false;
     }
-    Json::Value& devices = root["Devices"];
+    Json::Value& devices = mConfigRootNode["Devices"];
     for (unsigned int i = 0; i < devices.size(); i++) {
         Json::Value& device = devices[i];
         int deviceId = device["DeviceId"].asInt();
@@ -190,6 +189,13 @@
     return ScopedAStatus::ok();
 }
 
+binder_status_t IvnAndroidDeviceService::dump(int fd, [[maybe_unused]] const char** args,
+                                              [[maybe_unused]] uint32_t numArgs) {
+    dprintf(fd, "IVN Android Device debug interface, Config: \n%s\n",
+            mConfigRootNode.toStyledString().c_str());
+    return STATUS_OK;
+}
+
 }  // namespace ivn
 }  // namespace automotive
 }  // namespace hardware
diff --git a/automotive/ivn_android_device/impl/default/test/IvnAndroidDeviceServiceUnittest.cpp b/automotive/ivn_android_device/impl/default/test/IvnAndroidDeviceServiceUnittest.cpp
index bc8e69f..6a4d26d 100644
--- a/automotive/ivn_android_device/impl/default/test/IvnAndroidDeviceServiceUnittest.cpp
+++ b/automotive/ivn_android_device/impl/default/test/IvnAndroidDeviceServiceUnittest.cpp
@@ -16,6 +16,7 @@
 
 #include "IvnAndroidDeviceService.h"
 
+#include <aidl/android/hardware/automotive/ivn/EndpointInfo.h>
 #include <aidl/android/hardware/automotive/ivn/OccupantType.h>
 #include <aidl/android/hardware/automotive/ivn/OccupantZoneInfo.h>
 #include <android-base/file.h>
@@ -26,6 +27,8 @@
 namespace automotive {
 namespace ivn {
 
+using ::aidl::android::hardware::automotive::ivn::ConnectProtocol;
+using ::aidl::android::hardware::automotive::ivn::EndpointInfo;
 using ::aidl::android::hardware::automotive::ivn::OccupantType;
 using ::aidl::android::hardware::automotive::ivn::OccupantZoneInfo;
 using ::ndk::ScopedAStatus;
@@ -92,6 +95,7 @@
 
     ScopedAStatus status =
             mService->getOccupantZonesForDevice(/*androidDeviceId=*/0, &occupantZones);
+
     ASSERT_TRUE(status.isOk());
     EXPECT_EQ(occupantZones.size(), 2);
     if (occupantZones.size() == 2) {
@@ -104,6 +108,41 @@
     }
 }
 
+TEST_F(IvnAndroidDeviceServiceUnitTest, TestGetMyEndpointInfo) {
+    EndpointInfo endpointInfo;
+
+    ScopedAStatus status = mService->getMyEndpointInfo(&endpointInfo);
+
+    ASSERT_TRUE(status.isOk());
+    EXPECT_EQ(endpointInfo.connectProtocol, ConnectProtocol::TCP_IP);
+    EXPECT_EQ(endpointInfo.ipAddress, "10.10.10.1");
+    EXPECT_EQ(endpointInfo.portNumber, 1234);
+    EXPECT_EQ(endpointInfo.hardwareId.brandName, "MyBrand");
+    EXPECT_EQ(endpointInfo.hardwareId.deviceName, "MyDevice");
+    EXPECT_EQ(endpointInfo.hardwareId.productName, "MyProduct");
+    EXPECT_EQ(endpointInfo.hardwareId.manufacturerName, "MyCompany");
+    EXPECT_EQ(endpointInfo.hardwareId.modelName, "MyModel");
+    EXPECT_EQ(endpointInfo.hardwareId.serialNumber, "Serial1234");
+}
+
+TEST_F(IvnAndroidDeviceServiceUnitTest, TestGetEndpointInfoForDevice) {
+    EndpointInfo endpointInfo;
+
+    ScopedAStatus status = mService->getEndpointInfoForDevice(/*androidDeviceId=*/0, &endpointInfo);
+
+    ASSERT_TRUE(status.isOk());
+    EXPECT_EQ(endpointInfo.connectProtocol, ConnectProtocol::TCP_IP);
+    EXPECT_EQ(endpointInfo.ipAddress, "10.10.10.1");
+    EXPECT_EQ(endpointInfo.portNumber, 1234);
+
+    status = mService->getEndpointInfoForDevice(/*androidDeviceId=*/1, &endpointInfo);
+
+    ASSERT_TRUE(status.isOk());
+    EXPECT_EQ(endpointInfo.connectProtocol, ConnectProtocol::TCP_IP);
+    EXPECT_EQ(endpointInfo.ipAddress, "10.10.10.2");
+    EXPECT_EQ(endpointInfo.portNumber, 2345);
+}
+
 }  // namespace ivn
 }  // namespace automotive
 }  // namespace hardware
diff --git a/automotive/ivn_android_device/vts/Android.bp b/automotive/ivn_android_device/vts/Android.bp
new file mode 100644
index 0000000..e4b9d64
--- /dev/null
+++ b/automotive/ivn_android_device/vts/Android.bp
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+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_test {
+    name: "VtsHalIvnTargetTest",
+    srcs: [
+        "src/*.cpp",
+    ],
+    defaults: ["use_libaidlvintf_gtest_helper_static"],
+    static_libs: [
+        "libgmock",
+        "libgtest",
+        "android.hardware.automotive.ivn-V1-ndk",
+    ],
+    shared_libs: [
+        "libbinder_ndk",
+    ],
+    test_suites: [
+        "general-tests",
+        "vts",
+        "automotive-tests",
+        "automotive-general-tests",
+    ],
+    require_root: true,
+}
diff --git a/automotive/ivn_android_device/vts/OWNERS b/automotive/ivn_android_device/vts/OWNERS
new file mode 100644
index 0000000..d6969e5
--- /dev/null
+++ b/automotive/ivn_android_device/vts/OWNERS
@@ -0,0 +1,2 @@
+ericjeong@google.com
+shanyu@google.com
diff --git a/automotive/ivn_android_device/vts/src/VtsHalIvnTargetTest.cpp b/automotive/ivn_android_device/vts/src/VtsHalIvnTargetTest.cpp
new file mode 100644
index 0000000..73b9a5e
--- /dev/null
+++ b/automotive/ivn_android_device/vts/src/VtsHalIvnTargetTest.cpp
@@ -0,0 +1,167 @@
+/*
+ * 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.
+ */
+
+#include <aidl/Gtest.h>
+#include <aidl/Vintf.h>
+#include <aidl/android/hardware/automotive/ivn/ConnectProtocol.h>
+#include <aidl/android/hardware/automotive/ivn/EndpointInfo.h>
+#include <aidl/android/hardware/automotive/ivn/IIvnAndroidDevice.h>
+#include <android/binder_ibinder.h>
+#include <android/binder_manager.h>
+#include <gmock/gmock.h>
+#include <unordered_set>
+
+namespace aidl::android::hardware::automotive::ivn {
+
+using ::ndk::ScopedAStatus;
+using ::ndk::SpAIBinder;
+
+using ::testing::Contains;
+using ::testing::Not;
+
+class VtsHalIvnTargetTest : public ::testing::TestWithParam<std::string> {
+  public:
+    void SetUp() override {
+        std::string descriptor = GetParam();
+        AIBinder* binder = AServiceManager_checkService(descriptor.c_str());
+        ASSERT_NE(binder, nullptr) << "Failed to connect to IVN HAL";
+        mIvnHal = IIvnAndroidDevice::fromBinder(SpAIBinder(binder));
+    }
+
+    std::shared_ptr<IIvnAndroidDevice> getHal() { return mIvnHal; }
+
+  private:
+    std::shared_ptr<IIvnAndroidDevice> mIvnHal;
+
+  protected:
+    ScopedAStatus getAllDeviceIds(std::unordered_set<int>* deviceIds);
+};
+
+TEST_P(VtsHalIvnTargetTest, testDeviceIdIsUnique) {
+    std::unordered_set<int> foundDeviceIds;
+    int myDeviceId = 0;
+
+    ScopedAStatus status = getHal()->getMyDeviceId(&myDeviceId);
+
+    ASSERT_TRUE(status.isOk()) << "Failed to call getMyDeviceId, status: " << status;
+    foundDeviceIds.insert(myDeviceId);
+
+    std::vector<int> otherDeviceIds;
+
+    status = getHal()->getOtherDeviceIds(&otherDeviceIds);
+
+    ASSERT_TRUE(status.isOk()) << "Failed to call getOtherDeviceIds, status: " << status;
+
+    for (int deviceId : otherDeviceIds) {
+        EXPECT_THAT(foundDeviceIds, Not(Contains(deviceId))) << "Duplicate device ID: " << deviceId;
+        foundDeviceIds.insert(deviceId);
+    }
+}
+
+ScopedAStatus VtsHalIvnTargetTest::getAllDeviceIds(std::unordered_set<int>* deviceIds) {
+    int myDeviceId = 0;
+    ScopedAStatus status = getHal()->getMyDeviceId(&myDeviceId);
+
+    if (!status.isOk()) {
+        return status;
+    }
+    deviceIds->insert(myDeviceId);
+    std::vector<int> otherDeviceIds;
+    status = getHal()->getOtherDeviceIds(&otherDeviceIds);
+    if (!status.isOk()) {
+        return status;
+    }
+    for (int otherDeviceId : otherDeviceIds) {
+        deviceIds->insert(otherDeviceId);
+    }
+    return ScopedAStatus::ok();
+}
+
+TEST_P(VtsHalIvnTargetTest, testDeviceIdOccupantZoneMapping) {
+    std::unordered_set<int> allDeviceIds;
+
+    ScopedAStatus status = getAllDeviceIds(&allDeviceIds);
+
+    ASSERT_FALSE(allDeviceIds.empty());
+    ASSERT_TRUE(status.isOk()) << "Failed to get all device IDs, status: " << status;
+
+    std::unordered_set<int> foundOccupantZoneIds;
+
+    for (int deviceId : allDeviceIds) {
+        std::vector<OccupantZoneInfo> occupantZones;
+        status = getHal()->getOccupantZonesForDevice(deviceId, &occupantZones);
+
+        ASSERT_TRUE(status.isOk())
+                << "Failed to call getOccupantZonesForDevice, status: " << status;
+        ASSERT_FALSE(occupantZones.empty()) << "No occupant zones for device: " << deviceId;
+
+        for (const OccupantZoneInfo& occupantZone : occupantZones) {
+            int zoneId = occupantZone.zoneId;
+
+            EXPECT_THAT(foundOccupantZoneIds, Not(Contains(zoneId)))
+                    << "Duplicate zone ID: " << zoneId;
+
+            foundOccupantZoneIds.insert(zoneId);
+
+            int gotDeviceId = 0;
+            status = getHal()->getDeviceIdForOccupantZone(zoneId, &gotDeviceId);
+
+            ASSERT_TRUE(status.isOk())
+                    << "Failed to call getDeviceIdForOccupantZone, status: " << status;
+            EXPECT_EQ(deviceId, gotDeviceId);
+        }
+    }
+}
+
+TEST_P(VtsHalIvnTargetTest, testGetEndpointInfo) {
+    EndpointInfo endpointInfo;
+    std::vector<EndpointInfo> foundEndpointInfo;
+
+    ScopedAStatus status = getHal()->getMyEndpointInfo(&endpointInfo);
+
+    foundEndpointInfo.push_back(endpointInfo);
+
+    ASSERT_TRUE(status.isOk()) << "Failed to call getMyEndpointInfo, status: " << status;
+    EXPECT_EQ(endpointInfo.connectProtocol, ConnectProtocol::TCP_IP);
+
+    std::vector<int> otherDeviceIds;
+    status = getHal()->getOtherDeviceIds(&otherDeviceIds);
+
+    ASSERT_TRUE(status.isOk()) << "Failed to call getOtherDeviceIds, status: " << status;
+
+    for (int deviceId : otherDeviceIds) {
+        status = getHal()->getEndpointInfoForDevice(deviceId, &endpointInfo);
+
+        ASSERT_TRUE(status.isOk()) << "Failed to call getEndpointInfoForDevice, status: " << status;
+        EXPECT_EQ(endpointInfo.connectProtocol, ConnectProtocol::TCP_IP);
+
+        for (EndpointInfo foundInfo : foundEndpointInfo) {
+            ASSERT_NE(foundInfo, endpointInfo)
+                    << "Found duplicate endpoint info" << endpointInfo.toString();
+        }
+
+        foundEndpointInfo.push_back(endpointInfo);
+    }
+}
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VtsHalIvnTargetTest);
+
+INSTANTIATE_TEST_SUITE_P(
+        PerInstance, VtsHalIvnTargetTest,
+        testing::ValuesIn(::android::getAidlHalInstanceNames(IIvnAndroidDevice::descriptor)),
+        ::android::PrintInstanceNameToString);
+
+}  // namespace aidl::android::hardware::automotive::ivn
diff --git a/automotive/remoteaccess/bind_to_device_socket_mutator/Android.bp b/automotive/remoteaccess/bind_to_device_socket_mutator/Android.bp
index 113b14e..58df21a 100644
--- a/automotive/remoteaccess/bind_to_device_socket_mutator/Android.bp
+++ b/automotive/remoteaccess/bind_to_device_socket_mutator/Android.bp
@@ -37,7 +37,7 @@
 cc_library {
     name: "BindToDeviceSocketMutatorLib",
     vendor_available: true,
-    srcs: ["src/*"],
+    srcs: ["src/BindToDeviceSocketMutator.cpp"],
     export_include_dirs: ["include"],
     defaults: ["BindToDeviceSocketMutatorDefaults"],
 }
diff --git a/automotive/remoteaccess/bind_to_device_socket_mutator/include/BindToDeviceSocketMutator.h b/automotive/remoteaccess/bind_to_device_socket_mutator/include/BindToDeviceSocketMutator.h
index bafcc65..5974c4b 100644
--- a/automotive/remoteaccess/bind_to_device_socket_mutator/include/BindToDeviceSocketMutator.h
+++ b/automotive/remoteaccess/bind_to_device_socket_mutator/include/BindToDeviceSocketMutator.h
@@ -16,20 +16,11 @@
 
 #pragma once
 
-#include <grpc++/grpc++.h>
-#include <src/core/lib/iomgr/socket_mutator.h>
-#include <string>
+#include <grpc/grpc.h>
+#include <string_view>
 
 namespace android::hardware::automotive::remoteaccess {
 
-class BindToDeviceSocketMutator final : public grpc_socket_mutator {
-  public:
-    BindToDeviceSocketMutator(const std::string_view& interface_name);
-
-    bool mutateFd(int fd);
-
-  private:
-    std::string mIfname;
-};
+grpc_socket_mutator* MakeBindToDeviceSocketMutator(std::string_view interface_name);
 
 }  // namespace android::hardware::automotive::remoteaccess
diff --git a/automotive/remoteaccess/bind_to_device_socket_mutator/src/BindToDeviceSocketMutator.cpp b/automotive/remoteaccess/bind_to_device_socket_mutator/src/BindToDeviceSocketMutator.cpp
index c6a96de..04a4c5b 100644
--- a/automotive/remoteaccess/bind_to_device_socket_mutator/src/BindToDeviceSocketMutator.cpp
+++ b/automotive/remoteaccess/bind_to_device_socket_mutator/src/BindToDeviceSocketMutator.cpp
@@ -18,40 +18,50 @@
 
 #include <android-base/logging.h>
 #include <errno.h>
+#include <src/core/lib/iomgr/socket_mutator.h>
 #include <sys/socket.h>
 
-namespace android::hardware::automotive::remoteaccess {
+#include <memory>
 
-bool BindToDeviceSocketMutator::mutateFd(int fd) {
-    int ret = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, mIfname.c_str(), mIfname.size());
+namespace android::hardware::automotive::remoteaccess {
+namespace {
+
+struct BindToDeviceMutator : grpc_socket_mutator {
+    std::string ifname;
+};
+
+bool MutateFd(int fd, grpc_socket_mutator* mutator) {
+    auto* bdm = static_cast<BindToDeviceMutator*>(mutator);
+    int ret = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, bdm->ifname.c_str(), bdm->ifname.size());
     if (ret != 0) {
-        PLOG(ERROR) << "Can't bind socket to interface " << mIfname;
+        PLOG(ERROR) << "Can't bind socket to interface " << bdm->ifname;
         return false;
     }
     return true;
 }
 
-bool bind_to_device_mutator_mutate_fd(int fd, grpc_socket_mutator* mutator) {
-    BindToDeviceSocketMutator* bsm = (BindToDeviceSocketMutator*)mutator;
-    return bsm->mutateFd(fd);
-}
-
-int bind_to_device_mutator_compare(grpc_socket_mutator* a, grpc_socket_mutator* b) {
+int Compare(grpc_socket_mutator* a, grpc_socket_mutator* b) {
     return ((a) < (b) ? -1 : ((a) > (b) ? 1 : 0));
 }
 
-void bind_to_device_mutator_destroy(grpc_socket_mutator* mutator) {
-    BindToDeviceSocketMutator* bsm = (BindToDeviceSocketMutator*)mutator;
-    delete bsm;
+void Destroy(grpc_socket_mutator* mutator) {
+    auto* bdm = static_cast<BindToDeviceMutator*>(mutator);
+    delete bdm;
 }
 
-grpc_socket_mutator_vtable bind_to_device_mutator_vtable = {bind_to_device_mutator_mutate_fd,
-                                                            bind_to_device_mutator_compare,
-                                                            bind_to_device_mutator_destroy};
+constexpr grpc_socket_mutator_vtable kMutatorVtable = {
+        .mutate_fd = MutateFd,
+        .compare = Compare,
+        .destroy = Destroy,
+};
 
-BindToDeviceSocketMutator::BindToDeviceSocketMutator(const std::string_view& interface_name) {
-    mIfname = interface_name;
-    grpc_socket_mutator_init(this, &bind_to_device_mutator_vtable);
+}  // namespace
+
+grpc_socket_mutator* MakeBindToDeviceSocketMutator(std::string_view interface_name) {
+    auto* bdm = new BindToDeviceMutator;
+    grpc_socket_mutator_init(bdm, &kMutatorVtable);
+    bdm->ifname = interface_name;
+    return bdm;
 }
 
 }  // namespace android::hardware::automotive::remoteaccess
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
index d525141..b091162 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
@@ -40,7 +40,7 @@
 
 #ifdef GRPC_SERVICE_IFNAME
     grpcargs.SetSocketMutator(
-            new android::hardware::automotive::remoteaccess::BindToDeviceSocketMutator(
+            android::hardware::automotive::remoteaccess::MakeBindToDeviceSocketMutator(
                     GRPC_SERVICE_IFNAME));
     LOG(DEBUG) << "GRPC_SERVICE_IFNAME specified as: " << GRPC_SERVICE_IFNAME;
     LOG(INFO) << "Waiting for interface: " << GRPC_SERVICE_IFNAME;
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index ce3a840..6dca41f 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -4629,9 +4629,7 @@
     /**
      * Lane Centering Assist (LCA) commands.
      *
-     * Commands to activate and suspend LCA. They are only valid when LANE_CENTERING_ASSIST_ENABLED
-     * = true. Otherwise, these commands must return StatusCode#NOT_AVAILABLE or
-     * StatusCode#NOT_AVAILABLE_DISABLED.
+     * Commands to activate and suspend LCA.
      *
      * When the command ACTIVATE from LaneCenteringAssistCommmand is sent,
      * LANE_CENTERING_ASSIST_STATE must be set to LaneCenteringAssistState#ACTIVATION_REQUESTED.
@@ -4643,6 +4641,14 @@
      * For the global area ID (0), the VehicleAreaConfig#supportedEnumValues must be defined unless
      * all enum values of LaneCenteringAssistCommand are supported.
      *
+     * When this property is not available because LCA is disabled (i.e.
+     * LANE_CENTERING_ASSIST_ENABLED is false), this property must return
+     * StatusCode#NOT_AVAILABLE_DISABLED. If LANE_CENTERING_ASSIST_STATE is implemented and the
+     * state is set to an ErrorState value, then this property must return a StatusCode that aligns
+     * with the ErrorState value. For example, if LANE_CENTERING_ASSIST_STATE is set to
+     * ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return
+     * StatusCode#NOT_AVAILABLE_SPEED_LOW.
+     *
      * @change_mode VehiclePropertyChangeMode.ON_CHANGE
      * @access VehiclePropertyAccess.WRITE
      * @data_enum LaneCenteringAssistCommmand
@@ -4794,7 +4800,11 @@
      * this property must return StatusCode#INVALID_ARG.
      *
      * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
-     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
+     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE
+     * is implemented and the state is set to an ErrorState value, then this property must return a
+     * StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set
+     * to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return
+     * StatusCode#NOT_AVAILABLE_SPEED_LOW.
      *
      * @change_mode VehiclePropertyChangeMode.ON_CHANGE
      * @access VehiclePropertyAccess.WRITE
@@ -4813,7 +4823,11 @@
      * The minFloatValue represents the lower bound of the target speed.
      *
      * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
-     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
+     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE
+     * is implemented and the state is set to an ErrorState value, then this property must return a
+     * StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set
+     * to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return
+     * StatusCode#NOT_AVAILABLE_SPEED_LOW.
      *
      * @change_mode VehiclePropertyChangeMode.ON_CHANGE
      * @access VehiclePropertyAccess.READ
@@ -4836,7 +4850,11 @@
      * writable.
      *
      * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
-     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
+     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE
+     * is implemented and the state is set to an ErrorState value, then this property must return a
+     * StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set
+     * to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return
+     * StatusCode#NOT_AVAILABLE_SPEED_LOW.
      *
      * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
      * implement it as VehiclePropertyAccess.READ only.
@@ -4865,7 +4883,11 @@
      * StatusCode.NOT_AVAILABLE.
      *
      * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
-     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
+     * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED. If CRUISE_CONTROL_STATE
+     * is implemented and the state is set to an ErrorState value, then this property must return a
+     * StatusCode that aligns with the ErrorState value. For example, if CRUISE_CONTROL_STATE is set
+     * to ErrorState#NOT_AVAILABLE_SPEED_LOW, then this property must return
+     * StatusCode#NOT_AVAILABLE_SPEED_LOW.
      *
      * @change_mode VehiclePropertyChangeMode.CONTINUOUS
      * @access VehiclePropertyAccess.READ
diff --git a/bluetooth/aidl/default/BluetoothHci.cpp b/bluetooth/aidl/default/BluetoothHci.cpp
index d4e4b34..ac2eabc 100644
--- a/bluetooth/aidl/default/BluetoothHci.cpp
+++ b/bluetooth/aidl/default/BluetoothHci.cpp
@@ -117,11 +117,9 @@
           strerror(errno));
     return fd;
   }
-  if (int ret = SetTerminalRaw(mFd) < 0) {
-    ALOGE("Could not make %s a raw terminal %d(%s)", mDevPath.c_str(), ret,
+  if (int ret = SetTerminalRaw(fd) < 0) {
+    ALOGI("Could not make %s a raw terminal %d(%s)", mDevPath.c_str(), ret,
           strerror(errno));
-    ::close(fd);
-    return -1;
   }
   return fd;
 }
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/Result.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/Result.aidl
index 9f7263a..f775bd0 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/Result.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/Result.aidl
@@ -39,7 +39,7 @@
     INVALID_ARGUMENTS,
 
     /**
-     * Error used when the service is of invalid state (i.e. callback
+     * Error used when the service is on invalid state (i.e. callback
      * is not registered for IBroadcastRadio).
      */
     INVALID_STATE,
@@ -50,13 +50,13 @@
     NOT_SUPPORTED,
 
     /**
-     * Error used when a tune, seek, step or operation is not completed
-     * within {@link IBroadcastRadio#LIST_COMPLETE_TIMEOUT_MS}.
+     * Error used when a tune, seek, or step operation is not completed
+     * within {@link IBroadcastRadio#TUNER_TIMEOUT_MS}.
      */
     TIMEOUT,
 
     /**
-     * Error used when a tune, seek, step or operation is canceled before
+     * Error used when a tune, seek, or step operation is canceled before
      * being processed.
      */
     CANCELED,
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
index 655b869..38cb33b 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -87,12 +87,19 @@
                                                  cellIdentities.cellIdentityTdscdma.size());
 
         if (checkMccMnc) {
-            // 32 bit system gets result: "\xff\xff\xff..." from RIL, which is not testable. Only
-            // test for 64 bit here. TODO: remove this limit after b/113181277 being fixed.
-            if (hidl_mcc.size() < 4 && hidl_mnc.size() < 4) {
+            // 32 bit system gets result: "\xff\xff\xff..." from RIL, which is not testable.
+            // Only test for 64 bit here. TODO: remove this limit after b/113181277 being fixed.
+            int mccSize = hidl_mcc.size();
+            EXPECT_TRUE(mccSize == 0 || mccSize == 3);
+            if (mccSize > 0) {
                 int mcc = stoi(hidl_mcc);
-                int mnc = stoi(hidl_mnc);
                 EXPECT_TRUE(mcc >= 0 && mcc <= 999);
+            }
+
+            int mncSize = hidl_mnc.size();
+            EXPECT_TRUE(mncSize == 0 || mncSize == 2 || mncSize == 3);
+            if (mncSize > 0) {
+                int mnc = stoi(hidl_mnc);
                 EXPECT_TRUE(mnc >= 0 && mnc <= 999);
             }
         }
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index 2400bde..2bce2f9 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -120,7 +120,7 @@
     serial = GetRandomSerialNumber();
 
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
-            .type = ScanType::ONE_SHOT,
+            .type = ScanType::PERIODIC,
             .interval = 4,
             .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 60,
@@ -155,7 +155,7 @@
     serial = GetRandomSerialNumber();
 
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
-            .type = ScanType::ONE_SHOT,
+            .type = ScanType::PERIODIC,
             .interval = 301,
             .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 60,
@@ -821,11 +821,20 @@
                   cellIdentities.cellIdentityTdscdma.size());
 
     // 32 bit system might return invalid mcc and mnc hidl string "\xff\xff..."
-    if (checkMccMnc && hidl_mcc.size() < 4 && hidl_mnc.size() < 4) {
-        int mcc = stoi(hidl_mcc);
-        int mnc = stoi(hidl_mnc);
-        EXPECT_TRUE(mcc >= 0 && mcc <= 999);
-        EXPECT_TRUE(mnc >= 0 && mnc <= 999);
+    if (checkMccMnc) {
+        int mccSize = hidl_mcc.size();
+        EXPECT_TRUE(mccSize == 0 || mccSize == 3);
+        if (mccSize > 0) {
+            int mcc = stoi(hidl_mcc);
+            EXPECT_TRUE(mcc >= 0 && mcc <= 999);
+        }
+
+        int mncSize = hidl_mnc.size();
+        EXPECT_TRUE(mncSize == 0 || mncSize == 2 || mncSize == 3);
+        if (mncSize > 0) {
+            int mnc = stoi(hidl_mnc);
+            EXPECT_TRUE(mnc >= 0 && mnc <= 999);
+        }
     }
 }
 
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index 8f357a0..744af75 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -335,7 +335,7 @@
     serial = GetRandomSerialNumber();
 
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
-            .type = ScanType::ONE_SHOT,
+            .type = ScanType::PERIODIC,
             .interval = 4,
             .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 60,
@@ -368,7 +368,7 @@
     serial = GetRandomSerialNumber();
 
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
-            .type = ScanType::ONE_SHOT,
+            .type = ScanType::PERIODIC,
             .interval = 301,
             .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 60,
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
index 316c308..fd44e93 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -661,7 +661,7 @@
             .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
-            .type = ScanType::ONE_SHOT,
+            .type = ScanType::PERIODIC,
             .interval = 4,
             .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 60,
@@ -705,7 +705,7 @@
             .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
-            .type = ScanType::ONE_SHOT,
+            .type = ScanType::PERIODIC,
             .interval = 301,
             .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 60,
diff --git a/radio/aidl/vts/radio_aidl_hal_utils.cpp b/radio/aidl/vts/radio_aidl_hal_utils.cpp
index 6ed8e7d..f18da55 100644
--- a/radio/aidl/vts/radio_aidl_hal_utils.cpp
+++ b/radio/aidl/vts/radio_aidl_hal_utils.cpp
@@ -85,7 +85,7 @@
     // Do not use checkSubstringInCommandOutput("getprop persist.radio.multisim.config", "")
     // until b/148904287 is fixed. We need exact matching instead of partial matching. (i.e.
     // by definition the empty string "" is a substring of any string).
-    return !isDsDsEnabled() && !isTsTsEnabled();
+    return !isDsDsEnabled() && !isTsTsEnabled() && !isDsDaEnabled();
 }
 
 bool isDsDsEnabled() {
@@ -125,8 +125,8 @@
             ALOGI("%s instance is not valid for SSSS device.", serviceName.c_str());
             return false;
         }
-    } else if (isDsDsEnabled()) {
-        // Device is configured as DSDS.
+    } else if (isDsDsEnabled() || isDsDaEnabled()) {
+        // Device is configured as DSDS or DSDA.
         if (!stringEndsWith(serviceName, RADIO_SERVICE_SLOT1_NAME) &&
             !stringEndsWith(serviceName, RADIO_SERVICE_SLOT2_NAME)) {
             ALOGI("%s instance is not valid for DSDS device.", serviceName.c_str());
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 0b7c16e..0344dd6 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -1524,11 +1524,20 @@
     }
 
     // 32 bit system might return invalid mcc and mnc string "\xff\xff..."
-    if (checkMccMnc && mcc.size() == 3 && (mnc.size() == 2 || mnc.size() == 3)) {
-        int mcc_int = stoi(mcc);
-        int mnc_int = stoi(mnc);
-        EXPECT_TRUE(mcc_int >= 0 && mcc_int <= 999);
-        EXPECT_TRUE(mnc_int >= 0 && mnc_int <= 999);
+    if (checkMccMnc) {
+        int mccSize = mcc.size();
+        EXPECT_TRUE(mccSize == 0 || mccSize == 3);
+        if (mccSize > 0) {
+            int mcc_int = stoi(mcc);
+            EXPECT_TRUE(mcc_int >= 0 && mcc_int <= 999);
+        }
+
+        int mncSize = mnc.size();
+        EXPECT_TRUE(mncSize == 0 || mncSize == 2 || mncSize == 3);
+        if (mncSize > 0) {
+            int mnc_int = stoi(mnc);
+            EXPECT_TRUE(mnc_int >= 0 && mnc_int <= 999);
+        }
     }
 
     // Check for access technology specific info
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index 8906543..62463eb 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -702,6 +702,7 @@
  * Generate an empty certificate request with all possible length of challenge, and decrypt and
  * verify the structure and content.
  */
+// @VsrTest = 3.10-015
 TEST_P(CertificateRequestV2Test, EmptyRequest) {
     bytevec csr;
 
@@ -721,6 +722,7 @@
  * Generate a non-empty certificate request with all possible length of challenge.  Decrypt, parse
  * and validate the contents.
  */
+// @VsrTest = 3.10-015
 TEST_P(CertificateRequestV2Test, NonEmptyRequest) {
     generateKeys(false /* testMode */, 1 /* numKeys */);
 
@@ -753,6 +755,7 @@
  * Generate a non-empty certificate request.  Make sure contents are reproducible but allow for the
  * signature to be different since algorithms including ECDSA P-256 can include a random value.
  */
+// @VsrTest = 3.10-015
 TEST_P(CertificateRequestV2Test, NonEmptyRequestReproducible) {
     generateKeys(false /* testMode */, 1 /* numKeys */);
 
@@ -776,6 +779,7 @@
 /**
  * Generate a non-empty certificate request with multiple keys.
  */
+// @VsrTest = 3.10-015
 TEST_P(CertificateRequestV2Test, NonEmptyRequestMultipleKeys) {
     generateKeys(false /* testMode */, rpcHardwareInfo.supportedNumKeysInCsr /* numKeys */);
 
@@ -849,6 +853,7 @@
 /**
  * Generate a CSR and verify DeviceInfo against IDs attested by KeyMint.
  */
+// @VsrTest = 3.10-015
 TEST_P(CertificateRequestV2Test, DeviceInfo) {
     // See if there is a matching IKeyMintDevice for this IRemotelyProvisionedComponent.
     std::shared_ptr<IKeyMintDevice> keyMint;
