Merge "Revert "Revert "Add return status to IGraphicBufferSource methods"""
diff --git a/Android.bp b/Android.bp
index 7aef46b..79e8609 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,3 +1,11 @@
 subdirs = [
     "*"
 ]
+
+cc_defaults {
+    name: "hidl_defaults",
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+}
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 962f6cd..212c8b1 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -48,3 +48,7 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.bluetooth*)
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
index 9cb56c7..93f7ad0 100644
--- a/audio/2.0/default/Android.mk
+++ b/audio/2.0/default/Android.mk
@@ -37,7 +37,6 @@
     libhardware \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     liblog \
     libutils \
     android.hardware.audio@2.0 \
@@ -64,14 +63,14 @@
     libhidlbase \
     libhidltransport \
     liblog \
-    libhwbinder \
     libutils \
     libhardware \
     android.hardware.audio@2.0 \
     android.hardware.audio.common@2.0 \
     android.hardware.audio.effect@2.0 \
     android.hardware.soundtrigger@2.0 \
-    android.hardware.broadcastradio@1.0
+    android.hardware.broadcastradio@1.0 \
+    android.hardware.broadcastradio@1.1
 
 ifeq ($(strip $(AUDIOSERVER_MULTILIB)),)
 LOCAL_MULTILIB := 32
@@ -79,4 +78,8 @@
 LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
 endif
 
+ifeq ($(TARGET_USES_BCRADIO_FUTURE_FEATURES),true)
+LOCAL_CFLAGS += -DTARGET_USES_BCRADIO_FUTURE_FEATURES
+endif
+
 include $(BUILD_EXECUTABLE)
diff --git a/audio/2.0/default/Stream.cpp b/audio/2.0/default/Stream.cpp
index c16a956..29946fe 100644
--- a/audio/2.0/default/Stream.cpp
+++ b/audio/2.0/default/Stream.cpp
@@ -189,7 +189,9 @@
 }
 
 Return<AudioDevice> Stream::getDevice()  {
-    return AudioDevice(mStream->get_device(mStream));
+    int device;
+    Result retval = getParam(AudioParameter::keyRouting, &device);
+    return retval == Result::OK ? static_cast<AudioDevice>(device) : AudioDevice::NONE;
 }
 
 Return<Result> Stream::setDevice(const DeviceAddress& address)  {
diff --git a/audio/2.0/default/Stream.h b/audio/2.0/default/Stream.h
index 63ea1bb..b49e658 100644
--- a/audio/2.0/default/Stream.h
+++ b/audio/2.0/default/Stream.h
@@ -146,7 +146,6 @@
     }
     _hidl_cb(retval, info);
     if (hidlHandle != nullptr) {
-        native_handle_close(hidlHandle);
         native_handle_delete(hidlHandle);
     }
     return Void();
diff --git a/audio/2.0/default/service.cpp b/audio/2.0/default/service.cpp
index 8b608c8..f3a858a 100644
--- a/audio/2.0/default/service.cpp
+++ b/audio/2.0/default/service.cpp
@@ -22,6 +22,7 @@
 #include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
 #include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
 #include <android/hardware/broadcastradio/1.0/IBroadcastRadioFactory.h>
+#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
 
 using android::hardware::configureRpcThreadpool;
 using android::hardware::joinRpcThreadpool;
@@ -31,21 +32,33 @@
 using android::hardware::audio::V2_0::IDevicesFactory;
 using android::hardware::soundtrigger::V2_0::ISoundTriggerHw;
 using android::hardware::registerPassthroughServiceImplementation;
-using android::hardware::broadcastradio::V1_0::IBroadcastRadioFactory;
+namespace broadcastradio = android::hardware::broadcastradio;
+
+#ifdef TARGET_USES_BCRADIO_FUTURE_FEATURES
+static const bool useBroadcastRadioFutureFeatures = true;
+#else
+static const bool useBroadcastRadioFutureFeatures = false;
+#endif
 
 using android::OK;
 
 int main(int /* argc */, char* /* argv */ []) {
     configureRpcThreadpool(16, true /*callerWillJoin*/);
     android::status_t status;
-    status = registerPassthroughServiceImplementation<IDevicesFactory>("audio_devices_factory");
+    status = registerPassthroughServiceImplementation<IDevicesFactory>();
     LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio service: %d", status);
-    status = registerPassthroughServiceImplementation<IEffectsFactory>("audio_effects_factory");
+    status = registerPassthroughServiceImplementation<IEffectsFactory>();
     LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio effects service: %d", status);
     // Soundtrigger and FM radio might be not present.
     status = registerPassthroughServiceImplementation<ISoundTriggerHw>("sound_trigger.primary");
     ALOGE_IF(status != OK, "Error while registering soundtrigger service: %d", status);
-    status = registerPassthroughServiceImplementation<IBroadcastRadioFactory>("broadcastradio");
+    if (useBroadcastRadioFutureFeatures) {
+        status = registerPassthroughServiceImplementation<
+            broadcastradio::V1_1::IBroadcastRadioFactory>();
+    } else {
+        status = registerPassthroughServiceImplementation<
+            broadcastradio::V1_0::IBroadcastRadioFactory>();
+    }
     ALOGE_IF(status != OK, "Error while registering fm radio service: %d", status);
     joinRpcThreadpool();
     return status;
diff --git a/audio/2.0/vts/functional/Android.bp b/audio/2.0/vts/functional/Android.bp
new file mode 100644
index 0000000..02f9330
--- /dev/null
+++ b/audio/2.0/vts/functional/Android.bp
@@ -0,0 +1,38 @@
+//
+// 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.
+//
+
+cc_test {
+    name: "VtsHalAudioV2_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["AudioPrimaryHidlHalTest.cpp"],
+    shared_libs: [
+        "libbase",
+        "liblog",
+        "libhidlbase",
+        "libutils",
+        "libcutils",
+        "android.hardware.audio@2.0",
+        "android.hardware.audio.common@2.0",
+    ],
+    static_libs: ["VtsHalHidlTargetTestBase"],
+    cflags: [
+        "-O0",
+        "-g",
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+    ],
+}
diff --git a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
new file mode 100644
index 0000000..a339f99
--- /dev/null
+++ b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
@@ -0,0 +1,795 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "VtsHalAudioV2_0TargetTest"
+
+#include <algorithm>
+#include <cmath>
+#include <cstddef>
+#include <cstdio>
+#include <limits>
+#include <list>
+#include <string>
+#include <type_traits>
+#include <vector>
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include <android-base/logging.h>
+
+#include <android/hardware/audio/2.0/IDevice.h>
+#include <android/hardware/audio/2.0/IDevicesFactory.h>
+#include <android/hardware/audio/2.0/IPrimaryDevice.h>
+#include <android/hardware/audio/2.0/types.h>
+#include <android/hardware/audio/common/2.0/types.h>
+
+#include "utility/ReturnIn.h"
+#include "utility/AssertOk.h"
+#include "utility/PrettyPrintAudioTypes.h"
+
+using std::string;
+using std::to_string;
+using std::vector;
+
+using ::android::sp;
+using ::android::hardware::Return;
+using ::android::hardware::hidl_handle;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::audio::V2_0::DeviceAddress;
+using ::android::hardware::audio::V2_0::IDevice;
+using ::android::hardware::audio::V2_0::IPrimaryDevice;
+using TtyMode = ::android::hardware::audio::V2_0::IPrimaryDevice::TtyMode;
+using ::android::hardware::audio::V2_0::IDevicesFactory;
+using ::android::hardware::audio::V2_0::IStream;
+using ::android::hardware::audio::V2_0::IStreamIn;
+using ::android::hardware::audio::V2_0::IStreamOut;
+using ::android::hardware::audio::V2_0::ParameterValue;
+using ::android::hardware::audio::V2_0::Result;
+using ::android::hardware::audio::common::V2_0::AudioChannelMask;
+using ::android::hardware::audio::common::V2_0::AudioConfig;
+using ::android::hardware::audio::common::V2_0::AudioDevice;
+using ::android::hardware::audio::common::V2_0::AudioFormat;
+using ::android::hardware::audio::common::V2_0::AudioHandleConsts;
+using ::android::hardware::audio::common::V2_0::AudioInputFlag;
+using ::android::hardware::audio::common::V2_0::AudioIoHandle;
+using ::android::hardware::audio::common::V2_0::AudioMode;
+using ::android::hardware::audio::common::V2_0::AudioOffloadInfo;
+using ::android::hardware::audio::common::V2_0::AudioOutputFlag;
+using ::android::hardware::audio::common::V2_0::AudioSource;
+
+using utility::returnIn;
+
+namespace doc {
+/** Document the current test case.
+ * Eg: calling `doc::test("Dump the state of the hal")` in the "debugDump" test will output:
+ *   <testcase name="debugDump" status="run" time="6" classname="AudioPrimaryHidlTest"
+            description="Dump the state of the hal." />
+ * see https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md#logging-additional-information
+ */
+void test(const std::string& testCaseDocumentation) {
+    ::testing::Test::RecordProperty("description", testCaseDocumentation);
+}
+
+/** Document why a test was not fully run. Usually due to an optional feature not implemented. */
+void partialTest(const std::string& reason) {
+    ::testing::Test::RecordProperty("partialyRunTest", reason);
+}
+}
+
+// Register callback for static object destruction
+// Avoid destroying static objects after main return.
+// Post main return destruction leads to incorrect gtest timing measurements as well as harder
+// debuging if anything goes wrong during destruction.
+class Environment : public ::testing::Environment {
+public:
+    using TearDownFunc = std::function<void ()>;
+     void registerTearDown(TearDownFunc&& tearDown) {
+         tearDowns.push_back(std::move(tearDown));
+    }
+
+private:
+    void TearDown() override {
+        // Call the tear downs in reverse order of insertion
+        for (auto& tearDown : tearDowns) {
+            tearDown();
+        }
+    }
+    std::list<TearDownFunc> tearDowns;
+};
+// Instance to register global tearDown
+static Environment* environment;
+
+class HidlTest : public ::testing::VtsHalHidlTargetTestBase {
+protected:
+    // Convenient member to store results
+    Result res;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+////////////////////// getService audio_devices_factory //////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+// Test all audio devices
+class AudioHidlTest : public HidlTest {
+public:
+    void SetUp() override {
+        ASSERT_NO_FATAL_FAILURE(HidlTest::SetUp()); // setup base
+
+        if (devicesFactory == nullptr) {
+            environment->registerTearDown([]{ devicesFactory.clear(); });
+            devicesFactory = ::testing::VtsHalHidlTargetTestBase::getService<IDevicesFactory>();
+        }
+        ASSERT_TRUE(devicesFactory != nullptr);
+    }
+
+protected:
+    // Cache the devicesFactory retrieval to speed up each test by ~0.5s
+    static sp<IDevicesFactory> devicesFactory;
+};
+sp<IDevicesFactory> AudioHidlTest::devicesFactory;
+
+TEST_F(AudioHidlTest, GetAudioDevicesFactoryService) {
+    doc::test("test the getService (called in SetUp)");
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/////////////////////////////// openDevice primary ///////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+// Test the primary device
+class AudioPrimaryHidlTest : public AudioHidlTest {
+public:
+    /** Primary HAL test are NOT thread safe. */
+    void SetUp() override {
+        ASSERT_NO_FATAL_FAILURE(AudioHidlTest::SetUp()); // setup base
+
+        if (device == nullptr) {
+            IDevicesFactory::Result result;
+            sp<IDevice> baseDevice;
+            ASSERT_OK(devicesFactory->openDevice(IDevicesFactory::Device::PRIMARY,
+                                                 returnIn(result, baseDevice)));
+            ASSERT_TRUE(baseDevice != nullptr);
+
+            environment->registerTearDown([]{ device.clear(); });
+            device = IPrimaryDevice::castFrom(baseDevice);
+            ASSERT_TRUE(device != nullptr);
+        }
+    }
+
+protected:
+    // Cache the device opening to speed up each test by ~0.5s
+    static sp<IPrimaryDevice> device;
+};
+sp<IPrimaryDevice> AudioPrimaryHidlTest::device;
+
+TEST_F(AudioPrimaryHidlTest, OpenPrimaryDevice) {
+    doc::test("Test the openDevice (called in SetUp)");
+}
+
+TEST_F(AudioPrimaryHidlTest, Init) {
+    doc::test("Test that the audio primary hal initialized correctly");
+    ASSERT_OK(device->initCheck());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////// {set,get}MasterVolume ///////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+class MasterVolumeTest : public AudioPrimaryHidlTest {
+protected:
+    void testSetGetConsistency(float volume, Result expectedSetResult, float expectedGetVolume) {
+        SCOPED_TRACE("Test set/get consistency for " + to_string(volume));
+        auto ret = device->setMasterVolume(volume);
+        ASSERT_TRUE(ret.isOk());
+        ASSERT_EQ(expectedSetResult, ret);
+
+        float observedVolume;
+        ASSERT_OK(device->getMasterVolume(returnIn(res, observedVolume)));
+        ASSERT_OK(res);
+
+        // Check that `get` returned the expected value
+        EXPECT_EQ(expectedGetVolume, observedVolume);
+    }
+};
+
+TEST_F(MasterVolumeTest, MasterVolumeTest) {
+    doc::test("Test the master volume if supported");
+    {
+        SCOPED_TRACE("Check for master volume support");
+        auto ret = device->setMasterVolume(1);
+        ASSERT_TRUE(ret.isOk());
+        if (ret == Result::NOT_SUPPORTED) {
+            doc::partialTest("Master volume is not supported");
+            return;
+        }
+    }
+    // NOTE: this code has never been tested on a platform supporting MasterVolume
+    float lastValidVolumeSet;
+    using Volumes = float[];
+    SCOPED_TRACE("As set/get master volume are supported...");
+    {
+        SCOPED_TRACE("...test them with valid values");
+        for (float validVolume : Volumes{0, 0.5, 1}) {
+            ASSERT_NO_FATAL_FAILURE(testSetGetConsistency(validVolume, Result::OK, validVolume));
+            lastValidVolumeSet = validVolume;
+        }
+    }{
+        SCOPED_TRACE("...test them with tricky values");
+        for (float outOfBoundVolume :Volumes{-0.1, 1.1, NAN, INFINITY, -INFINITY,
+                                             1 + std::numeric_limits<float>::epsilon()}) {
+        ASSERT_NO_FATAL_FAILURE(testSetGetConsistency(outOfBoundVolume,
+                                                      Result::INVALID_ARGUMENTS,
+                                                      lastValidVolumeSet));
+        }
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+////////////////////////// {set,get}{Master,Mic}Mute /////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <class Property>
+class AccessorPrimaryHidlTest : public AudioPrimaryHidlTest {
+protected:
+
+    /** Test a property getter and setter. */
+    template <class Getter, class Setter>
+    void testAccessors(const string& propertyName, const vector<Property>& valuesToTest,
+                       Setter setter, Getter getter) {
+
+        Property initialValue; // Save initial value to restore it at the end of the test
+        ASSERT_OK((device.get()->*getter)(returnIn(res, initialValue)));
+        ASSERT_OK(res);
+
+        for (Property setValue : valuesToTest) {
+            SCOPED_TRACE("Test " + propertyName + " getter and setter for " + testing::PrintToString(setValue));
+            ASSERT_OK((device.get()->*setter)(setValue));
+            Property getValue;
+            // Make sure the getter returns the same value just set
+            ASSERT_OK((device.get()->*getter)(returnIn(res, getValue)));
+            ASSERT_OK(res);
+            EXPECT_EQ(setValue, getValue);
+        }
+
+        ASSERT_OK((device.get()->*setter)(initialValue)); // restore initial value
+    }
+
+    /** Test the getter and setter of an optional feature. */
+    template <class Getter, class Setter>
+    void testOptionalAccessors(const string& propertyName, const vector<Property>& valuesToTest,
+                               Setter setter, Getter getter) {
+        doc::test("Test the optional " + propertyName + " getters and setter");
+        {
+            SCOPED_TRACE("Test feature support by calling the getter");
+            Property initialValue;
+            ASSERT_OK((device.get()->*getter)(returnIn(res, initialValue)));
+            if (res == Result::NOT_SUPPORTED) {
+                doc::partialTest(propertyName + " getter is not supported");
+                return;
+            }
+            ASSERT_OK(res); // If it is supported it must succeed
+        }
+        // The feature is supported, test it
+        testAccessors(propertyName, valuesToTest, setter, getter);
+    }
+};
+
+using BoolAccessorPrimaryHidlTest = AccessorPrimaryHidlTest<bool>;
+
+TEST_F(BoolAccessorPrimaryHidlTest, MicMuteTest) {
+    doc::test("Check that the mic can be muted and unmuted");
+    testAccessors("mic mute", {true, false, true}, &IDevice::setMicMute, &IDevice::getMicMute);
+    // TODO: check that the mic is really muted (all sample are 0)
+}
+
+TEST_F(BoolAccessorPrimaryHidlTest, MasterMuteTest) {
+    doc::test("If master mute is supported, try to mute and unmute the master output");
+    testOptionalAccessors("master mute", {true, false, true},
+                          &IDevice::setMasterMute, &IDevice::getMasterMute);
+    // TODO: check that the master volume is really muted
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////// Required and recommended audio format support ///////////////
+// From: https://source.android.com/compatibility/android-cdd.html#5_4_audio_recording
+// From: https://source.android.com/compatibility/android-cdd.html#5_5_audio_playback
+/////////// TODO: move to the beginning of the file for easier update ////////
+//////////////////////////////////////////////////////////////////////////////
+
+class AudioConfigPrimaryTest : public AudioPrimaryHidlTest {
+public:
+    // Cache result ?
+    static const vector<AudioConfig> getRequiredSupportPlaybackAudioConfig() {
+        return combineAudioConfig({AudioChannelMask::OUT_STEREO, AudioChannelMask::OUT_MONO},
+                                  {8000, 11025, 16000, 22050, 32000, 44100},
+                                  {AudioFormat::PCM_16_BIT});
+    }
+
+    static const vector<AudioConfig> getRecommendedSupportPlaybackAudioConfig() {
+        return combineAudioConfig({AudioChannelMask::OUT_STEREO, AudioChannelMask::OUT_MONO},
+                                  {24000, 48000},
+                                  {AudioFormat::PCM_16_BIT});
+    }
+
+    static const vector<AudioConfig> getSupportedPlaybackAudioConfig() {
+        // TODO: retrieve audio config supported by the platform
+        // as declared in the policy configuration
+        return {};
+    }
+
+    static const vector<AudioConfig> getRequiredSupportCaptureAudioConfig() {
+        return combineAudioConfig({AudioChannelMask::IN_MONO},
+                                  {8000, 11025, 16000, 44100},
+                                  {AudioFormat::PCM_16_BIT});
+    }
+    static const vector<AudioConfig> getRecommendedSupportCaptureAudioConfig() {
+        return combineAudioConfig({AudioChannelMask::IN_STEREO},
+                                  {22050, 48000},
+                                  {AudioFormat::PCM_16_BIT});
+    }
+    static const vector<AudioConfig> getSupportedCaptureAudioConfig() {
+        // TODO: retrieve audio config supported by the platform
+        // as declared in the policy configuration
+        return {};
+    }
+private:
+    static const vector<AudioConfig> combineAudioConfig(
+            vector<AudioChannelMask> channelMasks,
+            vector<uint32_t> sampleRates,
+            vector<AudioFormat> formats) {
+        vector<AudioConfig> configs;
+        for (auto channelMask: channelMasks) {
+            for (auto sampleRate : sampleRates) {
+                for (auto format : formats) {
+                    AudioConfig config{};
+                    // leave offloadInfo to 0
+                    config.channelMask = channelMask;
+                    config.sampleRateHz = sampleRate;
+                    config.format = format;
+                    // FIXME: leave frameCount to 0 ?
+                    configs.push_back(config);
+                }
+            }
+        }
+        return configs;
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+///////////////////////////// getInputBufferSize /////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+// FIXME: execute input test only if platform declares android.hardware.microphone
+//        how to get this value ? is it a property ???
+
+class AudioCaptureConfigPrimaryTest : public AudioConfigPrimaryTest,
+                                      public ::testing::WithParamInterface<AudioConfig> {
+protected:
+    void inputBufferSizeTest(const AudioConfig& audioConfig, bool supportRequired) {
+        uint64_t bufferSize;
+        ASSERT_OK(device->getInputBufferSize(audioConfig, returnIn(res, bufferSize)));
+
+        switch (res) {
+            case Result::INVALID_ARGUMENTS:
+                EXPECT_FALSE(supportRequired);
+                break;
+            case Result::OK:
+                // Check that the buffer is of a sane size
+                // For now only that it is > 0
+                EXPECT_GT(bufferSize, uint64_t(0));
+                break;
+            default:
+                FAIL() << "Invalid return status: " << ::testing::PrintToString(res);
+        }
+    }
+};
+
+// Test that the required capture config and those declared in the policy are indeed supported
+class RequiredInputBufferSizeTest : public AudioCaptureConfigPrimaryTest {};
+TEST_P(RequiredInputBufferSizeTest, RequiredInputBufferSizeTest) {
+    doc::test("Input buffer size must be retrievable for a format with required support.");
+    inputBufferSizeTest(GetParam(), true);
+}
+INSTANTIATE_TEST_CASE_P(
+        RequiredInputBufferSize, RequiredInputBufferSizeTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getRequiredSupportCaptureAudioConfig()));
+INSTANTIATE_TEST_CASE_P(
+        SupportedInputBufferSize, RequiredInputBufferSizeTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getSupportedCaptureAudioConfig()));
+
+// Test that the recommended capture config are supported or lead to a INVALID_ARGUMENTS return
+class OptionalInputBufferSizeTest : public AudioCaptureConfigPrimaryTest {};
+TEST_P(OptionalInputBufferSizeTest, OptionalInputBufferSizeTest) {
+    doc::test("Input buffer size should be retrievable for a format with recommended support.");
+    inputBufferSizeTest(GetParam(), false);
+}
+INSTANTIATE_TEST_CASE_P(
+        RecommendedCaptureAudioConfigSupport, OptionalInputBufferSizeTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getRecommendedSupportCaptureAudioConfig()));
+
+//////////////////////////////////////////////////////////////////////////////
+/////////////////////////////// setScreenState ///////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TEST_F(AudioPrimaryHidlTest, setScreenState) {
+    doc::test("Check that the hal can receive the screen state");
+    for (bool turnedOn : {false, true, true, false, false}) {
+        auto ret = device->setScreenState(turnedOn);
+        ASSERT_TRUE(ret.isOk());
+        Result result = ret;
+        ASSERT_TRUE(result == Result::OK || result == Result::NOT_SUPPORTED) << toString(result);
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////// {get,set}Parameters /////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TEST_F(AudioPrimaryHidlTest, getParameters) {
+    doc::test("Check that the hal can set and get parameters");
+    hidl_vec<hidl_string> keys;
+    hidl_vec<ParameterValue> values;
+    ASSERT_OK(device->getParameters(keys, returnIn(res, values)));
+    ASSERT_OK(device->setParameters(values));
+    values.resize(0);
+    ASSERT_OK(device->setParameters(values));
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////// debugDebug //////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TEST_F(AudioPrimaryHidlTest, debugDump) {
+    doc::test("Check that the hal can dump its state without error");
+    FILE* file = tmpfile();
+    ASSERT_NE(nullptr, file) << errno;
+
+    auto* nativeHandle = native_handle_create(1, 0);
+    ASSERT_NE(nullptr, nativeHandle);
+    nativeHandle->data[0] = fileno(file);
+
+    hidl_handle handle;
+    handle.setTo(nativeHandle, true /*take ownership*/);
+
+    auto ret = device->debugDump(handle);
+    ASSERT_TRUE(ret.isOk());
+
+    // FIXME: debugDump does not return a Result.
+    // This mean that the hal can not report that it not implementing the function.
+    // As the default hal does not implement debugDump, the function can not be tested.
+    /*
+    res = ret;
+    if (res == Result::NOT_SUPPORTED) {
+         doc::partialTest("debugDump is not implemented");
+         return;
+    }
+    ASSERT_OK(res);
+    rewind(file);
+
+    // Check that at least one bit was written by the hal
+    char buff;
+    ASSERT_EQ(1, fread(&buff, sizeof(buff), 1, file));
+    */
+    EXPECT_EQ(0, fclose(file)) << errno;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+////////////////////////// open{Output,Input}Stream //////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+template <class Stream>
+class OpenStreamTest : public AudioConfigPrimaryTest,
+                       public ::testing::WithParamInterface<AudioConfig> {
+protected:
+    template <class Open>
+    void testOpen(Open openStream, const AudioConfig& config) {
+        // FIXME: Open a stream without an IOHandle
+        //        This is not required to be accepted by hal implementations
+        AudioIoHandle ioHandle = (AudioIoHandle)AudioHandleConsts::AUDIO_IO_HANDLE_NONE;
+        AudioConfig suggestedConfig{};
+        ASSERT_OK(openStream(ioHandle, config, returnIn(res, stream, suggestedConfig)));
+
+        // TODO: only allow failure for RecommendedPlaybackAudioConfig
+        switch (res) {
+            case Result::OK:
+                ASSERT_TRUE(stream != nullptr);
+                audioConfig = config;
+                break;
+            case Result::INVALID_ARGUMENTS:
+                ASSERT_TRUE(stream == nullptr);
+                AudioConfig suggestedConfigRetry;
+                // Could not open stream with config, try again with the suggested one
+                ASSERT_OK(openStream(ioHandle, suggestedConfig,
+                                     returnIn(res, stream, suggestedConfigRetry)));
+                // This time it must succeed
+                ASSERT_OK(res);
+                ASSERT_TRUE(stream == nullptr);
+                audioConfig = suggestedConfig;
+                break;
+            default:
+                FAIL() << "Invalid return status: " << ::testing::PrintToString(res);
+        }
+        open = true;
+    }
+
+private:
+    void TearDown() override {
+        if (open) {
+            ASSERT_OK(stream->close());
+        }
+    }
+
+protected:
+
+    AudioConfig audioConfig;
+    sp<Stream> stream;
+    bool open = false;
+};
+
+////////////////////////////// openOutputStream //////////////////////////////
+
+class OutputStreamTest : public OpenStreamTest<IStreamOut> {
+    virtual void SetUp() override {
+        ASSERT_NO_FATAL_FAILURE(OpenStreamTest::SetUp()); // setup base
+
+        const AudioConfig& config = GetParam();
+        DeviceAddress deviceAddr{};  // Ignored by primary hal
+        AudioOutputFlag flags = AudioOutputFlag::NONE; // TODO: test all flag combination
+        testOpen([&](AudioIoHandle handle, AudioConfig config, auto cb)
+                 { return device->openOutputStream(handle, deviceAddr, config, flags, cb); },
+                 config);
+    }
+};
+TEST_P(OutputStreamTest, OpenOutputStreamTest) {
+    doc::test("Check that output streams can be open with the required and recommended config");
+    // Open done in SetUp
+}
+INSTANTIATE_TEST_CASE_P(
+        RequiredOutputStreamConfigSupport, OutputStreamTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getRequiredSupportPlaybackAudioConfig()));
+INSTANTIATE_TEST_CASE_P(
+        SupportedOutputStreamConfig, OutputStreamTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getSupportedPlaybackAudioConfig()));
+
+INSTANTIATE_TEST_CASE_P(
+        RecommendedOutputStreamConfigSupport, OutputStreamTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getRecommendedSupportPlaybackAudioConfig()));
+
+////////////////////////////// openInputStream //////////////////////////////
+
+class InputStreamTest : public OpenStreamTest<IStreamIn> {
+
+    virtual void SetUp() override {
+        ASSERT_NO_FATAL_FAILURE(OpenStreamTest::SetUp()); // setup base
+
+        const AudioConfig& config = GetParam();
+        DeviceAddress deviceAddr{}; // TODO: test all devices
+        AudioInputFlag flags = AudioInputFlag::NONE; // TODO: test all flag combination
+        AudioSource source = AudioSource::DEFAULT; // TODO: test all flag combination
+        testOpen([&](AudioIoHandle handle, AudioConfig config, auto cb)
+                 { return device->openInputStream(handle, deviceAddr, config, flags, source, cb); },
+                 config);
+    }
+};
+
+TEST_P(InputStreamTest, OpenInputStreamTest) {
+    doc::test("Check that input streams can be open with the required and recommended config");
+    // Open done in setup
+}
+INSTANTIATE_TEST_CASE_P(
+        RequiredInputStreamConfigSupport, InputStreamTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getRequiredSupportCaptureAudioConfig()));
+INSTANTIATE_TEST_CASE_P(
+        SupportedInputStreamConfig, InputStreamTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getSupportedCaptureAudioConfig()));
+
+INSTANTIATE_TEST_CASE_P(
+        RecommendedInputStreamConfigSupport, InputStreamTest,
+        ::testing::ValuesIn(AudioConfigPrimaryTest::getRecommendedSupportCaptureAudioConfig()));
+
+//////////////////////////////////////////////////////////////////////////////
+////////////////////////////// IStream getters ///////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+/** Unpack the provided result.
+ * If the result is not OK, register a failure and return an undefined value. */
+template <class R>
+static R extract(Return<R> ret) {
+    if (!ret.isOk()) {
+        ADD_FAILURE();
+        return R{};
+    }
+    return ret;
+}
+
+template <class Property, class CapabilityGetter, class Getter, class Setter>
+static void testCapabilityGetter(const string& name,IStream* stream, Property currentValue,
+                                 CapabilityGetter capablityGetter, Getter getter, Setter setter) {
+    hidl_vec<Property> capabilities;
+    ASSERT_OK((stream->*capablityGetter)(returnIn(capabilities)));
+    if (capabilities.size() == 0) {
+        // The default hal should probably return a NOT_SUPPORTED if the hal does not expose
+        // capability retrieval. For now it returns an empty list if not implemented
+        doc::partialTest(name + " is not supported");
+        return;
+    };
+    // TODO: This code has never been tested on a hal that supports getSupportedSampleRates
+    EXPECT_NE(std::find(capabilities.begin(), capabilities.end(), currentValue),
+             capabilities.end())
+        << "current " << name << " is not in the list of the supported ones "
+        << toString(capabilities);
+
+    // Check that all declared supported values are indeed supported
+    for (auto capability : capabilities) {
+        ASSERT_OK((stream->*setter)(capability));
+        ASSERT_EQ(capability, extract((stream->*getter)()));
+    }
+}
+
+static void testGetAudioProperties(IStream* stream, AudioConfig expectedConfig) {
+    uint32_t sampleRateHz;
+    AudioChannelMask mask;
+    AudioFormat format;
+
+    stream->getAudioProperties(returnIn(sampleRateHz, mask, format));
+
+    // FIXME: the qcom hal it does not currently negotiate the sampleRate & channel mask
+    EXPECT_EQ(expectedConfig.sampleRateHz, sampleRateHz);
+    EXPECT_EQ(expectedConfig.channelMask, mask);
+    EXPECT_EQ(expectedConfig.format, format);
+}
+
+static void testAccessors(IStream* stream, AudioConfig audioConfig) {
+    doc::test("Test IStream getters and setters that can be called in the stop state");
+
+    auto frameCount = extract(stream->getFrameCount());
+    ASSERT_EQ(audioConfig.frameCount, frameCount);
+
+    auto sampleRate = extract(stream->getSampleRate());
+    // FIXME: the qcom hal it does not currently negotiate the sampleRate
+    ASSERT_EQ(audioConfig.sampleRateHz, sampleRate);
+
+    auto channelMask = extract(stream->getChannelMask());
+    // FIXME: the qcom hal it does not currently negotiate the channelMask
+    ASSERT_EQ(audioConfig.channelMask, channelMask);
+
+    auto frameSize = extract(stream->getFrameSize());
+    ASSERT_GE(frameSize, 0U);
+
+    auto bufferSize = extract(stream->getBufferSize());
+    ASSERT_GE(bufferSize, frameSize);
+
+    testCapabilityGetter("getSupportedsampleRate", stream, sampleRate,
+                         &IStream::getSupportedSampleRates,
+                         &IStream::getSampleRate, &IStream::setSampleRate);
+
+    testCapabilityGetter("getSupportedChannelMask", stream, channelMask,
+                         &IStream::getSupportedChannelMasks,
+                         &IStream::getChannelMask, &IStream::setChannelMask);
+
+    AudioFormat format = extract(stream->getFormat());
+    ASSERT_EQ(audioConfig.format, format);
+
+    testCapabilityGetter("getSupportedFormats", stream, format,
+                         &IStream::getSupportedFormats, &IStream::getFormat, &IStream::setFormat);
+
+    testGetAudioProperties(stream, audioConfig);
+
+    auto ret = stream->getDevice();
+    ASSERT_TRUE(ret.isOk());
+    AudioDevice device = ret;
+    ASSERT_EQ(AudioDevice::OUT_DEFAULT, device);
+}
+
+TEST_P(InputStreamTest, GettersTest) {
+    testAccessors(stream.get(), audioConfig);
+}
+TEST_P(OutputStreamTest, GettersTest) {
+    testAccessors(stream.get(), audioConfig);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////// AudioPatches ////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+
+TEST_F(AudioPrimaryHidlTest, AudioPatches) {
+    doc::test("Test if audio patches are supported");
+    auto result = device->supportsAudioPatches();
+    ASSERT_TRUE(result.isOk());
+    bool supportsAudioPatch = result;
+    if (!supportsAudioPatch) {
+        doc::partialTest("Audio patches are not supported");
+        return;
+    }
+    // TODO: test audio patches
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/////////////////////////////// PrimaryDevice ////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TEST_F(AudioPrimaryHidlTest, setVoiceVolume) {
+    doc::test("Make sure setVoiceVolume only succeed if volume is in [0,1]");
+    for (float volume : {0.0, 0.01, 0.5, 0.09, 1.0}) {
+        SCOPED_TRACE("volume=" + to_string(volume));
+        ASSERT_OK(device->setVoiceVolume(volume));
+    }
+    for (float volume : (float[]){-INFINITY,-1.0, -0.0,
+                                  1.0 + std::numeric_limits<float>::epsilon(), 2.0, INFINITY,
+                                  NAN}) {
+        SCOPED_TRACE("volume=" + to_string(volume));
+        // FIXME: NAN should never be accepted
+        // FIXME: Missing api doc. What should the impl do if the volume is outside [0,1] ?
+        ASSERT_INVALID_ARGUMENTS(device->setVoiceVolume(volume));
+    }
+}
+
+TEST_F(AudioPrimaryHidlTest, setMode) {
+    doc::test("Make sure setMode always succeeds if mode is valid");
+    for (AudioMode mode : {AudioMode::IN_CALL, AudioMode::IN_COMMUNICATION,
+                           AudioMode::RINGTONE, AudioMode::CURRENT,
+                           AudioMode::NORMAL /* Make sure to leave the test in normal mode */ }) {
+        SCOPED_TRACE("mode=" + toString(mode));
+        ASSERT_OK(device->setMode(mode));
+    }
+
+    // FIXME: Missing api doc. What should the impl do if the mode is invalid ?
+    ASSERT_INVALID_ARGUMENTS(device->setMode(AudioMode::INVALID));
+}
+
+
+TEST_F(BoolAccessorPrimaryHidlTest, BtScoNrecEnabled) {
+    doc::test("Query and set the BT SCO NR&EC state");
+    testOptionalAccessors("BtScoNrecEnabled", {true, false, true},
+                         &IPrimaryDevice::setBtScoNrecEnabled,
+                         &IPrimaryDevice::getBtScoNrecEnabled);
+}
+
+TEST_F(BoolAccessorPrimaryHidlTest, setGetBtScoWidebandEnabled) {
+    doc::test("Query and set the SCO whideband state");
+    testOptionalAccessors("BtScoWideband", {true, false, true},
+                         &IPrimaryDevice::setBtScoWidebandEnabled,
+                         &IPrimaryDevice::getBtScoWidebandEnabled);
+}
+
+using TtyModeAccessorPrimaryHidlTest = AccessorPrimaryHidlTest<TtyMode>;
+TEST_F(TtyModeAccessorPrimaryHidlTest, setGetTtyMode) {
+    doc::test("Query and set the TTY mode state");
+    testOptionalAccessors("TTY mode", {TtyMode::OFF, TtyMode::HCO, TtyMode::VCO, TtyMode::FULL},
+                          &IPrimaryDevice::setTtyMode, &IPrimaryDevice::getTtyMode);
+}
+
+TEST_F(BoolAccessorPrimaryHidlTest, setGetHac) {
+    doc::test("Query and set the HAC state");
+    testAccessors("HAC", {true, false, true},
+                         &IPrimaryDevice::setHacEnabled,
+                         &IPrimaryDevice::getHacEnabled);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////// Clean caches on global tear down ////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+int main(int argc, char** argv) {
+    environment = new Environment;
+    ::testing::AddGlobalTestEnvironment(environment);
+    ::testing::InitGoogleTest(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    LOG(INFO) << "Test result = " << status;
+    return status;
+}
diff --git a/audio/2.0/vts/functional/utility/AssertOk.h b/audio/2.0/vts/functional/utility/AssertOk.h
new file mode 100644
index 0000000..16488ae
--- /dev/null
+++ b/audio/2.0/vts/functional/utility/AssertOk.h
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+#include <hidl/Status.h>
+
+namespace detail {
+
+inline void assertOk(::android::hardware::Return<void> ret) {
+    ASSERT_TRUE(ret.isOk());
+}
+
+inline void assertOk(::android::hardware::audio::V2_0::Result result) {
+    ASSERT_EQ(decltype(result)::OK, result);
+}
+
+inline void assertOk(::android::hardware::Return<::android::hardware::audio::V2_0::Result> ret) {
+    ASSERT_TRUE(ret.isOk());
+    ::android::hardware::audio::V2_0::Result result = ret;
+    assertOk(result);
+}
+
+inline void assertInvalidArguments(::android::hardware::audio::V2_0::Result result) {
+    ASSERT_EQ(decltype(result)::INVALID_ARGUMENTS, result);
+}
+
+inline void assertInvalidArguments(
+        ::android::hardware::Return<::android::hardware::audio::V2_0::Result> ret) {
+    ASSERT_TRUE(ret.isOk());
+    ::android::hardware::audio::V2_0::Result result = ret;
+    assertInvalidArguments(result);
+}
+}
+
+// Test anything provided is and contains only OK
+#define ASSERT_OK(ret) ASSERT_NO_FATAL_FAILURE(detail::assertOk(ret))
+#define EXPECT_OK(ret) EXPECT_NO_FATAL_FAILURE(detail::assertOk(ret))
+
+#define ASSERT_INVALID_ARGUMENTS(ret) ASSERT_NO_FATAL_FAILURE(detail::assertInvalidArguments(ret))
diff --git a/audio/2.0/vts/functional/utility/PrettyPrintAudioTypes.h b/audio/2.0/vts/functional/utility/PrettyPrintAudioTypes.h
new file mode 100644
index 0000000..8dfcb29
--- /dev/null
+++ b/audio/2.0/vts/functional/utility/PrettyPrintAudioTypes.h
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+// Use HIDL generated toString methods to pretty print gtest errors
+namespace android {
+namespace hardware {
+namespace audio {
+namespace V2_0 {
+inline void PrintTo(const Result& result, ::std::ostream* os) {
+    *os << toString(result);
+}
+} // namespace V2_0
+namespace common {
+namespace V2_0 {
+inline void PrintTo(const AudioConfig& config, ::std::ostream* os) {
+    *os << toString(config);
+}
+} // namespace V2_0
+} // namespace common
+}
+}
+}
diff --git a/audio/2.0/vts/functional/utility/ReturnIn.h b/audio/2.0/vts/functional/utility/ReturnIn.h
new file mode 100644
index 0000000..bb2389a
--- /dev/null
+++ b/audio/2.0/vts/functional/utility/ReturnIn.h
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+#include <tuple>
+
+namespace utility {
+
+namespace detail {
+// Helper class to generate the HIDL synchronous callback
+template <class... ResultStore>
+class ReturnIn {
+ public:
+    // Provide to the constructor the variables where the output parameters must be copied
+    // TODO: take pointers to match google output parameter style ?
+    ReturnIn(ResultStore&... ts) : results(ts...) {}
+    // Synchronous callback
+    template <class... Results>
+    void operator() (Results&&...results) {
+        set(std::forward<Results>(results)...);
+    }
+ private:
+    // Recursively set all output parameters
+    template <class Head, class... Tail>
+    void set(Head&& head, Tail&&... tail) {
+        std::get<sizeof...(ResultStore) - sizeof...(Tail) - 1>(results)
+                  = std::forward<Head>(head);
+        set(tail...);
+    }
+    // Trivial case
+    void set() {}
+
+    // All variables to set are stored here
+    std::tuple<ResultStore&...> results;
+};
+} // namespace detail
+
+// Generate the HIDL synchronous callback with a copy policy
+// Input: the variables (lvalue reference) where to save the return values
+// Output: the callback to provide to a HIDL call with a synchronous callback
+// The output parameters *will be copied* do not use this function if you have
+// a zero copy policy
+template <class... ResultStore>
+detail::ReturnIn<ResultStore...> returnIn(ResultStore&... ts) { return {ts...};}
+
+}
diff --git a/audio/Android.bp b/audio/Android.bp
index 3121a36..8a1e892 100644
--- a/audio/Android.bp
+++ b/audio/Android.bp
@@ -1,6 +1,7 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
     "2.0",
+    "2.0/vts/functional",
     "common/2.0",
     "effect/2.0",
     "effect/2.0/vts/functional",
diff --git a/audio/common/2.0/types.hal b/audio/common/2.0/types.hal
index ae7f545..93b898b 100644
--- a/audio/common/2.0/types.hal
+++ b/audio/common/2.0/types.hal
@@ -537,6 +537,7 @@
     /* audio bus implemented by the audio system (e.g an MOST stereo channel) */
     OUT_BUS                       = 0x1000000,
     OUT_PROXY                     = 0x2000000,
+    OUT_USB_HEADSET               = 0x4000000,
     OUT_DEFAULT                   = BIT_DEFAULT,
     OUT_ALL      = (OUT_EARPIECE |
             OUT_SPEAKER |
@@ -603,6 +604,7 @@
     /* audio bus implemented by the audio system (e.g an MOST stereo channel) */
     IN_BUS                   = BIT_IN | 0x100000,
     IN_PROXY                 = BIT_IN | 0x1000000,
+    IN_USB_HEADSET           = BIT_IN | 0x2000000,
     IN_DEFAULT               = BIT_IN | BIT_DEFAULT,
 
     IN_ALL     = (IN_COMMUNICATION |
@@ -670,6 +672,7 @@
     DIRECT_PCM = 0x2000,     // Audio stream containing PCM data that needs
                              // to pass through compress path for DSP post proc.
     MMAP_NOIRQ = 0x4000, // output operates in MMAP no IRQ mode.
+    VOIP_CALL_RX = 0x8000, // preferred output for VoIP calls.
 };
 
 /*
@@ -680,12 +683,13 @@
  */
 @export(name="audio_input_flags_t", value_prefix="AUDIO_INPUT_FLAG_")
 enum AudioInputFlag : int32_t {
-    NONE       = 0x0,  // no attributes
-    FAST       = 0x1,  // prefer an input that supports "fast tracks"
-    HW_HOTWORD = 0x2,  // prefer an input that captures from hw hotword source
-    RAW        = 0x4,  // minimize signal processing
-    SYNC       = 0x8,  // synchronize I/O streams
-    MMAP_NOIRQ = 0x10, // input operates in MMAP no IRQ mode.
+    NONE         = 0x0,  // no attributes
+    FAST         = 0x1,  // prefer an input that supports "fast tracks"
+    HW_HOTWORD   = 0x2,  // prefer an input that captures from hw hotword source
+    RAW          = 0x4,  // minimize signal processing
+    SYNC         = 0x8,  // synchronize I/O streams
+    MMAP_NOIRQ   = 0x10, // input operates in MMAP no IRQ mode.
+    VOIP_CALL_TX = 0x20, // preferred input for VoIP calls.
 };
 
 @export(name="audio_usage_t", value_prefix="AUDIO_USAGE_")
diff --git a/audio/common/2.0/vts/types.vts b/audio/common/2.0/vts/types.vts
deleted file mode 100644
index d790573..0000000
--- a/audio/common/2.0/vts/types.vts
+++ /dev/null
@@ -1,1954 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.audio.common"
-
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioHandleConsts"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "AUDIO_IO_HANDLE_NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "AUDIO_MODULE_HANDLE_NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "AUDIO_PORT_HANDLE_NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "AUDIO_PATCH_HANDLE_NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::Uuid"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "timeLow"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "timeMid"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "versionAndTimeHigh"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "variantAndClockSeqHigh"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "node"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioStreamType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DEFAULT"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "MIN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "VOICE_CALL"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SYSTEM"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "RING"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "MUSIC"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ALARM"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NOTIFICATION"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "BLUETOOTH_SCO"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "ENFORCED_AUDIBLE"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "DTMF"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "TTS"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "ACCESSIBILITY"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "REROUTING"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "PATCH"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "PUBLIC_CNT"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "FOR_POLICY_CNT"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "CNT"
-        scalar_value: {
-            int32_t: 13
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioSource"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DEFAULT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "MIC"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "VOICE_UPLINK"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "VOICE_DOWNLINK"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "VOICE_CALL"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "CAMCORDER"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "VOICE_RECOGNITION"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "VOICE_COMMUNICATION"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "REMOTE_SUBMIX"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "UNPROCESSED"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "CNT"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "MAX"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "FM_TUNER"
-        scalar_value: {
-            int32_t: 1998
-        }
-        enumerator: "HOTWORD"
-        scalar_value: {
-            int32_t: 1999
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioSessionConsts"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OUTPUT_STAGE"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "OUTPUT_MIX"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ALLOCATE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioFormat"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "INVALID"
-        scalar_value: {
-            uint32_t: 4294967295
-        }
-        enumerator: "DEFAULT"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "PCM"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "MP3"
-        scalar_value: {
-            uint32_t: 16777216
-        }
-        enumerator: "AMR_NB"
-        scalar_value: {
-            uint32_t: 33554432
-        }
-        enumerator: "AMR_WB"
-        scalar_value: {
-            uint32_t: 50331648
-        }
-        enumerator: "AAC"
-        scalar_value: {
-            uint32_t: 67108864
-        }
-        enumerator: "HE_AAC_V1"
-        scalar_value: {
-            uint32_t: 83886080
-        }
-        enumerator: "HE_AAC_V2"
-        scalar_value: {
-            uint32_t: 100663296
-        }
-        enumerator: "VORBIS"
-        scalar_value: {
-            uint32_t: 117440512
-        }
-        enumerator: "OPUS"
-        scalar_value: {
-            uint32_t: 134217728
-        }
-        enumerator: "AC3"
-        scalar_value: {
-            uint32_t: 150994944
-        }
-        enumerator: "E_AC3"
-        scalar_value: {
-            uint32_t: 167772160
-        }
-        enumerator: "DTS"
-        scalar_value: {
-            uint32_t: 184549376
-        }
-        enumerator: "DTS_HD"
-        scalar_value: {
-            uint32_t: 201326592
-        }
-        enumerator: "IEC61937"
-        scalar_value: {
-            uint32_t: 218103808
-        }
-        enumerator: "DOLBY_TRUEHD"
-        scalar_value: {
-            uint32_t: 234881024
-        }
-        enumerator: "EVRC"
-        scalar_value: {
-            uint32_t: 268435456
-        }
-        enumerator: "EVRCB"
-        scalar_value: {
-            uint32_t: 285212672
-        }
-        enumerator: "EVRCWB"
-        scalar_value: {
-            uint32_t: 301989888
-        }
-        enumerator: "EVRCNW"
-        scalar_value: {
-            uint32_t: 318767104
-        }
-        enumerator: "AAC_ADIF"
-        scalar_value: {
-            uint32_t: 335544320
-        }
-        enumerator: "WMA"
-        scalar_value: {
-            uint32_t: 352321536
-        }
-        enumerator: "WMA_PRO"
-        scalar_value: {
-            uint32_t: 369098752
-        }
-        enumerator: "AMR_WB_PLUS"
-        scalar_value: {
-            uint32_t: 385875968
-        }
-        enumerator: "MP2"
-        scalar_value: {
-            uint32_t: 402653184
-        }
-        enumerator: "QCELP"
-        scalar_value: {
-            uint32_t: 419430400
-        }
-        enumerator: "DSD"
-        scalar_value: {
-            uint32_t: 436207616
-        }
-        enumerator: "FLAC"
-        scalar_value: {
-            uint32_t: 452984832
-        }
-        enumerator: "ALAC"
-        scalar_value: {
-            uint32_t: 469762048
-        }
-        enumerator: "APE"
-        scalar_value: {
-            uint32_t: 486539264
-        }
-        enumerator: "AAC_ADTS"
-        scalar_value: {
-            uint32_t: 503316480
-        }
-        enumerator: "SBC"
-        scalar_value: {
-            uint32_t: 520093696
-        }
-        enumerator: "APTX"
-        scalar_value: {
-            uint32_t: 536870912
-        }
-        enumerator: "APTX_HD"
-        scalar_value: {
-            uint32_t: 553648128
-        }
-        enumerator: "AC4"
-        scalar_value: {
-            uint32_t: 570425344
-        }
-        enumerator: "LDAC"
-        scalar_value: {
-            uint32_t: 587202560
-        }
-        enumerator: "MAIN_MASK"
-        scalar_value: {
-            uint32_t: 4278190080
-        }
-        enumerator: "SUB_MASK"
-        scalar_value: {
-            uint32_t: 16777215
-        }
-        enumerator: "PCM_SUB_16_BIT"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "PCM_SUB_8_BIT"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "PCM_SUB_32_BIT"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "PCM_SUB_8_24_BIT"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "PCM_SUB_FLOAT"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "PCM_SUB_24_BIT_PACKED"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "MP3_SUB_NONE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "AMR_SUB_NONE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "AAC_SUB_MAIN"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "AAC_SUB_LC"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "AAC_SUB_SSR"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "AAC_SUB_LTP"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "AAC_SUB_HE_V1"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "AAC_SUB_SCALABLE"
-        scalar_value: {
-            uint32_t: 32
-        }
-        enumerator: "AAC_SUB_ERLC"
-        scalar_value: {
-            uint32_t: 64
-        }
-        enumerator: "AAC_SUB_LD"
-        scalar_value: {
-            uint32_t: 128
-        }
-        enumerator: "AAC_SUB_HE_V2"
-        scalar_value: {
-            uint32_t: 256
-        }
-        enumerator: "AAC_SUB_ELD"
-        scalar_value: {
-            uint32_t: 512
-        }
-        enumerator: "VORBIS_SUB_NONE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "PCM_16_BIT"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "PCM_8_BIT"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "PCM_32_BIT"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "PCM_8_24_BIT"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "PCM_FLOAT"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "PCM_24_BIT_PACKED"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "AAC_MAIN"
-        scalar_value: {
-            uint32_t: 67108865
-        }
-        enumerator: "AAC_LC"
-        scalar_value: {
-            uint32_t: 67108866
-        }
-        enumerator: "AAC_SSR"
-        scalar_value: {
-            uint32_t: 67108868
-        }
-        enumerator: "AAC_LTP"
-        scalar_value: {
-            uint32_t: 67108872
-        }
-        enumerator: "AAC_HE_V1"
-        scalar_value: {
-            uint32_t: 67108880
-        }
-        enumerator: "AAC_SCALABLE"
-        scalar_value: {
-            uint32_t: 67108896
-        }
-        enumerator: "AAC_ERLC"
-        scalar_value: {
-            uint32_t: 67108928
-        }
-        enumerator: "AAC_LD"
-        scalar_value: {
-            uint32_t: 67108992
-        }
-        enumerator: "AAC_HE_V2"
-        scalar_value: {
-            uint32_t: 67109120
-        }
-        enumerator: "AAC_ELD"
-        scalar_value: {
-            uint32_t: 67109376
-        }
-        enumerator: "AAC_ADTS_MAIN"
-        scalar_value: {
-            uint32_t: 503316481
-        }
-        enumerator: "AAC_ADTS_LC"
-        scalar_value: {
-            uint32_t: 503316482
-        }
-        enumerator: "AAC_ADTS_SSR"
-        scalar_value: {
-            uint32_t: 503316484
-        }
-        enumerator: "AAC_ADTS_LTP"
-        scalar_value: {
-            uint32_t: 503316488
-        }
-        enumerator: "AAC_ADTS_HE_V1"
-        scalar_value: {
-            uint32_t: 503316496
-        }
-        enumerator: "AAC_ADTS_SCALABLE"
-        scalar_value: {
-            uint32_t: 503316512
-        }
-        enumerator: "AAC_ADTS_ERLC"
-        scalar_value: {
-            uint32_t: 503316544
-        }
-        enumerator: "AAC_ADTS_LD"
-        scalar_value: {
-            uint32_t: 503316608
-        }
-        enumerator: "AAC_ADTS_HE_V2"
-        scalar_value: {
-            uint32_t: 503316736
-        }
-        enumerator: "AAC_ADTS_ELD"
-        scalar_value: {
-            uint32_t: 503316992
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::FixedChannelCount"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FCC_2"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FCC_8"
-        scalar_value: {
-            int32_t: 8
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioChannelMask"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "REPRESENTATION_POSITION"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "REPRESENTATION_INDEX"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "NONE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "INVALID"
-        scalar_value: {
-            uint32_t: 3221225472
-        }
-        enumerator: "OUT_FRONT_LEFT"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "OUT_FRONT_RIGHT"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "OUT_FRONT_CENTER"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "OUT_LOW_FREQUENCY"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "OUT_BACK_LEFT"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "OUT_BACK_RIGHT"
-        scalar_value: {
-            uint32_t: 32
-        }
-        enumerator: "OUT_FRONT_LEFT_OF_CENTER"
-        scalar_value: {
-            uint32_t: 64
-        }
-        enumerator: "OUT_FRONT_RIGHT_OF_CENTER"
-        scalar_value: {
-            uint32_t: 128
-        }
-        enumerator: "OUT_BACK_CENTER"
-        scalar_value: {
-            uint32_t: 256
-        }
-        enumerator: "OUT_SIDE_LEFT"
-        scalar_value: {
-            uint32_t: 512
-        }
-        enumerator: "OUT_SIDE_RIGHT"
-        scalar_value: {
-            uint32_t: 1024
-        }
-        enumerator: "OUT_TOP_CENTER"
-        scalar_value: {
-            uint32_t: 2048
-        }
-        enumerator: "OUT_TOP_FRONT_LEFT"
-        scalar_value: {
-            uint32_t: 4096
-        }
-        enumerator: "OUT_TOP_FRONT_CENTER"
-        scalar_value: {
-            uint32_t: 8192
-        }
-        enumerator: "OUT_TOP_FRONT_RIGHT"
-        scalar_value: {
-            uint32_t: 16384
-        }
-        enumerator: "OUT_TOP_BACK_LEFT"
-        scalar_value: {
-            uint32_t: 32768
-        }
-        enumerator: "OUT_TOP_BACK_CENTER"
-        scalar_value: {
-            uint32_t: 65536
-        }
-        enumerator: "OUT_TOP_BACK_RIGHT"
-        scalar_value: {
-            uint32_t: 131072
-        }
-        enumerator: "OUT_MONO"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "OUT_STEREO"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "OUT_2POINT1"
-        scalar_value: {
-            uint32_t: 11
-        }
-        enumerator: "OUT_QUAD"
-        scalar_value: {
-            uint32_t: 51
-        }
-        enumerator: "OUT_QUAD_BACK"
-        scalar_value: {
-            uint32_t: 51
-        }
-        enumerator: "OUT_QUAD_SIDE"
-        scalar_value: {
-            uint32_t: 1539
-        }
-        enumerator: "OUT_SURROUND"
-        scalar_value: {
-            uint32_t: 263
-        }
-        enumerator: "OUT_PENTA"
-        scalar_value: {
-            uint32_t: 55
-        }
-        enumerator: "OUT_5POINT1"
-        scalar_value: {
-            uint32_t: 63
-        }
-        enumerator: "OUT_5POINT1_BACK"
-        scalar_value: {
-            uint32_t: 63
-        }
-        enumerator: "OUT_5POINT1_SIDE"
-        scalar_value: {
-            uint32_t: 1551
-        }
-        enumerator: "OUT_6POINT1"
-        scalar_value: {
-            uint32_t: 319
-        }
-        enumerator: "OUT_7POINT1"
-        scalar_value: {
-            uint32_t: 1599
-        }
-        enumerator: "OUT_ALL"
-        scalar_value: {
-            uint32_t: 262143
-        }
-        enumerator: "IN_LEFT"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "IN_RIGHT"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "IN_FRONT"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "IN_BACK"
-        scalar_value: {
-            uint32_t: 32
-        }
-        enumerator: "IN_LEFT_PROCESSED"
-        scalar_value: {
-            uint32_t: 64
-        }
-        enumerator: "IN_RIGHT_PROCESSED"
-        scalar_value: {
-            uint32_t: 128
-        }
-        enumerator: "IN_FRONT_PROCESSED"
-        scalar_value: {
-            uint32_t: 256
-        }
-        enumerator: "IN_BACK_PROCESSED"
-        scalar_value: {
-            uint32_t: 512
-        }
-        enumerator: "IN_PRESSURE"
-        scalar_value: {
-            uint32_t: 1024
-        }
-        enumerator: "IN_X_AXIS"
-        scalar_value: {
-            uint32_t: 2048
-        }
-        enumerator: "IN_Y_AXIS"
-        scalar_value: {
-            uint32_t: 4096
-        }
-        enumerator: "IN_Z_AXIS"
-        scalar_value: {
-            uint32_t: 8192
-        }
-        enumerator: "IN_VOICE_UPLINK"
-        scalar_value: {
-            uint32_t: 16384
-        }
-        enumerator: "IN_VOICE_DNLINK"
-        scalar_value: {
-            uint32_t: 32768
-        }
-        enumerator: "IN_MONO"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "IN_STEREO"
-        scalar_value: {
-            uint32_t: 12
-        }
-        enumerator: "IN_FRONT_BACK"
-        scalar_value: {
-            uint32_t: 48
-        }
-        enumerator: "IN_6"
-        scalar_value: {
-            uint32_t: 252
-        }
-        enumerator: "IN_VOICE_UPLINK_MONO"
-        scalar_value: {
-            uint32_t: 16400
-        }
-        enumerator: "IN_VOICE_DNLINK_MONO"
-        scalar_value: {
-            uint32_t: 32784
-        }
-        enumerator: "IN_VOICE_CALL_MONO"
-        scalar_value: {
-            uint32_t: 49168
-        }
-        enumerator: "IN_ALL"
-        scalar_value: {
-            uint32_t: 65532
-        }
-        enumerator: "COUNT_MAX"
-        scalar_value: {
-            uint32_t: 30
-        }
-        enumerator: "INDEX_HDR"
-        scalar_value: {
-            uint32_t: 2147483648
-        }
-        enumerator: "INDEX_MASK_1"
-        scalar_value: {
-            uint32_t: 2147483649
-        }
-        enumerator: "INDEX_MASK_2"
-        scalar_value: {
-            uint32_t: 2147483651
-        }
-        enumerator: "INDEX_MASK_3"
-        scalar_value: {
-            uint32_t: 2147483655
-        }
-        enumerator: "INDEX_MASK_4"
-        scalar_value: {
-            uint32_t: 2147483663
-        }
-        enumerator: "INDEX_MASK_5"
-        scalar_value: {
-            uint32_t: 2147483679
-        }
-        enumerator: "INDEX_MASK_6"
-        scalar_value: {
-            uint32_t: 2147483711
-        }
-        enumerator: "INDEX_MASK_7"
-        scalar_value: {
-            uint32_t: 2147483775
-        }
-        enumerator: "INDEX_MASK_8"
-        scalar_value: {
-            uint32_t: 2147483903
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioInterleave"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "LEFT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RIGHT"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INVALID"
-        scalar_value: {
-            int32_t: -2
-        }
-        enumerator: "CURRENT"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "NORMAL"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RINGTONE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "IN_CALL"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "IN_COMMUNICATION"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CNT"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "MAX"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioDevice"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "BIT_IN"
-        scalar_value: {
-            uint32_t: 2147483648
-        }
-        enumerator: "BIT_DEFAULT"
-        scalar_value: {
-            uint32_t: 1073741824
-        }
-        enumerator: "OUT_EARPIECE"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "OUT_SPEAKER"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "OUT_WIRED_HEADSET"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "OUT_WIRED_HEADPHONE"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "OUT_BLUETOOTH_SCO"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "OUT_BLUETOOTH_SCO_HEADSET"
-        scalar_value: {
-            uint32_t: 32
-        }
-        enumerator: "OUT_BLUETOOTH_SCO_CARKIT"
-        scalar_value: {
-            uint32_t: 64
-        }
-        enumerator: "OUT_BLUETOOTH_A2DP"
-        scalar_value: {
-            uint32_t: 128
-        }
-        enumerator: "OUT_BLUETOOTH_A2DP_HEADPHONES"
-        scalar_value: {
-            uint32_t: 256
-        }
-        enumerator: "OUT_BLUETOOTH_A2DP_SPEAKER"
-        scalar_value: {
-            uint32_t: 512
-        }
-        enumerator: "OUT_AUX_DIGITAL"
-        scalar_value: {
-            uint32_t: 1024
-        }
-        enumerator: "OUT_HDMI"
-        scalar_value: {
-            uint32_t: 1024
-        }
-        enumerator: "OUT_ANLG_DOCK_HEADSET"
-        scalar_value: {
-            uint32_t: 2048
-        }
-        enumerator: "OUT_DGTL_DOCK_HEADSET"
-        scalar_value: {
-            uint32_t: 4096
-        }
-        enumerator: "OUT_USB_ACCESSORY"
-        scalar_value: {
-            uint32_t: 8192
-        }
-        enumerator: "OUT_USB_DEVICE"
-        scalar_value: {
-            uint32_t: 16384
-        }
-        enumerator: "OUT_REMOTE_SUBMIX"
-        scalar_value: {
-            uint32_t: 32768
-        }
-        enumerator: "OUT_TELEPHONY_TX"
-        scalar_value: {
-            uint32_t: 65536
-        }
-        enumerator: "OUT_LINE"
-        scalar_value: {
-            uint32_t: 131072
-        }
-        enumerator: "OUT_HDMI_ARC"
-        scalar_value: {
-            uint32_t: 262144
-        }
-        enumerator: "OUT_SPDIF"
-        scalar_value: {
-            uint32_t: 524288
-        }
-        enumerator: "OUT_FM"
-        scalar_value: {
-            uint32_t: 1048576
-        }
-        enumerator: "OUT_AUX_LINE"
-        scalar_value: {
-            uint32_t: 2097152
-        }
-        enumerator: "OUT_SPEAKER_SAFE"
-        scalar_value: {
-            uint32_t: 4194304
-        }
-        enumerator: "OUT_IP"
-        scalar_value: {
-            uint32_t: 8388608
-        }
-        enumerator: "OUT_BUS"
-        scalar_value: {
-            uint32_t: 16777216
-        }
-        enumerator: "OUT_PROXY"
-        scalar_value: {
-            uint32_t: 33554432
-        }
-        enumerator: "OUT_DEFAULT"
-        scalar_value: {
-            uint32_t: 1073741824
-        }
-        enumerator: "OUT_ALL"
-        scalar_value: {
-            uint32_t: 1140850687
-        }
-        enumerator: "OUT_ALL_A2DP"
-        scalar_value: {
-            uint32_t: 896
-        }
-        enumerator: "OUT_ALL_SCO"
-        scalar_value: {
-            uint32_t: 112
-        }
-        enumerator: "OUT_ALL_USB"
-        scalar_value: {
-            uint32_t: 24576
-        }
-        enumerator: "IN_COMMUNICATION"
-        scalar_value: {
-            uint32_t: 2147483649
-        }
-        enumerator: "IN_AMBIENT"
-        scalar_value: {
-            uint32_t: 2147483650
-        }
-        enumerator: "IN_BUILTIN_MIC"
-        scalar_value: {
-            uint32_t: 2147483652
-        }
-        enumerator: "IN_BLUETOOTH_SCO_HEADSET"
-        scalar_value: {
-            uint32_t: 2147483656
-        }
-        enumerator: "IN_WIRED_HEADSET"
-        scalar_value: {
-            uint32_t: 2147483664
-        }
-        enumerator: "IN_AUX_DIGITAL"
-        scalar_value: {
-            uint32_t: 2147483680
-        }
-        enumerator: "IN_HDMI"
-        scalar_value: {
-            uint32_t: 2147483680
-        }
-        enumerator: "IN_VOICE_CALL"
-        scalar_value: {
-            uint32_t: 2147483712
-        }
-        enumerator: "IN_TELEPHONY_RX"
-        scalar_value: {
-            uint32_t: 2147483712
-        }
-        enumerator: "IN_BACK_MIC"
-        scalar_value: {
-            uint32_t: 2147483776
-        }
-        enumerator: "IN_REMOTE_SUBMIX"
-        scalar_value: {
-            uint32_t: 2147483904
-        }
-        enumerator: "IN_ANLG_DOCK_HEADSET"
-        scalar_value: {
-            uint32_t: 2147484160
-        }
-        enumerator: "IN_DGTL_DOCK_HEADSET"
-        scalar_value: {
-            uint32_t: 2147484672
-        }
-        enumerator: "IN_USB_ACCESSORY"
-        scalar_value: {
-            uint32_t: 2147485696
-        }
-        enumerator: "IN_USB_DEVICE"
-        scalar_value: {
-            uint32_t: 2147487744
-        }
-        enumerator: "IN_FM_TUNER"
-        scalar_value: {
-            uint32_t: 2147491840
-        }
-        enumerator: "IN_TV_TUNER"
-        scalar_value: {
-            uint32_t: 2147500032
-        }
-        enumerator: "IN_LINE"
-        scalar_value: {
-            uint32_t: 2147516416
-        }
-        enumerator: "IN_SPDIF"
-        scalar_value: {
-            uint32_t: 2147549184
-        }
-        enumerator: "IN_BLUETOOTH_A2DP"
-        scalar_value: {
-            uint32_t: 2147614720
-        }
-        enumerator: "IN_LOOPBACK"
-        scalar_value: {
-            uint32_t: 2147745792
-        }
-        enumerator: "IN_IP"
-        scalar_value: {
-            uint32_t: 2148007936
-        }
-        enumerator: "IN_BUS"
-        scalar_value: {
-            uint32_t: 2148532224
-        }
-        enumerator: "IN_PROXY"
-        scalar_value: {
-            uint32_t: 2164260864
-        }
-        enumerator: "IN_DEFAULT"
-        scalar_value: {
-            uint32_t: 3221225472
-        }
-        enumerator: "IN_ALL"
-        scalar_value: {
-            uint32_t: 3240099839
-        }
-        enumerator: "IN_ALL_SCO"
-        scalar_value: {
-            uint32_t: 2147483656
-        }
-        enumerator: "IN_ALL_USB"
-        scalar_value: {
-            uint32_t: 2147489792
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioOutputFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DIRECT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "PRIMARY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FAST"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "DEEP_BUFFER"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "COMPRESS_OFFLOAD"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "NON_BLOCKING"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "HW_AV_SYNC"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "TTS"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "RAW"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "SYNC"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "IEC958_NONAUDIO"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "DIRECT_PCM"
-        scalar_value: {
-            int32_t: 8192
-        }
-        enumerator: "MMAP_NOIRQ"
-        scalar_value: {
-            int32_t: 16384
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioInputFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "FAST"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "HW_HOTWORD"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "RAW"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "SYNC"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "MMAP_NOIRQ"
-        scalar_value: {
-            int32_t: 16
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioUsage"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "MEDIA"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "VOICE_COMMUNICATION"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "VOICE_COMMUNICATION_SIGNALLING"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ALARM"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NOTIFICATION"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "NOTIFICATION_TELEPHONY_RINGTONE"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "NOTIFICATION_COMMUNICATION_REQUEST"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "NOTIFICATION_COMMUNICATION_INSTANT"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "NOTIFICATION_COMMUNICATION_DELAYED"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "NOTIFICATION_EVENT"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "ASSISTANCE_ACCESSIBILITY"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "ASSISTANCE_NAVIGATION_GUIDANCE"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "ASSISTANCE_SONIFICATION"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "GAME"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "VIRTUAL_SOURCE"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "ASSISTANT"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "CNT"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "MAX"
-        scalar_value: {
-            int32_t: 16
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioOffloadInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sampleRateHz"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "channelMask"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
-    }
-    struct_value: {
-        name: "format"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
-    }
-    struct_value: {
-        name: "streamType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioStreamType"
-    }
-    struct_value: {
-        name: "bitRatePerSecond"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "durationMicroseconds"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "hasVideo"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "isStreaming"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "bitWidth"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "bufferSize"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "usage"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioUsage"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sampleRateHz"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "channelMask"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
-    }
-    struct_value: {
-        name: "format"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
-    }
-    struct_value: {
-        name: "offloadInfo"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioOffloadInfo"
-    }
-    struct_value: {
-        name: "frameCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioGainMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "JOINT"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "CHANNELS"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "RAMP"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioGain"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "mode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioGainMode"
-    }
-    struct_value: {
-        name: "channelMask"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
-    }
-    struct_value: {
-        name: "minValue"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "maxValue"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "defaultValue"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "stepValue"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "minRampMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxRampMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioGainConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "index"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "mode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioGainMode"
-    }
-    struct_value: {
-        name: "channelMask"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
-    }
-    struct_value: {
-        name: "values"
-        type: TYPE_ARRAY
-        vector_size: 32
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-    struct_value: {
-        name: "rampDurationMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortRole"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SOURCE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SINK"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DEVICE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "MIX"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SESSION"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortConfigDeviceExt"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "hwModule"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
-    }
-    struct_value: {
-        name: "address"
-        type: TYPE_ARRAY
-        vector_size: 32
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortConfigSessionExt"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "session"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortConfigMask"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SAMPLE_RATE"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "CHANNEL_MASK"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "FORMAT"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "GAIN"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "ALL"
-        scalar_value: {
-            uint32_t: 15
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortConfig"
-    type: TYPE_STRUCT
-    sub_struct: {
-        name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext"
-        type: TYPE_UNION
-        sub_union: {
-            name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt"
-            type: TYPE_STRUCT
-            sub_struct: {
-                name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt::UseCase"
-                type: TYPE_UNION
-                union_value: {
-                    name: "stream"
-                    type: TYPE_ENUM
-                    predefined_type: "::android::hardware::audio::common::V2_0::AudioStreamType"
-                }
-                union_value: {
-                    name: "source"
-                    type: TYPE_ENUM
-                    predefined_type: "::android::hardware::audio::common::V2_0::AudioSource"
-                }
-            }
-            struct_value: {
-                name: "hwModule"
-                type: TYPE_SCALAR
-                scalar_type: "int32_t"
-            }
-            struct_value: {
-                name: "ioHandle"
-                type: TYPE_SCALAR
-                scalar_type: "int32_t"
-            }
-            struct_value: {
-                name: "useCase"
-                type: TYPE_UNION
-                predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt::UseCase"
-            }
-        }
-        union_value: {
-            name: "device"
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigDeviceExt"
-        }
-        union_value: {
-            name: "mix"
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt"
-        }
-        union_value: {
-            name: "session"
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigSessionExt"
-        }
-    }
-    struct_value: {
-        name: "id"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "configMask"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigMask"
-    }
-    struct_value: {
-        name: "sampleRateHz"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "channelMask"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
-    }
-    struct_value: {
-        name: "format"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
-    }
-    struct_value: {
-        name: "gain"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioGainConfig"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortType"
-    }
-    struct_value: {
-        name: "role"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortRole"
-    }
-    struct_value: {
-        name: "ext"
-        type: TYPE_UNION
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortDeviceExt"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "hwModule"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
-    }
-    struct_value: {
-        name: "address"
-        type: TYPE_ARRAY
-        vector_size: 32
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioMixLatencyClass"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "LOW"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "NORMAL"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortMixExt"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "hwModule"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "ioHandle"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "latencyClass"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioMixLatencyClass"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPortSessionExt"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "session"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::AudioPort"
-    type: TYPE_STRUCT
-    sub_struct: {
-        name: "::android::hardware::audio::common::V2_0::AudioPort::Ext"
-        type: TYPE_UNION
-        union_value: {
-            name: "device"
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortDeviceExt"
-        }
-        union_value: {
-            name: "mix"
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortMixExt"
-        }
-        union_value: {
-            name: "session"
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortSessionExt"
-        }
-    }
-    struct_value: {
-        name: "id"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "role"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortRole"
-    }
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "sampleRates"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-    struct_value: {
-        name: "channelMasks"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
-        }
-    }
-    struct_value: {
-        name: "formats"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
-        }
-    }
-    struct_value: {
-        name: "gains"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::audio::common::V2_0::AudioGain"
-        }
-    }
-    struct_value: {
-        name: "activeConfig"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortType"
-    }
-    struct_value: {
-        name: "ext"
-        type: TYPE_UNION
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioPort::Ext"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::audio::common::V2_0::ThreadInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "pid"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "tid"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-}
-
diff --git a/audio/effect/2.0/default/Android.mk b/audio/effect/2.0/default/Android.mk
index 1541d41..bbcf298 100644
--- a/audio/effect/2.0/default/Android.mk
+++ b/audio/effect/2.0/default/Android.mk
@@ -29,7 +29,6 @@
     libhidlbase \
     libhidlmemory \
     libhidltransport \
-    libhwbinder \
     liblog \
     libutils \
     android.hardware.audio.common@2.0 \
diff --git a/audio/effect/2.0/vts/functional/Android.bp b/audio/effect/2.0/vts/functional/Android.bp
index b82d44a..1bc3f39 100644
--- a/audio/effect/2.0/vts/functional/Android.bp
+++ b/audio/effect/2.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "audio_effect_hidl_hal_test",
-    gtest: true,
-    srcs: ["audio_effect_hidl_hal_test.cpp"],
+    name: "VtsHalAudioEffectV2_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalAudioEffectV2_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.audio.effect@2.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/audio/effect/2.0/vts/functional/audio_effect_hidl_hal_test.cpp b/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp
similarity index 94%
rename from audio/effect/2.0/vts/functional/audio_effect_hidl_hal_test.cpp
rename to audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp
index 145d4c3..063243b 100644
--- a/audio/effect/2.0/vts/functional/audio_effect_hidl_hal_test.cpp
+++ b/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp
@@ -21,7 +21,7 @@
 #include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
 #include <android/hardware/audio/effect/2.0/types.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 using ::android::hardware::audio::common::V2_0::Uuid;
 using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
@@ -35,10 +35,10 @@
 using ::android::sp;
 
 // The main test class for Audio Effect HIDL HAL.
-class AudioEffectHidlTest : public ::testing::Test {
+class AudioEffectHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    effectsFactory = IEffectsFactory::getService("audio_effects_factory");
+    effectsFactory = ::testing::VtsHalHidlTargetTestBase::getService<IEffectsFactory>();
     ASSERT_NE(effectsFactory, nullptr);
   }
 
diff --git a/automotive/Android.bp b/automotive/Android.bp
index 1f39e88..9b24ded 100644
--- a/automotive/Android.bp
+++ b/automotive/Android.bp
@@ -1,5 +1,7 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
+    "evs/1.0",
+    "evs/1.0/default",
     "vehicle/2.0",
     "vehicle/2.1",
 ]
diff --git a/automotive/evs/1.0/Android.bp b/automotive/evs/1.0/Android.bp
new file mode 100644
index 0000000..042becd
--- /dev/null
+++ b/automotive/evs/1.0/Android.bp
@@ -0,0 +1,83 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.automotive.evs@1.0_hal",
+    srcs: [
+        "types.hal",
+        "IEvsCamera.hal",
+        "IEvsCameraStream.hal",
+        "IEvsDisplay.hal",
+        "IEvsEnumerator.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.automotive.evs@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
+    srcs: [
+        ":android.hardware.automotive.evs@1.0_hal",
+    ],
+    out: [
+        "android/hardware/automotive/evs/1.0/types.cpp",
+        "android/hardware/automotive/evs/1.0/EvsCameraAll.cpp",
+        "android/hardware/automotive/evs/1.0/EvsCameraStreamAll.cpp",
+        "android/hardware/automotive/evs/1.0/EvsDisplayAll.cpp",
+        "android/hardware/automotive/evs/1.0/EvsEnumeratorAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.automotive.evs@1.0_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
+    srcs: [
+        ":android.hardware.automotive.evs@1.0_hal",
+    ],
+    out: [
+        "android/hardware/automotive/evs/1.0/types.h",
+        "android/hardware/automotive/evs/1.0/IEvsCamera.h",
+        "android/hardware/automotive/evs/1.0/IHwEvsCamera.h",
+        "android/hardware/automotive/evs/1.0/BnHwEvsCamera.h",
+        "android/hardware/automotive/evs/1.0/BpHwEvsCamera.h",
+        "android/hardware/automotive/evs/1.0/BsEvsCamera.h",
+        "android/hardware/automotive/evs/1.0/IEvsCameraStream.h",
+        "android/hardware/automotive/evs/1.0/IHwEvsCameraStream.h",
+        "android/hardware/automotive/evs/1.0/BnHwEvsCameraStream.h",
+        "android/hardware/automotive/evs/1.0/BpHwEvsCameraStream.h",
+        "android/hardware/automotive/evs/1.0/BsEvsCameraStream.h",
+        "android/hardware/automotive/evs/1.0/IEvsDisplay.h",
+        "android/hardware/automotive/evs/1.0/IHwEvsDisplay.h",
+        "android/hardware/automotive/evs/1.0/BnHwEvsDisplay.h",
+        "android/hardware/automotive/evs/1.0/BpHwEvsDisplay.h",
+        "android/hardware/automotive/evs/1.0/BsEvsDisplay.h",
+        "android/hardware/automotive/evs/1.0/IEvsEnumerator.h",
+        "android/hardware/automotive/evs/1.0/IHwEvsEnumerator.h",
+        "android/hardware/automotive/evs/1.0/BnHwEvsEnumerator.h",
+        "android/hardware/automotive/evs/1.0/BpHwEvsEnumerator.h",
+        "android/hardware/automotive/evs/1.0/BsEvsEnumerator.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.automotive.evs@1.0",
+    generated_sources: ["android.hardware.automotive.evs@1.0_genc++"],
+    generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hidl.base@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/evs/1.0/IEvsCamera.hal b/automotive/evs/1.0/IEvsCamera.hal
similarity index 98%
rename from evs/1.0/IEvsCamera.hal
rename to automotive/evs/1.0/IEvsCamera.hal
index d0559d7..1b55d1f 100644
--- a/evs/1.0/IEvsCamera.hal
+++ b/automotive/evs/1.0/IEvsCamera.hal
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.evs@1.0;
+package android.hardware.automotive.evs@1.0;
 
 import types;
 import IEvsCameraStream;
diff --git a/evs/1.0/IEvsCameraStream.hal b/automotive/evs/1.0/IEvsCameraStream.hal
similarity index 96%
rename from evs/1.0/IEvsCameraStream.hal
rename to automotive/evs/1.0/IEvsCameraStream.hal
index fcd5717..4e743b2 100644
--- a/evs/1.0/IEvsCameraStream.hal
+++ b/automotive/evs/1.0/IEvsCameraStream.hal
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.evs@1.0;
+package android.hardware.automotive.evs@1.0;
 
 
 /**
diff --git a/evs/1.0/IEvsDisplay.hal b/automotive/evs/1.0/IEvsDisplay.hal
similarity index 98%
rename from evs/1.0/IEvsDisplay.hal
rename to automotive/evs/1.0/IEvsDisplay.hal
index 8352221..bbad428 100644
--- a/evs/1.0/IEvsDisplay.hal
+++ b/automotive/evs/1.0/IEvsDisplay.hal
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.evs@1.0;
+package android.hardware.automotive.evs@1.0;
 
 import types;
 
diff --git a/evs/1.0/IEvsEnumerator.hal b/automotive/evs/1.0/IEvsEnumerator.hal
similarity index 97%
rename from evs/1.0/IEvsEnumerator.hal
rename to automotive/evs/1.0/IEvsEnumerator.hal
index 3779866..334430b 100644
--- a/evs/1.0/IEvsEnumerator.hal
+++ b/automotive/evs/1.0/IEvsEnumerator.hal
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.evs@1.0;
+package android.hardware.automotive.evs@1.0;
 
 import types;
 import IEvsCamera;
diff --git a/evs/1.0/default/Android.bp b/automotive/evs/1.0/default/Android.bp
similarity index 66%
rename from evs/1.0/default/Android.bp
rename to automotive/evs/1.0/default/Android.bp
index 7be365a..8b214e3 100644
--- a/evs/1.0/default/Android.bp
+++ b/automotive/evs/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_binary {
-    name: "android.hardware.evs@1.0-service",
+    name: "android.hardware.automotive.evs@1.0-service",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: [
@@ -8,10 +9,10 @@
         "EvsEnumerator.cpp",
         "EvsDisplay.cpp"
     ],
-    init_rc: ["android.hardware.evs@1.0-service.rc"],
+    init_rc: ["android.hardware.automotive.evs@1.0-service.rc"],
 
     shared_libs: [
-        "android.hardware.evs@1.0",
+        "android.hardware.automotive.evs@1.0",
         "libui",
         "libbase",
         "libbinder",
@@ -19,7 +20,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libutils",
     ],
diff --git a/evs/1.0/default/EvsCamera.cpp b/automotive/evs/1.0/default/EvsCamera.cpp
similarity index 96%
rename from evs/1.0/default/EvsCamera.cpp
rename to automotive/evs/1.0/default/EvsCamera.cpp
index a539b23..c4436ee 100644
--- a/evs/1.0/default/EvsCamera.cpp
+++ b/automotive/evs/1.0/default/EvsCamera.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "android.hardware.evs@1.0-service"
+#define LOG_TAG "android.hardware.automotive.evs@1.0-service"
 
 #include "EvsCamera.h"
 
@@ -24,6 +24,7 @@
 
 namespace android {
 namespace hardware {
+namespace automotive {
 namespace evs {
 namespace V1_0 {
 namespace implementation {
@@ -42,9 +43,9 @@
 // As it stands, if the client dies suddenly, the buffer may be stranded.
 
 EvsCamera::EvsCamera(const char *id) :
-    mFramesAllowed(0),
-    mFramesInUse(0),
-    mStreamState(STOPPED) {
+        mFramesAllowed(0),
+        mFramesInUse(0),
+        mStreamState(STOPPED) {
 
     ALOGD("EvsCamera instantiated");
 
@@ -69,7 +70,8 @@
     mHeight = (mDescription.defaultVerResolution) ? mDescription.defaultVerResolution : 480;
 
     mFormat = HAL_PIXEL_FORMAT_RGBA_8888;
-    mUsage  = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE;
+    mUsage  = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE |
+              GRALLOC_USAGE_SW_READ_RARELY | GRALLOC_USAGE_SW_WRITE_RARELY;
 }
 
 
@@ -95,7 +97,7 @@
 }
 
 
-// Methods from ::android::hardware::evs::V1_0::IEvsCamera follow.
+// Methods from ::android::hardware::automotive::evs::V1_0::IEvsCamera follow.
 Return<void> EvsCamera::getId(getId_cb id_cb) {
     ALOGD("getId");
 
@@ -160,7 +162,7 @@
         if (buffer.memHandle == nullptr) {
             ALOGE("ignoring doneWithFrame called with null handle");
         } else if (buffer.bufferId >= mBuffers.size()) {
-            ALOGE("ignoring doneWithFrame called with invalid bufferId %d (max is %lu)",
+            ALOGE("ignoring doneWithFrame called with invalid bufferId %d (max is %zu)",
                   buffer.bufferId, mBuffers.size()-1);
         } else if (!mBuffers[buffer.bufferId].inUse) {
             ALOGE("ignoring doneWithFrame called on frame %d which is already free",
@@ -440,7 +442,7 @@
 }
 
 
-void EvsCamera::fillTestFrame(BufferDesc buff) {
+void EvsCamera::fillTestFrame(const BufferDesc& buff) {
     // Lock our output buffer for writing
     uint32_t *pixels = nullptr;
     GraphicBufferMapper &mapper = GraphicBufferMapper::get();
@@ -474,7 +476,8 @@
             pixels[col] = expectedPixel;
         }
         // Point to the next row
-        pixels = pixels + (buff.stride / sizeof(*pixels));
+        // NOTE:  stride retrieved from gralloc is in units of pixels
+        pixels = pixels + buff.stride;
     }
 
     // Release our output buffer
@@ -485,5 +488,6 @@
 } // namespace implementation
 } // namespace V1_0
 } // namespace evs
+} // namespace automotive
 } // namespace hardware
 } // namespace android
diff --git a/automotive/evs/1.0/default/EvsCamera.h b/automotive/evs/1.0/default/EvsCamera.h
new file mode 100644
index 0000000..ee91ca4
--- /dev/null
+++ b/automotive/evs/1.0/default/EvsCamera.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2016 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_AUTOMOTIVE_EVS_V1_0_EVSCAMERA_H
+#define ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSCAMERA_H
+
+#include <android/hardware/automotive/evs/1.0/types.h>
+#include <android/hardware/automotive/evs/1.0/IEvsCamera.h>
+#include <ui/GraphicBuffer.h>
+
+#include <thread>
+
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace evs {
+namespace V1_0 {
+namespace implementation {
+
+
+class EvsCamera : public IEvsCamera {
+public:
+    // Methods from ::android::hardware::automotive::evs::V1_0::IEvsCamera follow.
+    Return<void> getId(getId_cb id_cb) override;
+
+    Return <EvsResult> setMaxFramesInFlight(uint32_t bufferCount) override;
+
+    Return <EvsResult> startVideoStream(const ::android::sp<IEvsCameraStream>& stream) override;
+
+    Return<void> doneWithFrame(const BufferDesc& buffer) override;
+
+    Return<void> stopVideoStream() override;
+
+    Return <int32_t> getExtendedInfo(uint32_t opaqueIdentifier) override;
+
+    Return <EvsResult> setExtendedInfo(uint32_t opaqueIdentifier, int32_t opaqueValue) override;
+
+    // Implementation details
+    EvsCamera(const char* id);
+
+    virtual ~EvsCamera() override;
+
+    const CameraDesc& getDesc() { return mDescription; };
+
+    static const char kCameraName_Backup[];
+    static const char kCameraName_RightTurn[];
+
+private:
+    // These three functions are expected to be called while mAccessLock is held
+    bool setAvailableFrames_Locked(unsigned bufferCount);
+
+    unsigned increaseAvailableFrames_Locked(unsigned numToAdd);
+
+    unsigned decreaseAvailableFrames_Locked(unsigned numToRemove);
+
+    void generateFrames();
+
+    void fillTestFrame(const BufferDesc& buff);
+
+    CameraDesc mDescription = {};  // The properties of this camera
+
+    std::thread mCaptureThread;     // The thread we'll use to synthesize frames
+
+    uint32_t mWidth = 0;        // Horizontal pixel count in the buffers
+    uint32_t mHeight = 0;        // Vertical pixel count in the buffers
+    uint32_t mFormat = 0;        // Values from android_pixel_format_t [TODO: YUV?  Leave opaque?]
+    uint32_t mUsage = 0;        // Values from from Gralloc.h
+    uint32_t mStride = 0;        // Bytes per line in the buffers
+
+    sp <IEvsCameraStream> mStream = nullptr;  // The callback used to deliver each frame
+
+    struct BufferRecord {
+        buffer_handle_t handle;
+        bool inUse;
+
+        explicit BufferRecord(buffer_handle_t h) : handle(h), inUse(false) {};
+    };
+
+    std::vector <BufferRecord> mBuffers;           // Graphics buffers to transfer images
+    unsigned mFramesAllowed;     // How many buffers are we currently using
+    unsigned mFramesInUse;       // How many buffers are currently outstanding
+
+    enum StreamStateValues {
+        STOPPED,
+        RUNNING,
+        STOPPING,
+    };
+    StreamStateValues mStreamState;
+
+    // Syncrhonization necessary to deconflict mCaptureThread from the main service thread
+    std::mutex mAccessLock;
+};
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace evs
+} // namespace automotive
+} // namespace hardware
+} // namespace android
+
+#endif  // ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSCAMERA_H
diff --git a/evs/1.0/default/EvsDisplay.cpp b/automotive/evs/1.0/default/EvsDisplay.cpp
similarity index 95%
rename from evs/1.0/default/EvsDisplay.cpp
rename to automotive/evs/1.0/default/EvsDisplay.cpp
index 7208395..a1a76d0 100644
--- a/evs/1.0/default/EvsDisplay.cpp
+++ b/automotive/evs/1.0/default/EvsDisplay.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "android.hardware.evs@1.0-service"
+#define LOG_TAG "android.hardware.automotive.evs@1.0-service"
 
 #include "EvsDisplay.h"
 
@@ -24,6 +24,7 @@
 
 namespace android {
 namespace hardware {
+namespace automotive {
 namespace evs {
 namespace V1_0 {
 namespace implementation {
@@ -169,7 +170,7 @@
         mBuffer.memHandle = handle;
         mFrameBusy = false;
         ALOGD("Allocated new buffer %p with stride %u",
-              mBuffer.memHandle.getNativeHandle(), mStride);
+              mBuffer.memHandle.getNativeHandle(), mBuffer.stride);
     }
 
     // Do we have a frame available?
@@ -242,7 +243,7 @@
 
         // If we failed to lock the pixel buffer, we're about to crash, but log it first
         if (!pixels) {
-            ALOGE("Camera failed to gain access to image buffer for reading");
+            ALOGE("Display failed to gain access to image buffer for reading");
         }
 
         // Check the test pixels
@@ -263,7 +264,8 @@
                     continue;
                 }
                 // Walk across this row (we'll step rows below)
-                if (pixels[col] != expectedPixel) {
+                uint32_t receivedPixel = pixels[col];
+                if (receivedPixel != expectedPixel) {
                     ALOGE("Pixel check mismatch in frame buffer");
                     frameLooksGood = false;
                     break;
@@ -274,8 +276,8 @@
                 break;
             }
 
-            // Point to the next row
-            pixels = pixels + (mStride / sizeof(*pixels));
+            // Point to the next row (NOTE:  gralloc reports stride in units of pixels)
+            pixels = pixels + mBuffer.stride;
         }
 
         // Ensure we don't see the same buffer twice without it being rewritten
@@ -301,5 +303,6 @@
 } // namespace implementation
 } // namespace V1_0
 } // namespace evs
+} // namespace automotive
 } // namespace hardware
 } // namespace android
diff --git a/evs/1.0/default/EvsDisplay.h b/automotive/evs/1.0/default/EvsDisplay.h
similarity index 81%
rename from evs/1.0/default/EvsDisplay.h
rename to automotive/evs/1.0/default/EvsDisplay.h
index 6e0111e..fcf4a06 100644
--- a/evs/1.0/default/EvsDisplay.h
+++ b/automotive/evs/1.0/default/EvsDisplay.h
@@ -14,21 +14,22 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_EVS_V1_0_EVSDISPLAY_H
-#define ANDROID_HARDWARE_EVS_V1_0_EVSDISPLAY_H
+#ifndef ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSDISPLAY_H
+#define ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSDISPLAY_H
 
-#include <android/hardware/evs/1.0/IEvsDisplay.h>
+#include <android/hardware/automotive/evs/1.0/IEvsDisplay.h>
 #include <ui/GraphicBuffer.h>
 
 namespace android {
 namespace hardware {
+namespace automotive {
 namespace evs {
 namespace V1_0 {
 namespace implementation {
 
 class EvsDisplay : public IEvsDisplay {
 public:
-    // Methods from ::android::hardware::evs::V1_0::IEvsDisplay follow.
+    // Methods from ::android::hardware::automotive::evs::V1_0::IEvsDisplay follow.
     Return<void> getDisplayInfo(getDisplayInfo_cb _hidl_cb)  override;
     Return<EvsResult> setDisplayState(DisplayState state)  override;
     Return<DisplayState> getDisplayState()  override;
@@ -42,7 +43,6 @@
 private:
     DisplayDesc     mInfo           = {};
     BufferDesc      mBuffer         = {};       // A graphics buffer into which we'll store images
-    uint32_t        mStride         = 0;        // Bytes per line in the buffer
 
     bool            mFrameBusy      = false;    // A flag telling us our buffer is in use
     DisplayState    mRequestedState = DisplayState::NOT_VISIBLE;
@@ -53,7 +53,8 @@
 } // namespace implementation
 } // namespace V1_0
 } // namespace evs
+} // namespace automotive
 } // namespace hardware
 } // namespace android
 
-#endif  // ANDROID_HARDWARE_EVS_V1_0_EVSDISPLAY_H
+#endif  // ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSDISPLAY_H
diff --git a/evs/1.0/default/EvsEnumerator.cpp b/automotive/evs/1.0/default/EvsEnumerator.cpp
similarity index 96%
rename from evs/1.0/default/EvsEnumerator.cpp
rename to automotive/evs/1.0/default/EvsEnumerator.cpp
index 4bf77f3..e54f699 100644
--- a/evs/1.0/default/EvsEnumerator.cpp
+++ b/automotive/evs/1.0/default/EvsEnumerator.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "android.hardware.evs@1.0-service"
+#define LOG_TAG "android.hardware.automotive.evs@1.0-service"
 
 #include "EvsEnumerator.h"
 #include "EvsCamera.h"
@@ -22,6 +22,7 @@
 
 namespace android {
 namespace hardware {
+namespace automotive {
 namespace evs {
 namespace V1_0 {
 namespace implementation {
@@ -42,7 +43,7 @@
     mCameraList.emplace_back( new EvsCamera(EvsCamera::kCameraName_RightTurn), false );
 }
 
-// Methods from ::android::hardware::evs::V1_0::IEvsEnumerator follow.
+// Methods from ::android::hardware::automotive::evs::V1_0::IEvsEnumerator follow.
 Return<void> EvsEnumerator::getCameraList(getCameraList_cb _hidl_cb)  {
     ALOGD("getCameraList");
 
@@ -168,5 +169,6 @@
 } // namespace implementation
 } // namespace V1_0
 } // namespace evs
+} // namespace automotive
 } // namespace hardware
 } // namespace android
diff --git a/evs/1.0/default/EvsEnumerator.h b/automotive/evs/1.0/default/EvsEnumerator.h
similarity index 78%
rename from evs/1.0/default/EvsEnumerator.h
rename to automotive/evs/1.0/default/EvsEnumerator.h
index 0e719bd..3d6e264 100644
--- a/evs/1.0/default/EvsEnumerator.h
+++ b/automotive/evs/1.0/default/EvsEnumerator.h
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_EVS_V1_0_EVSCAMERAENUMERATOR_H
-#define ANDROID_HARDWARE_EVS_V1_0_EVSCAMERAENUMERATOR_H
+#ifndef ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSCAMERAENUMERATOR_H
+#define ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSCAMERAENUMERATOR_H
 
-#include <android/hardware/evs/1.0/IEvsEnumerator.h>
-#include <android/hardware/evs/1.0/IEvsCamera.h>
+#include <android/hardware/automotive/evs/1.0/IEvsEnumerator.h>
+#include <android/hardware/automotive/evs/1.0/IEvsCamera.h>
 
 #include <list>
 
@@ -26,13 +26,14 @@
 
 namespace android {
 namespace hardware {
+namespace automotive {
 namespace evs {
 namespace V1_0 {
 namespace implementation {
 
 class EvsEnumerator : public IEvsEnumerator {
 public:
-    // Methods from ::android::hardware::evs::V1_0::IEvsEnumerator follow.
+    // Methods from ::android::hardware::automotive::evs::V1_0::IEvsEnumerator follow.
     Return<void> getCameraList(getCameraList_cb _hidl_cb)  override;
     Return<sp<IEvsCamera>> openCamera(const hidl_string& cameraId) override;
     Return<void> closeCamera(const ::android::sp<IEvsCamera>& carCamera)  override;
@@ -57,7 +58,8 @@
 } // namespace implementation
 } // namespace V1_0
 } // namespace evs
+} // namespace automotive
 } // namespace hardware
 } // namespace android
 
-#endif  // ANDROID_HARDWARE_EVS_V1_0_EVSCAMERAENUMERATOR_H
+#endif  // ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_EVSCAMERAENUMERATOR_H
diff --git a/evs/1.0/default/ServiceNames.h b/automotive/evs/1.0/default/ServiceNames.h
similarity index 100%
rename from evs/1.0/default/ServiceNames.h
rename to automotive/evs/1.0/default/ServiceNames.h
diff --git a/automotive/evs/1.0/default/android.hardware.automotive.evs@1.0-service.rc b/automotive/evs/1.0/default/android.hardware.automotive.evs@1.0-service.rc
new file mode 100644
index 0000000..8957ecf
--- /dev/null
+++ b/automotive/evs/1.0/default/android.hardware.automotive.evs@1.0-service.rc
@@ -0,0 +1,4 @@
+service evs-hal-1-0 /vendor/bin/hw/android.hardware.automotive.evs@1.0-service
+    class hal
+    user cameraserver
+    group camera
diff --git a/evs/1.0/default/service.cpp b/automotive/evs/1.0/default/service.cpp
similarity index 87%
rename from evs/1.0/default/service.cpp
rename to automotive/evs/1.0/default/service.cpp
index 112c879..1b64e44 100644
--- a/evs/1.0/default/service.cpp
+++ b/automotive/evs/1.0/default/service.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "android.hardware.evs@1.0-service"
+#define LOG_TAG "android.hardware.automotive.evs@1.0-service"
 
 #include <unistd.h>
 
@@ -33,11 +33,11 @@
 using android::hardware::joinRpcThreadpool;
 
 // Generated HIDL files
-using android::hardware::evs::V1_0::IEvsEnumerator;
-using android::hardware::evs::V1_0::IEvsDisplay;
+using android::hardware::automotive::evs::V1_0::IEvsEnumerator;
+using android::hardware::automotive::evs::V1_0::IEvsDisplay;
 
 // The namespace in which all our implementation code lives
-using namespace android::hardware::evs::V1_0::implementation;
+using namespace android::hardware::automotive::evs::V1_0::implementation;
 using namespace android;
 
 
diff --git a/evs/1.0/types.hal b/automotive/evs/1.0/types.hal
similarity index 98%
rename from evs/1.0/types.hal
rename to automotive/evs/1.0/types.hal
index 6b580cf..661c2a9 100644
--- a/evs/1.0/types.hal
+++ b/automotive/evs/1.0/types.hal
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.evs@1.0;
+package android.hardware.automotive.evs@1.0;
 
 
 /*
diff --git a/automotive/vehicle/2.0/Android.mk b/automotive/vehicle/2.0/Android.mk
index c540027..d093017 100644
--- a/automotive/vehicle/2.0/Android.mk
+++ b/automotive/vehicle/2.0/Android.mk
@@ -17,177 +17,6 @@
 
 
 #
-# Build types.hal (CommonIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/CommonIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.CommonIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (CompressionIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/CompressionIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.CompressionIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelSystemStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/FuelSystemStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.FuelSystemStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/FuelType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.FuelType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (IgnitionMonitorKind)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/IgnitionMonitorKind.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.IgnitionMonitorKind
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2FloatSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FloatSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.Obd2FloatSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2IntegerSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2IntegerSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.Obd2IntegerSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SecondaryAirStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/SecondaryAirStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.SecondaryAirStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SparkIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/SparkIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.SparkIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build types.hal (StatusCode)
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java
@@ -1081,44 +910,6 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build types.hal (VmsMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.VmsMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsMessageType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.VmsMessageType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build types.hal (Wheel)
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Wheel.java
@@ -1198,177 +989,6 @@
 
 
 #
-# Build types.hal (CommonIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/CommonIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.CommonIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (CompressionIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/CompressionIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.CompressionIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelSystemStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/FuelSystemStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.FuelSystemStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/FuelType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.FuelType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (IgnitionMonitorKind)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/IgnitionMonitorKind.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.IgnitionMonitorKind
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2FloatSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FloatSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.Obd2FloatSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2IntegerSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2IntegerSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.Obd2IntegerSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SecondaryAirStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/SecondaryAirStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.SecondaryAirStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SparkIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/SparkIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.SparkIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build types.hal (StatusCode)
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java
@@ -2262,44 +1882,6 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build types.hal (VmsMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.VmsMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsMessageType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.automotive.vehicle@2.0::types.VmsMessageType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build types.hal (Wheel)
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Wheel.java
diff --git a/automotive/vehicle/2.0/default/Android.mk b/automotive/vehicle/2.0/default/Android.mk
index 324be51..4a010e9 100644
--- a/automotive/vehicle/2.0/default/Android.mk
+++ b/automotive/vehicle/2.0/default/Android.mk
@@ -23,7 +23,6 @@
 LOCAL_MODULE := $(vhal_v2_0)-manager-lib
 LOCAL_SRC_FILES := \
     common/src/AccessControlConfigParser.cpp \
-    common/src/Obd2SensorStore.cpp \
     common/src/SubscriptionManager.cpp \
     common/src/VehicleHalManager.cpp \
     common/src/VehicleObjectPool.cpp \
@@ -76,6 +75,8 @@
 LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
 LOCAL_SRC_FILES:= \
     impl/vhal_v2_0/DefaultVehicleHal.cpp \
+    impl/vhal_v2_0/PipeComm.cpp \
+    impl/vhal_v2_0/SocketComm.cpp
 
 LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/impl/vhal_v2_0
@@ -87,6 +88,7 @@
     $(vhal_v2_0)-manager-lib \
 
 LOCAL_SHARED_LIBRARIES := \
+    libbase \
     libbinder \
     libhidlbase \
     libhidltransport \
@@ -99,6 +101,8 @@
 LOCAL_STATIC_LIBRARIES := \
     $(vhal_v2_0)-libproto-native \
 
+LOCAL_CFLAGS += -Wall -Wextra -Werror
+
 include $(BUILD_STATIC_LIBRARY)
 
 
@@ -114,7 +118,7 @@
 
 LOCAL_SRC_FILES:= \
     tests/AccessControlConfigParser_test.cpp \
-    tests/Obd2SensorStore_test.cpp \
+    tests/RecurrentTimer_test.cpp \
     tests/SubscriptionManager_test.cpp \
     tests/VehicleHalManager_test.cpp \
     tests/VehicleObjectPool_test.cpp \
@@ -129,7 +133,7 @@
     libutils \
     $(vhal_v2_0) \
 
-LOCAL_CFLAGS += -Wall -Wextra
+LOCAL_CFLAGS += -Wall -Wextra -Werror
 LOCAL_MODULE_TAGS := tests
 
 include $(BUILD_NATIVE_TEST)
@@ -148,6 +152,7 @@
     VehicleService.cpp
 
 LOCAL_SHARED_LIBRARIES := \
+    libbase \
     libbinder \
     libhidlbase \
     libhidltransport \
@@ -162,4 +167,6 @@
     $(vhal_v2_0)-default-impl-lib \
     $(vhal_v2_0)-libproto-native \
 
+LOCAL_CFLAGS += -Wall -Wextra -Werror
+
 include $(BUILD_EXECUTABLE)
diff --git a/automotive/vehicle/2.0/default/VehicleService.cpp b/automotive/vehicle/2.0/default/VehicleService.cpp
index f88ce7b..95057cc 100644
--- a/automotive/vehicle/2.0/default/VehicleService.cpp
+++ b/automotive/vehicle/2.0/default/VehicleService.cpp
@@ -34,7 +34,7 @@
     configureRpcThreadpool(1, true /* callerWillJoin */);
 
     ALOGI("Registering as service...");
-    service->registerAsService("Vehicle");
+    service->registerAsService();
 
     ALOGI("Ready");
     joinRpcThreadpool();
diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/RecurrentTimer.h b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/RecurrentTimer.h
new file mode 100644
index 0000000..be25adc
--- /dev/null
+++ b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/RecurrentTimer.h
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ */
+
+#ifndef android_hardware_automotive_vehicle_V2_0_RecurrentTimer_H_
+#define android_hardware_automotive_vehicle_V2_0_RecurrentTimer_H_
+
+#include <atomic>
+#include <chrono>
+#include <condition_variable>
+#include <functional>
+#include <list>
+#include <mutex>
+#include <set>
+#include <thread>
+#include <unordered_map>
+
+/**
+ * This class allows to specify multiple time intervals to receive
+ * notifications. A single thread is used internally.
+ */
+class RecurrentTimer {
+private:
+    using Nanos = std::chrono::nanoseconds;
+    using Clock = std::chrono::steady_clock;
+    using TimePoint = std::chrono::time_point<Clock, Nanos>;
+public:
+    using Action = std::function<void(const std::vector<int32_t>& cookies)>;
+
+    RecurrentTimer(const Action& action) : mAction(action) {
+        mTimerThread = std::thread(&RecurrentTimer::loop, this, action);
+    }
+
+    virtual ~RecurrentTimer() {
+        stop();
+    }
+
+    /**
+     * Registers recurrent event for a given interval. Registred events are distinguished by
+     * cookies thus calling this method multiple times with the same cookie will override the
+     * interval provided before.
+     */
+    void registerRecurrentEvent(std::chrono::nanoseconds interval, int32_t cookie) {
+        TimePoint now = Clock::now();
+        // Align event time point among all intervals. Thus if we have two intervals 1ms and 2ms,
+        // during every second wake-up both intervals will be triggered.
+        TimePoint absoluteTime = now - Nanos(now.time_since_epoch().count() % interval.count());
+
+        {
+            std::lock_guard<std::mutex> g(mLock);
+            mCookieToEventsMap[cookie] = { interval, cookie, absoluteTime };
+        }
+        mCond.notify_one();
+    }
+
+    void unregisterRecurrentEvent(int32_t cookie) {
+        {
+            std::lock_guard<std::mutex> g(mLock);
+            mCookieToEventsMap.erase(cookie);
+        }
+        mCond.notify_one();
+    }
+
+
+private:
+
+    struct RecurrentEvent {
+        Nanos interval;
+        int32_t cookie;
+        TimePoint absoluteTime;  // Absolute time of the next event.
+
+        void updateNextEventTime(TimePoint now) {
+            // We want to move time to next event by adding some number of intervals (usually 1)
+            // to previous absoluteTime.
+            int intervalMultiplier = (now - absoluteTime) / interval;
+            if (intervalMultiplier <= 0) intervalMultiplier = 1;
+            absoluteTime += intervalMultiplier * interval;
+        }
+    };
+
+    void loop(const Action& action) {
+        static constexpr auto kInvalidTime = TimePoint(Nanos::max());
+
+        std::vector<int32_t> cookies;
+
+        while (!mStopRequested) {
+            auto now = Clock::now();
+            auto nextEventTime = kInvalidTime;
+            cookies.clear();
+
+            {
+                std::unique_lock<std::mutex> g(mLock);
+
+                for (auto&& it : mCookieToEventsMap) {
+                    RecurrentEvent& event = it.second;
+                    if (event.absoluteTime <= now) {
+                        event.updateNextEventTime(now);
+                        cookies.push_back(event.cookie);
+                    }
+
+                    if (nextEventTime > event.absoluteTime) {
+                        nextEventTime = event.absoluteTime;
+                    }
+                }
+            }
+
+            if (cookies.size() != 0) {
+                action(cookies);
+            }
+
+            std::unique_lock<std::mutex> g(mLock);
+            mCond.wait_until(g, nextEventTime);  // nextEventTime can be nanoseconds::max()
+        }
+    }
+
+    void stop() {
+        mStopRequested = true;
+        {
+            std::lock_guard<std::mutex> g(mLock);
+            mCookieToEventsMap.clear();
+        }
+        mCond.notify_one();
+        if (mTimerThread.joinable()) {
+            mTimerThread.join();
+        }
+    }
+private:
+    mutable std::mutex mLock;
+    std::thread mTimerThread;
+    std::condition_variable mCond;
+    std::atomic_bool mStopRequested { false };
+    Action mAction;
+    std::unordered_map<int32_t, RecurrentEvent> mCookieToEventsMap;
+};
+
+
+#endif  // android_hardware_automotive_vehicle_V2_0_RecurrentTimer_H
diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/SubscriptionManager.h b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/SubscriptionManager.h
index 6a12b77..a808c66 100644
--- a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/SubscriptionManager.h
+++ b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/SubscriptionManager.h
@@ -23,6 +23,7 @@
 #include <list>
 
 #include <android/log.h>
+#include <hidl/HidlSupport.h>
 #include <hwbinder/IPCThreadState.h>
 
 #include <android/hardware/automotive/vehicle/2.0/IVehicle.h>
@@ -50,10 +51,8 @@
     }
 
     void addOrUpdateSubscription(const SubscribeOptions &opts);
-
-    bool isSubscribed(int32_t propId,
-                      int32_t areaId,
-                      SubscribeFlags flags);
+    bool isSubscribed(int32_t propId, int32_t areaId, SubscribeFlags flags);
+    std::vector<int32_t> getSubscribedProperties() const;
 
 private:
     const sp<IVehicleCallback> mCallback;
@@ -85,15 +84,29 @@
 
 class SubscriptionManager {
 public:
-    virtual ~SubscriptionManager() {}
+    using OnPropertyUnsubscribed = std::function<void(int32_t)>;
+
+    /**
+     * Constructs SubscriptionManager
+     *
+     * @param onPropertyUnsubscribed - this callback function will be called when there are no
+     *                                    more client subscribed to particular property.
+     */
+    SubscriptionManager(const OnPropertyUnsubscribed& onPropertyUnsubscribed)
+            : mOnPropertyUnsubscribed(onPropertyUnsubscribed),
+                mCallbackDeathRecipient(new DeathRecipient(
+                    std::bind(&SubscriptionManager::onCallbackDead, this, std::placeholders::_1)))
+    {}
+
+    ~SubscriptionManager() = default;
 
     /**
      * Updates subscription. Returns the vector of properties subscription that
      * needs to be updated in VehicleHAL.
      */
-    std::list<SubscribeOptions> addOrUpdateSubscription(
-            const sp<IVehicleCallback>& callback,
-            const hidl_vec<SubscribeOptions>& optionList);
+    StatusCode addOrUpdateSubscription(const sp<IVehicleCallback>& callback,
+                                       const hidl_vec<SubscribeOptions>& optionList,
+                                       std::list<SubscribeOptions>* outUpdatedOptions);
 
     /**
      * Returns a list of IVehicleCallback -> list of VehiclePropValue ready for
@@ -103,30 +116,48 @@
             const std::vector<recyclable_ptr<VehiclePropValue>>& propValues,
             SubscribeFlags flags) const;
 
-    std::list<sp<HalClient>> getSubscribedClients(
-        int32_t propId, int32_t area, SubscribeFlags flags) const;
-
+    std::list<sp<HalClient>> getSubscribedClients(int32_t propId,
+                                                  int32_t area,
+                                                  SubscribeFlags flags) const;
     /**
-     * Returns true the client was unsubscribed successfully and there are
-     * no more clients subscribed to given propId.
+     * If there are no clients subscribed to given properties than callback function provided
+     * in the constructor will be called.
      */
-    bool unsubscribe(const sp<IVehicleCallback>& callback,
-                     int32_t propId);
+    void unsubscribe(const sp<IVehicleCallback>& callback, int32_t propId);
 private:
-    std::list<sp< HalClient>> getSubscribedClientsLocked(
-            int32_t propId, int32_t area, SubscribeFlags flags) const;
+    std::list<sp<HalClient>> getSubscribedClientsLocked(int32_t propId,
+                                                        int32_t area,
+                                                        SubscribeFlags flags) const;
 
-    bool updateHalEventSubscriptionLocked(const SubscribeOptions &opts,
-                                          SubscribeOptions *out);
+    bool updateHalEventSubscriptionLocked(const SubscribeOptions &opts, SubscribeOptions* out);
 
-    void addClientToPropMapLocked(int32_t propId,
-                                  const sp<HalClient> &client);
+    void addClientToPropMapLocked(int32_t propId, const sp<HalClient>& client);
 
-    sp<HalClientVector> getClientsForPropertyLocked(
-            int32_t propId) const;
+    sp<HalClientVector> getClientsForPropertyLocked(int32_t propId) const;
 
-    sp<HalClient> getOrCreateHalClientLocked(
-            const sp<IVehicleCallback> &callback);
+    sp<HalClient> getOrCreateHalClientLocked(const sp<IVehicleCallback> &callback);
+
+    void onCallbackDead(uint64_t cookie);
+
+private:
+    using OnClientDead = std::function<void(uint64_t)>;
+
+    class DeathRecipient : public hidl_death_recipient {
+    public:
+        DeathRecipient(const OnClientDead& onClientDead)
+            : mOnClientDead(onClientDead) {}
+        ~DeathRecipient() = default;
+
+        DeathRecipient(const DeathRecipient& ) = delete;
+        DeathRecipient& operator=(const DeathRecipient&) = delete;
+
+        void serviceDied(uint64_t cookie,
+                         const wp<::android::hidl::base::V1_0::IBase>& /* who */) override {
+            mOnClientDead(cookie);
+        }
+    private:
+        OnClientDead mOnClientDead;
+    };
 
 private:
     using MuxGuard = std::lock_guard<std::mutex>;
@@ -136,6 +167,9 @@
     std::map<sp<IVehicleCallback>, sp<HalClient>> mClients;
     std::map<int32_t, sp<HalClientVector>> mPropToClients;
     std::map<int32_t, SubscribeOptions> mHalEventSubscribeOptions;
+
+    OnPropertyUnsubscribed mOnPropertyUnsubscribed;
+    sp<DeathRecipient> mCallbackDeathRecipient;
 };
 
 
diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleHalManager.h b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleHalManager.h
index 4bff4d1..b8ab309 100644
--- a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleHalManager.h
+++ b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/VehicleHalManager.h
@@ -56,7 +56,9 @@
 class VehicleHalManager : public IVehicle {
 public:
     VehicleHalManager(VehicleHal* vehicleHal)
-        : mHal(vehicleHal) {
+        : mHal(vehicleHal),
+          mSubscriptionManager(std::bind(&VehicleHalManager::onAllClientsUnsubscribed,
+                                         this, std::placeholders::_1)) {
         init();
     }
 
@@ -105,6 +107,8 @@
                   int32_t propertyId,
                   VehiclePropertyAccess requiredAccess) const;
 
+    void onAllClientsUnsubscribed(int32_t propertyId);
+
     static bool isSubscribable(const VehiclePropConfig& config,
                                SubscribeFlags flags);
     static bool isSampleRateFixed(VehiclePropertyChangeMode mode);
diff --git a/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp b/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp
index f6f2758..4493a41 100644
--- a/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp
+++ b/automotive/vehicle/2.0/default/common/src/SubscriptionManager.cpp
@@ -19,6 +19,7 @@
 #include "SubscriptionManager.h"
 
 #include <cmath>
+#include <inttypes.h>
 
 #include <android/log.h>
 
@@ -58,6 +59,8 @@
 }
 
 void HalClient::addOrUpdateSubscription(const SubscribeOptions &opts)  {
+    ALOGI("%s opts.propId: 0x%x", __func__, opts.propId);
+
     auto it = mSubscriptions.find(opts.propId);
     if (it == mSubscriptions.end()) {
         mSubscriptions.emplace(opts.propId, opts);
@@ -84,17 +87,33 @@
     return res;
 }
 
-std::list<SubscribeOptions> SubscriptionManager::addOrUpdateSubscription(
+std::vector<int32_t> HalClient::getSubscribedProperties() const {
+    std::vector<int32_t> props;
+    for (const auto& subscription : mSubscriptions) {
+        ALOGI("%s propId: 0x%x, propId: 0x%x", __func__, subscription.first, subscription.second.propId);
+        props.push_back(subscription.first);
+    }
+    return props;
+}
+
+StatusCode SubscriptionManager::addOrUpdateSubscription(
         const sp<IVehicleCallback> &callback,
-        const hidl_vec<SubscribeOptions> &optionList) {
-    std::list<SubscribeOptions> updatedSubscriptions;
+        const hidl_vec<SubscribeOptions> &optionList,
+        std::list<SubscribeOptions>* outUpdatedSubscriptions) {
+    outUpdatedSubscriptions->clear();
 
     MuxGuard g(mLock);
 
+    ALOGI("SubscriptionManager::addOrUpdateSubscription, callback: %p", callback.get());
+
     const sp<HalClient>& client = getOrCreateHalClientLocked(callback);
+    if (client.get() == nullptr) {
+        return StatusCode::INTERNAL_ERROR;
+    }
 
     for (size_t i = 0; i < optionList.size(); i++) {
         const SubscribeOptions& opts = optionList[i];
+        ALOGI("SubscriptionManager::addOrUpdateSubscription, prop: 0x%x", opts.propId);
         client->addOrUpdateSubscription(opts);
 
         addClientToPropMapLocked(opts.propId, client);
@@ -102,12 +121,12 @@
         if (SubscribeFlags::HAL_EVENT & opts.flags) {
             SubscribeOptions updated;
             if (updateHalEventSubscriptionLocked(opts, &updated)) {
-                updatedSubscriptions.push_back(updated);
+                outUpdatedSubscriptions->push_back(updated);
             }
         }
     }
 
-    return updatedSubscriptions;
+    return StatusCode::OK;
 }
 
 std::list<HalClientValues> SubscriptionManager::distributeValuesToClients(
@@ -205,6 +224,14 @@
         const sp<IVehicleCallback>& callback) {
     auto it = mClients.find(callback);
     if (it == mClients.end()) {
+        uint64_t cookie = reinterpret_cast<uint64_t>(callback.get());
+        ALOGI("Creating new client and linking to death recipient, cookie: 0x%" PRIx64, cookie);
+        auto res = callback->linkToDeath(mCallbackDeathRecipient, cookie);
+        if (!res.isOk()) {  // Client is already dead?
+            ALOGW("%s failed to link to death, client %p, err: %s",
+                  __func__, callback.get(), res.description().c_str());
+            return nullptr;
+        }
         IPCThreadState* self = IPCThreadState::self();
         pid_t pid = self->getCallingPid();
         uid_t uid = self->getCallingUid();
@@ -216,7 +243,7 @@
     }
 }
 
-bool SubscriptionManager::unsubscribe(const sp<IVehicleCallback>& callback,
+void SubscriptionManager::unsubscribe(const sp<IVehicleCallback>& callback,
                                       int32_t propId) {
     MuxGuard g(mLock);
     auto propertyClients = getClientsForPropertyLocked(propId);
@@ -243,13 +270,39 @@
         }
 
         if (!isClientSubscribedToOtherProps) {
+            auto res = client->getCallback()->unlinkToDeath(mCallbackDeathRecipient);
+            if (!res.isOk()) {
+                ALOGW("%s failed to unlink to death, client: %p, err: %s",
+                      __func__, client->getCallback().get(), res.description().c_str());
+            }
             mClients.erase(clientIter);
         }
     }
 
-    return (propertyClients == nullptr || propertyClients->isEmpty())
-            ? mHalEventSubscribeOptions.erase(propId) == 1
-            : false;
+    if (propertyClients == nullptr || propertyClients->isEmpty()) {
+        mHalEventSubscribeOptions.erase(propId);
+        mOnPropertyUnsubscribed(propId);
+    }
+}
+
+void SubscriptionManager::onCallbackDead(uint64_t cookie) {
+    ALOGI("%s, cookie: 0x%" PRIx64, __func__, cookie);
+    IVehicleCallback* callback = reinterpret_cast<IVehicleCallback*>(cookie);
+
+    std::vector<int32_t> props;
+    {
+        MuxGuard g(mLock);
+        const auto& it = mClients.find(callback);
+        if (it == mClients.end()) {
+            return;  // Nothing to do here, client wasn't subscribed to any properties.
+        }
+        const auto& halClient = it->second;
+        props = halClient->getSubscribedProperties();
+    }
+
+    for (int32_t propId : props) {
+        unsubscribe(callback, propId);
+    }
 }
 
 
diff --git a/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp b/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp
index 3a5e504..8906f6e 100644
--- a/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp
+++ b/automotive/vehicle/2.0/default/common/src/VehicleHalManager.cpp
@@ -43,8 +43,7 @@
  */
 constexpr auto kMaxHidlVecOfVehiclPropValuePoolSize = 20;
 
-Return<void> VehicleHalManager::getAllPropConfigs(
-        getAllPropConfigs_cb _hidl_cb) {
+Return<void> VehicleHalManager::getAllPropConfigs(getAllPropConfigs_cb _hidl_cb) {
     ALOGI("getAllPropConfigs called");
     hidl_vec<VehiclePropConfig> hidlConfigs;
     auto& halConfig = mConfigIndex->getAllConfigs();
@@ -58,9 +57,8 @@
     return Void();
 }
 
-Return<void> VehicleHalManager::getPropConfigs(
-        const hidl_vec<int32_t> &properties,
-        getPropConfigs_cb _hidl_cb) {
+Return<void> VehicleHalManager::getPropConfigs(const hidl_vec<int32_t> &properties,
+                                               getPropConfigs_cb _hidl_cb) {
     std::vector<VehiclePropConfig> configs;
     for (size_t i = 0; i < properties.size(); i++) {
         auto prop = properties[i];
@@ -77,8 +75,7 @@
     return Void();
 }
 
-Return<void> VehicleHalManager::get(
-        const VehiclePropValue& requestedPropValue, get_cb _hidl_cb) {
+Return<void> VehicleHalManager::get(const VehiclePropValue& requestedPropValue, get_cb _hidl_cb) {
     const auto* config = getPropConfigOrNull(requestedPropValue.prop);
     if (config == nullptr) {
         ALOGE("Failed to get value: config not found, property: 0x%x",
@@ -119,9 +116,8 @@
     return Return<StatusCode>(status);
 }
 
-Return<StatusCode> VehicleHalManager::subscribe(
-        const sp<IVehicleCallback> &callback,
-        const hidl_vec<SubscribeOptions> &options) {
+Return<StatusCode> VehicleHalManager::subscribe(const sp<IVehicleCallback> &callback,
+                                                const hidl_vec<SubscribeOptions> &options) {
     hidl_vec<SubscribeOptions> verifiedOptions(options);
     auto caller = getCaller();
     for (size_t i = 0; i < verifiedOptions.size(); i++) {
@@ -135,6 +131,11 @@
             return StatusCode::INVALID_ARG;
         }
 
+        if (ops.flags == SubscribeFlags::UNDEFINED) {
+            ALOGE("Failed to subscribe: undefined flag in options provided");
+            return StatusCode::INVALID_ARG;
+        }
+
         if (!checkAcl(caller.uid, config->prop, VehiclePropertyAccess::READ)) {
             return StatusCode::ACCESS_DENIED;
         }
@@ -157,22 +158,24 @@
         ops.sampleRate = checkSampleRate(*config, ops.sampleRate);
     }
 
-    std::list<SubscribeOptions> updatedOptions =
-        mSubscriptionManager.addOrUpdateSubscription(callback, verifiedOptions);
+    std::list<SubscribeOptions> updatedOptions;
+    auto res = mSubscriptionManager.addOrUpdateSubscription(callback, verifiedOptions,
+                                                            &updatedOptions);
+    if (StatusCode::OK != res) {
+        ALOGW("%s failed to subscribe, error code: %d", __func__, res);
+        return res;
+    }
 
     for (auto opt : updatedOptions) {
         mHal->subscribe(opt.propId, opt.vehicleAreas, opt.sampleRate);
     }
-    // TODO(pavelm): link to death callback (not implemented yet in HIDL)
 
     return StatusCode::OK;
 }
 
-Return<StatusCode> VehicleHalManager::unsubscribe(
-        const sp<IVehicleCallback>& callback, int32_t propId) {
-    if (mSubscriptionManager.unsubscribe(callback, propId)) {
-        mHal->unsubscribe(propId);
-    }
+Return<StatusCode> VehicleHalManager::unsubscribe(const sp<IVehicleCallback>& callback,
+                                                  int32_t propId) {
+    mSubscriptionManager.unsubscribe(callback, propId);
     return StatusCode::OK;
 }
 
@@ -239,8 +242,7 @@
     }
 }
 
-void VehicleHalManager::onBatchHalEvent(
-        const std::vector<VehiclePropValuePtr>& values) {
+void VehicleHalManager::onBatchHalEvent(const std::vector<VehiclePropValuePtr>& values) {
     const auto& clientValues = mSubscriptionManager.distributeValuesToClients(
             values, SubscribeFlags::HAL_EVENT);
 
@@ -257,7 +259,12 @@
         for (VehiclePropValue* pValue : cv.values) {
             shallowCopy(&(vec)[i++], *pValue);
         }
-        cv.client->getCallback()->onPropertyEvent(vec);
+        auto status = cv.client->getCallback()->onPropertyEvent(vec);
+        if (!status.isOk()) {
+            ALOGE("Failed to notify client %s, err: %s",
+                  toString(cv.client->getCallback()).c_str(),
+                  status.description().c_str());
+        }
     }
 }
 
@@ -379,6 +386,10 @@
     }
 }
 
+void VehicleHalManager::onAllClientsUnsubscribed(int32_t propertyId) {
+    mHal->unsubscribe(propertyId);
+}
+
 }  // namespace V2_0
 }  // namespace vehicle
 }  // namespace automotive
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/CommBase.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/CommBase.h
new file mode 100644
index 0000000..6832ad3
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/CommBase.h
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+#ifndef android_hardware_automotive_vehicle_V2_0_impl_CommBase_H_
+#define android_hardware_automotive_vehicle_V2_0_impl_CommBase_H_
+
+#include <string>
+#include <vector>
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace vehicle {
+namespace V2_0 {
+
+namespace impl {
+
+/**
+ * This is the communications base class.  It defines the interface used in DefaultVehicleHal to
+ * send and receive data to and from the emulator.
+ */
+class CommBase {
+public:
+    virtual ~CommBase() = default;
+
+    /**
+     * Closes a connection if it is open.
+     */
+    virtual void stop() {}
+
+    /**
+     * Creates a connection to the other side.
+     *
+     * @return int Returns fd or socket number if connection is successful.
+     *              Otherwise, returns -1 if no connection is availble.
+     */
+    virtual int connect() { return 0; }
+
+    /**
+     * Opens the communications channel.
+     *
+     * @return int Returns 0 if channel is opened, else -errno if failed.
+     */
+    virtual int open() = 0;
+
+    /**
+     * Blocking call to read data from the connection.
+     *
+     * @return std::vector<uint8_t> Serialized protobuf data received from emulator.  This will be
+     *              an empty vector if the connection was closed or some other error occurred.
+     */
+    virtual std::vector<uint8_t> read() = 0;
+
+    /**
+     * Transmits a string of data to the emulator.
+     *
+     * @param data Serialized protobuf data to transmit.
+     *
+     * @return int Number of bytes transmitted, or -1 if failed.
+     */
+    virtual int write(const std::vector<uint8_t>& data) = 0;
+};
+
+}  // impl
+
+}  // namespace V2_0
+}  // namespace vehicle
+}  // namespace automotive
+}  // namespace hardware
+}  // namespace android
+
+
+#endif  // android_hardware_automotive_vehicle_V2_0_impl_CommBase_H_
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
index ec08a43..95ca37b 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
@@ -28,6 +28,11 @@
 
 namespace impl {
 
+const VehicleProperty kHvacPowerProperties[] = {
+    VehicleProperty::HVAC_FAN_SPEED,
+    VehicleProperty::HVAC_FAN_DIRECTION,
+};
+
 const VehiclePropConfig kVehicleProperties[] = {
     {
         .prop = toInt(VehicleProperty::INFO_MAKE),
@@ -36,10 +41,37 @@
     },
 
     {
+        .prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED),
+        .access = VehiclePropertyAccess::READ,
+        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+    },
+
+    {
+        .prop = toInt(VehicleProperty::CURRENT_GEAR),
+        .access = VehiclePropertyAccess::READ,
+        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+    },
+
+    {
+        .prop = toInt(VehicleProperty::PARKING_BRAKE_ON),
+        .access = VehiclePropertyAccess::READ,
+        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+    },
+
+    {
+        .prop = toInt(VehicleProperty::FUEL_LEVEL_LOW),
+        .access = VehiclePropertyAccess::READ,
+        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+    },
+
+    {
         .prop = toInt(VehicleProperty::HVAC_POWER_ON),
         .access = VehiclePropertyAccess::READ_WRITE,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
-        .supportedAreas = toInt(VehicleAreaZone::ROW_1)
+        .supportedAreas = toInt(VehicleAreaZone::ROW_1),
+        // TODO(bryaneyler): Ideally, this is generated dynamically from
+        // kHvacPowerProperties.
+        .configString = "0x12400500,0x12400501"  // HVAC_FAN_SPEED,HVAC_FAN_DIRECTION
     },
 
     {
@@ -115,6 +147,15 @@
     },
 
     {
+        .prop = toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE),
+        .access = VehiclePropertyAccess::READ,
+        // TODO(bryaneyler): Support ON_CHANGE as well.
+        .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
+        .minSampleRate = 1.0f,
+        .maxSampleRate = 2.0f,
+    },
+
+    {
         .prop = toInt(VehicleProperty::NIGHT_MODE),
         .access = VehiclePropertyAccess::READ,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
@@ -135,13 +176,7 @@
     {
         .prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY),
         .access = VehiclePropertyAccess::READ,
-        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
-        .areaConfigs = {
-            VehicleAreaConfig {
-                .minFloatValue = 0,
-                .maxFloatValue = 1.0
-            }
-        }
+        .changeMode = VehiclePropertyChangeMode::STATIC,
     },
 
     {
@@ -163,29 +198,11 @@
     },
 
     {
-        .prop = toInt(VehicleProperty::OBD2_LIVE_FRAME),
+        .prop = toInt(VehicleProperty::ENGINE_OIL_TEMP),
         .access = VehiclePropertyAccess::READ,
-        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
-        .configArray = {0,0}
-    },
-
-    {
-        .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME),
-        .access = VehiclePropertyAccess::READ,
-        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
-        .configArray = {0,0}
-    },
-
-    {
-        .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME_INFO),
-        .access = VehiclePropertyAccess::READ,
-        .changeMode = VehiclePropertyChangeMode::ON_CHANGE
-    },
-
-    {
-        .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME_CLEAR),
-        .access = VehiclePropertyAccess::WRITE,
-        .changeMode = VehiclePropertyChangeMode::ON_CHANGE
+        .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
+        .minSampleRate = 0.1, // 0.1 Hz, every 10 seconds
+        .maxSampleRate = 10,  // 10 Hz, every 100 ms
     }
 };
 
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
index d3d77b6..808aafb 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
@@ -14,18 +14,18 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "DefaultVehicleHal"
+#define LOG_TAG "DefaultVehicleHal_v2_0"
 #include <android/log.h>
 
 #include <algorithm>
-#include <netinet/in.h>
-#include <sys/socket.h>
+#include <android-base/properties.h>
+#include <cstdio>
 
 #include "DefaultVehicleHal.h"
+#include "PipeComm.h"
+#include "SocketComm.h"
 #include "VehicleHalProto.pb.h"
 
-#define DEBUG_SOCKET    (33452)
-
 namespace android {
 namespace hardware {
 namespace automotive {
@@ -102,9 +102,9 @@
     {
         std::lock_guard<std::mutex> lock(mPropsMutex);
 
-        for (auto& propVal : mProps) {
+        for (auto& prop : mProps) {
             emulator::VehiclePropValue* protoVal = respMsg.add_value();
-            populateProtoVehiclePropValue(protoVal, propVal.get());
+            populateProtoVehiclePropValue(protoVal, prop.second.get());
         }
     }
 }
@@ -118,6 +118,7 @@
 
     val.prop = protoVal.prop();
     val.areaId = protoVal.area_id();
+    val.timestamp = elapsedRealtimeNano();
 
     // Copy value data if it is set.  This automatically handles complex data types if needed.
     if (protoVal.has_string_value()) {
@@ -172,155 +173,46 @@
         areaId = 0;
     }
 
-    for (auto& prop : mProps) {
-        if ((prop->prop == propId) && (prop->areaId == areaId)) {
-            return prop.get();
-        }
+    auto prop = mProps.find(std::make_pair(propId, areaId));
+    if (prop != mProps.end()) {
+        return prop->second.get();
     }
-    ALOGW("%s: Property not found:  propId = 0x%x, areaId = 0x%x", __FUNCTION__, propId, areaId);
+    ALOGW("%s: Property not found:  propId = 0x%x, areaId = 0x%x", __func__, propId, areaId);
     return nullptr;
 }
 
-static std::unique_ptr<Obd2SensorStore> fillDefaultObd2Frame(
-        size_t numVendorIntegerSensors,
-        size_t numVendorFloatSensors) {
-    std::unique_ptr<Obd2SensorStore> sensorStore(new Obd2SensorStore(
-            numVendorIntegerSensors, numVendorFloatSensors));
-
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::FUEL_SYSTEM_STATUS,
-        toInt(FuelSystemStatus::CLOSED_LOOP));
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::MALFUNCTION_INDICATOR_LIGHT_ON, 0);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::IGNITION_MONITORS_SUPPORTED,
-        toInt(IgnitionMonitorKind::SPARK));
-    sensorStore->setIntegerSensor(Obd2IntegerSensorIndex::IGNITION_SPECIFIC_MONITORS,
-        CommonIgnitionMonitors::COMPONENTS_AVAILABLE |
-        CommonIgnitionMonitors::MISFIRE_AVAILABLE |
-        SparkIgnitionMonitors::AC_REFRIGERANT_AVAILABLE |
-        SparkIgnitionMonitors::EVAPORATIVE_SYSTEM_AVAILABLE);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::INTAKE_AIR_TEMPERATURE, 35);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::COMMANDED_SECONDARY_AIR_STATUS,
-        toInt(SecondaryAirStatus::FROM_OUTSIDE_OR_OFF));
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::NUM_OXYGEN_SENSORS_PRESENT, 1);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::RUNTIME_SINCE_ENGINE_START, 500);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON, 0);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::WARMUPS_SINCE_CODES_CLEARED, 51);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::DISTANCE_TRAVELED_SINCE_CODES_CLEARED, 365);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE, 30);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::CONTROL_MODULE_VOLTAGE, 12);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::AMBIENT_AIR_TEMPERATURE, 18);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::MAX_FUEL_AIR_EQUIVALENCE_RATIO, 1);
-    sensorStore->setIntegerSensor(
-        Obd2IntegerSensorIndex::FUEL_TYPE, toInt(FuelType::GASOLINE));
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::CALCULATED_ENGINE_LOAD, 0.153);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK1, -0.16);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK1, -0.16);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK2, -0.16);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK2, -0.16);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::INTAKE_MANIFOLD_ABSOLUTE_PRESSURE, 7.5);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::ENGINE_RPM, 1250.);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::VEHICLE_SPEED, 40.);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::TIMING_ADVANCE, 2.5);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::THROTTLE_POSITION, 19.75);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::OXYGEN_SENSOR1_VOLTAGE, 0.265);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::FUEL_TANK_LEVEL_INPUT, 0.824);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::EVAPORATION_SYSTEM_VAPOR_PRESSURE, -0.373);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::CATALYST_TEMPERATURE_BANK1_SENSOR1, 190.);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::RELATIVE_THROTTLE_POSITION, 3.);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::ABSOLUTE_THROTTLE_POSITION_B, 0.306);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::ACCELERATOR_PEDAL_POSITION_D, 0.188);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::ACCELERATOR_PEDAL_POSITION_E, 0.094);
-    sensorStore->setFloatSensor(
-        Obd2FloatSensorIndex::COMMANDED_THROTTLE_ACTUATOR, 0.024);
-
-    return sensorStore;
-}
-
-void DefaultVehicleHal::initObd2LiveFrame(VehiclePropConfig& propConfig) {
-    auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
-            propConfig.configArray[1]);
-    mLiveObd2Frame = createVehiclePropValue(VehiclePropertyType::COMPLEX, 0);
-    sensorStore->fillPropValue(mLiveObd2Frame.get(), "");
-}
-
-void DefaultVehicleHal::initObd2FreezeFrame(VehiclePropConfig& propConfig) {
-    auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
-            propConfig.configArray[1]);
-
-    mFreezeObd2Frames.push_back(
-            createVehiclePropValue(VehiclePropertyType::COMPLEX,0));
-    mFreezeObd2Frames.push_back(
-            createVehiclePropValue(VehiclePropertyType::COMPLEX,0));
-    mFreezeObd2Frames.push_back(
-            createVehiclePropValue(VehiclePropertyType::COMPLEX,0));
-
-    sensorStore->fillPropValue(mFreezeObd2Frames[0].get(), "P0070");
-    sensorStore->fillPropValue(mFreezeObd2Frames[1].get(), "P0102");
-    sensorStore->fillPropValue(mFreezeObd2Frames[2].get(), "P0123");
-}
-
 void DefaultVehicleHal::parseRxProtoBuf(std::vector<uint8_t>& msg) {
     emulator::EmulatorMessage rxMsg;
     emulator::EmulatorMessage respMsg;
-    std::string str(reinterpret_cast<const char*>(msg.data()), msg.size());
 
-    rxMsg.ParseFromString(str);
+    if (rxMsg.ParseFromArray(msg.data(), msg.size())) {
+        switch (rxMsg.msg_type()) {
+        case emulator::GET_CONFIG_CMD:
+            doGetConfig(rxMsg, respMsg);
+            break;
+        case emulator::GET_CONFIG_ALL_CMD:
+            doGetConfigAll(rxMsg, respMsg);
+            break;
+        case emulator::GET_PROPERTY_CMD:
+            doGetProperty(rxMsg, respMsg);
+            break;
+        case emulator::GET_PROPERTY_ALL_CMD:
+            doGetPropertyAll(rxMsg, respMsg);
+            break;
+        case emulator::SET_PROPERTY_CMD:
+            doSetProperty(rxMsg, respMsg);
+            break;
+        default:
+            ALOGW("%s: Unknown message received, type = %d", __func__, rxMsg.msg_type());
+            respMsg.set_status(emulator::ERROR_UNIMPLEMENTED_CMD);
+            break;
+        }
 
-    switch (rxMsg.msg_type()) {
-    case emulator::GET_CONFIG_CMD:
-        doGetConfig(rxMsg, respMsg);
-        break;
-    case emulator::GET_CONFIG_ALL_CMD:
-        doGetConfigAll(rxMsg, respMsg);
-        break;
-    case emulator::GET_PROPERTY_CMD:
-        doGetProperty(rxMsg, respMsg);
-        break;
-    case emulator::GET_PROPERTY_ALL_CMD:
-        doGetPropertyAll(rxMsg, respMsg);
-        break;
-    case emulator::SET_PROPERTY_CMD:
-        doSetProperty(rxMsg, respMsg);
-        break;
-    default:
-        ALOGW("%s: Unknown message received, type = %d", __FUNCTION__, rxMsg.msg_type());
-        respMsg.set_status(emulator::ERROR_UNIMPLEMENTED_CMD);
-        break;
+        // Send the reply
+        txMsg(respMsg);
+    } else {
+        ALOGE("%s: ParseFromString() failed. msgSize=%d", __func__, static_cast<int>(msg.size()));
     }
-
-    // Send the reply
-    txMsg(respMsg);
 }
 
 // Copies internal VehiclePropConfig data structure to protobuf VehiclePropConfig
@@ -375,7 +267,7 @@
         }
         break;
     default:
-        ALOGW("%s: Unknown property type:  0x%x", __FUNCTION__, toInt(getPropType(cfg.prop)));
+        ALOGW("%s: Unknown property type:  0x%x", __func__, toInt(getPropType(cfg.prop)));
         break;
     }
 
@@ -415,94 +307,50 @@
     }
 }
 
-void DefaultVehicleHal::rxMsg(void) {
+void DefaultVehicleHal::rxMsg() {
     int  numBytes = 0;
-    int32_t msgSize;
-    do {
-        // This is a variable length message.
-        // Read the number of bytes to rx over the socket
-        numBytes = read(mCurSocket, &msgSize, sizeof(msgSize));
 
-        if (numBytes != sizeof(msgSize)) {
-            // This happens when connection is closed
-            ALOGD("%s: numBytes=%d, expected=4", __FUNCTION__, numBytes);
-            break;
-        }
+    while (mExit == 0) {
+        std::vector<uint8_t> msg = mComm->read();
 
-        std::vector<uint8_t> msg = std::vector<uint8_t>(msgSize);
-
-        numBytes = read(mCurSocket, msg.data(), msgSize);
-
-        if ((numBytes == msgSize) && (msgSize > 0)) {
+        if (msg.size() > 0) {
             // Received a message.
             parseRxProtoBuf(msg);
         } else {
             // This happens when connection is closed
-            ALOGD("%s: numBytes=%d, msgSize=%d", __FUNCTION__, numBytes, msgSize);
+            ALOGD("%s: numBytes=%d, msgSize=%d", __func__, numBytes,
+                  static_cast<int32_t>(msg.size()));
             break;
         }
-    } while (mExit == 0);
+    }
 }
 
-void DefaultVehicleHal::rxThread(void) {
-    // Initialize the socket
-    {
-        int retVal;
-        struct sockaddr_in servAddr;
+void DefaultVehicleHal::rxThread() {
+    bool isEmulator = android::base::GetBoolProperty("ro.kernel.qemu", false);
 
-        mSocket = socket(AF_INET, SOCK_STREAM, 0);
-        if (mSocket < 0) {
-            ALOGE("%s: socket() failed, mSocket=%d, errno=%d", __FUNCTION__, mSocket, errno);
-            mSocket = -1;
-            return;
-        }
-
-        bzero(&servAddr, sizeof(servAddr));
-        servAddr.sin_family = AF_INET;
-        servAddr.sin_addr.s_addr = INADDR_ANY;
-        servAddr.sin_port = htons(DEBUG_SOCKET);
-
-        retVal = bind(mSocket, reinterpret_cast<struct sockaddr*>(&servAddr), sizeof(servAddr));
-        if(retVal < 0) {
-            ALOGE("%s: Error on binding: retVal=%d, errno=%d", __FUNCTION__, retVal, errno);
-            close(mSocket);
-            mSocket = -1;
-            return;
-        }
-
-        listen(mSocket, 1);
-
-        // Set the socket to be non-blocking so we can poll it continouously
-        fcntl(mSocket, F_SETFL, O_NONBLOCK);
+    if (isEmulator) {
+        // Initialize pipe to Emulator
+        mComm.reset(new PipeComm);
+    } else {
+        // Initialize socket over ADB
+        mComm.reset(new SocketComm);
     }
 
-    while (mExit == 0) {
-        struct sockaddr_in cliAddr;
-        socklen_t cliLen = sizeof(cliAddr);
-        int cSocket = accept(mSocket, reinterpret_cast<struct sockaddr*>(&cliAddr), &cliLen);
+    int retVal = mComm->open();
 
-        if (cSocket >= 0) {
-            {
-                std::lock_guard<std::mutex> lock(mTxMutex);
-                mCurSocket = cSocket;
+    if (retVal == 0) {
+        // Comms are properly opened
+        while (mExit == 0) {
+            retVal = mComm->connect();
+
+            if (retVal >= 0) {
+                rxMsg();
             }
-            ALOGD("%s: Incoming connection received on socket %d", __FUNCTION__, cSocket);
-            rxMsg();
-            ALOGD("%s: Connection terminated on socket %d", __FUNCTION__, cSocket);
-            {
-                std::lock_guard<std::mutex> lock(mTxMutex);
-                mCurSocket = -1;
-            }
+
+            // Check every 100ms for a new connection
+            std::this_thread::sleep_for(std::chrono::milliseconds(100));
         }
-
-        // TODO:  Use a blocking socket?
-        // Check every 100ms for a new socket connection
-        std::this_thread::sleep_for(std::chrono::milliseconds(100));
     }
-
-    // Shutdown the socket
-    close(mSocket);
-    mSocket = -1;
 }
 
 // This function sets the default value of a property if we are interested in setting it.
@@ -513,6 +361,18 @@
     case toInt(VehicleProperty::INFO_MAKE):
         prop->value.stringValue = "Default Car";
         break;
+    case toInt(VehicleProperty::PERF_VEHICLE_SPEED):
+        prop->value.floatValues[0] = 0;
+        break;
+    case toInt(VehicleProperty::CURRENT_GEAR):
+        prop->value.int32Values[0] = toInt(VehicleGear::GEAR_PARK);
+        break;
+    case toInt(VehicleProperty::PARKING_BRAKE_ON):
+        prop->value.int32Values[0] = 1;
+        break;
+    case toInt(VehicleProperty::FUEL_LEVEL_LOW):
+        prop->value.int32Values[0] = 0;
+        break;
     case toInt(VehicleProperty::HVAC_POWER_ON):
         prop->value.int32Values[0] = 1;
         break;
@@ -537,6 +397,9 @@
     case toInt(VehicleProperty::HVAC_TEMPERATURE_SET):
         prop->value.floatValues[0] = 16;
         break;
+    case toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE):
+        prop->value.floatValues[0] = 25;
+        break;
     case toInt(VehicleProperty::NIGHT_MODE):
         prop->value.int32Values[0] = 0;
         break;
@@ -547,7 +410,10 @@
         prop->value.int32Values[0] = toInt(VehicleGear::GEAR_PARK);
         break;
     case toInt(VehicleProperty::INFO_FUEL_CAPACITY):
-        prop->value.floatValues[0] = 0.75f;
+        prop->value.floatValues[0] = 123000.0f;  // In milliliters
+        break;
+    case toInt(VehicleProperty::ENGINE_OIL_TEMP):
+        prop->value.floatValues[0] = 101;
         break;
     case toInt(VehicleProperty::DISPLAY_BRIGHTNESS):
         prop->value.int32Values[0] = 7;
@@ -555,42 +421,30 @@
     case toInt(VehicleProperty::IGNITION_STATE):
         prop->value.int32Values[0] = toInt(VehicleIgnitionState::ON);
         break;
-    case toInt(VehicleProperty::OBD2_LIVE_FRAME):
-        // OBD2 is handled separately
-        break;
-    case toInt(VehicleProperty::OBD2_FREEZE_FRAME):
-        // OBD2 is handled separately
-        break;
     default:
-        ALOGW("%s: propId=0x%x not found", __FUNCTION__, prop->prop);
+        ALOGW("%s: propId=0x%x not found", __func__, prop->prop);
         break;
     }
 }
 
 // Transmit a reply back to the emulator
 void DefaultVehicleHal::txMsg(emulator::EmulatorMessage& txMsg) {
-    std::string msgString;
+    int numBytes = txMsg.ByteSize();
+    std::vector<uint8_t> msg(numBytes);
 
-    if (txMsg.SerializeToString(&msgString)) {
-        int32_t msgLen = msgString.length();
+    if (txMsg.SerializeToArray(msg.data(), msg.size())) {
         int retVal = 0;
 
-        // TODO:  Prepend the message length to the string without a copy
-        msgString.insert(0, reinterpret_cast<char*>(&msgLen), 4);
-
         // Send the message
-        {
-            std::lock_guard<std::mutex> lock(mTxMutex);
-            if (mCurSocket != -1) {
-                retVal = write(mCurSocket, msgString.data(), msgString.size());
-            }
+        if (mExit == 0) {
+            mComm->write(msg);
         }
 
         if (retVal < 0) {
-            ALOGE("%s: Failed to tx message: retval=%d, errno=%d", __FUNCTION__, retVal, errno);
+            ALOGE("%s: Failed to tx message: retval=%d, errno=%d", __func__, retVal, errno);
         }
     } else {
-        ALOGE("%s: SerializeToString failed!", __FUNCTION__);
+        ALOGE("%s: SerializeToString failed!", __func__);
     }
 }
 
@@ -606,7 +460,7 @@
         VehiclePropValue* internalPropValue = getVehiclePropValueLocked(propId, areaId);
         if (internalPropValue != nullptr) {
             internalPropValue->value = propValue.value;
-            internalPropValue->timestamp = elapsedRealtimeNano();
+            internalPropValue->timestamp = propValue.timestamp;
             status = StatusCode::OK;
         }
     }
@@ -622,18 +476,6 @@
     VehiclePropValuePtr v = nullptr;
 
     switch (propId) {
-    case toInt(VehicleProperty::OBD2_LIVE_FRAME):
-        v = pool.obtainComplex();
-        status = fillObd2LiveFrame(v.get());
-        break;
-    case toInt(VehicleProperty::OBD2_FREEZE_FRAME):
-        v = pool.obtainComplex();
-        status = fillObd2FreezeFrame(requestedPropValue, v.get());
-        break;
-    case toInt(VehicleProperty::OBD2_FREEZE_FRAME_INFO):
-        v = pool.obtainComplex();
-        status = fillObd2DtcInfo(v.get());
-        break;
     default:
         {
             std::lock_guard<std::mutex> lock(mPropsMutex);
@@ -660,10 +502,19 @@
     auto propId = propValue.prop;
     StatusCode status;
     switch (propId) {
-        case toInt(VehicleProperty::OBD2_FREEZE_FRAME_CLEAR):
-            status = clearObd2FreezeFrames(propValue);
-            break;
         default:
+            if (mHvacPowerProps.find(VehicleProperty(propId)) !=
+                    mHvacPowerProps.end()) {
+                auto prop = mProps.find(
+                    std::make_pair(toInt(VehicleProperty::HVAC_POWER_ON), 0));
+                if (prop != mProps.end()) {
+                    if (prop->second->value.int32Values.size() == 1 &&
+                        prop->second->value.int32Values[0] == 0) {
+                        status = StatusCode::NOT_AVAILABLE;
+                        break;
+                    }
+                }
+            }
             status = updateProperty(propValue);
             if (status == StatusCode::OK) {
                 // Send property update to emulator
@@ -683,9 +534,11 @@
 // Parse supported properties list and generate vector of property values to hold current values.
 void DefaultVehicleHal::onCreate() {
     // Initialize member variables
-    mCurSocket = -1;
     mExit = 0;
-    mSocket = -1;
+
+    for (auto& prop : kHvacPowerProperties) {
+        mHvacPowerProps.insert(prop);
+    }
 
     // Get the list of configurations supported by this HAL
     std::vector<VehiclePropConfig> configs = listProperties();
@@ -715,21 +568,13 @@
             break;
         case VehiclePropertyType::COMPLEX:
             switch (cfg.prop) {
-            case toInt(VehicleProperty::OBD2_LIVE_FRAME):
-                initObd2LiveFrame(cfg);
-                break;
-            case toInt(VehicleProperty::OBD2_FREEZE_FRAME):
-                initObd2FreezeFrame(cfg);
-                break;
             default:
                 // Need to handle each complex property separately
                 break;
             }
             continue;
-            break;
-        case VehiclePropertyType::MASK:
         default:
-            ALOGW("%s: propType=0x%x not found", __FUNCTION__, propType);
+            ALOGE("%s: propType=0x%x not found", __func__, propType);
             vecSize = 0;
             break;
         }
@@ -754,7 +599,7 @@
             prop->areaId = curArea;
             prop->prop = cfg.prop;
             setDefaultValue(prop.get());
-            mProps.push_back(std::move(prop));
+            mProps[std::make_pair(prop->prop, prop->areaId)] = std::move(prop);
         } while (supportedAreas != 0);
     }
 
@@ -762,78 +607,68 @@
     mThread = std::thread(&DefaultVehicleHal::rxThread, this);
 }
 
-StatusCode DefaultVehicleHal::fillObd2LiveFrame(VehiclePropValue* v) {
-    v->prop = toInt(VehicleProperty::OBD2_LIVE_FRAME);
-    v->value.int32Values = mLiveObd2Frame->value.int32Values;
-    v->value.floatValues = mLiveObd2Frame->value.floatValues;
-    v->value.bytes = mLiveObd2Frame->value.bytes;
-    return StatusCode::OK;
-}
+void DefaultVehicleHal::onContinuousPropertyTimer(const std::vector<int32_t>& properties) {
+    VehiclePropValuePtr v;
 
-template<typename Iterable>
-typename Iterable::const_iterator findPropValueAtTimestamp(
-        const Iterable& frames,
-        int64_t timestamp) {
-    return std::find_if(frames.begin(),
-            frames.end(),
-            [timestamp] (const std::unique_ptr<VehiclePropValue>&
-                         propValue) -> bool {
-                             return propValue->timestamp == timestamp;
-            });
-}
+    auto& pool = *getValuePool();
 
-StatusCode DefaultVehicleHal::fillObd2FreezeFrame(
-        const VehiclePropValue& requestedPropValue, VehiclePropValue* v) {
-    if (requestedPropValue.value.int64Values.size() != 1) {
-        ALOGE("asked for OBD2_FREEZE_FRAME without valid timestamp");
-        return StatusCode::INVALID_ARG;
-    }
-    auto timestamp = requestedPropValue.value.int64Values[0];
-    auto freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
-            timestamp);
-    if(mFreezeObd2Frames.end() == freezeFrameIter) {
-        ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
-        return StatusCode::INVALID_ARG;
-    }
-    const std::unique_ptr<VehiclePropValue>& freezeFrame = *freezeFrameIter;
-    v->prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME);
-    v->value.int32Values = freezeFrame->value.int32Values;
-    v->value.floatValues = freezeFrame->value.floatValues;
-    v->value.bytes = freezeFrame->value.bytes;
-    v->value.stringValue = freezeFrame->value.stringValue;
-    v->timestamp = freezeFrame->timestamp;
-    return StatusCode::OK;
-}
+    for (int32_t property : properties) {
+        if (isContinuousProperty(property)) {
+            // In real implementation this value should be read from sensor, random
+            // value used for testing purpose only.
+            std::lock_guard<std::mutex> lock(mPropsMutex);
 
-StatusCode DefaultVehicleHal::clearObd2FreezeFrames(
-    const VehiclePropValue& propValue) {
-    if (propValue.value.int64Values.size() == 0) {
-        mFreezeObd2Frames.clear();
-        return StatusCode::OK;
-    } else {
-        for(int64_t timestamp: propValue.value.int64Values) {
-            auto freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
-                    timestamp);
-            if(mFreezeObd2Frames.end() == freezeFrameIter) {
-                ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
-                return StatusCode::INVALID_ARG;
+            VehiclePropValue *internalPropValue = getVehiclePropValueLocked(property);
+            if (internalPropValue != nullptr) {
+                v = pool.obtain(*internalPropValue);
             }
-            mFreezeObd2Frames.erase(freezeFrameIter);
+            if (VehiclePropertyType::FLOAT == getPropType(property)) {
+                // Just get some randomness to continuous properties to see slightly differnt values
+                // on the other end.
+                v->value.floatValues[0] = v->value.floatValues[0] + std::rand() % 5;
+            }
+        } else {
+            ALOGE("Unexpected onContinuousPropertyTimer for property: 0x%x", property);
+        }
+
+        if (v.get()) {
+            v->timestamp = elapsedRealtimeNano();
+            doHalEvent(std::move(v));
         }
     }
-    return StatusCode::OK;
 }
 
-StatusCode DefaultVehicleHal::fillObd2DtcInfo(VehiclePropValue* v) {
-    std::vector<int64_t> timestamps;
-    for(const auto& freezeFrame: mFreezeObd2Frames) {
-        timestamps.push_back(freezeFrame->timestamp);
+StatusCode DefaultVehicleHal::subscribe(int32_t property, int32_t,
+                                        float sampleRate) {
+    ALOGI("subscribe called for property: 0x%x, sampleRate: %f", property, sampleRate);
+
+    if (isContinuousProperty(property)) {
+        mRecurrentTimer.registerRecurrentEvent(hertzToNanoseconds(sampleRate), property);
     }
-    v->value.int64Values = timestamps;
     return StatusCode::OK;
 }
 
+StatusCode DefaultVehicleHal::unsubscribe(int32_t property) {
+    ALOGI("%s propId: 0x%x", __func__, property);
+    if (isContinuousProperty(property)) {
+        mRecurrentTimer.unregisterRecurrentEvent(property);
+    }
+    return StatusCode::OK;
+}
 
+const VehiclePropConfig* DefaultVehicleHal::getPropConfig(int32_t propId) const {
+    auto it = mPropConfigMap.find(propId);
+    return it == mPropConfigMap.end() ? nullptr : it->second;
+}
+
+bool DefaultVehicleHal::isContinuousProperty(int32_t propId) const {
+    const VehiclePropConfig* config = getPropConfig(propId);
+    if (config == nullptr) {
+        ALOGW("Config not found for property: 0x%x", propId);
+        return false;
+    }
+    return config->changeMode == VehiclePropertyChangeMode::CONTINUOUS;
+}
 
 }  // impl
 
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h
index 51f7ba3..98eef27 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h
@@ -17,14 +17,19 @@
 #ifndef android_hardware_automotive_vehicle_V2_0_impl_DefaultVehicleHal_H_
 #define android_hardware_automotive_vehicle_V2_0_impl_DefaultVehicleHal_H_
 
+#include <map>
 #include <memory>
 #include <sys/socket.h>
 #include <thread>
+#include <unordered_set>
 
 #include <utils/SystemClock.h>
 
+#include "CommBase.h"
+#include "VehicleHalProto.pb.h"
+
+#include <vhal_v2_0/RecurrentTimer.h>
 #include <vhal_v2_0/VehicleHal.h>
-#include <vhal_v2_0/Obd2SensorStore.h>
 
 #include "DefaultConfig.h"
 #include "VehicleHalProto.pb.h"
@@ -39,19 +44,19 @@
 
 class DefaultVehicleHal : public VehicleHal {
 public:
-    DefaultVehicleHal() : mThread() {}
+    DefaultVehicleHal() : mRecurrentTimer(
+            std::bind(&DefaultVehicleHal::onContinuousPropertyTimer, this, std::placeholders::_1)) {
+        for (size_t i = 0; i < arraysize(kVehicleProperties); i++) {
+            mPropConfigMap[kVehicleProperties->prop] = &kVehicleProperties[i];
+        }
+    }
+
     ~DefaultVehicleHal() override {
         // Notify thread to finish and wait for it to terminate
         mExit = 1;
 
         // Close emulator socket if it is open
-        {
-            std::lock_guard<std::mutex> lock(mTxMutex);
-            if (mCurSocket != -1) {
-                close(mCurSocket);
-                mCurSocket = -1;
-            }
-        }
+        mComm->stop();
 
         mThread.join();
     }
@@ -68,16 +73,9 @@
 
     StatusCode set(const VehiclePropValue& propValue) override;
 
-    StatusCode subscribe(int32_t property, int32_t areas, float sampleRate) {
-        ALOGD("%s: not implemented: prop=0x%x, areas=0x%x, rate=%f", __FUNCTION__, property,
-              areas, sampleRate);
-        return StatusCode::OK;
-    }
+    StatusCode subscribe(int32_t property, int32_t areas, float sampleRate) override;
 
-    StatusCode unsubscribe(int32_t property) {
-        ALOGD("%s: not implemented: prop=0x%x", __FUNCTION__, property);
-        return StatusCode::OK;
-    }
+    StatusCode unsubscribe(int32_t property) override;
 
 private:
     void doGetConfig(emulator::EmulatorMessage& rxMsg, emulator::EmulatorMessage& respMsg);
@@ -85,35 +83,37 @@
     void doGetProperty(emulator::EmulatorMessage& rxMsg, emulator::EmulatorMessage& respMsg);
     void doGetPropertyAll(emulator::EmulatorMessage& rxMsg, emulator::EmulatorMessage& respMsg);
     void doSetProperty(emulator::EmulatorMessage& rxMsg, emulator::EmulatorMessage& respMsg);
-    VehiclePropValue* getVehiclePropValueLocked(int32_t propId, int32_t areaId);
-    void initObd2LiveFrame(VehiclePropConfig& propConfig);
-    void initObd2FreezeFrame(VehiclePropConfig& propConfig);
+    VehiclePropValue* getVehiclePropValueLocked(int32_t propId, int32_t areaId = 0);
+    const VehiclePropConfig* getPropConfig(int32_t propId) const;
+    bool isContinuousProperty(int32_t propId) const;
     void parseRxProtoBuf(std::vector<uint8_t>& msg);
     void populateProtoVehicleConfig(emulator::VehiclePropConfig* protoCfg,
                                     const VehiclePropConfig& cfg);
     void populateProtoVehiclePropValue(emulator::VehiclePropValue* protoVal,
                                        const VehiclePropValue* val);
     void setDefaultValue(VehiclePropValue* prop);
-    void rxMsg(void);
-    void rxThread(void);
+    void rxMsg();
+    void rxThread();
     void txMsg(emulator::EmulatorMessage& txMsg);
     StatusCode updateProperty(const VehiclePropValue& propValue);
-    StatusCode fillObd2LiveFrame(VehiclePropValue* v);
-    StatusCode fillObd2FreezeFrame(const VehiclePropValue& requestedPropValue,
-            VehiclePropValue* v);
-    StatusCode fillObd2DtcInfo(VehiclePropValue *v);
-    StatusCode clearObd2FreezeFrames(const VehiclePropValue& propValue);
+
+    constexpr std::chrono::nanoseconds hertzToNanoseconds(float hz) const {
+        return std::chrono::nanoseconds(static_cast<int64_t>(1000000000L / hz));
+    }
+
+    void onContinuousPropertyTimer(const std::vector<int32_t>& properties);
+
 private:
-    // TODO:  Use a hashtable to support indexing props
-    std::vector<std::unique_ptr<VehiclePropValue>> mProps;
-    std::atomic<int> mCurSocket;
+    std::map<
+        std::pair<int32_t /*VehicleProperty*/, int32_t /*areaId*/>,
+        std::unique_ptr<VehiclePropValue>> mProps;
     std::atomic<int> mExit;
-    std::unique_ptr<VehiclePropValue> mLiveObd2Frame {nullptr};
-    std::vector<std::unique_ptr<VehiclePropValue>> mFreezeObd2Frames;
+    std::unordered_set<VehicleProperty> mHvacPowerProps;
     std::mutex mPropsMutex;
-    int mSocket;
-    std::mutex mTxMutex;
     std::thread mThread;
+    std::unique_ptr<CommBase> mComm{nullptr};
+    RecurrentTimer mRecurrentTimer;
+    std::unordered_map<int32_t, const VehiclePropConfig*> mPropConfigMap;
 };
 
 }  // impl
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/PipeComm.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/PipeComm.cpp
new file mode 100644
index 0000000..6f219fa
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/PipeComm.cpp
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "PipeComm"
+
+#include <android/hardware/automotive/vehicle/2.0/IVehicle.h>
+#include <android/log.h>
+#include <system/qemu_pipe.h>
+
+#include "PipeComm.h"
+
+#define CAR_SERVICE_NAME "pipe:qemud:car"
+
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace vehicle {
+namespace V2_0 {
+
+namespace impl {
+
+PipeComm::PipeComm() {
+    // Initialize member vars
+    mPipeFd = -1;
+}
+
+
+int PipeComm::open() {
+    int fd = qemu_pipe_open(CAR_SERVICE_NAME);
+
+    if (fd < 0) {
+        ALOGE("%s: Could not open connection to service: %s %d", __FUNCTION__, strerror(errno), fd);
+        return -errno;
+    }
+
+    ALOGI("%s: OPENED PIPE, fd=%d", __FUNCTION__, fd);
+    mPipeFd = fd;
+    return 0;
+}
+
+std::vector<uint8_t> PipeComm::read() {
+    static constexpr int MAX_RX_MSG_SZ = 2048;
+    std::vector<uint8_t> msg = std::vector<uint8_t>(MAX_RX_MSG_SZ);
+    int numBytes;
+
+    numBytes = qemu_pipe_frame_recv(mPipeFd, msg.data(), msg.size());
+
+    if (numBytes == MAX_RX_MSG_SZ) {
+        ALOGE("%s:  Received max size = %d", __FUNCTION__, MAX_RX_MSG_SZ);
+    } else if (numBytes > 0) {
+        msg.resize(numBytes);
+        return msg;
+    } else {
+        ALOGD("%s: Connection terminated on pipe %d, numBytes=%d", __FUNCTION__, mPipeFd, numBytes);
+        {
+            std::lock_guard<std::mutex> lock(mMutex);
+            mPipeFd = -1;
+        }
+    }
+
+    return std::vector<uint8_t>();
+}
+
+int PipeComm::write(const std::vector<uint8_t>& data) {
+    int retVal = 0;
+
+    {
+        std::lock_guard<std::mutex> lock(mMutex);
+        if (mPipeFd != -1) {
+            retVal = qemu_pipe_frame_send(mPipeFd, data.data(), data.size());
+        }
+    }
+
+    if (retVal < 0) {
+        retVal = -errno;
+        ALOGE("%s:  send_cmd: (fd=%d): ERROR: %s", __FUNCTION__, mPipeFd, strerror(errno));
+    }
+
+    return retVal;
+}
+
+
+}  // impl
+
+}  // namespace V2_0
+}  // namespace vehicle
+}  // namespace automotive
+}  // namespace hardware
+}  // namespace android
+
+
+
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/PipeComm.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/PipeComm.h
new file mode 100644
index 0000000..bcd32d0
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/PipeComm.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef android_hardware_automotive_vehicle_V2_0_impl_PipeComm_H_
+#define android_hardware_automotive_vehicle_V2_0_impl_PipeComm_H_
+
+#include <mutex>
+#include <vector>
+#include "CommBase.h"
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace vehicle {
+namespace V2_0 {
+
+namespace impl {
+
+/**
+ * PipeComm uses a qemu pipe interface to connect to the Goldfish Emulator.
+ */
+class PipeComm : public CommBase {
+public:
+    PipeComm();
+
+    /**
+     * Opens a pipe and begins listening.
+     *
+     * @return int Returns 0 on success.
+     */
+    int open() override;
+
+    /**
+     * Blocking call to read data from the connection.
+     *
+     * @return std::vector<uint8_t> Serialized protobuf data received from emulator.  This will be
+     *              an empty vector if the connection was closed or some other error occurred.
+     */
+    std::vector<uint8_t> read() override;
+
+    /**
+     * Transmits a string of data to the emulator.
+     *
+     * @param data Serialized protobuf data to transmit.
+     *
+     * @return int Number of bytes transmitted, or -1 if failed.
+     */
+    int write(const std::vector<uint8_t>& data) override;
+
+private:
+    std::mutex mMutex;
+    int mPipeFd;
+};
+
+}  // impl
+
+}  // namespace V2_0
+}  // namespace vehicle
+}  // namespace automotive
+}  // namespace hardware
+}  // namespace android
+
+
+#endif  // android_hardware_automotive_vehicle_V2_0_impl_PipeComm_H_
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/SocketComm.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/SocketComm.cpp
new file mode 100644
index 0000000..a3ef4b1
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/SocketComm.cpp
@@ -0,0 +1,190 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "SocketComm"
+
+#include <android/hardware/automotive/vehicle/2.0/IVehicle.h>
+#include <android/log.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+#include "SocketComm.h"
+
+// Socket to use when communicating with Host PC
+static constexpr int DEBUG_SOCKET = 33452;
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace vehicle {
+namespace V2_0 {
+
+namespace impl {
+
+SocketComm::SocketComm() {
+    // Initialize member vars
+    mCurSockFd = -1;
+    mExit      =  0;
+    mSockFd    = -1;
+}
+
+
+SocketComm::~SocketComm() {
+    stop();
+}
+
+int SocketComm::connect() {
+    sockaddr_in cliAddr;
+    socklen_t cliLen = sizeof(cliAddr);
+    int cSockFd = accept(mSockFd, reinterpret_cast<struct sockaddr*>(&cliAddr), &cliLen);
+
+    if (cSockFd >= 0) {
+        {
+            std::lock_guard<std::mutex> lock(mMutex);
+            mCurSockFd = cSockFd;
+        }
+        ALOGD("%s: Incoming connection received on socket %d", __FUNCTION__, cSockFd);
+    } else {
+        cSockFd = -1;
+    }
+
+    return cSockFd;
+}
+
+int SocketComm::open() {
+    int retVal;
+    struct sockaddr_in servAddr;
+
+    mSockFd = socket(AF_INET, SOCK_STREAM, 0);
+    if (mSockFd < 0) {
+        ALOGE("%s: socket() failed, mSockFd=%d, errno=%d", __FUNCTION__, mSockFd, errno);
+        mSockFd = -1;
+        return -errno;
+    }
+
+    memset(&servAddr, 0, sizeof(servAddr));
+    servAddr.sin_family = AF_INET;
+    servAddr.sin_addr.s_addr = INADDR_ANY;
+    servAddr.sin_port = htons(DEBUG_SOCKET);
+
+    retVal = bind(mSockFd, reinterpret_cast<struct sockaddr*>(&servAddr), sizeof(servAddr));
+    if(retVal < 0) {
+        ALOGE("%s: Error on binding: retVal=%d, errno=%d", __FUNCTION__, retVal, errno);
+        close(mSockFd);
+        mSockFd = -1;
+        return -errno;
+    }
+
+    listen(mSockFd, 1);
+
+    // Set the socket to be non-blocking so we can poll it continouously
+    fcntl(mSockFd, F_SETFL, O_NONBLOCK);
+
+    return 0;
+}
+
+std::vector<uint8_t> SocketComm::read() {
+    int32_t msgSize;
+    int numBytes = 0;
+
+    // This is a variable length message.
+    // Read the number of bytes to rx over the socket
+    numBytes = ::read(mCurSockFd, &msgSize, sizeof(msgSize));
+    msgSize = ntohl(msgSize);
+
+    if (numBytes != sizeof(msgSize)) {
+        // This happens when connection is closed
+        ALOGD("%s: numBytes=%d, expected=4", __FUNCTION__, numBytes);
+        ALOGD("%s: Connection terminated on socket %d", __FUNCTION__, mCurSockFd);
+        {
+            std::lock_guard<std::mutex> lock(mMutex);
+            mCurSockFd = -1;
+        }
+
+        return std::vector<uint8_t>();
+    }
+
+    std::vector<uint8_t> msg = std::vector<uint8_t>(msgSize);
+
+    numBytes = ::read(mCurSockFd, msg.data(), msgSize);
+
+    if ((numBytes == msgSize) && (msgSize > 0)) {
+        // Received a message.
+        return msg;
+    } else {
+        // This happens when connection is closed
+        ALOGD("%s: numBytes=%d, msgSize=%d", __FUNCTION__, numBytes, msgSize);
+        ALOGD("%s: Connection terminated on socket %d", __FUNCTION__, mCurSockFd);
+        {
+            std::lock_guard<std::mutex> lock(mMutex);
+            mCurSockFd = -1;
+        }
+
+        return std::vector<uint8_t>();
+    }
+}
+
+void SocketComm::stop() {
+    if (mExit == 0) {
+        std::lock_guard<std::mutex> lock(mMutex);
+        mExit = 1;
+
+        // Close emulator socket if it is open
+        if (mCurSockFd != -1) {
+            close(mCurSockFd);
+            mCurSockFd = -1;
+        }
+
+        if (mSockFd != -1) {
+            close(mSockFd);
+            mSockFd = -1;
+        }
+    }
+}
+
+int SocketComm::write(const std::vector<uint8_t>& data) {
+    static constexpr int MSG_HEADER_LEN = 4;
+    int retVal = 0;
+    union {
+        uint32_t msgLen;
+        uint8_t msgLenBytes[MSG_HEADER_LEN];
+    };
+
+    // Prepare header for the message
+    msgLen = static_cast<uint32_t>(data.size());
+    msgLen = htonl(msgLen);
+
+    std::lock_guard<std::mutex> lock(mMutex);
+    if (mCurSockFd != -1) {
+        retVal = ::write(mCurSockFd, msgLenBytes, MSG_HEADER_LEN);
+
+        if (retVal == MSG_HEADER_LEN) {
+            retVal = ::write(mCurSockFd, data.data(), data.size());
+        }
+    }
+
+    return retVal;
+}
+
+
+}  // impl
+
+}  // namespace V2_0
+}  // namespace vehicle
+}  // namespace automotive
+}  // namespace hardware
+}  // namespace android
+
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/SocketComm.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/SocketComm.h
new file mode 100644
index 0000000..12cfb29
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/SocketComm.h
@@ -0,0 +1,94 @@
+/*
+ * 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.
+ */
+
+#ifndef android_hardware_automotive_vehicle_V2_0_impl_SocketComm_H_
+#define android_hardware_automotive_vehicle_V2_0_impl_SocketComm_H_
+
+#include <mutex>
+#include <vector>
+#include "CommBase.h"
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace vehicle {
+namespace V2_0 {
+
+namespace impl {
+
+/**
+ * SocketComm opens a socket via adb's TCP port forwarding to enable a Host PC to connect to
+ * the VehicleHAL.
+ */
+class SocketComm : public CommBase {
+public:
+    SocketComm();
+    virtual ~SocketComm();
+
+    /**
+     * Creates a connection to the other side.
+     *
+     * @return int Returns fd or socket number if connection is successful.
+     *              Otherwise, returns -1 if no connection is availble.
+     */
+    int connect() override;
+
+    /**
+     * Opens a socket and begins listening.
+     *
+     * @return int Returns 0 on success.
+     */
+    int open() override;
+
+    /**
+     * Blocking call to read data from the connection.
+     *
+     * @return std::vector<uint8_t> Serialized protobuf data received from emulator.  This will be
+     *              an empty vector if the connection was closed or some other error occurred.
+     */
+    std::vector<uint8_t> read() override;
+
+    /**
+     * Closes a connection if it is open.
+     */
+    void stop() override;
+
+    /**
+     * Transmits a string of data to the emulator.
+     *
+     * @param data Serialized protobuf data to transmit.
+     *
+     * @return int Number of bytes transmitted, or -1 if failed.
+     */
+    int write(const std::vector<uint8_t>& data) override;
+
+private:
+    int mCurSockFd;
+    std::atomic<int> mExit;
+    std::mutex mMutex;
+    int mSockFd;
+};
+
+}  // impl
+
+}  // namespace V2_0
+}  // namespace vehicle
+}  // namespace automotive
+}  // namespace hardware
+}  // namespace android
+
+
+#endif  // android_hardware_automotive_vehicle_V2_0_impl_SocketComm_H_
diff --git a/automotive/vehicle/2.0/default/tests/RecurrentTimer_test.cpp b/automotive/vehicle/2.0/default/tests/RecurrentTimer_test.cpp
new file mode 100644
index 0000000..9fc17c6
--- /dev/null
+++ b/automotive/vehicle/2.0/default/tests/RecurrentTimer_test.cpp
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+#include <thread>
+
+#include <gtest/gtest.h>
+
+#include "vhal_v2_0/RecurrentTimer.h"
+
+namespace {
+
+using std::chrono::nanoseconds;
+using std::chrono::milliseconds;
+
+#define ASSERT_EQ_WITH_TOLERANCE(val1, val2, tolerance) \
+ASSERT_LE(val1 - tolerance, val2); \
+ASSERT_GE(val1 + tolerance, val2); \
+
+
+TEST(RecurrentTimerTest, oneInterval) {
+    std::atomic<int64_t> counter { 0L };
+    auto counterRef = std::ref(counter);
+    RecurrentTimer timer([&counterRef](const std::vector<int32_t>& cookies) {
+        ASSERT_EQ(1u, cookies.size());
+        ASSERT_EQ(0xdead, cookies.front());
+        counterRef.get()++;
+    });
+
+    timer.registerRecurrentEvent(milliseconds(1), 0xdead);
+    std::this_thread::sleep_for(milliseconds(100));
+    ASSERT_EQ_WITH_TOLERANCE(100, counter.load(), 20);
+}
+
+TEST(RecurrentTimerTest, multipleIntervals) {
+    std::atomic<int64_t> counter1ms { 0L };
+    std::atomic<int64_t> counter5ms { 0L };
+    auto counter1msRef = std::ref(counter1ms);
+    auto counter5msRef = std::ref(counter5ms);
+    RecurrentTimer timer(
+            [&counter1msRef, &counter5msRef](const std::vector<int32_t>& cookies) {
+        for (int32_t cookie : cookies) {
+            if (cookie == 0xdead) {
+                counter1msRef.get()++;
+            } else if (cookie == 0xbeef) {
+                counter5msRef.get()++;
+            } else {
+                FAIL();
+            }
+        }
+    });
+
+    timer.registerRecurrentEvent(milliseconds(1), 0xdead);
+    timer.registerRecurrentEvent(milliseconds(5), 0xbeef);
+
+    std::this_thread::sleep_for(milliseconds(100));
+    ASSERT_EQ_WITH_TOLERANCE(100, counter1ms.load(), 20);
+    ASSERT_EQ_WITH_TOLERANCE(20, counter5ms.load(), 5);
+}
+
+}  // anonymous namespace
diff --git a/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp b/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
index e13d003..7ec9b79 100644
--- a/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
+++ b/automotive/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
@@ -14,8 +14,9 @@
  * limitations under the License.
  */
 
-#include <unordered_map>
+#include <functional>
 #include <iostream>
+#include <unordered_map>
 
 #include <gtest/gtest.h>
 
@@ -35,8 +36,9 @@
 
 class SubscriptionManagerTest : public ::testing::Test {
 public:
-    SubscriptionManager manager;
+    SubscriptionManagerTest() : manager(([this](int x) { onPropertyUnsubscribed(x); })) {}
 
+    SubscriptionManager manager;
     static constexpr int32_t PROP1 = toInt(VehicleProperty::HVAC_FAN_SPEED);
     static constexpr int32_t PROP2 = toInt(VehicleProperty::DISPLAY_BRIGHTNESS);
 
@@ -44,6 +46,10 @@
     sp<IVehicleCallback> cb2 = new MockedVehicleCallback();
     sp<IVehicleCallback> cb3 = new MockedVehicleCallback();
 
+    void SetUp() override {
+        lastUnsubscribedProperty = -1;
+    }
+
     hidl_vec<SubscribeOptions> subscrToProp1 = {
         SubscribeOptions {
             .propId = PROP1,
@@ -90,12 +96,31 @@
         return manager.getSubscribedClients(PROP2, 0,
                                             SubscribeFlags::DEFAULT);
     }
+
+    void onPropertyUnsubscribed(int propertyId) {
+        // Called when there are no clients who subscribed to particular property. This can happen
+        // because of explict unsubscribe call or when client (IVehicleCallback) was disconnected.
+        lastUnsubscribedProperty = propertyId;
+    }
+
+    void assertOnPropertyUnsubscribedNotCalled() {
+        ASSERT_EQ(-1, lastUnsubscribedProperty);
+    }
+
+    void assertLastUnsubscribedProperty(int expectedPropertyId) {
+        ASSERT_EQ(expectedPropertyId, lastUnsubscribedProperty);
+        lastUnsubscribedProperty = -1;
+    }
+
+private:
+    int lastUnsubscribedProperty;
 };
 
 
 TEST_F(SubscriptionManagerTest, multipleClients) {
-    manager.addOrUpdateSubscription(cb1, subscrToProp1);
-    manager.addOrUpdateSubscription(cb2, subscrToProp1);
+    std::list<SubscribeOptions> updatedOptions;
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb1, subscrToProp1, &updatedOptions));
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb2, subscrToProp1, &updatedOptions));
 
     auto clients = manager.getSubscribedClients(
             PROP1,
@@ -106,7 +131,8 @@
 }
 
 TEST_F(SubscriptionManagerTest, negativeCases) {
-    manager.addOrUpdateSubscription(cb1, subscrToProp1);
+    std::list<SubscribeOptions> updatedOptions;
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb1, subscrToProp1, &updatedOptions));
 
     // Wrong zone
     auto clients = manager.getSubscribedClients(
@@ -131,7 +157,8 @@
 }
 
 TEST_F(SubscriptionManagerTest, mulipleSubscriptions) {
-    manager.addOrUpdateSubscription(cb1, subscrToProp1);
+    std::list<SubscribeOptions> updatedOptions;
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb1, subscrToProp1, &updatedOptions));
 
     auto clients = manager.getSubscribedClients(
             PROP1,
@@ -142,13 +169,13 @@
 
     // Same property, but different zone, to make sure we didn't unsubscribe
     // from previous zone.
-    manager.addOrUpdateSubscription(cb1, {
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb1, {
         SubscribeOptions {
                 .propId = PROP1,
                 .vehicleAreas = toInt(VehicleAreaZone::ROW_2),
                 .flags = SubscribeFlags::DEFAULT
             }
-        });
+        }, &updatedOptions));
 
     clients = manager.getSubscribedClients(PROP1,
                                            toInt(VehicleAreaZone::ROW_1_LEFT),
@@ -162,31 +189,38 @@
 }
 
 TEST_F(SubscriptionManagerTest, unsubscribe) {
-    manager.addOrUpdateSubscription(cb1, subscrToProp1);
-    manager.addOrUpdateSubscription(cb2, subscrToProp2);
-    manager.addOrUpdateSubscription(cb3, subscrToProp1and2);
+    std::list<SubscribeOptions> updatedOptions;
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb1, subscrToProp1, &updatedOptions));
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb2, subscrToProp2, &updatedOptions));
+    ASSERT_EQ(StatusCode::OK, manager.addOrUpdateSubscription(cb3, subscrToProp1and2,
+                                                              &updatedOptions));
 
     ASSERT_ALL_EXISTS({cb1, cb3}, extractCallbacks(clientsToProp1()));
     ASSERT_ALL_EXISTS({cb2, cb3}, extractCallbacks(clientsToProp2()));
 
-    ASSERT_FALSE(manager.unsubscribe(cb1, PROP1));
+    manager.unsubscribe(cb1, PROP1);
+    assertOnPropertyUnsubscribedNotCalled();
     ASSERT_ALL_EXISTS({cb3}, extractCallbacks(clientsToProp1()));
 
     // Make sure nothing changed in PROP2 so far.
     ASSERT_ALL_EXISTS({cb2, cb3}, extractCallbacks(clientsToProp2()));
 
     // No one subscribed to PROP1, subscription for PROP2 is not affected.
-    ASSERT_TRUE(manager.unsubscribe(cb3, PROP1));
+    manager.unsubscribe(cb3, PROP1);
+    assertLastUnsubscribedProperty(PROP1);
     ASSERT_ALL_EXISTS({cb2, cb3}, extractCallbacks(clientsToProp2()));
 
-    ASSERT_FALSE(manager.unsubscribe(cb3, PROP2));
+    manager.unsubscribe(cb3, PROP2);
+    assertOnPropertyUnsubscribedNotCalled();
     ASSERT_ALL_EXISTS({cb2}, extractCallbacks(clientsToProp2()));
 
     // The last client unsubscribed from this property.
-    ASSERT_TRUE(manager.unsubscribe(cb2, PROP2));
+    manager.unsubscribe(cb2, PROP2);
+    assertLastUnsubscribedProperty(PROP2);
 
-    // No one was subscribed, return false.
-    ASSERT_FALSE(manager.unsubscribe(cb1, PROP1));
+    // No one subscribed anymore
+    manager.unsubscribe(cb1, PROP1);
+    assertLastUnsubscribedProperty(PROP1);
 }
 
 }  // namespace anonymous
diff --git a/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp b/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
index f637344..b5cdf5c 100644
--- a/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
+++ b/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
@@ -68,15 +68,16 @@
                     pValue = getValuePool()->obtainFloat(42.42);
                 }
                 break;
-            case VehicleProperty::VEHICLE_MAP_SERVICE:
-                pValue = getValuePool()->obtainComplex();
-                pValue->value.int32Values = hidl_vec<int32_t> { 10, 20 };
-                pValue->value.int64Values = hidl_vec<int64_t> { 30, 40 };
-                pValue->value.floatValues = hidl_vec<float_t> { 1.1, 2.2 };
-                pValue->value.bytes = hidl_vec<uint8_t> { 1, 2, 3 };
-                pValue->value.stringValue = kCarMake;
-                break;
             default:
+                if (requestedPropValue.prop == kCustomComplexProperty) {
+                    pValue = getValuePool()->obtainComplex();
+                    pValue->value.int32Values = hidl_vec<int32_t> { 10, 20 };
+                    pValue->value.int64Values = hidl_vec<int64_t> { 30, 40 };
+                    pValue->value.floatValues = hidl_vec<float_t> { 1.1, 2.2 };
+                    pValue->value.bytes = hidl_vec<uint8_t> { 1, 2, 3 };
+                    pValue->value.stringValue = kCarMake;
+                    break;
+                }
                 auto key = makeKey(toInt(property), areaId);
                 if (mValues.count(key) == 0) {
                     ALOGW("");
@@ -318,10 +319,10 @@
 }
 
 TEST_F(VehicleHalManagerTest, get_Complex) {
-    invokeGet(toInt(VehicleProperty::VEHICLE_MAP_SERVICE), 0);
+    invokeGet(kCustomComplexProperty, 0);
 
     ASSERT_EQ(StatusCode::OK, actualStatusCode);
-    ASSERT_EQ(toInt(VehicleProperty::VEHICLE_MAP_SERVICE), actualValue.prop);
+    ASSERT_EQ(kCustomComplexProperty, actualValue.prop);
 
     ASSERT_EQ(3u, actualValue.value.bytes.size());
     ASSERT_EQ(1, actualValue.value.bytes[0]);
diff --git a/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h b/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h
index ce1ed7d..28e1a5a 100644
--- a/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h
+++ b/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h
@@ -29,6 +29,11 @@
 namespace vehicle {
 namespace V2_0 {
 
+constexpr int32_t kCustomComplexProperty = 0xbeef
+        | VehiclePropertyGroup::VENDOR
+        | VehiclePropertyType::COMPLEX
+        | VehicleArea::GLOBAL;
+
 const VehiclePropConfig kVehicleProperties[] = {
     {
         .prop = toInt(VehicleProperty::INFO_MAKE),
@@ -109,7 +114,7 @@
 
     // Complex data type.
     {
-        .prop = toInt(VehicleProperty::VEHICLE_MAP_SERVICE),
+        .prop = kCustomComplexProperty,
         .access = VehiclePropertyAccess::READ_WRITE,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE
     }
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 5e22364..b33b6ee 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -330,9 +330,12 @@
     /*
      * Fan speed setting
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
-     * @allow_out_of_range_value : OFF
      */
     HVAC_FAN_SPEED = (
         0x0500
@@ -343,10 +346,13 @@
     /*
      * Fan direction setting
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      * @data_enum VehicleHvacFanDirection
-     * @allow_out_of_range_value : OFF
      */
     HVAC_FAN_DIRECTION = (
         0x0501
@@ -357,6 +363,10 @@
     /*
      * HVAC current temperature.
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -369,9 +379,12 @@
     /*
      * HVAC, target temperature set.
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
-     * @allow_out_of_range_value : MIN / MAX / OFF
      */
     HVAC_TEMPERATURE_SET = (
         0x0503
@@ -382,6 +395,10 @@
     /*
      * On/off defrost
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -394,6 +411,10 @@
     /*
      * On/off AC
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      * @config_flags Supported zones
@@ -407,6 +428,10 @@
     /*
      * On/off max AC
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -419,6 +444,10 @@
     /*
      * On/off max defrost
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -431,6 +460,10 @@
     /*
      * On/off re-circulation
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -443,6 +476,10 @@
     /*
      * On/off dual. This must be defined per each row.
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -455,6 +492,10 @@
     /*
      * On/off automatic mode
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -475,6 +516,10 @@
      * min/max range defines the allowable range and number of steps in each
      * direction.
      *
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
      */
@@ -490,8 +535,12 @@
      * Increase values denote higher heating levels for side mirrors.
      * 0 indicates heating is turned off.
      *
-     * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
-     * @access VEHICLE_PROP_ACCESS_READ_WRITE
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     HVAC_SIDE_MIRROR_HEAT = (
         0x050C
@@ -507,8 +556,12 @@
      * Negative value indicates cooling.
      * 0 indicates temperature control is off.
      *
-     * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
-     * @access VEHICLE_PROP_ACCESS_READ_WRITE
+     * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
+     * guaranteed to work if HVAC unit is off.  See HVAC_POWER_ON property for
+     * details.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     HVAC_STEERING_WHEEL_TEMP = (
         0x050D
@@ -523,8 +576,11 @@
      * different unit from VehicleUnit enum.
      * This parameter affects all HVAC temperatures in the system.
      *
-     * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
-     * @access VEHICLE_PROP_ACCESS_READ
+     * IVehicle#get is not guaranteed to work if HVAC unit is off.  See
+     * HVAC_POWER_ON property for details.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ
      */
     HVAC_TEMPERATURE_UNITS = (
         0x050E
@@ -535,9 +591,11 @@
     /**
      * Actual fan speed
      *
-     * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
-     * @access VEHICLE_PROP_ACCESS_READ
-     * @allow_out_of_range_value : OFF
+     * IVehicle#get is not guaranteed to work if HVAC unit is off.  See
+     * HVAC_POWER_ON property for details.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ
      */
     HVAC_ACTUAL_FAN_SPEED_RPM = (
         0x050F
@@ -555,9 +613,8 @@
      *
      * 0x12 = (1 << 1) | (1 << 4)
      *
-     * @change_mode VEHICLE_PROP_CHANGE_MODE_STATIC
-     * @access VEHICLE_PROP_ACCESS_READ
-     * @allow_out_of_range_value : OFF
+     * @change_mode VehiclePropertyChangeMode:STATIC
+     * @access VehiclePropertyAccess:READ
      */
     HVAC_FAN_DIRECTION_AVAILABLE = (
         0x0511
@@ -1733,158 +1790,8 @@
         | VehiclePropertyGroup:SYSTEM
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:GLOBAL),
-
-    /*
-     * Vehicle Maps Service (VMS) message
-     *
-     * This property uses COMPLEX data to communicate vms messages.
-     *
-     * Its contents are to be interpreted as follows:
-     * the indices defined in VmsMessageIntegerValuesIndex are to be used to
-     * read from int32Values;
-     * bytes is a serialized VMS message as defined in the vms protocol
-     * which is opaque to the framework;
-     *
-     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE
-     */
-    VEHICLE_MAP_SERVICE = (
-        0x0C00
-        | VehiclePropertyGroup:SYSTEM
-        | VehiclePropertyType:COMPLEX
-        | VehicleArea:GLOBAL),
-
-    /*
-     * OBD2 Live Sensor Data
-     *
-     * This property uses COMPLEX data to send a snapshot of the current (live)
-     * values of the OBD2 sensors provided by the vehicle.
-     *
-     * VehiclePropConfig
-     *   configArray[0] : number of vendor-specific integer-valued sensors
-     *                    that can be returned in a frame.
-     *   configArray[1] : number of vendor-specific float-valued sensors
-     *                    that can be returned in a frame.
-     *
-     * The values are to be interpreted as follows:
-     * the indices defined in Obd2IntegerSensorIndex are to be used to
-     * read from int32Values;
-     * the indices defined in Obd2FloatSensorIndex are to be used to
-     * read from floatValues.
-     * the elements of bytes are to be interpreted as a bitmask, such that
-     * the bits 0 thru the integer value of
-     * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
-     * are 1 if the corresponding index is a valid sensor index whose value can
-     * be read in the returned int32Values vector, 0 otherwise.
-     * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
-     * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
-     * are 1 if the corresponding index is a valid sensor index whose value
-     * can be read in the returned floatValues vector, 0 otherwise.
-     *
-     * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
-     * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
-     * is only valid if the corresponding bits in the bytes vector are set to 1.
-     *
-     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ
-     */
-    OBD2_LIVE_FRAME = (
-        0x0D00
-        | VehiclePropertyGroup:SYSTEM
-        | VehiclePropertyType:COMPLEX
-        | VehicleArea:GLOBAL),
-
-    /*
-     * OBD2 Freeze Frame Sensor Data
-     *
-     * This property uses COMPLEX data to send a snapshot of the values of the
-     * OBD2 sensors provided by the vehicle at the time that a diagnostic
-     * troubleshooting code (DTC) was recorded by the vehicle.
-     *
-     * VehiclePropConfig
-     *   configArray[0] : number of vendor-specific integer-valued sensors
-     *                    that can be returned in a frame.
-     *   configArray[1] : number of vendor-specific float-valued sensors
-     *                    that can be returned in a frame.
-     *
-     * A get of this property must take the following form:
-     *   int64Values[0]: timestamp of the freeze frame to retrieve.
-     *                   Valid timestamps are given by OBD2_DTC_INFO.
-     *
-     * The values are to be interpreted as follows:
-     * the indices defined in Obd2IntegerSensorIndex are to be used to
-     * read from int32Values;
-     * the indices defined in Obd2FloatSensorIndex are to be used to
-     * read from floatValues;
-     * the elements of bytes are to be interpreted as a bitmask, such that
-     * the bits 0 thru the integer value of
-     * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
-     * are 1 if the corresponding index is a valid sensor index whose value can
-     * be read in the returned int32Values vector, 0 otherwise.
-     * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
-     * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
-     * are 1 if the corresponding index is a valid sensor index whose value
-     * can be read in the returned floatValues vector, 0 otherwise.
-     * stringValue is the DTC that caused this freeze frame to be recorded.
-     *
-     * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
-     * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
-     * is only valid if the corresponding bits in the bytes vector are set to 1,
-     * and a possible valid stringValue is "P0176" to indicate a malfunction
-     * of the fuel composition sensor circuit.
-     *
-     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ
-     */
-    OBD2_FREEZE_FRAME = (
-        0x0D01
-        | VehiclePropertyGroup:SYSTEM
-        | VehiclePropertyType:COMPLEX
-        | VehicleArea:GLOBAL),
-
-    /*
-     * OBD2 Freeze Frame Information
-     *
-     * This property describes the current freeze frames stored in vehicle
-     * memory and available for retrieval via OBD2_FREEZE_FRAME.
-     *
-     * The values are to be interpreted as follows:
-     * each element of int64Values is the timestamp at which a a fault code
-     * has been detected and the corresponding freeze frame stored, and each
-     * such element can be used as the key to OBD2_FREEZE_FRAME to retrieve
-     * the corresponding freeze frame.
-     *
-     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ
-     */
-    OBD2_FREEZE_FRAME_INFO = (
-        0x0D02
-        | VehiclePropertyGroup:SYSTEM
-        | VehiclePropertyType:COMPLEX
-        | VehicleArea:GLOBAL),
-
-    /*
-     * OBD2 Freeze Frame Clear
-     *
-     * This property allows deletion of any of the freeze frames stored in
-     * vehicle memory, as described by OBD2_DTC_INFO.
-     *
-     * A set of this property is to be interpreted as follows:
-     * if int64Values contains no elements, then all DTCs stored will be cleared;
-     * if int64Values contains one or more elements, then DTCs at the timestamps
-     * stored in int64Values will be cleared, and the others not cleared, except
-     * the memory will be compacted so that all remaining DTCs are stored
-     * contiguously.
-     *
-     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:WRITE
-     */
-    OBD2_FREEZE_FRAME_CLEAR = (
-        0x0D03
-        | VehiclePropertyGroup:SYSTEM
-        | VehiclePropertyType:COMPLEX
-        | VehicleArea:GLOBAL),
 };
+
 /*
  * Bit flags for fan direction
  */
@@ -2772,86 +2679,6 @@
   INTERNAL_ERROR = 5,
 };
 
-/* The status of a fuel system as described by the OBD2 specification. */
-enum FuelSystemStatus : int32_t {
-  OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
-
-  CLOSED_LOOP = 2,
-
-  OPEN_ENGINE_LOAD_OR_DECELERATION = 4,
-
-  OPEN_SYSTEM_FAILURE = 8,
-
-  CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
-};
-
-/* Defines which ignition monitors are available to be read. */
-enum IgnitionMonitorKind : int32_t {
-  SPARK = 0,
-
-  COMPRESSION = 1,
-};
-
-/* These ignition monitors are common to both SPARK and COMPRESSION. */
-enum CommonIgnitionMonitors : int32_t {
-  COMPONENTS_AVAILABLE = 0x1 << 0,
-  COMPONENTS_INCOMPLETE = 0x1 << 1,
-
-  FUEL_SYSTEM_AVAILABLE = 0x1 << 2,
-  FUEL_SYSTEM_INCOMPLETE = 0x1 << 3,
-
-  MISFIRE_AVAILABLE = 0x1 << 4,
-  MISFIRE_INCOMPLETE = 0x1 << 5,
-};
-
-/* Ignition monitors available for SPARK vehicles. */
-enum SparkIgnitionMonitors : CommonIgnitionMonitors {
-  EGR_AVAILABLE = 0x1 << 6,
-  EGR_INCOMPLETE = 0x1 << 7,
-
-  OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8,
-  OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9,
-
-  OXYGEN_SENSOR_AVAILABLE = 0x1 << 10,
-  OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11,
-
-  AC_REFRIGERANT_AVAILABLE = 0x1 << 12,
-  AC_REFRIGERANT_INCOMPLETE = 0x1 << 13,
-
-  SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14,
-  SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15,
-
-  EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16,
-  EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17,
-
-  HEATED_CATALYST_AVAILABLE = 0x1 << 18,
-  HEATED_CATALYST_INCOMPLETE = 0x1 << 19,
-
-  CATALYST_AVAILABLE = 0x1 << 20,
-  CATALYST_INCOMPLETE = 0x1 << 21,
-};
-
-/* Ignition monitors only available for COMPRESSION vehicles. */
-enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
-  EGR_OR_VVT_AVAILABLE = 0x1 << 6,
-  EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
-
-  PM_FILTER_AVAILABLE = 0x1 << 8,
-  PM_FILTER_INCOMPLETE = 0x1 << 9,
-
-  EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10,
-  EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11,
-
-  BOOST_PRESSURE_AVAILABLE = 0x1 << 12,
-  BOOST_PRESSURE_INCOMPLETE = 0x1 << 13,
-
-  NOx_SCR__AVAILABLE = 0x1 << 14,
-  NOx_SCR_INCOMPLETE = 0x1 << 15,
-
-  NMHC_CATALYST_AVAILABLE = 0x1 << 16,
-  NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
-};
-
 enum Wheel : int32_t {
     UNKNOWN = 0x0,
 
@@ -2860,335 +2687,3 @@
     LEFT_REAR = 0x4,
     RIGHT_REAR = 0x8,
 };
-
-enum SecondaryAirStatus : int32_t {
-  UPSTREAM = 1,
-
-  DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
-
-  FROM_OUTSIDE_OR_OFF = 4,
-
-  PUMP_ON_FOR_DIAGNOSTICS = 8,
-};
-
-enum FuelType : int32_t {
-  NOT_AVAILABLE = 0,
-
-  GASOLINE = 1,
-
-  METHANOL = 2,
-
-  ETHANOL = 3,
-
-  DIESEL = 4,
-
-  LPG = 5,
-
-  CNG = 6,
-
-  PROPANE = 7,
-
-  ELECTRIC = 8,
-
-  BIFUEL_RUNNING_GASOLINE = 9,
-
-  BIFUEL_RUNNING_METHANOL = 10,
-
-  BIFUEL_RUNNING_ETHANOL = 11,
-
-  BIFUEL_RUNNING_LPG = 12,
-
-  BIFUEL_RUNNING_CNG = 13,
-
-  BIFUEL_RUNNING_PROPANE = 14,
-
-  BIFUEL_RUNNING_ELECTRIC = 15,
-
-  BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 16,
-
-  HYBRID_GASOLINE = 17,
-
-  HYBRID_ETHANOL = 18,
-
-  HYBRID_DIESEL = 19,
-
-  HYBRID_ELECTRIC = 20,
-
-  HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 21,
-
-  HYBRID_REGENERATIVE = 22,
-
-  BIFUEL_RUNNING_DIESEL = 23,
-};
-
-/*
- * This enum provides the canonical mapping for sensor properties that have an integer value.
- * The ordering of the values is taken from the OBD2 specification.
- * Some of the properties are represented as an integer mapping to another enum. In those cases
- * expect a comment by the property definition describing the enum to look at for the mapping.
- * Any value greater than the last reserved index is available to vendors to map their extensions.
- */
-enum Obd2IntegerSensorIndex : int32_t {
-  /* refer to FuelSystemStatus for a description of this value. */
-  FUEL_SYSTEM_STATUS = 0,
-
-  MALFUNCTION_INDICATOR_LIGHT_ON = 1,
-
-  /* refer to IgnitionMonitorKind for a description of this value. */
-  IGNITION_MONITORS_SUPPORTED = 2,
-
-  /*
-   * The value of this sensor is a bitmask that specifies whether ignition-specific
-   * tests are available and whether they are complete. The semantics of the individual
-   * bits in this value are given by, respectively, SparkIgnitionMonitors and
-   * CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
-   */
-  IGNITION_SPECIFIC_MONITORS = 3,
-
-  INTAKE_AIR_TEMPERATURE = 4,
-
-  /* refer to SecondaryAirStatus for a description of this value. */
-  COMMANDED_SECONDARY_AIR_STATUS = 5,
-
-  NUM_OXYGEN_SENSORS_PRESENT = 6,
-
-  RUNTIME_SINCE_ENGINE_START = 7,
-
-  DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8,
-
-  WARMUPS_SINCE_CODES_CLEARED = 9,
-
-  DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10,
-
-  ABSOLUTE_BAROMETRIC_PRESSURE = 11,
-
-  CONTROL_MODULE_VOLTAGE = 12,
-
-  AMBIENT_AIR_TEMPERATURE = 13,
-
-  TIME_WITH_MALFUNCTION_LIGHT_ON = 14,
-
-  TIME_SINCE_TROUBLE_CODES_CLEARED = 15,
-
-  MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16,
-
-  MAX_OXYGEN_SENSOR_VOLTAGE = 17,
-
-  MAX_OXYGEN_SENSOR_CURRENT = 18,
-
-  MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19,
-
-  MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
-
-  /* refer to FuelType for a description of this value. */
-  FUEL_TYPE = 21,
-
-  FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
-
-  ENGINE_OIL_TEMPERATURE = 23,
-
-  DRIVER_DEMAND_PERCENT_TORQUE = 24,
-
-  ENGINE_ACTUAL_PERCENT_TORQUE = 25,
-
-  ENGINE_REFERENCE_PERCENT_TORQUE = 26,
-
-  ENGINE_PERCENT_TORQUE_DATA_IDLE = 27,
-
-  ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28,
-
-  ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29,
-
-  ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30,
-
-  ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31,
-
-  LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
-
-  VENDOR_START_INDEX = LAST_SYSTEM_INDEX + 1,
-};
-
-/*
- * This enum provides the canonical mapping for sensor properties that have a floating-point value.
- * The ordering of the values is taken from the OBD2 specification.
- * Any value greater than the last reserved index is available to vendors to map their extensions.
- */
-enum Obd2FloatSensorIndex : int32_t {
-  CALCULATED_ENGINE_LOAD = 0,
-
-  ENGINE_COOLANT_TEMPERATURE = 1,
-
-  SHORT_TERM_FUEL_TRIM_BANK1 = 2,
-
-  LONG_TERM_FUEL_TRIM_BANK1 = 3,
-
-  SHORT_TERM_FUEL_TRIM_BANK2 = 4,
-
-  LONG_TERM_FUEL_TRIM_BANK2 = 5,
-
-  FUEL_PRESSURE = 6,
-
-  INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7,
-
-  ENGINE_RPM = 8,
-
-  VEHICLE_SPEED = 9,
-
-  TIMING_ADVANCE = 10,
-
-  MAF_AIR_FLOW_RATE = 11,
-
-  THROTTLE_POSITION = 12,
-
-  OXYGEN_SENSOR1_VOLTAGE = 13,
-
-  OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14,
-
-  OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15,
-
-  OXYGEN_SENSOR2_VOLTAGE = 16,
-
-  OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17,
-
-  OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18,
-
-  OXYGEN_SENSOR3_VOLTAGE = 19,
-
-  OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20,
-
-  OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21,
-
-  OXYGEN_SENSOR4_VOLTAGE = 22,
-
-  OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23,
-
-  OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24,
-
-  OXYGEN_SENSOR5_VOLTAGE = 25,
-
-  OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26,
-
-  OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27,
-
-  OXYGEN_SENSOR6_VOLTAGE = 28,
-
-  OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29,
-
-  OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30,
-
-  OXYGEN_SENSOR7_VOLTAGE = 31,
-
-  OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32,
-
-  OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33,
-
-  OXYGEN_SENSOR8_VOLTAGE = 34,
-
-  OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35,
-
-  OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36,
-
-  FUEL_RAIL_PRESSURE = 37,
-
-  FUEL_RAIL_GAUGE_PRESSURE = 38,
-
-  COMMANDED_EXHAUST_GAS_RECIRCULATION = 39,
-
-  EXHAUST_GAS_RECIRCULATION_ERROR = 40,
-
-  COMMANDED_EVAPORATIVE_PURGE = 41,
-
-  FUEL_TANK_LEVEL_INPUT = 42,
-
-  EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43,
-
-  CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44,
-
-  CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45,
-
-  CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46,
-
-  CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47,
-
-  ABSOLUTE_LOAD_VALUE = 48,
-
-  FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49,
-
-  RELATIVE_THROTTLE_POSITION = 50,
-
-  ABSOLUTE_THROTTLE_POSITION_B = 51,
-
-  ABSOLUTE_THROTTLE_POSITION_C = 52,
-
-  ACCELERATOR_PEDAL_POSITION_D = 53,
-
-  ACCELERATOR_PEDAL_POSITION_E = 54,
-
-  ACCELERATOR_PEDAL_POSITION_F = 55,
-
-  COMMANDED_THROTTLE_ACTUATOR = 56,
-
-  ETHANOL_FUEL_PERCENTAGE = 57,
-
-  ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58,
-
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59,
-
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60,
-
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,
-
-  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62,
-
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63,
-
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64,
-
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65,
-
-  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66,
-
-  RELATIVE_ACCELERATOR_PEDAL_POSITION = 67,
-
-  HYBRID_BATTERY_PACK_REMAINING_LIFE = 68,
-
-  FUEL_INJECTION_TIMING = 69,
-
-  ENGINE_FUEL_RATE = 70,
-
-  LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
-
-  VENDOR_START_INDEX = LAST_SYSTEM_INDEX + 1,
-};
-
-/*
- * This enum lists the types of supported VMS messages.
- */
-enum VmsMessageType : int32_t {
-  /* A client subscribes to a layer. */
-  SUBSCRIBE = 1,
-
-  /* A client unsubscribes from a layer. */
-  UNSUBSCRIBE = 2,
-
-  /* A client publishes a data packet. */
-  DATA = 3,
-};
-
-/*
- * This enum provides the canonical mapping for VMS properties that have an
- * integer value.
- */
-enum VmsMessageIntegerValuesIndex : int32_t {
-  /* The message type as enumerated by VmsMessageType enum. */
-  VMS_MESSAGE_TYPE = 0,
-
-  /* The layer ID as defined in the vms protocol. */
-  VMS_LAYER_ID = 1,
-
-  /* The version of the VMS layer. */
-  VMS_LAYER_VERSION = 2,
-
-  /* The number of bytes in the payload */
-  VMS_PAYLOAD_SIZE_BYTES = 3,
-};
diff --git a/automotive/vehicle/2.0/vts/Vehicle.vts b/automotive/vehicle/2.0/vts/Vehicle.vts
deleted file mode 100644
index aa12f0c..0000000
--- a/automotive/vehicle/2.0/vts/Vehicle.vts
+++ /dev/null
@@ -1,115 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IVehicle"
-
-package: "android.hardware.automotive.vehicle"
-
-import: "android.hardware.automotive.vehicle@2.0::IVehicleCallback"
-import: "android.hardware.automotive.vehicle@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getAllPropConfigs"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropConfig"
-            }
-        }
-    }
-
-    api: {
-        name: "getPropConfigs"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropConfig"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int32_t"
-            }
-        }
-    }
-
-    api: {
-        name: "get"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
-        }
-    }
-
-    api: {
-        name: "set"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
-        }
-    }
-
-    api: {
-        name: "subscribe"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::IVehicleCallback"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::automotive::vehicle::V2_0::SubscribeOptions"
-            }
-        }
-    }
-
-    api: {
-        name: "unsubscribe"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::IVehicleCallback"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "debugDump"
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-}
diff --git a/automotive/vehicle/2.0/vts/VehicleCallback.vts b/automotive/vehicle/2.0/vts/VehicleCallback.vts
deleted file mode 100644
index e4815d5..0000000
--- a/automotive/vehicle/2.0/vts/VehicleCallback.vts
+++ /dev/null
@@ -1,46 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IVehicleCallback"
-
-package: "android.hardware.automotive.vehicle"
-
-import: "android.hardware.automotive.vehicle@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onPropertyEvent"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
-            }
-        }
-    }
-
-    api: {
-        name: "onPropertySet"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
-        }
-    }
-
-    api: {
-        name: "onPropertySetError"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-}
diff --git a/automotive/vehicle/2.0/vts/types.vts b/automotive/vehicle/2.0/vts/types.vts
deleted file mode 100644
index 3868c99..0000000
--- a/automotive/vehicle/2.0/vts/types.vts
+++ /dev/null
@@ -1,2780 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.automotive.vehicle"
-
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STRING"
-        scalar_value: {
-            int32_t: 1048576
-        }
-        enumerator: "BOOLEAN"
-        scalar_value: {
-            int32_t: 2097152
-        }
-        enumerator: "INT32"
-        scalar_value: {
-            int32_t: 4194304
-        }
-        enumerator: "INT32_VEC"
-        scalar_value: {
-            int32_t: 4259840
-        }
-        enumerator: "INT64"
-        scalar_value: {
-            int32_t: 5242880
-        }
-        enumerator: "FLOAT"
-        scalar_value: {
-            int32_t: 6291456
-        }
-        enumerator: "FLOAT_VEC"
-        scalar_value: {
-            int32_t: 6356992
-        }
-        enumerator: "BYTES"
-        scalar_value: {
-            int32_t: 7340032
-        }
-        enumerator: "COMPLEX"
-        scalar_value: {
-            int32_t: 14680064
-        }
-        enumerator: "MASK"
-        scalar_value: {
-            int32_t: 16711680
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleArea"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "GLOBAL"
-        scalar_value: {
-            int32_t: 16777216
-        }
-        enumerator: "ZONE"
-        scalar_value: {
-            int32_t: 33554432
-        }
-        enumerator: "WINDOW"
-        scalar_value: {
-            int32_t: 50331648
-        }
-        enumerator: "MIRROR"
-        scalar_value: {
-            int32_t: 67108864
-        }
-        enumerator: "SEAT"
-        scalar_value: {
-            int32_t: 83886080
-        }
-        enumerator: "DOOR"
-        scalar_value: {
-            int32_t: 100663296
-        }
-        enumerator: "MASK"
-        scalar_value: {
-            int32_t: 251658240
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyGroup"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SYSTEM"
-        scalar_value: {
-            int32_t: 268435456
-        }
-        enumerator: "VENDOR"
-        scalar_value: {
-            int32_t: 536870912
-        }
-        enumerator: "MASK"
-        scalar_value: {
-            int32_t: -268435456
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleProperty"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INVALID"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "INFO_VIN"
-        scalar_value: {
-            int32_t: 286261504
-        }
-        enumerator: "INFO_MAKE"
-        scalar_value: {
-            int32_t: 286261505
-        }
-        enumerator: "INFO_MODEL"
-        scalar_value: {
-            int32_t: 286261506
-        }
-        enumerator: "INFO_MODEL_YEAR"
-        scalar_value: {
-            int32_t: 289407235
-        }
-        enumerator: "INFO_FUEL_CAPACITY"
-        scalar_value: {
-            int32_t: 291504388
-        }
-        enumerator: "PERF_ODOMETER"
-        scalar_value: {
-            int32_t: 291504644
-        }
-        enumerator: "PERF_VEHICLE_SPEED"
-        scalar_value: {
-            int32_t: 291504647
-        }
-        enumerator: "ENGINE_COOLANT_TEMP"
-        scalar_value: {
-            int32_t: 291504897
-        }
-        enumerator: "ENGINE_OIL_TEMP"
-        scalar_value: {
-            int32_t: 291504900
-        }
-        enumerator: "ENGINE_RPM"
-        scalar_value: {
-            int32_t: 291504901
-        }
-        enumerator: "WHEEL_TICK"
-        scalar_value: {
-            int32_t: 291570438
-        }
-        enumerator: "GEAR_SELECTION"
-        scalar_value: {
-            int32_t: 289408000
-        }
-        enumerator: "CURRENT_GEAR"
-        scalar_value: {
-            int32_t: 289408001
-        }
-        enumerator: "PARKING_BRAKE_ON"
-        scalar_value: {
-            int32_t: 287310850
-        }
-        enumerator: "DRIVING_STATUS"
-        scalar_value: {
-            int32_t: 289408004
-        }
-        enumerator: "FUEL_LEVEL_LOW"
-        scalar_value: {
-            int32_t: 287310853
-        }
-        enumerator: "NIGHT_MODE"
-        scalar_value: {
-            int32_t: 287310855
-        }
-        enumerator: "TURN_SIGNAL_STATE"
-        scalar_value: {
-            int32_t: 289408008
-        }
-        enumerator: "IGNITION_STATE"
-        scalar_value: {
-            int32_t: 289408009
-        }
-        enumerator: "HVAC_FAN_SPEED"
-        scalar_value: {
-            int32_t: 306185472
-        }
-        enumerator: "HVAC_FAN_DIRECTION"
-        scalar_value: {
-            int32_t: 306185473
-        }
-        enumerator: "HVAC_TEMPERATURE_CURRENT"
-        scalar_value: {
-            int32_t: 308282626
-        }
-        enumerator: "HVAC_TEMPERATURE_SET"
-        scalar_value: {
-            int32_t: 308282627
-        }
-        enumerator: "HVAC_DEFROSTER"
-        scalar_value: {
-            int32_t: 320865540
-        }
-        enumerator: "HVAC_AC_ON"
-        scalar_value: {
-            int32_t: 304088325
-        }
-        enumerator: "HVAC_MAX_AC_ON"
-        scalar_value: {
-            int32_t: 304088326
-        }
-        enumerator: "HVAC_MAX_DEFROST_ON"
-        scalar_value: {
-            int32_t: 304088327
-        }
-        enumerator: "HVAC_RECIRC_ON"
-        scalar_value: {
-            int32_t: 304088328
-        }
-        enumerator: "HVAC_DUAL_ON"
-        scalar_value: {
-            int32_t: 304088329
-        }
-        enumerator: "HVAC_AUTO_ON"
-        scalar_value: {
-            int32_t: 304088330
-        }
-        enumerator: "HVAC_SEAT_TEMPERATURE"
-        scalar_value: {
-            int32_t: 356517131
-        }
-        enumerator: "HVAC_SIDE_MIRROR_HEAT"
-        scalar_value: {
-            int32_t: 339739916
-        }
-        enumerator: "HVAC_STEERING_WHEEL_TEMP"
-        scalar_value: {
-            int32_t: 289408269
-        }
-        enumerator: "HVAC_TEMPERATURE_UNITS"
-        scalar_value: {
-            int32_t: 306185486
-        }
-        enumerator: "HVAC_ACTUAL_FAN_SPEED_RPM"
-        scalar_value: {
-            int32_t: 306185487
-        }
-        enumerator: "HVAC_FAN_DIRECTION_AVAILABLE"
-        scalar_value: {
-            int32_t: 306185489
-        }
-        enumerator: "HVAC_POWER_ON"
-        scalar_value: {
-            int32_t: 304088336
-        }
-        enumerator: "ENV_OUTSIDE_TEMPERATURE"
-        scalar_value: {
-            int32_t: 291505923
-        }
-        enumerator: "ENV_CABIN_TEMPERATURE"
-        scalar_value: {
-            int32_t: 291505924
-        }
-        enumerator: "RADIO_PRESET"
-        scalar_value: {
-            int32_t: 289474561
-        }
-        enumerator: "AUDIO_FOCUS"
-        scalar_value: {
-            int32_t: 289474816
-        }
-        enumerator: "AUDIO_FOCUS_EXT_SYNC"
-        scalar_value: {
-            int32_t: 289474832
-        }
-        enumerator: "AUDIO_VOLUME"
-        scalar_value: {
-            int32_t: 289474817
-        }
-        enumerator: "AUDIO_VOLUME_EXT_SYNC"
-        scalar_value: {
-            int32_t: 289474833
-        }
-        enumerator: "AUDIO_VOLUME_LIMIT"
-        scalar_value: {
-            int32_t: 289474818
-        }
-        enumerator: "AUDIO_ROUTING_POLICY"
-        scalar_value: {
-            int32_t: 289474819
-        }
-        enumerator: "AUDIO_HW_VARIANT"
-        scalar_value: {
-            int32_t: 289409284
-        }
-        enumerator: "AUDIO_EXT_ROUTING_HINT"
-        scalar_value: {
-            int32_t: 289474821
-        }
-        enumerator: "AUDIO_STREAM_STATE"
-        scalar_value: {
-            int32_t: 289474822
-        }
-        enumerator: "AUDIO_PARAMETERS"
-        scalar_value: {
-            int32_t: 286263559
-        }
-        enumerator: "AP_POWER_STATE"
-        scalar_value: {
-            int32_t: 289475072
-        }
-        enumerator: "DISPLAY_BRIGHTNESS"
-        scalar_value: {
-            int32_t: 289409537
-        }
-        enumerator: "AP_POWER_BOOTUP_REASON"
-        scalar_value: {
-            int32_t: 289409538
-        }
-        enumerator: "HW_KEY_INPUT"
-        scalar_value: {
-            int32_t: 289475088
-        }
-        enumerator: "INSTRUMENT_CLUSTER_INFO"
-        scalar_value: {
-            int32_t: 289475104
-        }
-        enumerator: "UNIX_TIME"
-        scalar_value: {
-            int32_t: 290458160
-        }
-        enumerator: "CURRENT_TIME_IN_SECONDS"
-        scalar_value: {
-            int32_t: 289409585
-        }
-        enumerator: "DOOR_POS"
-        scalar_value: {
-            int32_t: 373295872
-        }
-        enumerator: "DOOR_MOVE"
-        scalar_value: {
-            int32_t: 373295873
-        }
-        enumerator: "DOOR_LOCK"
-        scalar_value: {
-            int32_t: 371198722
-        }
-        enumerator: "MIRROR_Z_POS"
-        scalar_value: {
-            int32_t: 339741504
-        }
-        enumerator: "MIRROR_Z_MOVE"
-        scalar_value: {
-            int32_t: 339741505
-        }
-        enumerator: "MIRROR_Y_POS"
-        scalar_value: {
-            int32_t: 339741506
-        }
-        enumerator: "MIRROR_Y_MOVE"
-        scalar_value: {
-            int32_t: 339741507
-        }
-        enumerator: "MIRROR_LOCK"
-        scalar_value: {
-            int32_t: 287312708
-        }
-        enumerator: "MIRROR_FOLD"
-        scalar_value: {
-            int32_t: 287312709
-        }
-        enumerator: "SEAT_MEMORY_SELECT"
-        scalar_value: {
-            int32_t: 356518784
-        }
-        enumerator: "SEAT_MEMORY_SET"
-        scalar_value: {
-            int32_t: 356518785
-        }
-        enumerator: "SEAT_BELT_BUCKLED"
-        scalar_value: {
-            int32_t: 354421634
-        }
-        enumerator: "SEAT_BELT_HEIGHT_POS"
-        scalar_value: {
-            int32_t: 356518787
-        }
-        enumerator: "SEAT_BELT_HEIGHT_MOVE"
-        scalar_value: {
-            int32_t: 356518788
-        }
-        enumerator: "SEAT_FORE_AFT_POS"
-        scalar_value: {
-            int32_t: 356518789
-        }
-        enumerator: "SEAT_FORE_AFT_MOVE"
-        scalar_value: {
-            int32_t: 356518790
-        }
-        enumerator: "SEAT_BACKREST_ANGLE_1_POS"
-        scalar_value: {
-            int32_t: 356518791
-        }
-        enumerator: "SEAT_BACKREST_ANGLE_1_MOVE"
-        scalar_value: {
-            int32_t: 356518792
-        }
-        enumerator: "SEAT_BACKREST_ANGLE_2_POS"
-        scalar_value: {
-            int32_t: 356518793
-        }
-        enumerator: "SEAT_BACKREST_ANGLE_2_MOVE"
-        scalar_value: {
-            int32_t: 356518794
-        }
-        enumerator: "SEAT_HEIGHT_POS"
-        scalar_value: {
-            int32_t: 356518795
-        }
-        enumerator: "SEAT_HEIGHT_MOVE"
-        scalar_value: {
-            int32_t: 356518796
-        }
-        enumerator: "SEAT_DEPTH_POS"
-        scalar_value: {
-            int32_t: 356518797
-        }
-        enumerator: "SEAT_DEPTH_MOVE"
-        scalar_value: {
-            int32_t: 356518798
-        }
-        enumerator: "SEAT_TILT_POS"
-        scalar_value: {
-            int32_t: 356518799
-        }
-        enumerator: "SEAT_TILT_MOVE"
-        scalar_value: {
-            int32_t: 356518800
-        }
-        enumerator: "SEAT_LUMBAR_FORE_AFT_POS"
-        scalar_value: {
-            int32_t: 356518801
-        }
-        enumerator: "SEAT_LUMBAR_FORE_AFT_MOVE"
-        scalar_value: {
-            int32_t: 356518802
-        }
-        enumerator: "SEAT_LUMBAR_SIDE_SUPPORT_POS"
-        scalar_value: {
-            int32_t: 356518803
-        }
-        enumerator: "SEAT_LUMBAR_SIDE_SUPPORT_MOVE"
-        scalar_value: {
-            int32_t: 356518804
-        }
-        enumerator: "SEAT_HEADREST_HEIGHT_POS"
-        scalar_value: {
-            int32_t: 289409941
-        }
-        enumerator: "SEAT_HEADREST_HEIGHT_MOVE"
-        scalar_value: {
-            int32_t: 356518806
-        }
-        enumerator: "SEAT_HEADREST_ANGLE_POS"
-        scalar_value: {
-            int32_t: 356518807
-        }
-        enumerator: "SEAT_HEADREST_ANGLE_MOVE"
-        scalar_value: {
-            int32_t: 356518808
-        }
-        enumerator: "SEAT_HEADREST_FORE_AFT_POS"
-        scalar_value: {
-            int32_t: 356518809
-        }
-        enumerator: "SEAT_HEADREST_FORE_AFT_MOVE"
-        scalar_value: {
-            int32_t: 356518810
-        }
-        enumerator: "WINDOW_POS"
-        scalar_value: {
-            int32_t: 289409984
-        }
-        enumerator: "WINDOW_MOVE"
-        scalar_value: {
-            int32_t: 289409985
-        }
-        enumerator: "WINDOW_VENT_POS"
-        scalar_value: {
-            int32_t: 289409986
-        }
-        enumerator: "WINDOW_VENT_MOVE"
-        scalar_value: {
-            int32_t: 289409987
-        }
-        enumerator: "WINDOW_LOCK"
-        scalar_value: {
-            int32_t: 287312836
-        }
-        enumerator: "VEHICLE_MAP_SERVICE"
-        scalar_value: {
-            int32_t: 299895808
-        }
-        enumerator: "OBD2_LIVE_FRAME"
-        scalar_value: {
-            int32_t: 299896064
-        }
-        enumerator: "OBD2_FREEZE_FRAME"
-        scalar_value: {
-            int32_t: 299896065
-        }
-        enumerator: "OBD2_FREEZE_FRAME_INFO"
-        scalar_value: {
-            int32_t: 299896066
-        }
-        enumerator: "OBD2_FREEZE_FRAME_CLEAR"
-        scalar_value: {
-            int32_t: 299896067
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleHvacFanDirection"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FACE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "FLOOR"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FACE_AND_FLOOR"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "DEFROST"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "DEFROST_AND_FLOOR"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleRadioConstants"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "VEHICLE_RADIO_PRESET_MIN_VALUE"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioFocusRequest"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "REQUEST_GAIN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "REQUEST_GAIN_TRANSIENT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "REQUEST_GAIN_TRANSIENT_MAY_DUCK"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "REQUEST_GAIN_TRANSIENT_NO_DUCK"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "REQUEST_RELEASE"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioFocusState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STATE_GAIN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "STATE_GAIN_TRANSIENT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "STATE_LOSS_TRANSIENT_CAN_DUCK"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "STATE_LOSS_TRANSIENT"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "STATE_LOSS"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "STATE_LOSS_TRANSIENT_EXLCUSIVE"
-        scalar_value: {
-            int32_t: 6
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioStreamFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STREAM0_FLAG"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "STREAM1_FLAG"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "STREAM2_FLAG"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioStream"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STREAM0"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "STREAM1"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioExtFocusFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE_FLAG"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "PERMANENT_FLAG"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "TRANSIENT_FLAG"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "PLAY_ONLY_FLAG"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "MUTE_MEDIA_FLAG"
-        scalar_value: {
-            int32_t: 8
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioFocusIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FOCUS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "STREAMS"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "EXTERNAL_FOCUS_STATE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "AUDIO_CONTEXTS"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioContextFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "MUSIC_FLAG"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NAVIGATION_FLAG"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "VOICE_COMMAND_FLAG"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "CALL_FLAG"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "ALARM_FLAG"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "NOTIFICATION_FLAG"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "UNKNOWN_FLAG"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "SAFETY_ALERT_FLAG"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "CD_ROM_FLAG"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "AUX_AUDIO_FLAG"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "SYSTEM_SOUND_FLAG"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "RADIO_FLAG"
-        scalar_value: {
-            int32_t: 2048
-        }
-        enumerator: "EXT_SOURCE_FLAG"
-        scalar_value: {
-            int32_t: 4096
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeCapabilityFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "PERSISTENT_STORAGE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "MASTER_VOLUME_ONLY"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STATE_OK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "LIMIT_REACHED"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INDEX_STREAM"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "INDEX_VOLUME"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "INDEX_STATE"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeLimitIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STREAM"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "MAX_VOLUME"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioRoutingPolicyIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STREAM"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CONTEXTS"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioHwVariantConfigFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INTERNAL_RADIO_FLAG"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerStateConfigFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ENABLE_DEEP_SLEEP_FLAG"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CONFIG_SUPPORT_TIMER_POWER_ON_FLAG"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OFF"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DEEP_SLEEP"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ON_DISP_OFF"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ON_FULL"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SHUTDOWN_PREPARE"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerStateShutdownParam"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SHUTDOWN_IMMEDIATELY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CAN_SLEEP"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SHUTDOWN_ONLY"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerSetState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "BOOT_COMPLETE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DEEP_SLEEP_ENTRY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "DEEP_SLEEP_EXIT"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SHUTDOWN_POSTPONE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "SHUTDOWN_START"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "DISPLAY_OFF"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "DISPLAY_ON"
-        scalar_value: {
-            int32_t: 7
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerStateIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STATE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ADDITIONAL"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerBootupReason"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "USER_POWER_ON"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "USER_UNLOCK"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "TIMER"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleHwKeyInputAction"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ACTION_DOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ACTION_UP"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleDisplay"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "MAIN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "INSTRUMENT_CLUSTER"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleInstrumentClusterType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "HAL_INTERFACE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "EXTERNAL_DISPLAY"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleUnit"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SHOULD_NOT_USE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "METER_PER_SEC"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "RPM"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "HERTZ"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "PERCENTILE"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "MILLIMETER"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "METER"
-        scalar_value: {
-            int32_t: 33
-        }
-        enumerator: "KILOMETER"
-        scalar_value: {
-            int32_t: 35
-        }
-        enumerator: "CELSIUS"
-        scalar_value: {
-            int32_t: 48
-        }
-        enumerator: "FAHRENHEIT"
-        scalar_value: {
-            int32_t: 49
-        }
-        enumerator: "KELVIN"
-        scalar_value: {
-            int32_t: 50
-        }
-        enumerator: "MILLILITER"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "NANO_SECS"
-        scalar_value: {
-            int32_t: 80
-        }
-        enumerator: "SECS"
-        scalar_value: {
-            int32_t: 83
-        }
-        enumerator: "YEAR"
-        scalar_value: {
-            int32_t: 89
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyChangeMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STATIC"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ON_CHANGE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CONTINUOUS"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "POLL"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ON_SET"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyAccess"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "READ"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "WRITE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "READ_WRITE"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleDrivingStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNRESTRICTED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "NO_VIDEO"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NO_KEYBOARD_INPUT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "NO_VOICE_INPUT"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NO_CONFIG"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "LIMIT_MESSAGE_LEN"
-        scalar_value: {
-            int32_t: 16
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleGear"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "GEAR_NEUTRAL"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "GEAR_REVERSE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "GEAR_PARK"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "GEAR_DRIVE"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "GEAR_LOW"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "GEAR_1"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "GEAR_2"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "GEAR_3"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "GEAR_4"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "GEAR_5"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "GEAR_6"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "GEAR_7"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "GEAR_8"
-        scalar_value: {
-            int32_t: 2048
-        }
-        enumerator: "GEAR_9"
-        scalar_value: {
-            int32_t: 4096
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaZone"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ROW_1_LEFT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ROW_1_CENTER"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ROW_1_RIGHT"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ROW_1"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "ROW_2_LEFT"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "ROW_2_CENTER"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "ROW_2_RIGHT"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "ROW_2"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "ROW_3_LEFT"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "ROW_3_CENTER"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "ROW_3_RIGHT"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "ROW_3"
-        scalar_value: {
-            int32_t: 2048
-        }
-        enumerator: "ROW_4_LEFT"
-        scalar_value: {
-            int32_t: 4096
-        }
-        enumerator: "ROW_4_CENTER"
-        scalar_value: {
-            int32_t: 8192
-        }
-        enumerator: "ROW_4_RIGHT"
-        scalar_value: {
-            int32_t: 16384
-        }
-        enumerator: "ROW_4"
-        scalar_value: {
-            int32_t: 32768
-        }
-        enumerator: "WHOLE_CABIN"
-        scalar_value: {
-            int32_t: -2147483648
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaSeat"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ROW_1_LEFT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ROW_1_CENTER"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ROW_1_RIGHT"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ROW_2_LEFT"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "ROW_2_CENTER"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "ROW_2_RIGHT"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "ROW_3_LEFT"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "ROW_3_CENTER"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "ROW_3_RIGHT"
-        scalar_value: {
-            int32_t: 1024
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaWindow"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FRONT_WINDSHIELD"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "REAR_WINDSHIELD"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ROOF_TOP"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ROW_1_LEFT"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "ROW_1_RIGHT"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "ROW_2_LEFT"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "ROW_2_RIGHT"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "ROW_3_LEFT"
-        scalar_value: {
-            int32_t: 4096
-        }
-        enumerator: "ROW_3_RIGHT"
-        scalar_value: {
-            int32_t: 8192
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaDoor"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ROW_1_LEFT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ROW_1_RIGHT"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ROW_2_LEFT"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "ROW_2_RIGHT"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "ROW_3_LEFT"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "ROW_3_RIGHT"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "HOOD"
-        scalar_value: {
-            int32_t: 268435456
-        }
-        enumerator: "REAR"
-        scalar_value: {
-            int32_t: 536870912
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaMirror"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DRIVER_LEFT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DRIVER_RIGHT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "DRIVER_CENTER"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleTurnSignal"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RIGHT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "LEFT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "EMERGENCY"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "areaId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "minInt32Value"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "maxInt32Value"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "minInt64Value"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "maxInt64Value"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "minFloatValue"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "maxFloatValue"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "prop"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "access"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyAccess"
-    }
-    struct_value: {
-        name: "changeMode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyChangeMode"
-    }
-    struct_value: {
-        name: "supportedAreas"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "areaConfigs"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaConfig"
-        }
-    }
-    struct_value: {
-        name: "configFlags"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "configArray"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-    struct_value: {
-        name: "configString"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "minSampleRate"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "maxSampleRate"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
-    type: TYPE_STRUCT
-    sub_struct: {
-        name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue::RawValue"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "int32Values"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int32_t"
-            }
-        }
-        struct_value: {
-            name: "floatValues"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "float_t"
-            }
-        }
-        struct_value: {
-            name: "int64Values"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int64_t"
-            }
-        }
-        struct_value: {
-            name: "bytes"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "stringValue"
-            type: TYPE_STRING
-        }
-    }
-    struct_value: {
-        name: "prop"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "timestamp"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "areaId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "value"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue::RawValue"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehicleIgnitionState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNDEFINED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "LOCK"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "OFF"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ACC"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ON"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "START"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyOperation"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "GENERIC"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SET"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "GET"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SUBSCRIBE"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::SubscribeFlags"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNDEFINED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "HAL_EVENT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SET_CALL"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "DEFAULT"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::SubscribeOptions"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "propId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "vehicleAreas"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "sampleRate"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "flags"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::automotive::vehicle::V2_0::SubscribeFlags"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "TRY_AGAIN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "INVALID_ARG"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "NOT_AVAILABLE"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ACCESS_DENIED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "INTERNAL_ERROR"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::FuelSystemStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OPEN_INSUFFICIENT_ENGINE_TEMPERATURE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CLOSED_LOOP"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "OPEN_ENGINE_LOAD_OR_DECELERATION"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "OPEN_SYSTEM_FAILURE"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "CLOSED_LOOP_BUT_FEEDBACK_FAULT"
-        scalar_value: {
-            int32_t: 16
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::IgnitionMonitorKind"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SPARK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "COMPRESSION"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::CommonIgnitionMonitors"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "COMPONENTS_AVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "COMPONENTS_INCOMPLETE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FUEL_SYSTEM_AVAILABLE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "FUEL_SYSTEM_INCOMPLETE"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "MISFIRE_AVAILABLE"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "MISFIRE_INCOMPLETE"
-        scalar_value: {
-            int32_t: 32
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::SparkIgnitionMonitors"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "COMPONENTS_AVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "COMPONENTS_INCOMPLETE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FUEL_SYSTEM_AVAILABLE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "FUEL_SYSTEM_INCOMPLETE"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "MISFIRE_AVAILABLE"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "MISFIRE_INCOMPLETE"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "EGR_AVAILABLE"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "EGR_INCOMPLETE"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "OXYGEN_SENSOR_HEATER_AVAILABLE"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "OXYGEN_SENSOR_HEATER_INCOMPLETE"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "OXYGEN_SENSOR_AVAILABLE"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "OXYGEN_SENSOR_INCOMPLETE"
-        scalar_value: {
-            int32_t: 2048
-        }
-        enumerator: "AC_REFRIGERANT_AVAILABLE"
-        scalar_value: {
-            int32_t: 4096
-        }
-        enumerator: "AC_REFRIGERANT_INCOMPLETE"
-        scalar_value: {
-            int32_t: 8192
-        }
-        enumerator: "SECONDARY_AIR_SYSTEM_AVAILABLE"
-        scalar_value: {
-            int32_t: 16384
-        }
-        enumerator: "SECONDARY_AIR_SYSTEM_INCOMPLETE"
-        scalar_value: {
-            int32_t: 32768
-        }
-        enumerator: "EVAPORATIVE_SYSTEM_AVAILABLE"
-        scalar_value: {
-            int32_t: 65536
-        }
-        enumerator: "EVAPORATIVE_SYSTEM_INCOMPLETE"
-        scalar_value: {
-            int32_t: 131072
-        }
-        enumerator: "HEATED_CATALYST_AVAILABLE"
-        scalar_value: {
-            int32_t: 262144
-        }
-        enumerator: "HEATED_CATALYST_INCOMPLETE"
-        scalar_value: {
-            int32_t: 524288
-        }
-        enumerator: "CATALYST_AVAILABLE"
-        scalar_value: {
-            int32_t: 1048576
-        }
-        enumerator: "CATALYST_INCOMPLETE"
-        scalar_value: {
-            int32_t: 2097152
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::CompressionIgnitionMonitors"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "COMPONENTS_AVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "COMPONENTS_INCOMPLETE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FUEL_SYSTEM_AVAILABLE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "FUEL_SYSTEM_INCOMPLETE"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "MISFIRE_AVAILABLE"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "MISFIRE_INCOMPLETE"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "EGR_OR_VVT_AVAILABLE"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "EGR_OR_VVT_INCOMPLETE"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "PM_FILTER_AVAILABLE"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "PM_FILTER_INCOMPLETE"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "EXHAUST_GAS_SENSOR_AVAILABLE"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "EXHAUST_GAS_SENSOR_INCOMPLETE"
-        scalar_value: {
-            int32_t: 2048
-        }
-        enumerator: "BOOST_PRESSURE_AVAILABLE"
-        scalar_value: {
-            int32_t: 4096
-        }
-        enumerator: "BOOST_PRESSURE_INCOMPLETE"
-        scalar_value: {
-            int32_t: 8192
-        }
-        enumerator: "NOx_SCR__AVAILABLE"
-        scalar_value: {
-            int32_t: 16384
-        }
-        enumerator: "NOx_SCR_INCOMPLETE"
-        scalar_value: {
-            int32_t: 32768
-        }
-        enumerator: "NMHC_CATALYST_AVAILABLE"
-        scalar_value: {
-            int32_t: 65536
-        }
-        enumerator: "NMHC_CATALYST_INCOMPLETE"
-        scalar_value: {
-            int32_t: 131072
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::Wheel"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "LEFT_FRONT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "RIGHT_FRONT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "LEFT_REAR"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "RIGHT_REAR"
-        scalar_value: {
-            int32_t: 8
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::SecondaryAirStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UPSTREAM"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DOWNSTREAM_OF_CATALYCIC_CONVERTER"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FROM_OUTSIDE_OR_OFF"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "PUMP_ON_FOR_DIAGNOSTICS"
-        scalar_value: {
-            int32_t: 8
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::FuelType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NOT_AVAILABLE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "GASOLINE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "METHANOL"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ETHANOL"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "DIESEL"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "LPG"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "CNG"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "PROPANE"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "ELECTRIC"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "BIFUEL_RUNNING_GASOLINE"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "BIFUEL_RUNNING_METHANOL"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "BIFUEL_RUNNING_ETHANOL"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "BIFUEL_RUNNING_LPG"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "BIFUEL_RUNNING_CNG"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "BIFUEL_RUNNING_PROPANE"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "BIFUEL_RUNNING_ELECTRIC"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "HYBRID_GASOLINE"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "HYBRID_ETHANOL"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "HYBRID_DIESEL"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "HYBRID_ELECTRIC"
-        scalar_value: {
-            int32_t: 20
-        }
-        enumerator: "HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "HYBRID_REGENERATIVE"
-        scalar_value: {
-            int32_t: 22
-        }
-        enumerator: "BIFUEL_RUNNING_DIESEL"
-        scalar_value: {
-            int32_t: 23
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::Obd2IntegerSensorIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FUEL_SYSTEM_STATUS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "MALFUNCTION_INDICATOR_LIGHT_ON"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "IGNITION_MONITORS_SUPPORTED"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "IGNITION_SPECIFIC_MONITORS"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "INTAKE_AIR_TEMPERATURE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "COMMANDED_SECONDARY_AIR_STATUS"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "NUM_OXYGEN_SENSORS_PRESENT"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "RUNTIME_SINCE_ENGINE_START"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "WARMUPS_SINCE_CODES_CLEARED"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "DISTANCE_TRAVELED_SINCE_CODES_CLEARED"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "ABSOLUTE_BAROMETRIC_PRESSURE"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "CONTROL_MODULE_VOLTAGE"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "AMBIENT_AIR_TEMPERATURE"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "TIME_WITH_MALFUNCTION_LIGHT_ON"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "TIME_SINCE_TROUBLE_CODES_CLEARED"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "MAX_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "MAX_OXYGEN_SENSOR_VOLTAGE"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "MAX_OXYGEN_SENSOR_CURRENT"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR"
-        scalar_value: {
-            int32_t: 20
-        }
-        enumerator: "FUEL_TYPE"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "FUEL_RAIL_ABSOLUTE_PRESSURE"
-        scalar_value: {
-            int32_t: 22
-        }
-        enumerator: "ENGINE_OIL_TEMPERATURE"
-        scalar_value: {
-            int32_t: 23
-        }
-        enumerator: "DRIVER_DEMAND_PERCENT_TORQUE"
-        scalar_value: {
-            int32_t: 24
-        }
-        enumerator: "ENGINE_ACTUAL_PERCENT_TORQUE"
-        scalar_value: {
-            int32_t: 25
-        }
-        enumerator: "ENGINE_REFERENCE_PERCENT_TORQUE"
-        scalar_value: {
-            int32_t: 26
-        }
-        enumerator: "ENGINE_PERCENT_TORQUE_DATA_IDLE"
-        scalar_value: {
-            int32_t: 27
-        }
-        enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT1"
-        scalar_value: {
-            int32_t: 28
-        }
-        enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT2"
-        scalar_value: {
-            int32_t: 29
-        }
-        enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT3"
-        scalar_value: {
-            int32_t: 30
-        }
-        enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT4"
-        scalar_value: {
-            int32_t: 31
-        }
-        enumerator: "LAST_SYSTEM_INDEX"
-        scalar_value: {
-            int32_t: 31
-        }
-        enumerator: "VENDOR_START_INDEX"
-        scalar_value: {
-            int32_t: 32
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::Obd2FloatSensorIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "CALCULATED_ENGINE_LOAD"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ENGINE_COOLANT_TEMPERATURE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SHORT_TERM_FUEL_TRIM_BANK1"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "LONG_TERM_FUEL_TRIM_BANK1"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SHORT_TERM_FUEL_TRIM_BANK2"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "LONG_TERM_FUEL_TRIM_BANK2"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "FUEL_PRESSURE"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "INTAKE_MANIFOLD_ABSOLUTE_PRESSURE"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "ENGINE_RPM"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "VEHICLE_SPEED"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "TIMING_ADVANCE"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "MAF_AIR_FLOW_RATE"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "THROTTLE_POSITION"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "OXYGEN_SENSOR1_VOLTAGE"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "OXYGEN_SENSOR2_VOLTAGE"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "OXYGEN_SENSOR3_VOLTAGE"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 20
-        }
-        enumerator: "OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "OXYGEN_SENSOR4_VOLTAGE"
-        scalar_value: {
-            int32_t: 22
-        }
-        enumerator: "OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 23
-        }
-        enumerator: "OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 24
-        }
-        enumerator: "OXYGEN_SENSOR5_VOLTAGE"
-        scalar_value: {
-            int32_t: 25
-        }
-        enumerator: "OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 26
-        }
-        enumerator: "OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 27
-        }
-        enumerator: "OXYGEN_SENSOR6_VOLTAGE"
-        scalar_value: {
-            int32_t: 28
-        }
-        enumerator: "OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 29
-        }
-        enumerator: "OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 30
-        }
-        enumerator: "OXYGEN_SENSOR7_VOLTAGE"
-        scalar_value: {
-            int32_t: 31
-        }
-        enumerator: "OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 33
-        }
-        enumerator: "OXYGEN_SENSOR8_VOLTAGE"
-        scalar_value: {
-            int32_t: 34
-        }
-        enumerator: "OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM"
-        scalar_value: {
-            int32_t: 35
-        }
-        enumerator: "OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 36
-        }
-        enumerator: "FUEL_RAIL_PRESSURE"
-        scalar_value: {
-            int32_t: 37
-        }
-        enumerator: "FUEL_RAIL_GAUGE_PRESSURE"
-        scalar_value: {
-            int32_t: 38
-        }
-        enumerator: "COMMANDED_EXHAUST_GAS_RECIRCULATION"
-        scalar_value: {
-            int32_t: 39
-        }
-        enumerator: "EXHAUST_GAS_RECIRCULATION_ERROR"
-        scalar_value: {
-            int32_t: 40
-        }
-        enumerator: "COMMANDED_EVAPORATIVE_PURGE"
-        scalar_value: {
-            int32_t: 41
-        }
-        enumerator: "FUEL_TANK_LEVEL_INPUT"
-        scalar_value: {
-            int32_t: 42
-        }
-        enumerator: "EVAPORATION_SYSTEM_VAPOR_PRESSURE"
-        scalar_value: {
-            int32_t: 43
-        }
-        enumerator: "CATALYST_TEMPERATURE_BANK1_SENSOR1"
-        scalar_value: {
-            int32_t: 44
-        }
-        enumerator: "CATALYST_TEMPERATURE_BANK2_SENSOR1"
-        scalar_value: {
-            int32_t: 45
-        }
-        enumerator: "CATALYST_TEMPERATURE_BANK1_SENSOR2"
-        scalar_value: {
-            int32_t: 46
-        }
-        enumerator: "CATALYST_TEMPERATURE_BANK2_SENSOR2"
-        scalar_value: {
-            int32_t: 47
-        }
-        enumerator: "ABSOLUTE_LOAD_VALUE"
-        scalar_value: {
-            int32_t: 48
-        }
-        enumerator: "FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO"
-        scalar_value: {
-            int32_t: 49
-        }
-        enumerator: "RELATIVE_THROTTLE_POSITION"
-        scalar_value: {
-            int32_t: 50
-        }
-        enumerator: "ABSOLUTE_THROTTLE_POSITION_B"
-        scalar_value: {
-            int32_t: 51
-        }
-        enumerator: "ABSOLUTE_THROTTLE_POSITION_C"
-        scalar_value: {
-            int32_t: 52
-        }
-        enumerator: "ACCELERATOR_PEDAL_POSITION_D"
-        scalar_value: {
-            int32_t: 53
-        }
-        enumerator: "ACCELERATOR_PEDAL_POSITION_E"
-        scalar_value: {
-            int32_t: 54
-        }
-        enumerator: "ACCELERATOR_PEDAL_POSITION_F"
-        scalar_value: {
-            int32_t: 55
-        }
-        enumerator: "COMMANDED_THROTTLE_ACTUATOR"
-        scalar_value: {
-            int32_t: 56
-        }
-        enumerator: "ETHANOL_FUEL_PERCENTAGE"
-        scalar_value: {
-            int32_t: 57
-        }
-        enumerator: "ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE"
-        scalar_value: {
-            int32_t: 58
-        }
-        enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1"
-        scalar_value: {
-            int32_t: 59
-        }
-        enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2"
-        scalar_value: {
-            int32_t: 60
-        }
-        enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3"
-        scalar_value: {
-            int32_t: 61
-        }
-        enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4"
-        scalar_value: {
-            int32_t: 62
-        }
-        enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1"
-        scalar_value: {
-            int32_t: 63
-        }
-        enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3"
-        scalar_value: {
-            int32_t: 65
-        }
-        enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4"
-        scalar_value: {
-            int32_t: 66
-        }
-        enumerator: "RELATIVE_ACCELERATOR_PEDAL_POSITION"
-        scalar_value: {
-            int32_t: 67
-        }
-        enumerator: "HYBRID_BATTERY_PACK_REMAINING_LIFE"
-        scalar_value: {
-            int32_t: 68
-        }
-        enumerator: "FUEL_INJECTION_TIMING"
-        scalar_value: {
-            int32_t: 69
-        }
-        enumerator: "ENGINE_FUEL_RATE"
-        scalar_value: {
-            int32_t: 70
-        }
-        enumerator: "LAST_SYSTEM_INDEX"
-        scalar_value: {
-            int32_t: 70
-        }
-        enumerator: "VENDOR_START_INDEX"
-        scalar_value: {
-            int32_t: 71
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VmsMessageType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUBSCRIBE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "UNSUBSCRIBE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "DATA"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::automotive::vehicle::V2_0::VmsMessageIntegerValuesIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "VMS_MESSAGE_TYPE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "VMS_LAYER_ID"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "VMS_LAYER_VERSION"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
diff --git a/automotive/vehicle/2.1/Android.mk b/automotive/vehicle/2.1/Android.mk
index 2a8d1dd..f030af08 100644
--- a/automotive/vehicle/2.1/Android.mk
+++ b/automotive/vehicle/2.1/Android.mk
@@ -18,6 +18,177 @@
 
 
 #
+# Build types.hal (CommonIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CommonIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.CommonIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CompressionIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CompressionIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.CompressionIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (FuelSystemStatus)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelSystemStatus.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.FuelSystemStatus
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (FuelType)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.FuelType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (IgnitionMonitorKind)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IgnitionMonitorKind.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.IgnitionMonitorKind
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2FloatSensorIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2FloatSensorIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.Obd2FloatSensorIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2IntegerSensorIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2IntegerSensorIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.Obd2IntegerSensorIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SecondaryAirStatus)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SecondaryAirStatus.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.SecondaryAirStatus
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SparkIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SparkIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.SparkIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (VehicleProperty)
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VehicleProperty.java
@@ -37,6 +208,44 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (VmsMessageIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsMessageIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.VmsMessageIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsMessageType)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsMessageType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.VmsMessageType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build IVehicle.hal
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IVehicle.java
@@ -73,6 +282,177 @@
 
 
 #
+# Build types.hal (CommonIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CommonIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.CommonIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CompressionIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CompressionIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.CompressionIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (FuelSystemStatus)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelSystemStatus.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.FuelSystemStatus
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (FuelType)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.FuelType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (IgnitionMonitorKind)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IgnitionMonitorKind.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.IgnitionMonitorKind
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2FloatSensorIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2FloatSensorIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.Obd2FloatSensorIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2IntegerSensorIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2IntegerSensorIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.Obd2IntegerSensorIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SecondaryAirStatus)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SecondaryAirStatus.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.SecondaryAirStatus
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SparkIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SparkIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.SparkIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (VehicleProperty)
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VehicleProperty.java
@@ -92,6 +472,44 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (VmsMessageIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsMessageIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.VmsMessageIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsMessageType)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsMessageType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.automotive.vehicle@2.1::types.VmsMessageType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build IVehicle.hal
 #
 GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IVehicle.java
diff --git a/automotive/vehicle/2.1/default/Android.mk b/automotive/vehicle/2.1/default/Android.mk
index 1874cb3..3075956 100644
--- a/automotive/vehicle/2.1/default/Android.mk
+++ b/automotive/vehicle/2.1/default/Android.mk
@@ -18,17 +18,47 @@
 vhal_v2_1 = android.hardware.automotive.vehicle@2.1
 
 ###############################################################################
+# Vehicle reference implementation lib
+###############################################################################
+include $(CLEAR_VARS)
+LOCAL_MODULE := $(vhal_v2_1)-manager-lib
+LOCAL_SRC_FILES := \
+    common/src/Obd2SensorStore.cpp
+
+LOCAL_C_INCLUDES := \
+    $(LOCAL_PATH)/common/include/vhal_v2_1 \
+    $(LOCAL_PATH)/../../2.0/default/common/include/vhal_v2_0 \
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := \
+    $(LOCAL_PATH)/common/include
+
+LOCAL_SHARED_LIBRARIES := \
+    libbinder \
+    libhidlbase \
+    libhidltransport \
+    libhwbinder \
+    liblog \
+    libutils \
+    $(vhal_v2_1) \
+
+include $(BUILD_STATIC_LIBRARY)
+
+###############################################################################
 # Vehicle default VehicleHAL implementation
 ###############################################################################
 include $(CLEAR_VARS)
 
 LOCAL_MODULE:= $(vhal_v2_1)-default-impl-lib
+LOCAL_SRC_FILES:= \
+    impl/vhal_v2_1/DefaultVehicleHal.cpp \
 
 LOCAL_C_INCLUDES := \
-    $(LOCAL_PATH)/impl/vhal_v2_1
+    $(LOCAL_PATH)/impl/vhal_v2_1 \
+    $(LOCAL_PATH)/common/include
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := \
-    $(LOCAL_PATH)/impl
+    $(LOCAL_PATH)/impl \
+    $(LOCAL_PATH)/common/include
 
 
 # LOCAL_WHOLE_STATIC_LIBRARIES := \
@@ -36,9 +66,11 @@
 LOCAL_STATIC_LIBRARIES := \
     $(vhal_v2_0)-default-impl-lib \
     $(vhal_v2_0)-manager-lib \
+    $(vhal_v2_1)-manager-lib \
     $(vhal_v2_0)-libproto-native
 
 LOCAL_SHARED_LIBRARIES := \
+    libbase \
     libbinder \
     libhidlbase \
     libhidltransport \
@@ -49,6 +81,8 @@
     $(vhal_v2_0) \
     $(vhal_v2_1) \
 
+LOCAL_CFLAGS += -Wall -Wextra -Werror
+
 include $(BUILD_STATIC_LIBRARY)
 
 ###############################################################################
@@ -58,7 +92,7 @@
 LOCAL_MODULE := $(vhal_v2_1)-service
 LOCAL_INIT_RC := $(vhal_v2_1)-service.rc
 LOCAL_MODULE_RELATIVE_PATH := hw
-
+LOCAL_PROPRIETARY_MODULE := true
 LOCAL_SRC_FILES := \
     service.cpp
 
@@ -69,8 +103,10 @@
     $(vhal_v2_0)-manager-lib \
     $(vhal_v2_0)-default-impl-lib \
     $(vhal_v2_1)-default-impl-lib \
+    $(vhal_v2_1)-manager-lib \
 
 LOCAL_SHARED_LIBRARIES := \
+    libbase \
     libbinder \
     libhidlbase \
     libhidltransport \
@@ -81,4 +117,6 @@
     $(vhal_v2_0) \
     $(vhal_v2_1) \
 
+LOCAL_CFLAGS += -Wall -Wextra -Werror
+
 include $(BUILD_EXECUTABLE)
diff --git a/automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc b/automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc
index 0b642d5..8929d25 100644
--- a/automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc
+++ b/automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc
@@ -1,4 +1,4 @@
-service vehicle-hal-2.1 /system/bin/hw/android.hardware.automotive.vehicle@2.1-service
+service vehicle-hal-2.1 /vendor/bin/hw/android.hardware.automotive.vehicle@2.1-service
     class hal
     user vehicle_network
     group system inet
diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h b/automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
similarity index 80%
rename from automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h
rename to automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
index fe231be..945e3e0 100644
--- a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h
+++ b/automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
@@ -14,18 +14,18 @@
  * limitations under the License.
  */
 
-#ifndef android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
-#define android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
+#ifndef android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_
+#define android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_
 
 #include <vector>
 
-#include "VehicleHal.h"
+#include <android/hardware/automotive/vehicle/2.1/types.h>
 
 namespace android {
 namespace hardware {
 namespace automotive {
 namespace vehicle {
-namespace V2_0 {
+namespace V2_1 {
 
 // This class wraps all the logic required to create an OBD2 frame.
 // It allows storing sensor values, setting appropriate bitmasks as needed,
@@ -38,14 +38,14 @@
                     size_t numVendorFloatSensors);
 
     // Stores an integer-valued sensor.
-    StatusCode setIntegerSensor(Obd2IntegerSensorIndex index, int32_t value);
+    V2_0::StatusCode setIntegerSensor(Obd2IntegerSensorIndex index, int32_t value);
     // Stores an integer-valued sensor.
-    StatusCode setIntegerSensor(size_t index, int32_t value);
+    V2_0::StatusCode setIntegerSensor(size_t index, int32_t value);
 
     // Stores a float-valued sensor.
-    StatusCode setFloatSensor(Obd2FloatSensorIndex index, float value);
+    V2_0::StatusCode setFloatSensor(Obd2FloatSensorIndex index, float value);
     // Stores a float-valued sensor.
-    StatusCode setFloatSensor(size_t index, float value);
+    V2_0::StatusCode setFloatSensor(size_t index, float value);
 
     // Returns a vector that contains all integer sensors stored.
     const std::vector<int32_t>& getIntegerSensors() const;
@@ -55,7 +55,7 @@
     const std::vector<uint8_t>& getSensorsBitmask() const;
 
     // Given a stringValue, fill in a VehiclePropValue
-    void fillPropValue(VehiclePropValue *propValue,
+    void fillPropValue(V2_0::VehiclePropValue *propValue,
             std::string dtc) const;
 
 private:
@@ -77,7 +77,7 @@
     BitmaskInVector mSensorsBitmask;
 };
 
-}  // namespace V2_0
+}  // namespace V2_1
 }  // namespace vehicle
 }  // namespace automotive
 }  // namespace hardware
diff --git a/automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp b/automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
similarity index 79%
rename from automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
rename to automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
index 4ee0a71..b07717b 100644
--- a/automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
+++ b/automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
@@ -23,7 +23,7 @@
 namespace hardware {
 namespace automotive {
 namespace vehicle {
-namespace V2_0 {
+namespace V2_1 {
 
 Obd2SensorStore::BitmaskInVector::BitmaskInVector(size_t numBits)
 {
@@ -57,8 +57,8 @@
 Obd2SensorStore::Obd2SensorStore(size_t numVendorIntegerSensors,
                                  size_t numVendorFloatSensors) {
         // because the last index is valid *inclusive*
-        const size_t numSystemIntegerSensors = toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX)+1;
-        const size_t numSystemFloatSensors = toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX)+1;
+        const size_t numSystemIntegerSensors = V2_0::toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX)+1;
+        const size_t numSystemFloatSensors = V2_0::toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX)+1;
         mIntegerSensors = std::vector<int32_t>(
             numSystemIntegerSensors+numVendorIntegerSensors, 0);
         mFloatSensors = std::vector<float>(
@@ -66,25 +66,25 @@
         mSensorsBitmask.resize(mIntegerSensors.size()+mFloatSensors.size());
 }
 
-StatusCode Obd2SensorStore::setIntegerSensor(Obd2IntegerSensorIndex index,
+V2_0::StatusCode Obd2SensorStore::setIntegerSensor(Obd2IntegerSensorIndex index,
     int32_t value) {
-    return setIntegerSensor(toInt(index), value);
+    return setIntegerSensor(V2_0::toInt(index), value);
 }
-StatusCode Obd2SensorStore::setFloatSensor(Obd2FloatSensorIndex index,
+V2_0::StatusCode Obd2SensorStore::setFloatSensor(Obd2FloatSensorIndex index,
     float value) {
-    return setFloatSensor(toInt(index), value);
+    return setFloatSensor(V2_0::toInt(index), value);
 }
 
-StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) {
+V2_0::StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) {
     mIntegerSensors[index] = value;
     mSensorsBitmask.set(index, true);
-    return StatusCode::OK;
+    return V2_0::StatusCode::OK;
 }
 
-StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) {
+V2_0::StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) {
     mFloatSensors[index] = value;
     mSensorsBitmask.set(index + mIntegerSensors.size(), true);
-    return StatusCode::OK;
+    return V2_0::StatusCode::OK;
 }
 
 const std::vector<int32_t>& Obd2SensorStore::getIntegerSensors() const {
@@ -99,7 +99,7 @@
     return mSensorsBitmask.getBitmask();
 }
 
-void Obd2SensorStore::fillPropValue(VehiclePropValue *propValue,
+void Obd2SensorStore::fillPropValue(V2_0::VehiclePropValue *propValue,
                                     std::string dtc) const {
     propValue->timestamp = elapsedRealtimeNano();
     propValue->value.int32Values = getIntegerSensors();
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
index ab08cec..6bdec59 100644
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
+++ b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
@@ -33,6 +33,38 @@
         .prop = V2_0::toInt(V2_1::VehicleProperty::WHEEL_TICK),
         .access = V2_0::VehiclePropertyAccess::READ,
         .changeMode = V2_0::VehiclePropertyChangeMode::CONTINUOUS,
+    },
+
+    {
+        .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_LIVE_FRAME),
+        .access = V2_0::VehiclePropertyAccess::READ,
+        .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE,
+        .configArray = {0,0}
+    },
+
+    {
+        .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME),
+        .access = V2_0::VehiclePropertyAccess::READ,
+        .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE,
+        .configArray = {0,0}
+    },
+
+    {
+        .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_INFO),
+        .access = V2_0::VehiclePropertyAccess::READ,
+        .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
+    },
+
+    {
+        .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_CLEAR),
+        .access = V2_0::VehiclePropertyAccess::WRITE,
+        .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
+    },
+
+    {
+        .prop = V2_0::toInt(VehicleProperty::VEHICLE_MAP_SERVICE),
+        .access = V2_0::VehiclePropertyAccess::READ_WRITE,
+        .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
     }
 };
 
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.cpp b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.cpp
new file mode 100644
index 0000000..d4eae7f
--- /dev/null
+++ b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.cpp
@@ -0,0 +1,289 @@
+/*
+ * Copyright (C) 2016 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 "DefaultVehicleHal_v2_1"
+#include <android/log.h>
+
+#include <algorithm>
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+#include "DefaultVehicleHal.h"
+#include "VehicleHalProto.pb.h"
+
+#define DEBUG_SOCKET    (33452)
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace vehicle {
+namespace V2_1 {
+
+namespace impl {
+
+static std::unique_ptr<Obd2SensorStore> fillDefaultObd2Frame(
+        size_t numVendorIntegerSensors,
+        size_t numVendorFloatSensors) {
+    std::unique_ptr<Obd2SensorStore> sensorStore(new Obd2SensorStore(
+            numVendorIntegerSensors, numVendorFloatSensors));
+
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::FUEL_SYSTEM_STATUS,
+        V2_0::toInt(FuelSystemStatus::CLOSED_LOOP));
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::MALFUNCTION_INDICATOR_LIGHT_ON, 0);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::IGNITION_MONITORS_SUPPORTED,
+        V2_0::toInt(IgnitionMonitorKind::SPARK));
+    sensorStore->setIntegerSensor(Obd2IntegerSensorIndex::IGNITION_SPECIFIC_MONITORS,
+        CommonIgnitionMonitors::COMPONENTS_AVAILABLE |
+        CommonIgnitionMonitors::MISFIRE_AVAILABLE |
+        SparkIgnitionMonitors::AC_REFRIGERANT_AVAILABLE |
+        SparkIgnitionMonitors::EVAPORATIVE_SYSTEM_AVAILABLE);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::INTAKE_AIR_TEMPERATURE, 35);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::COMMANDED_SECONDARY_AIR_STATUS,
+        V2_0::toInt(SecondaryAirStatus::FROM_OUTSIDE_OR_OFF));
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::NUM_OXYGEN_SENSORS_PRESENT, 1);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::RUNTIME_SINCE_ENGINE_START, 500);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON, 0);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::WARMUPS_SINCE_CODES_CLEARED, 51);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::DISTANCE_TRAVELED_SINCE_CODES_CLEARED, 365);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE, 30);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::CONTROL_MODULE_VOLTAGE, 12);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::AMBIENT_AIR_TEMPERATURE, 18);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::MAX_FUEL_AIR_EQUIVALENCE_RATIO, 1);
+    sensorStore->setIntegerSensor(
+        Obd2IntegerSensorIndex::FUEL_TYPE, V2_0::toInt(FuelType::GASOLINE));
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::CALCULATED_ENGINE_LOAD, 0.153);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK1, -0.16);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK1, -0.16);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK2, -0.16);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK2, -0.16);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::INTAKE_MANIFOLD_ABSOLUTE_PRESSURE, 7.5);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::ENGINE_RPM, 1250.);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::VEHICLE_SPEED, 40.);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::TIMING_ADVANCE, 2.5);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::THROTTLE_POSITION, 19.75);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::OXYGEN_SENSOR1_VOLTAGE, 0.265);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::FUEL_TANK_LEVEL_INPUT, 0.824);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::EVAPORATION_SYSTEM_VAPOR_PRESSURE, -0.373);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::CATALYST_TEMPERATURE_BANK1_SENSOR1, 190.);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::RELATIVE_THROTTLE_POSITION, 3.);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::ABSOLUTE_THROTTLE_POSITION_B, 0.306);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::ACCELERATOR_PEDAL_POSITION_D, 0.188);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::ACCELERATOR_PEDAL_POSITION_E, 0.094);
+    sensorStore->setFloatSensor(
+        Obd2FloatSensorIndex::COMMANDED_THROTTLE_ACTUATOR, 0.024);
+
+    return sensorStore;
+}
+
+void DefaultVehicleHal::initObd2LiveFrame(V2_0::VehiclePropConfig& propConfig) {
+    auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
+            propConfig.configArray[1]);
+    mLiveObd2Frame = createVehiclePropValue(
+            V2_0::VehiclePropertyType::COMPLEX, 0);
+    sensorStore->fillPropValue(mLiveObd2Frame.get(), "");
+}
+
+void DefaultVehicleHal::initObd2FreezeFrame(V2_0::VehiclePropConfig& propConfig) {
+    auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
+            propConfig.configArray[1]);
+
+    mFreezeObd2Frames.push_back(
+            createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX,0));
+    mFreezeObd2Frames.push_back(
+            createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX,0));
+    mFreezeObd2Frames.push_back(
+            createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX,0));
+
+    sensorStore->fillPropValue(mFreezeObd2Frames[0].get(), "P0070");
+    sensorStore->fillPropValue(mFreezeObd2Frames[1].get(), "P0102");
+    sensorStore->fillPropValue(mFreezeObd2Frames[2].get(), "P0123");
+}
+
+V2_0::StatusCode DefaultVehicleHal::fillObd2LiveFrame(V2_0::VehiclePropValue* v) {
+    v->prop = V2_0::toInt(VehicleProperty::OBD2_LIVE_FRAME);
+    v->value.int32Values = mLiveObd2Frame->value.int32Values;
+    v->value.floatValues = mLiveObd2Frame->value.floatValues;
+    v->value.bytes = mLiveObd2Frame->value.bytes;
+    return V2_0::StatusCode::OK;
+}
+
+template<typename Iterable>
+typename Iterable::const_iterator findPropValueAtTimestamp(
+        const Iterable& frames,
+        int64_t timestamp) {
+    return std::find_if(frames.begin(),
+            frames.end(),
+            [timestamp] (const std::unique_ptr<V2_0::VehiclePropValue>&
+                         propValue) -> bool {
+                             return propValue->timestamp == timestamp;
+            });
+}
+
+V2_0::StatusCode DefaultVehicleHal::fillObd2FreezeFrame(
+        const V2_0::VehiclePropValue& requestedPropValue,
+        V2_0::VehiclePropValue* v) {
+    if (requestedPropValue.value.int64Values.size() != 1) {
+        ALOGE("asked for OBD2_FREEZE_FRAME without valid timestamp");
+        return V2_0::StatusCode::INVALID_ARG;
+    }
+    auto timestamp = requestedPropValue.value.int64Values[0];
+    auto freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
+            timestamp);
+    if(mFreezeObd2Frames.end() == freezeFrameIter) {
+        ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
+        return V2_0::StatusCode::INVALID_ARG;
+    }
+    const auto& freezeFrame = *freezeFrameIter;
+    v->prop = V2_0::toInt(VehicleProperty::OBD2_FREEZE_FRAME);
+    v->value.int32Values = freezeFrame->value.int32Values;
+    v->value.floatValues = freezeFrame->value.floatValues;
+    v->value.bytes = freezeFrame->value.bytes;
+    v->value.stringValue = freezeFrame->value.stringValue;
+    v->timestamp = freezeFrame->timestamp;
+    return V2_0::StatusCode::OK;
+}
+
+V2_0::StatusCode DefaultVehicleHal::clearObd2FreezeFrames(
+    const V2_0::VehiclePropValue& propValue) {
+    if (propValue.value.int64Values.size() == 0) {
+        mFreezeObd2Frames.clear();
+        return V2_0::StatusCode::OK;
+    } else {
+        for(int64_t timestamp: propValue.value.int64Values) {
+            auto freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
+                    timestamp);
+            if(mFreezeObd2Frames.end() == freezeFrameIter) {
+                ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
+                return V2_0::StatusCode::INVALID_ARG;
+            }
+            mFreezeObd2Frames.erase(freezeFrameIter);
+        }
+    }
+    return V2_0::StatusCode::OK;
+}
+
+V2_0::StatusCode DefaultVehicleHal::fillObd2DtcInfo(V2_0::VehiclePropValue* v) {
+    std::vector<int64_t> timestamps;
+    for(const auto& freezeFrame: mFreezeObd2Frames) {
+        timestamps.push_back(freezeFrame->timestamp);
+    }
+    v->value.int64Values = timestamps;
+    return V2_0::StatusCode::OK;
+}
+
+void DefaultVehicleHal::onCreate() {
+    mVehicleHal20->init(getValuePool(),
+                        std::bind(&DefaultVehicleHal::doHalEvent, this, _1),
+                        std::bind(&DefaultVehicleHal::doHalPropertySetError, this, _1, _2, _3));
+
+    std::vector<V2_0::VehiclePropConfig> configs = listProperties();
+    for (auto& cfg : configs) {
+        switch(cfg.prop) {
+            case V2_0::toInt(V2_1::VehicleProperty::OBD2_LIVE_FRAME):
+                initObd2LiveFrame(cfg);
+                break;
+            case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME):
+                initObd2FreezeFrame(cfg);
+                break;
+            default:
+                break;
+        }
+    }
+}
+
+DefaultVehicleHal::VehiclePropValuePtr DefaultVehicleHal::get(
+        const V2_0::VehiclePropValue& requestedPropValue,
+        V2_0::StatusCode* outStatus) {
+
+    auto propId = requestedPropValue.prop;
+    VehiclePropValuePtr v = nullptr;
+    auto& pool = *getValuePool();
+
+    switch (propId) {
+    case V2_0::toInt(V2_1::VehicleProperty::OBD2_LIVE_FRAME):
+        v = pool.obtainComplex();
+        *outStatus = fillObd2LiveFrame(v.get());
+        return v;
+    case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME):
+        v = pool.obtainComplex();
+        *outStatus = fillObd2FreezeFrame(requestedPropValue, v.get());
+        return v;
+    case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_INFO):
+        v = pool.obtainComplex();
+        *outStatus = fillObd2DtcInfo(v.get());
+        return v;
+    default:
+        return mVehicleHal20->get(requestedPropValue, outStatus);
+    }
+}
+
+V2_0::StatusCode DefaultVehicleHal::set(
+        const V2_0::VehiclePropValue& propValue) {
+
+    auto propId = propValue.prop;
+    switch (propId) {
+    case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_CLEAR):
+        return clearObd2FreezeFrames(propValue);
+        break;
+    case V2_0::toInt(V2_1::VehicleProperty::VEHICLE_MAP_SERVICE):
+        // Placeholder for future implementation of VMS property in the default hal. For now, just
+        // returns OK; otherwise, hal clients crash with property not supported.
+        return V2_0::StatusCode::OK;
+        break;
+    default:
+        return mVehicleHal20->set(propValue);
+    }
+}
+
+}  // impl
+
+}  // namespace V2_1
+}  // namespace vehicle
+}  // namespace automotive
+}  // namespace hardware
+}  // namespace android
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.h b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.h
index 7ccb354..ac65fc6 100644
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.h
+++ b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.h
@@ -23,6 +23,7 @@
 
 #include <vhal_v2_0/VehicleHal.h>
 #include <vhal_v2_0/DefaultVehicleHal.h>
+#include <vhal_v2_1/Obd2SensorStore.h>
 
 #include "DefaultConfig.h"
 
@@ -52,14 +53,9 @@
     }
 
     VehiclePropValuePtr get(const V2_0::VehiclePropValue& requestedPropValue,
-                            V2_0::StatusCode* outStatus) override {
-        // TODO(pavelm): put logic related to VHAL 2.1 here (OBD, VMS, etc)
-        return mVehicleHal20->get(requestedPropValue, outStatus);
-    }
+                            V2_0::StatusCode* outStatus) override;
 
-    V2_0::StatusCode set(const V2_0::VehiclePropValue& propValue) override {
-        return mVehicleHal20->set(propValue);
-    }
+    V2_0::StatusCode set(const V2_0::VehiclePropValue& propValue) override;
 
     V2_0::StatusCode subscribe(int32_t property,
                                int32_t areas,
@@ -71,14 +67,21 @@
         return mVehicleHal20->unsubscribe(property);
     }
 
-    void onCreate() override {
-        mVehicleHal20->init(getValuePool(),
-                            std::bind(&DefaultVehicleHal::doHalEvent, this, _1),
-                            std::bind(&DefaultVehicleHal::doHalPropertySetError, this, _1, _2, _3));
-    }
+    void onCreate() override;
+
+private:
+    void initObd2LiveFrame(V2_0::VehiclePropConfig& propConfig);
+    void initObd2FreezeFrame(V2_0::VehiclePropConfig& propConfig);
+    V2_0::StatusCode fillObd2LiveFrame(V2_0::VehiclePropValue* v);
+    V2_0::StatusCode fillObd2FreezeFrame(const V2_0::VehiclePropValue& requestedPropValue,
+            V2_0::VehiclePropValue* v);
+    V2_0::StatusCode fillObd2DtcInfo(V2_0::VehiclePropValue *v);
+    V2_0::StatusCode clearObd2FreezeFrames(const V2_0::VehiclePropValue& propValue);
 
 private:
     V2_0::VehicleHal* mVehicleHal20;
+    std::unique_ptr<V2_0::VehiclePropValue> mLiveObd2Frame {nullptr};
+    std::vector<std::unique_ptr<V2_0::VehiclePropValue>> mFreezeObd2Frames;
 };
 
 }  // impl
diff --git a/automotive/vehicle/2.1/default/service.cpp b/automotive/vehicle/2.1/default/service.cpp
index aaadf17..0844622 100644
--- a/automotive/vehicle/2.1/default/service.cpp
+++ b/automotive/vehicle/2.1/default/service.cpp
@@ -88,7 +88,7 @@
     Vehicle_V2_1 vehicle21(vehicleManager.get());
 
     ALOGI("Registering as service...");
-    vehicle21.registerAsService("Vehicle");
+    vehicle21.registerAsService();
 
     configureRpcThreadpool(1, true /* callerWillJoin */);
 
diff --git a/automotive/vehicle/2.0/default/tests/Obd2SensorStore_test.cpp b/automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp
similarity index 100%
rename from automotive/vehicle/2.0/default/tests/Obd2SensorStore_test.cpp
rename to automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp
diff --git a/automotive/vehicle/2.1/types.hal b/automotive/vehicle/2.1/types.hal
index 5df1fbc..9b219b2 100644
--- a/automotive/vehicle/2.1/types.hal
+++ b/automotive/vehicle/2.1/types.hal
@@ -43,4 +43,563 @@
       | VehiclePropertyGroup:SYSTEM
       | VehiclePropertyType:FLOAT_VEC
       | VehicleArea:GLOBAL),
+
+    /*
+     * OBD2 Live Sensor Data
+     *
+     * This property uses COMPLEX data to send a snapshot of the current (live)
+     * values of the OBD2 sensors provided by the vehicle.
+     *
+     * VehiclePropConfig
+     *   configArray[0] : number of vendor-specific integer-valued sensors
+     *                    that can be returned in a frame.
+     *   configArray[1] : number of vendor-specific float-valued sensors
+     *                    that can be returned in a frame.
+     *
+     * The values are to be interpreted as follows:
+     * the indices defined in Obd2IntegerSensorIndex are to be used to
+     * read from int32Values;
+     * the indices defined in Obd2FloatSensorIndex are to be used to
+     * read from floatValues.
+     * the elements of bytes are to be interpreted as a bitmask, such that
+     * the bits 0 thru the integer value of
+     * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
+     * are 1 if the corresponding index is a valid sensor index whose value can
+     * be read in the returned int32Values vector, 0 otherwise.
+     * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
+     * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
+     * are 1 if the corresponding index is a valid sensor index whose value
+     * can be read in the returned floatValues vector, 0 otherwise.
+     *
+     * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
+     * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
+     * is only valid if the corresponding bits in the bytes vector are set to 1.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ
+     */
+    OBD2_LIVE_FRAME = (
+      0x0D00
+      | VehiclePropertyGroup:SYSTEM
+      | VehiclePropertyType:COMPLEX
+      | VehicleArea:GLOBAL),
+
+    /*
+     * OBD2 Freeze Frame Sensor Data
+     *
+     * This property uses COMPLEX data to send a snapshot of the values of the
+     * OBD2 sensors provided by the vehicle at the time that a diagnostic
+     * troubleshooting code (DTC) was recorded by the vehicle.
+     *
+     * VehiclePropConfig
+     *   configArray[0] : number of vendor-specific integer-valued sensors
+     *                    that can be returned in a frame.
+     *   configArray[1] : number of vendor-specific float-valued sensors
+     *                    that can be returned in a frame.
+     *
+     * A get of this property must take the following form:
+     *   int64Values[0]: timestamp of the freeze frame to retrieve.
+     *                   Valid timestamps are given by OBD2_DTC_INFO.
+     *
+     * The values are to be interpreted as follows:
+     * the indices defined in Obd2IntegerSensorIndex are to be used to
+     * read from int32Values;
+     * the indices defined in Obd2FloatSensorIndex are to be used to
+     * read from floatValues;
+     * the elements of bytes are to be interpreted as a bitmask, such that
+     * the bits 0 thru the integer value of
+     * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
+     * are 1 if the corresponding index is a valid sensor index whose value can
+     * be read in the returned int32Values vector, 0 otherwise.
+     * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
+     * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
+     * are 1 if the corresponding index is a valid sensor index whose value
+     * can be read in the returned floatValues vector, 0 otherwise.
+     * stringValue is the DTC that caused this freeze frame to be recorded.
+     *
+     * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
+     * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
+     * is only valid if the corresponding bits in the bytes vector are set to 1,
+     * and a possible valid stringValue is "P0176" to indicate a malfunction
+     * of the fuel composition sensor circuit.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ
+     */
+    OBD2_FREEZE_FRAME = (
+      0x0D01
+      | VehiclePropertyGroup:SYSTEM
+      | VehiclePropertyType:COMPLEX
+      | VehicleArea:GLOBAL),
+
+    /*
+     * OBD2 Freeze Frame Information
+     *
+     * This property describes the current freeze frames stored in vehicle
+     * memory and available for retrieval via OBD2_FREEZE_FRAME.
+     *
+     * The values are to be interpreted as follows:
+     * each element of int64Values is the timestamp at which a a fault code
+     * has been detected and the corresponding freeze frame stored, and each
+     * such element can be used as the key to OBD2_FREEZE_FRAME to retrieve
+     * the corresponding freeze frame.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ
+     */
+    OBD2_FREEZE_FRAME_INFO = (
+      0x0D02
+      | VehiclePropertyGroup:SYSTEM
+      | VehiclePropertyType:COMPLEX
+      | VehicleArea:GLOBAL),
+
+    /*
+     * OBD2 Freeze Frame Clear
+     *
+     * This property allows deletion of any of the freeze frames stored in
+     * vehicle memory, as described by OBD2_DTC_INFO.
+     *
+     * A set of this property is to be interpreted as follows:
+     * if int64Values contains no elements, then all DTCs stored will be cleared;
+     * if int64Values contains one or more elements, then DTCs at the timestamps
+     * stored in int64Values will be cleared, and the others not cleared, except
+     * the memory will be compacted so that all remaining DTCs are stored
+     * contiguously.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:WRITE
+     */
+    OBD2_FREEZE_FRAME_CLEAR = (
+      0x0D03
+      | VehiclePropertyGroup:SYSTEM
+      | VehiclePropertyType:COMPLEX
+      | VehicleArea:GLOBAL),
+
+    /*
+     * Vehicle Maps Service (VMS) message
+     *
+     * This property uses COMPLEX data to communicate vms messages.
+     *
+     * Its contents are to be interpreted as follows:
+     * the indices defined in VmsMessageIntegerValuesIndex are to be used to
+     * read from int32Values;
+     * bytes is a serialized VMS message as defined in the vms protocol
+     * which is opaque to the framework;
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ_WRITE
+     */
+    VEHICLE_MAP_SERVICE = (
+        0x0C00
+        | VehiclePropertyGroup:SYSTEM
+        | VehiclePropertyType:COMPLEX
+        | VehicleArea:GLOBAL),
+};
+
+/* The status of a fuel system as described by the OBD2 specification. */
+enum FuelSystemStatus : int32_t {
+  OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
+
+  CLOSED_LOOP = 2,
+
+  OPEN_ENGINE_LOAD_OR_DECELERATION = 4,
+
+  OPEN_SYSTEM_FAILURE = 8,
+
+  CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
+};
+
+/* Defines which ignition monitors are available to be read. */
+enum IgnitionMonitorKind : int32_t {
+  SPARK = 0,
+
+  COMPRESSION = 1,
+};
+
+/* These ignition monitors are common to both SPARK and COMPRESSION. */
+enum CommonIgnitionMonitors : int32_t {
+  COMPONENTS_AVAILABLE = 0x1 << 0,
+  COMPONENTS_INCOMPLETE = 0x1 << 1,
+
+  FUEL_SYSTEM_AVAILABLE = 0x1 << 2,
+  FUEL_SYSTEM_INCOMPLETE = 0x1 << 3,
+
+  MISFIRE_AVAILABLE = 0x1 << 4,
+  MISFIRE_INCOMPLETE = 0x1 << 5,
+};
+
+/* Ignition monitors available for SPARK vehicles. */
+enum SparkIgnitionMonitors : CommonIgnitionMonitors {
+  EGR_AVAILABLE = 0x1 << 6,
+  EGR_INCOMPLETE = 0x1 << 7,
+
+  OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8,
+  OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9,
+
+  OXYGEN_SENSOR_AVAILABLE = 0x1 << 10,
+  OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11,
+
+  AC_REFRIGERANT_AVAILABLE = 0x1 << 12,
+  AC_REFRIGERANT_INCOMPLETE = 0x1 << 13,
+
+  SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14,
+  SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15,
+
+  EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16,
+  EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17,
+
+  HEATED_CATALYST_AVAILABLE = 0x1 << 18,
+  HEATED_CATALYST_INCOMPLETE = 0x1 << 19,
+
+  CATALYST_AVAILABLE = 0x1 << 20,
+  CATALYST_INCOMPLETE = 0x1 << 21,
+};
+
+/* Ignition monitors only available for COMPRESSION vehicles. */
+enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
+  EGR_OR_VVT_AVAILABLE = 0x1 << 6,
+  EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
+
+  PM_FILTER_AVAILABLE = 0x1 << 8,
+  PM_FILTER_INCOMPLETE = 0x1 << 9,
+
+  EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10,
+  EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11,
+
+  BOOST_PRESSURE_AVAILABLE = 0x1 << 12,
+  BOOST_PRESSURE_INCOMPLETE = 0x1 << 13,
+
+  NOx_SCR__AVAILABLE = 0x1 << 14,
+  NOx_SCR_INCOMPLETE = 0x1 << 15,
+
+  NMHC_CATALYST_AVAILABLE = 0x1 << 16,
+  NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
+};
+
+enum SecondaryAirStatus : int32_t {
+  UPSTREAM = 1,
+
+  DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
+
+  FROM_OUTSIDE_OR_OFF = 4,
+
+  PUMP_ON_FOR_DIAGNOSTICS = 8,
+};
+
+enum FuelType : int32_t {
+  NOT_AVAILABLE = 0,
+
+  GASOLINE = 1,
+
+  METHANOL = 2,
+
+  ETHANOL = 3,
+
+  DIESEL = 4,
+
+  LPG = 5,
+
+  CNG = 6,
+
+  PROPANE = 7,
+
+  ELECTRIC = 8,
+
+  BIFUEL_RUNNING_GASOLINE = 9,
+
+  BIFUEL_RUNNING_METHANOL = 10,
+
+  BIFUEL_RUNNING_ETHANOL = 11,
+
+  BIFUEL_RUNNING_LPG = 12,
+
+  BIFUEL_RUNNING_CNG = 13,
+
+  BIFUEL_RUNNING_PROPANE = 14,
+
+  BIFUEL_RUNNING_ELECTRIC = 15,
+
+  BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 16,
+
+  HYBRID_GASOLINE = 17,
+
+  HYBRID_ETHANOL = 18,
+
+  HYBRID_DIESEL = 19,
+
+  HYBRID_ELECTRIC = 20,
+
+  HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 21,
+
+  HYBRID_REGENERATIVE = 22,
+
+  BIFUEL_RUNNING_DIESEL = 23,
+};
+
+/*
+ * This enum provides the canonical mapping for sensor properties that have an integer value.
+ * The ordering of the values is taken from the OBD2 specification.
+ * Some of the properties are represented as an integer mapping to another enum. In those cases
+ * expect a comment by the property definition describing the enum to look at for the mapping.
+ * Any value greater than the last reserved index is available to vendors to map their extensions.
+ */
+enum Obd2IntegerSensorIndex : int32_t {
+  /* refer to FuelSystemStatus for a description of this value. */
+  FUEL_SYSTEM_STATUS = 0,
+
+  MALFUNCTION_INDICATOR_LIGHT_ON = 1,
+
+  /* refer to IgnitionMonitorKind for a description of this value. */
+  IGNITION_MONITORS_SUPPORTED = 2,
+
+  /*
+   * The value of this sensor is a bitmask that specifies whether ignition-specific
+   * tests are available and whether they are complete. The semantics of the individual
+   * bits in this value are given by, respectively, SparkIgnitionMonitors and
+   * CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
+   */
+  IGNITION_SPECIFIC_MONITORS = 3,
+
+  INTAKE_AIR_TEMPERATURE = 4,
+
+  /* refer to SecondaryAirStatus for a description of this value. */
+  COMMANDED_SECONDARY_AIR_STATUS = 5,
+
+  NUM_OXYGEN_SENSORS_PRESENT = 6,
+
+  RUNTIME_SINCE_ENGINE_START = 7,
+
+  DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8,
+
+  WARMUPS_SINCE_CODES_CLEARED = 9,
+
+  DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10,
+
+  ABSOLUTE_BAROMETRIC_PRESSURE = 11,
+
+  CONTROL_MODULE_VOLTAGE = 12,
+
+  AMBIENT_AIR_TEMPERATURE = 13,
+
+  TIME_WITH_MALFUNCTION_LIGHT_ON = 14,
+
+  TIME_SINCE_TROUBLE_CODES_CLEARED = 15,
+
+  MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16,
+
+  MAX_OXYGEN_SENSOR_VOLTAGE = 17,
+
+  MAX_OXYGEN_SENSOR_CURRENT = 18,
+
+  MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19,
+
+  MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
+
+  /* refer to FuelType for a description of this value. */
+  FUEL_TYPE = 21,
+
+  FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
+
+  ENGINE_OIL_TEMPERATURE = 23,
+
+  DRIVER_DEMAND_PERCENT_TORQUE = 24,
+
+  ENGINE_ACTUAL_PERCENT_TORQUE = 25,
+
+  ENGINE_REFERENCE_PERCENT_TORQUE = 26,
+
+  ENGINE_PERCENT_TORQUE_DATA_IDLE = 27,
+
+  ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28,
+
+  ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29,
+
+  ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30,
+
+  ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31,
+
+  LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
+};
+
+/*
+ * This enum provides the canonical mapping for sensor properties that have a floating-point value.
+ * The ordering of the values is taken from the OBD2 specification.
+ * Any value greater than the last reserved index is available to vendors to map their extensions.
+ */
+enum Obd2FloatSensorIndex : int32_t {
+  CALCULATED_ENGINE_LOAD = 0,
+
+  ENGINE_COOLANT_TEMPERATURE = 1,
+
+  SHORT_TERM_FUEL_TRIM_BANK1 = 2,
+
+  LONG_TERM_FUEL_TRIM_BANK1 = 3,
+
+  SHORT_TERM_FUEL_TRIM_BANK2 = 4,
+
+  LONG_TERM_FUEL_TRIM_BANK2 = 5,
+
+  FUEL_PRESSURE = 6,
+
+  INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7,
+
+  ENGINE_RPM = 8,
+
+  VEHICLE_SPEED = 9,
+
+  TIMING_ADVANCE = 10,
+
+  MAF_AIR_FLOW_RATE = 11,
+
+  THROTTLE_POSITION = 12,
+
+  OXYGEN_SENSOR1_VOLTAGE = 13,
+
+  OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14,
+
+  OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15,
+
+  OXYGEN_SENSOR2_VOLTAGE = 16,
+
+  OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17,
+
+  OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18,
+
+  OXYGEN_SENSOR3_VOLTAGE = 19,
+
+  OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20,
+
+  OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21,
+
+  OXYGEN_SENSOR4_VOLTAGE = 22,
+
+  OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23,
+
+  OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24,
+
+  OXYGEN_SENSOR5_VOLTAGE = 25,
+
+  OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26,
+
+  OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27,
+
+  OXYGEN_SENSOR6_VOLTAGE = 28,
+
+  OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29,
+
+  OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30,
+
+  OXYGEN_SENSOR7_VOLTAGE = 31,
+
+  OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32,
+
+  OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33,
+
+  OXYGEN_SENSOR8_VOLTAGE = 34,
+
+  OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35,
+
+  OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36,
+
+  FUEL_RAIL_PRESSURE = 37,
+
+  FUEL_RAIL_GAUGE_PRESSURE = 38,
+
+  COMMANDED_EXHAUST_GAS_RECIRCULATION = 39,
+
+  EXHAUST_GAS_RECIRCULATION_ERROR = 40,
+
+  COMMANDED_EVAPORATIVE_PURGE = 41,
+
+  FUEL_TANK_LEVEL_INPUT = 42,
+
+  EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43,
+
+  CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44,
+
+  CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45,
+
+  CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46,
+
+  CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47,
+
+  ABSOLUTE_LOAD_VALUE = 48,
+
+  FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49,
+
+  RELATIVE_THROTTLE_POSITION = 50,
+
+  ABSOLUTE_THROTTLE_POSITION_B = 51,
+
+  ABSOLUTE_THROTTLE_POSITION_C = 52,
+
+  ACCELERATOR_PEDAL_POSITION_D = 53,
+
+  ACCELERATOR_PEDAL_POSITION_E = 54,
+
+  ACCELERATOR_PEDAL_POSITION_F = 55,
+
+  COMMANDED_THROTTLE_ACTUATOR = 56,
+
+  ETHANOL_FUEL_PERCENTAGE = 57,
+
+  ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58,
+
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59,
+
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60,
+
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,
+
+  SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62,
+
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63,
+
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64,
+
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65,
+
+  LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66,
+
+  RELATIVE_ACCELERATOR_PEDAL_POSITION = 67,
+
+  HYBRID_BATTERY_PACK_REMAINING_LIFE = 68,
+
+  FUEL_INJECTION_TIMING = 69,
+
+  ENGINE_FUEL_RATE = 70,
+
+  LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
+};
+
+/*
+ * This enum lists the types of supported VMS messages.
+ */
+enum VmsMessageType : int32_t {
+  /* A client subscribes to a layer. */
+  SUBSCRIBE = 1,
+
+  /* A client unsubscribes from a layer. */
+  UNSUBSCRIBE = 2,
+
+  /* A client publishes a data packet. */
+  DATA = 3,
+};
+
+/*
+ * This enum provides the canonical mapping for VMS properties that have an
+ * integer value.
+ */
+enum VmsMessageIntegerValuesIndex : int32_t {
+  /* The message type as enumerated by VmsMessageType enum. */
+  VMS_MESSAGE_TYPE = 0,
+
+  /* The layer ID as defined in the vms protocol. */
+  VMS_LAYER_ID = 1,
+
+  /* The version of the VMS layer. */
+  VMS_LAYER_VERSION = 2,
+
+  /* The number of bytes in the payload */
+  VMS_PAYLOAD_SIZE_BYTES = 3,
 };
diff --git a/benchmarks/Android.bp b/benchmarks/Android.bp
deleted file mode 100644
index ab0f308..0000000
--- a/benchmarks/Android.bp
+++ /dev/null
@@ -1,4 +0,0 @@
-// This is an autogenerated file, do not edit.
-subdirs = [
-    "msgq/1.0",
-]
diff --git a/benchmarks/msgq/1.0/Android.bp b/benchmarks/msgq/1.0/Android.bp
deleted file mode 100644
index 7f8ea99..0000000
--- a/benchmarks/msgq/1.0/Android.bp
+++ /dev/null
@@ -1,59 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-
-filegroup {
-    name: "android.hardware.benchmarks.msgq@1.0_hal",
-    srcs: [
-        "IBenchmarkMsgQ.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.benchmarks.msgq@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.benchmarks.msgq@1.0",
-    srcs: [
-        ":android.hardware.benchmarks.msgq@1.0_hal",
-    ],
-    out: [
-        "android/hardware/benchmarks/msgq/1.0/BenchmarkMsgQAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.benchmarks.msgq@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.benchmarks.msgq@1.0",
-    srcs: [
-        ":android.hardware.benchmarks.msgq@1.0_hal",
-    ],
-    out: [
-        "android/hardware/benchmarks/msgq/1.0/IBenchmarkMsgQ.h",
-        "android/hardware/benchmarks/msgq/1.0/IHwBenchmarkMsgQ.h",
-        "android/hardware/benchmarks/msgq/1.0/BnHwBenchmarkMsgQ.h",
-        "android/hardware/benchmarks/msgq/1.0/BpHwBenchmarkMsgQ.h",
-        "android/hardware/benchmarks/msgq/1.0/BsBenchmarkMsgQ.h",
-    ],
-}
-
-cc_library_shared {
-    name: "android.hardware.benchmarks.msgq@1.0",
-    generated_sources: ["android.hardware.benchmarks.msgq@1.0_genc++"],
-    generated_headers: ["android.hardware.benchmarks.msgq@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.benchmarks.msgq@1.0_genc++_headers"],
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "android.hidl.base@1.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hidl.base@1.0",
-    ],
-}
diff --git a/biometrics/Android.bp b/biometrics/Android.bp
index b4681e4..c87e3af 100644
--- a/biometrics/Android.bp
+++ b/biometrics/Android.bp
@@ -1,5 +1,5 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
     "fingerprint/2.1",
-    "fingerprint/2.1/vts/functional"
+    "fingerprint/2.1/vts/functional",
 ]
diff --git a/biometrics/fingerprint/2.1/default/Android.mk b/biometrics/fingerprint/2.1/default/Android.mk
index ea20130..3d06397 100644
--- a/biometrics/fingerprint/2.1/default/Android.mk
+++ b/biometrics/fingerprint/2.1/default/Android.mk
@@ -15,7 +15,6 @@
     libhidlbase \
     libhidltransport \
     libhardware \
-    libhwbinder \
     libkeystore_binder \
     libutils \
     android.hardware.biometrics.fingerprint@2.1 \
diff --git a/biometrics/fingerprint/2.1/vts/BiometricsFingerprint.vts b/biometrics/fingerprint/2.1/vts/BiometricsFingerprint.vts
deleted file mode 100644
index 0581da0..0000000
--- a/biometrics/fingerprint/2.1/vts/BiometricsFingerprint.vts
+++ /dev/null
@@ -1,191 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IBiometricsFingerprint"
-
-package: "android.hardware.biometrics.fingerprint"
-
-import: "android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprintClientCallback"
-import: "android.hardware.biometrics.fingerprint@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "setNotify"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback"
-        }
-        callflow: {
-            next: "setActiveGroup"
-        }
-        callflow: {
-            entry: true
-        }
-    }
-
-    api: {
-        name: "preEnroll"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "enroll"
-            next: "postEnroll"
-        }
-    }
-
-    api: {
-        name: "enroll"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 69
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "cancel"
-            next: "enroll"
-            next: "postEnroll"
-            next: "remove"
-        }
-    }
-
-    api: {
-        name: "postEnroll"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-        }
-        callflow: {
-            next: "authenticate"
-            next: "setActiveGroup"
-            next: "enumerate"
-            next: "remove"
-        }
-    }
-
-    api: {
-        name: "getAuthenticatorId"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "authenticate"
-        }
-    }
-
-    api: {
-        name: "cancel"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-        }
-        callflow: {
-            next: "authenticate"
-            next: "enroll"
-            next: "enumerate"
-            next: "remove"
-            next: "setActiveGroup"
-        }
-    }
-
-    api: {
-        name: "enumerate"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-        }
-        callflow: {
-            next: "remove"
-            next: "enroll"
-            next: "authenticate"
-            next: "setActiveGroup"
-        }
-    }
-
-    api: {
-        name: "remove"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "enumerate"
-            next: "authenticate"
-            next: "cancel"
-            next: "getAuthenticatorId"
-            next: "setActiveGroup"
-        }
-    }
-
-    api: {
-        name: "setActiveGroup"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        callflow: {
-            next: "authenticate"
-            next: "preEnroll"
-            next: "enumerate"
-            next: "remove"
-        }
-    }
-
-    api: {
-        name: "authenticate"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "cancel"
-            next: "preEnroll"
-            next: "remove"
-        }
-    }
-
-}
diff --git a/biometrics/fingerprint/2.1/vts/BiometricsFingerprintClientCallback.vts b/biometrics/fingerprint/2.1/vts/BiometricsFingerprintClientCallback.vts
deleted file mode 100644
index dedda65..0000000
--- a/biometrics/fingerprint/2.1/vts/BiometricsFingerprintClientCallback.vts
+++ /dev/null
@@ -1,126 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IBiometricsFingerprintClientCallback"
-
-package: "android.hardware.biometrics.fingerprint"
-
-import: "android.hardware.biometrics.fingerprint@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onEnrollResult"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onAcquired"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "onAuthenticated"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onError"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintError"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "onRemoved"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onEnumerate"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/biometrics/fingerprint/2.1/vts/functional/Android.bp b/biometrics/fingerprint/2.1/vts/functional/Android.bp
index 25f7cc0..27b7157 100644
--- a/biometrics/fingerprint/2.1/vts/functional/Android.bp
+++ b/biometrics/fingerprint/2.1/vts/functional/Android.bp
@@ -15,20 +15,19 @@
 //
 
 cc_test {
-    name: "fingerprint_hidl_hal_test",
-    gtest: true,
-    srcs: ["fingerprint_hidl_hal_test.cpp"],
+    name: "VtsHalBiometricsFingerprintV2_1TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalBiometricsFingerprintV2_1TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "libhidltransport",
         "libhardware",
-        "libhwbinder",
         "libhidlbase",
         "liblog",
         "libutils",
         "android.hardware.biometrics.fingerprint@2.1",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/biometrics/fingerprint/2.1/vts/functional/VtsHalBiometricsFingerprintV2_1TargetTest.cpp b/biometrics/fingerprint/2.1/vts/functional/VtsHalBiometricsFingerprintV2_1TargetTest.cpp
new file mode 100644
index 0000000..c07c3e3
--- /dev/null
+++ b/biometrics/fingerprint/2.1/vts/functional/VtsHalBiometricsFingerprintV2_1TargetTest.cpp
@@ -0,0 +1,190 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "fingerprint_hidl_hal_test"
+#define SERVICE_NAME "fingerprint_hal"
+
+#include <android-base/logging.h>
+#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
+#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprintClientCallback.h>
+#include <hidl/HidlSupport.h>
+#include <hidl/HidlTransportSupport.h>
+#include <VtsHalHidlTargetTestBase.h>
+
+using android::Condition;
+using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
+using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
+using android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo;
+using android::hardware::biometrics::fingerprint::V2_1::FingerprintError;
+using android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
+using android::hardware::hidl_vec;
+using android::hardware::Return;
+using android::Mutex;
+using android::sp;
+
+class FingerprintHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+
+protected:
+    class MyCallback : public IBiometricsFingerprintClientCallback {
+
+        // implement methods of IBiometricsFingerprintClientCallback
+        virtual Return<void> onEnrollResult(uint64_t, uint32_t, uint32_t,
+                uint32_t) override {
+            callBackCalled();
+            return Return<void>();
+        }
+
+        virtual Return<void> onAcquired(uint64_t, FingerprintAcquiredInfo,
+                int32_t) override {
+            callBackCalled();
+            return Return<void>();
+        }
+
+        virtual Return<void> onAuthenticated(uint64_t, uint32_t, uint32_t,
+                const hidl_vec<uint8_t>&) override {
+            callBackCalled();
+            return Return<void>();
+        }
+
+        virtual Return<void> onError(uint64_t, FingerprintError error, int32_t)
+                override {
+            mTestCase->mErr = error;
+            callBackCalled();
+            return Return<void>();
+        }
+
+        virtual Return<void> onRemoved(uint64_t, uint32_t, uint32_t, uint32_t)
+                override {
+            callBackCalled();
+            return Return<void>();
+        }
+
+        virtual Return<void> onEnumerate(uint64_t, uint32_t, uint32_t,
+                uint32_t) override {
+            callBackCalled();
+            return Return<void>();
+        }
+
+        void callBackCalled () {
+            mTestCase->mCallbackCalled = true;
+            mTestCase->mCallbackCond.broadcast();
+        }
+
+        FingerprintHidlTest* mTestCase;
+    public:
+        MyCallback(FingerprintHidlTest* aTest) : mTestCase(aTest) {}
+    };
+
+    sp<MyCallback> mCallback;
+    bool mCallbackCalled;
+    Condition mCallbackCond;
+    FingerprintError mErr;
+    Mutex mLock;
+    sp<IBiometricsFingerprint> mService;
+    static const unsigned int kThresholdInSeconds = 3;
+
+    void clearErr () {
+        mErr = FingerprintError::ERROR_NO_ERROR;
+    }
+
+    // Timed callback mechanism.  Will block up to kThresholdInSeconds,
+    // returning true if callback was invoked in that time frame.
+    bool waitForCallback(const unsigned int seconds = kThresholdInSeconds) {
+        nsecs_t reltime = seconds_to_nanoseconds(seconds);
+        Mutex::Autolock _l(mLock);
+        nsecs_t endTime = systemTime() + reltime;
+        while (!mCallbackCalled) {
+            if (reltime == 0) {
+                mCallbackCond.wait(mLock);
+            } else {
+                nsecs_t now = systemTime();
+                if (now > endTime) {
+                    return false;
+                }
+                mCallbackCond.waitRelative(mLock, endTime - now);
+            }
+        }
+        return true;
+    }
+public:
+    FingerprintHidlTest (): mCallbackCalled(false) {}
+
+    virtual void SetUp() override {
+        mService = ::testing::VtsHalHidlTargetTestBase::getService<IBiometricsFingerprint>(SERVICE_NAME);
+
+        ASSERT_NE(mService, nullptr);
+        clearErr();
+
+        mCallback = new MyCallback(this);
+        // TODO: instantly fail any test that receives a death notification
+    }
+
+    virtual void TearDown() override {}
+};
+
+class FingerprintHidlEnvironment : public ::testing::Environment {
+public:
+    virtual void SetUp() {}
+    virtual void TearDown() {}
+};
+
+// The service should be reachable.
+TEST_F(FingerprintHidlTest, ConnectTest) {
+    Return<uint64_t> rc = mService->setNotify(mCallback);
+    EXPECT_NE(rc, 0UL);
+}
+
+// Cancel should always return ERROR_CANCELED from any starting state including
+// the IDLE state.
+TEST_F(FingerprintHidlTest, CancelTest) {
+    Return<uint64_t> rc = mService->setNotify(mCallback);
+    EXPECT_NE(rc, 0UL);
+
+    Return<RequestStatus> res = mService->cancel();
+    // make sure callback was invoked within kThresholdInSeconds
+    EXPECT_EQ(true, waitForCallback());
+    // check that we were able to make an IPC request successfully
+    EXPECT_EQ(RequestStatus::SYS_OK, res);
+    // check error should be ERROR_CANCELED
+    EXPECT_EQ(FingerprintError::ERROR_CANCELED, mErr);
+}
+
+// A call to cancel should after any other method call should set the error
+// state to canceled.
+TEST_F(FingerprintHidlTest, AuthTest) {
+    Return<uint64_t> rc = mService->setNotify(mCallback);
+    EXPECT_NE(rc, 0UL);
+
+    Return<RequestStatus> res = mService->authenticate(0, 0);
+    // check that we were able to make an IPC request successfully
+    EXPECT_EQ(RequestStatus::SYS_OK, res);
+
+    res = mService->cancel();
+    // make sure callback was invoked within kThresholdInSeconds
+    EXPECT_EQ(true, waitForCallback());
+    // check that we were able to make an IPC request successfully
+    EXPECT_EQ(RequestStatus::SYS_OK, res);
+    // check error should be ERROR_CANCELED
+    EXPECT_EQ(FingerprintError::ERROR_CANCELED, mErr);
+}
+
+int main(int argc, char **argv) {
+    ::testing::AddGlobalTestEnvironment(new FingerprintHidlEnvironment);
+    ::testing::InitGoogleTest(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    LOG(INFO) << "Test result = " << status;
+    return status;
+}
diff --git a/biometrics/fingerprint/2.1/vts/functional/fingerprint_hidl_hal_test.cpp b/biometrics/fingerprint/2.1/vts/functional/fingerprint_hidl_hal_test.cpp
deleted file mode 100644
index 9138000..0000000
--- a/biometrics/fingerprint/2.1/vts/functional/fingerprint_hidl_hal_test.cpp
+++ /dev/null
@@ -1,158 +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.
- */
-
-#define LOG_TAG "fingerprint_hidl_hal_test"
-
-#include <android-base/logging.h>
-#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
-#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprintClientCallback.h>
-#include <chrono>
-#include <gtest/gtest.h>
-#include <hidl/HidlSupport.h>
-#include <hidl/HidlTransportSupport.h>
-
-using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
-using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
-using android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo;
-using android::hardware::biometrics::fingerprint::V2_1::FingerprintError;
-using android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
-using android::hardware::hidl_vec;
-using android::hardware::Return;
-
-#define SERVICE_NAME "fingerprint_hal"
-
-class FingerprintHidlTest : public ::testing::Test,
-    public IBiometricsFingerprintClientCallback {
-
-protected:
-    android::sp<IBiometricsFingerprint> service;
-    FingerprintError err;
-    // State changes should occur within this threshold, otherwise the
-    // framework' will assume things have broken.
-    std::chrono::seconds threshold;
-
-public:
-    FingerprintHidlTest ():
-        err(FingerprintError::ERROR_NO_ERROR), threshold(1) {}
-
-    virtual void SetUp() override {
-        service = IBiometricsFingerprint::getService(SERVICE_NAME);
-
-        ASSERT_NE(service, nullptr);
-        clearErr();
-
-        // TODO: instantly fail any test that receives a death notification
-    }
-
-    virtual void TearDown() override {}
-
-    // implement methods of IBiometricsFingerprintClientCallback
-    virtual Return<void> onEnrollResult(uint64_t, uint32_t, uint32_t, uint32_t)
-            override {
-        return Return<void>();
-    }
-    virtual Return<void> onAcquired(uint64_t, FingerprintAcquiredInfo, int32_t)
-            override {
-        return Return<void>();
-    }
-
-    virtual Return<void> onAuthenticated(uint64_t, uint32_t, uint32_t, const
-            hidl_vec<uint8_t>&) override {
-        return Return<void>();
-    }
-
-    virtual Return<void> onError(uint64_t, FingerprintError error, int32_t)
-            override {
-        err = error;
-        return Return<void>();
-    }
-
-    virtual Return<void> onRemoved(uint64_t, uint32_t, uint32_t, uint32_t)
-            override {
-        return Return<void>();
-    }
-
-    virtual Return<void> onEnumerate(uint64_t, uint32_t, uint32_t, uint32_t)
-            override {
-        return Return<void>();
-    }
-
-    void clearErr () {
-        err = FingerprintError::ERROR_NO_ERROR;
-    }
-};
-
-class FingerprintHidlEnvironment : public ::testing::Environment {
-public:
-    virtual void SetUp() {}
-    virtual void TearDown() {}
-};
-
-// The service should be reachable.
-TEST_F(FingerprintHidlTest, ConnectTest) {
-    Return<uint64_t> rc = service->setNotify(this);
-    EXPECT_NE(rc, 0UL);
-}
-
-// Cancel should always return ERROR_CANCELED from any starting state including
-// the IDLE state.
-TEST_F(FingerprintHidlTest, CancelTest) {
-    Return<uint64_t> rc = service->setNotify(this);
-    EXPECT_NE(rc, 0UL);
-
-    auto start = std::chrono::system_clock::now();
-    Return<RequestStatus> res = service->cancel();
-    auto end = std::chrono::system_clock::now();
-    auto diff = end - start;
-
-    // check that we were able to make an IPC request successfully
-    EXPECT_EQ(RequestStatus::SYS_OK, res);
-    // check error should be ERROR_CANCELED
-    EXPECT_EQ(FingerprintError::ERROR_CANCELED, err);
-    // check that this did not take longer than a threshold
-    EXPECT_TRUE(diff <= threshold);
-}
-
-// A call to cancel should after any other method call should set the error
-// state to canceled.
-TEST_F(FingerprintHidlTest, AuthTest) {
-    Return<uint64_t> rc = service->setNotify(this);
-    EXPECT_NE(rc, 0UL);
-
-    Return<RequestStatus> res = service->authenticate(0, 0);
-    // check that we were able to make an IPC request successfully
-    EXPECT_EQ(RequestStatus::SYS_OK, res);
-
-    auto start = std::chrono::system_clock::now();
-    res = service->cancel();
-    auto end = std::chrono::system_clock::now();
-    auto diff = end - start;
-
-    // check that we were able to make an IPC request successfully
-    EXPECT_EQ(RequestStatus::SYS_OK, res);
-    // check error should be ERROR_CANCELED
-    EXPECT_EQ(FingerprintError::ERROR_CANCELED, err);
-    // check that this did not take longer than a threshold
-    EXPECT_TRUE(diff <= threshold);
-}
-
-int main(int argc, char **argv) {
-    ::testing::AddGlobalTestEnvironment(new FingerprintHidlEnvironment);
-    ::testing::InitGoogleTest(&argc, argv);
-    int status = RUN_ALL_TESTS();
-    LOG(INFO) << "Test result = " << status;
-    return status;
-}
diff --git a/biometrics/fingerprint/2.1/vts/types.vts b/biometrics/fingerprint/2.1/vts/types.vts
deleted file mode 100644
index 9f9fd37..0000000
--- a/biometrics/fingerprint/2.1/vts/types.vts
+++ /dev/null
@@ -1,262 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "types"
-
-package: "android.hardware.biometrics.fingerprint"
-
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SYS_UNKNOWN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SYS_OK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SYS_ENOENT"
-        scalar_value: {
-            int32_t: -2
-        }
-        enumerator: "SYS_EINTR"
-        scalar_value: {
-            int32_t: -4
-        }
-        enumerator: "SYS_EIO"
-        scalar_value: {
-            int32_t: -5
-        }
-        enumerator: "SYS_EAGAIN"
-        scalar_value: {
-            int32_t: -11
-        }
-        enumerator: "SYS_ENOMEM"
-        scalar_value: {
-            int32_t: -12
-        }
-        enumerator: "SYS_EACCES"
-        scalar_value: {
-            int32_t: -13
-        }
-        enumerator: "SYS_EFAULT"
-        scalar_value: {
-            int32_t: -14
-        }
-        enumerator: "SYS_EBUSY"
-        scalar_value: {
-            int32_t: -16
-        }
-        enumerator: "SYS_EINVAL"
-        scalar_value: {
-            int32_t: -22
-        }
-        enumerator: "SYS_ENOSPC"
-        scalar_value: {
-            int32_t: -28
-        }
-        enumerator: "SYS_ETIMEDOUT"
-        scalar_value: {
-            int32_t: -110
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintError"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ERROR_NO_ERROR"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ERROR_HW_UNAVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ERROR_UNABLE_TO_PROCESS"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ERROR_TIMEOUT"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ERROR_NO_SPACE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ERROR_CANCELED"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "ERROR_UNABLE_TO_REMOVE"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "ERROR_LOCKOUT"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "ERROR_VENDOR"
-        scalar_value: {
-            int32_t: 8
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ACQUIRED_GOOD"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ACQUIRED_PARTIAL"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ACQUIRED_INSUFFICIENT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ACQUIRED_IMAGER_DIRTY"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ACQUIRED_TOO_SLOW"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ACQUIRED_TOO_FAST"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "ACQUIRED_VENDOR"
-        scalar_value: {
-            int32_t: 6
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "gid"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "fid"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintEnroll"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "finger"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
-    }
-    struct_value: {
-        name: "samplesRemaining"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "msg"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintIterator"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "finger"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
-    }
-    struct_value: {
-        name: "remainingTemplates"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquired"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "acquiredInfo"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAuthenticated"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "finger"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
-    }
-    struct_value: {
-        name: "hat"
-        type: TYPE_ARRAY
-        vector_size: 69
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintMsgType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ERROR"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "ACQUIRED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "TEMPLATE_ENROLLING"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "TEMPLATE_REMOVED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "AUTHENTICATED"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "TEMPLATE_ENUMERATING"
-        scalar_value: {
-            int32_t: 6
-        }
-    }
-}
-
diff --git a/bluetooth/1.0/default/Android.bp b/bluetooth/1.0/default/Android.bp
index 4af079e..292f97c 100644
--- a/bluetooth/1.0/default/Android.bp
+++ b/bluetooth/1.0/default/Android.bp
@@ -15,9 +15,10 @@
 
 cc_library_shared {
     name: "android.hardware.bluetooth@1.0-impl",
+    defaults: ["hidl_defaults"],
+    proprietary: true,
     relative_install_path: "hw",
     srcs: [
-        "async_fd_watcher.cc",
         "bluetooth_hci.cc",
         "bluetooth_address.cc",
         "vendor_interface.cc",
@@ -27,31 +28,77 @@
         "libbase",
         "libcutils",
         "libhardware",
-        "libhwbinder",
         "libhidlbase",
         "libhidltransport",
         "liblog",
         "libutils",
     ],
+    static_libs: [
+        "android.hardware.bluetooth-async",
+        "android.hardware.bluetooth-hci",
+    ],
+}
+
+cc_library_static {
+    name: "android.hardware.bluetooth-async",
+    defaults: ["hidl_defaults"],
+    srcs: [
+        "async_fd_watcher.cc",
+    ],
+    export_include_dirs: ["."],
+    shared_libs: [
+        "libbase",
+        "libcutils",
+        "liblog",
+        "libutils",
+    ],
+}
+
+cc_library_static {
+    name: "android.hardware.bluetooth-hci",
+    defaults: ["hidl_defaults"],
+    srcs: [
+        "hci_packetizer.cc",
+        "hci_protocol.cc",
+        "h4_protocol.cc",
+        "mct_protocol.cc",
+    ],
+    export_include_dirs: ["."],
+    shared_libs: [
+        "libbase",
+        "libcutils",
+        "libhidlbase",
+        "liblog",
+        "libutils",
+    ],
 }
 
 cc_test {
     name: "bluetooth-vendor-interface-unit-tests",
+    defaults: ["hidl_defaults"],
     srcs: [
-        "async_fd_watcher.cc",
         "test/async_fd_watcher_unittest.cc",
+        "test/h4_protocol_unittest.cc",
+        "test/mct_protocol_unittest.cc",
     ],
     local_include_dirs: [
         "test",
     ],
     shared_libs: [
         "libbase",
+        "libhidlbase",
         "liblog",
     ],
+    static_libs: [
+        "android.hardware.bluetooth-async",
+        "android.hardware.bluetooth-hci",
+        "libgmock",
+    ],
 }
 
 cc_test_host {
     name: "bluetooth-address-unit-tests",
+    defaults: ["hidl_defaults"],
     srcs: [
         "bluetooth_address.cc",
         "test/bluetooth_address_test.cc",
diff --git a/bluetooth/1.0/default/Android.mk b/bluetooth/1.0/default/Android.mk
index 08bfb4e..7530925 100644
--- a/bluetooth/1.0/default/Android.mk
+++ b/bluetooth/1.0/default/Android.mk
@@ -17,6 +17,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
 LOCAL_MODULE := android.hardware.bluetooth@1.0-service
 LOCAL_INIT_RC := android.hardware.bluetooth@1.0-service.rc
 LOCAL_SRC_FILES := \
@@ -32,7 +33,6 @@
   libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-  libhwbinder \
   libhidlbase \
   libhidltransport \
   android.hardware.bluetooth@1.0 \
diff --git a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
index 8c5c02a..8545d2f 100644
--- a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
+++ b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
@@ -1,4 +1,4 @@
-service bluetooth-1-0 /system/bin/hw/android.hardware.bluetooth@1.0-service
+service bluetooth-1-0 /vendor/bin/hw/android.hardware.bluetooth@1.0-service
     class hal
     user bluetooth
     group bluetooth
diff --git a/bluetooth/1.0/default/async_fd_watcher.cc b/bluetooth/1.0/default/async_fd_watcher.cc
index 161a74a..05ac537 100644
--- a/bluetooth/1.0/default/async_fd_watcher.cc
+++ b/bluetooth/1.0/default/async_fd_watcher.cc
@@ -19,6 +19,7 @@
 #include <algorithm>
 #include <atomic>
 #include <condition_variable>
+#include <map>
 #include <mutex>
 #include <thread>
 #include <vector>
@@ -26,28 +27,23 @@
 #include "sys/select.h"
 #include "unistd.h"
 
+static const int INVALID_FD = -1;
+
 namespace android {
 namespace hardware {
 namespace bluetooth {
-namespace V1_0 {
-namespace implementation {
+namespace async {
 
 int AsyncFdWatcher::WatchFdForNonBlockingReads(
     int file_descriptor, const ReadCallback& on_read_fd_ready_callback) {
   // Add file descriptor and callback
   {
     std::unique_lock<std::mutex> guard(internal_mutex_);
-    read_fd_ = file_descriptor;
-    cb_ = on_read_fd_ready_callback;
+    watched_fds_[file_descriptor] = on_read_fd_ready_callback;
   }
 
   // Start the thread if not started yet
-  int started = tryStartThread();
-  if (started != 0) {
-    return started;
-  }
-
-  return 0;
+  return tryStartThread();
 }
 
 int AsyncFdWatcher::ConfigureTimeout(
@@ -64,7 +60,7 @@
   return 0;
 }
 
-void AsyncFdWatcher::StopWatchingFileDescriptor() { stopThread(); }
+void AsyncFdWatcher::StopWatchingFileDescriptors() { stopThread(); }
 
 AsyncFdWatcher::~AsyncFdWatcher() {}
 
@@ -96,8 +92,7 @@
 
   {
     std::unique_lock<std::mutex> guard(internal_mutex_);
-    cb_ = nullptr;
-    read_fd_ = -1;
+    watched_fds_.clear();
   }
 
   {
@@ -121,7 +116,11 @@
     fd_set read_fds;
     FD_ZERO(&read_fds);
     FD_SET(notification_listen_fd_, &read_fds);
-    FD_SET(read_fd_, &read_fds);
+    int max_read_fd = INVALID_FD;
+    for (auto& it : watched_fds_) {
+      FD_SET(it.first, &read_fds);
+      max_read_fd = std::max(max_read_fd, it.first);
+    }
 
     struct timeval timeout;
     struct timeval* timeout_ptr = NULL;
@@ -132,7 +131,7 @@
     }
 
     // Wait until there is data available to read on some FD.
-    int nfds = std::max(notification_listen_fd_, read_fd_);
+    int nfds = std::max(notification_listen_fd_, max_read_fd);
     int retval = select(nfds + 1, &read_fds, NULL, NULL, timeout_ptr);
 
     // There was some error.
@@ -159,16 +158,20 @@
       continue;
     }
 
-    // Invoke the data ready callback if appropriate.
-    if (FD_ISSET(read_fd_, &read_fds)) {
+    // Invoke the data ready callbacks if appropriate.
+    {
+      // Hold the mutex to make sure that the callbacks are still valid.
       std::unique_lock<std::mutex> guard(internal_mutex_);
-      if (cb_) cb_(read_fd_);
+      for (auto& it : watched_fds_) {
+        if (FD_ISSET(it.first, &read_fds)) {
+        it.second(it.first);
+        }
+      }
     }
   }
 }
 
-} // namespace implementation
-} // namespace V1_0
+} // namespace async
 } // namespace bluetooth
 } // namespace hardware
 } // namespace android
diff --git a/bluetooth/1.0/default/async_fd_watcher.h b/bluetooth/1.0/default/async_fd_watcher.h
index d6e112f..358cbc3 100644
--- a/bluetooth/1.0/default/async_fd_watcher.h
+++ b/bluetooth/1.0/default/async_fd_watcher.h
@@ -16,14 +16,14 @@
 
 #pragma once
 
+#include <map>
 #include <mutex>
 #include <thread>
 
 namespace android {
 namespace hardware {
 namespace bluetooth {
-namespace V1_0 {
-namespace implementation {
+namespace async {
 
 using ReadCallback = std::function<void(int)>;
 using TimeoutCallback = std::function<void(void)>;
@@ -37,7 +37,7 @@
                                  const ReadCallback& on_read_fd_ready_callback);
   int ConfigureTimeout(const std::chrono::milliseconds timeout,
                        const TimeoutCallback& on_timeout_callback);
-  void StopWatchingFileDescriptor();
+  void StopWatchingFileDescriptors();
 
  private:
   AsyncFdWatcher(const AsyncFdWatcher&) = delete;
@@ -53,17 +53,15 @@
   std::mutex internal_mutex_;
   std::mutex timeout_mutex_;
 
-  int read_fd_;
+  std::map<int, ReadCallback> watched_fds_;
   int notification_listen_fd_;
   int notification_write_fd_;
-  ReadCallback cb_;
   TimeoutCallback timeout_cb_;
   std::chrono::milliseconds timeout_ms_;
 };
 
 
-} // namespace implementation
-} // namespace V1_0
+} // namespace async
 } // namespace bluetooth
 } // namespace hardware
 } // namespace android
diff --git a/bluetooth/1.0/default/bluetooth_hci.cc b/bluetooth/1.0/default/bluetooth_hci.cc
index 6cea623..5a282bf 100644
--- a/bluetooth/1.0/default/bluetooth_hci.cc
+++ b/bluetooth/1.0/default/bluetooth_hci.cc
@@ -30,9 +30,13 @@
 static const uint8_t HCI_DATA_TYPE_ACL = 2;
 static const uint8_t HCI_DATA_TYPE_SCO = 3;
 
+BluetoothHci::BluetoothHci()
+    : deathRecipient(new BluetoothDeathRecipient(this)) {}
+
 Return<void> BluetoothHci::initialize(
     const ::android::sp<IBluetoothHciCallbacks>& cb) {
   ALOGW("BluetoothHci::initialize()");
+  cb->linkToDeath(deathRecipient, 0);
   event_cb_ = cb;
 
   bool rc = VendorInterface::Initialize(
@@ -40,21 +44,14 @@
         event_cb_->initializationComplete(
             status ? Status::SUCCESS : Status::INITIALIZATION_ERROR);
       },
-      [this](HciPacketType type, const hidl_vec<uint8_t>& packet) {
-        switch (type) {
-          case HCI_PACKET_TYPE_EVENT:
-            event_cb_->hciEventReceived(packet);
-            break;
-          case HCI_PACKET_TYPE_ACL_DATA:
-            event_cb_->aclDataReceived(packet);
-            break;
-          case HCI_PACKET_TYPE_SCO_DATA:
-            event_cb_->scoDataReceived(packet);
-            break;
-          default:
-            ALOGE("%s Unexpected event type %d", __func__, type);
-            break;
-        }
+      [this](const hidl_vec<uint8_t>& packet) {
+        event_cb_->hciEventReceived(packet);
+      },
+      [this](const hidl_vec<uint8_t>& packet) {
+        event_cb_->aclDataReceived(packet);
+      },
+      [this](const hidl_vec<uint8_t>& packet) {
+        event_cb_->scoDataReceived(packet);
       });
   if (!rc) event_cb_->initializationComplete(Status::INITIALIZATION_ERROR);
   return Void();
@@ -62,6 +59,7 @@
 
 Return<void> BluetoothHci::close() {
   ALOGW("BluetoothHci::close()");
+  event_cb_->unlinkToDeath(deathRecipient);
   VendorInterface::Shutdown();
   return Void();
 }
diff --git a/bluetooth/1.0/default/bluetooth_hci.h b/bluetooth/1.0/default/bluetooth_hci.h
index da1b411..67d6c37 100644
--- a/bluetooth/1.0/default/bluetooth_hci.h
+++ b/bluetooth/1.0/default/bluetooth_hci.h
@@ -30,8 +30,20 @@
 using ::android::hardware::Return;
 using ::android::hardware::hidl_vec;
 
+struct BluetoothDeathRecipient : hidl_death_recipient {
+  BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {}
+
+  virtual void serviceDied(
+      uint64_t /*cookie*/,
+      const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+    mHci->close();
+  }
+  sp<IBluetoothHci> mHci;
+};
+
 class BluetoothHci : public IBluetoothHci {
  public:
+  BluetoothHci();
   Return<void> initialize(
       const ::android::sp<IBluetoothHciCallbacks>& cb) override;
   Return<void> sendHciCommand(const hidl_vec<uint8_t>& packet) override;
@@ -42,6 +54,7 @@
  private:
   void sendDataToController(const uint8_t type, const hidl_vec<uint8_t>& data);
   ::android::sp<IBluetoothHciCallbacks> event_cb_;
+  ::android::sp<BluetoothDeathRecipient> deathRecipient;
 };
 
 extern "C" IBluetoothHci* HIDL_FETCH_IBluetoothHci(const char* name);
diff --git a/bluetooth/1.0/default/h4_protocol.cc b/bluetooth/1.0/default/h4_protocol.cc
new file mode 100644
index 0000000..8f24b5e
--- /dev/null
+++ b/bluetooth/1.0/default/h4_protocol.cc
@@ -0,0 +1,71 @@
+//
+// Copyright 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.
+//
+
+#include "h4_protocol.h"
+
+#define LOG_TAG "android.hardware.bluetooth-hci-h4"
+#include <android-base/logging.h>
+#include <assert.h>
+#include <fcntl.h>
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+size_t H4Protocol::Send(uint8_t type, const uint8_t* data, size_t length) {
+  int rv = WriteSafely(uart_fd_, &type, sizeof(type));
+  if (rv == sizeof(type)) {
+    rv = WriteSafely(uart_fd_, data, length);
+  }
+  return rv;
+}
+
+void H4Protocol::OnPacketReady() {
+  switch (hci_packet_type_) {
+    case HCI_PACKET_TYPE_EVENT:
+      event_cb_(hci_packetizer_.GetPacket());
+      break;
+    case HCI_PACKET_TYPE_ACL_DATA:
+      acl_cb_(hci_packetizer_.GetPacket());
+      break;
+    case HCI_PACKET_TYPE_SCO_DATA:
+      sco_cb_(hci_packetizer_.GetPacket());
+      break;
+    default: {
+      bool bad_packet_type = true;
+      CHECK(!bad_packet_type);
+    }
+  }
+  // Get ready for the next type byte.
+  hci_packet_type_ = HCI_PACKET_TYPE_UNKNOWN;
+}
+
+void H4Protocol::OnDataReady(int fd) {
+  if (hci_packet_type_ == HCI_PACKET_TYPE_UNKNOWN) {
+    uint8_t buffer[1] = {0};
+    size_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, 1));
+    CHECK(bytes_read == 1);
+    hci_packet_type_ = static_cast<HciPacketType>(buffer[0]);
+  } else {
+    hci_packetizer_.OnDataReady(fd, hci_packet_type_);
+  }
+}
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/h4_protocol.h b/bluetooth/1.0/default/h4_protocol.h
new file mode 100644
index 0000000..0d0a1ca
--- /dev/null
+++ b/bluetooth/1.0/default/h4_protocol.h
@@ -0,0 +1,61 @@
+//
+// Copyright 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.
+//
+
+#pragma once
+
+#include <hidl/HidlSupport.h>
+
+#include "async_fd_watcher.h"
+#include "bt_vendor_lib.h"
+#include "hci_internals.h"
+#include "hci_protocol.h"
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+class H4Protocol : public HciProtocol {
+ public:
+  H4Protocol(int fd, PacketReadCallback event_cb, PacketReadCallback acl_cb,
+             PacketReadCallback sco_cb)
+      : uart_fd_(fd),
+        event_cb_(event_cb),
+        acl_cb_(acl_cb),
+        sco_cb_(sco_cb),
+        hci_packetizer_([this]() { OnPacketReady(); }) {}
+
+  size_t Send(uint8_t type, const uint8_t* data, size_t length);
+
+  void OnPacketReady();
+
+  void OnDataReady(int fd);
+
+ private:
+  int uart_fd_;
+
+  PacketReadCallback event_cb_;
+  PacketReadCallback acl_cb_;
+  PacketReadCallback sco_cb_;
+
+  HciPacketType hci_packet_type_{HCI_PACKET_TYPE_UNKNOWN};
+  hci::HciPacketizer hci_packetizer_;
+};
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/hci_internals.h b/bluetooth/1.0/default/hci_internals.h
index d5714be..1e1f300 100644
--- a/bluetooth/1.0/default/hci_internals.h
+++ b/bluetooth/1.0/default/hci_internals.h
@@ -16,6 +16,8 @@
 
 #pragma once
 
+#include <stdlib.h>
+
 // HCI UART transport packet types (Volume 4, Part A, 2)
 enum HciPacketType {
   HCI_PACKET_TYPE_UNKNOWN = 0,
diff --git a/bluetooth/1.0/default/hci_packetizer.cc b/bluetooth/1.0/default/hci_packetizer.cc
new file mode 100644
index 0000000..9549858
--- /dev/null
+++ b/bluetooth/1.0/default/hci_packetizer.cc
@@ -0,0 +1,91 @@
+//
+// Copyright 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.
+//
+
+#include "hci_packetizer.h"
+
+#define LOG_TAG "android.hardware.bluetooth.hci_packetizer"
+#include <android-base/logging.h>
+#include <utils/Log.h>
+
+#include <dlfcn.h>
+#include <fcntl.h>
+
+namespace {
+
+const size_t preamble_size_for_type[] = {
+    0, HCI_COMMAND_PREAMBLE_SIZE, HCI_ACL_PREAMBLE_SIZE, HCI_SCO_PREAMBLE_SIZE,
+    HCI_EVENT_PREAMBLE_SIZE};
+const size_t packet_length_offset_for_type[] = {
+    0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO,
+    HCI_LENGTH_OFFSET_EVT};
+
+size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) {
+  size_t offset = packet_length_offset_for_type[type];
+  if (type != HCI_PACKET_TYPE_ACL_DATA) return preamble[offset];
+  return (((preamble[offset + 1]) << 8) | preamble[offset]);
+}
+
+}  // namespace
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+const hidl_vec<uint8_t>& HciPacketizer::GetPacket() const { return packet_; }
+
+void HciPacketizer::OnDataReady(int fd, HciPacketType packet_type) {
+  switch (state_) {
+    case HCI_PREAMBLE: {
+      size_t bytes_read = TEMP_FAILURE_RETRY(
+          read(fd, preamble_ + bytes_read_,
+               preamble_size_for_type[packet_type] - bytes_read_));
+      CHECK(bytes_read > 0);
+      bytes_read_ += bytes_read;
+      if (bytes_read_ == preamble_size_for_type[packet_type]) {
+        size_t packet_length =
+            HciGetPacketLengthForType(packet_type, preamble_);
+        packet_.resize(preamble_size_for_type[packet_type] + packet_length);
+        memcpy(packet_.data(), preamble_, preamble_size_for_type[packet_type]);
+        bytes_remaining_ = packet_length;
+        state_ = HCI_PAYLOAD;
+        bytes_read_ = 0;
+      }
+      break;
+    }
+
+    case HCI_PAYLOAD: {
+      size_t bytes_read = TEMP_FAILURE_RETRY(read(
+          fd,
+          packet_.data() + preamble_size_for_type[packet_type] + bytes_read_,
+          bytes_remaining_));
+      CHECK(bytes_read > 0);
+      bytes_remaining_ -= bytes_read;
+      bytes_read_ += bytes_read;
+      if (bytes_remaining_ == 0) {
+        packet_ready_cb_();
+        state_ = HCI_PREAMBLE;
+        bytes_read_ = 0;
+      }
+      break;
+    }
+  }
+}
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/hci_packetizer.h b/bluetooth/1.0/default/hci_packetizer.h
new file mode 100644
index 0000000..90579bd
--- /dev/null
+++ b/bluetooth/1.0/default/hci_packetizer.h
@@ -0,0 +1,53 @@
+//
+// Copyright 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.
+//
+
+#pragma once
+
+#include <functional>
+
+#include <hidl/HidlSupport.h>
+
+#include "hci_internals.h"
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+using ::android::hardware::hidl_vec;
+using HciPacketReadyCallback = std::function<void(void)>;
+
+class HciPacketizer {
+ public:
+  HciPacketizer(HciPacketReadyCallback packet_cb)
+      : packet_ready_cb_(packet_cb){};
+  void OnDataReady(int fd, HciPacketType packet_type);
+  const hidl_vec<uint8_t>& GetPacket() const;
+
+ protected:
+  enum State { HCI_PREAMBLE, HCI_PAYLOAD };
+  State state_{HCI_PREAMBLE};
+  uint8_t preamble_[HCI_PREAMBLE_SIZE_MAX];
+  hidl_vec<uint8_t> packet_;
+  size_t bytes_remaining_{0};
+  size_t bytes_read_{0};
+  HciPacketReadyCallback packet_ready_cb_;
+};
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/hci_protocol.cc b/bluetooth/1.0/default/hci_protocol.cc
new file mode 100644
index 0000000..bb1e36b
--- /dev/null
+++ b/bluetooth/1.0/default/hci_protocol.cc
@@ -0,0 +1,57 @@
+//
+// Copyright 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.
+//
+
+#include "hci_protocol.h"
+
+#define LOG_TAG "android.hardware.bluetooth-hci-hci_protocol"
+#include <android-base/logging.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <utils/Log.h>
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+size_t HciProtocol::WriteSafely(int fd, const uint8_t* data, size_t length) {
+  size_t transmitted_length = 0;
+  while (length > 0) {
+    ssize_t ret =
+        TEMP_FAILURE_RETRY(write(fd, data + transmitted_length, length));
+
+    if (ret == -1) {
+      if (errno == EAGAIN) continue;
+      ALOGE("%s error writing to UART (%s)", __func__, strerror(errno));
+      break;
+
+    } else if (ret == 0) {
+      // Nothing written :(
+      ALOGE("%s zero bytes written - something went wrong...", __func__);
+      break;
+    }
+
+    transmitted_length += ret;
+    length -= ret;
+  }
+
+  return transmitted_length;
+}
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/hci_protocol.h b/bluetooth/1.0/default/hci_protocol.h
new file mode 100644
index 0000000..6821107
--- /dev/null
+++ b/bluetooth/1.0/default/hci_protocol.h
@@ -0,0 +1,49 @@
+//
+// Copyright 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.
+//
+
+#pragma once
+
+#include <hidl/HidlSupport.h>
+
+#include "bt_vendor_lib.h"
+#include "hci_internals.h"
+#include "hci_packetizer.h"
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+using ::android::hardware::hidl_vec;
+using PacketReadCallback = std::function<void(const hidl_vec<uint8_t>&)>;
+
+// Implementation of HCI protocol bits common to different transports
+class HciProtocol {
+ public:
+  HciProtocol() = default;
+  virtual ~HciProtocol(){};
+
+  // Protocol-specific implementation of sending packets.
+  virtual size_t Send(uint8_t type, const uint8_t* data, size_t length) = 0;
+
+ protected:
+  static size_t WriteSafely(int fd, const uint8_t* data, size_t length);
+};
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/mct_protocol.cc b/bluetooth/1.0/default/mct_protocol.cc
new file mode 100644
index 0000000..813cebd
--- /dev/null
+++ b/bluetooth/1.0/default/mct_protocol.cc
@@ -0,0 +1,71 @@
+//
+// Copyright 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.
+//
+
+#include "mct_protocol.h"
+
+#include <assert.h>
+
+#define LOG_TAG "android.hardware.bluetooth-hci-mct"
+#include <android-base/logging.h>
+#include <utils/Log.h>
+
+#include <fcntl.h>
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+MctProtocol::MctProtocol(int* fds, PacketReadCallback event_cb,
+                         PacketReadCallback acl_cb)
+    : event_cb_(event_cb),
+      acl_cb_(acl_cb),
+      event_packetizer_([this]() { OnEventPacketReady(); }),
+      acl_packetizer_([this]() { OnAclDataPacketReady(); }) {
+  for (int i = 0; i < CH_MAX; i++) {
+    uart_fds_[i] = fds[i];
+  }
+}
+
+size_t MctProtocol::Send(uint8_t type, const uint8_t* data, size_t length) {
+  if (type == HCI_PACKET_TYPE_COMMAND)
+    return WriteSafely(uart_fds_[CH_CMD], data, length);
+  if (type == HCI_PACKET_TYPE_ACL_DATA)
+    return WriteSafely(uart_fds_[CH_ACL_OUT], data, length);
+  CHECK(type == HCI_PACKET_TYPE_COMMAND || type == HCI_PACKET_TYPE_ACL_DATA);
+  return 0;
+}
+
+void MctProtocol::OnEventPacketReady() {
+  event_cb_(event_packetizer_.GetPacket());
+}
+
+void MctProtocol::OnAclDataPacketReady() {
+  acl_cb_(acl_packetizer_.GetPacket());
+}
+
+void MctProtocol::OnEventDataReady(int fd) {
+  event_packetizer_.OnDataReady(fd, HCI_PACKET_TYPE_EVENT);
+}
+
+void MctProtocol::OnAclDataReady(int fd) {
+  acl_packetizer_.OnDataReady(fd, HCI_PACKET_TYPE_ACL_DATA);
+}
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/mct_protocol.h b/bluetooth/1.0/default/mct_protocol.h
new file mode 100644
index 0000000..6991746
--- /dev/null
+++ b/bluetooth/1.0/default/mct_protocol.h
@@ -0,0 +1,56 @@
+//
+// Copyright 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.
+//
+
+#pragma once
+
+#include <hidl/HidlSupport.h>
+
+#include "async_fd_watcher.h"
+#include "bt_vendor_lib.h"
+#include "hci_internals.h"
+#include "hci_protocol.h"
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+class MctProtocol : public HciProtocol {
+ public:
+  MctProtocol(int* fds, PacketReadCallback event_cb, PacketReadCallback acl_cb);
+
+  size_t Send(uint8_t type, const uint8_t* data, size_t length);
+
+  void OnEventPacketReady();
+  void OnAclDataPacketReady();
+
+  void OnEventDataReady(int fd);
+  void OnAclDataReady(int fd);
+
+ private:
+  int uart_fds_[CH_MAX];
+
+  PacketReadCallback event_cb_;
+  PacketReadCallback acl_cb_;
+
+  hci::HciPacketizer event_packetizer_;
+  hci::HciPacketizer acl_packetizer_;
+};
+
+}  // namespace hci
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
index 49ea44a..b0c533c 100644
--- a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
+++ b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
@@ -14,6 +14,8 @@
 // limitations under the License.
 //
 
+#define LOG_TAG "async_fd_watcher_unittest"
+
 #include "async_fd_watcher.h"
 #include <gtest/gtest.h>
 #include <cstdint>
@@ -33,6 +35,8 @@
 namespace V1_0 {
 namespace implementation {
 
+using android::hardware::bluetooth::async::AsyncFdWatcher;
+
 class AsyncFdWatcherSocketTest : public ::testing::Test {
  public:
   static const uint16_t kPort = 6111;
@@ -120,8 +124,8 @@
   }
 
   void CleanUpServer() {
-    async_fd_watcher_.StopWatchingFileDescriptor();
-    conn_watcher_.StopWatchingFileDescriptor();
+    async_fd_watcher_.StopWatchingFileDescriptors();
+    conn_watcher_.StopWatchingFileDescriptors();
     close(socket_fd_);
   }
 
@@ -209,7 +213,7 @@
   });
 
   ConnectClient();
-  conn_watcher.StopWatchingFileDescriptor();
+  conn_watcher.StopWatchingFileDescriptors();
   close(socket_fd);
 }
 
@@ -231,7 +235,7 @@
   EXPECT_FALSE(timed_out);
   sleep(1);
   EXPECT_TRUE(timed_out);
-  conn_watcher.StopWatchingFileDescriptor();
+  conn_watcher.StopWatchingFileDescriptors();
   close(socket_fd);
 }
 
@@ -263,10 +267,64 @@
   sleep(1);
   EXPECT_TRUE(timed_out);
   EXPECT_TRUE(timed_out2);
-  conn_watcher.StopWatchingFileDescriptor();
+  conn_watcher.StopWatchingFileDescriptors();
   close(socket_fd);
 }
 
+// Use a single AsyncFdWatcher to watch two file descriptors.
+TEST_F(AsyncFdWatcherSocketTest, WatchTwoFileDescriptors) {
+  int sockfd[2];
+  socketpair(AF_LOCAL, SOCK_STREAM, 0, sockfd);
+  bool cb1_called = false;
+  bool* cb1_called_ptr = &cb1_called;
+  bool cb2_called = false;
+  bool* cb2_called_ptr = &cb2_called;
+
+  AsyncFdWatcher watcher;
+  watcher.WatchFdForNonBlockingReads(sockfd[0], [cb1_called_ptr](int fd) {
+    char read_buf[1] = {0};
+    int n = TEMP_FAILURE_RETRY(read(fd, read_buf, sizeof(read_buf)));
+    ASSERT_TRUE(n == sizeof(read_buf));
+    ASSERT_TRUE(read_buf[0] == '1');
+    *cb1_called_ptr = true;
+  });
+
+  watcher.WatchFdForNonBlockingReads(sockfd[1], [cb2_called_ptr](int fd) {
+    char read_buf[1] = {0};
+    int n = TEMP_FAILURE_RETRY(read(fd, read_buf, sizeof(read_buf)));
+    ASSERT_TRUE(n == sizeof(read_buf));
+    ASSERT_TRUE(read_buf[0] == '2');
+    *cb2_called_ptr = true;
+  });
+
+  // Fail if the test doesn't pass within 3 seconds
+  watcher.ConfigureTimeout(std::chrono::seconds(3), [this]() {
+    bool connection_timeout = true;
+    ASSERT_FALSE(connection_timeout);
+  });
+
+  EXPECT_FALSE(cb1_called);
+  EXPECT_FALSE(cb2_called);
+
+  char one_buf[1] = {'1'};
+  TEMP_FAILURE_RETRY(write(sockfd[1], one_buf, sizeof(one_buf)));
+
+  sleep(1);
+
+  EXPECT_TRUE(cb1_called);
+  EXPECT_FALSE(cb2_called);
+
+  char two_buf[1] = {'2'};
+  TEMP_FAILURE_RETRY(write(sockfd[0], two_buf, sizeof(two_buf)));
+
+  sleep(1);
+
+  EXPECT_TRUE(cb1_called);
+  EXPECT_TRUE(cb2_called);
+
+  watcher.StopWatchingFileDescriptors();
+}
+
 // Use two AsyncFdWatchers to set up a server socket.
 TEST_F(AsyncFdWatcherSocketTest, ClientServer) {
   ConfigureServer();
diff --git a/bluetooth/1.0/default/test/h4_protocol_unittest.cc b/bluetooth/1.0/default/test/h4_protocol_unittest.cc
new file mode 100644
index 0000000..d53aaa9
--- /dev/null
+++ b/bluetooth/1.0/default/test/h4_protocol_unittest.cc
@@ -0,0 +1,213 @@
+//
+// Copyright 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.
+//
+
+#define LOG_TAG "bt_h4_unittest"
+
+#include "h4_protocol.h"
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <condition_variable>
+#include <cstdint>
+#include <cstring>
+#include <mutex>
+#include <vector>
+
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <utils/Log.h>
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace V1_0 {
+namespace implementation {
+
+using ::testing::Eq;
+using hci::H4Protocol;
+
+static char sample_data1[100] = "A point is that which has no part.";
+static char sample_data2[100] = "A line is breadthless length.";
+static char sample_data3[100] = "The ends of a line are points.";
+static char acl_data[100] =
+    "A straight line is a line which lies evenly with the points on itself.";
+static char sco_data[100] =
+    "A surface is that which has length and breadth only.";
+static char event_data[100] = "The edges of a surface are lines.";
+
+MATCHER_P3(HidlVecMatches, preamble, preamble_length, payload, "") {
+  size_t length = strlen(payload) + preamble_length;
+  if (length != arg.size()) {
+    return false;
+  }
+
+  if (memcmp(preamble, arg.data(), preamble_length) != 0) {
+    return false;
+  }
+
+  return memcmp(payload, arg.data() + preamble_length,
+                length - preamble_length) == 0;
+};
+
+ACTION_P2(Notify, mutex, condition) {
+  ALOGD("%s", __func__);
+  std::unique_lock<std::mutex> lock(*mutex);
+  condition->notify_one();
+}
+
+class H4ProtocolTest : public ::testing::Test {
+ protected:
+  void SetUp() override {
+    ALOGD("%s", __func__);
+
+    int sockfd[2];
+    socketpair(AF_LOCAL, SOCK_STREAM, 0, sockfd);
+    H4Protocol* h4_hci =
+        new H4Protocol(sockfd[0], event_cb_.AsStdFunction(),
+                       acl_cb_.AsStdFunction(), sco_cb_.AsStdFunction());
+    fd_watcher_.WatchFdForNonBlockingReads(
+        sockfd[0], [h4_hci](int fd) { h4_hci->OnDataReady(fd); });
+    protocol_ = h4_hci;
+
+    fake_uart_ = sockfd[1];
+  }
+
+  void TearDown() override { fd_watcher_.StopWatchingFileDescriptors(); }
+
+  void SendAndReadUartOutbound(uint8_t type, char* data) {
+    ALOGD("%s sending", __func__);
+    int data_length = strlen(data);
+    protocol_->Send(type, (uint8_t*)data, data_length);
+
+    int uart_length = data_length + 1;  // + 1 for data type code
+    int i;
+
+    ALOGD("%s reading", __func__);
+    for (i = 0; i < uart_length; i++) {
+      fd_set read_fds;
+      FD_ZERO(&read_fds);
+      FD_SET(fake_uart_, &read_fds);
+      TEMP_FAILURE_RETRY(select(fake_uart_ + 1, &read_fds, NULL, NULL, NULL));
+
+      char byte;
+      TEMP_FAILURE_RETRY(read(fake_uart_, &byte, 1));
+
+      EXPECT_EQ(i == 0 ? type : data[i - 1], byte);
+    }
+
+    EXPECT_EQ(i, uart_length);
+  }
+
+  void WriteAndExpectInboundAclData(char* payload) {
+    // h4 type[1] + handle[2] + size[2]
+    char preamble[5] = {HCI_PACKET_TYPE_ACL_DATA, 19, 92, 0, 0};
+    int length = strlen(payload);
+    preamble[3] = length & 0xFF;
+    preamble[4] = (length >> 8) & 0xFF;
+
+    ALOGD("%s writing", __func__);
+    TEMP_FAILURE_RETRY(write(fake_uart_, preamble, sizeof(preamble)));
+    TEMP_FAILURE_RETRY(write(fake_uart_, payload, strlen(payload)));
+
+    ALOGD("%s waiting", __func__);
+    std::mutex mutex;
+    std::condition_variable done;
+    EXPECT_CALL(acl_cb_, Call(HidlVecMatches(preamble + 1, sizeof(preamble) - 1,
+                                             payload)))
+        .WillOnce(Notify(&mutex, &done));
+
+    // Fail if it takes longer than 100 ms.
+    auto timeout_time =
+        std::chrono::steady_clock::now() + std::chrono::milliseconds(100);
+    {
+      std::unique_lock<std::mutex> lock(mutex);
+      done.wait_until(lock, timeout_time);
+    }
+  }
+
+  void WriteAndExpectInboundScoData(char* payload) {
+    // h4 type[1] + handle[2] + size[1]
+    char preamble[4] = {HCI_PACKET_TYPE_SCO_DATA, 20, 17, 0};
+    preamble[3] = strlen(payload) & 0xFF;
+
+    ALOGD("%s writing", __func__);
+    TEMP_FAILURE_RETRY(write(fake_uart_, preamble, sizeof(preamble)));
+    TEMP_FAILURE_RETRY(write(fake_uart_, payload, strlen(payload)));
+
+    ALOGD("%s waiting", __func__);
+    std::mutex mutex;
+    std::condition_variable done;
+    EXPECT_CALL(sco_cb_, Call(HidlVecMatches(preamble + 1, sizeof(preamble) - 1,
+                                             payload)))
+        .WillOnce(Notify(&mutex, &done));
+
+    // Fail if it takes longer than 100 ms.
+    auto timeout_time =
+        std::chrono::steady_clock::now() + std::chrono::milliseconds(100);
+    {
+      std::unique_lock<std::mutex> lock(mutex);
+      done.wait_until(lock, timeout_time);
+    }
+  }
+
+  void WriteAndExpectInboundEvent(char* payload) {
+    // h4 type[1] + event_code[1] + size[1]
+    char preamble[3] = {HCI_PACKET_TYPE_EVENT, 9, 0};
+    preamble[2] = strlen(payload) & 0xFF;
+    ALOGD("%s writing", __func__);
+    TEMP_FAILURE_RETRY(write(fake_uart_, preamble, sizeof(preamble)));
+    TEMP_FAILURE_RETRY(write(fake_uart_, payload, strlen(payload)));
+
+    ALOGD("%s waiting", __func__);
+    std::mutex mutex;
+    std::condition_variable done;
+    EXPECT_CALL(event_cb_, Call(HidlVecMatches(preamble + 1,
+                                               sizeof(preamble) - 1, payload)))
+        .WillOnce(Notify(&mutex, &done));
+
+    {
+      std::unique_lock<std::mutex> lock(mutex);
+      done.wait(lock);
+    }
+  }
+
+  testing::MockFunction<void(const hidl_vec<uint8_t>&)> event_cb_;
+  testing::MockFunction<void(const hidl_vec<uint8_t>&)> acl_cb_;
+  testing::MockFunction<void(const hidl_vec<uint8_t>&)> sco_cb_;
+  async::AsyncFdWatcher fd_watcher_;
+  H4Protocol* protocol_;
+  int fake_uart_;
+};
+
+// Test sending data sends correct data onto the UART
+TEST_F(H4ProtocolTest, TestSends) {
+  SendAndReadUartOutbound(HCI_PACKET_TYPE_COMMAND, sample_data1);
+  SendAndReadUartOutbound(HCI_PACKET_TYPE_ACL_DATA, sample_data2);
+  SendAndReadUartOutbound(HCI_PACKET_TYPE_SCO_DATA, sample_data3);
+}
+
+// Ensure we properly parse data coming from the UART
+TEST_F(H4ProtocolTest, TestReads) {
+  WriteAndExpectInboundAclData(acl_data);
+  WriteAndExpectInboundScoData(sco_data);
+  WriteAndExpectInboundEvent(event_data);
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/test/mct_protocol_unittest.cc b/bluetooth/1.0/default/test/mct_protocol_unittest.cc
new file mode 100644
index 0000000..0a6e9eb
--- /dev/null
+++ b/bluetooth/1.0/default/test/mct_protocol_unittest.cc
@@ -0,0 +1,197 @@
+//
+// Copyright 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.
+//
+
+#define LOG_TAG "bt_h4_unittest"
+
+#include "mct_protocol.h"
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <condition_variable>
+#include <cstdint>
+#include <cstring>
+#include <mutex>
+#include <vector>
+
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <utils/Log.h>
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace V1_0 {
+namespace implementation {
+
+using ::testing::Eq;
+using hci::MctProtocol;
+
+static char sample_data1[100] = "A point is that which has no part.";
+static char sample_data2[100] = "A line is breadthless length.";
+static char acl_data[100] =
+    "A straight line is a line which lies evenly with the points on itself.";
+static char event_data[100] = "The edges of a surface are lines.";
+
+MATCHER_P3(HidlVecMatches, preamble, preamble_length, payload, "") {
+  size_t length = strlen(payload) + preamble_length;
+  if (length != arg.size()) {
+    return false;
+  }
+
+  if (memcmp(preamble, arg.data(), preamble_length) != 0) {
+    return false;
+  }
+
+  return memcmp(payload, arg.data() + preamble_length,
+                length - preamble_length) == 0;
+};
+
+ACTION_P2(Notify, mutex, condition) {
+  ALOGD("%s", __func__);
+  std::unique_lock<std::mutex> lock(*mutex);
+  condition->notify_one();
+}
+
+class MctProtocolTest : public ::testing::Test {
+ protected:
+  void SetUp() override {
+    ALOGD("%s", __func__);
+
+    int mct_fds[CH_MAX];
+    MakeFakeUartFd(CH_CMD, mct_fds, fake_uart_);
+    MakeFakeUartFd(CH_EVT, mct_fds, fake_uart_);
+    MakeFakeUartFd(CH_ACL_IN, mct_fds, fake_uart_);
+    MakeFakeUartFd(CH_ACL_OUT, mct_fds, fake_uart_);
+
+    MctProtocol* mct_hci = new MctProtocol(mct_fds, event_cb_.AsStdFunction(),
+                                           acl_cb_.AsStdFunction());
+    fd_watcher_.WatchFdForNonBlockingReads(
+        mct_fds[CH_EVT], [mct_hci](int fd) { mct_hci->OnEventDataReady(fd); });
+    fd_watcher_.WatchFdForNonBlockingReads(
+        mct_fds[CH_ACL_IN], [mct_hci](int fd) { mct_hci->OnAclDataReady(fd); });
+    protocol_ = mct_hci;
+  }
+
+  void MakeFakeUartFd(int index, int* host_side, int* controller_side) {
+    int sockfd[2];
+    socketpair(AF_LOCAL, SOCK_STREAM, 0, sockfd);
+    host_side[index] = sockfd[0];
+    controller_side[index] = sockfd[1];
+  }
+
+  void TearDown() override { fd_watcher_.StopWatchingFileDescriptors(); }
+
+  void SendAndReadUartOutbound(uint8_t type, char* data, int outbound_fd) {
+    ALOGD("%s sending", __func__);
+    int data_length = strlen(data);
+    protocol_->Send(type, (uint8_t*)data, data_length);
+
+    ALOGD("%s reading", __func__);
+    int i;
+    for (i = 0; i < data_length; i++) {
+      fd_set read_fds;
+      FD_ZERO(&read_fds);
+      FD_SET(outbound_fd, &read_fds);
+      TEMP_FAILURE_RETRY(select(outbound_fd + 1, &read_fds, NULL, NULL, NULL));
+
+      char byte;
+      TEMP_FAILURE_RETRY(read(outbound_fd, &byte, 1));
+
+      EXPECT_EQ(data[i], byte);
+    }
+
+    EXPECT_EQ(i, data_length);
+  }
+
+  void WriteAndExpectInboundAclData(char* payload) {
+    // handle[2] + size[2]
+    char preamble[4] = {19, 92, 0, 0};
+    int length = strlen(payload);
+    preamble[2] = length & 0xFF;
+    preamble[3] = (length >> 8) & 0xFF;
+
+    ALOGD("%s writing", __func__);
+    TEMP_FAILURE_RETRY(
+        write(fake_uart_[CH_ACL_IN], preamble, sizeof(preamble)));
+    TEMP_FAILURE_RETRY(write(fake_uart_[CH_ACL_IN], payload, strlen(payload)));
+
+    ALOGD("%s waiting", __func__);
+    std::mutex mutex;
+    std::condition_variable done;
+    EXPECT_CALL(acl_cb_,
+                Call(HidlVecMatches(preamble, sizeof(preamble), payload)))
+        .WillOnce(Notify(&mutex, &done));
+
+    // Fail if it takes longer than 100 ms.
+    auto timeout_time =
+        std::chrono::steady_clock::now() + std::chrono::milliseconds(100);
+    {
+      std::unique_lock<std::mutex> lock(mutex);
+      done.wait_until(lock, timeout_time);
+    }
+  }
+
+  void WriteAndExpectInboundEvent(char* payload) {
+    // event_code[1] + size[1]
+    char preamble[2] = {9, 0};
+    preamble[1] = strlen(payload) & 0xFF;
+
+    ALOGD("%s writing", __func__);
+    TEMP_FAILURE_RETRY(write(fake_uart_[CH_EVT], preamble, sizeof(preamble)));
+    TEMP_FAILURE_RETRY(write(fake_uart_[CH_EVT], payload, strlen(payload)));
+
+    ALOGD("%s waiting", __func__);
+    std::mutex mutex;
+    std::condition_variable done;
+    EXPECT_CALL(event_cb_,
+                Call(HidlVecMatches(preamble, sizeof(preamble), payload)))
+        .WillOnce(Notify(&mutex, &done));
+
+    // Fail if it takes longer than 100 ms.
+    auto timeout_time =
+        std::chrono::steady_clock::now() + std::chrono::milliseconds(100);
+    {
+      std::unique_lock<std::mutex> lock(mutex);
+      done.wait_until(lock, timeout_time);
+    }
+  }
+
+  testing::MockFunction<void(const hidl_vec<uint8_t>&)> event_cb_;
+  testing::MockFunction<void(const hidl_vec<uint8_t>&)> acl_cb_;
+  async::AsyncFdWatcher fd_watcher_;
+  MctProtocol* protocol_;
+  int fake_uart_[CH_MAX];
+};
+
+// Test sending data sends correct data onto the UART
+TEST_F(MctProtocolTest, TestSends) {
+  SendAndReadUartOutbound(HCI_PACKET_TYPE_COMMAND, sample_data1,
+                          fake_uart_[CH_CMD]);
+  SendAndReadUartOutbound(HCI_PACKET_TYPE_ACL_DATA, sample_data2,
+                          fake_uart_[CH_ACL_OUT]);
+}
+
+// Ensure we properly parse data coming from the UART
+TEST_F(MctProtocolTest, TestReads) {
+  WriteAndExpectInboundAclData(acl_data);
+  WriteAndExpectInboundEvent(event_data);
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index 7737dd2..a6507dd 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -27,6 +27,8 @@
 #include <fcntl.h>
 
 #include "bluetooth_address.h"
+#include "h4_protocol.h"
+#include "mct_protocol.h"
 
 static const char* VENDOR_LIBRARY_NAME = "libbt-vendor.so";
 static const char* VENDOR_LIBRARY_SYMBOL_NAME =
@@ -51,19 +53,6 @@
 
 VendorInterface* g_vendor_interface = nullptr;
 
-const size_t preamble_size_for_type[] = {
-    0, HCI_COMMAND_PREAMBLE_SIZE, HCI_ACL_PREAMBLE_SIZE, HCI_SCO_PREAMBLE_SIZE,
-    HCI_EVENT_PREAMBLE_SIZE};
-const size_t packet_length_offset_for_type[] = {
-    0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO,
-    HCI_LENGTH_OFFSET_EVT};
-
-size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) {
-  size_t offset = packet_length_offset_for_type[type];
-  if (type != HCI_PACKET_TYPE_ACL_DATA) return preamble[offset];
-  return (((preamble[offset + 1]) << 8) | preamble[offset]);
-}
-
 HC_BT_HDR* WrapPacketAndCopy(uint16_t event, const hidl_vec<uint8_t>& data) {
   size_t packet_size = data.size() + sizeof(HC_BT_HDR);
   HC_BT_HDR* packet = reinterpret_cast<HC_BT_HDR*>(new uint8_t[packet_size]);
@@ -77,30 +66,6 @@
   return packet;
 }
 
-size_t write_safely(int fd, const uint8_t* data, size_t length) {
-  size_t transmitted_length = 0;
-  while (length > 0) {
-    ssize_t ret =
-        TEMP_FAILURE_RETRY(write(fd, data + transmitted_length, length));
-
-    if (ret == -1) {
-      if (errno == EAGAIN) continue;
-      ALOGE("%s error writing to UART (%s)", __func__, strerror(errno));
-      break;
-
-    } else if (ret == 0) {
-      // Nothing written :(
-      ALOGE("%s zero bytes written - something went wrong...", __func__);
-      break;
-    }
-
-    transmitted_length += ret;
-    length -= ret;
-  }
-
-  return transmitted_length;
-}
-
 bool internal_command_event_match(const hidl_vec<uint8_t>& packet) {
   uint8_t event_code = packet[0];
   if (event_code != HCI_COMMAND_COMPLETE_EVENT) {
@@ -198,10 +163,12 @@
 
 bool VendorInterface::Initialize(
     InitializeCompleteCallback initialize_complete_cb,
-    PacketReadCallback packet_read_cb) {
+    PacketReadCallback event_cb, PacketReadCallback acl_cb,
+    PacketReadCallback sco_cb) {
   assert(!g_vendor_interface);
   g_vendor_interface = new VendorInterface();
-  return g_vendor_interface->Open(initialize_complete_cb, packet_read_cb);
+  return g_vendor_interface->Open(initialize_complete_cb, event_cb, acl_cb,
+                                  sco_cb);
 }
 
 void VendorInterface::Shutdown() {
@@ -214,9 +181,10 @@
 VendorInterface* VendorInterface::get() { return g_vendor_interface; }
 
 bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb,
-                           PacketReadCallback packet_read_cb) {
+                           PacketReadCallback event_cb,
+                           PacketReadCallback acl_cb,
+                           PacketReadCallback sco_cb) {
   initialize_complete_cb_ = initialize_complete_cb;
-  packet_read_cb_ = packet_read_cb;
 
   // Initialize vendor interface
 
@@ -254,28 +222,41 @@
   power_state = BT_VND_PWR_ON;
   lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
 
-  // Get the UART socket
+  // Get the UART socket(s)
 
   int fd_list[CH_MAX] = {0};
   int fd_count = lib_interface_->op(BT_VND_OP_USERIAL_OPEN, &fd_list);
 
-  if (fd_count != 1) {
-    ALOGE("%s fd count %d != 1; we can't handle this currently...", __func__,
-          fd_count);
-    return false;
+  for (int i = 0; i < fd_count; i++) {
+    if (fd_list[i] == INVALID_FD) {
+      ALOGE("%s: fd %d is invalid!", __func__, fd_list[i]);
+      return false;
+    }
   }
 
-  uart_fd_ = fd_list[0];
-  if (uart_fd_ == INVALID_FD) {
-    ALOGE("%s unable to determine UART fd", __func__);
-    return false;
+  event_cb_ = event_cb;
+  PacketReadCallback intercept_events = [this](const hidl_vec<uint8_t>& event) {
+    HandleIncomingEvent(event);
+  };
+
+  if (fd_count == 1) {
+    hci::H4Protocol* h4_hci =
+        new hci::H4Protocol(fd_list[0], intercept_events, acl_cb, sco_cb);
+    fd_watcher_.WatchFdForNonBlockingReads(
+        fd_list[0], [h4_hci](int fd) { h4_hci->OnDataReady(fd); });
+    hci_ = h4_hci;
+  } else {
+    hci::MctProtocol* mct_hci =
+        new hci::MctProtocol(fd_list, intercept_events, acl_cb);
+    fd_watcher_.WatchFdForNonBlockingReads(
+        fd_list[CH_EVT], [mct_hci](int fd) { mct_hci->OnEventDataReady(fd); });
+    if (fd_count >= CH_ACL_IN)
+      fd_watcher_.WatchFdForNonBlockingReads(
+          fd_list[CH_ACL_IN],
+          [mct_hci](int fd) { mct_hci->OnAclDataReady(fd); });
+    hci_ = mct_hci;
   }
 
-  ALOGI("%s UART fd: %d", __func__, uart_fd_);
-
-  fd_watcher_.WatchFdForNonBlockingReads(uart_fd_,
-                                         [this](int fd) { OnDataReady(fd); });
-
   // Initially, the power management is off.
   lpm_wake_deasserted = true;
 
@@ -287,14 +268,23 @@
 }
 
 void VendorInterface::Close() {
-  fd_watcher_.StopWatchingFileDescriptor();
-
+  // These callbacks may send HCI events (vendor-dependent), so make sure to
+  // StopWatching the file descriptor after this.
   if (lib_interface_ != nullptr) {
     bt_vendor_lpm_mode_t mode = BT_VND_LPM_DISABLE;
     lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
+  }
 
+  fd_watcher_.StopWatchingFileDescriptors();
+
+  if (hci_ != nullptr) {
+    delete hci_;
+    hci_ = nullptr;
+  }
+
+  if (lib_interface_ != nullptr) {
     lib_interface_->op(BT_VND_OP_USERIAL_CLOSE, nullptr);
-    uart_fd_ = INVALID_FD;
+
     int power_state = BT_VND_PWR_OFF;
     lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
   }
@@ -311,8 +301,6 @@
 }
 
 size_t VendorInterface::Send(uint8_t type, const uint8_t* data, size_t length) {
-  if (uart_fd_ == INVALID_FD) return 0;
-
   recent_activity_flag = true;
 
   if (lpm_wake_deasserted == true) {
@@ -326,11 +314,7 @@
     ALOGV("%s: Sent wake before (%02x)", __func__, data[0] | (data[1] << 8));
   }
 
-  int rv = write_safely(uart_fd_, &type, sizeof(type));
-  if (rv == sizeof(type))
-    rv = write_safely(uart_fd_, data, length);
-
-  return rv;
+  return hci_->Send(type, data, length);
 }
 
 void VendorInterface::OnFirmwareConfigured(uint8_t result) {
@@ -370,71 +354,17 @@
   recent_activity_flag = false;
 }
 
-void VendorInterface::OnDataReady(int fd) {
-  switch (hci_parser_state_) {
-    case HCI_IDLE: {
-      uint8_t buffer[1] = {0};
-      size_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, 1));
-      CHECK(bytes_read == 1);
-      hci_packet_type_ = static_cast<HciPacketType>(buffer[0]);
-      // TODO(eisenbach): Check for workaround(s)
-      CHECK(hci_packet_type_ >= HCI_PACKET_TYPE_ACL_DATA &&
-            hci_packet_type_ <= HCI_PACKET_TYPE_EVENT)
-          << "buffer[0] = " << static_cast<unsigned int>(buffer[0]);
-      hci_parser_state_ = HCI_TYPE_READY;
-      hci_packet_bytes_remaining_ = preamble_size_for_type[hci_packet_type_];
-      hci_packet_bytes_read_ = 0;
-      break;
-    }
+void VendorInterface::HandleIncomingEvent(const hidl_vec<uint8_t>& hci_packet) {
+  if (internal_command.cb != nullptr &&
+      internal_command_event_match(hci_packet)) {
+    HC_BT_HDR* bt_hdr = WrapPacketAndCopy(HCI_PACKET_TYPE_EVENT, hci_packet);
 
-    case HCI_TYPE_READY: {
-      size_t bytes_read = TEMP_FAILURE_RETRY(
-          read(fd, hci_packet_preamble_ + hci_packet_bytes_read_,
-               hci_packet_bytes_remaining_));
-      CHECK(bytes_read > 0);
-      hci_packet_bytes_remaining_ -= bytes_read;
-      hci_packet_bytes_read_ += bytes_read;
-      if (hci_packet_bytes_remaining_ == 0) {
-        size_t packet_length =
-            HciGetPacketLengthForType(hci_packet_type_, hci_packet_preamble_);
-        hci_packet_.resize(preamble_size_for_type[hci_packet_type_] +
-                           packet_length);
-        memcpy(hci_packet_.data(), hci_packet_preamble_,
-               preamble_size_for_type[hci_packet_type_]);
-        hci_packet_bytes_remaining_ = packet_length;
-        hci_parser_state_ = HCI_PAYLOAD;
-        hci_packet_bytes_read_ = 0;
-      }
-      break;
-    }
-
-    case HCI_PAYLOAD: {
-      size_t bytes_read = TEMP_FAILURE_RETRY(
-          read(fd,
-               hci_packet_.data() + preamble_size_for_type[hci_packet_type_] +
-                   hci_packet_bytes_read_,
-               hci_packet_bytes_remaining_));
-      CHECK(bytes_read > 0);
-      hci_packet_bytes_remaining_ -= bytes_read;
-      hci_packet_bytes_read_ += bytes_read;
-      if (hci_packet_bytes_remaining_ == 0) {
-        if (internal_command.cb != nullptr &&
-            hci_packet_type_ == HCI_PACKET_TYPE_EVENT &&
-            internal_command_event_match(hci_packet_)) {
-          HC_BT_HDR* bt_hdr =
-              WrapPacketAndCopy(HCI_PACKET_TYPE_EVENT, hci_packet_);
-
-          // The callbacks can send new commands, so don't zero after calling.
-          tINT_CMD_CBACK saved_cb = internal_command.cb;
-          internal_command.cb = nullptr;
-          saved_cb(bt_hdr);
-        } else {
-          packet_read_cb_(hci_packet_type_, hci_packet_);
-        }
-        hci_parser_state_ = HCI_IDLE;
-      }
-      break;
-    }
+    // The callbacks can send new commands, so don't zero after calling.
+    tINT_CMD_CBACK saved_cb = internal_command.cb;
+    internal_command.cb = nullptr;
+    saved_cb(bt_hdr);
+  } else {
+    event_cb_(hci_packet);
   }
 }
 
diff --git a/bluetooth/1.0/default/vendor_interface.h b/bluetooth/1.0/default/vendor_interface.h
index ce5769c..a401ee6 100644
--- a/bluetooth/1.0/default/vendor_interface.h
+++ b/bluetooth/1.0/default/vendor_interface.h
@@ -20,7 +20,7 @@
 
 #include "async_fd_watcher.h"
 #include "bt_vendor_lib.h"
-#include "hci_internals.h"
+#include "hci_protocol.h"
 
 namespace android {
 namespace hardware {
@@ -30,15 +30,15 @@
 
 using ::android::hardware::hidl_vec;
 using InitializeCompleteCallback = std::function<void(bool success)>;
-using PacketReadCallback =
-    std::function<void(HciPacketType, const hidl_vec<uint8_t> &)>;
+using PacketReadCallback = std::function<void(const hidl_vec<uint8_t>&)>;
 
 class FirmwareStartupTimer;
 
 class VendorInterface {
  public:
   static bool Initialize(InitializeCompleteCallback initialize_complete_cb,
-                         PacketReadCallback packet_read_cb);
+                         PacketReadCallback event_cb, PacketReadCallback acl_cb,
+                         PacketReadCallback sco_cb);
   static void Shutdown();
   static VendorInterface *get();
 
@@ -50,27 +50,21 @@
   virtual ~VendorInterface() = default;
 
   bool Open(InitializeCompleteCallback initialize_complete_cb,
-            PacketReadCallback packet_read_cb);
+            PacketReadCallback event_cb, PacketReadCallback acl_cb,
+            PacketReadCallback sco_cb);
   void Close();
 
   void OnTimeout();
 
-  void OnDataReady(int fd);
+  void HandleIncomingEvent(const hidl_vec<uint8_t>& hci_packet);
 
   void *lib_handle_;
   bt_vendor_interface_t *lib_interface_;
-  AsyncFdWatcher fd_watcher_;
-  int uart_fd_;
-  PacketReadCallback packet_read_cb_;
+  async::AsyncFdWatcher fd_watcher_;
   InitializeCompleteCallback initialize_complete_cb_;
+  hci::HciProtocol* hci_;
 
-  enum HciParserState { HCI_IDLE, HCI_TYPE_READY, HCI_PAYLOAD };
-  HciParserState hci_parser_state_{HCI_IDLE};
-  HciPacketType hci_packet_type_{HCI_PACKET_TYPE_UNKNOWN};
-  uint8_t hci_packet_preamble_[HCI_PREAMBLE_SIZE_MAX];
-  hidl_vec<uint8_t> hci_packet_;
-  size_t hci_packet_bytes_remaining_;
-  size_t hci_packet_bytes_read_;
+  PacketReadCallback event_cb_;
 
   FirmwareStartupTimer *firmware_startup_timer_;
 };
diff --git a/bluetooth/1.0/vts/BluetoothHci.vts b/bluetooth/1.0/vts/BluetoothHci.vts
deleted file mode 100644
index 348c0ab..0000000
--- a/bluetooth/1.0/vts/BluetoothHci.vts
+++ /dev/null
@@ -1,87 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IBluetoothHci"
-
-package: "android.hardware.bluetooth"
-
-import: "android.hardware.bluetooth@1.0::IBluetoothHciCallbacks"
-import: "android.hardware.bluetooth@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "initialize"
-        arg: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::bluetooth::V1_0::IBluetoothHciCallbacks"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "sendHciCommand"
-            next: "sendAclData"
-            next: "sendScoData"
-            next: "close"
-        }
-    }
-
-    api: {
-        name: "sendHciCommand"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        callflow: {
-            next: "sendHciCommand"
-            next: "sendAclData"
-            next: "sendScoData"
-            next: "close"
-        }
-    }
-
-    api: {
-        name: "sendAclData"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        callflow: {
-            next: "sendHciCommand"
-            next: "sendAclData"
-            next: "sendScoData"
-            next: "close"
-        }
-    }
-
-    api: {
-        name: "sendScoData"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        callflow: {
-            next: "sendHciCommand"
-            next: "sendAclData"
-            next: "sendScoData"
-            next: "close"
-        }
-    }
-
-    api: {
-        name: "close"
-        callflow: {
-            exit: true
-        }
-    }
-
-}
diff --git a/bluetooth/1.0/vts/BluetoothHciCallbacks.vts b/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
deleted file mode 100644
index 6b3dfd4..0000000
--- a/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
+++ /dev/null
@@ -1,52 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IBluetoothHciCallbacks"
-
-package: "android.hardware.bluetooth"
-
-import: "android.hardware.bluetooth@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "initializationComplete"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::bluetooth::V1_0::Status"
-        }
-    }
-
-    api: {
-        name: "hciEventReceived"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "aclDataReceived"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "scoDataReceived"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-}
diff --git a/bluetooth/1.0/vts/functional/Android.bp b/bluetooth/1.0/vts/functional/Android.bp
index 086ac99..d2e6553 100644
--- a/bluetooth/1.0/vts/functional/Android.bp
+++ b/bluetooth/1.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "bluetooth_hidl_hal_test",
-    gtest: true,
-    srcs: ["bluetooth_hidl_hal_test.cpp"],
+    name: "VtsHalBluetoothV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalBluetoothV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.bluetooth@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
similarity index 98%
rename from bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
rename to bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index eb1cdc1..9a4efae 100644
--- a/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -23,7 +23,7 @@
 #include <hardware/bluetooth.h>
 #include <utils/Log.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <condition_variable>
 #include <mutex>
 #include <queue>
@@ -117,13 +117,13 @@
 };
 
 // The main test class for Bluetooth HIDL HAL.
-class BluetoothHidlTest : public ::testing::Test {
+class BluetoothHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
     // currently test passthrough mode only
-    bluetooth = IBluetoothHci::getService();
+    bluetooth = ::testing::VtsHalHidlTargetTestBase::getService<IBluetoothHci>();
     ASSERT_NE(bluetooth, nullptr);
-    ALOGW("%s: getService() for bluetooth is %s", __func__,
+    ALOGI("%s: getService() for bluetooth is %s", __func__,
           bluetooth->isRemote() ? "remote" : "local");
 
     bluetooth_cb = new BluetoothHciCallbacks(*this);
@@ -255,7 +255,7 @@
     virtual ~BluetoothHciCallbacks() = default;
 
     Return<void> initializationComplete(Status status) override {
-      parent_.initialized = true;
+      parent_.initialized = (status == Status::SUCCESS);
       parent_.notify_initialized();
       ALOGV("%s (status = %d)", __func__, static_cast<int>(status));
       return Void();
diff --git a/bluetooth/1.0/vts/types.vts b/bluetooth/1.0/vts/types.vts
deleted file mode 100644
index 59eb3d4..0000000
--- a/bluetooth/1.0/vts/types.vts
+++ /dev/null
@@ -1,32 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.bluetooth"
-
-
-attribute: {
-    name: "::android::hardware::bluetooth::V1_0::Status"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "TRANSPORT_ERROR"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "INITIALIZATION_ERROR"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
diff --git a/boot/1.0/default/Android.mk b/boot/1.0/default/Android.mk
index 99a6cf9..5e7ecb4 100644
--- a/boot/1.0/default/Android.mk
+++ b/boot/1.0/default/Android.mk
@@ -11,7 +11,6 @@
     liblog \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libhardware \
     libutils \
     android.hardware.boot@1.0 \
@@ -28,7 +27,6 @@
 
 LOCAL_SHARED_LIBRARIES := \
     liblog \
-    libhwbinder \
     libhardware \
     libhidlbase \
     libhidltransport \
diff --git a/boot/1.0/vts/BootControl.vts b/boot/1.0/vts/BootControl.vts
deleted file mode 100644
index b400f0e..0000000
--- a/boot/1.0/vts/BootControl.vts
+++ /dev/null
@@ -1,94 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IBootControl"
-
-package: "android.hardware.boot"
-
-import: "android.hardware.boot@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getNumberSlots"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getCurrentSlot"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "markBootSuccessful"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::boot::V1_0::CommandResult"
-        }
-    }
-
-    api: {
-        name: "setActiveBootSlot"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::boot::V1_0::CommandResult"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "setSlotAsUnbootable"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::boot::V1_0::CommandResult"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "isSlotBootable"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::boot::V1_0::BoolResult"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "isSlotMarkedSuccessful"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::boot::V1_0::BoolResult"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getSuffix"
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/boot/1.0/vts/functional/Android.bp b/boot/1.0/vts/functional/Android.bp
index 6c28bf1..5b14f54 100644
--- a/boot/1.0/vts/functional/Android.bp
+++ b/boot/1.0/vts/functional/Android.bp
@@ -15,20 +15,19 @@
 //
 
 cc_test {
-    name: "boot_hidl_hal_test",
-    gtest: true,
-    srcs: ["boot_hidl_hal_test.cpp"],
+    name: "VtsHalBootV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalBootV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.boot@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp b/boot/1.0/vts/functional/VtsHalBootV1_0TargetTest.cpp
similarity index 96%
rename from boot/1.0/vts/functional/boot_hidl_hal_test.cpp
rename to boot/1.0/vts/functional/VtsHalBootV1_0TargetTest.cpp
index 36142df..9789ee6 100644
--- a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
+++ b/boot/1.0/vts/functional/VtsHalBootV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
 
 #include <android/hardware/boot/1.0/IBootControl.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 using ::android::hardware::boot::V1_0::IBootControl;
 using ::android::hardware::boot::V1_0::CommandResult;
@@ -32,10 +32,10 @@
 using ::android::sp;
 
 // The main test class for the Boot HIDL HAL.
-class BootHidlTest : public ::testing::Test {
+class BootHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    boot = IBootControl::getService();
+    boot = ::testing::VtsHalHidlTargetTestBase::getService<IBootControl>();
     ASSERT_NE(boot, nullptr);
   }
 
diff --git a/boot/1.0/vts/types.vts b/boot/1.0/vts/types.vts
deleted file mode 100644
index ebeaa60..0000000
--- a/boot/1.0/vts/types.vts
+++ /dev/null
@@ -1,42 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.boot"
-
-
-attribute: {
-    name: "::android::hardware::boot::V1_0::CommandResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "success"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "errMsg"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::boot::V1_0::BoolResult"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FALSE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "TRUE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "INVALID_SLOT"
-        scalar_value: {
-            int32_t: -1
-        }
-    }
-}
-
diff --git a/broadcastradio/1.0/default/Android.mk b/broadcastradio/1.0/default/Android.mk
index 569291e..bb32595 100644
--- a/broadcastradio/1.0/default/Android.mk
+++ b/broadcastradio/1.0/default/Android.mk
@@ -13,7 +13,6 @@
 LOCAL_SHARED_LIBRARIES := \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     liblog \
     libhardware \
diff --git a/broadcastradio/1.0/vts/functional/Android.bp b/broadcastradio/1.0/vts/functional/Android.bp
index 0edfcab..cf52f49 100644
--- a/broadcastradio/1.0/vts/functional/Android.bp
+++ b/broadcastradio/1.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "broadcastradio_hidl_hal_test",
-    gtest: true,
-    srcs: ["broadcastradio_hidl_hal_test.cpp"],
+    name: "VtsHalBroadcastradioV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalBroadcastradioV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.broadcastradio@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/broadcastradio/1.0/vts/functional/broadcastradio_hidl_hal_test.cpp b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
similarity index 72%
copy from broadcastradio/1.0/vts/functional/broadcastradio_hidl_hal_test.cpp
copy to broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
index bcbfbb7..74911f0 100644
--- a/broadcastradio/1.0/vts/functional/broadcastradio_hidl_hal_test.cpp
+++ b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
@@ -15,7 +15,7 @@
  */
 
 #define LOG_TAG "BroadcastRadioHidlHalTest"
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <android-base/logging.h>
 #include <cutils/native_handle.h>
 #include <cutils/properties.h>
@@ -42,28 +42,20 @@
 using ::android::hardware::broadcastradio::V1_0::Result;
 using ::android::hardware::broadcastradio::V1_0::Class;
 using ::android::hardware::broadcastradio::V1_0::Properties;
+using ::android::hardware::broadcastradio::V1_0::Band;
 using ::android::hardware::broadcastradio::V1_0::BandConfig;
 using ::android::hardware::broadcastradio::V1_0::Direction;
 using ::android::hardware::broadcastradio::V1_0::ProgramInfo;
 using ::android::hardware::broadcastradio::V1_0::MetaData;
 
 
-// The main test class for Sound Trigger HIDL HAL.
+// The main test class for Broadcast Radio HIDL HAL.
 
-class BroadcastRadioHidlTest : public ::testing::Test {
+class BroadcastRadioHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  protected:
     virtual void SetUp() override {
-        bool getStub = false;
-        char getsubProperty[PROPERTY_VALUE_MAX];
-        if (property_get("vts.hidl.get_stub", getsubProperty, "") > 0) {
-            if (!strcmp(getsubProperty, "true") ||
-                    !strcmp(getsubProperty, "True") ||
-                    !strcmp(getsubProperty, "1")) {
-                getStub = true;
-            }
-        }
         sp<IBroadcastRadioFactory> factory =
-              IBroadcastRadioFactory::getService("broadcastradio", getStub);
+              ::testing::VtsHalHidlTargetTestBase::getService<IBroadcastRadioFactory>();
         if (factory != 0) {
             factory->connectModule(Class::AM_FM,
                              [&](Result retval, const ::android::sp<IBroadcastRadio>& result) {
@@ -74,7 +66,6 @@
         }
         mTunerCallback = new MyCallback(this);
         ASSERT_NE(nullptr, mRadio.get());
-        ASSERT_EQ(!getStub, mRadio->isRemote());
         ASSERT_NE(nullptr, mTunerCallback.get());
     }
 
@@ -93,15 +84,15 @@
             return Void();
         }
 
-        virtual Return<void> configChange(Result result, const BandConfig& config __unused) {
+        virtual Return<void> configChange(Result result, const BandConfig& config) {
             ALOGI("%s result %d", __FUNCTION__, result);
-            mParentTest->onResultCallback(result);
+            mParentTest->onConfigChangeCallback(result, config);
             return Void();
         }
 
-        virtual Return<void> tuneComplete(Result result, const ProgramInfo& info __unused) {
+        virtual Return<void> tuneComplete(Result result, const ProgramInfo& info) {
             ALOGI("%s result %d", __FUNCTION__, result);
-            mParentTest->onResultCallback(result);
+            mParentTest->onTuneCompleteCallback(result, info);
             return Void();
         }
 
@@ -156,11 +147,22 @@
     }
 
     /**
-     * Method called by MyCallback when a callback with status is received
+     * Method called by MyCallback when configChange() callback is received.
      */
-    void onResultCallback(Result result) {
+    void onConfigChangeCallback(Result result, const BandConfig& config) {
         Mutex::Autolock _l(mLock);
         mResultCallbackData = result;
+        mBandConfigCallbackData = config;
+        onCallback_l();
+    }
+
+    /**
+     * Method called by MyCallback when tuneComplete() callback is received.
+     */
+    void onTuneCompleteCallback(Result result, const ProgramInfo& info) {
+        Mutex::Autolock _l(mLock);
+        mResultCallbackData = result;
+        mProgramInfoCallbackData = info;
         onCallback_l();
     }
 
@@ -219,6 +221,8 @@
     bool mCallbackCalled;
     bool mBoolCallbackData;
     Result mResultCallbackData;
+    ProgramInfo mProgramInfoCallbackData;
+    BandConfig mBandConfigCallbackData;
     bool mHwFailure;
 };
 
@@ -229,6 +233,35 @@
     virtual void TearDown() {}
 };
 
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_0 {
+
+/**
+ * Compares two BandConfig objects for testing purposes.
+ */
+static bool operator==(const BandConfig& l, const BandConfig& r) {
+    if (l.type != r.type) return false;
+    if (l.antennaConnected != r.antennaConnected) return false;
+    if (l.lowerLimit != r.lowerLimit) return false;
+    if (l.upperLimit != r.upperLimit) return false;
+    if (l.spacings != r.spacings) return false;
+    if (l.type == Band::AM || l.type == Band::AM_HD) {
+        return l.ext.am == r.ext.am;
+    } else if (l.type == Band::FM || l.type == Band::FM_HD) {
+        return l.ext.fm == r.ext.fm;
+    } else {
+        // unsupported type
+        return false;
+    }
+}
+
+}  // V1_0
+}  // broadcastradio
+}  // hardware
+}  // android
+
 bool BroadcastRadioHidlTest::getProperties()
 {
     if (mHalProperties.bands.size() == 0) {
@@ -315,6 +348,40 @@
 }
 
 /**
+ * Test IBroadcastRadio::openTuner() after ITuner disposal.
+ *
+ * Verifies that:
+ *  - ITuner destruction gets propagated through HAL
+ *  - the openTuner method works well when called for the second time
+ */
+TEST_F(BroadcastRadioHidlTest, ReopenTuner) {
+    EXPECT_TRUE(openTuner());
+    mTuner.clear();
+    EXPECT_TRUE(openTuner());
+}
+
+/**
+ * Test IBroadcastRadio::openTuner() method called twice.
+ *
+ * Verifies that:
+ *  - the openTuner method fails when called for the second time without deleting previous
+ *    ITuner instance
+ */
+TEST_F(BroadcastRadioHidlTest, OpenTunerTwice) {
+    EXPECT_TRUE(openTuner());
+
+    Result halResult = Result::NOT_INITIALIZED;
+    Return<void> hidlReturn =
+            mRadio->openTuner(mHalProperties.bands[0], true, mTunerCallback,
+                              [&](Result result, const sp<ITuner>&) {
+                    halResult = result;
+                });
+    EXPECT_TRUE(hidlReturn.isOk());
+    EXPECT_EQ(Result::INVALID_STATE, halResult);
+    EXPECT_TRUE(waitForCallback(kConfigCallbacktimeoutNs));
+}
+
+/**
  * Test ITuner::setConfiguration() and getConfiguration methods
  *
  * Verifies that:
@@ -327,11 +394,12 @@
     ASSERT_EQ(true, openTuner());
     // test setConfiguration
     mCallbackCalled = false;
-    Return<Result> hidlResult = mTuner->setConfiguration(mHalProperties.bands[0]);
+    Return<Result> hidlResult = mTuner->setConfiguration(mHalProperties.bands[1]);
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
     EXPECT_EQ(true, waitForCallback(kConfigCallbacktimeoutNs));
     EXPECT_EQ(Result::OK, mResultCallbackData);
+    EXPECT_EQ(mHalProperties.bands[1], mBandConfigCallbackData);
 
     // test getConfiguration
     BandConfig halConfig;
@@ -345,7 +413,39 @@
             });
     EXPECT_TRUE(hidlReturn.isOk());
     EXPECT_EQ(Result::OK, halResult);
-    EXPECT_EQ(mHalProperties.bands[0].type, halConfig.type);
+    EXPECT_EQ(mHalProperties.bands[1], halConfig);
+}
+
+/**
+ * Test ITuner::setConfiguration() with invalid arguments.
+ *
+ * Verifies that:
+ *  - the methods returns INVALID_ARGUMENTS on invalid arguments
+ *  - the method recovers and succeeds after passing correct arguments
+ */
+TEST_F(BroadcastRadioHidlTest, SetConfigurationFails) {
+    ASSERT_EQ(true, openTuner());
+
+    // Let's define a config that's bad for sure.
+    BandConfig badConfig = {};
+    badConfig.type = Band::FM;
+    badConfig.lowerLimit = 0xFFFFFFFF;
+    badConfig.upperLimit = 0;
+    badConfig.spacings = (std::vector<uint32_t>){ 0 };
+
+    // Test setConfiguration failing on bad data.
+    mCallbackCalled = false;
+    auto setResult = mTuner->setConfiguration(badConfig);
+    EXPECT_TRUE(setResult.isOk());
+    EXPECT_EQ(Result::INVALID_ARGUMENTS, setResult);
+
+    // Test setConfiguration recovering after passing good data.
+    mCallbackCalled = false;
+    setResult = mTuner->setConfiguration(mHalProperties.bands[0]);
+    EXPECT_TRUE(setResult.isOk());
+    EXPECT_EQ(Result::OK, setResult);
+    EXPECT_EQ(true, waitForCallback(kConfigCallbacktimeoutNs));
+    EXPECT_EQ(Result::OK, mResultCallbackData);
 }
 
 /**
@@ -429,6 +529,7 @@
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
     EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
+    EXPECT_EQ(channel, mProgramInfoCallbackData.channel);
 
     // test getProgramInformation
     ProgramInfo halInfo;
@@ -457,6 +558,42 @@
     EXPECT_EQ(Result::OK, hidlResult);
 }
 
+/**
+ * Test ITuner::tune failing when channel out of the range is provided.
+ *
+ * Verifies that:
+ *  - the method returns INVALID_ARGUMENTS when applicable
+ *  - the method recovers and succeeds after passing correct arguments
+ */
+TEST_F(BroadcastRadioHidlTest, TuneFailsOutOfBounds) {
+    ASSERT_TRUE(openTuner());
+    ASSERT_TRUE(checkAntenna());
+
+    // get current channel bounds
+    BandConfig halConfig;
+    Result halResult;
+    auto configResult = mTuner->getConfiguration([&](Result result, const BandConfig& config) {
+        halResult = result;
+        halConfig = config;
+    });
+    ASSERT_TRUE(configResult.isOk());
+    ASSERT_EQ(Result::OK, halResult);
+
+    // try to tune slightly above the limit and expect to fail
+    auto badChannel = halConfig.upperLimit + halConfig.spacings[0];
+    auto tuneResult = mTuner->tune(badChannel, 0);
+    EXPECT_TRUE(tuneResult.isOk());
+    EXPECT_EQ(Result::INVALID_ARGUMENTS, tuneResult);
+    EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
+
+    // tuning exactly at the limit should succeed
+    auto goodChannel = halConfig.upperLimit;
+    tuneResult = mTuner->tune(goodChannel, 0);
+    EXPECT_TRUE(tuneResult.isOk());
+    EXPECT_EQ(Result::OK, tuneResult);
+    EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
+}
+
 
 int main(int argc, char** argv) {
   ::testing::AddGlobalTestEnvironment(new BroadcastRadioHidlEnvironment);
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
new file mode 100644
index 0000000..c9a8b10
--- /dev/null
+++ b/broadcastradio/1.1/Android.bp
@@ -0,0 +1,76 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.broadcastradio@1.1_hal",
+    srcs: [
+        "types.hal",
+        "IBroadcastRadioFactory.hal",
+        "ITuner.hal",
+        "ITunerCallback.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.broadcastradio@1.1_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
+    srcs: [
+        ":android.hardware.broadcastradio@1.1_hal",
+    ],
+    out: [
+        "android/hardware/broadcastradio/1.1/types.cpp",
+        "android/hardware/broadcastradio/1.1/BroadcastRadioFactoryAll.cpp",
+        "android/hardware/broadcastradio/1.1/TunerAll.cpp",
+        "android/hardware/broadcastradio/1.1/TunerCallbackAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.broadcastradio@1.1_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
+    srcs: [
+        ":android.hardware.broadcastradio@1.1_hal",
+    ],
+    out: [
+        "android/hardware/broadcastradio/1.1/types.h",
+        "android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h",
+        "android/hardware/broadcastradio/1.1/IHwBroadcastRadioFactory.h",
+        "android/hardware/broadcastradio/1.1/BnHwBroadcastRadioFactory.h",
+        "android/hardware/broadcastradio/1.1/BpHwBroadcastRadioFactory.h",
+        "android/hardware/broadcastradio/1.1/BsBroadcastRadioFactory.h",
+        "android/hardware/broadcastradio/1.1/ITuner.h",
+        "android/hardware/broadcastradio/1.1/IHwTuner.h",
+        "android/hardware/broadcastradio/1.1/BnHwTuner.h",
+        "android/hardware/broadcastradio/1.1/BpHwTuner.h",
+        "android/hardware/broadcastradio/1.1/BsTuner.h",
+        "android/hardware/broadcastradio/1.1/ITunerCallback.h",
+        "android/hardware/broadcastradio/1.1/IHwTunerCallback.h",
+        "android/hardware/broadcastradio/1.1/BnHwTunerCallback.h",
+        "android/hardware/broadcastradio/1.1/BpHwTunerCallback.h",
+        "android/hardware/broadcastradio/1.1/BsTunerCallback.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.broadcastradio@1.1",
+    generated_sources: ["android.hardware.broadcastradio@1.1_genc++"],
+    generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
+    export_generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hardware.broadcastradio@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.broadcastradio@1.0",
+    ],
+}
diff --git a/broadcastradio/1.1/Android.mk b/broadcastradio/1.1/Android.mk
new file mode 100644
index 0000000..0c4c55d
--- /dev/null
+++ b/broadcastradio/1.1/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/broadcastradio/1.1/IBroadcastRadioFactory.hal b/broadcastradio/1.1/IBroadcastRadioFactory.hal
new file mode 100644
index 0000000..fce1cc0
--- /dev/null
+++ b/broadcastradio/1.1/IBroadcastRadioFactory.hal
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::IBroadcastRadioFactory;
+
+/**
+ * To use 1.1 features you must cast specific interfaces after being returned from 1.0 HAL,
+ * for example V1_1::ITuner::castFrom() after retrieving it from IBroadcastRadio::openTuner().
+ * The 1.1 server must always return the 1.1 version of specific interface.
+ */
+interface IBroadcastRadioFactory extends @1.0::IBroadcastRadioFactory {
+};
diff --git a/broadcastradio/1.1/ITuner.hal b/broadcastradio/1.1/ITuner.hal
new file mode 100644
index 0000000..4f34019
--- /dev/null
+++ b/broadcastradio/1.1/ITuner.hal
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::ITuner;
+
+interface ITuner extends @1.0::ITuner {
+
+    /**
+     * Retrieve current station information.
+     * @return result OK if scan successfully started
+     *                NOT_INITIALIZED if another error occurs
+     * @return info Current program information.
+     */
+    getProgramInformation_1_1() generates(Result result, ProgramInfo info);
+
+    /**
+     * Retrieve station list.
+     *
+     * This call does not trigger actual scan, but operates on the list cached
+     * internally at the driver level.
+     *
+     * @param filter vendor-specific filter for the stations to be retrieved.
+     *               An empty string MUST result in full list.
+     *               Client application MUST verify vendor/product name
+     *               before setting this parameter to anything else.
+     * @return result OK if the list was successfully retrieved.
+     *                NOT_READY if the scan is in progress.
+     *                NOT_STARTED if the scan has not been started.
+     *                NOT_INITIALIZED if any other error occurs.
+     * @return programList List of stations available for user.
+     */
+    getProgramList(string filter)
+            generates(ProgramListResult result, vec<ProgramInfo> programList);
+
+};
diff --git a/broadcastradio/1.1/ITunerCallback.hal b/broadcastradio/1.1/ITunerCallback.hal
new file mode 100644
index 0000000..4af6b1f
--- /dev/null
+++ b/broadcastradio/1.1/ITunerCallback.hal
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::ITunerCallback;
+
+/**
+ * Some methods of @1.1::ITunerCallback are updated versions of those from @1.0:ITunerCallback.
+ * All 1.1 drivers should call both (eg. tuneComplete and tuneComplete_1_1), while 1.1 clients
+ * should ignore 1.0 ones, to avoid receiving a callback twice.
+ */
+interface ITunerCallback extends @1.0::ITunerCallback {
+    /*
+     * Method called by the HAL when a tuning operation completes
+     * following a step(), scan() or tune() command.
+     * @param result OK if tune succeeded or TIMEOUT in case of time out.
+     * @param info A ProgramInfo structure describing the tuned station.
+     */
+    oneway tuneComplete_1_1(Result result, ProgramInfo info);
+
+    /*
+     * Method called by the HAL when a frequency switch occurs.
+     * @param info A ProgramInfo structure describing the new tuned station.
+     */
+    oneway afSwitch_1_1(ProgramInfo info);
+};
diff --git a/broadcastradio/1.1/WARNING b/broadcastradio/1.1/WARNING
new file mode 100644
index 0000000..e867cfa
--- /dev/null
+++ b/broadcastradio/1.1/WARNING
@@ -0,0 +1 @@
+This is experimental interface, do not use it yet.
diff --git a/broadcastradio/1.1/default/Android.mk b/broadcastradio/1.1/default/Android.mk
new file mode 100644
index 0000000..bb32d50
--- /dev/null
+++ b/broadcastradio/1.1/default/Android.mk
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.broadcastradio@1.1-impl
+LOCAL_PROPRIETARY_MODULE := true
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_CFLAGS += -Werror -Wall -Wextra
+LOCAL_SRC_FILES := \
+    BroadcastRadio.cpp \
+    BroadcastRadioFactory.cpp \
+    Tuner.cpp \
+    Utils.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+    libhidlbase \
+    libhidltransport \
+    libutils \
+    liblog \
+    libhardware \
+    android.hardware.broadcastradio@1.0 \
+    android.hardware.broadcastradio@1.1 \
+    libradio_metadata
+
+ifeq ($(strip $(AUDIOSERVER_MULTILIB)),)
+LOCAL_MULTILIB := 32
+else
+LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
+endif
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/broadcastradio/1.1/default/BroadcastRadio.cpp b/broadcastradio/1.1/default/BroadcastRadio.cpp
new file mode 100644
index 0000000..611267b
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadio.cpp
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+#define LOG_TAG "BroadcastRadio"
+//#define LOG_NDEBUG 0
+
+#include <log/log.h>
+
+#include "BroadcastRadio.h"
+#include "Tuner.h"
+#include "Utils.h"
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using ::android::sp;
+
+BroadcastRadio::BroadcastRadio(Class classId)
+        : mStatus(Result::NOT_INITIALIZED), mClassId(classId), mHwDevice(NULL)
+{
+}
+
+BroadcastRadio::~BroadcastRadio()
+{
+    if (mHwDevice != NULL) {
+        radio_hw_device_close(mHwDevice);
+    }
+}
+
+void BroadcastRadio::onFirstRef()
+{
+    const hw_module_t *mod;
+    int rc;
+    ALOGI("%s mClassId %d", __FUNCTION__, mClassId);
+
+    mHwDevice = NULL;
+    const char *classString = Utils::getClassString(mClassId);
+    if (classString == NULL) {
+        ALOGE("invalid class ID %d", mClassId);
+        mStatus = Result::INVALID_ARGUMENTS;
+        return;
+    }
+
+    ALOGI("%s RADIO_HARDWARE_MODULE_ID %s %s",
+            __FUNCTION__, RADIO_HARDWARE_MODULE_ID, classString);
+
+    rc = hw_get_module_by_class(RADIO_HARDWARE_MODULE_ID, classString, &mod);
+    if (rc != 0) {
+        ALOGE("couldn't load radio module %s.%s (%s)",
+                RADIO_HARDWARE_MODULE_ID, classString, strerror(-rc));
+        return;
+    }
+    rc = radio_hw_device_open(mod, &mHwDevice);
+    if (rc != 0) {
+        ALOGE("couldn't open radio hw device in %s.%s (%s)",
+                RADIO_HARDWARE_MODULE_ID, "primary", strerror(-rc));
+        mHwDevice = NULL;
+        return;
+    }
+    if (mHwDevice->common.version != RADIO_DEVICE_API_VERSION_CURRENT) {
+        ALOGE("wrong radio hw device version %04x", mHwDevice->common.version);
+        radio_hw_device_close(mHwDevice);
+        mHwDevice = NULL;
+    } else {
+        mStatus = Result::OK;
+    }
+}
+
+int BroadcastRadio::closeHalTuner(const struct radio_tuner *halTuner)
+{
+    ALOGV("%s", __FUNCTION__);
+    if (mHwDevice == NULL) {
+        return -ENODEV;
+    }
+    if (halTuner == 0) {
+        return -EINVAL;
+    }
+    return mHwDevice->close_tuner(mHwDevice, halTuner);
+}
+
+
+// Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadio follow.
+Return<void> BroadcastRadio::getProperties(getProperties_cb _hidl_cb)
+{
+    int rc;
+    radio_hal_properties_t halProperties;
+    Properties properties;
+
+    if (mHwDevice == NULL) {
+        rc = -ENODEV;
+        goto exit;
+    }
+    rc = mHwDevice->get_properties(mHwDevice, &halProperties);
+    if (rc == 0) {
+        Utils::convertPropertiesFromHal(&properties, &halProperties);
+    }
+
+exit:
+    _hidl_cb(Utils::convertHalResult(rc), properties);
+    return Void();
+}
+
+Return<void> BroadcastRadio::openTuner(const BandConfig& config, bool audio,
+    const sp<V1_0::ITunerCallback>& callback, openTuner_cb _hidl_cb)
+{
+    sp<Tuner> tunerImpl = new Tuner(callback, this);
+
+    radio_hal_band_config_t halConfig;
+    const struct radio_tuner *halTuner;
+    Utils::convertBandConfigToHal(&halConfig, &config);
+    int rc = mHwDevice->open_tuner(mHwDevice, &halConfig, audio, Tuner::callback,
+            tunerImpl.get(), &halTuner);
+    if (rc == 0) {
+        tunerImpl->setHalTuner(halTuner);
+    }
+
+    _hidl_cb(Utils::convertHalResult(rc), tunerImpl);
+    return Void();
+}
+
+} // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
diff --git a/broadcastradio/1.1/default/BroadcastRadio.h b/broadcastradio/1.1/default/BroadcastRadio.h
new file mode 100644
index 0000000..068979d
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadio.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
+
+#include <android/hardware/broadcastradio/1.0/IBroadcastRadio.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
+#include <hardware/radio.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Class;
+using V1_0::BandConfig;
+using V1_0::Properties;
+
+struct BroadcastRadio : public V1_0::IBroadcastRadio {
+
+    BroadcastRadio(Class classId);
+
+    // Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadio follow.
+    Return<void> getProperties(getProperties_cb _hidl_cb) override;
+    Return<void> openTuner(const BandConfig& config, bool audio,
+            const sp<V1_0::ITunerCallback>& callback, openTuner_cb _hidl_cb) override;
+
+    // RefBase
+    virtual void onFirstRef() override;
+
+    Result initCheck() { return mStatus; }
+    int closeHalTuner(const struct radio_tuner *halTuner);
+
+private:
+    virtual ~BroadcastRadio();
+
+    static const char * sClassModuleNames[];
+
+    Result convertHalResult(int rc);
+    void convertBandConfigFromHal(BandConfig *config,
+            const radio_hal_band_config_t *halConfig);
+    void convertPropertiesFromHal(Properties *properties,
+            const radio_hal_properties_t *halProperties);
+    void convertBandConfigToHal(radio_hal_band_config_t *halConfig,
+            const BandConfig *config);
+
+    Result mStatus;
+    Class mClassId;
+    struct radio_hw_device *mHwDevice;
+};
+
+}  // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
diff --git a/broadcastradio/1.1/default/BroadcastRadioFactory.cpp b/broadcastradio/1.1/default/BroadcastRadioFactory.cpp
new file mode 100644
index 0000000..c8b6c39
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadioFactory.cpp
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+#include "BroadcastRadioFactory.h"
+#include "BroadcastRadio.h"
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+// Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadioFactory follow.
+Return<void> BroadcastRadioFactory::connectModule(Class classId, connectModule_cb _hidl_cb)  {
+    sp<BroadcastRadio> impl = new BroadcastRadio(classId);
+    Result retval = Result::NOT_INITIALIZED;
+    if (impl != 0) {
+        retval = impl->initCheck();
+    }
+    _hidl_cb(retval, impl);
+    return Void();
+}
+
+
+IBroadcastRadioFactory* HIDL_FETCH_IBroadcastRadioFactory(const char* /* name */) {
+    return new BroadcastRadioFactory();
+}
+
+}  // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
diff --git a/broadcastradio/1.1/default/BroadcastRadioFactory.h b/broadcastradio/1.1/default/BroadcastRadioFactory.h
new file mode 100644
index 0000000..8eb8514
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadioFactory.h
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
+
+#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Class;
+
+struct BroadcastRadioFactory : public IBroadcastRadioFactory {
+    // Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadioFactory follow.
+    Return<void> connectModule(Class classId, connectModule_cb _hidl_cb) override;
+};
+
+extern "C" IBroadcastRadioFactory* HIDL_FETCH_IBroadcastRadioFactory(const char* name);
+
+}  // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
diff --git a/broadcastradio/1.1/default/Tuner.cpp b/broadcastradio/1.1/default/Tuner.cpp
new file mode 100644
index 0000000..b4eb184
--- /dev/null
+++ b/broadcastradio/1.1/default/Tuner.cpp
@@ -0,0 +1,214 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "Tuner"
+//#define LOG_NDEBUG 0
+
+#include <log/log.h>
+
+#include "BroadcastRadio.h"
+#include "Tuner.h"
+#include "Utils.h"
+#include <system/RadioMetadataWrapper.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+void Tuner::onCallback(radio_hal_event_t *halEvent)
+{
+    BandConfig config;
+    ProgramInfo info;
+    hidl_vec<MetaData> metadata;
+
+    if (mCallback != 0) {
+        switch(halEvent->type) {
+        case RADIO_EVENT_CONFIG:
+            Utils::convertBandConfigFromHal(&config, &halEvent->config);
+            mCallback->configChange(Utils::convertHalResult(halEvent->status), config);
+            break;
+        case RADIO_EVENT_ANTENNA:
+            mCallback->antennaStateChange(halEvent->on);
+            break;
+        case RADIO_EVENT_TUNED:
+            Utils::convertProgramInfoFromHal(&info, &halEvent->info);
+            if (mCallback1_1 != nullptr) {
+                mCallback1_1->tuneComplete_1_1(Utils::convertHalResult(halEvent->status), info);
+            }
+            mCallback->tuneComplete(Utils::convertHalResult(halEvent->status), info.base);
+            break;
+        case RADIO_EVENT_METADATA: {
+            uint32_t channel;
+            uint32_t sub_channel;
+            if (radio_metadata_get_channel(halEvent->metadata, &channel, &sub_channel) == 0) {
+                Utils::convertMetaDataFromHal(metadata, halEvent->metadata);
+                mCallback->newMetadata(channel, sub_channel, metadata);
+            }
+            } break;
+        case RADIO_EVENT_TA:
+            mCallback->trafficAnnouncement(halEvent->on);
+            break;
+        case RADIO_EVENT_AF_SWITCH:
+            Utils::convertProgramInfoFromHal(&info, &halEvent->info);
+            if (mCallback1_1 != nullptr) {
+                mCallback1_1->afSwitch_1_1(info);
+            }
+            mCallback->afSwitch(info.base);
+            break;
+        case RADIO_EVENT_EA:
+            mCallback->emergencyAnnouncement(halEvent->on);
+            break;
+        case RADIO_EVENT_HW_FAILURE:
+        default:
+            mCallback->hardwareFailure();
+            break;
+        }
+    }
+}
+
+//static
+void Tuner::callback(radio_hal_event_t *halEvent, void *cookie)
+{
+    wp<Tuner> weak(reinterpret_cast<Tuner*>(cookie));
+    sp<Tuner> tuner = weak.promote();
+    if (tuner == 0) return;
+    tuner->onCallback(halEvent);
+}
+
+Tuner::Tuner(const sp<V1_0::ITunerCallback>& callback, const wp<BroadcastRadio>& parentDevice)
+        : mHalTuner(NULL), mCallback(callback), mCallback1_1(ITunerCallback::castFrom(callback)),
+        mParentDevice(parentDevice)
+{
+    ALOGV("%s", __FUNCTION__);
+}
+
+
+Tuner::~Tuner()
+{
+    ALOGV("%s", __FUNCTION__);
+    const sp<BroadcastRadio> parentDevice = mParentDevice.promote();
+    if (parentDevice != 0) {
+        parentDevice->closeHalTuner(mHalTuner);
+    }
+}
+
+// Methods from ::android::hardware::broadcastradio::V1_1::ITuner follow.
+Return<Result> Tuner::setConfiguration(const BandConfig& config)  {
+    ALOGV("%s", __FUNCTION__);
+    if (mHalTuner == NULL) {
+        return Utils::convertHalResult(-ENODEV);
+    }
+    radio_hal_band_config_t halConfig;
+    Utils::convertBandConfigToHal(&halConfig, &config);
+    int rc = mHalTuner->set_configuration(mHalTuner, &halConfig);
+    return Utils::convertHalResult(rc);
+}
+
+Return<void> Tuner::getConfiguration(getConfiguration_cb _hidl_cb)  {
+    int rc;
+    radio_hal_band_config_t halConfig;
+    BandConfig config;
+
+    ALOGV("%s", __FUNCTION__);
+    if (mHalTuner == NULL) {
+        rc = -ENODEV;
+        goto exit;
+    }
+    rc = mHalTuner->get_configuration(mHalTuner, &halConfig);
+    if (rc == 0) {
+        Utils::convertBandConfigFromHal(&config, &halConfig);
+    }
+
+exit:
+    _hidl_cb(Utils::convertHalResult(rc), config);
+    return Void();
+}
+
+Return<Result> Tuner::scan(Direction direction, bool skipSubChannel)  {
+    if (mHalTuner == NULL) {
+        return Utils::convertHalResult(-ENODEV);
+    }
+    int rc = mHalTuner->scan(mHalTuner, static_cast<radio_direction_t>(direction), skipSubChannel);
+    return Utils::convertHalResult(rc);
+}
+
+Return<Result> Tuner::step(Direction direction, bool skipSubChannel)  {
+    if (mHalTuner == NULL) {
+        return Utils::convertHalResult(-ENODEV);
+    }
+    int rc = mHalTuner->step(mHalTuner, static_cast<radio_direction_t>(direction), skipSubChannel);
+    return Utils::convertHalResult(rc);
+}
+
+Return<Result> Tuner::tune(uint32_t channel, uint32_t subChannel)  {
+    if (mHalTuner == NULL) {
+        return Utils::convertHalResult(-ENODEV);
+    }
+    int rc = mHalTuner->tune(mHalTuner, channel, subChannel);
+    return Utils::convertHalResult(rc);
+}
+
+Return<Result> Tuner::cancel()  {
+    if (mHalTuner == NULL) {
+        return Utils::convertHalResult(-ENODEV);
+    }
+    int rc = mHalTuner->cancel(mHalTuner);
+    return Utils::convertHalResult(rc);
+}
+
+Return<void> Tuner::getProgramInformation(getProgramInformation_cb _hidl_cb)  {
+    ALOGV("%s", __FUNCTION__);
+    return getProgramInformation_1_1([&](Result result, const ProgramInfo& info) {
+        _hidl_cb(result, info.base);
+    });
+}
+
+Return<void> Tuner::getProgramInformation_1_1(getProgramInformation_1_1_cb _hidl_cb)  {
+    int rc;
+    radio_program_info_t halInfo;
+    RadioMetadataWrapper metadataWrapper(&halInfo.metadata);
+    ProgramInfo info;
+
+    ALOGV("%s", __FUNCTION__);
+    if (mHalTuner == NULL) {
+        rc = -ENODEV;
+        goto exit;
+    }
+
+    rc = mHalTuner->get_program_information(mHalTuner, &halInfo);
+    if (rc == 0) {
+        Utils::convertProgramInfoFromHal(&info, &halInfo);
+    }
+
+exit:
+    _hidl_cb(Utils::convertHalResult(rc), info);
+    return Void();
+}
+
+Return<void> Tuner::getProgramList(const hidl_string& filter __unused, getProgramList_cb _hidl_cb) {
+    hidl_vec<ProgramInfo> pList;
+    // TODO(b/34054813): do the actual implementation.
+    _hidl_cb(ProgramListResult::NOT_INITIALIZED, pList);
+    return Void();
+}
+
+} // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
diff --git a/broadcastradio/1.1/default/Tuner.h b/broadcastradio/1.1/default/Tuner.h
new file mode 100644
index 0000000..fcf053a
--- /dev/null
+++ b/broadcastradio/1.1/default/Tuner.h
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
+
+#include <android/hardware/broadcastradio/1.1/ITuner.h>
+#include <android/hardware/broadcastradio/1.1/ITunerCallback.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Direction;
+
+struct BroadcastRadio;
+
+struct Tuner : public ITuner {
+
+    Tuner(const sp<V1_0::ITunerCallback>& callback, const wp<BroadcastRadio>& mParentDevice);
+
+    // Methods from ::android::hardware::broadcastradio::V1_1::ITuner follow.
+    Return<Result> setConfiguration(const BandConfig& config) override;
+    Return<void> getConfiguration(getConfiguration_cb _hidl_cb) override;
+    Return<Result> scan(Direction direction, bool skipSubChannel) override;
+    Return<Result> step(Direction direction, bool skipSubChannel) override;
+    Return<Result> tune(uint32_t channel, uint32_t subChannel) override;
+    Return<Result> cancel() override;
+    Return<void> getProgramInformation(getProgramInformation_cb _hidl_cb) override;
+    Return<void> getProgramInformation_1_1(getProgramInformation_1_1_cb _hidl_cb) override;
+    Return<void> getProgramList(const hidl_string& filter, getProgramList_cb _hidl_cb) override;
+
+    static void callback(radio_hal_event_t *halEvent, void *cookie);
+    void onCallback(radio_hal_event_t *halEvent);
+
+    void setHalTuner(const struct radio_tuner *halTuner) { mHalTuner = halTuner; }
+    const struct radio_tuner *getHalTuner() { return mHalTuner; }
+
+private:
+    ~Tuner();
+
+    const struct radio_tuner *mHalTuner;
+    const sp<V1_0::ITunerCallback> mCallback;
+    const sp<V1_1::ITunerCallback> mCallback1_1;
+    const wp<BroadcastRadio> mParentDevice;
+};
+
+
+}  // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
diff --git a/broadcastradio/1.1/default/Utils.cpp b/broadcastradio/1.1/default/Utils.cpp
new file mode 100644
index 0000000..e21344e
--- /dev/null
+++ b/broadcastradio/1.1/default/Utils.cpp
@@ -0,0 +1,299 @@
+/*
+ * 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.
+ */
+#define LOG_TAG "BroadcastRadioHalUtils"
+//#define LOG_NDEBUG 0
+
+#include <log/log.h>
+#include <system/radio_metadata.h>
+
+#include "Utils.h"
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Band;
+using V1_0::Deemphasis;
+using V1_0::Direction;
+using V1_0::MetadataKey;
+using V1_0::MetadataType;
+using V1_0::Rds;
+
+const char *Utils::sClassModuleNames[] = {
+    RADIO_HARDWARE_MODULE_ID_FM, /* corresponds to RADIO_CLASS_AM_FM */
+    RADIO_HARDWARE_MODULE_ID_SAT,  /* corresponds to RADIO_CLASS_SAT */
+    RADIO_HARDWARE_MODULE_ID_DT,   /* corresponds to RADIO_CLASS_DT */
+};
+
+// make sure HIDL enum values are aligned with legacy values
+static_assert(RADIO_CLASS_AM_FM == static_cast<int>(Class::AM_FM),
+        "AM/FM class mismatch with legacy");
+static_assert(RADIO_CLASS_SAT == static_cast<int>(Class::SAT),
+        "SAT class mismatch with legacy");
+static_assert(RADIO_CLASS_DT == static_cast<int>(Class::DT),
+        "DT class mismatch with legacy");
+
+static_assert(RADIO_BAND_AM == static_cast<int>(Band::AM),
+        "AM band mismatch with legacy");
+static_assert(RADIO_BAND_FM == static_cast<int>(Band::FM),
+        "FM band mismatch with legacy");
+static_assert(RADIO_BAND_AM_HD == static_cast<int>(Band::AM_HD),
+        "AM HD band mismatch with legacy");
+static_assert(RADIO_BAND_FM_HD == static_cast<int>(Band::FM_HD),
+        "FM HD band mismatch with legacy");
+
+static_assert(RADIO_RDS_NONE == static_cast<int>(Rds::NONE),
+        "RDS NONE mismatch with legacy");
+static_assert(RADIO_RDS_WORLD == static_cast<int>(Rds::WORLD),
+        "RDS WORLD mismatch with legacy");
+static_assert(RADIO_RDS_US == static_cast<int>(Rds::US),
+        "RDS US mismatch with legacy");
+
+static_assert(RADIO_DEEMPHASIS_50 == static_cast<int>(Deemphasis::D50),
+        "De-emphasis 50 mismatch with legacy");
+static_assert(RADIO_DEEMPHASIS_75 == static_cast<int>(Deemphasis::D75),
+        "De-emphasis 75 mismatch with legacy");
+
+static_assert(RADIO_DIRECTION_UP == static_cast<int>(Direction::UP),
+        "Direction Up mismatch with legacy");
+static_assert(RADIO_DIRECTION_DOWN == static_cast<int>(Direction::DOWN),
+        "Direction Up mismatch with legacy");
+
+static_assert(RADIO_METADATA_TYPE_INVALID == static_cast<int>(MetadataType::INVALID),
+        "Metadata type INVALID mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_INT == static_cast<int>(MetadataType::INT),
+        "Metadata type INT mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_TEXT == static_cast<int>(MetadataType::TEXT),
+        "Metadata type TEXT mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_RAW == static_cast<int>(MetadataType::RAW),
+        "Metadata type RAW mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_CLOCK == static_cast<int>(MetadataType::CLOCK),
+        "Metadata type CLOCK mismatch with legacy");
+
+static_assert(RADIO_METADATA_KEY_INVALID == static_cast<int>(MetadataKey::INVALID),
+        "Metadata key INVALID mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_PI == static_cast<int>(MetadataKey::RDS_PI),
+        "Metadata key RDS_PI mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_PS == static_cast<int>(MetadataKey::RDS_PS),
+        "Metadata key RDS_PS mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_PTY == static_cast<int>(MetadataKey::RDS_PTY),
+        "Metadata key RDS_PTY mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RBDS_PTY == static_cast<int>(MetadataKey::RBDS_PTY),
+        "Metadata key RBDS_PTY mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_RT == static_cast<int>(MetadataKey::RDS_RT),
+        "Metadata key RDS_RT mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_TITLE == static_cast<int>(MetadataKey::TITLE),
+        "Metadata key TITLE mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ARTIST == static_cast<int>(MetadataKey::ARTIST),
+        "Metadata key ARTIST mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ALBUM == static_cast<int>(MetadataKey::ALBUM),
+        "Metadata key ALBUM mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_GENRE == static_cast<int>(MetadataKey::GENRE),
+        "Metadata key GENRE mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ICON == static_cast<int>(MetadataKey::ICON),
+        "Metadata key ICON mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ART == static_cast<int>(MetadataKey::ART),
+        "Metadata key ART mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_CLOCK == static_cast<int>(MetadataKey::CLOCK),
+        "Metadata key CLOCK mismatch with legacy");
+
+
+//static
+const char * Utils::getClassString(Class ClassId)
+{
+    int id = static_cast<int>(ClassId);
+
+    if ((id < 0) ||
+            (id >= NELEM(sClassModuleNames))) {
+        ALOGE("invalid class ID %d", id);
+        return NULL;
+    }
+    return sClassModuleNames[id];
+}
+
+//static
+Result Utils::convertHalResult(int rc)
+{
+    switch (rc) {
+        case 0:
+            return Result::OK;
+        case -EINVAL:
+            return Result::INVALID_ARGUMENTS;
+        case -ENOSYS:
+            return Result::INVALID_STATE;
+        case -ETIMEDOUT:
+            return Result::TIMEOUT;
+        case -ENODEV:
+        default:
+            return Result::NOT_INITIALIZED;
+    }
+}
+
+//static
+void Utils::convertBandConfigFromHal(
+        BandConfig *config,
+        const radio_hal_band_config_t *halConfig)
+{
+
+    config->type = static_cast<Band>(halConfig->type);
+    config->antennaConnected = halConfig->antenna_connected;
+    config->lowerLimit = halConfig->lower_limit;
+    config->upperLimit = halConfig->upper_limit;
+    config->spacings.setToExternal(const_cast<unsigned int *>(&halConfig->spacings[0]),
+            halConfig->num_spacings * sizeof(uint32_t));
+    // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+    config->spacings.resize(halConfig->num_spacings);
+
+    if (config->type == Band::FM) {
+        config->ext.fm.deemphasis = static_cast<Deemphasis>(halConfig->fm.deemphasis);
+        config->ext.fm.stereo = halConfig->fm.stereo;
+        config->ext.fm.rds = static_cast<Rds>(halConfig->fm.rds);
+        config->ext.fm.ta = halConfig->fm.ta;
+        config->ext.fm.af = halConfig->fm.af;
+        config->ext.fm.ea = halConfig->fm.ea;
+    } else {
+        config->ext.am.stereo = halConfig->am.stereo;
+    }
+}
+
+//static
+void Utils::convertPropertiesFromHal(Properties *properties,
+        const radio_hal_properties_t *halProperties)
+{
+    properties->classId = static_cast<Class>(halProperties->class_id);
+    properties->implementor.setToExternal(halProperties->implementor, strlen(halProperties->implementor));
+    properties->product.setToExternal(halProperties->product, strlen(halProperties->product));
+    properties->version.setToExternal(halProperties->version, strlen(halProperties->version));
+    properties->serial.setToExternal(halProperties->serial, strlen(halProperties->serial));
+    properties->numTuners = halProperties->num_tuners;
+    properties->numAudioSources = halProperties->num_audio_sources;
+    properties->supportsCapture = halProperties->supports_capture;
+
+    BandConfig *bands =
+            new BandConfig[halProperties->num_bands];
+    for (size_t i = 0; i < halProperties->num_bands; i++) {
+        convertBandConfigFromHal(&bands[i], &halProperties->bands[i]);
+    }
+    properties->bands.setToExternal(bands, halProperties->num_bands);
+    // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+    properties->bands.resize(halProperties->num_bands);
+    delete[] bands;
+}
+
+//static
+void Utils::convertBandConfigToHal(radio_hal_band_config_t *halConfig, const BandConfig *config)
+{
+    halConfig->type = static_cast<radio_band_t>(config->type);
+    halConfig->antenna_connected = config->antennaConnected;
+    halConfig->lower_limit = config->lowerLimit;
+    halConfig->upper_limit = config->upperLimit;
+    halConfig->num_spacings = config->spacings.size();
+    if (halConfig->num_spacings > RADIO_NUM_SPACINGS_MAX) {
+        halConfig->num_spacings = RADIO_NUM_SPACINGS_MAX;
+    }
+    memcpy(halConfig->spacings, config->spacings.data(),
+           sizeof(uint32_t) * halConfig->num_spacings);
+
+    if (config->type == Band::FM) {
+        halConfig->fm.deemphasis = static_cast<radio_deemphasis_t>(config->ext.fm.deemphasis);
+        halConfig->fm.stereo = config->ext.fm.stereo;
+        halConfig->fm.rds = static_cast<radio_rds_t>(config->ext.fm.rds);
+        halConfig->fm.ta = config->ext.fm.ta;
+        halConfig->fm.af = config->ext.fm.af;
+        halConfig->fm.ea = config->ext.fm.ea;
+    } else {
+        halConfig->am.stereo = config->ext.am.stereo;
+    }
+}
+
+
+//static
+void Utils::convertProgramInfoFromHal(ProgramInfo *info, radio_program_info_t *halInfo)
+{
+    auto &info_1_1 = *info;
+    auto &info_1_0 = info->base;
+
+    info_1_0.channel = halInfo->channel;
+    info_1_0.subChannel = halInfo->sub_channel;
+    info_1_0.tuned = halInfo->tuned;
+    info_1_0.stereo = halInfo->stereo;
+    info_1_0.digital = halInfo->digital;
+    info_1_0.signalStrength = halInfo->signal_strength;
+    convertMetaDataFromHal(info_1_0.metadata, halInfo->metadata);
+    // TODO(b/34348946): add support for HAL 1.1 fields
+    info_1_1.flags = 0;
+}
+
+//static
+int Utils::convertMetaDataFromHal(hidl_vec<MetaData>& metadata, radio_metadata_t *halMetadata)
+{
+    if (halMetadata == NULL) {
+        ALOGE("Invalid argument: halMetadata is NULL");
+        return 0;
+    }
+
+    int count = radio_metadata_get_count(halMetadata);
+    if (count <= 0) {
+        return count;
+    }
+    MetaData *newMetadata = new MetaData[count];
+    int outCount = 0;
+    for (int i = 0; i < count; i++) {
+        radio_metadata_key_t key;
+        radio_metadata_type_t type;
+        void *value;
+        size_t size;
+        if (radio_metadata_get_at_index(halMetadata, i , &key, &type, &value, &size) != 0 ||
+                size == 0) {
+            continue;
+        }
+        switch (type) {
+            case RADIO_METADATA_TYPE_INT: {
+                newMetadata[outCount].intValue = *(static_cast<int32_t *>(value));
+            } break;
+            case RADIO_METADATA_TYPE_TEXT: {
+                newMetadata[outCount].stringValue = static_cast<char *>(value);
+            } break;
+            case RADIO_METADATA_TYPE_RAW: {
+                newMetadata[outCount].rawValue.setToExternal(static_cast<uint8_t *>(value), size);
+                // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+                newMetadata[outCount].rawValue.resize(size);
+            } break;
+            case RADIO_METADATA_TYPE_CLOCK: {
+                radio_metadata_clock_t *clock = static_cast<radio_metadata_clock_t *>(value);
+                newMetadata[outCount].clockValue.utcSecondsSinceEpoch =
+                        clock->utc_seconds_since_epoch;
+                newMetadata[outCount].clockValue.timezoneOffsetInMinutes =
+                        clock->timezone_offset_in_minutes;
+            } break;
+        }
+        newMetadata[outCount].type = static_cast<MetadataType>(type);
+        newMetadata[outCount].key = static_cast<MetadataKey>(key);
+        outCount++;
+    }
+    metadata.setToExternal(newMetadata, outCount);
+    // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+    metadata.resize(outCount);
+    return outCount;
+}
+
+}  // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
diff --git a/broadcastradio/1.1/default/Utils.h b/broadcastradio/1.1/default/Utils.h
new file mode 100644
index 0000000..22902ba
--- /dev/null
+++ b/broadcastradio/1.1/default/Utils.h
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_UTILS_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_UTILS_H
+
+#include <android/hardware/broadcastradio/1.1/types.h>
+#include <hardware/radio.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Class;
+using V1_0::BandConfig;
+using V1_0::MetaData;
+using V1_0::Properties;
+
+class Utils {
+public:
+    static const char * getClassString(Class ClassId);
+    static Result convertHalResult(int rc);
+    static void convertBandConfigFromHal(BandConfig *config,
+            const radio_hal_band_config_t *halConfig);
+    static void convertPropertiesFromHal(Properties *properties,
+            const radio_hal_properties_t *halProperties);
+    static void convertBandConfigToHal(radio_hal_band_config_t *halConfig,
+            const BandConfig *config);
+    static void convertProgramInfoFromHal(ProgramInfo *info,
+                                          radio_program_info_t *halInfo);
+    static int convertMetaDataFromHal(hidl_vec<MetaData>& metadata,
+                                       radio_metadata_t *halMetadata);
+private:
+    static const char * sClassModuleNames[];
+
+};
+
+}  // namespace implementation
+}  // namespace V1_1
+}  // namespace broadcastradio
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_UTILS_H
diff --git a/broadcastradio/1.1/types.hal b/broadcastradio/1.1/types.hal
new file mode 100644
index 0000000..b6f72d2
--- /dev/null
+++ b/broadcastradio/1.1/types.hal
@@ -0,0 +1,63 @@
+/**
+ * Copyright 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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::types;
+
+typedef @1.0::Result Result;
+
+enum ProgramListResult : Result {
+    NOT_READY,
+    NOT_STARTED,
+    TEMPORARILY_UNAVAILABLE,
+};
+
+/**
+ * Extra flags for program information.
+ */
+enum ProgramInfoFlags : uint32_t {
+    /**
+     * Set when the program is currently playing live stream.
+     * This may result in a slightly altered reception parameters,
+     * usually targetted at reduced latency.
+     */
+    LIVE = 1 << 0,
+
+    /**
+     * Radio stream is not playing, ie. due to bad reception conditions or
+     * buffering. In this state volume knob MAY be disabled to prevent user
+     * increasing volume too much.
+     */
+    MUTED = 1 << 1,
+};
+
+/**
+ * Radio program information. Returned by the HAL with event RADIO_EVENT_TUNED.
+ * Contains information on currently tuned channel.
+ */
+struct ProgramInfo {
+    @1.0::ProgramInfo base;
+    bitfield<ProgramInfoFlags> flags;
+
+    /**
+     * Vendors are allowed to define their own set of flags and store it in this
+     * field. They MUST verify vendor/product name from Properties struct
+     * (IBroadcastRadio::getProperties) before doing any interpretation
+     * of such values.
+     */
+    uint32_t vendorFlags;
+};
diff --git a/broadcastradio/1.1/vts/Android.mk b/broadcastradio/1.1/vts/Android.mk
new file mode 100644
index 0000000..0c4c55d
--- /dev/null
+++ b/broadcastradio/1.1/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/broadcastradio/1.1/vts/functional/Android.bp b/broadcastradio/1.1/vts/functional/Android.bp
new file mode 100644
index 0000000..a4c0849
--- /dev/null
+++ b/broadcastradio/1.1/vts/functional/Android.bp
@@ -0,0 +1,37 @@
+//
+// 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.
+//
+
+cc_test {
+    name: "VtsHalBroadcastradioV1_1TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalBroadcastradioV1_1TargetTest.cpp"],
+    shared_libs: [
+        "libbase",
+        "liblog",
+        "libcutils",
+        "libhidlbase",
+        "libhidltransport",
+        "libnativehelper",
+        "libutils",
+        "android.hardware.broadcastradio@1.0",
+        "android.hardware.broadcastradio@1.1",
+    ],
+    static_libs: ["VtsHalHidlTargetTestBase"],
+    cflags: [
+        "-O0",
+        "-g",
+    ],
+}
diff --git a/broadcastradio/1.0/vts/functional/broadcastradio_hidl_hal_test.cpp b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
similarity index 81%
rename from broadcastradio/1.0/vts/functional/broadcastradio_hidl_hal_test.cpp
rename to broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
index bcbfbb7..aad01f6 100644
--- a/broadcastradio/1.0/vts/functional/broadcastradio_hidl_hal_test.cpp
+++ b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 The Android Open Source Project
+ * 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.
@@ -15,66 +15,57 @@
  */
 
 #define LOG_TAG "BroadcastRadioHidlHalTest"
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <android-base/logging.h>
 #include <cutils/native_handle.h>
 #include <cutils/properties.h>
 #include <hidl/HidlTransportSupport.h>
 #include <utils/threads.h>
 
-#include <android/hardware/broadcastradio/1.0/IBroadcastRadioFactory.h>
+#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
 #include <android/hardware/broadcastradio/1.0/IBroadcastRadio.h>
-#include <android/hardware/broadcastradio/1.0/ITuner.h>
-#include <android/hardware/broadcastradio/1.0/ITunerCallback.h>
-#include <android/hardware/broadcastradio/1.0/types.h>
+#include <android/hardware/broadcastradio/1.1/ITuner.h>
+#include <android/hardware/broadcastradio/1.1/ITunerCallback.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
 
 
+namespace V1_0 = ::android::hardware::broadcastradio::V1_0;
+
 using ::android::sp;
 using ::android::Mutex;
 using ::android::Condition;
 using ::android::hardware::Return;
 using ::android::hardware::Status;
 using ::android::hardware::Void;
-using ::android::hardware::broadcastradio::V1_0::IBroadcastRadioFactory;
-using ::android::hardware::broadcastradio::V1_0::IBroadcastRadio;
-using ::android::hardware::broadcastradio::V1_0::ITuner;
-using ::android::hardware::broadcastradio::V1_0::ITunerCallback;
-using ::android::hardware::broadcastradio::V1_0::Result;
-using ::android::hardware::broadcastradio::V1_0::Class;
-using ::android::hardware::broadcastradio::V1_0::Properties;
 using ::android::hardware::broadcastradio::V1_0::BandConfig;
+using ::android::hardware::broadcastradio::V1_0::Class;
 using ::android::hardware::broadcastradio::V1_0::Direction;
-using ::android::hardware::broadcastradio::V1_0::ProgramInfo;
+using ::android::hardware::broadcastradio::V1_0::IBroadcastRadio;
 using ::android::hardware::broadcastradio::V1_0::MetaData;
+using ::android::hardware::broadcastradio::V1_0::Properties;
+using ::android::hardware::broadcastradio::V1_1::IBroadcastRadioFactory;
+using ::android::hardware::broadcastradio::V1_1::ITuner;
+using ::android::hardware::broadcastradio::V1_1::ITunerCallback;
+using ::android::hardware::broadcastradio::V1_1::ProgramInfo;
+using ::android::hardware::broadcastradio::V1_1::Result;
 
 
-// The main test class for Sound Trigger HIDL HAL.
+// The main test class for Broadcast Radio HIDL HAL.
 
-class BroadcastRadioHidlTest : public ::testing::Test {
+class BroadcastRadioHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  protected:
     virtual void SetUp() override {
-        bool getStub = false;
-        char getsubProperty[PROPERTY_VALUE_MAX];
-        if (property_get("vts.hidl.get_stub", getsubProperty, "") > 0) {
-            if (!strcmp(getsubProperty, "true") ||
-                    !strcmp(getsubProperty, "True") ||
-                    !strcmp(getsubProperty, "1")) {
-                getStub = true;
-            }
-        }
-        sp<IBroadcastRadioFactory> factory =
-              IBroadcastRadioFactory::getService("broadcastradio", getStub);
+        auto factory = ::testing::VtsHalHidlTargetTestBase::getService<IBroadcastRadioFactory>();
         if (factory != 0) {
             factory->connectModule(Class::AM_FM,
                              [&](Result retval, const ::android::sp<IBroadcastRadio>& result) {
                 if (retval == Result::OK) {
-                  mRadio = result;
+                  mRadio = IBroadcastRadio::castFrom(result);
                 }
             });
         }
         mTunerCallback = new MyCallback(this);
         ASSERT_NE(nullptr, mRadio.get());
-        ASSERT_EQ(!getStub, mRadio->isRemote());
         ASSERT_NE(nullptr, mTunerCallback.get());
     }
 
@@ -99,13 +90,21 @@
             return Void();
         }
 
-        virtual Return<void> tuneComplete(Result result, const ProgramInfo& info __unused) {
+        virtual Return<void> tuneComplete(Result result __unused, const V1_0::ProgramInfo& info __unused) {
+            return Void();
+        }
+
+        virtual Return<void> tuneComplete_1_1(Result result, const ProgramInfo& info __unused) {
             ALOGI("%s result %d", __FUNCTION__, result);
             mParentTest->onResultCallback(result);
             return Void();
         }
 
-        virtual Return<void> afSwitch(const ProgramInfo& info __unused) {
+        virtual Return<void> afSwitch(const V1_0::ProgramInfo& info __unused) {
+            return Void();
+        }
+
+        virtual Return<void> afSwitch_1_1(const ProgramInfo& info __unused) {
             return Void();
         }
 
@@ -257,17 +256,16 @@
     }
     if (mTuner.get() == nullptr) {
         Result halResult = Result::NOT_INITIALIZED;
-        Return<void> hidlReturn =
-                mRadio->openTuner(mHalProperties.bands[0], true, mTunerCallback,
-                                  [&](Result result, const sp<ITuner>& tuner) {
-                        halResult = result;
-                        if (result == Result::OK) {
-                            mTuner = tuner;
-                        }
-                    });
+        auto hidlReturn = mRadio->openTuner(mHalProperties.bands[0], true, mTunerCallback,
+                [&](Result result, const sp<V1_0::ITuner>& tuner) {
+                    halResult = result;
+                    if (result == Result::OK) {
+                        mTuner = ITuner::castFrom(tuner);
+                    }
+                });
         EXPECT_TRUE(hidlReturn.isOk());
         EXPECT_EQ(Result::OK, halResult);
-        EXPECT_EQ(true, waitForCallback(kConfigCallbacktimeoutNs));
+        EXPECT_TRUE(waitForCallback(kConfigCallbacktimeoutNs));
     }
     EXPECT_NE(nullptr, mTuner.get());
     return nullptr != mTuner.get();
@@ -300,7 +298,7 @@
  *  - the implementation supports at one band
  */
 TEST_F(BroadcastRadioHidlTest, GetProperties) {
-    EXPECT_EQ(true, getProperties());
+    EXPECT_TRUE(getProperties());
 }
 
 /**
@@ -311,7 +309,7 @@
  *  - the method returns 0 (no error) and a valid ITuner interface
  */
 TEST_F(BroadcastRadioHidlTest, OpenTuner) {
-    EXPECT_EQ(true, openTuner());
+    EXPECT_TRUE(openTuner());
 }
 
 /**
@@ -324,13 +322,13 @@
  *  - the configuration read back from HAl has the same class Id
  */
 TEST_F(BroadcastRadioHidlTest, SetAndGetConfiguration) {
-    ASSERT_EQ(true, openTuner());
+    ASSERT_TRUE(openTuner());
     // test setConfiguration
     mCallbackCalled = false;
     Return<Result> hidlResult = mTuner->setConfiguration(mHalProperties.bands[0]);
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
-    EXPECT_EQ(true, waitForCallback(kConfigCallbacktimeoutNs));
+    EXPECT_TRUE(waitForCallback(kConfigCallbacktimeoutNs));
     EXPECT_EQ(Result::OK, mResultCallbackData);
 
     // test getConfiguration
@@ -357,21 +355,21 @@
  *  - the tuned callback is received within kTuneCallbacktimeoutNs ns
  */
 TEST_F(BroadcastRadioHidlTest, Scan) {
-    ASSERT_EQ(true, openTuner());
+    ASSERT_TRUE(openTuner());
     ASSERT_TRUE(checkAntenna());
     // test scan UP
     mCallbackCalled = false;
     Return<Result> hidlResult = mTuner->scan(Direction::UP, true);
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
-    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
+    EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
 
     // test scan DOWN
     mCallbackCalled = false;
     hidlResult = mTuner->scan(Direction::DOWN, true);
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
-    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
+    EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
 }
 
 /**
@@ -383,21 +381,21 @@
  *  - the tuned callback is received within kTuneCallbacktimeoutNs ns
  */
 TEST_F(BroadcastRadioHidlTest, Step) {
-    ASSERT_EQ(true, openTuner());
+    ASSERT_TRUE(openTuner());
     ASSERT_TRUE(checkAntenna());
     // test step UP
     mCallbackCalled = false;
     Return<Result> hidlResult = mTuner->step(Direction::UP, true);
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
-    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
+    EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
 
     // test step DOWN
     mCallbackCalled = false;
     hidlResult = mTuner->step(Direction::DOWN, true);
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
-    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
+    EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
 }
 
 /**
@@ -409,7 +407,7 @@
  *  - the tuned callback is received within kTuneCallbacktimeoutNs ns after tune()
  */
 TEST_F(BroadcastRadioHidlTest, TuneAndGetProgramInformationAndCancel) {
-    ASSERT_EQ(true, openTuner());
+    ASSERT_TRUE(openTuner());
     ASSERT_TRUE(checkAntenna());
 
     // test tune
@@ -428,12 +426,12 @@
     Return<Result> hidlResult = mTuner->tune(channel, 0);
     EXPECT_TRUE(hidlResult.isOk());
     EXPECT_EQ(Result::OK, hidlResult);
-    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
+    EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
 
     // test getProgramInformation
     ProgramInfo halInfo;
     Result halResult = Result::NOT_INITIALIZED;
-    Return<void> hidlReturn = mTuner->getProgramInformation(
+    Return<void> hidlReturn = mTuner->getProgramInformation_1_1(
         [&](Result result, const ProgramInfo& info) {
             halResult = result;
             if (result == Result::OK) {
@@ -442,12 +440,13 @@
         });
     EXPECT_TRUE(hidlReturn.isOk());
     EXPECT_EQ(Result::OK, halResult);
+    auto &halInfo_1_1 = halInfo.base;
     if (mResultCallbackData == Result::OK) {
-        EXPECT_EQ(true, halInfo.tuned);
-        EXPECT_LE(halInfo.channel, upperLimit);
-        EXPECT_GE(halInfo.channel, lowerLimit);
+        EXPECT_TRUE(halInfo_1_1.tuned);
+        EXPECT_LE(halInfo_1_1.channel, upperLimit);
+        EXPECT_GE(halInfo_1_1.channel, lowerLimit);
     } else {
-        EXPECT_EQ(false, halInfo.tuned);
+        EXPECT_EQ(false, halInfo_1_1.tuned);
     }
 
     // test cancel
diff --git a/broadcastradio/Android.bp b/broadcastradio/Android.bp
index 33f70eb..5cacbf3 100644
--- a/broadcastradio/Android.bp
+++ b/broadcastradio/Android.bp
@@ -2,4 +2,6 @@
 subdirs = [
     "1.0",
     "1.0/vts/functional",
+    "1.1",
+    "1.1/vts/functional",
 ]
diff --git a/camera/Android.bp b/camera/Android.bp
index e379e49..3869766 100644
--- a/camera/Android.bp
+++ b/camera/Android.bp
@@ -3,6 +3,7 @@
     "common/1.0",
     "common/1.0/default",
     "device/1.0",
+    "device/1.0/default",
     "device/3.2",
     "device/3.2/default",
     "metadata/3.2",
diff --git a/camera/common/1.0/default/Android.bp b/camera/common/1.0/default/Android.bp
index af0ff6e..6437480 100644
--- a/camera/common/1.0/default/Android.bp
+++ b/camera/common/1.0/default/Android.bp
@@ -1,6 +1,11 @@
 cc_library_static {
     name: "android.hardware.camera.common@1.0-helper",
-    srcs: ["CameraModule.cpp", "CameraMetadata.cpp", "VendorTagDescriptor.cpp"],
+    defaults: ["hidl_defaults"],
+    srcs: [
+        "CameraModule.cpp",
+        "CameraMetadata.cpp",
+        "VendorTagDescriptor.cpp",
+        "HandleImporter.cpp"],
     cflags: [
         "-Werror",
         "-Wextra",
@@ -13,3 +18,4 @@
     include_dirs: ["system/media/private/camera/include"],
     export_include_dirs : ["include"]
 }
+
diff --git a/camera/common/1.0/default/HandleImporter.cpp b/camera/common/1.0/default/HandleImporter.cpp
new file mode 100644
index 0000000..dee2973
--- /dev/null
+++ b/camera/common/1.0/default/HandleImporter.cpp
@@ -0,0 +1,190 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "HandleImporter"
+#include <utils/Log.h>
+#include "HandleImporter.h"
+
+namespace android {
+namespace hardware {
+namespace camera {
+namespace common {
+namespace V1_0 {
+namespace helper {
+
+HandleImporter HandleImporter::sHandleImporter;
+
+HandleImporter& HandleImporter::getInstance() {
+    sHandleImporter.initialize();
+    return sHandleImporter;
+}
+
+bool HandleImporter::initialize() {
+    // allow only one client
+    if (mInitialized) {
+        return false;
+    }
+
+    if (!openGralloc()) {
+        return false;
+    }
+
+    mInitialized = true;
+    return true;
+}
+
+void HandleImporter::cleanup() {
+    if (!mInitialized) {
+        return;
+    }
+
+    closeGralloc();
+    mInitialized = false;
+}
+
+// In IComposer, any buffer_handle_t is owned by the caller and we need to
+// make a clone for hwcomposer2.  We also need to translate empty handle
+// to nullptr.  This function does that, in-place.
+bool HandleImporter::importBuffer(buffer_handle_t& handle) {
+    if (!handle->numFds && !handle->numInts) {
+        handle = nullptr;
+        return true;
+    }
+
+    buffer_handle_t clone = cloneBuffer(handle);
+    if (!clone) {
+        return false;
+    }
+
+    handle = clone;
+    return true;
+}
+
+void HandleImporter::freeBuffer(buffer_handle_t handle) {
+    if (!handle) {
+        return;
+    }
+
+    releaseBuffer(handle);
+}
+
+bool HandleImporter::importFence(const native_handle_t* handle, int& fd) {
+    if (handle == nullptr || handle->numFds == 0) {
+        fd = -1;
+    } else if (handle->numFds == 1) {
+        fd = dup(handle->data[0]);
+        if (fd < 0) {
+            ALOGE("failed to dup fence fd %d", handle->data[0]);
+            return false;
+        }
+    } else {
+        ALOGE("invalid fence handle with %d file descriptors",
+                handle->numFds);
+        return false;
+    }
+
+    return true;
+}
+
+void HandleImporter::closeFence(int fd) {
+    if (fd >= 0) {
+        close(fd);
+    }
+}
+
+bool HandleImporter::openGralloc() {
+    const hw_module_t* module;
+    int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
+    if (err) {
+        ALOGE("failed to get gralloc module");
+        return false;
+    }
+
+    uint8_t major = (module->module_api_version >> 8) & 0xff;
+    if (major > 1) {
+        ALOGE("unknown gralloc module major version %d", major);
+        return false;
+    }
+
+    if (major == 1) {
+        err = gralloc1_open(module, &mDevice);
+        if (err) {
+            ALOGE("failed to open gralloc1 device");
+            return false;
+        }
+
+        mRetain = reinterpret_cast<GRALLOC1_PFN_RETAIN>(
+                mDevice->getFunction(mDevice, GRALLOC1_FUNCTION_RETAIN));
+        mRelease = reinterpret_cast<GRALLOC1_PFN_RELEASE>(
+                mDevice->getFunction(mDevice, GRALLOC1_FUNCTION_RELEASE));
+        if (!mRetain || !mRelease) {
+            ALOGE("invalid gralloc1 device");
+            gralloc1_close(mDevice);
+            return false;
+        }
+    } else {
+        mModule = reinterpret_cast<const gralloc_module_t*>(module);
+    }
+
+    return true;
+}
+
+void HandleImporter::closeGralloc() {
+    if (mDevice) {
+        gralloc1_close(mDevice);
+    }
+}
+
+buffer_handle_t HandleImporter::cloneBuffer(buffer_handle_t handle) {
+    native_handle_t* clone = native_handle_clone(handle);
+    if (!clone) {
+        ALOGE("failed to clone buffer %p", handle);
+        return nullptr;
+    }
+
+    bool err;
+    if (mDevice) {
+        err = (mRetain(mDevice, clone) != GRALLOC1_ERROR_NONE);
+    } else {
+        err = (mModule->registerBuffer(mModule, clone) != 0);
+    }
+
+    if (err) {
+        ALOGE("failed to retain/register buffer %p", clone);
+        native_handle_close(clone);
+        native_handle_delete(clone);
+        return nullptr;
+    }
+
+    return clone;
+}
+
+void HandleImporter::releaseBuffer(buffer_handle_t handle) {
+    if (mDevice) {
+        mRelease(mDevice, handle);
+    } else {
+        mModule->unregisterBuffer(mModule, handle);
+    }
+    native_handle_close(handle);
+    native_handle_delete(const_cast<native_handle_t*>(handle));
+}
+
+} // namespace helper
+} // namespace V1_0
+} // namespace common
+} // namespace camera
+} // namespace hardware
+} // namespace android
diff --git a/camera/common/1.0/default/include/CameraModule.h b/camera/common/1.0/default/include/CameraModule.h
index 68d4f90..9fbfbd5 100644
--- a/camera/common/1.0/default/include/CameraModule.h
+++ b/camera/common/1.0/default/include/CameraModule.h
@@ -20,6 +20,7 @@
 #include <hardware/camera.h>
 #include <utils/Mutex.h>
 #include <utils/KeyedVector.h>
+#include <utils/RefBase.h>
 
 #include "CameraMetadata.h"
 
diff --git a/camera/common/1.0/default/include/HandleImporter.h b/camera/common/1.0/default/include/HandleImporter.h
new file mode 100644
index 0000000..def8982
--- /dev/null
+++ b/camera/common/1.0/default/include/HandleImporter.h
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+#ifndef CAMERA_COMMON_1_0_HANDLEIMPORTED_H
+#define CAMERA_COMMON_1_0_HANDLEIMPORTED_H
+
+#include <hardware/gralloc.h>
+#include <hardware/gralloc1.h>
+#include <system/window.h>
+
+namespace android {
+namespace hardware {
+namespace camera {
+namespace common {
+namespace V1_0 {
+namespace helper {
+
+// Borrowed from graphics HAL. Use this until gralloc mapper HAL is working
+class HandleImporter {
+public:
+    static HandleImporter& getInstance();
+
+    // In IComposer, any buffer_handle_t is owned by the caller and we need to
+    // make a clone for hwcomposer2.  We also need to translate empty handle
+    // to nullptr.  This function does that, in-place.
+    bool importBuffer(buffer_handle_t& handle);
+    void freeBuffer(buffer_handle_t handle);
+    bool importFence(const native_handle_t* handle, int& fd);
+    void closeFence(int fd);
+
+private:
+
+    HandleImporter() : mInitialized(false) {}
+    bool initialize();
+    void cleanup();
+    bool openGralloc();
+    void closeGralloc();
+    buffer_handle_t cloneBuffer(buffer_handle_t handle);
+    void releaseBuffer(buffer_handle_t handle);
+
+    static HandleImporter sHandleImporter;
+    bool mInitialized;
+
+    // gralloc1
+    gralloc1_device_t* mDevice;
+    GRALLOC1_PFN_RETAIN mRetain;
+    GRALLOC1_PFN_RELEASE mRelease;
+
+    // gralloc0
+    const gralloc_module_t* mModule;
+};
+
+} // namespace helper
+} // namespace V1_0
+} // namespace common
+} // namespace camera
+} // namespace hardware
+} // namespace android
+
+#endif // CAMERA_COMMON_1_0_HANDLEIMPORTED_H
\ No newline at end of file
diff --git a/camera/device/1.0/ICameraDevice.hal b/camera/device/1.0/ICameraDevice.hal
index d232a67..52d6cf0 100644
--- a/camera/device/1.0/ICameraDevice.hal
+++ b/camera/device/1.0/ICameraDevice.hal
@@ -125,8 +125,7 @@
      *         the torch on through the device interface.
      *     OPERATION_NOT_SUPPORTED:
      *         This camera device does not have a flash unit. This must
-     *         be returned if and only if android.flash.info.available is
-     *         false.
+     *         be returned if and only if parameter key flash-mode-values is not present.
      *     CAMERA_DISCONNECTED:
      *         An external camera device has been disconnected, and is no longer
      *         available. This camera device interface is now stale, and a new
@@ -298,7 +297,8 @@
     recordingEnabled() generates (bool enabled);
 
     /**
-     * Release a record frame previously returned by CAMERA_MSG_VIDEO_FRAME.
+     * Release a record frame previously returned by CAMERA_MSG_VIDEO_FRAME in
+     * dataCallbackTimestamp.
      *
      * It is camera HAL client's responsibility to release video recording
      * frames sent out by the camera HAL before the camera HAL receives a call
@@ -306,10 +306,26 @@
      * disableMsgType(CAMERA_MSG_VIDEO_FRAME), it is the camera HAL's
      * responsibility to manage the life-cycle of the video recording frames.
      *
-     * @param data The memory buffer to release a recording frame from.
+     * @param memId The memory buffer to release a recording frame from.
      * @param bufferIndex The specific buffer index to return to the HAL.
      */
-    releaseRecordingFrame(MemoryId data, uint32_t bufferIndex);
+    releaseRecordingFrame(MemoryId memId, uint32_t bufferIndex);
+
+    /**
+     * Release a record frame previously returned by CAMERA_MSG_VIDEO_FRAME in
+     * handleCallbackTimestamp.
+     *
+     * It is camera HAL client's responsibility to release video recording
+     * frames sent out by the camera HAL before the camera HAL receives a call
+     * to disableMsgType(CAMERA_MSG_VIDEO_FRAME). After it receives the call to
+     * disableMsgType(CAMERA_MSG_VIDEO_FRAME), it is the camera HAL's
+     * responsibility to manage the life-cycle of the video recording frames.
+     *
+     * @param memId The memory buffer to release a recording frame from.
+     * @param bufferIndex The specific buffer index to return to the HAL.
+     * @param frame The handle for a released video frame
+     */
+    releaseRecordingFrameHandle(MemoryId memId, uint32_t bufferIndex, handle frame);
 
     /**
      * Start auto focus.
@@ -352,14 +368,14 @@
     /**
      * Set the camera parameters.
      *
-     * @param parms The parameter string, consisting of
+     * @param params The parameter string, consisting of
      *    '<key1>=<value1>; ...;<keyN>=<valueN>'.
      * @return status The status code for this operation:
      *     OK: Parameter update was successful
      *     ILLEGAL_ARGUMENT: At least one parameter was invalid or not supported
      *
      */
-    setParameters(string parms) generates (Status status);
+    setParameters(string params) generates (Status status);
 
     /**
      * Retrieve the camera parameters.
diff --git a/camera/device/1.0/ICameraDeviceCallback.hal b/camera/device/1.0/ICameraDeviceCallback.hal
index 97014ee..1b0db24 100644
--- a/camera/device/1.0/ICameraDeviceCallback.hal
+++ b/camera/device/1.0/ICameraDeviceCallback.hal
@@ -42,8 +42,10 @@
      * @param bufferCount The number of contiguous buffers that the descriptor
      *     contains.
      *
-     * @return memId A integer identifier for this memory buffer, for use with
-     *     data callbacks and unregistering memory.
+     * @return memId A positive integer identifier for this memory buffer, for
+     *     use with data callbacks and unregistering memory. 0 must be returned
+     *     in case of error, such as if the descriptor does not contain exactly
+     *     one FD.
      */
     registerMemory(handle descriptor, uint32_t bufferSize, uint32_t bufferCount)
             generates (MemoryId memId);
@@ -62,7 +64,8 @@
      *     starts.
      *
      */
-    dataCallback(DataCallbackMsg msgType, MemoryId data, uint32_t bufferIndex);
+    dataCallback(DataCallbackMsg msgType, MemoryId data, uint32_t bufferIndex,
+            CameraFrameMetadata metadata);
 
     /**
      * Send a buffer of image data to the camera service, with a timestamp
@@ -78,4 +81,21 @@
     dataCallbackTimestamp(DataCallbackMsg msgType, MemoryId data, uint32_t bufferIndex,
             int64_t timestamp);
 
+    /**
+     * Send a buffer of image data to the camera service, with a timestamp
+     *
+     * @param msgType The kind of image buffer data this call represents.
+     * @param handle The handle of image buffer data this call represents.
+     * @param data A memory handle to the buffer containing the data.
+     * @param bufferIndex The offset into the memory handle where the buffer
+     *     starts.
+     * @param timestamp The time this buffer was captured by the camera, in
+     *     nanoseconds.
+     *
+     * @return frameId a frame ID to be used with releaseRecordingFrameId later
+     *
+     */
+    handleCallbackTimestamp(DataCallbackMsg msgType, handle frameData, MemoryId data,
+            uint32_t bufferIndex, int64_t timestamp);
+
 };
diff --git a/camera/device/1.0/ICameraDevicePreviewCallback.hal b/camera/device/1.0/ICameraDevicePreviewCallback.hal
index ebc7460..4c9b517 100644
--- a/camera/device/1.0/ICameraDevicePreviewCallback.hal
+++ b/camera/device/1.0/ICameraDevicePreviewCallback.hal
@@ -30,28 +30,31 @@
      *
      * @return status The status code for this operation. If not OK, then
      *     buffer and stride must not be used.
-     * @return buffer A handle to the buffer to write into.
+     * @return bufferId A unique ID for the returned buffer.
+     * @return buffer A handle to the buffer to write into. Must be non-null if the bufferId has not
+     *     been seen by HAL before. Must be null if the bufferId is seen before. HAL must keep track
+     *     of the bufferId to actual buffer handle mapping.
      * @return stride The stride between two rows of pixels in this buffer.
      */
-    dequeueBuffer() generates (Status status, handle buffer, uint32_t stride);
+    dequeueBuffer() generates (Status status, uint64_t bufferId, handle buffer, uint32_t stride);
 
     /**
      * Send a filled preview buffer to its consumer.
      *
-     * @param buffer The handle to the preview buffer that's been filled.
+     * @param bufferId The bufferId of the preview buffer
      * @return status The status code for this operation.
      */
-    enqueueBuffer(handle buffer) generates (Status status);
+    enqueueBuffer(uint64_t bufferId) generates (Status status);
 
     /**
      * Return a preview buffer unfilled. This buffer must not be sent on to the
      * preview consumer as a valid buffer, but may be reused as if it were
      * empty.
      *
-     * @param buffer The handle to the preview buffer to return.
+     * @param bufferId The bufferId of the preview buffer
      * @return status The status code for this operation.
      */
-    cancelBuffer(handle buffer) generates (Status status);
+    cancelBuffer(uint64_t bufferId) generates (Status status);
 
     /**
      * Set the number of preview buffers needed by the HAL.
diff --git a/camera/device/1.0/default/Android.bp b/camera/device/1.0/default/Android.bp
new file mode 100644
index 0000000..eec641a
--- /dev/null
+++ b/camera/device/1.0/default/Android.bp
@@ -0,0 +1,28 @@
+cc_library_shared {
+    name: "camera.device@1.0-impl",
+    defaults: ["hidl_defaults"],
+    srcs: [
+        "CameraDevice.cpp",
+    ],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.camera.device@1.0",
+        "android.hardware.camera.common@1.0",
+        "android.hardware.graphics.allocator@2.0",
+        "android.hardware.graphics.common@1.0",
+        "android.hidl.base@1.0",
+        "libcutils",
+        "liblog",
+        "libhardware",
+        "libcamera_metadata",
+        "libbinder",
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0-helper"
+    ],
+    export_include_dirs: ["."]
+}
+
diff --git a/camera/device/1.0/default/CameraDevice.cpp b/camera/device/1.0/default/CameraDevice.cpp
new file mode 100644
index 0000000..819525b
--- /dev/null
+++ b/camera/device/1.0/default/CameraDevice.cpp
@@ -0,0 +1,948 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "CamDev@1.0-impl"
+#include <utils/Log.h>
+#include <hardware/camera.h>
+#include <hardware/gralloc1.h>
+#include <utils/Trace.h>
+
+#include "CameraDevice_1_0.h"
+
+namespace android {
+namespace hardware {
+namespace camera {
+namespace device {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::graphics::allocator::V2_0::ProducerUsage;
+using ::android::hardware::graphics::common::V1_0::PixelFormat;
+
+HandleImporter& CameraDevice::sHandleImporter = HandleImporter::getInstance();
+
+Status CameraDevice::getHidlStatus(const int& status) {
+    switch (status) {
+        case 0: return Status::OK;
+        case -ENOSYS: return Status::OPERATION_NOT_SUPPORTED;
+        case -EBUSY : return Status::CAMERA_IN_USE;
+        case -EUSERS: return Status::MAX_CAMERAS_IN_USE;
+        case -ENODEV: return Status::INTERNAL_ERROR;
+        case -EINVAL: return Status::ILLEGAL_ARGUMENT;
+        default:
+            ALOGE("%s: unknown HAL status code %d", __FUNCTION__, status);
+            return Status::INTERNAL_ERROR;
+    }
+}
+
+status_t CameraDevice::getStatusT(const Status& s)  {
+    switch(s) {
+        case Status::OK:
+            return OK;
+        case Status::ILLEGAL_ARGUMENT:
+            return BAD_VALUE;
+        case Status::CAMERA_IN_USE:
+            return -EBUSY;
+        case Status::MAX_CAMERAS_IN_USE:
+            return -EUSERS;
+        case Status::METHOD_NOT_SUPPORTED:
+            return UNKNOWN_TRANSACTION;
+        case Status::OPERATION_NOT_SUPPORTED:
+            return INVALID_OPERATION;
+        case Status::CAMERA_DISCONNECTED:
+            return DEAD_OBJECT;
+        case Status::INTERNAL_ERROR:
+            return INVALID_OPERATION;
+    }
+    ALOGW("Unexpected HAL status code %d", s);
+    return INVALID_OPERATION;
+}
+
+Status CameraDevice::initStatus() const {
+    Mutex::Autolock _l(mLock);
+    Status status = Status::OK;
+    if (mInitFail) {
+        status = Status::INTERNAL_ERROR;
+    } else if (mDisconnected) {
+        status = Status::CAMERA_DISCONNECTED;
+    }
+    return status;
+}
+
+CameraDevice::CameraDevice(
+    sp<CameraModule> module, const std::string& cameraId,
+    const SortedVector<std::pair<std::string, std::string>>& cameraDeviceNames) :
+        mModule(module),
+        mCameraId(cameraId),
+        mDisconnected(false),
+        mCameraDeviceNames(cameraDeviceNames) {
+    mCameraIdInt = atoi(mCameraId.c_str());
+    // Should not reach here as provider also validate ID
+    if (mCameraIdInt < 0 || mCameraIdInt >= module->getNumberOfCameras()) {
+        ALOGE("%s: Invalid camera id: %s", __FUNCTION__, mCameraId.c_str());
+        mInitFail = true;
+    }
+
+    mDeviceVersion = mModule->getDeviceVersion(mCameraIdInt);
+    if (mDeviceVersion != CAMERA_DEVICE_API_VERSION_1_0 && !mModule->isOpenLegacyDefined()) {
+        ALOGI("%s: Camera id %s does not support HAL1.0",
+                __FUNCTION__, mCameraId.c_str());
+        mInitFail = true;
+    }
+}
+
+CameraDevice::~CameraDevice() {
+    Mutex::Autolock _l(mLock);
+    if (mDevice != nullptr) {
+        ALOGW("%s: camera %s is deleted while open", __FUNCTION__, mCameraId.c_str());
+        close();
+    }
+    mHalPreviewWindow.cleanUpCirculatingBuffers();
+}
+
+
+void CameraDevice::setConnectionStatus(bool connected) {
+    Mutex::Autolock _l(mLock);
+    mDisconnected = !connected;
+    if (mDevice == nullptr) {
+        return;
+    }
+    if (!connected) {
+        ALOGW("%s: camera %s is disconneted. Closing", __FUNCTION__, mCameraId.c_str());
+        close();
+    }
+    return;
+}
+
+void CameraDevice::CameraPreviewWindow::cleanUpCirculatingBuffers() {
+    Mutex::Autolock _l(mLock);
+    for (auto pair : mCirculatingBuffers) {
+        sHandleImporter.freeBuffer(pair.second);
+    }
+    mCirculatingBuffers.clear();
+    mBufferIdMap.clear();
+}
+
+int CameraDevice::sDequeueBuffer(struct preview_stream_ops* w,
+                                   buffer_handle_t** buffer, int *stride) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+
+    if (buffer == nullptr || stride == nullptr) {
+        ALOGE("%s: buffer (%p) and stride (%p) must not be null!", __FUNCTION__, buffer, stride);
+        return BAD_VALUE;
+    }
+
+    Status s;
+    object->mPreviewCallback->dequeueBuffer(
+        [&](auto status, uint64_t bufferId, const auto& buf, uint32_t strd) {
+            s = status;
+            if (s == Status::OK) {
+                Mutex::Autolock _l(object->mLock);
+                if (object->mCirculatingBuffers.count(bufferId) == 0) {
+                    buffer_handle_t importedBuf = buf.getNativeHandle();
+                    sHandleImporter.importBuffer(importedBuf);
+                    if (importedBuf == nullptr) {
+                        ALOGE("%s: preview buffer import failed!", __FUNCTION__);
+                        s = Status::INTERNAL_ERROR;
+                        return;
+                    } else {
+                        object->mCirculatingBuffers[bufferId] = importedBuf;
+                        object->mBufferIdMap[&(object->mCirculatingBuffers[bufferId])] = bufferId;
+                    }
+                }
+                *buffer = &(object->mCirculatingBuffers[bufferId]);
+                *stride = strd;
+            }
+        });
+    return getStatusT(s);
+}
+
+int CameraDevice::sLockBuffer(struct preview_stream_ops*, buffer_handle_t*) {
+    // TODO: make sure lock_buffer is indeed a no-op (and will always be)
+    return 0;
+}
+
+int CameraDevice::sEnqueueBuffer(struct preview_stream_ops* w, buffer_handle_t* buffer) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+    uint64_t bufferId = object->mBufferIdMap.at(buffer);
+    return getStatusT(object->mPreviewCallback->enqueueBuffer(bufferId));
+}
+
+int CameraDevice::sCancelBuffer(struct preview_stream_ops* w, buffer_handle_t* buffer) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+    uint64_t bufferId = object->mBufferIdMap.at(buffer);
+    return getStatusT(object->mPreviewCallback->cancelBuffer(bufferId));
+}
+
+int CameraDevice::sSetBufferCount(struct preview_stream_ops* w, int count) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+
+    object->cleanUpCirculatingBuffers();
+    return getStatusT(object->mPreviewCallback->setBufferCount(count));
+}
+
+int CameraDevice::sSetBuffersGeometry(struct preview_stream_ops* w,
+                                         int width, int height, int format) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+
+    object->cleanUpCirculatingBuffers();
+    return getStatusT(
+            object->mPreviewCallback->setBuffersGeometry(width, height, (PixelFormat) format));
+}
+
+int CameraDevice::sSetCrop(struct preview_stream_ops *w,
+                             int left, int top, int right, int bottom) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+
+    return getStatusT(object->mPreviewCallback->setCrop(left, top, right, bottom));
+}
+
+int CameraDevice::sSetTimestamp(struct preview_stream_ops *w, int64_t timestamp) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+
+    return getStatusT(object->mPreviewCallback->setTimestamp(timestamp));
+}
+
+int CameraDevice::sSetUsage(struct preview_stream_ops* w, int usage) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+
+    object->cleanUpCirculatingBuffers();
+    return getStatusT(object->mPreviewCallback->setUsage((ProducerUsage) usage));
+}
+
+int CameraDevice::sSetSwapInterval(struct preview_stream_ops *w, int interval) {
+    CameraPreviewWindow* object = static_cast<CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+
+    return getStatusT(object->mPreviewCallback->setSwapInterval(interval));
+}
+
+int CameraDevice::sGetMinUndequeuedBufferCount(
+                  const struct preview_stream_ops *w,
+                  int *count) {
+    const CameraPreviewWindow* object =  static_cast<const CameraPreviewWindow*>(w);
+    if (object->mPreviewCallback == nullptr) {
+        ALOGE("%s: camera HAL calling preview ops while there is no preview window!", __FUNCTION__);
+        return INVALID_OPERATION;
+    }
+    if (count == nullptr) {
+        ALOGE("%s: count is null!", __FUNCTION__);
+        return BAD_VALUE;
+    }
+
+    Status s;
+    object->mPreviewCallback->getMinUndequeuedBufferCount(
+        [&](auto status, uint32_t cnt) {
+            s = status;
+            if (s == Status::OK) {
+                *count = cnt;
+            }
+        });
+    return getStatusT(s);
+}
+
+CameraDevice::CameraHeapMemory::CameraHeapMemory(int fd, size_t buf_size, uint_t num_buffers) :
+        mBufSize(buf_size),
+        mNumBufs(num_buffers) {
+    mHeap = new MemoryHeapBase(fd, buf_size * num_buffers);
+    commonInitialization();
+}
+
+CameraDevice::CameraHeapMemory::CameraHeapMemory(size_t buf_size, uint_t num_buffers) :
+        mBufSize(buf_size),
+        mNumBufs(num_buffers) {
+    mHeap = new MemoryHeapBase(buf_size * num_buffers);
+    commonInitialization();
+}
+
+void CameraDevice::CameraHeapMemory::commonInitialization() {
+    handle.data = mHeap->base();
+    handle.size = mBufSize * mNumBufs;
+    handle.handle = this;
+
+    mBuffers = new sp<MemoryBase>[mNumBufs];
+    for (uint_t i = 0; i < mNumBufs; i++) {
+        mBuffers[i] = new MemoryBase(mHeap, i * mBufSize, mBufSize);
+    }
+
+    handle.release = sPutMemory;
+}
+
+CameraDevice::CameraHeapMemory::~CameraHeapMemory() {
+    delete [] mBuffers;
+}
+
+// shared memory methods
+camera_memory_t* CameraDevice::sGetMemory(int fd, size_t buf_size, uint_t num_bufs, void *user) {
+    ALOGV("%s", __FUNCTION__);
+    CameraDevice* object = static_cast<CameraDevice*>(user);
+    if (object->mDeviceCallback == nullptr) {
+        ALOGE("%s: camera HAL request memory while camera is not opened!", __FUNCTION__);
+        return nullptr;
+    }
+
+    CameraHeapMemory* mem;
+    native_handle_t* handle = native_handle_create(1,0);
+
+    if (handle == nullptr) {
+        ALOGE("%s: native_handle_create failed!", __FUNCTION__);
+        return nullptr;
+    }
+
+    if (fd < 0) {
+        mem = new CameraHeapMemory(buf_size, num_bufs);
+    } else {
+        mem = new CameraHeapMemory(fd, buf_size, num_bufs);
+    }
+    handle->data[0] = mem->mHeap->getHeapID();
+    mem->incStrong(mem);
+
+    hidl_handle hidlHandle = handle;
+    MemoryId id = object->mDeviceCallback->registerMemory(hidlHandle, buf_size, num_bufs);
+    mem->handle.mId = id;
+    if (object->mMemoryMap.count(id) != 0) {
+        ALOGE("%s: duplicate MemoryId %d returned by client!", __FUNCTION__, id);
+    }
+    object->mMemoryMap[id] = mem;
+    mem->handle.mDevice = object;
+    native_handle_delete(handle);
+    return &mem->handle;
+}
+
+void CameraDevice::sPutMemory(camera_memory_t *data) {
+    if (!data)
+        return;
+
+    CameraHeapMemory* mem = static_cast<CameraHeapMemory *>(data->handle);
+    CameraDevice* device = mem->handle.mDevice;
+    if (device == nullptr) {
+        ALOGE("%s: camera HAL return memory for a null device!", __FUNCTION__);
+    }
+    if (device->mDeviceCallback == nullptr) {
+        ALOGE("%s: camera HAL return memory while camera is not opened!", __FUNCTION__);
+    }
+    device->mDeviceCallback->unregisterMemory(mem->handle.mId);
+    device->mMemoryMap.erase(mem->handle.mId);
+    mem->decStrong(mem);
+}
+
+// Callback forwarding methods
+void CameraDevice::sNotifyCb(int32_t msg_type, int32_t ext1, int32_t ext2, void *user) {
+    ALOGV("%s", __FUNCTION__);
+    CameraDevice* object = static_cast<CameraDevice*>(user);
+    if (object->mDeviceCallback != nullptr) {
+        object->mDeviceCallback->notifyCallback((NotifyCallbackMsg) msg_type, ext1, ext2);
+    }
+}
+
+void CameraDevice::sDataCb(int32_t msg_type, const camera_memory_t *data, unsigned int index,
+        camera_frame_metadata_t *metadata, void *user) {
+    ALOGV("%s", __FUNCTION__);
+    CameraDevice* object = static_cast<CameraDevice*>(user);
+    sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory*>(data->handle));
+    if (index >= mem->mNumBufs) {
+        ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
+             index, mem->mNumBufs);
+        return;
+    }
+    if (object->mDeviceCallback != nullptr) {
+        CameraFrameMetadata hidlMetadata;
+        if (metadata) {
+            hidlMetadata.faces.resize(metadata->number_of_faces);
+            for (size_t i = 0; i < hidlMetadata.faces.size(); i++) {
+                hidlMetadata.faces[i].score = metadata->faces[i].score;
+                hidlMetadata.faces[i].id = metadata->faces[i].id;
+                for (int k = 0; k < 4; k++) {
+                    hidlMetadata.faces[i].rect[k] = metadata->faces[i].rect[k];
+                }
+                for (int k = 0; k < 2; k++) {
+                    hidlMetadata.faces[i].leftEye[k] = metadata->faces[i].left_eye[k];
+                }
+                for (int k = 0; k < 2; k++) {
+                    hidlMetadata.faces[i].rightEye[k] = metadata->faces[i].right_eye[k];
+                }
+                for (int k = 0; k < 2; k++) {
+                    hidlMetadata.faces[i].mouth[k] = metadata->faces[i].mouth[k];
+                }
+            }
+        }
+        CameraHeapMemory* mem = static_cast<CameraHeapMemory *>(data->handle);
+        object->mDeviceCallback->dataCallback(
+                (DataCallbackMsg) msg_type, mem->handle.mId, index, hidlMetadata);
+    }
+}
+
+void CameraDevice::sDataCbTimestamp(nsecs_t timestamp, int32_t msg_type,
+        const camera_memory_t *data, unsigned index, void *user) {
+    ALOGV("%s", __FUNCTION__);
+    CameraDevice* object = static_cast<CameraDevice*>(user);
+    // Start refcounting the heap object from here on.  When the clients
+    // drop all references, it will be destroyed (as well as the enclosed
+    // MemoryHeapBase.
+    sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory*>(data->handle));
+    if (index >= mem->mNumBufs) {
+        ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
+             index, mem->mNumBufs);
+        return;
+    }
+
+    native_handle_t* handle = nullptr;
+    if (object->mMetadataMode) {
+        if (mem->mBufSize == sizeof(VideoNativeHandleMetadata)) {
+            VideoNativeHandleMetadata* md = (VideoNativeHandleMetadata*)
+                    mem->mBuffers[index]->pointer();
+            if (md->eType == VideoNativeHandleMetadata::kMetadataBufferTypeNativeHandleSource) {
+                handle = md->pHandle;
+            }
+        }
+    }
+
+    if (object->mDeviceCallback != nullptr) {
+        if (handle == nullptr) {
+            object->mDeviceCallback->dataCallbackTimestamp(
+                    (DataCallbackMsg) msg_type, mem->handle.mId, index, timestamp);
+        } else {
+            object->mDeviceCallback->handleCallbackTimestamp(
+                    (DataCallbackMsg) msg_type, handle, mem->handle.mId, index, timestamp);
+        }
+    }
+}
+
+void CameraDevice::initHalPreviewWindow()
+{
+    mHalPreviewWindow.cancel_buffer = sCancelBuffer;
+    mHalPreviewWindow.lock_buffer = sLockBuffer;
+    mHalPreviewWindow.dequeue_buffer = sDequeueBuffer;
+    mHalPreviewWindow.enqueue_buffer = sEnqueueBuffer;
+    mHalPreviewWindow.set_buffer_count = sSetBufferCount;
+    mHalPreviewWindow.set_buffers_geometry = sSetBuffersGeometry;
+    mHalPreviewWindow.set_crop = sSetCrop;
+    mHalPreviewWindow.set_timestamp = sSetTimestamp;
+    mHalPreviewWindow.set_usage = sSetUsage;
+    mHalPreviewWindow.set_swap_interval = sSetSwapInterval;
+
+    mHalPreviewWindow.get_min_undequeued_buffer_count =
+            sGetMinUndequeuedBufferCount;
+}
+
+// Methods from ::android::hardware::camera::device::V1_0::ICameraDevice follow.
+Return<void> CameraDevice::getResourceCost(getResourceCost_cb _hidl_cb) {
+    Status status = initStatus();
+    CameraResourceCost resCost;
+    if (status == Status::OK) {
+        int cost = 100;
+        std::vector<std::string> conflicting_devices;
+        struct camera_info info;
+
+        // If using post-2.4 module version, query the cost + conflicting devices from the HAL
+        if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_4) {
+            int ret = mModule->getCameraInfo(mCameraIdInt, &info);
+            if (ret == OK) {
+                cost = info.resource_cost;
+                for (size_t i = 0; i < info.conflicting_devices_length; i++) {
+                    std::string cameraId(info.conflicting_devices[i]);
+                    for (const auto& pair : mCameraDeviceNames) {
+                        if (cameraId == pair.first) {
+                            conflicting_devices.push_back(pair.second);
+                        }
+                    }
+                }
+            } else {
+                status = Status::INTERNAL_ERROR;
+            }
+        }
+
+        if (status == Status::OK) {
+            resCost.resourceCost = cost;
+            resCost.conflictingDevices.resize(conflicting_devices.size());
+            for (size_t i = 0; i < conflicting_devices.size(); i++) {
+                resCost.conflictingDevices[i] = conflicting_devices[i];
+                ALOGV("CamDevice %s is conflicting with camDevice %s",
+                        mCameraId.c_str(), resCost.conflictingDevices[i].c_str());
+            }
+        }
+    }
+    _hidl_cb(status, resCost);
+    return Void();
+}
+
+Return<void> CameraDevice::getCameraInfo(getCameraInfo_cb _hidl_cb) {
+    Status status = initStatus();
+    CameraInfo cameraInfo;
+    if (status == Status::OK) {
+        struct camera_info info;
+        int ret = mModule->getCameraInfo(mCameraIdInt, &info);
+        if (ret == OK) {
+            cameraInfo.facing = (CameraFacing) info.facing;
+            // Device 1.0 does not support external camera facing.
+            // The closest approximation would be front camera.
+            // TODO: figure out should we override here or let
+            //       camera service handle it.
+            if (cameraInfo.facing == CameraFacing::EXTERNAL) {
+                cameraInfo.facing = CameraFacing::FRONT;
+            }
+            cameraInfo.orientation = info.orientation;
+        } else {
+            ALOGE("%s: get camera info failed!", __FUNCTION__);
+            status = Status::INTERNAL_ERROR;
+        }
+    }
+    _hidl_cb(status, cameraInfo);
+    return Void();
+}
+
+Return<Status> CameraDevice::setTorchMode(TorchMode mode) {
+    if (!mModule->isSetTorchModeSupported()) {
+        return Status::METHOD_NOT_SUPPORTED;
+    }
+
+    Status status = initStatus();
+    if (status == Status::OK) {
+        bool enable = (mode == TorchMode::ON) ? true : false;
+        status = getHidlStatus(mModule->setTorchMode(mCameraId.c_str(), enable));
+    }
+    return status;
+}
+
+Return<Status> CameraDevice::dumpState(const hidl_handle& handle) {
+    Mutex::Autolock _l(mLock);
+    if (handle.getNativeHandle() == nullptr) {
+        ALOGE("%s: handle must not be null", __FUNCTION__);
+        return Status::ILLEGAL_ARGUMENT;
+    }
+    if (handle->numFds != 1 || handle->numInts != 0) {
+        ALOGE("%s: handle must contain 1 FD and 0 integers! Got %d FDs and %d ints",
+                __FUNCTION__, handle->numFds, handle->numInts);
+        return Status::ILLEGAL_ARGUMENT;
+    }
+    int fd = handle->data[0];
+
+    if (mDevice != nullptr) {
+        if (mDevice->ops->dump) { // It's fine if the HAL doesn't implement dump()
+            return getHidlStatus(mDevice->ops->dump(mDevice, fd));
+        }
+    }
+    return Status::OK;
+}
+
+Return<Status> CameraDevice::open(const sp<ICameraDeviceCallback>& callback) {
+    ALOGI("Opening camera %s", mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+
+    camera_info info;
+    status_t res = mModule->getCameraInfo(mCameraIdInt, &info);
+    if (res != OK) {
+        ALOGE("Could not get camera info: %s: %d", mCameraId.c_str(), res);
+        return getHidlStatus(res);
+    }
+
+    int rc = OK;
+    if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_3 &&
+        info.device_version > CAMERA_DEVICE_API_VERSION_1_0) {
+        // Open higher version camera device as HAL1.0 device.
+        rc = mModule->openLegacy(mCameraId.c_str(),
+                                 CAMERA_DEVICE_API_VERSION_1_0,
+                                 (hw_device_t **)&mDevice);
+    } else {
+        rc = mModule->open(mCameraId.c_str(), (hw_device_t **)&mDevice);
+    }
+    if (rc != OK) {
+        mDevice = nullptr;
+        ALOGE("Could not open camera %s: %d", mCameraId.c_str(), rc);
+        return getHidlStatus(rc);
+    }
+
+    initHalPreviewWindow();
+    mDeviceCallback = callback;
+
+    if (mDevice->ops->set_callbacks) {
+        mDevice->ops->set_callbacks(mDevice,
+                sNotifyCb, sDataCb, sDataCbTimestamp, sGetMemory, this);
+    }
+
+    return getHidlStatus(rc);
+}
+
+Return<Status> CameraDevice::setPreviewWindow(const sp<ICameraDevicePreviewCallback>& window) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+
+    mHalPreviewWindow.mPreviewCallback = window;
+    if (mDevice->ops->set_preview_window) {
+        return getHidlStatus(mDevice->ops->set_preview_window(mDevice,
+                (window == nullptr) ? nullptr : &mHalPreviewWindow));
+    }
+    return Status::INTERNAL_ERROR; // HAL should provide set_preview_window
+}
+
+Return<void> CameraDevice::enableMsgType(uint32_t msgType) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Void();
+    }
+    if (mDevice->ops->enable_msg_type) {
+        mDevice->ops->enable_msg_type(mDevice, msgType);
+    }
+    return Void();
+}
+
+Return<void> CameraDevice::disableMsgType(uint32_t msgType) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Void();
+    }
+    if (mDevice->ops->disable_msg_type) {
+        mDevice->ops->disable_msg_type(mDevice, msgType);
+    }
+    return Void();
+}
+
+Return<bool> CameraDevice::msgTypeEnabled(uint32_t msgType) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return false;
+    }
+    if (mDevice->ops->msg_type_enabled) {
+        return mDevice->ops->msg_type_enabled(mDevice, msgType);
+    }
+    return false;
+}
+
+Return<Status> CameraDevice::startPreview() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->start_preview) {
+        return getHidlStatus(mDevice->ops->start_preview(mDevice));
+    }
+    return Status::INTERNAL_ERROR; // HAL should provide start_preview
+}
+
+Return<void> CameraDevice::stopPreview() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Void();
+    }
+    if (mDevice->ops->stop_preview) {
+        mDevice->ops->stop_preview(mDevice);
+    }
+    return Void();
+}
+
+Return<bool> CameraDevice::previewEnabled() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return false;
+    }
+    if (mDevice->ops->preview_enabled) {
+        return mDevice->ops->preview_enabled(mDevice);
+    }
+    return false;
+}
+
+Return<Status> CameraDevice::storeMetaDataInBuffers(bool enable) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->store_meta_data_in_buffers) {
+        status_t s = mDevice->ops->store_meta_data_in_buffers(mDevice, enable);
+        if (s == OK && enable) {
+            mMetadataMode = true;
+        }
+        return getHidlStatus(s);
+    }
+    return enable ? Status::ILLEGAL_ARGUMENT : Status::OK;
+}
+
+Return<Status> CameraDevice::startRecording() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->start_recording) {
+        return getHidlStatus(mDevice->ops->start_recording(mDevice));
+    }
+    return Status::ILLEGAL_ARGUMENT;
+}
+
+Return<void> CameraDevice::stopRecording() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Void();
+    }
+    if (mDevice->ops->stop_recording) {
+        mDevice->ops->stop_recording(mDevice);
+    }
+    return Void();
+}
+
+Return<bool> CameraDevice::recordingEnabled() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return false;
+    }
+    if (mDevice->ops->recording_enabled) {
+        return mDevice->ops->recording_enabled(mDevice);
+    }
+    return false;
+}
+
+void CameraDevice::releaseRecordingFrameLocked(
+        uint32_t memId, uint32_t bufferIndex, const native_handle_t* handle) {
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return;
+    }
+    if (mDevice->ops->release_recording_frame) {
+        CameraHeapMemory* camMemory = mMemoryMap.at(memId);
+        sp<MemoryHeapBase> heap = camMemory->mHeap;
+        if (bufferIndex >= camMemory->mNumBufs) {
+            ALOGE("%s: bufferIndex %d exceeds number of buffers %d",
+                    __FUNCTION__, bufferIndex, camMemory->mNumBufs);
+            return;
+        }
+        sp<IMemory> mem = camMemory->mBuffers[bufferIndex];
+        // TODO: simplify below logic once we verify offset is indeed idx * mBufSize
+        //       and heap == heap2
+        ssize_t offset;
+        size_t size;
+        sp<IMemoryHeap> heap2 = mem->getMemory(&offset, &size);
+        if ((size_t)offset != bufferIndex * camMemory->mBufSize) {
+            ALOGI("%s: unexpected offset %zd (was expecting %zu)",
+                    __FUNCTION__, offset, bufferIndex * camMemory->mBufSize);
+        }
+        if (heap != heap2) {
+            ALOGE("%s: heap mismatch!", __FUNCTION__);
+            return;
+        }
+        void *data = ((uint8_t *)heap->base()) + offset;
+        if (handle) {
+            VideoNativeHandleMetadata* md = (VideoNativeHandleMetadata*) data;
+            if (md->eType == VideoNativeHandleMetadata::kMetadataBufferTypeNativeHandleSource) {
+                // Input handle will be closed by HIDL transport later, so clone it
+                // HAL implementation is responsible to close/delete the clone
+                native_handle_t* clone = native_handle_clone(handle);
+                if (!clone) {
+                    ALOGE("%s: failed to clone buffer %p", __FUNCTION__, handle);
+                    return;
+                }
+                md->pHandle = clone;
+            } else {
+                ALOGE("%s:Malform VideoNativeHandleMetadata at memId %d, bufferId %d",
+                        __FUNCTION__, memId, bufferIndex);
+                return;
+            }
+        }
+        mDevice->ops->release_recording_frame(mDevice, data);
+    }
+}
+
+Return<void> CameraDevice::releaseRecordingFrame(uint32_t memId, uint32_t bufferIndex) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    releaseRecordingFrameLocked(memId, bufferIndex, nullptr);
+    return Void();
+}
+
+Return<void> CameraDevice::releaseRecordingFrameHandle(
+        uint32_t memId, uint32_t bufferIndex, const hidl_handle& frame) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    releaseRecordingFrameLocked(
+            memId, bufferIndex, frame.getNativeHandle());
+    return Void();
+}
+
+Return<Status> CameraDevice::autoFocus() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->auto_focus) {
+        return getHidlStatus(mDevice->ops->auto_focus(mDevice));
+    }
+    return Status::ILLEGAL_ARGUMENT;
+}
+
+Return<Status> CameraDevice::cancelAutoFocus() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->cancel_auto_focus) {
+        return getHidlStatus(mDevice->ops->cancel_auto_focus(mDevice));
+    }
+    return Status::ILLEGAL_ARGUMENT;
+}
+
+Return<Status> CameraDevice::takePicture() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->take_picture) {
+        return getHidlStatus(mDevice->ops->take_picture(mDevice));
+    }
+    return Status::ILLEGAL_ARGUMENT;
+}
+
+Return<Status> CameraDevice::cancelPicture() {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->cancel_picture) {
+        return getHidlStatus(mDevice->ops->cancel_picture(mDevice));
+    }
+    return Status::ILLEGAL_ARGUMENT;
+}
+
+Return<Status> CameraDevice::setParameters(const hidl_string& params) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->set_parameters) {
+        return getHidlStatus(mDevice->ops->set_parameters(mDevice, params.c_str()));
+    }
+    return Status::ILLEGAL_ARGUMENT;
+}
+
+Return<void> CameraDevice::getParameters(getParameters_cb _hidl_cb) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    hidl_string outStr;
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        _hidl_cb(outStr);
+        return Void();
+    }
+    if (mDevice->ops->get_parameters) {
+        char *temp = mDevice->ops->get_parameters(mDevice);
+        outStr = temp;
+        if (mDevice->ops->put_parameters) {
+            mDevice->ops->put_parameters(mDevice, temp);
+        } else {
+            free(temp);
+        }
+    }
+    _hidl_cb(outStr);
+    return Void();
+}
+
+Return<Status> CameraDevice::sendCommand(CommandType cmd, int32_t arg1, int32_t arg2) {
+    ALOGV("%s(%s)", __FUNCTION__, mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if (!mDevice) {
+        ALOGE("%s called while camera is not opened", __FUNCTION__);
+        return Status::OPERATION_NOT_SUPPORTED;
+    }
+    if (mDevice->ops->send_command) {
+        return getHidlStatus(mDevice->ops->send_command(mDevice, (int32_t) cmd, arg1, arg2));
+    }
+    return Status::ILLEGAL_ARGUMENT;
+}
+
+Return<void> CameraDevice::close() {
+    ALOGI("Closing camera %s", mCameraId.c_str());
+    Mutex::Autolock _l(mLock);
+    if(mDevice) {
+        int rc = mDevice->common.close(&mDevice->common);
+        if (rc != OK) {
+            ALOGE("Could not close camera %s: %d", mCameraId.c_str(), rc);
+        }
+        mDevice = nullptr;
+    }
+    return Void();
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace device
+}  // namespace camera
+}  // namespace hardware
+}  // namespace android
diff --git a/camera/device/1.0/default/CameraDevice_1_0.h b/camera/device/1.0/default/CameraDevice_1_0.h
new file mode 100644
index 0000000..2568f86
--- /dev/null
+++ b/camera/device/1.0/default/CameraDevice_1_0.h
@@ -0,0 +1,224 @@
+/*
+ * 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.
+ */
+
+#ifndef ANDROID_HARDWARE_CAMERA_DEVICE_V1_0_CAMERADEVICE_H
+#define ANDROID_HARDWARE_CAMERA_DEVICE_V1_0_CAMERADEVICE_H
+
+#include <unordered_map>
+#include "utils/Mutex.h"
+#include "utils/SortedVector.h"
+#include <binder/MemoryBase.h>
+#include <binder/MemoryHeapBase.h>
+#include "CameraModule.h"
+#include "HandleImporter.h"
+
+#include <android/hardware/camera/device/1.0/ICameraDevice.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace camera {
+namespace device {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::camera::common::V1_0::CameraResourceCost;
+using ::android::hardware::camera::common::V1_0::Status;
+using ::android::hardware::camera::common::V1_0::TorchMode;
+using ::android::hardware::camera::common::V1_0::helper::CameraModule;
+using ::android::hardware::camera::common::V1_0::helper::HandleImporter;
+using ::android::hardware::camera::device::V1_0::CameraInfo;
+using ::android::hardware::camera::device::V1_0::CommandType;
+using ::android::hardware::camera::device::V1_0::ICameraDevice;
+using ::android::hardware::camera::device::V1_0::ICameraDeviceCallback;
+using ::android::hardware::camera::device::V1_0::ICameraDevicePreviewCallback;
+using ::android::hardware::camera::device::V1_0::MemoryId;
+using ::android::hidl::base::V1_0::IBase;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+struct CameraDevice : public ICameraDevice {
+
+    // Called by provider HAL. Provider HAL must ensure the uniqueness of
+    // CameraDevice object per cameraId, or there could be multiple CameraDevice
+    // trying to access the same physical camera.
+    // Also, provider will have to keep track of all CameraDevice objects in
+    // order to notify CameraDevice when the underlying camera is detached
+    CameraDevice(sp<CameraModule> module,
+                 const std::string& cameraId,
+                 const SortedVector<std::pair<std::string, std::string>>& cameraDeviceNames);
+    ~CameraDevice();
+
+    // Caller must use this method to check if CameraDevice ctor failed
+    bool isInitFailed() { return mInitFail; }
+    // Used by provider HAL to signal external camera disconnected
+    void setConnectionStatus(bool connected);
+
+    // Methods from ::android::hardware::camera::device::V1_0::ICameraDevice follow.
+    Return<void> getResourceCost(getResourceCost_cb _hidl_cb) override;
+    Return<void> getCameraInfo(getCameraInfo_cb _hidl_cb) override;
+    Return<Status> setTorchMode(TorchMode mode) override;
+    Return<Status> dumpState(const hidl_handle& fd) override;
+    Return<Status> open(const sp<ICameraDeviceCallback>& callback) override;
+    Return<Status> setPreviewWindow(const sp<ICameraDevicePreviewCallback>& window) override;
+    Return<void> enableMsgType(uint32_t msgType) override;
+    Return<void> disableMsgType(uint32_t msgType) override;
+    Return<bool> msgTypeEnabled(uint32_t msgType) override;
+    Return<Status> startPreview() override;
+    Return<void> stopPreview() override;
+    Return<bool> previewEnabled() override;
+    Return<Status> storeMetaDataInBuffers(bool enable) override;
+    Return<Status> startRecording() override;
+    Return<void> stopRecording() override;
+    Return<bool> recordingEnabled() override;
+    Return<void> releaseRecordingFrame(uint32_t memId, uint32_t bufferIndex) override;
+    Return<void> releaseRecordingFrameHandle(
+            uint32_t memId, uint32_t bufferIndex, const hidl_handle& frame) override;
+    Return<Status> autoFocus() override;
+    Return<Status> cancelAutoFocus() override;
+    Return<Status> takePicture() override;
+    Return<Status> cancelPicture() override;
+    Return<Status> setParameters(const hidl_string& params) override;
+    Return<void> getParameters(getParameters_cb _hidl_cb) override;
+    Return<Status> sendCommand(CommandType cmd, int32_t arg1, int32_t arg2) override;
+    Return<void> close() override;
+
+private:
+    struct CameraMemory : public camera_memory_t {
+        MemoryId mId;
+        CameraDevice* mDevice;
+    };
+
+    class CameraHeapMemory : public RefBase {
+    public:
+        CameraHeapMemory(int fd, size_t buf_size, uint_t num_buffers = 1);
+        explicit CameraHeapMemory(size_t buf_size, uint_t num_buffers = 1);
+        void commonInitialization();
+        virtual ~CameraHeapMemory();
+
+        size_t mBufSize;
+        uint_t mNumBufs;
+        // TODO: b/35887419: use hidl_memory instead and get rid of libbinder
+        sp<MemoryHeapBase> mHeap;
+        sp<MemoryBase>* mBuffers;
+        CameraMemory handle;
+    };
+
+    // TODO: b/35625849
+    // Meta data buffer layout for passing a native_handle to codec
+    // matching frameworks/native/include/media/hardware/MetadataBufferType.h and
+    //          frameworks/native/include/media/hardware/HardwareAPI.h
+    struct VideoNativeHandleMetadata {
+        static const uint32_t kMetadataBufferTypeNativeHandleSource = 3;
+        uint32_t eType; // must be kMetadataBufferTypeNativeHandleSource
+        native_handle_t* pHandle;
+    };
+
+    const sp<CameraModule> mModule;
+    const std::string mCameraId;
+    // const after ctor
+    int   mCameraIdInt;
+    int   mDeviceVersion;
+
+    camera_device_t* mDevice = nullptr;
+
+    void initHalPreviewWindow();
+    struct CameraPreviewWindow : public preview_stream_ops {
+        // Called when we expect buffer will be re-allocated
+        void cleanUpCirculatingBuffers();
+
+        Mutex mLock;
+        sp<ICameraDevicePreviewCallback> mPreviewCallback = nullptr;
+        std::unordered_map<uint64_t, buffer_handle_t> mCirculatingBuffers;
+        std::unordered_map<buffer_handle_t*, uint64_t> mBufferIdMap;
+    } mHalPreviewWindow;
+
+    // gating access to mDevice, mInitFail, mDisconnected
+    mutable Mutex mLock;
+
+    bool  mInitFail = false;
+    // Set by provider (when external camera is connected/disconnected)
+    bool  mDisconnected;
+
+    static HandleImporter& sHandleImporter;
+
+    const SortedVector<std::pair<std::string, std::string>>& mCameraDeviceNames;
+
+    sp<ICameraDeviceCallback> mDeviceCallback = nullptr;
+
+    std::unordered_map<MemoryId, CameraHeapMemory*> mMemoryMap;
+
+    bool mMetadataMode = false;
+
+    void releaseRecordingFrameLocked(uint32_t memId, uint32_t bufferIndex, const native_handle_t*);
+
+    // shared memory methods
+    static camera_memory_t* sGetMemory(int fd, size_t buf_size, uint_t num_bufs, void *user);
+    static void sPutMemory(camera_memory_t *data);
+
+    // Device callback forwarding methods
+    static void sNotifyCb(int32_t msg_type, int32_t ext1, int32_t ext2, void *user);
+    static void sDataCb(int32_t msg_type, const camera_memory_t *data, unsigned int index,
+                          camera_frame_metadata_t *metadata, void *user);
+    static void sDataCbTimestamp(nsecs_t timestamp, int32_t msg_type,
+                                    const camera_memory_t *data, unsigned index, void *user);
+
+    // Preview window callback forwarding methods
+    static int sDequeueBuffer(struct preview_stream_ops* w,
+                                buffer_handle_t** buffer, int *stride);
+
+    static int sLockBuffer(struct preview_stream_ops* w, buffer_handle_t* buffer);
+
+    static int sEnqueueBuffer(struct preview_stream_ops* w, buffer_handle_t* buffer);
+
+    static int sCancelBuffer(struct preview_stream_ops* w, buffer_handle_t* buffer);
+
+    static int sSetBufferCount(struct preview_stream_ops* w, int count);
+
+    static int sSetBuffersGeometry(struct preview_stream_ops* w,
+                                     int width, int height, int format);
+
+    static int sSetCrop(struct preview_stream_ops *w, int left, int top, int right, int bottom);
+
+    static int sSetTimestamp(struct preview_stream_ops *w, int64_t timestamp);
+
+    static int sSetUsage(struct preview_stream_ops* w, int usage);
+
+    static int sSetSwapInterval(struct preview_stream_ops *w, int interval);
+
+    static int sGetMinUndequeuedBufferCount(const struct preview_stream_ops *w, int *count);
+
+    // convert conventional HAL status to HIDL Status
+    static Status getHidlStatus(const int&);
+    static status_t getStatusT(const Status& s);
+
+    Status initStatus() const;
+};
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace device
+}  // namespace camera
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_CAMERA_DEVICE_V1_0_CAMERADEVICE_H
diff --git a/camera/device/1.0/types.hal b/camera/device/1.0/types.hal
index 83c0be4..b32c938 100644
--- a/camera/device/1.0/types.hal
+++ b/camera/device/1.0/types.hal
@@ -189,6 +189,66 @@
     PREVIEW_METADATA = 0x0400
 };
 
+/**
+ * Information for a single detected face.
+ */
+ struct CameraFace {
+    /**
+     * Bounds of the face [left, top, right, bottom]. (-1000, -1000) represents
+     * the top-left of the camera field of view, and (1000, 1000) represents the
+     * bottom-right of the field of view. The width and height cannot be 0 or
+     * negative. This is supported by both hardware and software face detection.
+     *
+     * The direction is relative to the sensor orientation, that is, what the
+     * sensor sees. The direction is not affected by the rotation or mirroring
+     * of CAMERA_CMD_SET_DISPLAY_ORIENTATION.
+     */
+    int32_t[4] rect;
+
+    /**
+     * The confidence level of the face. The range is 1 to 100. 100 is the
+     * highest confidence. This is supported by both hardware and software
+     * face detection.
+     */
+    int32_t score;
+
+    /**
+     * An unique id per face while the face is visible to the tracker. If
+     * the face leaves the field-of-view and comes back, it will get a new
+     * id. If the value is 0, id is not supported.
+     */
+    int32_t id;
+
+    /**
+     * The coordinates of the center of the left eye. The range is -1000 to
+     * 1000. -2000, -2000 if this is not supported.
+     */
+    int32_t[2] leftEye;
+
+    /**
+     * The coordinates of the center of the right eye. The range is -1000 to
+     * 1000. -2000, -2000 if this is not supported.
+     */
+    int32_t[2] rightEye;
+
+    /**
+     * The coordinates of the center of the mouth. The range is -1000 to 1000.
+     * -2000, -2000 if this is not supported.
+     */
+    int32_t[2] mouth;
+
+};
+
+/**
+ * The metadata of the frame data, such as face detection result.
+ */
+struct CameraFrameMetadata {
+    /**
+     * A vector of the detected faces.
+     */
+    vec<CameraFace> faces;
+};
+
 /*
  * A simple integer handle to use to reference a particular memory buffer
  * between the HAL and the framework.
diff --git a/camera/device/3.2/default/Android.bp b/camera/device/3.2/default/Android.bp
index 62e3c3e..3767e09 100644
--- a/camera/device/3.2/default/Android.bp
+++ b/camera/device/3.2/default/Android.bp
@@ -1,12 +1,12 @@
 cc_library_shared {
     name: "camera.device@3.2-impl",
+    defaults: ["hidl_defaults"],
     srcs: ["CameraDevice.cpp",
            "CameraDeviceSession.cpp",
            "convert.cpp"],
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libutils",
         "libcutils",
         "android.hardware.camera.device@3.2",
diff --git a/camera/device/3.2/default/CameraDevice.cpp b/camera/device/3.2/default/CameraDevice.cpp
index 18e0e7b..0a457ad 100644
--- a/camera/device/3.2/default/CameraDevice.cpp
+++ b/camera/device/3.2/default/CameraDevice.cpp
@@ -15,11 +15,11 @@
  */
 
 #define LOG_TAG "CamDev@3.2-impl"
-#include <android/log.h>
+#include <utils/Log.h>
 
 #include <utils/Vector.h>
 #include <utils/Trace.h>
-#include "CameraDevice.h"
+#include "CameraDevice_3_2.h"
 #include <include/convert.h>
 
 namespace android {
diff --git a/camera/device/3.2/default/CameraDeviceSession.cpp b/camera/device/3.2/default/CameraDeviceSession.cpp
index 0f3d97b..ae5d576 100644
--- a/camera/device/3.2/default/CameraDeviceSession.cpp
+++ b/camera/device/3.2/default/CameraDeviceSession.cpp
@@ -29,198 +29,13 @@
 namespace V3_2 {
 namespace implementation {
 
-namespace {
-
-// Copy pasted from Hwc.cpp. Use this until gralloc mapper HAL is working
-class HandleImporter {
-public:
-    HandleImporter() : mInitialized(false) {}
-
-    bool initialize()
-    {
-        // allow only one client
-        if (mInitialized) {
-            return false;
-        }
-
-        if (!openGralloc()) {
-            return false;
-        }
-
-        mInitialized = true;
-        return true;
-    }
-
-    void cleanup()
-    {
-        if (!mInitialized) {
-            return;
-        }
-
-        closeGralloc();
-        mInitialized = false;
-    }
-
-    // In IComposer, any buffer_handle_t is owned by the caller and we need to
-    // make a clone for hwcomposer2.  We also need to translate empty handle
-    // to nullptr.  This function does that, in-place.
-    bool importBuffer(buffer_handle_t& handle)
-    {
-        if (!handle->numFds && !handle->numInts) {
-            handle = nullptr;
-            return true;
-        }
-
-        buffer_handle_t clone = cloneBuffer(handle);
-        if (!clone) {
-            return false;
-        }
-
-        handle = clone;
-        return true;
-    }
-
-    void freeBuffer(buffer_handle_t handle)
-    {
-        if (!handle) {
-            return;
-        }
-
-        releaseBuffer(handle);
-    }
-
-    bool importFence(const native_handle_t* handle, int& fd)
-    {
-        if (handle == nullptr || handle->numFds == 0) {
-            fd = -1;
-        } else if (handle->numFds == 1) {
-            fd = dup(handle->data[0]);
-            if (fd < 0) {
-                ALOGE("failed to dup fence fd %d", handle->data[0]);
-                return false;
-            }
-        } else {
-            ALOGE("invalid fence handle with %d file descriptors",
-                    handle->numFds);
-            return false;
-        }
-
-        return true;
-    }
-
-    void closeFence(int fd)
-    {
-        if (fd >= 0) {
-            close(fd);
-        }
-    }
-
-private:
-    bool mInitialized;
-
-    bool openGralloc()
-    {
-        const hw_module_t* module;
-        int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
-        if (err) {
-            ALOGE("failed to get gralloc module");
-            return false;
-        }
-
-        uint8_t major = (module->module_api_version >> 8) & 0xff;
-        if (major > 1) {
-            ALOGE("unknown gralloc module major version %d", major);
-            return false;
-        }
-
-        if (major == 1) {
-            err = gralloc1_open(module, &mDevice);
-            if (err) {
-                ALOGE("failed to open gralloc1 device");
-                return false;
-            }
-
-            mRetain = reinterpret_cast<GRALLOC1_PFN_RETAIN>(
-                    mDevice->getFunction(mDevice, GRALLOC1_FUNCTION_RETAIN));
-            mRelease = reinterpret_cast<GRALLOC1_PFN_RELEASE>(
-                    mDevice->getFunction(mDevice, GRALLOC1_FUNCTION_RELEASE));
-            if (!mRetain || !mRelease) {
-                ALOGE("invalid gralloc1 device");
-                gralloc1_close(mDevice);
-                return false;
-            }
-        } else {
-            mModule = reinterpret_cast<const gralloc_module_t*>(module);
-        }
-
-        return true;
-    }
-
-    void closeGralloc()
-    {
-        if (mDevice) {
-            gralloc1_close(mDevice);
-        }
-    }
-
-    buffer_handle_t cloneBuffer(buffer_handle_t handle)
-    {
-        native_handle_t* clone = native_handle_clone(handle);
-        if (!clone) {
-            ALOGE("failed to clone buffer %p", handle);
-            return nullptr;
-        }
-
-        bool err;
-        if (mDevice) {
-            err = (mRetain(mDevice, clone) != GRALLOC1_ERROR_NONE);
-        } else {
-            err = (mModule->registerBuffer(mModule, clone) != 0);
-        }
-
-        if (err) {
-            ALOGE("failed to retain/register buffer %p", clone);
-            native_handle_close(clone);
-            native_handle_delete(clone);
-            return nullptr;
-        }
-
-        return clone;
-    }
-
-    void releaseBuffer(buffer_handle_t handle)
-    {
-        if (mDevice) {
-            mRelease(mDevice, handle);
-        } else {
-            mModule->unregisterBuffer(mModule, handle);
-        }
-        native_handle_close(handle);
-        native_handle_delete(const_cast<native_handle_t*>(handle));
-    }
-
-    // gralloc1
-    gralloc1_device_t* mDevice;
-    GRALLOC1_PFN_RETAIN mRetain;
-    GRALLOC1_PFN_RELEASE mRelease;
-
-    // gralloc0
-    const gralloc_module_t* mModule;
-};
-
-HandleImporter sHandleImporter;
-
-} // Anonymous namespace
+HandleImporter& CameraDeviceSession::sHandleImporter = HandleImporter::getInstance();
 
 CameraDeviceSession::CameraDeviceSession(
     camera3_device_t* device, const sp<ICameraDeviceCallback>& callback) :
         camera3_callback_ops({&sProcessCaptureResult, &sNotify}),
         mDevice(device),
         mCallback(callback) {
-    // For now, we init sHandleImporter but do not cleanup (keep it alive until
-    // HAL process ends)
-    sHandleImporter.initialize();
-
     mInitFail = initialize();
 }
 
@@ -622,7 +437,6 @@
     bool hasInputBuf = (hal_result->input_buffer != nullptr);
     size_t numOutputBufs = hal_result->num_output_buffers;
     size_t numBufs = numOutputBufs + (hasInputBuf ? 1 : 0);
-    Status status = Status::OK;
     {
         Mutex::Autolock _l(d->mInflightLock);
         if (hasInputBuf) {
diff --git a/camera/device/3.2/default/CameraDeviceSession.h b/camera/device/3.2/default/CameraDeviceSession.h
index f8689d3..3786e4b 100644
--- a/camera/device/3.2/default/CameraDeviceSession.h
+++ b/camera/device/3.2/default/CameraDeviceSession.h
@@ -26,6 +26,7 @@
 #include <hidl/Status.h>
 #include <hidl/MQDescriptor.h>
 #include <include/convert.h>
+#include "HandleImporter.h"
 
 namespace android {
 namespace hardware {
@@ -39,6 +40,7 @@
 using ::android::hardware::camera::device::V3_2::StreamConfiguration;
 using ::android::hardware::camera::device::V3_2::ICameraDeviceSession;
 using ::android::hardware::camera::common::V1_0::Status;
+using ::android::hardware::camera::common::V1_0::helper::HandleImporter;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -109,6 +111,8 @@
     // Stream ID -> circulating buffers map
     std::map<int, CirculatingBuffers> mCirculatingBuffers;
 
+    static HandleImporter& sHandleImporter;
+
     bool mInitFail;
     bool initialize();
 
diff --git a/camera/device/3.2/default/CameraDevice.h b/camera/device/3.2/default/CameraDevice_3_2.h
similarity index 97%
rename from camera/device/3.2/default/CameraDevice.h
rename to camera/device/3.2/default/CameraDevice_3_2.h
index 317eea5..4e86067 100644
--- a/camera/device/3.2/default/CameraDevice.h
+++ b/camera/device/3.2/default/CameraDevice_3_2.h
@@ -55,7 +55,7 @@
     // Called by provider HAL. Provider HAL must ensure the uniqueness of
     // CameraDevice object per cameraId, or there could be multiple CameraDevice
     // trying to access the same physical camera.
-    // Also, provider will have to keep track of all CameraDevice object in
+    // Also, provider will have to keep track of all CameraDevice objects in
     // order to notify CameraDevice when the underlying camera is detached
     CameraDevice(sp<CameraModule> module,
                  const std::string& cameraId,
@@ -81,8 +81,7 @@
     /* End of Methods from ::android::hardware::camera::device::V3_2::ICameraDevice */
 
 private:
-    // Passed from provider HAL. Should not change.
-    sp<CameraModule> mModule;
+    const sp<CameraModule> mModule;
     const std::string mCameraId;
     // const after ctor
     int   mCameraIdInt;
diff --git a/camera/device/3.2/types.hal b/camera/device/3.2/types.hal
index c07a670..fe1edbf 100644
--- a/camera/device/3.2/types.hal
+++ b/camera/device/3.2/types.hal
@@ -161,8 +161,21 @@
      * CONSTRAINED_HIGH_SPEED_VIDEO in the android.request.availableCapabilities
      * static metadata.
      */
-    CONSTRAINED_HIGH_SPEED_MODE = 1
+    CONSTRAINED_HIGH_SPEED_MODE = 1,
 
+    /**
+     * A set of vendor-defined operating modes, for custom default camera
+     * application features that can't be implemented in the fully flexible fashion
+     * required for NORMAL_MODE.
+     */
+    VENDOR_MODE_0 = 0x8000,
+    VENDOR_MODE_1,
+    VENDOR_MODE_2,
+    VENDOR_MODE_3,
+    VENDOR_MODE_4,
+    VENDOR_MODE_5,
+    VENDOR_MODE_6,
+    VENDOR_MODE_7
 };
 
 /**
diff --git a/camera/provider/2.4/default/Android.bp b/camera/provider/2.4/default/Android.bp
index e0ae12f..42dec4d 100644
--- a/camera/provider/2.4/default/Android.bp
+++ b/camera/provider/2.4/default/Android.bp
@@ -1,16 +1,17 @@
 cc_library_shared {
     name: "android.hardware.camera.provider@2.4-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["CameraProvider.cpp"],
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libutils",
         "libcutils",
         "android.hardware.camera.device@1.0",
         "android.hardware.camera.device@3.2",
+        "camera.device@1.0-impl",
         "camera.device@3.2-impl",
         "android.hardware.camera.provider@2.4",
         "android.hardware.camera.common@1.0",
@@ -25,6 +26,7 @@
 
 cc_binary {
     name: "android.hardware.camera.provider@2.4-service",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["service.cpp"],
@@ -34,17 +36,10 @@
         "libhidlbase",
         "libhidltransport",
         "liblog",
-        "libhwbinder",
         "libutils",
-        "libhardware",
         "android.hardware.camera.device@1.0",
         "android.hardware.camera.device@3.2",
         "android.hardware.camera.provider@2.4",
         "android.hardware.camera.common@1.0",
-        "libcutils",
-        "libcamera_metadata"
     ],
-    static_libs: [
-        "android.hardware.camera.common@1.0-helper"
-    ]
 }
diff --git a/camera/provider/2.4/default/CameraProvider.cpp b/camera/provider/2.4/default/CameraProvider.cpp
index 5714f83..ad9f0b8 100644
--- a/camera/provider/2.4/default/CameraProvider.cpp
+++ b/camera/provider/2.4/default/CameraProvider.cpp
@@ -18,7 +18,8 @@
 #include <android/log.h>
 
 #include "CameraProvider.h"
-#include "CameraDevice.h"
+#include "CameraDevice_1_0.h"
+#include "CameraDevice_3_2.h"
 #include <string.h>
 #include <utils/Trace.h>
 
@@ -59,8 +60,6 @@
         return;
     }
 
-    ALOGI("%s resolved provider %p", __FUNCTION__, cp);
-
     Mutex::Autolock _l(cp->mCbLock);
     char cameraId[kMaxCameraIdLen];
     snprintf(cameraId, sizeof(cameraId), "%d", camera_id);
@@ -89,8 +88,6 @@
         return;
     }
 
-    ALOGI("%s resolved provider %p", __FUNCTION__, cp);
-
     Mutex::Autolock _l(cp->mCbLock);
     if (cp->mCallbacks != nullptr) {
         std::string cameraIdStr(camera_id);
@@ -323,9 +320,57 @@
 }
 
 Return<void> CameraProvider::getCameraDeviceInterface_V1_x(
-        const hidl_string& /*cameraDeviceName*/, getCameraDeviceInterface_V1_x_cb _hidl_cb)  {
-    // TODO implement after device 1.0 is implemented
-    _hidl_cb(Status::INTERNAL_ERROR, nullptr);
+        const hidl_string& cameraDeviceName, getCameraDeviceInterface_V1_x_cb _hidl_cb)  {
+    std::smatch sm;
+    bool match = matchDeviceName(cameraDeviceName, sm);
+    if (!match) {
+        _hidl_cb(Status::ILLEGAL_ARGUMENT, nullptr);
+        return Void();
+    }
+
+    std::string cameraId = sm[2];
+    std::string deviceVersion = sm[1];
+    std::string deviceName(cameraDeviceName.c_str());
+    ssize_t index = mCameraDeviceNames.indexOf(std::make_pair(cameraId, deviceName));
+    if (index == NAME_NOT_FOUND) { // Either an illegal name or a device version mismatch
+        Status status = Status::OK;
+        ssize_t idx = mCameraIds.indexOf(cameraId);
+        if (idx == NAME_NOT_FOUND) {
+            ALOGE("%s: cannot find camera %s!", __FUNCTION__, cameraId.c_str());
+            status = Status::ILLEGAL_ARGUMENT;
+        } else { // invalid version
+            ALOGE("%s: camera device %s does not support version %s!",
+                    __FUNCTION__, cameraId.c_str(), deviceVersion.c_str());
+            status = Status::OPERATION_NOT_SUPPORTED;
+        }
+        _hidl_cb(status, nullptr);
+        return Void();
+    }
+
+    if (mCameraStatusMap.count(cameraId) == 0 ||
+            mCameraStatusMap[cameraId] != CAMERA_DEVICE_STATUS_PRESENT) {
+        _hidl_cb(Status::ILLEGAL_ARGUMENT, nullptr);
+        return Void();
+    }
+
+    sp<android::hardware::camera::device::V1_0::implementation::CameraDevice> device =
+            new android::hardware::camera::device::V1_0::implementation::CameraDevice(
+                    mModule, cameraId, mCameraDeviceNames);
+
+    if (device == nullptr) {
+        ALOGE("%s: cannot allocate camera device for id %s", __FUNCTION__, cameraId.c_str());
+        _hidl_cb(Status::INTERNAL_ERROR, nullptr);
+        return Void();
+    }
+
+    if (device->isInitFailed()) {
+        ALOGE("%s: camera device %s init failed!", __FUNCTION__, cameraId.c_str());
+        device = nullptr;
+        _hidl_cb(Status::INTERNAL_ERROR, nullptr);
+        return Void();
+    }
+
+    _hidl_cb (Status::OK, device);
     return Void();
 }
 
diff --git a/camera/provider/2.4/vts/functional/Android.bp b/camera/provider/2.4/vts/functional/Android.bp
index 4947c17..f1215b8 100644
--- a/camera/provider/2.4/vts/functional/Android.bp
+++ b/camera/provider/2.4/vts/functional/Android.bp
@@ -15,9 +15,9 @@
 //
 
 cc_test {
-    name: "camera_hidl_hal_test",
-    gtest: true,
-    srcs: ["camera_hidl_hal_test.cpp"],
+    name: "VtsHalCameraProviderV2_4TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalCameraProviderV2_4TargetTest.cpp"],
     shared_libs: [
         "liblog",
         "libhidlbase",
@@ -26,9 +26,10 @@
         "libutils",
         "android.hardware.camera.provider@2.4",
         "android.hardware.camera.device@3.2",
-        "libcamera_metadata"
+        "libcamera_metadata",
+        "libui"
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
new file mode 100644
index 0000000..ce195f8
--- /dev/null
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -0,0 +1,1618 @@
+/*
+ * Copyright (C) 2016 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 "camera_hidl_hal_test"
+#include <android/hardware/camera/provider/2.4/ICameraProvider.h>
+#include <android/hardware/camera/device/3.2/ICameraDevice.h>
+#include <android/log.h>
+#include <ui/GraphicBuffer.h>
+#include <VtsHalHidlTargetTestBase.h>
+#include <regex>
+#include "system/camera_metadata.h"
+#include <hardware/gralloc.h>
+#include <hardware/gralloc1.h>
+#include <unordered_map>
+#include <mutex>
+#include <condition_variable>
+#include <chrono>
+#include <inttypes.h>
+
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::hidl_handle;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::sp;
+using ::android::GraphicBuffer;
+using ::android::hardware::graphics::common::V1_0::PixelFormat;
+using ::android::hardware::camera::common::V1_0::Status;
+using ::android::hardware::camera::common::V1_0::CameraDeviceStatus;
+using ::android::hardware::camera::common::V1_0::TorchMode;
+using ::android::hardware::camera::common::V1_0::TorchModeStatus;
+using ::android::hardware::camera::provider::V2_4::ICameraProvider;
+using ::android::hardware::camera::provider::V2_4::ICameraProviderCallback;
+using ::android::hardware::camera::device::V3_2::CaptureRequest;
+using ::android::hardware::camera::device::V3_2::CaptureResult;
+using ::android::hardware::camera::device::V3_2::ICameraDeviceCallback;
+using ::android::hardware::camera::device::V3_2::ICameraDeviceSession;
+using ::android::hardware::camera::device::V3_2::NotifyMsg;
+using ::android::hardware::camera::device::V3_2::RequestTemplate;
+using ::android::hardware::camera::device::V3_2::Stream;
+using ::android::hardware::camera::device::V3_2::StreamType;
+using ::android::hardware::camera::device::V3_2::StreamRotation;
+using ::android::hardware::camera::device::V3_2::StreamConfiguration;
+using ::android::hardware::camera::device::V3_2::StreamConfigurationMode;
+using ::android::hardware::camera::device::V3_2::CameraMetadata;
+using ::android::hardware::camera::device::V3_2::HalStreamConfiguration;
+using ::android::hardware::camera::device::V3_2::BufferStatus;
+using ::android::hardware::camera::device::V3_2::StreamBuffer;
+
+#define CAMERA_PASSTHROUGH_SERVICE_NAME "legacy/0"
+#define MAX_PREVIEW_WIDTH  1920
+#define MAX_PREVIEW_HEIGHT 1080
+#define MAX_VIDEO_WIDTH    4096
+#define MAX_VIDEO_HEIGHT   2160
+#define STREAM_BUFFER_TIMEOUT 3  // sec.
+#define DUMP_OUTPUT "/dev/null"
+
+struct AvailableStream {
+    int32_t width;
+    int32_t height;
+    int32_t format;
+};
+
+struct AvailableZSLInputOutput {
+    int32_t inputFormat;
+    int32_t outputFormat;
+};
+
+namespace {
+    // "device@<version>/legacy/<id>"
+    const char *kDeviceNameRE = "device@([0-9]+\\.[0-9]+)/legacy/(.+)";
+    const int CAMERA_DEVICE_API_VERSION_3_2 = 0x302;
+    const int CAMERA_DEVICE_API_VERSION_1_0 = 0x100;
+    const char *kHAL3_2 = "3.2";
+    const char *kHAL1_0 = "1.0";
+
+    bool matchDeviceName(const hidl_string& deviceName, std::smatch& sm) {
+        std::regex e(kDeviceNameRE);
+        std::string deviceNameStd(deviceName.c_str());
+        return std::regex_match(deviceNameStd, sm, e);
+    }
+
+    int getCameraDeviceVersion(const hidl_string& deviceName) {
+        std::smatch sm;
+        bool match = matchDeviceName(deviceName, sm);
+        if (!match) {
+            return -1;
+        }
+        if (sm[1].compare(kHAL3_2) == 0) {
+            // maybe switched to 3.4 or define the hidl version enumlater
+            return CAMERA_DEVICE_API_VERSION_3_2;
+        } else if (sm[1].compare(kHAL1_0) == 0) {
+            return CAMERA_DEVICE_API_VERSION_1_0;
+        }
+        return 0;
+    }
+}
+
+// Test environment for camera
+class CameraHidlEnvironment : public ::testing::Environment {
+public:
+    // get the test environment singleton
+    static CameraHidlEnvironment* Instance() {
+        static CameraHidlEnvironment* instance = new CameraHidlEnvironment;
+        return instance;
+    }
+
+    virtual void SetUp() override;
+    virtual void TearDown() override;
+
+    sp<ICameraProvider> mProvider;
+
+private:
+    CameraHidlEnvironment() {}
+
+    GTEST_DISALLOW_COPY_AND_ASSIGN_(CameraHidlEnvironment);
+};
+
+void CameraHidlEnvironment::SetUp() {
+    // TODO: test the binderized mode
+    mProvider = ::testing::VtsHalHidlTargetTestBase::getService<ICameraProvider>(CAMERA_PASSTHROUGH_SERVICE_NAME);
+    // TODO: handle the device doesn't have any camera case
+    ALOGI_IF(mProvider, "provider is not nullptr, %p", mProvider.get());
+    ASSERT_NE(mProvider, nullptr);
+}
+
+void CameraHidlEnvironment::TearDown() {
+    ALOGI("TearDown CameraHidlEnvironment");
+}
+
+// The main test class for camera HIDL HAL.
+class CameraHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+public:
+    virtual void SetUp() override {}
+    virtual void TearDown() override {}
+
+    hidl_vec<hidl_string> getCameraDeviceNames();
+
+    struct EmptyDeviceCb : public ICameraDeviceCallback {
+        virtual Return<void> processCaptureResult(const CaptureResult& /*result*/) override {
+            ALOGI("processCaptureResult callback");
+            ADD_FAILURE(); // Empty callback should not reach here
+            return Void();
+        }
+
+        virtual Return<void> notify(const NotifyMsg& /*msg*/) override {
+            ALOGI("notify callback");
+            ADD_FAILURE(); // Empty callback should not reach here
+            return Void();
+        }
+    };
+
+    struct DeviceCb : public ICameraDeviceCallback {
+        DeviceCb(CameraHidlTest *parent) : mParent(parent) {}
+        Return<void> processCaptureResult(const CaptureResult& result) override;
+        Return<void> notify(const NotifyMsg& msg) override;
+
+     private:
+        CameraHidlTest *mParent;               // Parent object
+    };
+
+    static Status getAvailableOutputStreams(camera_metadata_t *staticMeta,
+            std::vector<AvailableStream> &outputStreams,
+            AvailableStream *threshold = nullptr);
+    static Status isConstrainedModeAvailable(camera_metadata_t *staticMeta);
+    static Status pickConstrainedModeSize(camera_metadata_t *staticMeta,
+            AvailableStream &hfrStream);
+    static Status isZSLModeAvailable(camera_metadata_t *staticMeta);
+    static Status getZSLInputOutputMap(camera_metadata_t *staticMeta,
+            std::vector<AvailableZSLInputOutput> &inputOutputMap);
+    static Status findLargestSize(
+            const std::vector<AvailableStream> &streamSizes,
+            int32_t format, AvailableStream &result);
+
+protected:
+    std::mutex mLock;                          // Synchronize access to member variables
+    std::condition_variable mResultCondition;  // Condition variable for incoming results
+    uint32_t mResultFrameNumber;               // Expected result frame number
+    std::vector<StreamBuffer> mResultBuffers;  // Holds stream buffers from capture result
+};
+
+Return<void> CameraHidlTest::DeviceCb::processCaptureResult(
+        const CaptureResult& result) {
+    if (nullptr == mParent) {
+        return Void();
+    }
+
+    std::unique_lock<std::mutex> l(mParent->mLock);
+
+    if(mParent->mResultFrameNumber != result.frameNumber) {
+        ALOGE("%s: Unexpected frame number! Expected: %u received: %u",
+              __func__, mParent->mResultFrameNumber, result.frameNumber);
+        ADD_FAILURE();
+    }
+
+    size_t resultLength = result.outputBuffers.size();
+    for (size_t i = 0; i < resultLength; i++) {
+        mParent->mResultBuffers.push_back(result.outputBuffers[i]);
+    }
+
+    // TODO(epeev): Handle partial results in case client supports them and
+    //              verify the result against request settings.
+
+    l.unlock();
+    mParent->mResultCondition.notify_one();
+
+    return Void();
+}
+
+Return<void> CameraHidlTest::DeviceCb::notify(
+        const NotifyMsg& /*msg*/) {
+    // TODO(epeev): Pending implementation.
+    ALOGI("notify callback");
+    return Void();
+}
+
+hidl_vec<hidl_string> CameraHidlTest::getCameraDeviceNames() {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames;
+    env->mProvider->getCameraIdList(
+        [&](auto status, const auto& idList) {
+            ALOGI("getCameraIdList returns status:%d", (int)status);
+            for (size_t i = 0; i < idList.size(); i++) {
+                ALOGI("Camera Id[%zu] is %s", i, idList[i].c_str());
+            }
+            ASSERT_EQ(Status::OK, status);
+            cameraDeviceNames = idList;
+        });
+    return cameraDeviceNames;
+}
+
+// Test if ICameraProvider::isTorchModeSupported returns Status::OK
+TEST_F(CameraHidlTest, isTorchModeSupported) {
+    CameraHidlEnvironment::Instance()->mProvider->isSetTorchModeSupported(
+        [&](auto status, bool support) {
+            ALOGI("isSetTorchModeSupported returns status:%d supported:%d",
+                    (int)status, support);
+            ASSERT_EQ(Status::OK, status);
+        });
+}
+
+// TODO: consider removing this test if getCameraDeviceNames() has the same coverage
+TEST_F(CameraHidlTest, getCameraIdList) {
+    CameraHidlEnvironment::Instance()->mProvider->getCameraIdList(
+        [&](auto status, const auto& idList) {
+            ALOGI("getCameraIdList returns status:%d", (int)status);
+            for (size_t i = 0; i < idList.size(); i++) {
+                ALOGI("Camera Id[%zu] is %s", i, idList[i].c_str());
+            }
+            ASSERT_EQ(Status::OK, status);
+            // This is true for internal camera provider.
+            // Not necessary hold for external cameras providers
+            ASSERT_GT(idList.size(), 0u);
+        });
+}
+
+// Test if ICameraProvider::getVendorTags returns Status::OK
+TEST_F(CameraHidlTest, getVendorTags) {
+    CameraHidlEnvironment::Instance()->mProvider->getVendorTags(
+        [&](auto status, const auto& vendorTagSecs) {
+            ALOGI("getVendorTags returns status:%d numSections %zu",
+                    (int)status, vendorTagSecs.size());
+            for (size_t i = 0; i < vendorTagSecs.size(); i++) {
+                ALOGI("Vendor tag section %zu name %s",
+                        i, vendorTagSecs[i].sectionName.c_str());
+                for (size_t j = 0; j < vendorTagSecs[i].tags.size(); j++) {
+                    const auto& tag = vendorTagSecs[i].tags[j];
+                    ALOGI("Vendor tag id %u name %s type %d",
+                            tag.tagId,
+                            tag.tagName.c_str(),
+                            (int) tag.tagType);
+                }
+            }
+            ASSERT_EQ(Status::OK, status);
+        });
+}
+
+// Test if ICameraProvider::setCallback returns Status::OK
+TEST_F(CameraHidlTest, setCallback) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    struct ProviderCb : public ICameraProviderCallback {
+        virtual Return<void> cameraDeviceStatusChange(
+                const hidl_string& cameraDeviceName,
+                CameraDeviceStatus newStatus) override {
+            ALOGI("camera device status callback name %s, status %d",
+                    cameraDeviceName.c_str(), (int) newStatus);
+            return Void();
+        }
+
+        virtual Return<void> torchModeStatusChange(
+                const hidl_string& cameraDeviceName,
+                TorchModeStatus newStatus) override {
+            ALOGI("Torch mode status callback name %s, status %d",
+                    cameraDeviceName.c_str(), (int) newStatus);
+            return Void();
+        }
+    };
+    sp<ProviderCb> cb = new ProviderCb;
+    auto status = env->mProvider->setCallback(cb);
+    ASSERT_EQ(Status::OK, status);
+    // TODO: right now no callbacks are fired because there is no external camera
+    //       or torch mode change. Need to test torch API in CameraDevice test later.
+}
+
+// Test if ICameraProvider::getCameraDeviceInterface_V3_x returns Status::OK and non-null device
+TEST_F(CameraHidlTest, getCameraDeviceInterface_V3_x) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device3_2) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device3_2, nullptr);
+                });
+        }
+    }
+}
+
+// Verify that the device resource cost can be retrieved and the values are
+// sane.
+TEST_F(CameraHidlTest, getResourceCost) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("getResourceCost: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            device3_2->getResourceCost(
+                [&](auto status, const auto& resourceCost) {
+                    ALOGI("getResourceCost returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ALOGI("    Resource cost is %d", resourceCost.resourceCost);
+                    ASSERT_LE(resourceCost.resourceCost, 100u);
+                    for (const auto& name : resourceCost.conflictingDevices) {
+                        ALOGI("    Conflicting device: %s", name.c_str());
+                    }
+                });
+        }
+    }
+}
+
+// Verify that the static camera characteristics can be retrieved
+// successfully.
+TEST_F(CameraHidlTest, getCameraCharacteristics) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("getCameraCharacteristics: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            device3_2->getCameraCharacteristics(
+                [&](auto status, const auto& chars) {
+                    ALOGI("getCameraCharacteristics returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    const camera_metadata_t* metadata = (camera_metadata_t*) chars.data();
+                    size_t expectedSize = chars.size();
+                    ASSERT_EQ(0, validate_camera_metadata_structure(metadata, &expectedSize));
+                    size_t entryCount = get_camera_metadata_entry_count(metadata);
+                    // TODO: we can do better than 0 here. Need to check how many required
+                    // characteristics keys we've defined.
+                    ASSERT_GT(entryCount, 0u);
+                    ALOGI("getCameraCharacteristics metadata entry count is %zu", entryCount);
+                });
+        }
+    }
+}
+
+//In case it is supported verify that torch can be enabled.
+TEST_F(CameraHidlTest, setTorchMode) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    bool torchControlSupported = false;
+
+    CameraHidlEnvironment::Instance()->mProvider->isSetTorchModeSupported(
+        [&](auto status, bool support) {
+            ALOGI("isSetTorchModeSupported returns status:%d supported:%d",
+                    (int)status, support);
+            ASSERT_EQ(Status::OK, status);
+            torchControlSupported = support;
+        });
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("setTorchMode: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            Status status = device3_2->setTorchMode(TorchMode::ON);
+            ALOGI("setTorchMode return status %d", (int)status);
+            if (!torchControlSupported) {
+                ASSERT_EQ(Status::METHOD_NOT_SUPPORTED, status);
+            } else {
+                ASSERT_TRUE(status == Status::OK || status == Status::OPERATION_NOT_SUPPORTED);
+                if (status == Status::OK) {
+                    status = device3_2->setTorchMode(TorchMode::OFF);
+                    ASSERT_EQ(Status::OK, status);
+                }
+            }
+        }
+    }
+}
+
+// Check dump functionality.
+TEST_F(CameraHidlTest, dumpState) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("dumpState: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            native_handle_t* raw_handle = native_handle_create(1, 0);
+            raw_handle->data[0] = open(DUMP_OUTPUT, O_RDWR);
+            ASSERT_GE(raw_handle->data[0], 0);
+            hidl_handle handle = raw_handle;
+            device3_2->dumpState(handle);
+            close(raw_handle->data[0]);
+            native_handle_delete(raw_handle);
+        }
+    }
+}
+
+// Open, dumpStates, then close
+TEST_F(CameraHidlTest, openClose) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("openClose: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            native_handle_t* raw_handle = native_handle_create(1, 0);
+            raw_handle->data[0] = open(DUMP_OUTPUT, O_RDWR);
+            ASSERT_GE(raw_handle->data[0], 0);
+            hidl_handle handle = raw_handle;
+            device3_2->dumpState(handle);
+            close(raw_handle->data[0]);
+            native_handle_delete(raw_handle);
+
+            session->close();
+            // TODO: test all session API calls return INTERNAL_ERROR after close
+            // TODO: keep a wp copy here and verify session cannot be promoted out of this scope
+        }
+    }
+}
+
+// Check whether all common default request settings can be sucessfully
+// constructed.
+TEST_F(CameraHidlTest, constructDefaultRequestSettings) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("constructDefaultRequestSettings: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            for (uint32_t t = (uint32_t) RequestTemplate::PREVIEW;
+                    t <= (uint32_t) RequestTemplate::MANUAL; t++) {
+                RequestTemplate reqTemplate = (RequestTemplate) t;
+                session->constructDefaultRequestSettings(
+                    reqTemplate,
+                    [&](auto status, const auto& req) {
+                        ALOGI("constructDefaultRequestSettings returns status:%d", (int)status);
+                        if (reqTemplate == RequestTemplate::ZERO_SHUTTER_LAG ||
+                                reqTemplate == RequestTemplate::MANUAL) {
+                            // optional templates
+                            ASSERT_TRUE(status == Status::OK || status == Status::ILLEGAL_ARGUMENT);
+                        } else {
+                            ASSERT_EQ(Status::OK, status);
+                        }
+
+                        if (status == Status::OK) {
+                            const camera_metadata_t* metadata =
+                                (camera_metadata_t*) req.data();
+                            size_t expectedSize = req.size();
+                            ASSERT_EQ(0, validate_camera_metadata_structure(
+                                    metadata, &expectedSize));
+                            size_t entryCount = get_camera_metadata_entry_count(metadata);
+                            // TODO: we can do better than 0 here. Need to check how many required
+                            // request keys we've defined for each template
+                            ASSERT_GT(entryCount, 0u);
+                            ALOGI("template %u metadata entry count is %zu", t, entryCount);
+                        } else {
+                            ASSERT_EQ(0u, req.size());
+                        }
+                    });
+            }
+            session->close();
+        }
+    }
+}
+
+// Verify that all supported stream formats and sizes can be configured
+// successfully.
+TEST_F(CameraHidlTest, configureStreamsAvailableOutputs) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> outputStreams;
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+            outputStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputStreams));
+            ASSERT_NE(0u, outputStreams.size());
+
+            int32_t streamId = 0;
+            for (auto &it : outputStreams) {
+                Stream stream = {streamId, StreamType::OUTPUT,
+                        static_cast<uint32_t> (it.width),
+                        static_cast<uint32_t> (it.height),
+                        static_cast<PixelFormat> (it.format), 0, 0,
+                        StreamRotation::ROTATION_0};
+                ::android::hardware::hidl_vec<Stream> streams = {stream};
+                StreamConfiguration config = {streams,
+                        StreamConfigurationMode::NORMAL_MODE};
+                session->configureStreams(config, [streamId] (Status s,
+                        HalStreamConfiguration halConfig) {
+                    ASSERT_EQ(Status::OK, s);
+                    ASSERT_EQ(1u, halConfig.streams.size());
+                    ASSERT_EQ(halConfig.streams[0].id, streamId);
+                });
+                streamId++;
+            }
+
+            session->close();
+        }
+    }
+}
+
+// Check for correct handling of invalid/incorrect configuration parameters.
+TEST_F(CameraHidlTest, configureStreamsInvalidOutputs) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> outputStreams;
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+            outputStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputStreams));
+            ASSERT_NE(0u, outputStreams.size());
+
+            int32_t streamId = 0;
+            Stream stream = {streamId++, StreamType::OUTPUT,
+                    static_cast<uint32_t> (0),
+                    static_cast<uint32_t> (0),
+                    static_cast<PixelFormat> (outputStreams[0].format),
+                    0, 0, StreamRotation::ROTATION_0};
+            ::android::hardware::hidl_vec<Stream> streams = {stream};
+            StreamConfiguration config = {streams,
+                    StreamConfigurationMode::NORMAL_MODE};
+            session->configureStreams(config, [] (Status s,
+                    HalStreamConfiguration) {
+                ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
+            });
+
+            stream = {streamId++, StreamType::OUTPUT,
+                    static_cast<uint32_t> (UINT32_MAX),
+                    static_cast<uint32_t> (UINT32_MAX),
+                    static_cast<PixelFormat> (outputStreams[0].format),
+                    0, 0, StreamRotation::ROTATION_0};
+            streams[0] = stream;
+            config = {streams,
+                    StreamConfigurationMode::NORMAL_MODE};
+            session->configureStreams(config, [] (Status s,
+                    HalStreamConfiguration) {
+                ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
+            });
+
+            for (auto &it : outputStreams) {
+                stream = {streamId++, StreamType::OUTPUT,
+                        static_cast<uint32_t> (it.width),
+                        static_cast<uint32_t> (it.height),
+                        static_cast<PixelFormat> (UINT32_MAX),
+                        0, 0, StreamRotation::ROTATION_0};
+                streams[0] = stream;
+                config = {streams,
+                        StreamConfigurationMode::NORMAL_MODE};
+                session->configureStreams(config, [] (Status s,
+                        HalStreamConfiguration) {
+                    ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
+                });
+
+                stream = {streamId++, StreamType::OUTPUT,
+                        static_cast<uint32_t> (it.width),
+                        static_cast<uint32_t> (it.height),
+                        static_cast<PixelFormat> (it.format),
+                        0, 0, static_cast<StreamRotation> (UINT32_MAX)};
+                streams[0] = stream;
+                config = {streams,
+                        StreamConfigurationMode::NORMAL_MODE};
+                session->configureStreams(config, [] (Status s,
+                        HalStreamConfiguration) {
+                    ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
+                });
+            }
+
+            session->close();
+        }
+    }
+}
+
+// Check whether all supported ZSL output stream combinations can be
+// configured successfully.
+TEST_F(CameraHidlTest, configureStreamsZSLInputOutputs) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> inputStreams;
+    std::vector<AvailableZSLInputOutput> inputOutputMap;
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+            Status ret = isZSLModeAvailable(staticMeta);
+            if (Status::METHOD_NOT_SUPPORTED == ret) {
+                session->close();
+                continue;
+            }
+            ASSERT_EQ(Status::OK, ret);
+
+            inputStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    inputStreams));
+            ASSERT_NE(0u, inputStreams.size());
+
+            inputOutputMap.clear();
+            ASSERT_EQ(Status::OK, getZSLInputOutputMap(staticMeta,
+                    inputOutputMap));
+            ASSERT_NE(0u, inputOutputMap.size());
+
+            int32_t streamId = 0;
+            for (auto &inputIter : inputOutputMap) {
+                AvailableStream input;
+                ASSERT_EQ(Status::OK,
+                        findLargestSize(inputStreams, inputIter.inputFormat, input));
+                ASSERT_NE(0u, inputStreams.size());
+
+                AvailableStream outputThreshold = {INT32_MAX, INT32_MAX,
+                        inputIter.outputFormat};
+                std::vector<AvailableStream> outputStreams;
+                ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                        outputStreams, &outputThreshold));
+                for (auto &outputIter : outputStreams) {
+                    Stream zslStream = {streamId++, StreamType::OUTPUT,
+                            static_cast<uint32_t> (input.width),
+                            static_cast<uint32_t> (input.height),
+                            static_cast<PixelFormat> (input.format),
+                            GRALLOC_USAGE_HW_CAMERA_ZSL, 0,
+                            StreamRotation::ROTATION_0};
+                    Stream inputStream = {streamId++, StreamType::INPUT,
+                            static_cast<uint32_t> (input.width),
+                            static_cast<uint32_t> (input.height),
+                            static_cast<PixelFormat> (input.format), 0, 0,
+                            StreamRotation::ROTATION_0};
+                    Stream outputStream = {streamId++, StreamType::OUTPUT,
+                            static_cast<uint32_t> (outputIter.width),
+                            static_cast<uint32_t> (outputIter.height),
+                            static_cast<PixelFormat> (outputIter.format), 0, 0,
+                            StreamRotation::ROTATION_0};
+
+                    ::android::hardware::hidl_vec<Stream> streams = {
+                            inputStream, zslStream, outputStream};
+                    StreamConfiguration config = {streams,
+                            StreamConfigurationMode::NORMAL_MODE};
+                    session->configureStreams(config, [streamId] (Status s,
+                            HalStreamConfiguration halConfig) {
+                        ASSERT_EQ(Status::OK, s);
+                        ASSERT_EQ(3u, halConfig.streams.size());
+                    });
+                }
+            }
+
+            session->close();
+        }
+    }
+}
+
+// Verify that all supported preview + still capture stream combinations
+// can be configured successfully.
+TEST_F(CameraHidlTest, configureStreamsPreviewStillOutputs) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> outputBlobStreams;
+    std::vector<AvailableStream> outputPreviewStreams;
+    AvailableStream previewThreshold = {MAX_PREVIEW_WIDTH, MAX_PREVIEW_HEIGHT,
+            static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
+    AvailableStream blobThreshold = {INT32_MAX, INT32_MAX,
+            static_cast<int32_t>(PixelFormat::BLOB)};
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+            outputBlobStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputBlobStreams, &blobThreshold));
+            ASSERT_NE(0u, outputBlobStreams.size());
+
+            outputPreviewStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputPreviewStreams, &previewThreshold));
+            ASSERT_NE(0u, outputPreviewStreams.size());
+
+            int32_t streamId = 0;
+            for (auto &blobIter : outputBlobStreams) {
+                for (auto &previewIter : outputPreviewStreams) {
+                    Stream previewStream = {streamId++, StreamType::OUTPUT,
+                            static_cast<uint32_t> (previewIter.width),
+                            static_cast<uint32_t> (previewIter.height),
+                            static_cast<PixelFormat> (previewIter.format), 0, 0,
+                            StreamRotation::ROTATION_0};
+                    Stream blobStream = {streamId++, StreamType::OUTPUT,
+                            static_cast<uint32_t> (blobIter.width),
+                            static_cast<uint32_t> (blobIter.height),
+                            static_cast<PixelFormat> (blobIter.format), 0, 0,
+                            StreamRotation::ROTATION_0};
+                    ::android::hardware::hidl_vec<Stream> streams = {
+                            previewStream, blobStream};
+                    StreamConfiguration config = {streams,
+                            StreamConfigurationMode::NORMAL_MODE};
+                    session->configureStreams(config, [streamId] (Status s,
+                            HalStreamConfiguration halConfig) {
+                        ASSERT_EQ(Status::OK, s);
+                        ASSERT_EQ(2u, halConfig.streams.size());
+                    });
+                }
+            }
+
+            session->close();
+        }
+    }
+}
+
+// In case constrained mode is supported, test whether it can be
+// configured. Additionally check for common invalid inputs when
+// using this mode.
+TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+            Status rc = isConstrainedModeAvailable(staticMeta);
+            if (Status::METHOD_NOT_SUPPORTED == rc) {
+                session->close();
+                continue;
+            }
+            ASSERT_EQ(Status::OK, rc);
+
+            AvailableStream hfrStream;
+            rc = pickConstrainedModeSize(staticMeta, hfrStream);
+            ASSERT_EQ(Status::OK, rc);
+
+            int32_t streamId = 0;
+            Stream stream = {streamId, StreamType::OUTPUT,
+                    static_cast<uint32_t> (hfrStream.width),
+                    static_cast<uint32_t> (hfrStream.height),
+                    static_cast<PixelFormat> (hfrStream.format), 0, 0,
+                    StreamRotation::ROTATION_0};
+            ::android::hardware::hidl_vec<Stream> streams = {stream};
+            StreamConfiguration config = {streams,
+                    StreamConfigurationMode::CONSTRAINED_HIGH_SPEED_MODE};
+            session->configureStreams(config, [streamId] (Status s,
+                    HalStreamConfiguration halConfig) {
+                ASSERT_EQ(Status::OK, s);
+                ASSERT_EQ(1u, halConfig.streams.size());
+                ASSERT_EQ(halConfig.streams[0].id, streamId);
+            });
+
+            stream = {streamId++, StreamType::OUTPUT,
+                    static_cast<uint32_t> (0),
+                    static_cast<uint32_t> (0),
+                    static_cast<PixelFormat> (hfrStream.format), 0, 0,
+                    StreamRotation::ROTATION_0};
+            streams[0] = stream;
+            config = {streams,
+                    StreamConfigurationMode::CONSTRAINED_HIGH_SPEED_MODE};
+            session->configureStreams(config, [streamId] (Status s,
+                    HalStreamConfiguration) {
+                ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
+            });
+
+            stream = {streamId++, StreamType::OUTPUT,
+                    static_cast<uint32_t> (UINT32_MAX),
+                    static_cast<uint32_t> (UINT32_MAX),
+                    static_cast<PixelFormat> (hfrStream.format), 0, 0,
+                    StreamRotation::ROTATION_0};
+            streams[0] = stream;
+            config = {streams,
+                    StreamConfigurationMode::CONSTRAINED_HIGH_SPEED_MODE};
+            session->configureStreams(config, [streamId] (Status s,
+                    HalStreamConfiguration) {
+                ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
+            });
+
+            stream = {streamId++, StreamType::OUTPUT,
+                    static_cast<uint32_t> (hfrStream.width),
+                    static_cast<uint32_t> (hfrStream.height),
+                    static_cast<PixelFormat> (UINT32_MAX), 0, 0,
+                    StreamRotation::ROTATION_0};
+            streams[0] = stream;
+            config = {streams,
+                    StreamConfigurationMode::CONSTRAINED_HIGH_SPEED_MODE};
+            session->configureStreams(config, [streamId] (Status s,
+                    HalStreamConfiguration) {
+                ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
+            });
+
+            session->close();
+        }
+    }
+}
+
+// Verify that all supported video + snapshot stream combinations can
+// be configured successfully.
+TEST_F(CameraHidlTest, configureStreamsVideoStillOutputs) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> outputBlobStreams;
+    std::vector<AvailableStream> outputVideoStreams;
+    AvailableStream videoThreshold = {MAX_VIDEO_WIDTH, MAX_VIDEO_HEIGHT,
+            static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
+    AvailableStream blobThreshold = {MAX_VIDEO_WIDTH, MAX_VIDEO_HEIGHT,
+            static_cast<int32_t>(PixelFormat::BLOB)};
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+            outputBlobStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputBlobStreams, &blobThreshold));
+            ASSERT_NE(0u, outputBlobStreams.size());
+
+            outputVideoStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputVideoStreams, &videoThreshold));
+            ASSERT_NE(0u, outputVideoStreams.size());
+
+            int32_t streamId = 0;
+            for (auto &blobIter : outputBlobStreams) {
+                for (auto &videoIter : outputVideoStreams) {
+                    Stream videoStream = {streamId++, StreamType::OUTPUT,
+                            static_cast<uint32_t> (videoIter.width),
+                            static_cast<uint32_t> (videoIter.height),
+                            static_cast<PixelFormat> (videoIter.format), 0, 0,
+                            StreamRotation::ROTATION_0};
+                    Stream blobStream = {streamId++, StreamType::OUTPUT,
+                            static_cast<uint32_t> (blobIter.width),
+                            static_cast<uint32_t> (blobIter.height),
+                            static_cast<PixelFormat> (blobIter.format),
+                            GRALLOC_USAGE_HW_VIDEO_ENCODER, 0,
+                            StreamRotation::ROTATION_0};
+                    ::android::hardware::hidl_vec<Stream> streams = {
+                            videoStream, blobStream};
+                    StreamConfiguration config = {streams,
+                            StreamConfigurationMode::NORMAL_MODE};
+                    session->configureStreams(config, [streamId] (Status s,
+                            HalStreamConfiguration halConfig) {
+                        ASSERT_EQ(Status::OK, s);
+                        ASSERT_EQ(2u, halConfig.streams.size());
+                    });
+                }
+            }
+
+            session->close();
+        }
+    }
+}
+
+// Generate and verify a camera capture request
+TEST_F(CameraHidlTest, processCaptureRequestPreview) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> outputPreviewStreams;
+    AvailableStream previewThreshold = {MAX_PREVIEW_WIDTH, MAX_PREVIEW_HEIGHT,
+            static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
+    int32_t streamId = 0;
+    uint64_t bufferId = 1;
+    uint32_t frameNumber = 1;
+    ::android::hardware::hidl_vec<uint8_t> settings;
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<DeviceCb> cb = new DeviceCb(this);
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+
+            outputPreviewStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputPreviewStreams, &previewThreshold));
+            ASSERT_NE(0u, outputPreviewStreams.size());
+
+            HalStreamConfiguration halStreamConfig;
+            Stream previewStream = {streamId, StreamType::OUTPUT,
+                    static_cast<uint32_t> (outputPreviewStreams[0].width),
+                    static_cast<uint32_t> (outputPreviewStreams[0].height),
+                    static_cast<PixelFormat> (outputPreviewStreams[0].format),
+                    0, 0, StreamRotation::ROTATION_0};
+            ::android::hardware::hidl_vec<Stream> streams = {previewStream};
+            StreamConfiguration config = {streams,
+                    StreamConfigurationMode::NORMAL_MODE};
+            session->configureStreams(config, [&] (Status s,
+                    HalStreamConfiguration halConfig) {
+                ASSERT_EQ(Status::OK, s);
+                ASSERT_EQ(1u, halConfig.streams.size());
+                halStreamConfig = halConfig;
+            });
+
+            RequestTemplate reqTemplate = RequestTemplate::PREVIEW;
+            session->constructDefaultRequestSettings(reqTemplate,
+                [&](auto status, const auto& req) {
+                    ASSERT_EQ(Status::OK, status);
+                    settings = req; });
+
+            sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width,
+                    previewStream.height,
+                    static_cast<int32_t> (halStreamConfig.streams[0].overrideFormat),
+                    1, halStreamConfig.streams[0].producerUsage,
+                    halStreamConfig.streams[0].consumerUsage);
+            ASSERT_NE(nullptr, gb.get());
+            StreamBuffer outputBuffer = {halStreamConfig.streams[0].id,
+                    bufferId, hidl_handle(gb->getNativeBuffer()->handle),
+                    BufferStatus::OK, nullptr, nullptr};
+            ::android::hardware::hidl_vec<StreamBuffer> outputBuffers = {
+                    outputBuffer};
+            CaptureRequest request = {frameNumber, settings,
+                    {-1, 0, nullptr, BufferStatus::ERROR, nullptr, nullptr},
+                    outputBuffers};
+
+            std::unique_lock<std::mutex> l(mLock);
+            mResultBuffers.clear();
+            mResultFrameNumber = frameNumber;
+            l.unlock();
+
+            ASSERT_EQ(Status::OK, session->processCaptureRequest(request));
+
+            l.lock();
+            while (0 == mResultBuffers.size()) {
+                auto timeout = std::chrono::system_clock::now() +
+                        std::chrono::seconds(STREAM_BUFFER_TIMEOUT);
+                ASSERT_NE(std::cv_status::timeout,
+                        mResultCondition.wait_until(l, timeout));
+            }
+
+            ASSERT_EQ(BufferStatus::OK, mResultBuffers[0].status);
+            ASSERT_EQ(previewStream.id, mResultBuffers[0].streamId);
+
+            request.frameNumber++;
+            //Empty settings should be supported after the first call
+            //for repeating requests.
+            request.settings.setToExternal(nullptr, 0, true);
+            mResultBuffers.clear();
+            mResultFrameNumber++;
+            l.unlock();
+
+            ASSERT_EQ(Status::OK, session->processCaptureRequest(request));
+
+            l.lock();
+            while (0 == mResultBuffers.size()) {
+                auto timeout = std::chrono::system_clock::now() +
+                        std::chrono::seconds(STREAM_BUFFER_TIMEOUT);
+                ASSERT_NE(std::cv_status::timeout,
+                        mResultCondition.wait_until(l, timeout));
+            }
+            ASSERT_EQ(BufferStatus::OK, mResultBuffers[0].status);
+            ASSERT_EQ(previewStream.id, mResultBuffers[0].streamId);
+
+            session->close();
+        }
+    }
+}
+
+// Test whether an incorrect capture request with missing settings will
+// be reported correctly.
+TEST_F(CameraHidlTest, processCaptureRequestInvalidSinglePreview) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> outputPreviewStreams;
+    AvailableStream previewThreshold = {MAX_PREVIEW_WIDTH, MAX_PREVIEW_HEIGHT,
+            static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
+    int32_t streamId = 0;
+    uint64_t bufferId = 1;
+    uint32_t frameNumber = 1;
+    ::android::hardware::hidl_vec<uint8_t> settings;
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<DeviceCb> cb = new DeviceCb(this);
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+
+            outputPreviewStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputPreviewStreams, &previewThreshold));
+            ASSERT_NE(0u, outputPreviewStreams.size());
+
+            HalStreamConfiguration halStreamConfig;
+            Stream previewStream = {streamId, StreamType::OUTPUT,
+                    static_cast<uint32_t> (outputPreviewStreams[0].width),
+                    static_cast<uint32_t> (outputPreviewStreams[0].height),
+                    static_cast<PixelFormat> (outputPreviewStreams[0].format),
+                    0, 0, StreamRotation::ROTATION_0};
+            ::android::hardware::hidl_vec<Stream> streams = {previewStream};
+            StreamConfiguration config = {streams,
+                    StreamConfigurationMode::NORMAL_MODE};
+            session->configureStreams(config, [&] (Status s,
+                    HalStreamConfiguration halConfig) {
+                ASSERT_EQ(Status::OK, s);
+                ASSERT_EQ(1u, halConfig.streams.size());
+                halStreamConfig = halConfig;
+            });
+
+            sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width,
+                    previewStream.height,
+                    static_cast<int32_t> (halStreamConfig.streams[0].overrideFormat),
+                    1, halStreamConfig.streams[0].producerUsage,
+                    halStreamConfig.streams[0].consumerUsage);
+
+            StreamBuffer outputBuffer = {halStreamConfig.streams[0].id,
+                    bufferId, hidl_handle(gb->getNativeBuffer()->handle),
+                    BufferStatus::OK, nullptr, nullptr};
+            ::android::hardware::hidl_vec<StreamBuffer> outputBuffers = {
+                    outputBuffer};
+            CaptureRequest request = {frameNumber, settings,
+                    {-1, 0, nullptr, BufferStatus::ERROR, nullptr, nullptr},
+                    outputBuffers};
+
+            //Settings were not correctly initialized, we should fail here
+            ASSERT_EQ(Status::INTERNAL_ERROR,
+                    session->processCaptureRequest(request));
+
+            session->close();
+        }
+    }
+}
+
+// Check whether an invalid capture request with missing output buffers
+// will be reported correctly.
+TEST_F(CameraHidlTest, processCaptureRequestInvalidSingleSnapshot) {
+    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
+    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
+    std::vector<AvailableStream> outputBlobStreams;
+    AvailableStream blobThreshold = {INT32_MAX, INT32_MAX,
+            static_cast<int32_t>(PixelFormat::BLOB)};
+    int32_t streamId = 0;
+    uint64_t bufferId = 1;
+    uint32_t frameNumber = 1;
+    ::android::hardware::hidl_vec<uint8_t> settings;
+
+    for (const auto& name : cameraDeviceNames) {
+        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
+            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
+            ALOGI("configureStreams: Testing camera device %s", name.c_str());
+            env->mProvider->getCameraDeviceInterface_V3_x(
+                name,
+                [&](auto status, const auto& device) {
+                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(device, nullptr);
+                    device3_2 = device;
+                });
+
+            sp<DeviceCb> cb = new DeviceCb(this);
+            sp<ICameraDeviceSession> session;
+            device3_2->open(
+                cb,
+                [&](auto status, const auto& newSession) {
+                    ALOGI("device::open returns status:%d", (int)status);
+                    ASSERT_EQ(Status::OK, status);
+                    ASSERT_NE(newSession, nullptr);
+                    session = newSession;
+                });
+
+            camera_metadata_t *staticMeta;
+            device3_2->getCameraCharacteristics([&] (Status s,
+                    CameraMetadata metadata) {
+                ASSERT_EQ(Status::OK, s);
+                staticMeta =
+                        reinterpret_cast<camera_metadata_t*>(metadata.data());
+            });
+
+            outputBlobStreams.clear();
+            ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta,
+                    outputBlobStreams, &blobThreshold));
+            ASSERT_NE(0u, outputBlobStreams.size());
+
+            HalStreamConfiguration halStreamConfig;
+            Stream previewStream = {streamId, StreamType::OUTPUT,
+                    static_cast<uint32_t> (outputBlobStreams[0].width),
+                    static_cast<uint32_t> (outputBlobStreams[0].height),
+                    static_cast<PixelFormat> (outputBlobStreams[0].format),
+                    0, 0, StreamRotation::ROTATION_0};
+            ::android::hardware::hidl_vec<Stream> streams = {previewStream};
+            StreamConfiguration config = {streams,
+                    StreamConfigurationMode::NORMAL_MODE};
+            session->configureStreams(config, [&] (Status s,
+                    HalStreamConfiguration halConfig) {
+                ASSERT_EQ(Status::OK, s);
+                ASSERT_EQ(1u, halConfig.streams.size());
+                halStreamConfig = halConfig;
+            });
+
+            RequestTemplate reqTemplate = RequestTemplate::STILL_CAPTURE;
+            session->constructDefaultRequestSettings(reqTemplate,
+                [&](auto status, const auto& req) {
+                    ASSERT_EQ(Status::OK, status);
+                    settings = req; });
+
+            StreamBuffer outputBuffer = {halStreamConfig.streams[0].id,
+                    bufferId, hidl_handle(nullptr), BufferStatus::OK,
+                    nullptr, nullptr};
+            ::android::hardware::hidl_vec<StreamBuffer> outputBuffers;
+            CaptureRequest request = {frameNumber, settings,
+                    {-1, 0, nullptr, BufferStatus::ERROR, nullptr, nullptr},
+                    outputBuffers};
+
+            //Output buffers are missing, we should fail here
+            ASSERT_EQ(Status::INTERNAL_ERROR,
+                    session->processCaptureRequest(request));
+
+            session->close();
+        }
+    }
+}
+
+// Retrieve all valid output stream resolutions from the camera
+// static characteristics.
+Status CameraHidlTest::getAvailableOutputStreams(camera_metadata_t *staticMeta,
+        std::vector<AvailableStream> &outputStreams,
+        AvailableStream *threshold) {
+    if (nullptr == staticMeta) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    camera_metadata_ro_entry entry;
+    int rc = find_camera_metadata_ro_entry(staticMeta,
+            ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, &entry);
+    if ((0 != rc) || (0 != (entry.count % 4))) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    for (size_t i = 0; i < entry.count; i+=4) {
+        if (ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT ==
+                entry.data.i32[i + 3]) {
+            if(nullptr == threshold) {
+                AvailableStream s = {entry.data.i32[i+1],
+                        entry.data.i32[i+2], entry.data.i32[i]};
+                outputStreams.push_back(s);
+            } else {
+                if ((threshold->format == entry.data.i32[i]) &&
+                        (threshold->width >= entry.data.i32[i+1]) &&
+                        (threshold->height >= entry.data.i32[i+2])) {
+                    AvailableStream s = {entry.data.i32[i+1],
+                            entry.data.i32[i+2], threshold->format};
+                    outputStreams.push_back(s);
+                }
+            }
+        }
+
+    }
+
+    return Status::OK;
+}
+
+// Check if constrained mode is supported by using the static
+// camera characteristics.
+Status CameraHidlTest::isConstrainedModeAvailable(camera_metadata_t *staticMeta) {
+    Status ret = Status::METHOD_NOT_SUPPORTED;
+    if (nullptr == staticMeta) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    camera_metadata_ro_entry entry;
+    int rc = find_camera_metadata_ro_entry(staticMeta,
+            ANDROID_REQUEST_AVAILABLE_CAPABILITIES, &entry);
+    if (0 != rc) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    for (size_t i = 0; i < entry.count; i++) {
+        if (ANDROID_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO ==
+                entry.data.u8[i]) {
+            ret = Status::OK;
+            break;
+        }
+    }
+
+    return ret;
+}
+
+// Pick the largest supported HFR mode from the static camera
+// characteristics.
+Status CameraHidlTest::pickConstrainedModeSize(camera_metadata_t *staticMeta,
+        AvailableStream &hfrStream) {
+    if (nullptr == staticMeta) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    camera_metadata_ro_entry entry;
+    int rc = find_camera_metadata_ro_entry(staticMeta,
+            ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS, &entry);
+    if (0 != rc) {
+        return Status::METHOD_NOT_SUPPORTED;
+    } else if (0 != (entry.count % 5)) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    hfrStream = {0, 0,
+            static_cast<uint32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
+    for (size_t i = 0; i < entry.count; i+=5) {
+        int32_t w = entry.data.i32[i];
+        int32_t h = entry.data.i32[i+1];
+        if ((hfrStream.width * hfrStream.height) < (w *h)) {
+            hfrStream.width = w;
+            hfrStream.height = h;
+        }
+    }
+
+    return Status::OK;
+}
+
+// Check whether ZSL is available using the static camera
+// characteristics.
+Status CameraHidlTest::isZSLModeAvailable(camera_metadata_t *staticMeta) {
+    Status ret = Status::METHOD_NOT_SUPPORTED;
+    if (nullptr == staticMeta) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    camera_metadata_ro_entry entry;
+    int rc = find_camera_metadata_ro_entry(staticMeta,
+            ANDROID_REQUEST_AVAILABLE_CAPABILITIES, &entry);
+    if (0 != rc) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    for (size_t i = 0; i < entry.count; i++) {
+        if ((ANDROID_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING ==
+                entry.data.u8[i]) ||
+                (ANDROID_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING ==
+                        entry.data.u8[i]) ){
+            ret = Status::OK;
+            break;
+        }
+    }
+
+    return ret;
+}
+
+// Retrieve the reprocess input-output format map from the static
+// camera characteristics.
+Status CameraHidlTest::getZSLInputOutputMap(camera_metadata_t *staticMeta,
+        std::vector<AvailableZSLInputOutput> &inputOutputMap) {
+    if (nullptr == staticMeta) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    camera_metadata_ro_entry entry;
+    int rc = find_camera_metadata_ro_entry(staticMeta,
+            ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP, &entry);
+    if ((0 != rc) || (0 >= entry.count)) {
+        return Status::ILLEGAL_ARGUMENT;
+    }
+
+    const int32_t* contents = &entry.data.i32[0];
+    for (size_t i = 0; i < entry.count; ) {
+        int32_t inputFormat = contents[i++];
+        int32_t length = contents[i++];
+        for (int32_t j = 0; j < length; j++) {
+            int32_t outputFormat = contents[i+j];
+            AvailableZSLInputOutput zslEntry = {inputFormat, outputFormat};
+            inputOutputMap.push_back(zslEntry);
+        }
+        i += length;
+    }
+
+    return Status::OK;
+}
+
+// Search for the largest stream size for a given format.
+Status CameraHidlTest::findLargestSize(
+        const std::vector<AvailableStream> &streamSizes, int32_t format,
+        AvailableStream &result) {
+    result = {0, 0, 0};
+    for (auto &iter : streamSizes) {
+        if (format == iter.format) {
+            if ((result.width * result.height) < (iter.width * iter.height)) {
+                result = iter;
+            }
+        }
+    }
+
+    return (result.format == format) ? Status::OK : Status::ILLEGAL_ARGUMENT;
+}
+
+int main(int argc, char **argv) {
+  ::testing::AddGlobalTestEnvironment(CameraHidlEnvironment::Instance());
+  ::testing::InitGoogleTest(&argc, argv);
+  int status = RUN_ALL_TESTS();
+  ALOGI("Test result = %d", status);
+  return status;
+}
diff --git a/camera/provider/2.4/vts/functional/camera_hidl_hal_test.cpp b/camera/provider/2.4/vts/functional/camera_hidl_hal_test.cpp
deleted file mode 100644
index 0186371..0000000
--- a/camera/provider/2.4/vts/functional/camera_hidl_hal_test.cpp
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * Copyright (C) 2016 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 "camera_hidl_hal_test"
-#include <android/hardware/camera/provider/2.4/ICameraProvider.h>
-#include <android/hardware/camera/device/3.2/ICameraDevice.h>
-#include <android/log.h>
-#include <gtest/gtest.h>
-#include <regex>
-#include "system/camera_metadata.h"
-
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::hidl_handle;
-using ::android::hardware::hidl_string;
-using ::android::hardware::hidl_vec;
-using ::android::sp;
-using ::android::hardware::camera::common::V1_0::Status;
-using ::android::hardware::camera::common::V1_0::CameraDeviceStatus;
-using ::android::hardware::camera::common::V1_0::TorchMode;
-using ::android::hardware::camera::common::V1_0::TorchModeStatus;
-using ::android::hardware::camera::provider::V2_4::ICameraProvider;
-using ::android::hardware::camera::provider::V2_4::ICameraProviderCallback;
-using ::android::hardware::camera::device::V3_2::CaptureRequest;
-using ::android::hardware::camera::device::V3_2::CaptureResult;
-using ::android::hardware::camera::device::V3_2::ICameraDeviceCallback;
-using ::android::hardware::camera::device::V3_2::ICameraDeviceSession;
-using ::android::hardware::camera::device::V3_2::NotifyMsg;
-using ::android::hardware::camera::device::V3_2::RequestTemplate;
-
-#define CAMERA_PASSTHROUGH_SERVICE_NAME "legacy/0"
-
-namespace {
-    // "device@<version>/legacy/<id>"
-    const char *kDeviceNameRE = "device@([0-9]+\\.[0-9]+)/legacy/(.+)";
-    const int CAMERA_DEVICE_API_VERSION_3_2 = 0x302;
-    const int CAMERA_DEVICE_API_VERSION_1_0 = 0x100;
-    const char *kHAL3_2 = "3.2";
-    const char *kHAL1_0 = "1.0";
-
-    bool matchDeviceName(const hidl_string& deviceName, std::smatch& sm) {
-        std::regex e(kDeviceNameRE);
-        std::string deviceNameStd(deviceName.c_str());
-        return std::regex_match(deviceNameStd, sm, e);
-    }
-
-    int getCameraDeviceVersion(const hidl_string& deviceName) {
-        std::smatch sm;
-        bool match = matchDeviceName(deviceName, sm);
-        if (!match) {
-            return -1;
-        }
-        if (sm[1].compare(kHAL3_2) == 0) {
-            // maybe switched to 3.4 or define the hidl version enumlater
-            return CAMERA_DEVICE_API_VERSION_3_2;
-        } else if (sm[1].compare(kHAL1_0) == 0) {
-            return CAMERA_DEVICE_API_VERSION_1_0;
-        }
-        return 0;
-    }
-}
-
-// Test environment for camera
-class CameraHidlEnvironment : public ::testing::Environment {
-public:
-    // get the test environment singleton
-    static CameraHidlEnvironment* Instance() {
-        static CameraHidlEnvironment* instance = new CameraHidlEnvironment;
-        return instance;
-    }
-
-    virtual void SetUp() override;
-    virtual void TearDown() override;
-
-    sp<ICameraProvider> mProvider;
-
-private:
-    CameraHidlEnvironment() {}
-
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(CameraHidlEnvironment);
-};
-
-void CameraHidlEnvironment::SetUp() {
-    // TODO: test the binderized mode
-    mProvider = ICameraProvider::getService(CAMERA_PASSTHROUGH_SERVICE_NAME);
-    // TODO: handle the device doesn't have any camera case
-    ALOGI_IF(mProvider, "provider is not nullptr, %p", mProvider.get());
-    ASSERT_NE(mProvider, nullptr);
-}
-
-void CameraHidlEnvironment::TearDown() {
-    ALOGI("TearDown CameraHidlEnvironment");
-}
-
-// The main test class for camera HIDL HAL.
-class CameraHidlTest : public ::testing::Test {
-public:
-    virtual void SetUp() override {}
-    virtual void TearDown() override {}
-
-    hidl_vec<hidl_string> getCameraDeviceNames();
-
-    struct EmptyDeviceCb : public ICameraDeviceCallback {
-        virtual Return<void> processCaptureResult(const CaptureResult& /*result*/) override {
-            ALOGI("processCaptureResult callback");
-            ADD_FAILURE(); // Empty callback should not reach here
-            return Void();
-        }
-
-        virtual Return<void> notify(const NotifyMsg& /*msg*/) override {
-            ALOGI("notify callback");
-            ADD_FAILURE(); // Empty callback should not reach here
-            return Void();
-        }
-    };
-};
-
-hidl_vec<hidl_string> CameraHidlTest::getCameraDeviceNames() {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames;
-    env->mProvider->getCameraIdList(
-        [&](auto status, const auto& idList) {
-            ALOGI("getCameraIdList returns status:%d", (int)status);
-            for (size_t i = 0; i < idList.size(); i++) {
-                ALOGI("Camera Id[%zu] is %s", i, idList[i].c_str());
-            }
-            ASSERT_EQ(Status::OK, status);
-            cameraDeviceNames = idList;
-        });
-    return cameraDeviceNames;
-}
-
-// Test if ICameraProvider::isTorchModeSupported returns Status::OK
-TEST_F(CameraHidlTest, isTorchModeSupported) {
-    CameraHidlEnvironment::Instance()->mProvider->isSetTorchModeSupported(
-        [&](auto status, bool support) {
-            ALOGI("isSetTorchModeSupported returns status:%d supported:%d",
-                    (int)status, support);
-            ASSERT_EQ(Status::OK, status);
-        });
-}
-
-// TODO: consider removing this test if getCameraDeviceNames() has the same coverage
-TEST_F(CameraHidlTest, getCameraIdList) {
-    CameraHidlEnvironment::Instance()->mProvider->getCameraIdList(
-        [&](auto status, const auto& idList) {
-            ALOGI("getCameraIdList returns status:%d", (int)status);
-            for (size_t i = 0; i < idList.size(); i++) {
-                ALOGI("Camera Id[%zu] is %s", i, idList[i].c_str());
-            }
-            ASSERT_EQ(Status::OK, status);
-            // This is true for internal camera provider.
-            // Not necessary hold for external cameras providers
-            ASSERT_GT(idList.size(), 0u);
-        });
-}
-
-// Test if ICameraProvider::getVendorTags returns Status::OK
-TEST_F(CameraHidlTest, getVendorTags) {
-    CameraHidlEnvironment::Instance()->mProvider->getVendorTags(
-        [&](auto status, const auto& vendorTagSecs) {
-            ALOGI("getVendorTags returns status:%d numSections %zu",
-                    (int)status, vendorTagSecs.size());
-            for (size_t i = 0; i < vendorTagSecs.size(); i++) {
-                ALOGI("Vendor tag section %zu name %s",
-                        i, vendorTagSecs[i].sectionName.c_str());
-                for (size_t j = 0; j < vendorTagSecs[i].tags.size(); j++) {
-                    const auto& tag = vendorTagSecs[i].tags[j];
-                    ALOGI("Vendor tag id %u name %s type %d",
-                            tag.tagId,
-                            tag.tagName.c_str(),
-                            (int) tag.tagType);
-                }
-            }
-            ASSERT_EQ(Status::OK, status);
-        });
-}
-
-// Test if ICameraProvider::setCallback returns Status::OK
-TEST_F(CameraHidlTest, setCallback) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    struct ProviderCb : public ICameraProviderCallback {
-        virtual Return<void> cameraDeviceStatusChange(
-                const hidl_string& cameraDeviceName,
-                CameraDeviceStatus newStatus) override {
-            ALOGI("camera device status callback name %s, status %d",
-                    cameraDeviceName.c_str(), (int) newStatus);
-            return Void();
-        }
-
-        virtual Return<void> torchModeStatusChange(
-                const hidl_string& cameraDeviceName,
-                TorchModeStatus newStatus) override {
-            ALOGI("Torch mode status callback name %s, status %d",
-                    cameraDeviceName.c_str(), (int) newStatus);
-            return Void();
-        }
-    };
-    sp<ProviderCb> cb = new ProviderCb;
-    auto status = env->mProvider->setCallback(cb);
-    ASSERT_EQ(Status::OK, status);
-    // TODO: right now no callbacks are fired because there is no external camera
-    //       or torch mode change. Need to test torch API in CameraDevice test later.
-}
-
-// Test if ICameraProvider::getCameraDeviceInterface_V3_x returns Status::OK and non-null device
-TEST_F(CameraHidlTest, getCameraDeviceInterface_V3_x) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device3_2) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device3_2, nullptr);
-                });
-        }
-    }
-}
-
-TEST_F(CameraHidlTest, getResourceCost) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
-            ALOGI("getResourceCost: Testing camera device %s", name.c_str());
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device, nullptr);
-                    device3_2 = device;
-                });
-
-            device3_2->getResourceCost(
-                [&](auto status, const auto& resourceCost) {
-                    ALOGI("getResourceCost returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ALOGI("    Resource cost is %d", resourceCost.resourceCost);
-                    ASSERT_LE(resourceCost.resourceCost, 100u);
-                    for (const auto& name : resourceCost.conflictingDevices) {
-                        ALOGI("    Conflicting device: %s", name.c_str());
-                    }
-                });
-        }
-    }
-}
-
-TEST_F(CameraHidlTest, getCameraCharacteristics) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
-            ALOGI("getCameraCharacteristics: Testing camera device %s", name.c_str());
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device, nullptr);
-                    device3_2 = device;
-                });
-
-            device3_2->getCameraCharacteristics(
-                [&](auto status, const auto& chars) {
-                    ALOGI("getCameraCharacteristics returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    const camera_metadata_t* metadata = (camera_metadata_t*) chars.data();
-                    size_t expectedSize = chars.size();
-                    ASSERT_EQ(0, validate_camera_metadata_structure(metadata, &expectedSize));
-                    size_t entryCount = get_camera_metadata_entry_count(metadata);
-                    // TODO: we can do better than 0 here. Need to check how many required
-                    // characteristics keys we've defined.
-                    ASSERT_GT(entryCount, 0u);
-                    ALOGI("getCameraCharacteristics metadata entry count is %zu", entryCount);
-                });
-        }
-    }
-}
-
-TEST_F(CameraHidlTest, setTorchMode) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-    bool torchControlSupported = false;
-
-    CameraHidlEnvironment::Instance()->mProvider->isSetTorchModeSupported(
-        [&](auto status, bool support) {
-            ALOGI("isSetTorchModeSupported returns status:%d supported:%d",
-                    (int)status, support);
-            ASSERT_EQ(Status::OK, status);
-            torchControlSupported = support;
-        });
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
-            ALOGI("setTorchMode: Testing camera device %s", name.c_str());
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device, nullptr);
-                    device3_2 = device;
-                });
-
-            Status status = device3_2->setTorchMode(TorchMode::ON);
-            ALOGI("setTorchMode return status %d", (int)status);
-            if (!torchControlSupported) {
-                ASSERT_EQ(Status::METHOD_NOT_SUPPORTED, status);
-            } else {
-                ASSERT_TRUE(status == Status::OK || status == Status::OPERATION_NOT_SUPPORTED);
-                if (status == Status::OK) {
-                    status = device3_2->setTorchMode(TorchMode::OFF);
-                    ASSERT_EQ(Status::OK, status);
-                }
-            }
-        }
-    }
-}
-
-TEST_F(CameraHidlTest, dumpState) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
-            ALOGI("dumpState: Testing camera device %s", name.c_str());
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device, nullptr);
-                    device3_2 = device;
-                });
-
-            native_handle_t* raw_handle = native_handle_create(1, 0);
-            raw_handle->data[0] = 1; // std out
-            hidl_handle handle = raw_handle;
-            device3_2->dumpState(handle);
-            native_handle_delete(raw_handle);
-        }
-    }
-}
-
-// Open, dumpStates, then close
-TEST_F(CameraHidlTest, openClose) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
-            ALOGI("openClose: Testing camera device %s", name.c_str());
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device, nullptr);
-                    device3_2 = device;
-                });
-
-            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
-            sp<ICameraDeviceSession> session;
-            device3_2->open(
-                cb,
-                [&](auto status, const auto& newSession) {
-                    ALOGI("device::open returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(newSession, nullptr);
-                    session = newSession;
-                });
-
-            native_handle_t* raw_handle = native_handle_create(1, 0);
-            raw_handle->data[0] = 1; // std out
-            hidl_handle handle = raw_handle;
-            device3_2->dumpState(handle);
-            native_handle_delete(raw_handle);
-
-            session->close();
-            // TODO: test all session API calls return INTERNAL_ERROR after close
-            // TODO: keep a wp copy here and verify session cannot be promoted out of this scope
-        }
-    }
-}
-
-TEST_F(CameraHidlTest, constructDefaultRequestSettings) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
-            ALOGI("constructDefaultRequestSettings: Testing camera device %s", name.c_str());
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device, nullptr);
-                    device3_2 = device;
-                });
-
-            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
-            sp<ICameraDeviceSession> session;
-            device3_2->open(
-                cb,
-                [&](auto status, const auto& newSession) {
-                    ALOGI("device::open returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(newSession, nullptr);
-                    session = newSession;
-                });
-
-            for (uint32_t t = (uint32_t) RequestTemplate::PREVIEW;
-                    t <= (uint32_t) RequestTemplate::MANUAL; t++) {
-                RequestTemplate reqTemplate = (RequestTemplate) t;
-                session->constructDefaultRequestSettings(
-                    reqTemplate,
-                    [&](auto status, const auto& req) {
-                        ALOGI("constructDefaultRequestSettings returns status:%d", (int)status);
-                        if (reqTemplate == RequestTemplate::ZERO_SHUTTER_LAG ||
-                                reqTemplate == RequestTemplate::MANUAL) {
-                            // optional templates
-                            ASSERT_TRUE(status == Status::OK || status == Status::ILLEGAL_ARGUMENT);
-                        } else {
-                            ASSERT_EQ(Status::OK, status);
-                        }
-
-                        if (status == Status::OK) {
-                            const camera_metadata_t* metadata =
-                                (camera_metadata_t*) req.data();
-                            size_t expectedSize = req.size();
-                            ASSERT_EQ(0, validate_camera_metadata_structure(
-                                    metadata, &expectedSize));
-                            size_t entryCount = get_camera_metadata_entry_count(metadata);
-                            // TODO: we can do better than 0 here. Need to check how many required
-                            // request keys we've defined for each template
-                            ASSERT_GT(entryCount, 0u);
-                            ALOGI("template %u metadata entry count is %zu", t, entryCount);
-                        } else {
-                            ASSERT_EQ(0u, req.size());
-                        }
-                    });
-            }
-            session->close();
-        }
-    }
-}
-
-TEST_F(CameraHidlTest, configureStreams) {
-    CameraHidlEnvironment* env = CameraHidlEnvironment::Instance();
-    hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames();
-
-    for (const auto& name : cameraDeviceNames) {
-        if (getCameraDeviceVersion(name) == CAMERA_DEVICE_API_VERSION_3_2) {
-            ::android::sp<::android::hardware::camera::device::V3_2::ICameraDevice> device3_2;
-            ALOGI("configureStreams: Testing camera device %s", name.c_str());
-            env->mProvider->getCameraDeviceInterface_V3_x(
-                name,
-                [&](auto status, const auto& device) {
-                    ALOGI("getCameraDeviceInterface_V3_x returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(device, nullptr);
-                    device3_2 = device;
-                });
-
-            sp<EmptyDeviceCb> cb = new EmptyDeviceCb;
-            sp<ICameraDeviceSession> session;
-            device3_2->open(
-                cb,
-                [&](auto status, const auto& newSession) {
-                    ALOGI("device::open returns status:%d", (int)status);
-                    ASSERT_EQ(Status::OK, status);
-                    ASSERT_NE(newSession, nullptr);
-                    session = newSession;
-                });
-
-
-            session->close();
-        }
-    }
-}
-
-int main(int argc, char **argv) {
-  ::testing::AddGlobalTestEnvironment(CameraHidlEnvironment::Instance());
-  ::testing::InitGoogleTest(&argc, argv);
-  int status = RUN_ALL_TESTS();
-  ALOGI("Test result = %d", status);
-  return status;
-}
diff --git a/configstore/1.0/ISurfaceFlingerConfigs.hal b/configstore/1.0/ISurfaceFlingerConfigs.hal
index 4403a90..318590d 100644
--- a/configstore/1.0/ISurfaceFlingerConfigs.hal
+++ b/configstore/1.0/ISurfaceFlingerConfigs.hal
@@ -16,6 +16,29 @@
 package android.hardware.configstore@1.0;
 
 interface ISurfaceFlingerConfigs {
+    /*
+     * The following two methods define (respectively):
+     *
+     * - The phase offset between hardware vsync and when apps are woken up by the
+     *   Choreographer callback
+     * - The phase offset between hardware vsync and when SurfaceFlinger wakes up
+     *   to consume input
+     *
+     * Their values may be tuned to trade off between display pipeline latency (both
+     * overall latency and the lengths of the app --> SF and SF --> display phases)
+     * and frame delivery jitter (which typically manifests as "jank" or "jerkiness"
+     * while interacting with the device). The default values must produce a
+     * relatively low amount of jitter at the expense of roughly two frames of
+     * app --> display latency, and unless significant testing is performed to avoid
+     * increased display jitter (both manual investigation using systrace [1] and
+     * automated testing using dumpsys gfxinfo [2] are recommended), they should not
+     * be modified.
+     *
+     * [1] https://developer.android.com/studio/profile/systrace.html
+     * [2] https://developer.android.com/training/testing/performance.html
+     */
     vsyncEventPhaseOffsetNs() generates (OptionalInt64 value);
+    vsyncSfEventPhaseOffsetNs() generates (OptionalInt64 value);
+
     useTripleFramebuffer() generates (OptionalBool value);
 };
diff --git a/configstore/1.0/default/Android.mk b/configstore/1.0/default/Android.mk
index 116126d..b168029 100644
--- a/configstore/1.0/default/Android.mk
+++ b/configstore/1.0/default/Android.mk
@@ -13,7 +13,6 @@
     libbase \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     android.hardware.configstore@1.0 \
     android.hidl.base@1.0
@@ -35,7 +34,6 @@
     libutils \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     android.hardware.configstore@1.0 \
 
 include $(BUILD_EXECUTABLE)
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.cpp b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
index 5d62b15..f73ecb4 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.cpp
+++ b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
@@ -19,6 +19,16 @@
     return Void();
 }
 
+Return<void> SurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
+#ifdef SF_VSYNC_EVENT_PHASE_OFFSET_NS
+    _hidl_cb({true, SF_VSYNC_EVENT_PHASE_OFFSET_NS});
+    LOG(INFO) << "sfvsync event phase offset ns =  " << SF_VSYNC_EVENT_PHASE_OFFSET_NS;
+#else
+    _hidl_cb({false, 0});
+#endif
+    return Void();
+}
+
 Return<void> SurfaceFlingerConfigs::useTripleFramebuffer(useTripleFramebuffer_cb _hidl_cb) {
     bool value = false;
 #ifdef USE_TRIPLE_FRAMEBUFFER
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.h b/configstore/1.0/default/SurfaceFlingerConfigs.h
index c9652fc..bbb61d6 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.h
+++ b/configstore/1.0/default/SurfaceFlingerConfigs.h
@@ -25,6 +25,7 @@
 struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs {
     // Methods from ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs follow.
     Return<void> vsyncEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) override;
+    Return<void> vsyncSfEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) override;
     Return<void> useTripleFramebuffer(useTripleFramebuffer_cb _hidl_cb) override;
 
     // Methods from ::android::hidl::base::V1_0::IBase follow.
diff --git a/configstore/1.0/default/surfaceflinger.mk b/configstore/1.0/default/surfaceflinger.mk
index 5a946f4..49314d7 100644
--- a/configstore/1.0/default/surfaceflinger.mk
+++ b/configstore/1.0/default/surfaceflinger.mk
@@ -5,6 +5,10 @@
     LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
 endif
 
+ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
+    LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
+endif
+
 ifeq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),3)
     LOCAL_CFLAGS += -DUSE_TRIPLE_FRAMEBUFFER
 endif
diff --git a/configstore/utils/Android.bp b/configstore/utils/Android.bp
index 32053a7..aa420d1 100644
--- a/configstore/utils/Android.bp
+++ b/configstore/utils/Android.bp
@@ -14,15 +14,14 @@
 // limitations under the License.
 //
 
-cc_library_static {
+cc_library_headers {
     name: "android.hardware.configstore-utils",
+    defaults: ["hidl_defaults"],
     export_include_dirs: ["include"],
-    srcs: [],
     shared_libs: [
-        "android.hardware.configstore@1.0",
+        "libhidlbase"
     ],
     export_shared_lib_headers: [
-        "android.hardware.configstore@1.0",
+        "libhidlbase"
     ],
 }
-
diff --git a/contexthub/1.0/default/Android.bp b/contexthub/1.0/default/Android.bp
index 0e1dc77..78d27cc 100644
--- a/contexthub/1.0/default/Android.bp
+++ b/contexthub/1.0/default/Android.bp
@@ -16,6 +16,7 @@
 
 cc_library_shared {
     name: "android.hardware.contexthub@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Contexthub.cpp"],
@@ -23,7 +24,6 @@
         "liblog",
         "libcutils",
         "libhardware",
-        "libhwbinder",
         "libbase",
         "libcutils",
         "libutils",
diff --git a/contexthub/1.0/default/Android.mk b/contexthub/1.0/default/Android.mk
index cc36b7f..538a6b2 100644
--- a/contexthub/1.0/default/Android.mk
+++ b/contexthub/1.0/default/Android.mk
@@ -16,7 +16,6 @@
         libhardware_legacy \
         libhidlbase \
         libhidltransport \
-        libhwbinder \
         liblog \
         libutils \
         android.hardware.contexthub@1.0 \
diff --git a/contexthub/1.0/default/service.cpp b/contexthub/1.0/default/service.cpp
index db9a4e7..8c676b4 100644
--- a/contexthub/1.0/default/service.cpp
+++ b/contexthub/1.0/default/service.cpp
@@ -23,5 +23,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IContexthub>("context_hub");
+    return defaultPassthroughServiceImplementation<IContexthub>();
 }
diff --git a/contexthub/1.0/vts/Contexthub.vts b/contexthub/1.0/vts/Contexthub.vts
deleted file mode 100644
index a5cdc81..0000000
--- a/contexthub/1.0/vts/Contexthub.vts
+++ /dev/null
@@ -1,147 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IContexthub"
-
-package: "android.hardware.contexthub"
-
-import: "android.hardware.contexthub@1.0::IContexthubCallback"
-import: "android.hardware.contexthub@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getHubs"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::contexthub::V1_0::ContextHub"
-            }
-        }
-    }
-
-    api: {
-        name: "registerCallback"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::contexthub::V1_0::IContexthubCallback"
-        }
-    }
-
-    api: {
-        name: "sendMessageToHub"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::contexthub::V1_0::ContextHubMsg"
-        }
-    }
-
-    api: {
-        name: "loadNanoApp"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::contexthub::V1_0::NanoAppBinary"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "unloadNanoApp"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "enableNanoApp"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "disableNanoApp"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "queryApps"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/contexthub/1.0/vts/ContexthubCallback.vts b/contexthub/1.0/vts/ContexthubCallback.vts
deleted file mode 100644
index 59ff2fe..0000000
--- a/contexthub/1.0/vts/ContexthubCallback.vts
+++ /dev/null
@@ -1,62 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IContexthubCallback"
-
-package: "android.hardware.contexthub"
-
-import: "android.hardware.contexthub@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "handleClientMsg"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::contexthub::V1_0::ContextHubMsg"
-        }
-    }
-
-    api: {
-        name: "handleTxnResult"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::TransactionResult"
-        }
-    }
-
-    api: {
-        name: "handleHubEvent"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::contexthub::V1_0::AsyncEventType"
-        }
-    }
-
-    api: {
-        name: "handleAppAbort"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "handleAppsInfo"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::contexthub::V1_0::HubAppInfo"
-            }
-        }
-    }
-
-}
diff --git a/contexthub/1.0/vts/functional/Android.bp b/contexthub/1.0/vts/functional/Android.bp
index 1c011a0..c35386d 100644
--- a/contexthub/1.0/vts/functional/Android.bp
+++ b/contexthub/1.0/vts/functional/Android.bp
@@ -15,9 +15,9 @@
 //
 
 cc_test {
-    name: "contexthub_hidl_hal_test",
-    gtest: true,
-    srcs: ["contexthub_hidl_hal_test.cpp"],
+    name: "VtsHalContexthubV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalContexthubV1_0TargetTest.cpp"],
     shared_libs: [
         "liblog",
         "libhidlbase",
@@ -25,7 +25,7 @@
         "libutils",
         "android.hardware.contexthub@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/contexthub/1.0/vts/functional/contexthub_hidl_hal_test.cpp b/contexthub/1.0/vts/functional/VtsHalContexthubV1_0TargetTest.cpp
similarity index 97%
rename from contexthub/1.0/vts/functional/contexthub_hidl_hal_test.cpp
rename to contexthub/1.0/vts/functional/VtsHalContexthubV1_0TargetTest.cpp
index e4dea4f..765857f 100644
--- a/contexthub/1.0/vts/functional/contexthub_hidl_hal_test.cpp
+++ b/contexthub/1.0/vts/functional/VtsHalContexthubV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
 #include <android/hardware/contexthub/1.0/IContexthubCallback.h>
 #include <android/hardware/contexthub/1.0/types.h>
 #include <android/log.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include <cinttypes>
 #include <future>
@@ -42,8 +42,6 @@
 using ::android::hardware::contexthub::V1_0::TransactionResult;
 using ::android::sp;
 
-#define CONTEXTHUB_SERVICE_NAME "contexthub"
-
 #define ASSERT_OK(result) ASSERT_EQ(result, Result::OK)
 #define EXPECT_OK(result) EXPECT_EQ(result, Result::OK)
 
@@ -80,7 +78,7 @@
   static std::vector<uint32_t> hubIds;
 
   if (hubIds.size() == 0) {
-    sp<IContexthub> hubApi = IContexthub::getService(CONTEXTHUB_SERVICE_NAME);
+    sp<IContexthub> hubApi = ::testing::VtsHalHidlTargetTestBase::getService<IContexthub>();
 
     if (hubApi != nullptr) {
       for (ContextHub hub : getHubsSync(hubApi)) {
@@ -95,10 +93,10 @@
 
 // Base test fixture that initializes the HAL and makes the context hub API
 // handle available
-class ContexthubHidlTestBase : public ::testing::Test {
+class ContexthubHidlTestBase : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    hubApi = IContexthub::getService(CONTEXTHUB_SERVICE_NAME);
+    hubApi = ::testing::VtsHalHidlTargetTestBase::getService<IContexthub>();
     ASSERT_NE(hubApi, nullptr);
 
     // getHubs() must be called at least once for proper initialization of the
diff --git a/contexthub/1.0/vts/types.vts b/contexthub/1.0/vts/types.vts
deleted file mode 100644
index 4f5dfcf..0000000
--- a/contexthub/1.0/vts/types.vts
+++ /dev/null
@@ -1,477 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.contexthub"
-
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::Result"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "OK"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "UNKNOWN_FAILURE"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "BAD_PARAMS"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "NOT_INIT"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "TRANSACTION_FAILED"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "TRANSACTION_PENDING"
-        scalar_value: {
-            uint32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::NanoAppFlags"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SIGNED"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "ENCRYPTED"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::NanoAppBinary"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "appId"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "appVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "flags"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags"
-    }
-    struct_value: {
-        name: "targetChreApiMajorVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "targetChreApiMinorVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "customBinary"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::SensorType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "RESERVED"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "ACCELEROMETER"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "GYROSCOPE"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "MAGNETOMETER"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "BAROMETER"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "PROXIMITY_SENSOR"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "AMBIENT_LIGHT_SENSOR"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "STATIONARY_DETECT"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "INSTANT_MOTION_DETECT"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "GPS"
-        scalar_value: {
-            uint32_t: 256
-        }
-        enumerator: "WIFI"
-        scalar_value: {
-            uint32_t: 512
-        }
-        enumerator: "AUDIO"
-        scalar_value: {
-            uint32_t: 768
-        }
-        enumerator: "CAMERA"
-        scalar_value: {
-            uint32_t: 1024
-        }
-        enumerator: "BLE"
-        scalar_value: {
-            uint32_t: 1280
-        }
-        enumerator: "WWAN"
-        scalar_value: {
-            uint32_t: 1536
-        }
-        enumerator: "PRIVATE_SENSOR_BASE"
-        scalar_value: {
-            uint32_t: 65536
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::PhysicalSensor"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sensorType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::contexthub::V1_0::SensorType"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "vendor"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "version"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "fifoReservedCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "fifoMaxCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "minDelayMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "maxDelayMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "peakPowerMw"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::ContextHub"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "vendor"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "toolchain"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "platformVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "toolchainVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "hubId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "peakMips"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "stoppedPowerDrawMw"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "sleepPowerDrawMw"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "peakPowerDrawMw"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "connectedSensors"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::contexthub::V1_0::PhysicalSensor"
-        }
-    }
-    struct_value: {
-        name: "maxSupportedMsgLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "chrePlatformId"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "chreApiMajorVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "chreApiMinorVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "chrePatchVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::HostEndPoint"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint16_t"
-
-        enumerator: "BROADCAST"
-        scalar_value: {
-            uint16_t: 65535
-        }
-        enumerator: "UNSPECIFIED"
-        scalar_value: {
-            uint16_t: 65534
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::ContextHubMsg"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "appName"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "hostEndPoint"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "msgType"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "msg"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::HubMemoryType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "MAIN"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "SECONDARY"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "TCM"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "READ"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "WRITE"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "EXEC"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::MemRange"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "totalBytes"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "freeBytes"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryType"
-    }
-    struct_value: {
-        name: "flags"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::AsyncEventType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "RESTARTED"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::TransactionResult"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "FAILURE"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::contexthub::V1_0::HubAppInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "appId"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "version"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "memUsage"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::contexthub::V1_0::MemRange"
-        }
-    }
-    struct_value: {
-        name: "enabled"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-}
-
diff --git a/drm/1.0/ICryptoPlugin.hal b/drm/1.0/ICryptoPlugin.hal
index d66151e..ca8fa50 100644
--- a/drm/1.0/ICryptoPlugin.hal
+++ b/drm/1.0/ICryptoPlugin.hal
@@ -62,8 +62,16 @@
      * After the shared buffer base is established, the decrypt() method
      * receives SharedBuffer instances which specify the buffer address range
      * for decrypt source and destination addresses.
+     *
+     * There can be multiple shared buffers per crypto plugin. The buffers
+     * are distinguished by the bufferId.
+     *
+     * @param base the base IMemory of the memory buffer identified by
+     * bufferId
+     * @param bufferId identifies the specific shared buffer for which
+     * the base is being set.
      */
-    setSharedBufferBase(memory base);
+    setSharedBufferBase(memory base, uint32_t bufferId);
 
     /**
      * Decrypt an array of subsamples from the source memory buffer to the
diff --git a/drm/1.0/IDrmPlugin.hal b/drm/1.0/IDrmPlugin.hal
index 5bae22d..083b311 100644
--- a/drm/1.0/IDrmPlugin.hal
+++ b/drm/1.0/IDrmPlugin.hal
@@ -179,8 +179,9 @@
      * certificate authority (CA) is an entity which issues digital certificates
      * for use by other parties. It is an example of a trusted third party.
      * @return status the status of the call. The status must be OK or one of
-     * the following errors: BAD_VALUE if the sessionId is invalid or
-     * ERROR_DRM_INVALID_STATE if the HAL is in a state where the provision
+     * the following errors: BAD_VALUE if the sessionId is invalid,
+     * ERROR_DRM_CANNOT_HANDLE if the drm scheme does not require provisioning
+     * or ERROR_DRM_INVALID_STATE if the HAL is in a state where the provision
      * request cannot be generated.
      * @return request if successful the opaque certificate request blob
      * is returned
diff --git a/drm/1.0/default/Android.mk b/drm/1.0/default/Android.mk
index ea6cca0..f2334a0 100644
--- a/drm/1.0/default/Android.mk
+++ b/drm/1.0/default/Android.mk
@@ -32,7 +32,6 @@
   libhidlbase \
   libhidltransport \
   libhardware \
-  libhwbinder \
   liblog \
   libutils \
 
@@ -64,7 +63,6 @@
     libhidlbase \
     libhidlmemory \
     libhidltransport \
-    libhwbinder \
     liblog \
     libmediadrm \
     libstagefright_foundation \
diff --git a/drm/1.0/default/CryptoPlugin.cpp b/drm/1.0/default/CryptoPlugin.cpp
index fb61ede..9c51b15 100644
--- a/drm/1.0/default/CryptoPlugin.cpp
+++ b/drm/1.0/default/CryptoPlugin.cpp
@@ -49,8 +49,9 @@
         return toStatus(mLegacyPlugin->setMediaDrmSession(toVector(sessionId)));
     }
 
-    Return<void> CryptoPlugin::setSharedBufferBase(const hidl_memory& base) {
-        mSharedBufferBase = mapMemory(base);
+    Return<void> CryptoPlugin::setSharedBufferBase(const hidl_memory& base,
+            uint32_t bufferId) {
+        mSharedBufferMap[bufferId] = mapMemory(base);
         return Void();
     }
 
@@ -62,11 +63,19 @@
             const DestinationBuffer& destination,
             decrypt_cb _hidl_cb) {
 
-        if (mSharedBufferBase == NULL) {
-            _hidl_cb(Status::BAD_VALUE, 0, "decrypt buffer base not set");
+        if (mSharedBufferMap.find(source.bufferId) == mSharedBufferMap.end()) {
+            _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, 0, "source decrypt buffer base not set");
             return Void();
         }
 
+        if (destination.type == BufferType::SHARED_MEMORY) {
+            const SharedBuffer& dest = destination.nonsecureMemory;
+            if (mSharedBufferMap.find(dest.bufferId) == mSharedBufferMap.end()) {
+                _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, 0, "destination decrypt buffer base not set");
+                return Void();
+            }
+        }
+
         android::CryptoPlugin::Mode legacyMode;
         switch(mode) {
         case Mode::UNENCRYPTED:
@@ -97,20 +106,22 @@
         }
 
         AString detailMessage;
+        sp<IMemory> sourceBase = mSharedBufferMap[source.bufferId];
 
-        if (source.offset + offset + source.size > mSharedBufferBase->getSize()) {
+        if (source.offset + offset + source.size > sourceBase->getSize()) {
             _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, 0, "invalid buffer size");
             return Void();
         }
 
         uint8_t *base = static_cast<uint8_t *>
-                (static_cast<void *>(mSharedBufferBase->getPointer()));
+                (static_cast<void *>(sourceBase->getPointer()));
         void *srcPtr = static_cast<void *>(base + source.offset + offset);
 
         void *destPtr = NULL;
         if (destination.type == BufferType::SHARED_MEMORY) {
             const SharedBuffer& destBuffer = destination.nonsecureMemory;
-            if (destBuffer.offset + destBuffer.size > mSharedBufferBase->getSize()) {
+            sp<IMemory> destBase = mSharedBufferMap[destBuffer.bufferId];
+            if (destBuffer.offset + destBuffer.size > destBase->getSize()) {
                 _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, 0, "invalid buffer size");
                 return Void();
             }
@@ -133,7 +144,7 @@
             status = android::OK;
             bytesWritten = result;
         } else {
-            status = -result;
+            status = result;
             bytesWritten = 0;
         }
 
diff --git a/drm/1.0/default/CryptoPlugin.h b/drm/1.0/default/CryptoPlugin.h
index f805f09..11cc2aa 100644
--- a/drm/1.0/default/CryptoPlugin.h
+++ b/drm/1.0/default/CryptoPlugin.h
@@ -57,8 +57,8 @@
     Return<Status> setMediaDrmSession(const hidl_vec<uint8_t>& sessionId)
             override;
 
-    Return<void> setSharedBufferBase(const ::android::hardware::hidl_memory& base)
-            override;
+    Return<void> setSharedBufferBase(const ::android::hardware::hidl_memory& base,
+        uint32_t bufferId) override;
 
     Return<void> decrypt(bool secure, const hidl_array<uint8_t, 16>& keyId,
             const hidl_array<uint8_t, 16>& iv, Mode mode, const Pattern& pattern,
@@ -68,7 +68,7 @@
 
 private:
     android::CryptoPlugin *mLegacyPlugin;
-    sp<IMemory> mSharedBufferBase;
+    std::map<uint32_t, sp<IMemory> > mSharedBufferMap;
 
     CryptoPlugin() = delete;
     CryptoPlugin(const CryptoPlugin &) = delete;
diff --git a/drm/1.0/default/DrmFactory.cpp b/drm/1.0/default/DrmFactory.cpp
index 92f54f1..9ec0ab7 100644
--- a/drm/1.0/default/DrmFactory.cpp
+++ b/drm/1.0/default/DrmFactory.cpp
@@ -52,7 +52,7 @@
     }
 
     Return<void> DrmFactory::createPlugin(const hidl_array<uint8_t, 16>& uuid,
-            const hidl_string& appPackageName, createPlugin_cb _hidl_cb) {
+            const hidl_string& /* appPackageName */, createPlugin_cb _hidl_cb) {
 
         for (size_t i = 0; i < loader.factoryCount(); i++) {
             if (loader.getFactory(i)->isCryptoSchemeSupported(uuid.data())) {
diff --git a/drm/1.0/default/DrmPlugin.cpp b/drm/1.0/default/DrmPlugin.cpp
index 1b2f90e..6f51e0e 100644
--- a/drm/1.0/default/DrmPlugin.cpp
+++ b/drm/1.0/default/DrmPlugin.cpp
@@ -321,6 +321,7 @@
 
     Return<void> DrmPlugin::setListener(const sp<IDrmPluginListener>& listener) {
         mListener = listener;
+        mLegacyPlugin->setListener(listener == NULL ? NULL : this);
         return Void();
     }
 
@@ -372,8 +373,10 @@
             break;
         }
         if (sendEvent) {
-            mListener->sendEvent(eventType, toHidlVec(*sessionId),
-                    toHidlVec(*data));
+            Vector<uint8_t> emptyVector;
+            mListener->sendEvent(eventType,
+                    toHidlVec(sessionId == NULL ? emptyVector: *sessionId),
+                    toHidlVec(data == NULL ? emptyVector: *data));
         }
     }
 
diff --git a/drm/1.0/types.hal b/drm/1.0/types.hal
index 33bbf9a..5273044 100644
--- a/drm/1.0/types.hal
+++ b/drm/1.0/types.hal
@@ -293,12 +293,18 @@
 };
 
 /**
- * A SharedBuffer describes a decrypt buffer which is defined by an offset and
- * a size.  The offset is relative to the shared memory base which is established
- * using setSharedMemoryBase().
+ * SharedBuffer describes a decrypt buffer which is defined by a bufferId, an
+ * offset and a size.  The offset is relative to the shared memory base for the
+ * memory region identified by bufferId, which is established by
+ * setSharedMemoryBase().
  */
 struct SharedBuffer {
     /**
+     * The unique buffer identifier
+     */
+    uint32_t bufferId;
+
+    /**
      * The offset from the shared memory base
      */
     uint64_t offset;
diff --git a/dumpstate/1.0/default/Android.mk b/dumpstate/1.0/default/Android.mk
index ed9ef97..0b07f49 100644
--- a/dumpstate/1.0/default/Android.mk
+++ b/dumpstate/1.0/default/Android.mk
@@ -16,7 +16,6 @@
     libdumpstateutil \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     liblog \
     libutils
 
diff --git a/dumpstate/1.0/default/service.cpp b/dumpstate/1.0/default/service.cpp
index 0d5bd94..85bea12 100644
--- a/dumpstate/1.0/default/service.cpp
+++ b/dumpstate/1.0/default/service.cpp
@@ -29,6 +29,6 @@
 int main (int /* argc */, char * /* argv */ []) {
     sp<IDumpstateDevice> dumpstate = new DumpstateDevice;
     configureRpcThreadpool(1, true);
-    dumpstate->registerAsService("dumpstate");
+    dumpstate->registerAsService();
     joinRpcThreadpool();
 }
diff --git a/evs/1.0/Android.bp b/evs/1.0/Android.bp
deleted file mode 100644
index 89bac10..0000000
--- a/evs/1.0/Android.bp
+++ /dev/null
@@ -1,83 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-
-filegroup {
-    name: "android.hardware.evs@1.0_hal",
-    srcs: [
-        "types.hal",
-        "IEvsCamera.hal",
-        "IEvsCameraStream.hal",
-        "IEvsDisplay.hal",
-        "IEvsEnumerator.hal",
-    ],
-}
-
-genrule {
-    name: "android.hardware.evs@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.evs@1.0",
-    srcs: [
-        ":android.hardware.evs@1.0_hal",
-    ],
-    out: [
-        "android/hardware/evs/1.0/types.cpp",
-        "android/hardware/evs/1.0/EvsCameraAll.cpp",
-        "android/hardware/evs/1.0/EvsCameraStreamAll.cpp",
-        "android/hardware/evs/1.0/EvsDisplayAll.cpp",
-        "android/hardware/evs/1.0/EvsEnumeratorAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.evs@1.0_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.evs@1.0",
-    srcs: [
-        ":android.hardware.evs@1.0_hal",
-    ],
-    out: [
-        "android/hardware/evs/1.0/types.h",
-        "android/hardware/evs/1.0/IEvsCamera.h",
-        "android/hardware/evs/1.0/IHwEvsCamera.h",
-        "android/hardware/evs/1.0/BnHwEvsCamera.h",
-        "android/hardware/evs/1.0/BpHwEvsCamera.h",
-        "android/hardware/evs/1.0/BsEvsCamera.h",
-        "android/hardware/evs/1.0/IEvsCameraStream.h",
-        "android/hardware/evs/1.0/IHwEvsCameraStream.h",
-        "android/hardware/evs/1.0/BnHwEvsCameraStream.h",
-        "android/hardware/evs/1.0/BpHwEvsCameraStream.h",
-        "android/hardware/evs/1.0/BsEvsCameraStream.h",
-        "android/hardware/evs/1.0/IEvsDisplay.h",
-        "android/hardware/evs/1.0/IHwEvsDisplay.h",
-        "android/hardware/evs/1.0/BnHwEvsDisplay.h",
-        "android/hardware/evs/1.0/BpHwEvsDisplay.h",
-        "android/hardware/evs/1.0/BsEvsDisplay.h",
-        "android/hardware/evs/1.0/IEvsEnumerator.h",
-        "android/hardware/evs/1.0/IHwEvsEnumerator.h",
-        "android/hardware/evs/1.0/BnHwEvsEnumerator.h",
-        "android/hardware/evs/1.0/BpHwEvsEnumerator.h",
-        "android/hardware/evs/1.0/BsEvsEnumerator.h",
-    ],
-}
-
-cc_library_shared {
-    name: "android.hardware.evs@1.0",
-    generated_sources: ["android.hardware.evs@1.0_genc++"],
-    generated_headers: ["android.hardware.evs@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.evs@1.0_genc++_headers"],
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "android.hidl.base@1.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hidl.base@1.0",
-    ],
-}
diff --git a/evs/1.0/default/EvsCamera.h b/evs/1.0/default/EvsCamera.h
deleted file mode 100644
index 8d644a0..0000000
--- a/evs/1.0/default/EvsCamera.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2016 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_EVS_V1_0_EVSCAMERA_H
-#define ANDROID_HARDWARE_EVS_V1_0_EVSCAMERA_H
-
-#include <android/hardware/evs/1.0/types.h>
-#include <android/hardware/evs/1.0/IEvsCamera.h>
-#include <ui/GraphicBuffer.h>
-
-#include <thread>
-
-
-namespace android {
-namespace hardware {
-namespace evs {
-namespace V1_0 {
-namespace implementation {
-
-
-class EvsCamera : public IEvsCamera {
-public:
-    // Methods from ::android::hardware::evs::V1_0::IEvsCamera follow.
-    Return<void> getId(getId_cb id_cb)  override;
-    Return<EvsResult> setMaxFramesInFlight(uint32_t bufferCount)  override;
-    Return<EvsResult> startVideoStream(const ::android::sp<IEvsCameraStream>& stream) override;
-    Return<void> doneWithFrame(const BufferDesc& buffer)  override;
-    Return<void> stopVideoStream()  override;
-    Return<int32_t> getExtendedInfo(uint32_t opaqueIdentifier)  override;
-    Return<EvsResult> setExtendedInfo(uint32_t opaqueIdentifier, int32_t opaqueValue)  override;
-
-    // Implementation details
-    EvsCamera(const char* id);
-    virtual ~EvsCamera() override;
-
-    const CameraDesc& getDesc() { return mDescription; };
-
-    static const char kCameraName_Backup[];
-    static const char kCameraName_RightTurn[];
-
-private:
-    // These three functions are expected to be called while mAccessLock is held
-    bool     setAvailableFrames_Locked(unsigned bufferCount);
-    unsigned increaseAvailableFrames_Locked(unsigned numToAdd);
-    unsigned decreaseAvailableFrames_Locked(unsigned numToRemove);
-
-    void generateFrames();
-    void fillTestFrame(BufferDesc buff);
-
-    CameraDesc                  mDescription = {};  // The properties of this camera
-
-    std::thread                 mCaptureThread;     // The thread we'll use to synthesize frames
-
-    uint32_t                    mWidth  = 0;        // Horizontal pixel count in the buffers
-    uint32_t                    mHeight = 0;        // Vertical pixel count in the buffers
-    uint32_t                    mFormat = 0;        // Values from android_pixel_format_t [TODO: YUV?  Leave opaque?]
-    uint32_t                    mUsage  = 0;        // Values from from Gralloc.h
-    uint32_t                    mStride = 0;        // Bytes per line in the buffers
-
-    sp<IEvsCameraStream>        mStream = nullptr;  // The callback used to deliver each frame
-
-    struct BufferRecord {
-        buffer_handle_t     handle;
-        bool                inUse;
-        explicit BufferRecord(buffer_handle_t h) : handle(h), inUse(false) {};
-    };
-    std::vector<BufferRecord>   mBuffers;           // Graphics buffers to transfer images
-    unsigned                    mFramesAllowed;     // How many buffers are we currently using
-    unsigned                    mFramesInUse;       // How many buffers are currently outstanding
-
-    enum StreamStateValues {
-        STOPPED,
-        RUNNING,
-        STOPPING,
-    };
-    StreamStateValues           mStreamState;
-
-    // Syncrhonization necessary to deconflict mCaptureThread from the main service thread
-    std::mutex                  mAccessLock;
-};
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace evs
-} // namespace hardware
-} // namespace android
-
-#endif  // ANDROID_HARDWARE_EVS_V1_0_EVSCAMERA_H
diff --git a/evs/1.0/default/android.hardware.evs@1.0-service.rc b/evs/1.0/default/android.hardware.evs@1.0-service.rc
deleted file mode 100644
index bb38668..0000000
--- a/evs/1.0/default/android.hardware.evs@1.0-service.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-service evs-hal-1-0 /vendor/bin/hw/android.hardware.evs@1.0-service
-    class hal
-    user cameraserver
-    group camera
diff --git a/evs/Android.bp b/evs/Android.bp
deleted file mode 100644
index ba90f2c..0000000
--- a/evs/Android.bp
+++ /dev/null
@@ -1,5 +0,0 @@
-// This is an autogenerated file, do not edit.
-subdirs = [
-    "1.0",
-    "1.0/default",
-]
diff --git a/gatekeeper/1.0/default/Android.mk b/gatekeeper/1.0/default/Android.mk
index 94dc1ea..d084535 100644
--- a/gatekeeper/1.0/default/Android.mk
+++ b/gatekeeper/1.0/default/Android.mk
@@ -14,7 +14,6 @@
     libhardware \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     liblog \
 
@@ -35,7 +34,6 @@
     libhardware \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     liblog \
 
diff --git a/gatekeeper/1.0/default/service.cpp b/gatekeeper/1.0/default/service.cpp
index 407cf71..5cbdafb 100644
--- a/gatekeeper/1.0/default/service.cpp
+++ b/gatekeeper/1.0/default/service.cpp
@@ -24,5 +24,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IGatekeeper>("gatekeeper");
+    return defaultPassthroughServiceImplementation<IGatekeeper>();
 }
diff --git a/gatekeeper/1.0/vts/Gatekeeper.vts b/gatekeeper/1.0/vts/Gatekeeper.vts
deleted file mode 100644
index 9e63488..0000000
--- a/gatekeeper/1.0/vts/Gatekeeper.vts
+++ /dev/null
@@ -1,94 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IGatekeeper"
-
-package: "android.hardware.gatekeeper"
-
-import: "android.hardware.gatekeeper@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "enroll"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "verify"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "deleteUser"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "deleteAllUsers"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
-        }
-    }
-
-}
diff --git a/gatekeeper/1.0/vts/functional/Android.bp b/gatekeeper/1.0/vts/functional/Android.bp
index 70a85c6..70cb615 100644
--- a/gatekeeper/1.0/vts/functional/Android.bp
+++ b/gatekeeper/1.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "gatekeeper_hidl_hal_test",
-    gtest: true,
-    srcs: ["gatekeeper_hidl_hal_test.cpp"],
+    name: "VtsHalGatekeeperV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGatekeeperV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.gatekeeper@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/gatekeeper/1.0/vts/functional/gatekeeper_hidl_hal_test.cpp b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
similarity index 91%
rename from gatekeeper/1.0/vts/functional/gatekeeper_hidl_hal_test.cpp
rename to gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
index 67b4482..391dea0 100644
--- a/gatekeeper/1.0/vts/functional/gatekeeper_hidl_hal_test.cpp
+++ b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
@@ -30,7 +30,7 @@
 #include <android/hardware/gatekeeper/1.0/IGatekeeper.h>
 #include <android/hardware/gatekeeper/1.0/types.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
@@ -76,7 +76,7 @@
 }
 
 // The main test class for Gatekeeper HIDL HAL.
-class GatekeeperHidlTest : public ::testing::Test {
+class GatekeeperHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  protected:
   void setUid(uint32_t uid) { uid_ = uid; }
 
@@ -187,7 +187,7 @@
   GatekeeperHidlTest() : uid_(0) {}
   virtual void SetUp() override {
     GatekeeperResponse rsp;
-    gatekeeper_ = IGatekeeper::getService("gatekeeper");
+    gatekeeper_ = ::testing::VtsHalHidlTargetTestBase::getService<IGatekeeper>();
     ASSERT_NE(nullptr, gatekeeper_.get());
     doDeleteAllUsers(rsp);
   }
@@ -281,7 +281,6 @@
  */
 TEST_F(GatekeeperHidlTest, UntrustedReenroll) {
   GatekeeperResponse enrollRsp;
-  GatekeeperRequest reenrollReq;
   GatekeeperResponse reenrollRsp;
   GatekeeperResponse verifyRsp;
   GatekeeperResponse reenrollVerifyRsp;
@@ -349,6 +348,37 @@
 }
 
 /**
+ * Ensure we can not delete a user that does not exist
+ */
+TEST_F(GatekeeperHidlTest, DeleteInvalidUserTest) {
+  hidl_vec<uint8_t> password;
+  GatekeeperResponse enrollRsp;
+  GatekeeperResponse verifyRsp;
+  GatekeeperResponse delRsp1;
+  GatekeeperResponse delRsp2;
+  ALOGI("Testing deleteUser (expected failure)");
+  setUid(10002);
+  generatePassword(password, 0);
+  enrollNewPassword(password, enrollRsp, true);
+  verifyPassword(password, enrollRsp.data, 0, verifyRsp, true);
+  ALOGI("Enroll+Verify done");
+
+  // Delete the user
+  doDeleteUser(delRsp1);
+  EXPECT_EQ(UINT32_C(0), delRsp1.data.size());
+  EXPECT_TRUE(delRsp1.code == GatekeeperStatusCode::ERROR_NOT_IMPLEMENTED ||
+              delRsp1.code == GatekeeperStatusCode::STATUS_OK);
+
+  // Delete the user again
+  doDeleteUser(delRsp2);
+  EXPECT_EQ(UINT32_C(0), delRsp2.data.size());
+  EXPECT_TRUE(delRsp2.code == GatekeeperStatusCode::ERROR_NOT_IMPLEMENTED ||
+              delRsp2.code == GatekeeperStatusCode::ERROR_GENERAL_FAILURE);
+  ALOGI("DeleteUser done");
+  ALOGI("Testing deleteUser done: rsp=%" PRIi32, delRsp2.code);
+}
+
+/**
  * Ensure we can not verify passwords after we enrolled them and then deleted
  * all users
  */
diff --git a/gatekeeper/1.0/vts/types.vts b/gatekeeper/1.0/vts/types.vts
deleted file mode 100644
index 3de9a14..0000000
--- a/gatekeeper/1.0/vts/types.vts
+++ /dev/null
@@ -1,59 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.gatekeeper"
-
-
-attribute: {
-    name: "::android::hardware::gatekeeper::V1_0::GatekeeperStatusCode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STATUS_REENROLL"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "STATUS_OK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ERROR_GENERAL_FAILURE"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "ERROR_RETRY_TIMEOUT"
-        scalar_value: {
-            int32_t: -2
-        }
-        enumerator: "ERROR_NOT_IMPLEMENTED"
-        scalar_value: {
-            int32_t: -3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "code"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperStatusCode"
-    }
-    struct_value: {
-        name: "timeout"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "data"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
diff --git a/gnss/1.0/default/AGnss.cpp b/gnss/1.0/default/AGnss.cpp
index 52fdc26..29c6ddd 100644
--- a/gnss/1.0/default/AGnss.cpp
+++ b/gnss/1.0/default/AGnss.cpp
@@ -41,6 +41,7 @@
 
 AGnss::~AGnss() {
     sThreadFuncArgsList.clear();
+    sInterfaceExists = false;
 }
 
 void AGnss::statusCb(AGpsStatus* status) {
@@ -78,7 +79,10 @@
                     /*
                      * Callback to client with agnssStatusIpV4Cb.
                      */
-                    sAGnssCbIface->agnssStatusIpV4Cb(aGnssStatusIpV4);
+                    auto ret = sAGnssCbIface->agnssStatusIpV4Cb(aGnssStatusIpV4);
+                    if (!ret.isOk()) {
+                        ALOGE("%s: Unable to invoke callback", __func__);
+                    }
                     break;
                 }
             case AF_INET6:
@@ -96,7 +100,10 @@
                             &(status->addr));
                     memcpy(&(aGnssStatusIpV6.ipV6Addr[0]), in6->sin6_addr.s6_addr,
                            aGnssStatusIpV6.ipV6Addr.size());
-                    sAGnssCbIface->agnssStatusIpV6Cb(aGnssStatusIpV6);
+                    auto ret = sAGnssCbIface->agnssStatusIpV6Cb(aGnssStatusIpV6);
+                    if (!ret.isOk()) {
+                        ALOGE("%s: Unable to invoke callback", __func__);
+                    }
                     break;
                 }
              default:
@@ -117,7 +124,10 @@
         /*
          * Callback to client with agnssStatusIpV4Cb.
          */
-        sAGnssCbIface->agnssStatusIpV4Cb(aGnssStatusIpV4);
+        auto ret = sAGnssCbIface->agnssStatusIpV4Cb(aGnssStatusIpV4);
+        if (!ret.isOk()) {
+            ALOGE("%s: Unable to invoke callback", __func__);
+        }
     } else {
         ALOGE("%s: Invalid size for AGPS Status", __func__);
     }
diff --git a/gnss/1.0/default/AGnssRil.cpp b/gnss/1.0/default/AGnssRil.cpp
index 480571d..1458327 100644
--- a/gnss/1.0/default/AGnssRil.cpp
+++ b/gnss/1.0/default/AGnssRil.cpp
@@ -42,6 +42,7 @@
 
 AGnssRil::~AGnssRil() {
     sThreadFuncArgsList.clear();
+    sInterfaceExists = false;
 }
 
 void AGnssRil::requestSetId(uint32_t flags) {
@@ -50,7 +51,10 @@
         return;
     }
 
-    sAGnssRilCbIface->requestSetIdCb(flags);
+    auto ret = sAGnssRilCbIface->requestSetIdCb(flags);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void AGnssRil::requestRefLoc(uint32_t /*flags*/) {
@@ -59,7 +63,10 @@
         return;
     }
 
-    sAGnssRilCbIface->requestRefLocCb();
+    auto ret = sAGnssRilCbIface->requestRefLocCb();
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 pthread_t AGnssRil::createThreadCb(const char* name, void (*start)(void*), void* arg) {
diff --git a/gnss/1.0/default/Android.mk b/gnss/1.0/default/Android.mk
index 73889b5..5ad5e50 100644
--- a/gnss/1.0/default/Android.mk
+++ b/gnss/1.0/default/Android.mk
@@ -23,11 +23,12 @@
     liblog \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     android.hardware.gnss@1.0 \
     libhardware
 
+LOCAL_CFLAGS += -Werror
+
 include $(BUILD_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -48,7 +49,6 @@
     libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-    libhwbinder \
     libhidlbase \
     libhidltransport \
     android.hardware.gnss@1.0 \
diff --git a/gnss/1.0/default/Gnss.cpp b/gnss/1.0/default/Gnss.cpp
index a2a99a0..9493737 100644
--- a/gnss/1.0/default/Gnss.cpp
+++ b/gnss/1.0/default/Gnss.cpp
@@ -60,6 +60,7 @@
 }
 
 Gnss::~Gnss() {
+    sInterfaceExists = false;
     sThreadFuncArgsList.clear();
 }
 
@@ -75,7 +76,10 @@
     }
 
     android::hardware::gnss::V1_0::GnssLocation gnssLocation = convertToGnssLocation(location);
-    sGnssCbIface->gnssLocationCb(gnssLocation);
+    auto ret = sGnssCbIface->gnssLocationCb(gnssLocation);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void Gnss::statusCb(GpsStatus* gnssStatus) {
@@ -92,7 +96,10 @@
     IGnssCallback::GnssStatusValue status =
             static_cast<IGnssCallback::GnssStatusValue>(gnssStatus->status);
 
-    sGnssCbIface->gnssStatusCb(status);
+    auto ret = sGnssCbIface->gnssStatusCb(status);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void Gnss::gnssSvStatusCb(GnssSvStatus* status) {
@@ -131,7 +138,10 @@
         svStatus.gnssSvList[i] = gnssSvInfo;
     }
 
-    sGnssCbIface->gnssSvStatusCb(svStatus);
+    auto ret = sGnssCbIface->gnssSvStatusCb(svStatus);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 /*
@@ -231,7 +241,10 @@
         }
     }
 
-    sGnssCbIface->gnssSvStatusCb(svStatus);
+    auto ret = sGnssCbIface->gnssSvStatusCb(svStatus);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void Gnss::nmeaCb(GpsUtcTime timestamp, const char* nmea, int length) {
@@ -242,7 +255,10 @@
 
     android::hardware::hidl_string nmeaString;
     nmeaString.setToExternal(nmea, length);
-    sGnssCbIface->gnssNmeaCb(timestamp, nmeaString);
+    auto ret = sGnssCbIface->gnssNmeaCb(timestamp, nmeaString);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void Gnss::setCapabilitiesCb(uint32_t capabilities) {
@@ -251,7 +267,10 @@
         return;
     }
 
-    sGnssCbIface->gnssSetCapabilitesCb(capabilities);
+    auto ret = sGnssCbIface->gnssSetCapabilitesCb(capabilities);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void Gnss::acquireWakelockCb() {
@@ -298,7 +317,10 @@
             ALOGI("%s: GNSS HAL Wakelock acquired due to gps: %d, fused: %d", __func__,
                     sWakelockHeldGnss, sWakelockHeldFused);
             sWakelockHeld = true;
-            sGnssCbIface->gnssAcquireWakelockCb();
+            auto ret = sGnssCbIface->gnssAcquireWakelockCb();
+            if (!ret.isOk()) {
+                ALOGE("%s: Unable to invoke callback", __func__);
+            }
         }
     } else {
         if (sWakelockHeld) {
@@ -309,7 +331,10 @@
             ALOGW("%s: GNSS HAL Wakelock released, duplicate request", __func__);
         }
         sWakelockHeld = false;
-        sGnssCbIface->gnssReleaseWakelockCb();
+        auto ret = sGnssCbIface->gnssReleaseWakelockCb();
+        if (!ret.isOk()) {
+            ALOGE("%s: Unable to invoke callback", __func__);
+        }
     }
 }
 
@@ -319,7 +344,10 @@
         return;
     }
 
-    sGnssCbIface->gnssRequestTimeCb();
+    auto ret = sGnssCbIface->gnssRequestTimeCb();
+    if (!ret.isOk()) {
+            ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 pthread_t Gnss::createThreadCb(const char* name, void (*start)(void*), void* arg) {
@@ -341,7 +369,10 @@
         .yearOfHw = info->year_of_hw
     };
 
-    sGnssCbIface->gnssSetSystemInfoCb(gnssInfo);
+    auto ret = sGnssCbIface->gnssSetSystemInfoCb(gnssInfo);
+    if (!ret.isOk()) {
+            ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 
@@ -434,7 +465,10 @@
 Return<sp<IAGnssRil>> Gnss::getExtensionAGnssRil()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssRil == nullptr) {
         const AGpsRilInterface* agpsRilIface = static_cast<const AGpsRilInterface*>(
                 mGnssIface->get_extension(AGPS_RIL_INTERFACE));
         if (agpsRilIface == nullptr) {
@@ -449,7 +483,10 @@
 Return<sp<IGnssConfiguration>> Gnss::getExtensionGnssConfiguration()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssConfig == nullptr) {
         const GnssConfigurationInterface* gnssConfigIface =
                 static_cast<const GnssConfigurationInterface*>(
                         mGnssIface->get_extension(GNSS_CONFIGURATION_INTERFACE));
@@ -462,10 +499,14 @@
     }
     return mGnssConfig;
 }
+
 Return<sp<IGnssGeofencing>> Gnss::getExtensionGnssGeofencing()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssGeofencingIface == nullptr) {
         const GpsGeofencingInterface* gpsGeofencingIface =
                 static_cast<const GpsGeofencingInterface*>(
                         mGnssIface->get_extension(GPS_GEOFENCING_INTERFACE));
@@ -483,7 +524,10 @@
 Return<sp<IAGnss>> Gnss::getExtensionAGnss()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mAGnssIface == nullptr) {
         const AGpsInterface* agpsIface = static_cast<const AGpsInterface*>(
                 mGnssIface->get_extension(AGPS_INTERFACE));
         if (agpsIface == nullptr) {
@@ -498,7 +542,10 @@
 Return<sp<IGnssNi>> Gnss::getExtensionGnssNi()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssNi == nullptr) {
         const GpsNiInterface* gpsNiIface = static_cast<const GpsNiInterface*>(
                 mGnssIface->get_extension(GPS_NI_INTERFACE));
         if (gpsNiIface == nullptr) {
@@ -513,7 +560,10 @@
 Return<sp<IGnssMeasurement>> Gnss::getExtensionGnssMeasurement() {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssMeasurement == nullptr) {
         const GpsMeasurementInterface* gpsMeasurementIface =
                 static_cast<const GpsMeasurementInterface*>(
                         mGnssIface->get_extension(GPS_MEASUREMENT_INTERFACE));
@@ -530,7 +580,10 @@
 Return<sp<IGnssNavigationMessage>> Gnss::getExtensionGnssNavigationMessage() {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssNavigationMessage == nullptr) {
         const GpsNavigationMessageInterface* gpsNavigationMessageIface =
                 static_cast<const GpsNavigationMessageInterface*>(
                         mGnssIface->get_extension(GPS_NAVIGATION_MESSAGE_INTERFACE));
@@ -549,7 +602,10 @@
 Return<sp<IGnssXtra>> Gnss::getExtensionXtra()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssXtraIface == nullptr) {
         const GpsXtraInterface* gpsXtraIface = static_cast<const GpsXtraInterface*>(
                 mGnssIface->get_extension(GPS_XTRA_INTERFACE));
 
@@ -566,7 +622,10 @@
 Return<sp<IGnssDebug>> Gnss::getExtensionGnssDebug()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssDebug == nullptr) {
         const GpsDebugInterface* gpsDebugIface = static_cast<const GpsDebugInterface*>(
                 mGnssIface->get_extension(GPS_DEBUG_INTERFACE));
 
@@ -583,7 +642,10 @@
 Return<sp<IGnssBatching>> Gnss::getExtensionGnssBatching()  {
     if (mGnssIface == nullptr) {
         ALOGE("%s: Gnss interface is unavailable", __func__);
-    } else {
+        return nullptr;
+    }
+
+    if (mGnssBatching == nullptr) {
         hw_module_t* module;
         const FlpLocationInterface* flpLocationIface = nullptr;
         int err = hw_get_module(FUSED_LOCATION_HARDWARE_MODULE_ID, (hw_module_t const**)&module);
@@ -614,7 +676,7 @@
     return mGnssBatching;
 }
 
-IGnss* HIDL_FETCH_IGnss(const char* hal) {
+IGnss* HIDL_FETCH_IGnss(const char* /* hal */) {
     hw_module_t* module;
     IGnss* iface = nullptr;
     int err = hw_get_module(GPS_HARDWARE_MODULE_ID, (hw_module_t const**)&module);
@@ -625,10 +687,10 @@
         if (err == 0) {
             iface = new Gnss(reinterpret_cast<gps_device_t*>(device));
         } else {
-            ALOGE("gnssDevice open %s failed: %d", hal, err);
+            ALOGE("gnssDevice open %s failed: %d", GPS_HARDWARE_MODULE_ID, err);
         }
     } else {
-      ALOGE("gnss hw_get_module %s failed: %d", hal, err);
+      ALOGE("gnss hw_get_module %s failed: %d", GPS_HARDWARE_MODULE_ID, err);
     }
     return iface;
 }
diff --git a/gnss/1.0/default/GnssBatching.cpp b/gnss/1.0/default/GnssBatching.cpp
index 95c5e60..02b38cb 100644
--- a/gnss/1.0/default/GnssBatching.cpp
+++ b/gnss/1.0/default/GnssBatching.cpp
@@ -103,7 +103,10 @@
         gnssLocations.push_back(convertToGnssLocation(locations[iLocation]));
     }
 
-    sGnssBatchingCbIface->gnssLocationBatchCb(gnssLocations);
+    auto ret = sGnssBatchingCbIface->gnssLocationBatchCb(gnssLocations);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void GnssBatching::acquireWakelockCb() {
@@ -115,7 +118,7 @@
 }
 
 // this can just return success, because threads are now set up on demand in the jni layer
-int32_t GnssBatching::setThreadEventCb(ThreadEvent event) {
+int32_t GnssBatching::setThreadEventCb(ThreadEvent /*event*/) {
     return FLP_RESULT_SUCCESS;
 }
 
diff --git a/gnss/1.0/default/GnssGeofencing.cpp b/gnss/1.0/default/GnssGeofencing.cpp
index f42de42..54c4aaa 100644
--- a/gnss/1.0/default/GnssGeofencing.cpp
+++ b/gnss/1.0/default/GnssGeofencing.cpp
@@ -48,6 +48,7 @@
 
 GnssGeofencing::~GnssGeofencing() {
     sThreadFuncArgsList.clear();
+    sInterfaceExists = false;
 }
 void GnssGeofencing::gnssGfTransitionCb(int32_t geofenceId,
                                         GpsLocation* location,
@@ -64,11 +65,14 @@
     }
 
     GnssLocation gnssLocation = convertToGnssLocation(location);
-    mGnssGeofencingCbIface->gnssGeofenceTransitionCb(
+    auto ret = mGnssGeofencingCbIface->gnssGeofenceTransitionCb(
             geofenceId,
             gnssLocation,
             static_cast<IGnssGeofenceCallback::GeofenceTransition>(transition),
             timestamp);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void GnssGeofencing::gnssGfStatusCb(int32_t status, GpsLocation* location) {
@@ -85,8 +89,11 @@
         gnssLocation = {};
     }
 
-    mGnssGeofencingCbIface->gnssGeofenceStatusCb(
+    auto ret = mGnssGeofencingCbIface->gnssGeofenceStatusCb(
             static_cast<IGnssGeofenceCallback::GeofenceAvailability>(status), gnssLocation);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void GnssGeofencing::gnssGfAddCb(int32_t geofenceId, int32_t status) {
@@ -95,8 +102,11 @@
         return;
     }
 
-    mGnssGeofencingCbIface->gnssGeofenceAddCb(
+    auto ret = mGnssGeofencingCbIface->gnssGeofenceAddCb(
             geofenceId, static_cast<IGnssGeofenceCallback::GeofenceStatus>(status));
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void GnssGeofencing::gnssGfRemoveCb(int32_t geofenceId, int32_t status) {
@@ -105,8 +115,11 @@
         return;
     }
 
-    mGnssGeofencingCbIface->gnssGeofenceRemoveCb(
-      geofenceId, static_cast<IGnssGeofenceCallback::GeofenceStatus>(status));
+    auto ret = mGnssGeofencingCbIface->gnssGeofenceRemoveCb(
+            geofenceId, static_cast<IGnssGeofenceCallback::GeofenceStatus>(status));
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void GnssGeofencing::gnssGfPauseCb(int32_t geofenceId, int32_t status) {
@@ -115,8 +128,11 @@
         return;
     }
 
-    mGnssGeofencingCbIface->gnssGeofencePauseCb(
+    auto ret = mGnssGeofencingCbIface->gnssGeofencePauseCb(
             geofenceId, static_cast<IGnssGeofenceCallback::GeofenceStatus>(status));
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 void GnssGeofencing::gnssGfResumeCb(int32_t geofenceId, int32_t status) {
@@ -125,8 +141,11 @@
         return;
     }
 
-    mGnssGeofencingCbIface->gnssGeofenceResumeCb(
+    auto ret = mGnssGeofencingCbIface->gnssGeofenceResumeCb(
             geofenceId, static_cast<IGnssGeofenceCallback::GeofenceStatus>(status));
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 pthread_t GnssGeofencing::createThreadCb(const char* name, void (*start)(void*), void* arg) {
diff --git a/gnss/1.0/default/GnssMeasurement.cpp b/gnss/1.0/default/GnssMeasurement.cpp
index 67f6d8d..6c9b838 100644
--- a/gnss/1.0/default/GnssMeasurement.cpp
+++ b/gnss/1.0/default/GnssMeasurement.cpp
@@ -96,7 +96,10 @@
         .hwClockDiscontinuityCount = clockVal.hw_clock_discontinuity_count
     };
 
-    sGnssMeasureCbIface->GnssMeasurementCb(gnssData);
+    auto ret = sGnssMeasureCbIface->GnssMeasurementCb(gnssData);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 /*
@@ -223,7 +226,10 @@
     gnssData.clock.driftUncertaintyNsps = clockVal.drift_uncertainty_nsps;
     gnssData.clock.gnssClockFlags = clockVal.flags;
 
-    sGnssMeasureCbIface->GnssMeasurementCb(gnssData);
+    auto ret = sGnssMeasureCbIface->GnssMeasurementCb(gnssData);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 // Methods from ::android::hardware::gnss::V1_0::IGnssMeasurement follow.
diff --git a/gnss/1.0/default/GnssNavigationMessage.cpp b/gnss/1.0/default/GnssNavigationMessage.cpp
index c98abf6..6f509d0 100644
--- a/gnss/1.0/default/GnssNavigationMessage.cpp
+++ b/gnss/1.0/default/GnssNavigationMessage.cpp
@@ -59,7 +59,10 @@
     navigationMsg.submessageId = message->submessage_id;
     navigationMsg.data.setToExternal(message->data, message->data_length);
 
-    sGnssNavigationMsgCbIface->gnssNavigationMessageCb(navigationMsg);
+    auto ret = sGnssNavigationMsgCbIface->gnssNavigationMessageCb(navigationMsg);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 // Methods from ::android::hardware::gnss::V1_0::IGnssNavigationMessage follow.
diff --git a/gnss/1.0/default/GnssNi.cpp b/gnss/1.0/default/GnssNi.cpp
index ec57e8c..d17891d 100644
--- a/gnss/1.0/default/GnssNi.cpp
+++ b/gnss/1.0/default/GnssNi.cpp
@@ -41,6 +41,7 @@
 
 GnssNi::~GnssNi() {
     sThreadFuncArgsList.clear();
+    sInterfaceExists = false;
 }
 
 pthread_t GnssNi::createThreadCb(const char* name, void (*start)(void*), void* arg) {
@@ -73,7 +74,10 @@
                 static_cast<IGnssNiCallback::GnssNiEncodingType>(notification->text_encoding)
     };
 
-    sGnssNiCbIface->niNotifyCb(notificationGnss);
+    auto ret = sGnssNiCbIface->niNotifyCb(notificationGnss);
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 // Methods from ::android::hardware::gnss::V1_0::IGnssNi follow.
diff --git a/gnss/1.0/default/GnssXtra.cpp b/gnss/1.0/default/GnssXtra.cpp
index 065bb33..d124ce1 100644
--- a/gnss/1.0/default/GnssXtra.cpp
+++ b/gnss/1.0/default/GnssXtra.cpp
@@ -35,6 +35,7 @@
 
 GnssXtra::~GnssXtra() {
     sThreadFuncArgsList.clear();
+    sInterfaceExists = false;
 }
 
 pthread_t GnssXtra::createThreadCb(const char* name, void (*start)(void*), void* arg) {
@@ -53,7 +54,10 @@
         return;
     }
 
-    sGnssXtraCbIface->downloadRequestCb();
+    auto ret = sGnssXtraCbIface->downloadRequestCb();
+    if (!ret.isOk()) {
+        ALOGE("%s: Unable to invoke callback", __func__);
+    }
 }
 
 // Methods from ::android::hardware::gnss::V1_0::IGnssXtra follow.
diff --git a/gnss/1.0/default/android.hardware.gnss@1.0-service.rc b/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
index cf44944..f1116f4 100644
--- a/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
+++ b/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
@@ -1,4 +1,7 @@
 service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service
     class main
     user system
-    group system
+#
+# TODO:(b/35757613) - STOPSHIP - HAL cannot have direct inet access
+#
+    group system inet
diff --git a/gnss/1.0/default/service.cpp b/gnss/1.0/default/service.cpp
index 4e040c5..5a8acc1 100644
--- a/gnss/1.0/default/service.cpp
+++ b/gnss/1.0/default/service.cpp
@@ -8,5 +8,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IGnss>("gnss");
+    return defaultPassthroughServiceImplementation<IGnss>();
 }
diff --git a/gnss/1.0/vts/functional/Android.bp b/gnss/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..6d96059
--- /dev/null
+++ b/gnss/1.0/vts/functional/Android.bp
@@ -0,0 +1,36 @@
+//
+// 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.
+//
+
+cc_test {
+    name: "VtsHalGnssV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGnssV1_0TargetTest.cpp"],
+    shared_libs: [
+        "android.hardware.gnss@1.0",
+        "libbase",
+        "libcutils",
+        "libhidlbase",
+        "libhidltransport",
+        "liblog",
+        "libnativehelper",
+        "libutils",
+    ],
+    static_libs: ["VtsHalHidlTargetTestBase"],
+    cflags: [
+        "-O0",
+        "-g",
+    ],
+}
\ No newline at end of file
diff --git a/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
new file mode 100644
index 0000000..8f131cf
--- /dev/null
+++ b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
@@ -0,0 +1,279 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "VtsHalGnssV1_0TargetTest"
+#include <android/hardware/gnss/1.0/IGnss.h>
+#include <android/log.h>
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+using android::hardware::Return;
+using android::hardware::Void;
+
+using android::hardware::gnss::V1_0::GnssLocation;
+using android::hardware::gnss::V1_0::GnssLocationFlags;
+using android::hardware::gnss::V1_0::IGnss;
+using android::hardware::gnss::V1_0::IGnssCallback;
+using android::sp;
+
+#define TIMEOUT_SECONDS 5  // for basic commands/responses
+
+// The main test class for GNSS HAL.
+class GnssHalTest : public ::testing::VtsHalHidlTargetTestBase {
+ public:
+  virtual void SetUp() override {
+    /* TODO(b/35678469): Setup the init.rc for VTS such that there's a
+     * single caller
+     * to the GNSS HAL - as part of confirming that the info & capabilities
+     * callbacks trigger.
+     */
+
+    gnss_hal_ = ::testing::VtsHalHidlTargetTestBase::getService<IGnss>();
+    ASSERT_NE(gnss_hal_, nullptr);
+
+    gnss_cb_ = new GnssCallback(*this);
+    ASSERT_NE(gnss_cb_, nullptr);
+
+    auto result = gnss_hal_->setCallback(gnss_cb_);
+    if (!result.isOk()) {
+      ALOGE("result of failed callback set %s", result.description().c_str());
+    }
+
+    ASSERT_TRUE(result.isOk());
+    ASSERT_TRUE(result);
+
+    /* TODO(b/35678469): Implement the capabilities & info (year) checks &
+     * value store here.
+     */
+  }
+
+  virtual void TearDown() override {
+    if (gnss_hal_ != nullptr) {
+      gnss_hal_->cleanup();
+    }
+  }
+
+  /* Used as a mechanism to inform the test that a callback has occurred */
+  inline void notify() {
+    std::unique_lock<std::mutex> lock(mtx_);
+    count++;
+    cv_.notify_one();
+  }
+
+  /* Test code calls this function to wait for a callback */
+  inline std::cv_status wait(int timeoutSeconds) {
+    std::unique_lock<std::mutex> lock(mtx_);
+
+    std::cv_status status = std::cv_status::no_timeout;
+    auto now = std::chrono::system_clock::now();
+    while (count == 0) {
+      status = cv_.wait_until(lock, now + std::chrono::seconds(timeoutSeconds));
+      if (status == std::cv_status::timeout) return status;
+    }
+    count--;
+    return status;
+  }
+
+  /* Callback class for data & Event. */
+  class GnssCallback : public IGnssCallback {
+    GnssHalTest& parent_;
+
+   public:
+    GnssCallback(GnssHalTest& parent) : parent_(parent){};
+
+    virtual ~GnssCallback() = default;
+
+    // Dummy callback handlers
+    Return<void> gnssStatusCb(
+        const IGnssCallback::GnssStatusValue /* status */) override {
+      return Void();
+    }
+    Return<void> gnssSvStatusCb(
+        const IGnssCallback::GnssSvStatus& /* svStatus */) override {
+      return Void();
+    }
+    Return<void> gnssNmeaCb(
+        int64_t /* timestamp */,
+        const android::hardware::hidl_string& /* nmea */) override {
+      return Void();
+    }
+    Return<void> gnssAcquireWakelockCb() override { return Void(); }
+    Return<void> gnssReleaseWakelockCb() override { return Void(); }
+    Return<void> gnssRequestTimeCb() override { return Void(); }
+
+    // Actual (test) callback handlers
+    Return<void> gnssLocationCb(const GnssLocation& location) override {
+      ALOGI("Location received");
+      parent_.location_called_count_++;
+      parent_.last_location_ = location;
+      parent_.notify();
+      return Void();
+    }
+
+    Return<void> gnssSetCapabilitesCb(uint32_t capabilities) override {
+      ALOGI("Capabilities received %d", capabilities);
+      parent_.capabilities_called_count_++;
+      parent_.last_capabilities_ = capabilities;
+      parent_.notify();
+      return Void();
+    }
+
+    Return<void> gnssSetSystemInfoCb(
+        const IGnssCallback::GnssSystemInfo& info) override {
+      ALOGI("Info received, year %d", info.yearOfHw);
+      parent_.info_called_count_++;
+      parent_.last_info_ = info;
+      parent_.notify();
+      return Void();
+    }
+  };
+
+  sp<IGnss> gnss_hal_;         // GNSS HAL to call into
+  sp<IGnssCallback> gnss_cb_;  // Primary callback interface
+
+  /* Count of calls to set the following items, and the latest item (used by
+   * test.)
+   */
+  int capabilities_called_count_;
+  uint32_t last_capabilities_;
+
+  int location_called_count_;
+  GnssLocation last_location_;
+
+  int info_called_count_;
+  IGnssCallback::GnssSystemInfo last_info_;
+
+ private:
+  std::mutex mtx_;
+  std::condition_variable cv_;
+  int count;
+};
+
+/*
+ * SetCallbackCapabilitiesCleanup:
+ * Sets up the callback, awaits the capabilities, and calls cleanup
+ *
+ * Since this is just the basic operation of SetUp() and TearDown(),
+ * the function definition is intentionally kept empty
+ */
+TEST_F(GnssHalTest, SetCallbackCapabilitiesCleanup) {}
+
+void CheckLocation(GnssLocation& location) {
+  EXPECT_TRUE(location.gnssLocationFlags & GnssLocationFlags::HAS_LAT_LONG);
+  EXPECT_TRUE(location.gnssLocationFlags & GnssLocationFlags::HAS_ALTITUDE);
+  EXPECT_TRUE(location.gnssLocationFlags & GnssLocationFlags::HAS_SPEED);
+  EXPECT_TRUE(location.gnssLocationFlags &
+              GnssLocationFlags::HAS_HORIZONTAL_ACCURACY);
+  EXPECT_GE(location.latitudeDegrees, -90.0);
+  EXPECT_LE(location.latitudeDegrees, 90.0);
+  EXPECT_GE(location.longitudeDegrees, -180.0);
+  EXPECT_LE(location.longitudeDegrees, 180.0);
+  EXPECT_GE(location.altitudeMeters, -1000.0);
+  EXPECT_LE(location.altitudeMeters, 30000.0);
+  EXPECT_GE(location.speedMetersPerSec, 0.0);
+  EXPECT_LE(location.speedMetersPerSec, 5.0);  // VTS tests are stationary.
+
+  /*
+   * Tolerating some especially high values for accuracy estimate, in case of
+   * first fix with especially poor geoemtry (happens occasionally)
+   */
+  EXPECT_GT(location.horizontalAccuracyMeters, 0.0);
+  EXPECT_LE(location.horizontalAccuracyMeters, 200.0);
+
+  /*
+   * Some devices may define bearing as -180 to +180, others as 0 to 360.
+   * Both are okay & understandable.
+   */
+  if (location.gnssLocationFlags & GnssLocationFlags::HAS_BEARING) {
+    EXPECT_GE(location.bearingDegrees, -180.0);
+    EXPECT_LE(location.bearingDegrees, 360.0);
+  }
+  if (location.gnssLocationFlags & GnssLocationFlags::HAS_VERTICAL_ACCURACY) {
+    EXPECT_GT(location.verticalAccuracyMeters, 0.0);
+    EXPECT_LE(location.verticalAccuracyMeters, 500.0);
+  }
+  if (location.gnssLocationFlags & GnssLocationFlags::HAS_SPEED_ACCURACY) {
+    EXPECT_GT(location.speedAccuracyMetersPerSecond, 0.0);
+    EXPECT_LE(location.speedAccuracyMetersPerSecond, 50.0);
+  }
+  if (location.gnssLocationFlags & GnssLocationFlags::HAS_BEARING_ACCURACY) {
+    EXPECT_GT(location.bearingAccuracyDegrees, 0.0);
+    EXPECT_LE(location.bearingAccuracyDegrees, 360.0);
+  }
+
+  // Check timestamp > 1.48e12 (47 years in msec - 1970->2017+)
+  EXPECT_GT(location.timestamp, 1.48e12);
+
+  /* TODO(b/35678469): Check if the hardware year is 2017+, and if so,
+   * that bearing, plus vertical, speed & bearing accuracy are present.
+   * And allow bearing to be not present, only if associated with a speed of 0.0
+   */
+}
+
+/*
+ * GetLocation:
+ * Turns on location, waits 45 second for at least 5 locations,
+ * and checks them for reasonable validity.
+ */
+TEST_F(GnssHalTest, GetLocation) {
+#define MIN_INTERVAL_MSEC 500
+#define PREFERRED_ACCURACY 0   // Ideally perfect (matches GnssLocationProvider)
+#define PREFERRED_TIME_MSEC 0  // Ideally immediate
+
+#define LOCATION_TIMEOUT_FIRST_SEC 45
+#define LOCATION_TIMEOUT_SUBSEQUENT_SEC 3
+#define LOCATIONS_TO_CHECK 5
+
+  auto result = gnss_hal_->setPositionMode(
+      IGnss::GnssPositionMode::MS_BASED,
+      IGnss::GnssPositionRecurrence::RECURRENCE_PERIODIC, MIN_INTERVAL_MSEC,
+      PREFERRED_ACCURACY, PREFERRED_TIME_MSEC);
+
+  ASSERT_TRUE(result.isOk());
+  ASSERT_TRUE(result);
+
+  result = gnss_hal_->start();
+
+  ASSERT_TRUE(result.isOk());
+  ASSERT_TRUE(result);
+
+  EXPECT_EQ(std::cv_status::no_timeout, wait(LOCATION_TIMEOUT_FIRST_SEC));
+  EXPECT_EQ(location_called_count_, 1);
+  CheckLocation(last_location_);
+
+  for (int i = 1; i < LOCATIONS_TO_CHECK; i++) {
+    EXPECT_EQ(std::cv_status::no_timeout,
+              wait(LOCATION_TIMEOUT_SUBSEQUENT_SEC));
+    EXPECT_EQ(location_called_count_, i + 1);
+    CheckLocation(last_location_);
+  }
+
+  result = gnss_hal_->stop();
+
+  ASSERT_TRUE(result.isOk());
+  ASSERT_TRUE(result);
+}
+
+int main(int argc, char** argv) {
+  ::testing::InitGoogleTest(&argc, argv);
+  int status = RUN_ALL_TESTS();
+  ALOGI("Test result = %d", status);
+  return status;
+}
diff --git a/gnss/Android.bp b/gnss/Android.bp
index bbb3e4b..33f70eb 100644
--- a/gnss/Android.bp
+++ b/gnss/Android.bp
@@ -1,4 +1,5 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
     "1.0",
+    "1.0/vts/functional",
 ]
diff --git a/graphics/allocator/2.0/default/Android.bp b/graphics/allocator/2.0/default/Android.bp
index 315893f..b8d4fde 100644
--- a/graphics/allocator/2.0/default/Android.bp
+++ b/graphics/allocator/2.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.graphics.allocator@2.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Gralloc.cpp"],
@@ -11,7 +12,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libutils",
     ],
@@ -19,6 +19,7 @@
 
 cc_binary {
     name: "android.hardware.graphics.allocator@2.0-service",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["service.cpp"],
@@ -28,7 +29,6 @@
         "android.hardware.graphics.allocator@2.0",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libutils",
     ],
@@ -36,6 +36,7 @@
 
 cc_library_static {
     name: "libgralloc1-adapter",
+    defaults: ["hidl_defaults"],
     srcs: ["gralloc1-adapter.cpp", "Gralloc1On0Adapter.cpp"],
     include_dirs: ["system/core/libsync/include"],
     cflags: ["-Wall", "-Wextra", "-Wno-unused-parameter"],
diff --git a/graphics/allocator/2.0/default/Gralloc.cpp b/graphics/allocator/2.0/default/Gralloc.cpp
index 3a102d1..0b9e863 100644
--- a/graphics/allocator/2.0/default/Gralloc.cpp
+++ b/graphics/allocator/2.0/default/Gralloc.cpp
@@ -131,7 +131,7 @@
 
 void GrallocHal::initCapabilities()
 {
-    uint32_t count;
+    uint32_t count = 0;
     mDevice->getCapabilities(mDevice, &count, nullptr);
 
     std::vector<Capability> caps(count);
diff --git a/graphics/allocator/2.0/default/service.cpp b/graphics/allocator/2.0/default/service.cpp
index 525b342..a43740c 100644
--- a/graphics/allocator/2.0/default/service.cpp
+++ b/graphics/allocator/2.0/default/service.cpp
@@ -24,5 +24,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IAllocator>("gralloc");
+    return defaultPassthroughServiceImplementation<IAllocator>();
 }
diff --git a/graphics/allocator/2.0/vts/Allocator.vts b/graphics/allocator/2.0/vts/Allocator.vts
deleted file mode 100644
index b26876d..0000000
--- a/graphics/allocator/2.0/vts/Allocator.vts
+++ /dev/null
@@ -1,88 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IAllocator"
-
-package: "android.hardware.graphics.allocator"
-
-import: "android.hardware.graphics.allocator@2.0::IAllocatorClient"
-import: "android.hardware.graphics.allocator@2.0::types"
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::graphics::allocator::V2_0::IAllocator::Capability"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "TEST_ALLOCATE"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "LAYERED_BUFFERS"
-            scalar_value: {
-                int32_t: 2
-            }
-        }
-    }
-
-    api: {
-        name: "getCapabilities"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocator::Capability"
-            }
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "dumpDebugInfo"
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "createClient"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-}
diff --git a/graphics/allocator/2.0/vts/AllocatorClient.vts b/graphics/allocator/2.0/vts/AllocatorClient.vts
deleted file mode 100644
index 585c36c..0000000
--- a/graphics/allocator/2.0/vts/AllocatorClient.vts
+++ /dev/null
@@ -1,170 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IAllocatorClient"
-
-package: "android.hardware.graphics.allocator"
-
-import: "android.hardware.graphics.allocator@2.0::types"
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "width"
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        struct_value: {
-            name: "height"
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        struct_value: {
-            name: "layerCount"
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        struct_value: {
-            name: "format"
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
-        }
-        struct_value: {
-            name: "producerUsageMask"
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        struct_value: {
-            name: "consumerUsageMask"
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-    }
-
-    api: {
-        name: "createDescriptor"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "destroyDescriptor"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "testAllocate"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint64_t"
-            }
-        }
-        callflow: {
-            next: "allocate"
-        }
-    }
-
-    api: {
-        name: "allocate"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint64_t"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint64_t"
-            }
-        }
-        callflow: {
-            next: "exportHandle"
-        }
-    }
-
-    api: {
-        name: "free"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "exportHandle"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_HANDLE
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "free"
-        }
-    }
-
-}
diff --git a/graphics/allocator/2.0/vts/functional/Android.bp b/graphics/allocator/2.0/vts/functional/Android.bp
index 2f58836..fb77ab3 100644
--- a/graphics/allocator/2.0/vts/functional/Android.bp
+++ b/graphics/allocator/2.0/vts/functional/Android.bp
@@ -14,23 +14,48 @@
 // limitations under the License.
 //
 
+cc_library_static {
+    name: "libVtsHalGraphicsAllocatorTestUtils",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGraphicsAllocatorTestUtils.cpp"],
+    shared_libs: [
+        "android.hardware.graphics.allocator@2.0",
+    ],
+    static_libs: [
+        "VtsHalHidlTargetTestBase",
+    ],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+        "-O0",
+        "-g",
+    ],
+    export_include_dirs: ["."],
+}
+
 cc_test {
-    name: "graphics_allocator_hidl_hal_test",
-    gtest: true,
-    srcs: ["graphics_allocator_hidl_hal_test.cpp"],
+    name: "VtsHalGraphicsAllocatorV2_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGraphicsAllocatorV2_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.graphics.allocator@2.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: [
+        "libVtsHalGraphicsAllocatorTestUtils",
+        "VtsHalHidlTargetTestBase",
+    ],
     cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
         "-O0",
         "-g",
     ]
diff --git a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.cpp b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.cpp
new file mode 100644
index 0000000..0dc43be
--- /dev/null
+++ b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.cpp
@@ -0,0 +1,183 @@
+/*
+ * 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.
+ */
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include "VtsHalGraphicsAllocatorTestUtils.h"
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace allocator {
+namespace V2_0 {
+namespace tests {
+
+Allocator::Allocator() { init(); }
+
+void Allocator::init() {
+  mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>();
+  ASSERT_NE(nullptr, mAllocator.get()) << "failed to get allocator service";
+
+  std::vector<IAllocator::Capability> capabilities = getCapabilities();
+  mCapabilities.insert(capabilities.begin(), capabilities.end());
+}
+
+sp<IAllocator> Allocator::getRaw() const { return mAllocator; }
+
+bool Allocator::hasCapability(IAllocator::Capability capability) const {
+  return mCapabilities.count(capability) > 0;
+}
+
+std::vector<IAllocator::Capability> Allocator::getCapabilities() {
+  std::vector<IAllocator::Capability> capabilities;
+  mAllocator->getCapabilities(
+      [&](const auto& tmpCapabilities) { capabilities = tmpCapabilities; });
+
+  return capabilities;
+}
+
+std::string Allocator::dumpDebugInfo() {
+  std::string debugInfo;
+  mAllocator->dumpDebugInfo(
+      [&](const auto& tmpDebugInfo) { debugInfo = tmpDebugInfo.c_str(); });
+
+  return debugInfo;
+}
+
+std::unique_ptr<AllocatorClient> Allocator::createClient() {
+  std::unique_ptr<AllocatorClient> client;
+  mAllocator->createClient([&](const auto& tmpError, const auto& tmpClient) {
+    ASSERT_EQ(Error::NONE, tmpError) << "failed to create client";
+    client = std::make_unique<AllocatorClient>(tmpClient);
+  });
+
+  return client;
+}
+
+AllocatorClient::AllocatorClient(const sp<IAllocatorClient>& client)
+    : mClient(client) {}
+
+AllocatorClient::~AllocatorClient() {
+  for (auto buffer : mBuffers) {
+    EXPECT_EQ(Error::NONE, mClient->free(buffer))
+        << "failed to free buffer " << buffer;
+  }
+  mBuffers.clear();
+
+  for (auto descriptor : mDescriptors) {
+    EXPECT_EQ(Error::NONE, mClient->destroyDescriptor(descriptor))
+        << "failed to destroy descriptor " << descriptor;
+  }
+  mDescriptors.clear();
+}
+
+sp<IAllocatorClient> AllocatorClient::getRaw() const { return mClient; }
+
+BufferDescriptor AllocatorClient::createDescriptor(
+    const IAllocatorClient::BufferDescriptorInfo& info) {
+  BufferDescriptor descriptor = 0;
+  mClient->createDescriptor(
+      info, [&](const auto& tmpError, const auto& tmpDescriptor) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to create descriptor";
+        descriptor = tmpDescriptor;
+
+        EXPECT_TRUE(mDescriptors.insert(descriptor).second)
+            << "duplicated descriptor id " << descriptor;
+      });
+
+  return descriptor;
+}
+
+void AllocatorClient::destroyDescriptor(BufferDescriptor descriptor) {
+  ASSERT_EQ(Error::NONE, mClient->destroyDescriptor(descriptor))
+      << "failed to destroy descriptor " << descriptor;
+
+  mDescriptors.erase(descriptor);
+}
+
+Error AllocatorClient::testAllocate(
+    const std::vector<BufferDescriptor>& descriptors) {
+  return mClient->testAllocate(descriptors);
+}
+
+bool AllocatorClient::testAllocate(BufferDescriptor descriptor) {
+  std::vector<BufferDescriptor> descriptors(1, descriptor);
+  Error error = testAllocate(descriptors);
+  return (error == Error::NONE || error == Error::NOT_SHARED);
+}
+
+Error AllocatorClient::allocate(
+    const std::vector<BufferDescriptor>& descriptors,
+    std::vector<Buffer>& buffers) {
+  Error error = Error::NO_RESOURCES;
+  mClient->allocate(descriptors, [&](const auto& tmpError,
+                                     const auto& tmpBuffers) {
+    ASSERT_TRUE(tmpError == Error::NONE || tmpError == Error::NOT_SHARED)
+        << "failed to allocate buffer";
+    ASSERT_EQ(descriptors.size(), tmpBuffers.size()) << "invalid buffer count";
+
+    error = tmpError;
+    buffers = tmpBuffers;
+
+    for (auto buffer : buffers) {
+      EXPECT_TRUE(mBuffers.insert(buffer).second)
+          << "duplicated buffer id " << buffer;
+    }
+  });
+
+  return error;
+}
+
+Buffer AllocatorClient::allocate(BufferDescriptor descriptor) {
+  std::vector<BufferDescriptor> descriptors(1, descriptor);
+  std::vector<Buffer> buffers;
+  allocate(descriptors, buffers);
+  if (::testing::Test::HasFatalFailure()) {
+    return 0;
+  }
+
+  return buffers[0];
+}
+
+void AllocatorClient::free(Buffer buffer) {
+  ASSERT_EQ(Error::NONE, mClient->free(buffer))
+      << "failed to free buffer " << buffer;
+
+  mBuffers.erase(buffer);
+}
+
+native_handle_t* AllocatorClient::exportHandle(BufferDescriptor descriptor,
+                                               Buffer buffer) {
+  native_handle_t* handle;
+  mClient->exportHandle(
+      descriptor, buffer, [&](const auto& tmpError, const auto& tmpHandle) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to export buffer handle";
+        ASSERT_NE(nullptr, tmpHandle.getNativeHandle())
+            << "invalid buffer handle";
+
+        handle = native_handle_clone(tmpHandle.getNativeHandle());
+        ASSERT_NE(nullptr, handle) << "failed to clone handle";
+      });
+
+  return handle;
+}
+
+}  // namespace tests
+}  // namespace V2_0
+}  // namespace allocator
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
diff --git a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.h b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.h
new file mode 100644
index 0000000..c9bfe8f
--- /dev/null
+++ b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.h
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ */
+
+#ifndef VTS_HAL_GRAPHICS_ALLOCATOR_UTILS
+#define VTS_HAL_GRAPHICS_ALLOCATOR_UTILS
+
+#include <memory>
+#include <string>
+#include <unordered_set>
+#include <vector>
+
+#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
+#include <utils/StrongPointer.h>
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace allocator {
+namespace V2_0 {
+namespace tests {
+
+class AllocatorClient;
+
+// A wrapper to IAllocator.
+class Allocator {
+ public:
+  Allocator();
+
+  sp<IAllocator> getRaw() const;
+
+  // Returns true when the allocator supports the specified capability.
+  bool hasCapability(IAllocator::Capability capability) const;
+
+  std::vector<IAllocator::Capability> getCapabilities();
+  std::string dumpDebugInfo();
+  std::unique_ptr<AllocatorClient> createClient();
+
+ private:
+  void init();
+
+  sp<IAllocator> mAllocator;
+  std::unordered_set<IAllocator::Capability> mCapabilities;
+};
+
+// A wrapper to IAllocatorClient.
+class AllocatorClient {
+ public:
+  AllocatorClient(const sp<IAllocatorClient>& client);
+  ~AllocatorClient();
+
+  sp<IAllocatorClient> getRaw() const;
+
+  BufferDescriptor createDescriptor(
+      const IAllocatorClient::BufferDescriptorInfo& info);
+  void destroyDescriptor(BufferDescriptor descriptor);
+
+  Error testAllocate(const std::vector<BufferDescriptor>& descriptors);
+  bool testAllocate(BufferDescriptor descriptor);
+
+  Error allocate(const std::vector<BufferDescriptor>& descriptors,
+                 std::vector<Buffer>& buffers);
+  Buffer allocate(BufferDescriptor descriptor);
+  void free(Buffer buffer);
+
+  // Returns a handle to the buffer.  The ownership of the handle is
+  // transferred to the caller.
+  native_handle_t* exportHandle(BufferDescriptor descriptor, Buffer buffer);
+
+ private:
+  sp<IAllocatorClient> mClient;
+
+  // Keep track of all descriptors and buffers.  When a test fails with
+  // ASSERT_*, the destructor will clean up the resources for the test.
+  std::unordered_set<BufferDescriptor> mDescriptors;
+  std::unordered_set<Buffer> mBuffers;
+};
+
+}  // namespace tests
+}  // namespace V2_0
+}  // namespace allocator
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
+
+#endif  // VTS_HAL_GRAPHICS_ALLOCATOR_UTILS
diff --git a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
new file mode 100644
index 0000000..b1c764f
--- /dev/null
+++ b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 2016 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 "graphics_allocator_hidl_hal_test"
+
+#include <android-base/logging.h>
+#include <VtsHalHidlTargetTestBase.h>
+
+#include "VtsHalGraphicsAllocatorTestUtils.h"
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace allocator {
+namespace V2_0 {
+namespace tests {
+namespace {
+
+using android::hardware::graphics::common::V1_0::PixelFormat;
+
+#define CHECK_FEATURE_OR_SKIP(FEATURE_NAME)                 \
+  do {                                                      \
+    if (!mAllocator->hasCapability(FEATURE_NAME)) {         \
+      std::cout << "[  SKIPPED ] Feature " << #FEATURE_NAME \
+                << " not supported" << std::endl;           \
+      return;                                               \
+    }                                                       \
+  } while (0)
+
+class GraphicsAllocatorHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+ protected:
+  void SetUp() override {
+    ASSERT_NO_FATAL_FAILURE(mAllocator = std::make_unique<Allocator>());
+    ASSERT_NO_FATAL_FAILURE(mClient = mAllocator->createClient());
+
+    mDummyDescriptorInfo.width = 64;
+    mDummyDescriptorInfo.height = 64;
+    mDummyDescriptorInfo.layerCount = 1;
+    mDummyDescriptorInfo.format = PixelFormat::RGBA_8888;
+    mDummyDescriptorInfo.producerUsageMask =
+        static_cast<uint64_t>(ProducerUsage::CPU_WRITE);
+    mDummyDescriptorInfo.consumerUsageMask =
+        static_cast<uint64_t>(ConsumerUsage::CPU_READ);
+  }
+
+  void TearDown() override {}
+
+  std::unique_ptr<Allocator> mAllocator;
+  std::unique_ptr<AllocatorClient> mClient;
+  IAllocatorClient::BufferDescriptorInfo mDummyDescriptorInfo{};
+};
+
+TEST_F(GraphicsAllocatorHidlTest, GetCapabilities) {
+  auto capabilities = mAllocator->getCapabilities();
+  for (auto cap : capabilities) {
+    EXPECT_NE(IAllocator::Capability::INVALID, cap);
+  }
+}
+
+TEST_F(GraphicsAllocatorHidlTest, DumpDebugInfo) {
+  mAllocator->dumpDebugInfo();
+}
+
+TEST_F(GraphicsAllocatorHidlTest, CreateDestroyDescriptor) {
+  BufferDescriptor descriptor;
+  ASSERT_NO_FATAL_FAILURE(descriptor =
+                              mClient->createDescriptor(mDummyDescriptorInfo));
+  mClient->destroyDescriptor(descriptor);
+}
+
+/**
+ * Test testAllocate with a single buffer descriptor.
+ */
+TEST_F(GraphicsAllocatorHidlTest, TestAllocateBasic) {
+  CHECK_FEATURE_OR_SKIP(IAllocator::Capability::TEST_ALLOCATE);
+
+  BufferDescriptor descriptor;
+  ASSERT_NO_FATAL_FAILURE(descriptor =
+                              mClient->createDescriptor(mDummyDescriptorInfo));
+
+  ASSERT_TRUE(mClient->testAllocate(descriptor));
+}
+
+/**
+ * Test testAllocate with two buffer descriptors.
+ */
+TEST_F(GraphicsAllocatorHidlTest, TestAllocateArray) {
+  CHECK_FEATURE_OR_SKIP(IAllocator::Capability::TEST_ALLOCATE);
+
+  BufferDescriptor descriptor;
+  ASSERT_NO_FATAL_FAILURE(descriptor =
+                              mClient->createDescriptor(mDummyDescriptorInfo));
+
+  hidl_vec<BufferDescriptor> descriptors;
+  descriptors.resize(2);
+  descriptors[0] = descriptor;
+  descriptors[1] = descriptor;
+
+  auto error = mClient->testAllocate(descriptors);
+  ASSERT_TRUE(error == Error::NONE || error == Error::NOT_SHARED);
+}
+
+/**
+ * Test allocate/free with a single buffer descriptor.
+ */
+TEST_F(GraphicsAllocatorHidlTest, AllocateFreeBasic) {
+  BufferDescriptor descriptor;
+  ASSERT_NO_FATAL_FAILURE(descriptor =
+                              mClient->createDescriptor(mDummyDescriptorInfo));
+
+  Buffer buffer;
+  ASSERT_NO_FATAL_FAILURE(buffer = mClient->allocate(descriptor));
+
+  mClient->free(buffer);
+}
+
+/**
+ * Test allocate/free with an array of buffer descriptors.
+ */
+TEST_F(GraphicsAllocatorHidlTest, AllocateFreeArray) {
+  BufferDescriptor descriptor1;
+  ASSERT_NO_FATAL_FAILURE(descriptor1 =
+                              mClient->createDescriptor(mDummyDescriptorInfo));
+
+  BufferDescriptor descriptor2;
+  ASSERT_NO_FATAL_FAILURE(descriptor2 =
+                              mClient->createDescriptor(mDummyDescriptorInfo));
+
+  hidl_vec<BufferDescriptor> descriptors;
+  descriptors.resize(3);
+  descriptors[0] = descriptor1;
+  descriptors[1] = descriptor1;
+  descriptors[2] = descriptor2;
+
+  std::vector<Buffer> buffers;
+  ASSERT_NO_FATAL_FAILURE(mClient->allocate(descriptors, buffers));
+
+  for (auto buf : buffers) {
+    mClient->free(buf);
+  }
+}
+
+TEST_F(GraphicsAllocatorHidlTest, ExportHandle) {
+  BufferDescriptor descriptor;
+  ASSERT_NO_FATAL_FAILURE(descriptor =
+                              mClient->createDescriptor(mDummyDescriptorInfo));
+
+  Buffer buffer;
+  ASSERT_NO_FATAL_FAILURE(buffer = mClient->allocate(descriptor));
+
+  native_handle_t* handle;
+  ASSERT_NO_FATAL_FAILURE(handle = mClient->exportHandle(descriptor, buffer));
+
+  native_handle_close(handle);
+  native_handle_delete(handle);
+}
+
+}  // namespace anonymous
+}  // namespace tests
+}  // namespace V2_0
+}  // namespace allocator
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
+
+int main(int argc, char** argv) {
+  ::testing::InitGoogleTest(&argc, argv);
+
+  int status = RUN_ALL_TESTS();
+  LOG(INFO) << "Test result = " << status;
+
+  return status;
+}
diff --git a/graphics/allocator/2.0/vts/functional/graphics_allocator_hidl_hal_test.cpp b/graphics/allocator/2.0/vts/functional/graphics_allocator_hidl_hal_test.cpp
deleted file mode 100644
index a0443d6..0000000
--- a/graphics/allocator/2.0/vts/functional/graphics_allocator_hidl_hal_test.cpp
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (C) 2016 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 "graphics_allocator_hidl_hal_test"
-
-#include <unordered_set>
-
-#include <android-base/logging.h>
-#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
-#include <gtest/gtest.h>
-
-namespace android {
-namespace hardware {
-namespace graphics {
-namespace allocator {
-namespace V2_0 {
-namespace tests {
-namespace {
-
-using android::hardware::graphics::common::V1_0::PixelFormat;
-
-#define CHECK_FEATURE_OR_SKIP(FEATURE_NAME)                 \
-  do {                                                      \
-    if (!hasCapability(FEATURE_NAME)) {                     \
-      std::cout << "[  SKIPPED ] Feature " << #FEATURE_NAME \
-                << " not supported" << std::endl;           \
-      return;                                               \
-    }                                                       \
-  } while (0)
-
-class TempDescriptor {
- public:
-  TempDescriptor(const sp<IAllocatorClient>& client,
-                 const IAllocatorClient::BufferDescriptorInfo& info)
-      : mClient(client), mError(Error::NO_RESOURCES) {
-    mClient->createDescriptor(
-        info, [&](const auto& tmpError, const auto& tmpDescriptor) {
-          mError = tmpError;
-          mDescriptor = tmpDescriptor;
-        });
-  }
-
-  ~TempDescriptor() {
-    if (mError == Error::NONE) {
-      mClient->destroyDescriptor(mDescriptor);
-    }
-  }
-
-  bool isValid() const { return (mError == Error::NONE); }
-
-  operator BufferDescriptor() const { return mDescriptor; }
-
- private:
-  sp<IAllocatorClient> mClient;
-  Error mError;
-  BufferDescriptor mDescriptor;
-};
-
-class GraphicsAllocatorHidlTest : public ::testing::Test {
- protected:
-  void SetUp() override {
-    mAllocator = IAllocator::getService("gralloc");
-    ASSERT_NE(mAllocator, nullptr);
-
-    mAllocator->createClient([this](const auto& error, const auto& client) {
-      if (error == Error::NONE) {
-        mClient = client;
-      }
-    });
-    ASSERT_NE(mClient, nullptr);
-
-    initCapabilities();
-
-    mDummyDescriptorInfo.width = 64;
-    mDummyDescriptorInfo.height = 64;
-    mDummyDescriptorInfo.layerCount = 1;
-    mDummyDescriptorInfo.format = PixelFormat::RGBA_8888;
-    mDummyDescriptorInfo.producerUsageMask =
-        static_cast<uint64_t>(ProducerUsage::CPU_WRITE);
-    mDummyDescriptorInfo.consumerUsageMask =
-        static_cast<uint64_t>(ConsumerUsage::CPU_READ);
-  }
-
-  void TearDown() override {}
-
-  /**
-   * Initialize the set of supported capabilities.
-   */
-  void initCapabilities() {
-    mAllocator->getCapabilities([this](const auto& capabilities) {
-      std::vector<IAllocator::Capability> caps = capabilities;
-      mCapabilities.insert(caps.cbegin(), caps.cend());
-    });
-  }
-
-  /**
-   * Test whether a capability is supported.
-   */
-  bool hasCapability(IAllocator::Capability capability) const {
-    return (mCapabilities.count(capability) > 0);
-  }
-
-  sp<IAllocator> mAllocator;
-  sp<IAllocatorClient> mClient;
-  IAllocatorClient::BufferDescriptorInfo mDummyDescriptorInfo{};
-
- private:
-  std::unordered_set<IAllocator::Capability> mCapabilities;
-};
-
-TEST_F(GraphicsAllocatorHidlTest, GetCapabilities) {
-  auto ret = mAllocator->getCapabilities([](const auto& capabilities) {
-    std::vector<IAllocator::Capability> caps = capabilities;
-    for (auto cap : caps) {
-      EXPECT_NE(IAllocator::Capability::INVALID, cap);
-    }
-  });
-
-  ASSERT_TRUE(ret.isOk());
-}
-
-TEST_F(GraphicsAllocatorHidlTest, DumpDebugInfo) {
-  auto ret = mAllocator->dumpDebugInfo([](const auto&) {
-    // nothing to do
-  });
-
-  ASSERT_TRUE(ret.isOk());
-}
-
-TEST_F(GraphicsAllocatorHidlTest, CreateDestroyDescriptor) {
-  Error error;
-  BufferDescriptor descriptor;
-  auto ret = mClient->createDescriptor(
-      mDummyDescriptorInfo,
-      [&](const auto& tmpError, const auto& tmpDescriptor) {
-        error = tmpError;
-        descriptor = tmpDescriptor;
-      });
-
-  ASSERT_TRUE(ret.isOk());
-  ASSERT_EQ(Error::NONE, error);
-
-  auto err_ret = mClient->destroyDescriptor(descriptor);
-  ASSERT_TRUE(err_ret.isOk());
-  ASSERT_EQ(Error::NONE, static_cast<Error>(err_ret));
-}
-
-/**
- * Test testAllocate with a single buffer descriptor.
- */
-TEST_F(GraphicsAllocatorHidlTest, TestAllocateBasic) {
-  CHECK_FEATURE_OR_SKIP(IAllocator::Capability::TEST_ALLOCATE);
-
-  TempDescriptor descriptor(mClient, mDummyDescriptorInfo);
-  ASSERT_TRUE(descriptor.isValid());
-
-  hidl_vec<BufferDescriptor> descriptors;
-  descriptors.resize(1);
-  descriptors[0] = descriptor;
-
-  auto ret = mClient->testAllocate(descriptors);
-  ASSERT_TRUE(ret.isOk());
-
-  auto error = static_cast<Error>(ret);
-  ASSERT_TRUE(error == Error::NONE || error == Error::NOT_SHARED);
-}
-
-/**
- * Test testAllocate with two buffer descriptors.
- */
-TEST_F(GraphicsAllocatorHidlTest, TestAllocateArray) {
-  CHECK_FEATURE_OR_SKIP(IAllocator::Capability::TEST_ALLOCATE);
-
-  TempDescriptor descriptor(mClient, mDummyDescriptorInfo);
-  ASSERT_TRUE(descriptor.isValid());
-
-  hidl_vec<BufferDescriptor> descriptors;
-  descriptors.resize(2);
-  descriptors[0] = descriptor;
-  descriptors[1] = descriptor;
-
-  auto ret = mClient->testAllocate(descriptors);
-  ASSERT_TRUE(ret.isOk());
-
-  auto error = static_cast<Error>(ret);
-  ASSERT_TRUE(error == Error::NONE || error == Error::NOT_SHARED);
-}
-
-/**
- * Test allocate/free with a single buffer descriptor.
- */
-TEST_F(GraphicsAllocatorHidlTest, AllocateFreeBasic) {
-  TempDescriptor descriptor(mClient, mDummyDescriptorInfo);
-  ASSERT_TRUE(descriptor.isValid());
-
-  hidl_vec<BufferDescriptor> descriptors;
-  descriptors.resize(1);
-  descriptors[0] = descriptor;
-
-  Error error;
-  std::vector<Buffer> buffers;
-  auto ret = mClient->allocate(
-      descriptors, [&](const auto& tmpError, const auto& tmpBuffers) {
-        error = tmpError;
-        buffers = tmpBuffers;
-      });
-
-  ASSERT_TRUE(ret.isOk());
-  ASSERT_TRUE(error == Error::NONE || error == Error::NOT_SHARED);
-  EXPECT_EQ(1u, buffers.size());
-
-  if (!buffers.empty()) {
-    auto err_ret = mClient->free(buffers[0]);
-    EXPECT_TRUE(err_ret.isOk());
-    EXPECT_EQ(Error::NONE, static_cast<Error>(err_ret));
-  }
-}
-
-/**
- * Test allocate/free with an array of buffer descriptors.
- */
-TEST_F(GraphicsAllocatorHidlTest, AllocateFreeArray) {
-  TempDescriptor descriptor1(mClient, mDummyDescriptorInfo);
-  ASSERT_TRUE(descriptor1.isValid());
-
-  TempDescriptor descriptor2(mClient, mDummyDescriptorInfo);
-  ASSERT_TRUE(descriptor2.isValid());
-
-  hidl_vec<BufferDescriptor> descriptors;
-  descriptors.resize(3);
-  descriptors[0] = descriptor1;
-  descriptors[1] = descriptor1;
-  descriptors[2] = descriptor2;
-
-  Error error;
-  std::vector<Buffer> buffers;
-  auto ret = mClient->allocate(
-      descriptors, [&](const auto& tmpError, const auto& tmpBuffers) {
-        error = tmpError;
-        buffers = tmpBuffers;
-      });
-
-  ASSERT_TRUE(ret.isOk());
-  ASSERT_TRUE(error == Error::NONE || error == Error::NOT_SHARED);
-  EXPECT_EQ(descriptors.size(), buffers.size());
-
-  for (auto buf : buffers) {
-    auto err_ret = mClient->free(buf);
-    EXPECT_TRUE(err_ret.isOk());
-    EXPECT_EQ(Error::NONE, static_cast<Error>(err_ret));
-  }
-}
-
-TEST_F(GraphicsAllocatorHidlTest, ExportHandle) {
-  TempDescriptor descriptor(mClient, mDummyDescriptorInfo);
-  ASSERT_TRUE(descriptor.isValid());
-
-  hidl_vec<BufferDescriptor> descriptors;
-  descriptors.resize(1);
-  descriptors[0] = descriptor;
-
-  Error error;
-  std::vector<Buffer> buffers;
-  auto ret = mClient->allocate(
-      descriptors, [&](const auto& tmpError, const auto& tmpBuffers) {
-        error = tmpError;
-        buffers = tmpBuffers;
-      });
-
-  ASSERT_TRUE(ret.isOk());
-  ASSERT_TRUE(error == Error::NONE || error == Error::NOT_SHARED);
-  ASSERT_EQ(1u, buffers.size());
-
-  ret = mClient->exportHandle(
-      descriptors[0], buffers[0],
-      [&](const auto& tmpError, const auto&) { error = tmpError; });
-  EXPECT_TRUE(ret.isOk());
-  EXPECT_EQ(Error::NONE, error);
-
-  auto err_ret = mClient->free(buffers[0]);
-  EXPECT_TRUE(err_ret.isOk());
-  EXPECT_EQ(Error::NONE, static_cast<Error>(err_ret));
-}
-
-}  // namespace anonymous
-}  // namespace tests
-}  // namespace V2_0
-}  // namespace allocator
-}  // namespace graphics
-}  // namespace hardware
-}  // namespace android
-
-int main(int argc, char** argv) {
-  ::testing::InitGoogleTest(&argc, argv);
-
-  int status = RUN_ALL_TESTS();
-  LOG(INFO) << "Test result = " << status;
-
-  return status;
-}
diff --git a/graphics/allocator/2.0/vts/types.vts b/graphics/allocator/2.0/vts/types.vts
deleted file mode 100644
index 4a8376c..0000000
--- a/graphics/allocator/2.0/vts/types.vts
+++ /dev/null
@@ -1,142 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.graphics.allocator"
-
-
-attribute: {
-    name: "::android::hardware::graphics::allocator::V2_0::Error"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "BAD_DESCRIPTOR"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "BAD_BUFFER"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "BAD_VALUE"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "NOT_SHARED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NO_RESOURCES"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "UNDEFINED"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "UNSUPPORTED"
-        scalar_value: {
-            int32_t: 7
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::graphics::allocator::V2_0::ProducerUsage"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint64_t"
-
-        enumerator: "CPU_READ"
-        scalar_value: {
-            uint64_t: 2
-        }
-        enumerator: "CPU_READ_OFTEN"
-        scalar_value: {
-            uint64_t: 4
-        }
-        enumerator: "CPU_WRITE"
-        scalar_value: {
-            uint64_t: 32
-        }
-        enumerator: "CPU_WRITE_OFTEN"
-        scalar_value: {
-            uint64_t: 64
-        }
-        enumerator: "GPU_RENDER_TARGET"
-        scalar_value: {
-            uint64_t: 512
-        }
-        enumerator: "PROTECTED"
-        scalar_value: {
-            uint64_t: 16384
-        }
-        enumerator: "CAMERA"
-        scalar_value: {
-            uint64_t: 131072
-        }
-        enumerator: "VIDEO_DECODER"
-        scalar_value: {
-            uint64_t: 4194304
-        }
-        enumerator: "SENSOR_DIRECT_DATA"
-        scalar_value: {
-            uint64_t: 8388608
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::graphics::allocator::V2_0::ConsumerUsage"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint64_t"
-
-        enumerator: "CPU_READ"
-        scalar_value: {
-            uint64_t: 2
-        }
-        enumerator: "CPU_READ_OFTEN"
-        scalar_value: {
-            uint64_t: 4
-        }
-        enumerator: "GPU_TEXTURE"
-        scalar_value: {
-            uint64_t: 256
-        }
-        enumerator: "HWCOMPOSER"
-        scalar_value: {
-            uint64_t: 2048
-        }
-        enumerator: "CLIENT_TARGET"
-        scalar_value: {
-            uint64_t: 4096
-        }
-        enumerator: "CURSOR"
-        scalar_value: {
-            uint64_t: 32768
-        }
-        enumerator: "VIDEO_ENCODER"
-        scalar_value: {
-            uint64_t: 65536
-        }
-        enumerator: "CAMERA"
-        scalar_value: {
-            uint64_t: 262144
-        }
-        enumerator: "RENDERSCRIPT"
-        scalar_value: {
-            uint64_t: 1048576
-        }
-        enumerator: "GPU_DATA_BUFFER"
-        scalar_value: {
-            uint64_t: 8388608
-        }
-    }
-}
-
diff --git a/graphics/common/1.0/types.hal b/graphics/common/1.0/types.hal
index 7663701..1ddd892 100644
--- a/graphics/common/1.0/types.hal
+++ b/graphics/common/1.0/types.hal
@@ -792,7 +792,7 @@
     TRANSFER_GAMMA2_8 = 6 << TRANSFER_SHIFT,
 
     /*
-     * SMPTE ST 2084
+     * SMPTE ST 2084 (Dolby Perceptual Quantizer)
      *
      * Transfer characteristic curve:
      *  E = ((c1 + c2 * L^n) / (1 + c3 * L^n)) ^ m
@@ -1068,6 +1068,15 @@
      */
     BT2020 = STANDARD_BT2020 | TRANSFER_SMPTE_170M | RANGE_FULL,
 
+    /*
+     * ITU-R Recommendation 2020 (BT.2020)
+     *
+     * Ultra High-definition television
+     *
+     * Use full range, SMPTE 2084 (PQ) transfer and BT2020 standard
+     */
+    BT2020_PQ = STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL,
+
 
     /*
      * Data spaces for non-color formats
diff --git a/graphics/composer/2.1/default/Android.bp b/graphics/composer/2.1/default/Android.bp
index 4a5c70d..d5da943 100644
--- a/graphics/composer/2.1/default/Android.bp
+++ b/graphics/composer/2.1/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_static {
     name: "libhwcomposer-client",
+    defaults: ["hidl_defaults"],
     export_include_dirs: ["."],
     srcs: ["ComposerClient.cpp"],
     shared_libs: [
@@ -11,7 +12,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libsync",
         "libutils",
@@ -20,6 +20,7 @@
 
 cc_library_shared {
     name: "android.hardware.graphics.composer@2.1-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Hwc.cpp"],
@@ -33,7 +34,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libsync",
         "libutils",
@@ -42,6 +42,7 @@
 
 cc_binary {
     name: "android.hardware.graphics.composer@2.1-service",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["service.cpp"],
@@ -57,7 +58,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libsync",
         "libutils",
@@ -66,6 +66,7 @@
 
 cc_library_static {
     name: "libhwcomposer-command-buffer",
+    defaults: ["hidl_defaults"],
     shared_libs: ["android.hardware.graphics.composer@2.1"],
     export_include_dirs: ["."],
 }
diff --git a/graphics/composer/2.1/default/ComposerClient.cpp b/graphics/composer/2.1/default/ComposerClient.cpp
index 7a2cb25..a2d5d4b 100644
--- a/graphics/composer/2.1/default/ComposerClient.cpp
+++ b/graphics/composer/2.1/default/ComposerClient.cpp
@@ -193,30 +193,30 @@
 
 } // anonymous namespace
 
-BufferClone::BufferClone()
+BufferCacheEntry::BufferCacheEntry()
     : mHandle(nullptr)
 {
 }
 
-BufferClone::BufferClone(BufferClone&& other)
+BufferCacheEntry::BufferCacheEntry(BufferCacheEntry&& other)
 {
     mHandle = other.mHandle;
     other.mHandle = nullptr;
 }
 
-BufferClone& BufferClone::operator=(buffer_handle_t handle)
+BufferCacheEntry& BufferCacheEntry::operator=(buffer_handle_t handle)
 {
     clear();
     mHandle = handle;
     return *this;
 }
 
-BufferClone::~BufferClone()
+BufferCacheEntry::~BufferCacheEntry()
 {
     clear();
 }
 
-void BufferClone::clear()
+void BufferCacheEntry::clear()
 {
     if (mHandle) {
         sHandleImporter.freeBuffer(mHandle);
@@ -230,28 +230,69 @@
 
 ComposerClient::~ComposerClient()
 {
-    mHal.enableCallback(false);
-    mHal.removeClient();
+    // We want to call hwc2_close here (and move hwc2_open to the
+    // constructor), with the assumption that hwc2_close would
+    //
+    //  - clean up all resources owned by the client
+    //  - make sure all displays are blank (since there is no layer)
+    //
+    // But since SF used to crash at this point, different hwcomposer2
+    // implementations behave differently on hwc2_close.  Our only portable
+    // choice really is to abort().  But that is not an option anymore
+    // because we might also have VTS or VR as clients that can come and go.
+    //
+    // Below we manually clean all resources (layers and virtual
+    // displays), and perform a presentDisplay afterwards.
+    ALOGW("destroying composer client");
 
-    // no need to grab the mutex as any in-flight hwbinder call should keep
-    // the client alive
+    mHal.enableCallback(false);
+
+    // no need to grab the mutex as any in-flight hwbinder call would have
+    // kept the client alive
     for (const auto& dpy : mDisplayData) {
-        if (!dpy.second.Layers.empty()) {
-            ALOGW("client destroyed with valid layers");
-        }
+        ALOGW("destroying client resources for display %" PRIu64, dpy.first);
+
         for (const auto& ly : dpy.second.Layers) {
             mHal.destroyLayer(dpy.first, ly.first);
         }
 
         if (dpy.second.IsVirtual) {
-            ALOGW("client destroyed with valid virtual display");
             mHal.destroyVirtualDisplay(dpy.first);
+        } else {
+            ALOGW("performing a final presentDisplay");
+
+            std::vector<Layer> changedLayers;
+            std::vector<IComposerClient::Composition> compositionTypes;
+            uint32_t displayRequestMask = 0;
+            std::vector<Layer> requestedLayers;
+            std::vector<uint32_t> requestMasks;
+            mHal.validateDisplay(dpy.first, &changedLayers, &compositionTypes,
+                    &displayRequestMask, &requestedLayers, &requestMasks);
+
+            mHal.acceptDisplayChanges(dpy.first);
+
+            int32_t presentFence = -1;
+            std::vector<Layer> releasedLayers;
+            std::vector<int32_t> releaseFences;
+            mHal.presentDisplay(dpy.first, &presentFence, &releasedLayers, &releaseFences);
+            if (presentFence >= 0) {
+                close(presentFence);
+            }
+            for (auto fence : releaseFences) {
+                if (fence >= 0) {
+                    close(fence);
+                }
+            }
         }
     }
 
     mDisplayData.clear();
 
     sHandleImporter.cleanup();
+
+    mHal.removeClient();
+
+    ALOGW("removed composer client");
 }
 
 void ComposerClient::initialize()
@@ -275,17 +316,23 @@
         }
     }
 
-    mCallback->onHotplug(display, connected);
+    auto ret = mCallback->onHotplug(display, connected);
+    ALOGE_IF(!ret.isOk(), "failed to send onHotplug: %s",
+            ret.description().c_str());
 }
 
 void ComposerClient::onRefresh(Display display)
 {
-    mCallback->onRefresh(display);
+    auto ret = mCallback->onRefresh(display);
+    ALOGE_IF(!ret.isOk(), "failed to send onRefresh: %s",
+            ret.description().c_str());
 }
 
 void ComposerClient::onVsync(Display display, int64_t timestamp)
 {
-    mCallback->onVsync(display, timestamp);
+    auto ret = mCallback->onVsync(display, timestamp);
+    ALOGE_IF(!ret.isOk(), "failed to send onVsync: %s",
+            ret.description().c_str());
 }
 
 Return<void> ComposerClient::registerCallback(
@@ -698,10 +745,13 @@
     auto damage = readRegion((length - 4) / 4);
 
     auto err = lookupBuffer(BufferCache::CLIENT_TARGETS,
-            slot, useCache, clientTarget);
+            slot, useCache, clientTarget, &clientTarget);
     if (err == Error::NONE) {
         err = mHal.setClientTarget(mDisplay, clientTarget, fence,
                 dataspace, damage);
+
+        updateBuffer(BufferCache::CLIENT_TARGETS, slot, useCache,
+                clientTarget);
     }
     if (err != Error::NONE) {
         close(fence);
@@ -723,9 +773,12 @@
     auto fence = readFence();
 
     auto err = lookupBuffer(BufferCache::OUTPUT_BUFFERS,
-            slot, useCache, outputBuffer);
+            slot, useCache, outputBuffer, &outputBuffer);
     if (err == Error::NONE) {
         err = mHal.setOutputBuffer(mDisplay, outputBuffer, fence);
+
+        updateBuffer(BufferCache::OUTPUT_BUFFERS,
+            slot, useCache, outputBuffer);
     }
     if (err != Error::NONE) {
         close(fence);
@@ -823,9 +876,12 @@
     auto fence = readFence();
 
     auto err = lookupBuffer(BufferCache::LAYER_BUFFERS,
-            slot, useCache, buffer);
+            slot, useCache, buffer, &buffer);
     if (err == Error::NONE) {
         err = mHal.setLayerBuffer(mDisplay, mLayer, buffer, fence);
+
+        updateBuffer(BufferCache::LAYER_BUFFERS,
+            slot, useCache, buffer);
     }
     if (err != Error::NONE) {
         close(fence);
@@ -944,9 +1000,11 @@
 
     auto stream = readHandle();
 
-    auto err = lookupLayerSidebandStream(stream);
+    auto err = lookupLayerSidebandStream(stream, &stream);
     if (err == Error::NONE) {
         err = mHal.setLayerSidebandStream(mDisplay, mLayer, stream);
+
+        updateLayerSidebandStream(stream);
     }
     if (err != Error::NONE) {
         mWriter.setError(getCommandLoc(), err);
@@ -1045,26 +1103,24 @@
     };
 }
 
-Error ComposerClient::CommandReader::lookupBuffer(BufferCache cache,
-        uint32_t slot, bool useCache, buffer_handle_t& handle)
+Error ComposerClient::CommandReader::lookupBufferCacheEntryLocked(
+        BufferCache cache, uint32_t slot, BufferCacheEntry** outEntry)
 {
-    std::lock_guard<std::mutex> lock(mClient.mDisplayDataMutex);
-
     auto dpy = mClient.mDisplayData.find(mDisplay);
     if (dpy == mClient.mDisplayData.end()) {
         return Error::BAD_DISPLAY;
     }
 
-    BufferClone* clone = nullptr;
+    BufferCacheEntry* entry = nullptr;
     switch (cache) {
     case BufferCache::CLIENT_TARGETS:
         if (slot < dpy->second.ClientTargets.size()) {
-            clone = &dpy->second.ClientTargets[slot];
+            entry = &dpy->second.ClientTargets[slot];
         }
         break;
     case BufferCache::OUTPUT_BUFFERS:
         if (slot < dpy->second.OutputBuffers.size()) {
-            clone = &dpy->second.OutputBuffers[slot];
+            entry = &dpy->second.OutputBuffers[slot];
         }
         break;
     case BufferCache::LAYER_BUFFERS:
@@ -1074,7 +1130,7 @@
                 return Error::BAD_LAYER;
             }
             if (slot < ly->second.Buffers.size()) {
-                clone = &ly->second.Buffers[slot];
+                entry = &ly->second.Buffers[slot];
             }
         }
         break;
@@ -1085,7 +1141,7 @@
                 return Error::BAD_LAYER;
             }
             if (slot == 0) {
-                clone = &ly->second.SidebandStream;
+                entry = &ly->second.SidebandStream;
             }
         }
         break;
@@ -1093,25 +1149,59 @@
         break;
     }
 
-    if (!clone) {
-        ALOGW("invalid buffer slot");
+    if (!entry) {
+        ALOGW("invalid buffer slot %" PRIu32, slot);
         return Error::BAD_PARAMETER;
     }
 
-    // use or update cache
+    *outEntry = entry;
+
+    return Error::NONE;
+}
+
+Error ComposerClient::CommandReader::lookupBuffer(BufferCache cache,
+        uint32_t slot, bool useCache, buffer_handle_t handle,
+        buffer_handle_t* outHandle)
+{
     if (useCache) {
-        handle = *clone;
+        std::lock_guard<std::mutex> lock(mClient.mDisplayDataMutex);
+
+        BufferCacheEntry* entry;
+        Error error = lookupBufferCacheEntryLocked(cache, slot, &entry);
+        if (error != Error::NONE) {
+            return error;
+        }
+
+        // input handle is ignored
+        *outHandle = entry->getHandle();
     } else {
         if (!sHandleImporter.importBuffer(handle)) {
             return Error::NO_RESOURCES;
         }
 
-        *clone = handle;
+        *outHandle = handle;
     }
 
     return Error::NONE;
 }
 
+void ComposerClient::CommandReader::updateBuffer(BufferCache cache,
+        uint32_t slot, bool useCache, buffer_handle_t handle)
+{
+    // handle was looked up from cache
+    if (useCache) {
+        return;
+    }
+
+    std::lock_guard<std::mutex> lock(mClient.mDisplayDataMutex);
+
+    BufferCacheEntry* entry = nullptr;
+    lookupBufferCacheEntryLocked(cache, slot, &entry);
+    LOG_FATAL_IF(!entry, "failed to find the cache entry to update");
+
+    *entry = handle;
+}
+
 } // namespace implementation
 } // namespace V2_1
 } // namespace composer
diff --git a/graphics/composer/2.1/default/ComposerClient.h b/graphics/composer/2.1/default/ComposerClient.h
index d351cfb..14da1f8 100644
--- a/graphics/composer/2.1/default/ComposerClient.h
+++ b/graphics/composer/2.1/default/ComposerClient.h
@@ -31,18 +31,18 @@
 namespace V2_1 {
 namespace implementation {
 
-class BufferClone {
+class BufferCacheEntry {
 public:
-    BufferClone();
-    BufferClone(BufferClone&& other);
+    BufferCacheEntry();
+    BufferCacheEntry(BufferCacheEntry&& other);
 
-    BufferClone(const BufferClone& other) = delete;
-    BufferClone& operator=(const BufferClone& other) = delete;
+    BufferCacheEntry(const BufferCacheEntry& other) = delete;
+    BufferCacheEntry& operator=(const BufferCacheEntry& other) = delete;
 
-    BufferClone& operator=(buffer_handle_t handle);
-    ~BufferClone();
+    BufferCacheEntry& operator=(buffer_handle_t handle);
+    ~BufferCacheEntry();
 
-    operator buffer_handle_t() const { return mHandle; }
+    buffer_handle_t getHandle() const { return mHandle; }
 
 private:
     void clear();
@@ -108,15 +108,15 @@
 
 protected:
     struct LayerBuffers {
-        std::vector<BufferClone> Buffers;
-        BufferClone SidebandStream;
+        std::vector<BufferCacheEntry> Buffers;
+        BufferCacheEntry SidebandStream;
     };
 
     struct DisplayData {
         bool IsVirtual;
 
-        std::vector<BufferClone> ClientTargets;
-        std::vector<BufferClone> OutputBuffers;
+        std::vector<BufferCacheEntry> ClientTargets;
+        std::vector<BufferCacheEntry> OutputBuffers;
 
         std::unordered_map<Layer, LayerBuffers> Layers;
 
@@ -167,12 +167,23 @@
             LAYER_BUFFERS,
             LAYER_SIDEBAND_STREAMS,
         };
+        Error lookupBufferCacheEntryLocked(BufferCache cache, uint32_t slot,
+                BufferCacheEntry** outEntry);
         Error lookupBuffer(BufferCache cache, uint32_t slot,
-                bool useCache, buffer_handle_t& handle);
+                bool useCache, buffer_handle_t handle,
+                buffer_handle_t* outHandle);
+        void updateBuffer(BufferCache cache, uint32_t slot,
+                bool useCache, buffer_handle_t handle);
 
-        Error lookupLayerSidebandStream(buffer_handle_t& handle)
+        Error lookupLayerSidebandStream(buffer_handle_t handle,
+                buffer_handle_t* outHandle)
         {
             return lookupBuffer(BufferCache::LAYER_SIDEBAND_STREAMS,
+                    0, false, handle, outHandle);
+        }
+        void updateLayerSidebandStream(buffer_handle_t handle)
+        {
+            updateBuffer(BufferCache::LAYER_SIDEBAND_STREAMS,
                     0, false, handle);
         }
 
diff --git a/graphics/composer/2.1/default/service.cpp b/graphics/composer/2.1/default/service.cpp
index 656673e..712dac1 100644
--- a/graphics/composer/2.1/default/service.cpp
+++ b/graphics/composer/2.1/default/service.cpp
@@ -39,5 +39,5 @@
         ALOGE("Couldn't set SCHED_FIFO: %d", errno);
     }
 
-    return defaultPassthroughServiceImplementation<IComposer>("hwcomposer");
+    return defaultPassthroughServiceImplementation<IComposer>();
 }
diff --git a/graphics/composer/2.1/vts/Composer.vts b/graphics/composer/2.1/vts/Composer.vts
deleted file mode 100644
index e60e39c..0000000
--- a/graphics/composer/2.1/vts/Composer.vts
+++ /dev/null
@@ -1,89 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IComposer"
-
-package: "android.hardware.graphics.composer"
-
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hardware.graphics.composer@2.1::IComposerCallback"
-import: "android.hardware.graphics.composer@2.1::IComposerClient"
-import: "android.hardware.graphics.composer@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposer::Capability"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "SIDEBAND_STREAM"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "SKIP_CLIENT_COLOR_TRANSFORM"
-            scalar_value: {
-                int32_t: 2
-            }
-        }
-    }
-
-    api: {
-        name: "getCapabilities"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::graphics::composer::V2_1::IComposer::Capability"
-            }
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "dumpDebugInfo"
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "createClient"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-}
diff --git a/graphics/composer/2.1/vts/ComposerCallback.vts b/graphics/composer/2.1/vts/ComposerCallback.vts
deleted file mode 100644
index b83cf94..0000000
--- a/graphics/composer/2.1/vts/ComposerCallback.vts
+++ /dev/null
@@ -1,73 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IComposerCallback"
-
-package: "android.hardware.graphics.composer"
-
-import: "android.hardware.graphics.composer@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerCallback::Connection"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "CONNECTED"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "DISCONNECTED"
-            scalar_value: {
-                int32_t: 2
-            }
-        }
-    }
-
-    api: {
-        name: "onHotplug"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerCallback::Connection"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "onRefresh"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "onVsync"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-}
diff --git a/graphics/composer/2.1/vts/ComposerClient.vts b/graphics/composer/2.1/vts/ComposerClient.vts
deleted file mode 100644
index ac1d7fb..0000000
--- a/graphics/composer/2.1/vts/ComposerClient.vts
+++ /dev/null
@@ -1,916 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IComposerClient"
-
-package: "android.hardware.graphics.composer"
-
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hardware.graphics.composer@2.1::IComposerCallback"
-import: "android.hardware.graphics.composer@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Attribute"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "WIDTH"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "HEIGHT"
-            scalar_value: {
-                int32_t: 2
-            }
-            enumerator: "VSYNC_PERIOD"
-            scalar_value: {
-                int32_t: 3
-            }
-            enumerator: "DPI_X"
-            scalar_value: {
-                int32_t: 4
-            }
-            enumerator: "DPI_Y"
-            scalar_value: {
-                int32_t: 5
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayRequest"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "FLIP_CLIENT_TARGET"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "WRITE_CLIENT_TARGET_TO_OUTPUT"
-            scalar_value: {
-                uint32_t: 2
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::LayerRequest"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "CLEAR_CLIENT_TARGET"
-            scalar_value: {
-                uint32_t: 1
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::PowerMode"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "OFF"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "DOZE"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "DOZE_SUSPEND"
-            scalar_value: {
-                int32_t: 3
-            }
-            enumerator: "ON"
-            scalar_value: {
-                int32_t: 2
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Vsync"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "ENABLE"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "DISABLE"
-            scalar_value: {
-                int32_t: 2
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::BlendMode"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "NONE"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "PREMULTIPLIED"
-            scalar_value: {
-                int32_t: 2
-            }
-            enumerator: "COVERAGE"
-            scalar_value: {
-                int32_t: 3
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Composition"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "CLIENT"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "DEVICE"
-            scalar_value: {
-                int32_t: 2
-            }
-            enumerator: "SOLID_COLOR"
-            scalar_value: {
-                int32_t: 3
-            }
-            enumerator: "CURSOR"
-            scalar_value: {
-                int32_t: 4
-            }
-            enumerator: "SIDEBAND"
-            scalar_value: {
-                int32_t: 5
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayType"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "INVALID"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "PHYSICAL"
-            scalar_value: {
-                int32_t: 1
-            }
-            enumerator: "VIRTUAL"
-            scalar_value: {
-                int32_t: 2
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::HandleIndex"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "EMPTY"
-            scalar_value: {
-                int32_t: -1
-            }
-            enumerator: "CACHED"
-            scalar_value: {
-                int32_t: -2
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Rect"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "left"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        struct_value: {
-            name: "top"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        struct_value: {
-            name: "right"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        struct_value: {
-            name: "bottom"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::FRect"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "left"
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-        struct_value: {
-            name: "top"
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-        struct_value: {
-            name: "right"
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-        struct_value: {
-            name: "bottom"
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Color"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "r"
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-        struct_value: {
-            name: "g"
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-        struct_value: {
-            name: "b"
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-        struct_value: {
-            name: "a"
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Command"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "int32_t"
-
-            enumerator: "LENGTH_MASK"
-            scalar_value: {
-                int32_t: 65535
-            }
-            enumerator: "OPCODE_SHIFT"
-            scalar_value: {
-                int32_t: 16
-            }
-            enumerator: "OPCODE_MASK"
-            scalar_value: {
-                int32_t: -65536
-            }
-            enumerator: "SELECT_DISPLAY"
-            scalar_value: {
-                int32_t: 0
-            }
-            enumerator: "SELECT_LAYER"
-            scalar_value: {
-                int32_t: 65536
-            }
-            enumerator: "SET_ERROR"
-            scalar_value: {
-                int32_t: 16777216
-            }
-            enumerator: "SET_CHANGED_COMPOSITION_TYPES"
-            scalar_value: {
-                int32_t: 16842752
-            }
-            enumerator: "SET_DISPLAY_REQUESTS"
-            scalar_value: {
-                int32_t: 16908288
-            }
-            enumerator: "SET_PRESENT_FENCE"
-            scalar_value: {
-                int32_t: 16973824
-            }
-            enumerator: "SET_RELEASE_FENCES"
-            scalar_value: {
-                int32_t: 17039360
-            }
-            enumerator: "SET_COLOR_TRANSFORM"
-            scalar_value: {
-                int32_t: 33554432
-            }
-            enumerator: "SET_CLIENT_TARGET"
-            scalar_value: {
-                int32_t: 33619968
-            }
-            enumerator: "SET_OUTPUT_BUFFER"
-            scalar_value: {
-                int32_t: 33685504
-            }
-            enumerator: "VALIDATE_DISPLAY"
-            scalar_value: {
-                int32_t: 33751040
-            }
-            enumerator: "ACCEPT_DISPLAY_CHANGES"
-            scalar_value: {
-                int32_t: 33816576
-            }
-            enumerator: "PRESENT_DISPLAY"
-            scalar_value: {
-                int32_t: 33882112
-            }
-            enumerator: "SET_LAYER_CURSOR_POSITION"
-            scalar_value: {
-                int32_t: 50331648
-            }
-            enumerator: "SET_LAYER_BUFFER"
-            scalar_value: {
-                int32_t: 50397184
-            }
-            enumerator: "SET_LAYER_SURFACE_DAMAGE"
-            scalar_value: {
-                int32_t: 50462720
-            }
-            enumerator: "SET_LAYER_BLEND_MODE"
-            scalar_value: {
-                int32_t: 67108864
-            }
-            enumerator: "SET_LAYER_COLOR"
-            scalar_value: {
-                int32_t: 67174400
-            }
-            enumerator: "SET_LAYER_COMPOSITION_TYPE"
-            scalar_value: {
-                int32_t: 67239936
-            }
-            enumerator: "SET_LAYER_DATASPACE"
-            scalar_value: {
-                int32_t: 67305472
-            }
-            enumerator: "SET_LAYER_DISPLAY_FRAME"
-            scalar_value: {
-                int32_t: 67371008
-            }
-            enumerator: "SET_LAYER_PLANE_ALPHA"
-            scalar_value: {
-                int32_t: 67436544
-            }
-            enumerator: "SET_LAYER_SIDEBAND_STREAM"
-            scalar_value: {
-                int32_t: 67502080
-            }
-            enumerator: "SET_LAYER_SOURCE_CROP"
-            scalar_value: {
-                int32_t: 67567616
-            }
-            enumerator: "SET_LAYER_TRANSFORM"
-            scalar_value: {
-                int32_t: 67633152
-            }
-            enumerator: "SET_LAYER_VISIBLE_REGION"
-            scalar_value: {
-                int32_t: 67698688
-            }
-            enumerator: "SET_LAYER_Z_ORDER"
-            scalar_value: {
-                int32_t: 67764224
-            }
-        }
-    }
-
-    api: {
-        name: "registerCallback"
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerCallback"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getMaxVirtualDisplayCount"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "createVirtualDisplay"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "destroyVirtualDisplay"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "createLayer"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "destroyLayer"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getActiveConfig"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getClientTargetSupport"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::common::V1_0::Dataspace"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getColorModes"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::graphics::common::V1_0::ColorMode"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getDisplayAttribute"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::Attribute"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getDisplayConfigs"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getDisplayName"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getDisplayType"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getDozeSupport"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getHdrCapabilities"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::graphics::common::V1_0::Hdr"
-            }
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setClientTargetSlotCount"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setActiveConfig"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setColorMode"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::common::V1_0::ColorMode"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setPowerMode"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::PowerMode"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setVsyncEnabled"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::Vsync"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setInputCommandQueue"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        arg: {
-            type: TYPE_FMQ_SYNC
-            fmq_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getOutputCommandQueue"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_FMQ_SYNC
-            fmq_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "executeCommands"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_HANDLE
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_HANDLE
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-}
diff --git a/graphics/composer/2.1/vts/functional/Android.bp b/graphics/composer/2.1/vts/functional/Android.bp
index aa2eae3..8e1f925 100644
--- a/graphics/composer/2.1/vts/functional/Android.bp
+++ b/graphics/composer/2.1/vts/functional/Android.bp
@@ -14,10 +14,28 @@
 // limitations under the License.
 //
 
+cc_library_static {
+    name: "libVtsHalGraphicsComposerTestUtils",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGraphicsComposerTestUtils.cpp"],
+    shared_libs: ["android.hardware.graphics.composer@2.1"],
+    static_libs: [
+        "VtsHalHidlTargetTestBase",
+    ],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+        "-O0",
+        "-g",
+    ],
+    export_include_dirs: ["."],
+}
+
 cc_test {
-    name: "graphics_composer_hidl_hal_test",
-    gtest: true,
-    srcs: ["graphics_composer_hidl_hal_test.cpp"],
+    name: "VtsHalGraphicsComposerV2_1TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGraphicsComposerV2_1TargetTest.cpp"],
     shared_libs: [
         "android.hardware.graphics.allocator@2.0",
         "android.hardware.graphics.composer@2.1",
@@ -27,14 +45,22 @@
         "libfmq",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libnativehelper",
         "libsync",
         "libutils",
     ],
-    static_libs: ["libgtest", "libhwcomposer-command-buffer"],
+    static_libs: [
+        "libhwcomposer-command-buffer",
+        "libVtsHalGraphicsAllocatorTestUtils",
+        "libVtsHalGraphicsComposerTestUtils",
+        "libVtsHalGraphicsMapperTestUtils",
+        "VtsHalHidlTargetTestBase",
+    ],
     cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
         "-O0",
         "-g",
     ]
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.cpp
new file mode 100644
index 0000000..33cf84c
--- /dev/null
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.cpp
@@ -0,0 +1,300 @@
+/*
+ * 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.
+ */
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include "VtsHalGraphicsComposerTestUtils.h"
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace composer {
+namespace V2_1 {
+namespace tests {
+
+Composer::Composer() { init(); }
+
+void Composer::init() {
+  mComposer = ::testing::VtsHalHidlTargetTestBase::getService<IComposer>();
+  ASSERT_NE(nullptr, mComposer.get()) << "failed to get composer service";
+
+  std::vector<IComposer::Capability> capabilities = getCapabilities();
+  mCapabilities.insert(capabilities.begin(), capabilities.end());
+}
+
+sp<IComposer> Composer::getRaw() const { return mComposer; }
+
+bool Composer::hasCapability(IComposer::Capability capability) const {
+  return mCapabilities.count(capability) > 0;
+}
+
+std::vector<IComposer::Capability> Composer::getCapabilities() {
+  std::vector<IComposer::Capability> capabilities;
+  mComposer->getCapabilities(
+      [&](const auto& tmpCapabilities) { capabilities = tmpCapabilities; });
+
+  return capabilities;
+}
+
+std::string Composer::dumpDebugInfo() {
+  std::string debugInfo;
+  mComposer->dumpDebugInfo(
+      [&](const auto& tmpDebugInfo) { debugInfo = tmpDebugInfo.c_str(); });
+
+  return debugInfo;
+}
+
+std::unique_ptr<ComposerClient> Composer::createClient() {
+  std::unique_ptr<ComposerClient> client;
+  mComposer->createClient([&](const auto& tmpError, const auto& tmpClient) {
+    ASSERT_EQ(Error::NONE, tmpError) << "failed to create client";
+    client = std::make_unique<ComposerClient>(tmpClient);
+  });
+
+  return client;
+}
+
+ComposerClient::ComposerClient(const sp<IComposerClient>& client)
+    : mClient(client) {}
+
+ComposerClient::~ComposerClient() {
+  for (auto it : mDisplayResources) {
+    Display display = it.first;
+    DisplayResource& resource = it.second;
+
+    for (auto layer : resource.layers) {
+      EXPECT_EQ(Error::NONE, mClient->destroyLayer(display, layer))
+          << "failed to destroy layer " << layer;
+    }
+
+    if (resource.isVirtual) {
+      EXPECT_EQ(Error::NONE, mClient->destroyVirtualDisplay(display))
+          << "failed to destroy virtual display " << display;
+    }
+  }
+  mDisplayResources.clear();
+}
+
+sp<IComposerClient> ComposerClient::getRaw() const { return mClient; }
+
+void ComposerClient::registerCallback(const sp<IComposerCallback>& callback) {
+  mClient->registerCallback(callback);
+}
+
+uint32_t ComposerClient::getMaxVirtualDisplayCount() {
+  return mClient->getMaxVirtualDisplayCount();
+}
+
+Display ComposerClient::createVirtualDisplay(uint32_t width, uint32_t height,
+                                             PixelFormat formatHint,
+                                             uint32_t outputBufferSlotCount,
+                                             PixelFormat* outFormat) {
+  Display display = 0;
+  mClient->createVirtualDisplay(
+      width, height, formatHint, outputBufferSlotCount,
+      [&](const auto& tmpError, const auto& tmpDisplay, const auto& tmpFormat) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to create virtual display";
+        display = tmpDisplay;
+        *outFormat = tmpFormat;
+
+        ASSERT_TRUE(
+            mDisplayResources.insert({display, DisplayResource(true)}).second)
+            << "duplicated virtual display id " << display;
+      });
+
+  return display;
+}
+
+void ComposerClient::destroyVirtualDisplay(Display display) {
+  Error error = mClient->destroyVirtualDisplay(display);
+  ASSERT_EQ(Error::NONE, error)
+      << "failed to destroy virtual display " << display;
+
+  mDisplayResources.erase(display);
+}
+
+Layer ComposerClient::createLayer(Display display, uint32_t bufferSlotCount) {
+  Layer layer = 0;
+  mClient->createLayer(
+      display, bufferSlotCount,
+      [&](const auto& tmpError, const auto& tmpLayer) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to create layer";
+        layer = tmpLayer;
+
+        auto resourceIt = mDisplayResources.find(display);
+        if (resourceIt == mDisplayResources.end()) {
+          resourceIt =
+              mDisplayResources.insert({display, DisplayResource(false)}).first;
+        }
+
+        ASSERT_TRUE(resourceIt->second.layers.insert(layer).second)
+            << "duplicated layer id " << layer;
+      });
+
+  return layer;
+}
+
+void ComposerClient::destroyLayer(Display display, Layer layer) {
+  Error error = mClient->destroyLayer(display, layer);
+  ASSERT_EQ(Error::NONE, error) << "failed to destroy layer " << layer;
+
+  auto resourceIt = mDisplayResources.find(display);
+  ASSERT_NE(mDisplayResources.end(), resourceIt);
+  resourceIt->second.layers.erase(layer);
+}
+
+Config ComposerClient::getActiveConfig(Display display) {
+  Config config = 0;
+  mClient->getActiveConfig(
+      display, [&](const auto& tmpError, const auto& tmpConfig) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to get active config";
+        config = tmpConfig;
+      });
+
+  return config;
+}
+
+bool ComposerClient::getClientTargetSupport(Display display, uint32_t width,
+                                            uint32_t height, PixelFormat format,
+                                            Dataspace dataspace) {
+  Error error = mClient->getClientTargetSupport(display, width, height, format,
+                                                dataspace);
+  return error == Error::NONE;
+}
+
+std::vector<ColorMode> ComposerClient::getColorModes(Display display) {
+  std::vector<ColorMode> modes;
+  mClient->getColorModes(
+      display, [&](const auto& tmpError, const auto& tmpMode) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to get color mode";
+        modes = tmpMode;
+      });
+
+  return modes;
+}
+
+int32_t ComposerClient::getDisplayAttribute(
+    Display display, Config config, IComposerClient::Attribute attribute) {
+  int32_t value = 0;
+  mClient->getDisplayAttribute(display, config, attribute,
+                               [&](const auto& tmpError, const auto& tmpValue) {
+                                 ASSERT_EQ(Error::NONE, tmpError)
+                                     << "failed to get display attribute";
+                                 value = tmpValue;
+                               });
+
+  return value;
+}
+
+std::vector<Config> ComposerClient::getDisplayConfigs(Display display) {
+  std::vector<Config> configs;
+  mClient->getDisplayConfigs(
+      display, [&](const auto& tmpError, const auto& tmpConfigs) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to get display configs";
+        configs = tmpConfigs;
+      });
+
+  return configs;
+}
+
+std::string ComposerClient::getDisplayName(Display display) {
+  std::string name;
+  mClient->getDisplayName(
+      display, [&](const auto& tmpError, const auto& tmpName) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to get display name";
+        name = tmpName.c_str();
+      });
+
+  return name;
+}
+
+IComposerClient::DisplayType ComposerClient::getDisplayType(Display display) {
+  IComposerClient::DisplayType type = IComposerClient::DisplayType::INVALID;
+  mClient->getDisplayType(
+      display, [&](const auto& tmpError, const auto& tmpType) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to get display type";
+        type = tmpType;
+      });
+
+  return type;
+}
+
+bool ComposerClient::getDozeSupport(Display display) {
+  bool support = false;
+  mClient->getDozeSupport(
+      display, [&](const auto& tmpError, const auto& tmpSupport) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to get doze support";
+        support = tmpSupport;
+      });
+
+  return support;
+}
+
+std::vector<Hdr> ComposerClient::getHdrCapabilities(
+    Display display, float* outMaxLuminance, float* outMaxAverageLuminance,
+    float* outMinLuminance) {
+  std::vector<Hdr> types;
+  mClient->getHdrCapabilities(
+      display,
+      [&](const auto& tmpError, const auto& tmpTypes,
+          const auto& tmpMaxLuminance, const auto& tmpMaxAverageLuminance,
+          const auto& tmpMinLuminance) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to get HDR capabilities";
+        types = tmpTypes;
+        *outMaxLuminance = tmpMaxLuminance;
+        *outMaxAverageLuminance = tmpMaxAverageLuminance;
+        *outMinLuminance = tmpMinLuminance;
+      });
+
+  return types;
+}
+
+void ComposerClient::setClientTargetSlotCount(Display display,
+                                              uint32_t clientTargetSlotCount) {
+  Error error =
+      mClient->setClientTargetSlotCount(display, clientTargetSlotCount);
+  ASSERT_EQ(Error::NONE, error) << "failed to set client target slot count";
+}
+
+void ComposerClient::setActiveConfig(Display display, Config config) {
+  Error error = mClient->setActiveConfig(display, config);
+  ASSERT_EQ(Error::NONE, error) << "failed to set active config";
+}
+
+void ComposerClient::setColorMode(Display display, ColorMode mode) {
+  Error error = mClient->setColorMode(display, mode);
+  ASSERT_EQ(Error::NONE, error) << "failed to set color mode";
+}
+
+void ComposerClient::setPowerMode(Display display,
+                                  IComposerClient::PowerMode mode) {
+  Error error = mClient->setPowerMode(display, mode);
+  ASSERT_EQ(Error::NONE, error) << "failed to set power mode";
+}
+
+void ComposerClient::setVsyncEnabled(Display display, bool enabled) {
+  IComposerClient::Vsync vsync = (enabled) ? IComposerClient::Vsync::ENABLE
+                                           : IComposerClient::Vsync::DISABLE;
+  Error error = mClient->setVsyncEnabled(display, vsync);
+  ASSERT_EQ(Error::NONE, error) << "failed to set vsync mode";
+}
+
+}  // namespace tests
+}  // namespace V2_1
+}  // namespace composer
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.h b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.h
new file mode 100644
index 0000000..4b57264
--- /dev/null
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.h
@@ -0,0 +1,126 @@
+/*
+ * 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.
+ */
+
+#ifndef VTS_HAL_GRAPHICS_COMPOSER_UTILS
+#define VTS_HAL_GRAPHICS_COMPOSER_UTILS
+
+#include <memory>
+#include <string>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
+
+#include <android/hardware/graphics/composer/2.1/IComposer.h>
+#include <utils/StrongPointer.h>
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace composer {
+namespace V2_1 {
+namespace tests {
+
+using android::hardware::graphics::common::V1_0::ColorMode;
+using android::hardware::graphics::common::V1_0::Dataspace;
+using android::hardware::graphics::common::V1_0::Hdr;
+using android::hardware::graphics::common::V1_0::PixelFormat;
+
+class ComposerClient;
+
+// A wrapper to IComposer.
+class Composer {
+ public:
+  Composer();
+
+  sp<IComposer> getRaw() const;
+
+  // Returns true when the composer supports the specified capability.
+  bool hasCapability(IComposer::Capability capability) const;
+
+  std::vector<IComposer::Capability> getCapabilities();
+  std::string dumpDebugInfo();
+  std::unique_ptr<ComposerClient> createClient();
+
+ private:
+  void init();
+
+  sp<IComposer> mComposer;
+  std::unordered_set<IComposer::Capability> mCapabilities;
+};
+
+// A wrapper to IComposerClient.
+class ComposerClient {
+ public:
+  ComposerClient(const sp<IComposerClient>& client);
+  ~ComposerClient();
+
+  sp<IComposerClient> getRaw() const;
+
+  void registerCallback(const sp<IComposerCallback>& callback);
+  uint32_t getMaxVirtualDisplayCount();
+
+  Display createVirtualDisplay(uint32_t width, uint32_t height,
+                               PixelFormat formatHint,
+                               uint32_t outputBufferSlotCount,
+                               PixelFormat* outFormat);
+  void destroyVirtualDisplay(Display display);
+
+  Layer createLayer(Display display, uint32_t bufferSlotCount);
+  void destroyLayer(Display display, Layer layer);
+
+  Config getActiveConfig(Display display);
+  bool getClientTargetSupport(Display display, uint32_t width, uint32_t height,
+                              PixelFormat format, Dataspace dataspace);
+  std::vector<ColorMode> getColorModes(Display display);
+  int32_t getDisplayAttribute(Display display, Config config,
+                              IComposerClient::Attribute attribute);
+  std::vector<Config> getDisplayConfigs(Display display);
+  std::string getDisplayName(Display display);
+  IComposerClient::DisplayType getDisplayType(Display display);
+  bool getDozeSupport(Display display);
+  std::vector<Hdr> getHdrCapabilities(Display display, float* outMaxLuminance,
+                                      float* outMaxAverageLuminance,
+                                      float* outMinLuminance);
+
+  void setClientTargetSlotCount(Display display,
+                                uint32_t clientTargetSlotCount);
+  void setActiveConfig(Display display, Config config);
+  void setColorMode(Display display, ColorMode mode);
+  void setPowerMode(Display display, IComposerClient::PowerMode mode);
+  void setVsyncEnabled(Display display, bool enabled);
+
+ private:
+  sp<IComposerClient> mClient;
+
+  // Keep track of all virtual displays and layers.  When a test fails with
+  // ASSERT_*, the destructor will clean up the resources for the test.
+  struct DisplayResource {
+    DisplayResource(bool isVirtual_) : isVirtual(isVirtual_) {}
+
+    bool isVirtual;
+    std::unordered_set<Layer> layers;
+  };
+  std::unordered_map<Display, DisplayResource> mDisplayResources;
+};
+
+}  // namespace tests
+}  // namespace V2_1
+}  // namespace composer
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
+
+#endif  // VTS_HAL_GRAPHICS_COMPOSER_UTILS
diff --git a/graphics/composer/2.1/vts/functional/graphics_composer_hidl_hal_test.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
similarity index 60%
rename from graphics/composer/2.1/vts/functional/graphics_composer_hidl_hal_test.cpp
rename to graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
index e3e35bb..0da3a33 100644
--- a/graphics/composer/2.1/vts/functional/graphics_composer_hidl_hal_test.cpp
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
@@ -18,11 +18,11 @@
 
 #include <IComposerCommandBuffer.h>
 #include <android-base/logging.h>
-#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
-#include <android/hardware/graphics/composer/2.1/IComposer.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
+#include "VtsHalGraphicsAllocatorTestUtils.h"
+#include "VtsHalGraphicsComposerTestUtils.h"
+#include "VtsHalGraphicsMapperTestUtils.h"
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <unistd.h>
 
 #include <algorithm>
@@ -46,12 +46,15 @@
 using android::hardware::graphics::allocator::V2_0::IAllocator;
 using android::hardware::graphics::allocator::V2_0::IAllocatorClient;
 using android::hardware::graphics::allocator::V2_0::ProducerUsage;
+using android::hardware::graphics::allocator::V2_0::tests::Allocator;
+using android::hardware::graphics::allocator::V2_0::tests::AllocatorClient;
 using android::hardware::graphics::common::V1_0::ColorMode;
 using android::hardware::graphics::common::V1_0::ColorTransform;
 using android::hardware::graphics::common::V1_0::Dataspace;
 using android::hardware::graphics::common::V1_0::PixelFormat;
 using android::hardware::graphics::common::V1_0::Transform;
 using android::hardware::graphics::mapper::V2_0::IMapper;
+using android::hardware::graphics::mapper::V2_0::tests::Mapper;
 using GrallocError = android::hardware::graphics::allocator::V2_0::Error;
 
 // IComposerCallback to be installed with IComposerClient::registerCallback.
@@ -131,16 +134,11 @@
   int mInvalidVsyncCount = 0;
 };
 
-class GraphicsComposerHidlTest : public ::testing::Test {
+class GraphicsComposerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  protected:
   void SetUp() override {
-    mComposer = IComposer::getService("hwcomposer");
-    ASSERT_NE(nullptr, mComposer.get());
-
-    mComposerClient = createClient();
-    ASSERT_NE(nullptr, mComposerClient.get());
-
-    initCapabilities();
+    ASSERT_NO_FATAL_FAILURE(mComposer = std::make_unique<Composer>());
+    ASSERT_NO_FATAL_FAILURE(mComposerClient = mComposer->createClient());
 
     mComposerCallback = new GraphicsComposerCallback;
     mComposerClient->registerCallback(mComposerCallback);
@@ -157,177 +155,16 @@
     }
   }
 
-  /**
-   * Initialize the set of supported capabilities.
-   */
-  void initCapabilities() {
-    mComposer->getCapabilities([this](const auto& capabilities) {
-      std::vector<IComposer::Capability> caps = capabilities;
-      mCapabilities.insert(caps.cbegin(), caps.cend());
-    });
-  }
-
-  /**
-   * Test whether a capability is supported.
-   */
-  bool hasCapability(IComposer::Capability capability) const {
-    return (mCapabilities.count(capability) > 0);
-  }
-
-  IComposerClient::DisplayType getDisplayType(Display display) {
-    IComposerClient::DisplayType type = IComposerClient::DisplayType::INVALID;
-    mComposerClient->getDisplayType(
-        display, [&](const auto& tmpError, const auto& tmpType) {
-          ASSERT_EQ(Error::NONE, tmpError);
-          type = tmpType;
-        });
-    return type;
-  }
-
-  Error createVirtualDisplay(Display* outDisplay) {
-    auto ret_count = mComposerClient->getMaxVirtualDisplayCount();
-    if (ret_count == 0) {
-      return Error::UNSUPPORTED;
-    }
-
-    Error err = Error::NO_RESOURCES;
-    Display display;
-    mComposerClient->createVirtualDisplay(
-        64, 64, PixelFormat::IMPLEMENTATION_DEFINED, kBufferSlotCount,
-        [&](const auto& tmpError, const auto& tmpDisplay, const auto&) {
-          err = tmpError;
-          display = tmpDisplay;
-        });
-
-    *outDisplay = display;
-    return err;
-  }
-
-  void destroyVirtualDisplay(Display display) {
-    auto ret = mComposerClient->destroyVirtualDisplay(display);
-    ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
-  }
-
-  Error createLayer(Layer* outLayer) {
-    Error err = Error::NO_RESOURCES;
-    Layer layer;
-    mComposerClient->createLayer(
-        mPrimaryDisplay, kBufferSlotCount,
-        [&](const auto& tmpError, const auto& tmpLayer) {
-          err = tmpError;
-          layer = tmpLayer;
-        });
-
-    *outLayer = layer;
-    return err;
-  }
-
-  void destroyLayer(Layer layer) {
-    auto ret = mComposerClient->destroyLayer(mPrimaryDisplay, layer);
-    ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
-  }
-
-  int32_t getDisplayAttribute(Config config,
-                              IComposerClient::Attribute attribute) {
-    int32_t value = -1;
-    mComposerClient->getDisplayAttribute(
-        mPrimaryDisplay, config, attribute,
-        [&](const auto& tmpError, const auto& tmpValue) {
-          ASSERT_EQ(Error::NONE, tmpError);
-          value = tmpValue;
-        });
-    return value;
-  }
-
-  std::vector<Config> getDisplayConfigs() {
-    std::vector<Config> configs;
-    mComposerClient->getDisplayConfigs(
-        mPrimaryDisplay, [&](const auto& tmpError, const auto& tmpConfigs) {
-          ASSERT_EQ(Error::NONE, tmpError);
-
-          configs = tmpConfigs;
-          ASSERT_FALSE(configs.empty());
-        });
-
-    return configs;
-  }
-
-  std::vector<ColorMode> getColorModes() {
-    std::vector<ColorMode> modes;
-    mComposerClient->getColorModes(
-        mPrimaryDisplay, [&](const auto& tmpError, const auto& tmpModes) {
-          ASSERT_EQ(Error::NONE, tmpError);
-
-          modes = tmpModes;
-          ASSERT_NE(modes.end(),
-                    std::find(modes.begin(), modes.end(), ColorMode::NATIVE));
-        });
-
-    return modes;
-  }
-
-  std::vector<IComposerClient::PowerMode> getPowerModes() {
-    std::vector<IComposerClient::PowerMode> modes;
-    modes.push_back(IComposerClient::PowerMode::OFF);
-
-    mComposerClient->getDozeSupport(
-        mPrimaryDisplay, [&](const auto& tmpError, const auto& tmpSupport) {
-          ASSERT_EQ(Error::NONE, tmpError);
-          if (tmpSupport) {
-            modes.push_back(IComposerClient::PowerMode::DOZE);
-            modes.push_back(IComposerClient::PowerMode::DOZE_SUSPEND);
-          }
-        });
-
-    // push ON last
-    modes.push_back(IComposerClient::PowerMode::ON);
-
-    return modes;
-  }
-
-  void setActiveConfig(Config config) {
-    auto ret = mComposerClient->setActiveConfig(mPrimaryDisplay, config);
-    ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
-  }
-
-  void setColorMode(ColorMode mode) {
-    auto ret = mComposerClient->setColorMode(mPrimaryDisplay, mode);
-    ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
-  }
-
-  void setPowerMode(IComposerClient::PowerMode mode) {
-    auto ret = mComposerClient->setPowerMode(mPrimaryDisplay, mode);
-    ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
-  }
-
-  void setVsyncEnabled(bool enable) {
-    auto ret = mComposerClient->setVsyncEnabled(
-        mPrimaryDisplay,
-        enable ? IComposerClient::Vsync::ENABLE
-               : IComposerClient::Vsync::DISABLE);
-    ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
-  }
   // use the slot count usually set by SF
   static constexpr uint32_t kBufferSlotCount = 64;
 
-  sp<IComposer> mComposer;
-  sp<IComposerClient> mComposerClient;
+  std::unique_ptr<Composer> mComposer;
+  std::unique_ptr<ComposerClient> mComposerClient;
   sp<GraphicsComposerCallback> mComposerCallback;
   // the first display and is assumed never to be removed
   Display mPrimaryDisplay;
 
  private:
-  sp<IComposerClient> createClient() {
-    sp<IComposerClient> client;
-    mComposer->createClient([&](const auto& tmpError, const auto& tmpClient) {
-      if (tmpError == Error::NONE) {
-        client = tmpClient;
-      }
-    });
-
-    return client;
-  }
-
   Display waitForFirstDisplay() {
     while (true) {
       std::vector<Display> displays = mComposerCallback->getDisplays();
@@ -339,9 +176,6 @@
       return displays[0];
     }
   }
-
-  // the set of all supported capabilities
-  std::unordered_set<IComposer::Capability> mCapabilities;
 };
 
 /**
@@ -350,22 +184,16 @@
  * Test that IComposer::getCapabilities returns no invalid capabilities.
  */
 TEST_F(GraphicsComposerHidlTest, GetCapabilities) {
-  mComposer->getCapabilities([](const auto& tmpCapabilities) {
-    std::vector<IComposer::Capability> capabilities = tmpCapabilities;
-    ASSERT_EQ(capabilities.end(),
-              std::find(capabilities.begin(), capabilities.end(),
-                        IComposer::Capability::INVALID));
-  });
+  auto capabilities = mComposer->getCapabilities();
+  ASSERT_EQ(capabilities.end(),
+            std::find(capabilities.begin(), capabilities.end(),
+                      IComposer::Capability::INVALID));
 }
 
 /**
  * Test IComposer::dumpDebugInfo.
  */
-TEST_F(GraphicsComposerHidlTest, DumpDebugInfo) {
-  mComposer->dumpDebugInfo([](const auto&) {
-    // nothing to do
-  });
-}
+TEST_F(GraphicsComposerHidlTest, DumpDebugInfo) { mComposer->dumpDebugInfo(); }
 
 /**
  * Test IComposer::createClient.
@@ -373,7 +201,7 @@
  * Test that IComposerClient is a singleton.
  */
 TEST_F(GraphicsComposerHidlTest, CreateClientSingleton) {
-  mComposer->createClient([&](const auto& tmpError, const auto&) {
+  mComposer->getRaw()->createClient([&](const auto& tmpError, const auto&) {
     EXPECT_EQ(Error::NO_RESOURCES, tmpError);
   });
 }
@@ -385,19 +213,22 @@
  * Test that virtual displays can be created and has the correct display type.
  */
 TEST_F(GraphicsComposerHidlTest, CreateVirtualDisplay) {
-  Display display;
-  Error err = createVirtualDisplay(&display);
-  if (err == Error::UNSUPPORTED) {
+  if (mComposerClient->getMaxVirtualDisplayCount() == 0) {
     GTEST_SUCCEED() << "no virtual display support";
     return;
   }
-  ASSERT_EQ(Error::NONE, err);
+
+  Display display;
+  PixelFormat format;
+  ASSERT_NO_FATAL_FAILURE(display = mComposerClient->createVirtualDisplay(
+                              64, 64, PixelFormat::IMPLEMENTATION_DEFINED,
+                              kBufferSlotCount, &format));
 
   // test display type
-  IComposerClient::DisplayType type = getDisplayType(display);
+  IComposerClient::DisplayType type = mComposerClient->getDisplayType(display);
   EXPECT_EQ(IComposerClient::DisplayType::VIRTUAL, type);
 
-  destroyVirtualDisplay(display);
+  mComposerClient->destroyVirtualDisplay(display);
 }
 
 /**
@@ -407,20 +238,17 @@
  */
 TEST_F(GraphicsComposerHidlTest, CreateLayer) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
-  destroyLayer(layer);
+  mComposerClient->destroyLayer(mPrimaryDisplay, layer);
 }
 
 /**
  * Test IComposerClient::getDisplayName.
  */
 TEST_F(GraphicsComposerHidlTest, GetDisplayName) {
-  mComposerClient->getDisplayName(mPrimaryDisplay,
-                                  [&](const auto& tmpError, const auto&) {
-                                    ASSERT_EQ(Error::NONE, tmpError);
-                                  });
+  mComposerClient->getDisplayName(mPrimaryDisplay);
 }
 
 /**
@@ -430,8 +258,8 @@
  * for the primary display.
  */
 TEST_F(GraphicsComposerHidlTest, GetDisplayType) {
-  IComposerClient::DisplayType type = getDisplayType(mPrimaryDisplay);
-  EXPECT_EQ(IComposerClient::DisplayType::PHYSICAL, type);
+  ASSERT_EQ(IComposerClient::DisplayType::PHYSICAL,
+            mComposerClient->getDisplayType(mPrimaryDisplay));
 }
 
 /**
@@ -441,21 +269,21 @@
  * required client targets.
  */
 TEST_F(GraphicsComposerHidlTest, GetClientTargetSupport) {
-  std::vector<Config> configs = getDisplayConfigs();
+  std::vector<Config> configs =
+      mComposerClient->getDisplayConfigs(mPrimaryDisplay);
   for (auto config : configs) {
-    int32_t width =
-        getDisplayAttribute(config, IComposerClient::Attribute::WIDTH);
-    int32_t height =
-        getDisplayAttribute(config, IComposerClient::Attribute::HEIGHT);
+    int32_t width = mComposerClient->getDisplayAttribute(
+        mPrimaryDisplay, config, IComposerClient::Attribute::WIDTH);
+    int32_t height = mComposerClient->getDisplayAttribute(
+        mPrimaryDisplay, config, IComposerClient::Attribute::HEIGHT);
     ASSERT_LT(0, width);
     ASSERT_LT(0, height);
 
-    setActiveConfig(config);
+    mComposerClient->setActiveConfig(mPrimaryDisplay, config);
 
-    auto ret = mComposerClient->getClientTargetSupport(
+    ASSERT_TRUE(mComposerClient->getClientTargetSupport(
         mPrimaryDisplay, width, height, PixelFormat::RGBA_8888,
-        Dataspace::UNKNOWN);
-    ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
+        Dataspace::UNKNOWN));
   }
 }
 
@@ -466,21 +294,22 @@
  * formats, and succeeds or fails correctly for optional attributes.
  */
 TEST_F(GraphicsComposerHidlTest, GetDisplayAttribute) {
-  std::vector<Config> configs = getDisplayConfigs();
+  std::vector<Config> configs =
+      mComposerClient->getDisplayConfigs(mPrimaryDisplay);
   for (auto config : configs) {
     const std::array<IComposerClient::Attribute, 3> requiredAttributes = {{
         IComposerClient::Attribute::WIDTH, IComposerClient::Attribute::HEIGHT,
         IComposerClient::Attribute::VSYNC_PERIOD,
     }};
     for (auto attribute : requiredAttributes) {
-      getDisplayAttribute(config, attribute);
+      mComposerClient->getDisplayAttribute(mPrimaryDisplay, config, attribute);
     }
 
     const std::array<IComposerClient::Attribute, 2> optionalAttributes = {{
         IComposerClient::Attribute::DPI_X, IComposerClient::Attribute::DPI_Y,
     }};
     for (auto attribute : optionalAttributes) {
-      mComposerClient->getDisplayAttribute(
+      mComposerClient->getRaw()->getDisplayAttribute(
           mPrimaryDisplay, config, attribute,
           [&](const auto& tmpError, const auto&) {
             EXPECT_TRUE(tmpError == Error::NONE ||
@@ -494,19 +323,18 @@
  * Test IComposerClient::getHdrCapabilities.
  */
 TEST_F(GraphicsComposerHidlTest, GetHdrCapabilities) {
-  mComposerClient->getHdrCapabilities(
-      mPrimaryDisplay,
-      [&](const auto& tmpError, const auto&, const auto&, const auto&,
-          const auto&) { ASSERT_EQ(Error::NONE, tmpError); });
+  float maxLuminance;
+  float maxAverageLuminance;
+  float minLuminance;
+  mComposerClient->getHdrCapabilities(mPrimaryDisplay, &maxLuminance,
+                                      &maxAverageLuminance, &minLuminance);
 }
 
 /**
  * Test IComposerClient::setClientTargetSlotCount.
  */
 TEST_F(GraphicsComposerHidlTest, SetClientTargetSlotCount) {
-  auto ret = mComposerClient->setClientTargetSlotCount(mPrimaryDisplay,
-                                                       kBufferSlotCount);
-  ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
+  mComposerClient->setClientTargetSlotCount(mPrimaryDisplay, kBufferSlotCount);
 }
 
 /**
@@ -516,15 +344,11 @@
  * configs.
  */
 TEST_F(GraphicsComposerHidlTest, SetActiveConfig) {
-  std::vector<Config> configs = getDisplayConfigs();
+  std::vector<Config> configs =
+      mComposerClient->getDisplayConfigs(mPrimaryDisplay);
   for (auto config : configs) {
-    setActiveConfig(config);
-
-    mComposerClient->getActiveConfig(
-        mPrimaryDisplay, [&](const auto& tmpError, const auto& tmpConfig) {
-          EXPECT_EQ(Error::NONE, tmpError);
-          EXPECT_EQ(config, tmpConfig);
-        });
+    mComposerClient->setActiveConfig(mPrimaryDisplay, config);
+    ASSERT_EQ(config, mComposerClient->getActiveConfig(mPrimaryDisplay));
   }
 }
 
@@ -534,9 +358,10 @@
  * Test that IComposerClient::setColorMode succeeds for all color modes.
  */
 TEST_F(GraphicsComposerHidlTest, SetColorMode) {
-  std::vector<ColorMode> modes = getColorModes();
+  std::vector<ColorMode> modes =
+      mComposerClient->getColorModes(mPrimaryDisplay);
   for (auto mode : modes) {
-    setColorMode(mode);
+    mComposerClient->setColorMode(mPrimaryDisplay, mode);
   }
 }
 
@@ -546,9 +371,19 @@
  * Test that IComposerClient::setPowerMode succeeds for all power modes.
  */
 TEST_F(GraphicsComposerHidlTest, SetPowerMode) {
-  std::vector<IComposerClient::PowerMode> modes = getPowerModes();
+  std::vector<IComposerClient::PowerMode> modes;
+  modes.push_back(IComposerClient::PowerMode::OFF);
+
+  if (mComposerClient->getDozeSupport(mPrimaryDisplay)) {
+    modes.push_back(IComposerClient::PowerMode::DOZE);
+    modes.push_back(IComposerClient::PowerMode::DOZE_SUSPEND);
+  }
+
+  // push ON last
+  modes.push_back(IComposerClient::PowerMode::ON);
+
   for (auto mode : modes) {
-    setPowerMode(mode);
+    mComposerClient->setPowerMode(mPrimaryDisplay, mode);
   }
 }
 
@@ -561,9 +396,9 @@
 TEST_F(GraphicsComposerHidlTest, SetVsyncEnabled) {
   mComposerCallback->setVsyncAllowed(true);
 
-  setVsyncEnabled(true);
+  mComposerClient->setVsyncEnabled(mPrimaryDisplay, true);
   usleep(60 * 1000);
-  setVsyncEnabled(false);
+  mComposerClient->setVsyncEnabled(mPrimaryDisplay, false);
 
   mComposerCallback->setVsyncAllowed(false);
 }
@@ -573,7 +408,10 @@
  protected:
   void SetUp() override {
     ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::SetUp());
-    ASSERT_NO_FATAL_FAILURE(SetUpGralloc());
+
+    ASSERT_NO_FATAL_FAILURE(mAllocator = std::make_unique<Allocator>());
+    ASSERT_NO_FATAL_FAILURE(mAllocatorClient = mAllocator->createClient());
+    ASSERT_NO_FATAL_FAILURE(mMapper = std::make_unique<Mapper>());
 
     mWriter = std::make_unique<CommandWriterBase>(1024);
     mReader = std::make_unique<CommandReader>();
@@ -583,80 +421,6 @@
     ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::TearDown());
   }
 
-  const native_handle_t* cloneBuffer(const native_handle_t* handle) {
-    auto clone = native_handle_clone(handle);
-    if (!clone) {
-      return nullptr;
-    }
-
-    GrallocError err = mMapper->retain(clone);
-    if (err != GrallocError::NONE) {
-      native_handle_close(clone);
-      native_handle_delete(const_cast<native_handle_t*>(clone));
-      return nullptr;
-    }
-
-    return clone;
-  }
-
-  const native_handle_t* allocate(
-      const IAllocatorClient::BufferDescriptorInfo& info) {
-    // create descriptor
-    GrallocError err = GrallocError::NO_RESOURCES;
-    BufferDescriptor descriptor;
-    mAllocatorClient->createDescriptor(
-        info, [&](const auto& tmpError, const auto& tmpDescriptor) {
-          err = tmpError;
-          descriptor = tmpDescriptor;
-        });
-    if (err != GrallocError::NONE) {
-      return nullptr;
-    }
-
-    // allocate buffer
-    hidl_vec<BufferDescriptor> descriptors;
-    hidl_vec<Buffer> buffers;
-    descriptors.setToExternal(&descriptor, 1);
-    err = GrallocError::NO_RESOURCES;
-    mAllocatorClient->allocate(
-        descriptors, [&](const auto& tmpError, const auto& tmpBuffers) {
-          err = tmpError;
-          buffers = tmpBuffers;
-        });
-    if ((err != GrallocError::NONE && err != GrallocError::NOT_SHARED) ||
-        buffers.size() != 1) {
-      mAllocatorClient->destroyDescriptor(descriptors[0]);
-      return nullptr;
-    }
-
-    // export handle
-    err = GrallocError::NO_RESOURCES;
-    const native_handle_t* handle = nullptr;
-    mAllocatorClient->exportHandle(
-        descriptors[0], buffers[0],
-        [&](const auto& tmpError, const auto& tmpHandle) {
-          err = tmpError;
-          if (err != GrallocError::NONE) {
-            return;
-          }
-
-          handle = cloneBuffer(tmpHandle.getNativeHandle());
-          if (!handle) {
-            err = GrallocError::NO_RESOURCES;
-            return;
-          }
-        });
-
-    mAllocatorClient->destroyDescriptor(descriptors[0]);
-    mAllocatorClient->free(buffers[0]);
-
-    if (err != GrallocError::NONE) {
-      return nullptr;
-    }
-
-    return handle;
-  }
-
   const native_handle_t* allocate() {
     IAllocatorClient::BufferDescriptorInfo info{};
     info.width = 64;
@@ -666,12 +430,7 @@
     info.producerUsageMask = static_cast<uint64_t>(ProducerUsage::CPU_WRITE);
     info.consumerUsageMask = static_cast<uint64_t>(ConsumerUsage::CPU_READ);
 
-    return allocate(info);
-  }
-
-  void free(const native_handle_t* handle) {
-    auto ret = mMapper->release(handle);
-    ASSERT_EQ(GrallocError::NONE, static_cast<GrallocError>(ret));
+    return mMapper->allocate(mAllocatorClient, info);
   }
 
   void execute() {
@@ -682,20 +441,20 @@
         mWriter->writeQueue(&queueChanged, &commandLength, &commandHandles));
 
     if (queueChanged) {
-      auto ret =
-          mComposerClient->setInputCommandQueue(*mWriter->getMQDescriptor());
+      auto ret = mComposerClient->getRaw()->setInputCommandQueue(
+          *mWriter->getMQDescriptor());
       ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
       return;
     }
 
-    mComposerClient->executeCommands(
+    mComposerClient->getRaw()->executeCommands(
         commandLength, commandHandles,
         [&](const auto& tmpError, const auto& tmpOutQueueChanged,
             const auto& tmpOutLength, const auto& tmpOutHandles) {
           ASSERT_EQ(Error::NONE, tmpError);
 
           if (tmpOutQueueChanged) {
-            mComposerClient->getOutputCommandQueue(
+            mComposerClient->getRaw()->getOutputCommandQueue(
                 [&](const auto& tmpError, const auto& tmpDescriptor) {
                   ASSERT_EQ(Error::NONE, tmpError);
                   mReader->setMQDescriptor(tmpDescriptor);
@@ -748,25 +507,9 @@
   std::unique_ptr<CommandReader> mReader;
 
  private:
-  void SetUpGralloc() {
-    mAllocator = IAllocator::getService("gralloc");
-    ASSERT_NE(nullptr, mAllocator.get());
-
-    mAllocator->createClient([this](const auto& error, const auto& client) {
-      if (error == GrallocError::NONE) {
-        mAllocatorClient = client;
-      }
-    });
-    ASSERT_NE(nullptr, mAllocatorClient.get());
-
-    mMapper = IMapper::getService("gralloc-mapper");
-    ASSERT_NE(nullptr, mMapper.get());
-    ASSERT_FALSE(mMapper->isRemote());
-  }
-
-  sp<IAllocator> mAllocator;
-  sp<IAllocatorClient> mAllocatorClient;
-  sp<IMapper> mMapper;
+  std::unique_ptr<Allocator> mAllocator;
+  std::unique_ptr<AllocatorClient> mAllocatorClient;
+  std::unique_ptr<Mapper> mMapper;
 };
 
 /**
@@ -801,22 +544,23 @@
  * Test IComposerClient::Command::SET_OUTPUT_BUFFER.
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_OUTPUT_BUFFER) {
-  auto handle = allocate();
-  ASSERT_NE(nullptr, handle);
-
-  Display display;
-  Error err = createVirtualDisplay(&display);
-  if (err == Error::UNSUPPORTED) {
+  if (mComposerClient->getMaxVirtualDisplayCount() == 0) {
     GTEST_SUCCEED() << "no virtual display support";
     return;
   }
-  ASSERT_EQ(Error::NONE, err);
+
+  Display display;
+  PixelFormat format;
+  ASSERT_NO_FATAL_FAILURE(display = mComposerClient->createVirtualDisplay(
+                              64, 64, PixelFormat::IMPLEMENTATION_DEFINED,
+                              kBufferSlotCount, &format));
+
+  const native_handle_t* handle;
+  ASSERT_NO_FATAL_FAILURE(handle = allocate());
 
   mWriter->selectDisplay(display);
   mWriter->setOutputBuffer(0, handle, -1);
-
-  destroyVirtualDisplay(display);
-  free(handle);
+  execute();
 }
 
 /**
@@ -853,16 +597,14 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_CURSOR_POSITION) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerCursorPosition(1, 1);
   mWriter->setLayerCursorPosition(0, 0);
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -873,16 +615,13 @@
   ASSERT_NE(nullptr, handle);
 
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerBuffer(0, handle, -1);
   execute();
-
-  destroyLayer(layer);
-  free(handle);
 }
 
 /**
@@ -890,8 +629,8 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_SURFACE_DAMAGE) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   IComposerClient::Rect empty{0, 0, 0, 0};
   IComposerClient::Rect unit{0, 0, 1, 1};
@@ -902,8 +641,6 @@
   mWriter->setLayerSurfaceDamage(std::vector<IComposerClient::Rect>(1, unit));
   mWriter->setLayerSurfaceDamage(std::vector<IComposerClient::Rect>());
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -911,8 +648,8 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_BLEND_MODE) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
@@ -920,8 +657,6 @@
   mWriter->setLayerBlendMode(IComposerClient::BlendMode::PREMULTIPLIED);
   mWriter->setLayerBlendMode(IComposerClient::BlendMode::COVERAGE);
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -929,16 +664,14 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_COLOR) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerColor(IComposerClient::Color{0xff, 0xff, 0xff, 0xff});
   mWriter->setLayerColor(IComposerClient::Color{0, 0, 0, 0});
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -946,8 +679,8 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_COMPOSITION_TYPE) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
@@ -956,8 +689,6 @@
   mWriter->setLayerCompositionType(IComposerClient::Composition::SOLID_COLOR);
   mWriter->setLayerCompositionType(IComposerClient::Composition::CURSOR);
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -965,15 +696,13 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_DATASPACE) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerDataspace(Dataspace::UNKNOWN);
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -981,15 +710,13 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_DISPLAY_FRAME) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerDisplayFrame(IComposerClient::Rect{0, 0, 1, 1});
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -997,23 +724,21 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_PLANE_ALPHA) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerPlaneAlpha(0.0f);
   mWriter->setLayerPlaneAlpha(1.0f);
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
  * Test IComposerClient::Command::SET_LAYER_SIDEBAND_STREAM.
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_SIDEBAND_STREAM) {
-  if (!hasCapability(IComposer::Capability::SIDEBAND_STREAM)) {
+  if (!mComposer->hasCapability(IComposer::Capability::SIDEBAND_STREAM)) {
     GTEST_SUCCEED() << "no sideband stream support";
     return;
   }
@@ -1022,16 +747,13 @@
   ASSERT_NE(nullptr, handle);
 
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerSidebandStream(handle);
   execute();
-
-  destroyLayer(layer);
-  free(handle);
 }
 
 /**
@@ -1039,15 +761,13 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_SOURCE_CROP) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerSourceCrop(IComposerClient::FRect{0.0f, 0.0f, 1.0f, 1.0f});
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -1055,8 +775,8 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_TRANSFORM) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
@@ -1071,8 +791,6 @@
   mWriter->setLayerTransform(
       static_cast<Transform>(Transform::FLIP_V | Transform::ROT_90));
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -1080,8 +798,8 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_VISIBLE_REGION) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   IComposerClient::Rect empty{0, 0, 0, 0};
   IComposerClient::Rect unit{0, 0, 1, 1};
@@ -1092,8 +810,6 @@
   mWriter->setLayerVisibleRegion(std::vector<IComposerClient::Rect>(1, unit));
   mWriter->setLayerVisibleRegion(std::vector<IComposerClient::Rect>());
   execute();
-
-  destroyLayer(layer);
 }
 
 /**
@@ -1101,16 +817,14 @@
  */
 TEST_F(GraphicsComposerHidlCommandTest, SET_LAYER_Z_ORDER) {
   Layer layer;
-  Error err = createLayer(&layer);
-  ASSERT_EQ(Error::NONE, err);
+  ASSERT_NO_FATAL_FAILURE(
+      layer = mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount));
 
   mWriter->selectDisplay(mPrimaryDisplay);
   mWriter->selectLayer(layer);
   mWriter->setLayerZOrder(10);
   mWriter->setLayerZOrder(0);
   execute();
-
-  destroyLayer(layer);
 }
 
 }  // namespace anonymous
diff --git a/graphics/composer/2.1/vts/types.vts b/graphics/composer/2.1/vts/types.vts
deleted file mode 100644
index ccbd9d8..0000000
--- a/graphics/composer/2.1/vts/types.vts
+++ /dev/null
@@ -1,48 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "types"
-
-package: "android.hardware.graphics.composer"
-
-
-attribute: {
-    name: "::android::hardware::graphics::composer::V2_1::Error"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "BAD_CONFIG"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "BAD_DISPLAY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "BAD_LAYER"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "BAD_PARAMETER"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NO_RESOURCES"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "NOT_VALIDATED"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "UNSUPPORTED"
-        scalar_value: {
-            int32_t: 8
-        }
-    }
-}
-
diff --git a/graphics/mapper/2.0/default/Android.bp b/graphics/mapper/2.0/default/Android.bp
index ca15961..1dc5aea 100644
--- a/graphics/mapper/2.0/default/Android.bp
+++ b/graphics/mapper/2.0/default/Android.bp
@@ -15,6 +15,7 @@
 
 cc_library_shared {
     name: "android.hardware.graphics.mapper@2.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["GrallocMapper.cpp"],
@@ -27,7 +28,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libutils",
     ],
diff --git a/graphics/mapper/2.0/default/GrallocMapper.cpp b/graphics/mapper/2.0/default/GrallocMapper.cpp
index 3b6460a..526aca2 100644
--- a/graphics/mapper/2.0/default/GrallocMapper.cpp
+++ b/graphics/mapper/2.0/default/GrallocMapper.cpp
@@ -127,7 +127,7 @@
 
 void GrallocMapperHal::initCapabilities()
 {
-    uint32_t count;
+    uint32_t count = 0;
     mDevice->getCapabilities(mDevice, &count, nullptr);
 
     std::vector<int32_t> caps(count);
diff --git a/graphics/mapper/2.0/vts/Mapper.vts b/graphics/mapper/2.0/vts/Mapper.vts
deleted file mode 100644
index baf95dc..0000000
--- a/graphics/mapper/2.0/vts/Mapper.vts
+++ /dev/null
@@ -1,281 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IMapper"
-
-package: "android.hardware.graphics.mapper"
-
-import: "android.hardware.graphics.allocator@2.0::types"
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hardware.graphics.mapper@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "left"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        struct_value: {
-            name: "top"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        struct_value: {
-            name: "width"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        struct_value: {
-            name: "height"
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "retain"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "release"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-    api: {
-        name: "getDimensions"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getFormat"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getLayerCount"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getProducerUsageMask"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getConsumerUsageMask"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getBackingStore"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getStride"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "lock"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_POINTER
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "unlock"
-        }
-    }
-
-    api: {
-        name: "lockFlex"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexLayout"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "unlock"
-        }
-    }
-
-    api: {
-        name: "unlock"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
-        }
-        return_type_hidl: {
-            type: TYPE_HANDLE
-        }
-        arg: {
-            type: TYPE_HANDLE
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-}
diff --git a/graphics/mapper/2.0/vts/functional/Android.bp b/graphics/mapper/2.0/vts/functional/Android.bp
index efb868b..e26f087 100644
--- a/graphics/mapper/2.0/vts/functional/Android.bp
+++ b/graphics/mapper/2.0/vts/functional/Android.bp
@@ -14,17 +14,38 @@
 // limitations under the License.
 //
 
+cc_library_static {
+    name: "libVtsHalGraphicsMapperTestUtils",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGraphicsMapperTestUtils.cpp"],
+    shared_libs: [
+        "android.hardware.graphics.allocator@2.0",
+        "android.hardware.graphics.mapper@2.0",
+    ],
+    static_libs: [
+        "VtsHalHidlTargetTestBase",
+        "libVtsHalGraphicsAllocatorTestUtils",
+    ],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+        "-O0",
+        "-g",
+    ],
+    export_include_dirs: ["."],
+}
+
 cc_test {
-    name: "graphics_mapper_hidl_hal_test",
-    gtest: true,
-    srcs: ["graphics_mapper_hidl_hal_test.cpp"],
+    name: "VtsHalGraphicsMapperV2_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalGraphicsMapperV2_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libsync",
         "libutils",
@@ -32,8 +53,15 @@
         "android.hardware.graphics.mapper@2.0",
         "android.hardware.graphics.common@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: [
+        "libVtsHalGraphicsAllocatorTestUtils",
+        "libVtsHalGraphicsMapperTestUtils",
+        "VtsHalHidlTargetTestBase",
+    ],
     cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
         "-O0",
         "-g",
     ]
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
new file mode 100644
index 0000000..f6a26ac
--- /dev/null
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
@@ -0,0 +1,257 @@
+/*
+ * 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.
+ */
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include "VtsHalGraphicsMapperTestUtils.h"
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace mapper {
+namespace V2_0 {
+namespace tests {
+
+using android::hardware::graphics::allocator::V2_0::Buffer;
+using android::hardware::graphics::allocator::V2_0::BufferDescriptor;
+using android::hardware::graphics::allocator::V2_0::Error;
+
+Mapper::Mapper() { init(); }
+
+void Mapper::init() {
+  mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>();
+  ASSERT_NE(nullptr, mMapper.get()) << "failed to get mapper service";
+  ASSERT_FALSE(mMapper->isRemote()) << "mapper is not in passthrough mode";
+}
+
+Mapper::~Mapper() {
+  for (auto it : mHandles) {
+    while (it.second) {
+      EXPECT_EQ(Error::NONE, mMapper->release(it.first))
+          << "failed to release handle " << it.first;
+      it.second--;
+    }
+  }
+  mHandles.clear();
+}
+
+sp<IMapper> Mapper::getRaw() const { return mMapper; }
+
+void Mapper::retain(const native_handle_t* handle) {
+  Error error = mMapper->retain(handle);
+  ASSERT_EQ(Error::NONE, error) << "failed to retain handle " << handle;
+
+  mHandles[handle]++;
+}
+
+void Mapper::release(const native_handle_t* handle) {
+  Error error = mMapper->release(handle);
+  ASSERT_EQ(Error::NONE, error) << "failed to release handle " << handle;
+
+  if (--mHandles[handle] == 0) {
+    mHandles.erase(handle);
+  }
+}
+
+Mapper::Dimensions Mapper::getDimensions(const native_handle_t* handle) {
+  Dimensions dimensions = {};
+  mMapper->getDimensions(handle, [&](const auto& tmpError, const auto& tmpWidth,
+                                     const auto& tmpHeight) {
+    ASSERT_EQ(Error::NONE, tmpError)
+        << "failed to get dimensions for handle " << handle;
+    dimensions.width = tmpWidth;
+    dimensions.height = tmpHeight;
+  });
+
+  return dimensions;
+}
+
+PixelFormat Mapper::getFormat(const native_handle_t* handle) {
+  PixelFormat format = static_cast<PixelFormat>(0);
+  mMapper->getFormat(handle, [&](const auto& tmpError, const auto& tmpFormat) {
+    ASSERT_EQ(Error::NONE, tmpError)
+        << "failed to get format for handle " << handle;
+    format = tmpFormat;
+  });
+
+  return format;
+}
+
+uint32_t Mapper::getLayerCount(const native_handle_t* handle) {
+  uint32_t count = 0;
+  mMapper->getLayerCount(
+      handle, [&](const auto& tmpError, const auto& tmpCount) {
+        ASSERT_EQ(Error::NONE, tmpError)
+            << "failed to get layer count for handle " << handle;
+        count = tmpCount;
+      });
+
+  return count;
+}
+
+uint64_t Mapper::getProducerUsageMask(const native_handle_t* handle) {
+  uint64_t usageMask = 0;
+  mMapper->getProducerUsageMask(
+      handle, [&](const auto& tmpError, const auto& tmpUsageMask) {
+        ASSERT_EQ(Error::NONE, tmpError)
+            << "failed to get producer usage mask for handle " << handle;
+        usageMask = tmpUsageMask;
+      });
+
+  return usageMask;
+}
+
+uint64_t Mapper::getConsumerUsageMask(const native_handle_t* handle) {
+  uint64_t usageMask = 0;
+  mMapper->getConsumerUsageMask(
+      handle, [&](const auto& tmpError, const auto& tmpUsageMask) {
+        ASSERT_EQ(Error::NONE, tmpError)
+            << "failed to get consumer usage mask for handle " << handle;
+        usageMask = tmpUsageMask;
+      });
+
+  return usageMask;
+}
+
+BackingStore Mapper::getBackingStore(const native_handle_t* handle) {
+  BackingStore backingStore = 0;
+  mMapper->getBackingStore(
+      handle, [&](const auto& tmpError, const auto& tmpBackingStore) {
+        ASSERT_EQ(Error::NONE, tmpError)
+            << "failed to get backing store for handle " << handle;
+        backingStore = tmpBackingStore;
+      });
+
+  return backingStore;
+}
+
+uint32_t Mapper::getStride(const native_handle_t* handle) {
+  uint32_t stride = 0;
+  mMapper->getStride(handle, [&](const auto& tmpError, const auto& tmpStride) {
+    ASSERT_EQ(Error::NONE, tmpError)
+        << "failed to get stride for handle " << handle;
+    stride = tmpStride;
+  });
+
+  return stride;
+}
+
+void* Mapper::lock(const native_handle_t* handle, uint64_t producerUsageMask,
+                   uint64_t consumerUsageMask,
+                   const IMapper::Rect& accessRegion, int acquireFence) {
+  NATIVE_HANDLE_DECLARE_STORAGE(acquireFenceStorage, 0, 1);
+  native_handle_t* acquireFenceHandle = nullptr;
+  if (acquireFence >= 0) {
+    acquireFenceHandle = native_handle_init(acquireFenceStorage, 0, 1);
+    acquireFenceHandle->data[0] = acquireFence;
+  }
+
+  void* data = nullptr;
+  mMapper->lock(
+      handle, producerUsageMask, consumerUsageMask, accessRegion,
+      acquireFenceHandle, [&](const auto& tmpError, const auto& tmpData) {
+        ASSERT_EQ(Error::NONE, tmpError) << "failed to lock handle " << handle;
+        data = tmpData;
+      });
+
+  if (acquireFence >= 0) {
+    close(acquireFence);
+  }
+
+  return data;
+}
+
+FlexLayout Mapper::lockFlex(const native_handle_t* handle,
+                            uint64_t producerUsageMask,
+                            uint64_t consumerUsageMask,
+                            const IMapper::Rect& accessRegion,
+                            int acquireFence) {
+  NATIVE_HANDLE_DECLARE_STORAGE(acquireFenceStorage, 0, 1);
+  native_handle_t* acquireFenceHandle = nullptr;
+  if (acquireFence >= 0) {
+    acquireFenceHandle = native_handle_init(acquireFenceStorage, 0, 1);
+    acquireFenceHandle->data[0] = acquireFence;
+  }
+
+  FlexLayout layout = {};
+  mMapper->lockFlex(handle, producerUsageMask, consumerUsageMask, accessRegion,
+                    acquireFenceHandle,
+                    [&](const auto& tmpError, const auto& tmpLayout) {
+                      ASSERT_EQ(Error::NONE, tmpError)
+                          << "failed to lockFlex handle " << handle;
+                      layout = tmpLayout;
+                    });
+
+  if (acquireFence >= 0) {
+    close(acquireFence);
+  }
+
+  return layout;
+}
+
+int Mapper::unlock(const native_handle_t* handle) {
+  int releaseFence = -1;
+  mMapper->unlock(handle, [&](const auto& tmpError,
+                              const auto& tmpReleaseFence) {
+    ASSERT_EQ(Error::NONE, tmpError) << "failed to unlock handle " << handle;
+
+    auto handle = tmpReleaseFence.getNativeHandle();
+    if (handle) {
+      ASSERT_EQ(0, handle->numInts) << "invalid fence handle " << handle;
+      if (handle->numFds == 1) {
+        releaseFence = dup(handle->data[0]);
+        ASSERT_LT(0, releaseFence) << "failed to dup fence fd";
+      } else {
+        ASSERT_EQ(0, handle->numFds) << " invalid fence handle " << handle;
+      }
+    }
+  });
+
+  return releaseFence;
+}
+
+const native_handle_t* Mapper::allocate(
+    std::unique_ptr<AllocatorClient>& allocatorClient,
+    const IAllocatorClient::BufferDescriptorInfo& info) {
+  BufferDescriptor descriptor = allocatorClient->createDescriptor(info);
+  if (::testing::Test::HasFatalFailure()) {
+    return nullptr;
+  }
+
+  Buffer buffer = allocatorClient->allocate(descriptor);
+  if (::testing::Test::HasFatalFailure()) {
+    allocatorClient->destroyDescriptor(descriptor);
+    return nullptr;
+  }
+
+  const native_handle_t* handle =
+      allocatorClient->exportHandle(descriptor, buffer);
+  if (handle) {
+    retain(handle);
+  }
+
+  allocatorClient->free(buffer);
+  allocatorClient->destroyDescriptor(descriptor);
+
+  return handle;
+}
+
+}  // namespace tests
+}  // namespace V2_0
+}  // namespace mapper
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h
new file mode 100644
index 0000000..c186b00
--- /dev/null
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+#ifndef VTS_HAL_GRAPHICS_MAPPER_UTILS
+#define VTS_HAL_GRAPHICS_MAPPER_UTILS
+
+#include <memory>
+#include <unordered_map>
+
+#include <android/hardware/graphics/mapper/2.0/IMapper.h>
+#include <utils/StrongPointer.h>
+
+#include "VtsHalGraphicsAllocatorTestUtils.h"
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace mapper {
+namespace V2_0 {
+namespace tests {
+
+using android::hardware::graphics::common::V1_0::PixelFormat;
+using android::hardware::graphics::allocator::V2_0::IAllocatorClient;
+using android::hardware::graphics::allocator::V2_0::tests::AllocatorClient;
+
+// A wrapper to IMapper.
+class Mapper {
+ public:
+  Mapper();
+  ~Mapper();
+
+  sp<IMapper> getRaw() const;
+
+  void retain(const native_handle_t* handle);
+  void release(const native_handle_t* handle);
+
+  struct Dimensions {
+    uint32_t width;
+    uint32_t height;
+  };
+  Dimensions getDimensions(const native_handle_t* handle);
+
+  PixelFormat getFormat(const native_handle_t* handle);
+  uint32_t getLayerCount(const native_handle_t* handle);
+  uint64_t getProducerUsageMask(const native_handle_t* handle);
+  uint64_t getConsumerUsageMask(const native_handle_t* handle);
+  BackingStore getBackingStore(const native_handle_t* handle);
+  uint32_t getStride(const native_handle_t* handle);
+
+  // We use fd instead of hidl_handle in these functions to pass fences
+  // in and out of the mapper.  The ownership of the fd is always transferred
+  // with each of these functions.
+  void* lock(const native_handle_t* handle, uint64_t producerUsageMask,
+             uint64_t consumerUsageMask, const IMapper::Rect& accessRegion,
+             int acquireFence);
+  FlexLayout lockFlex(const native_handle_t* handle, uint64_t producerUsageMask,
+                      uint64_t consumerUsageMask,
+                      const IMapper::Rect& accessRegion, int acquireFence);
+  int unlock(const native_handle_t* handle);
+
+  // Requests AllocatorClient to allocate a buffer, export the handle, and
+  // register the handle with mapper.
+  const native_handle_t* allocate(
+      std::unique_ptr<AllocatorClient>& allocatorClient,
+      const IAllocatorClient::BufferDescriptorInfo& info);
+
+ private:
+  void init();
+
+  sp<IMapper> mMapper;
+
+  // Keep track of all registered (retained) handles.  When a test fails with
+  // ASSERT_*, the destructor will release the handles for the test.
+  std::unordered_map<const native_handle_t*, uint64_t> mHandles;
+};
+
+}  // namespace tests
+}  // namespace V2_0
+}  // namespace mapper
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
+
+#endif  // VTS_HAL_GRAPHICS_MAPPER_UTILS
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
new file mode 100644
index 0000000..92d74d5
--- /dev/null
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2016 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 "graphics_mapper_hidl_hal_test"
+
+#include <android-base/logging.h>
+#include <VtsHalHidlTargetTestBase.h>
+#include <sync/sync.h>
+#include "VtsHalGraphicsMapperTestUtils.h"
+
+namespace android {
+namespace hardware {
+namespace graphics {
+namespace mapper {
+namespace V2_0 {
+namespace tests {
+namespace {
+
+using namespace android::hardware::graphics::allocator::V2_0;
+using namespace android::hardware::graphics::allocator::V2_0::tests;
+
+class GraphicsMapperHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+ protected:
+  void SetUp() override {
+    ASSERT_NO_FATAL_FAILURE(mAllocator = std::make_unique<Allocator>());
+    ASSERT_NO_FATAL_FAILURE(mAllocatorClient = mAllocator->createClient());
+    ASSERT_NO_FATAL_FAILURE(mMapper = std::make_unique<Mapper>());
+
+    mDummyDescriptorInfo.width = 64;
+    mDummyDescriptorInfo.height = 64;
+    mDummyDescriptorInfo.layerCount = 1;
+    mDummyDescriptorInfo.format = PixelFormat::RGBA_8888;
+    mDummyDescriptorInfo.producerUsageMask =
+        static_cast<uint64_t>(ProducerUsage::CPU_WRITE);
+    mDummyDescriptorInfo.consumerUsageMask =
+        static_cast<uint64_t>(ConsumerUsage::CPU_READ);
+  }
+
+  void TearDown() override {}
+
+  std::unique_ptr<Allocator> mAllocator;
+  std::unique_ptr<AllocatorClient> mAllocatorClient;
+  std::unique_ptr<Mapper> mMapper;
+  IAllocatorClient::BufferDescriptorInfo mDummyDescriptorInfo{};
+};
+
+/**
+ * Test IMapper::retain and IMapper::release.
+ */
+TEST_F(GraphicsMapperHidlTest, RetainRelease) {
+  const native_handle_t* buffer;
+  ASSERT_NO_FATAL_FAILURE(
+      buffer = mMapper->allocate(mAllocatorClient, mDummyDescriptorInfo));
+
+  const int maxRefs = 10;
+  for (int i = 0; i < maxRefs; i++) {
+    ASSERT_NO_FATAL_FAILURE(mMapper->retain(buffer));
+  }
+  for (int i = 0; i < maxRefs; i++) {
+    ASSERT_NO_FATAL_FAILURE(mMapper->release(buffer));
+  }
+
+  ASSERT_NO_FATAL_FAILURE(mMapper->release(buffer));
+}
+
+/**
+ * Test IMapper::get* getters.
+ */
+TEST_F(GraphicsMapperHidlTest, Getters) {
+  const native_handle_t* buffer;
+  ASSERT_NO_FATAL_FAILURE(
+      buffer = mMapper->allocate(mAllocatorClient, mDummyDescriptorInfo));
+
+  IAllocatorClient::BufferDescriptorInfo info = {};
+
+  Mapper::Dimensions dimensions;
+  ASSERT_NO_FATAL_FAILURE(dimensions = mMapper->getDimensions(buffer));
+  info.width = dimensions.width;
+  info.height = dimensions.height;
+
+  ASSERT_NO_FATAL_FAILURE(info.format = mMapper->getFormat(buffer));
+  ASSERT_NO_FATAL_FAILURE(info.producerUsageMask =
+                              mMapper->getProducerUsageMask(buffer));
+  ASSERT_NO_FATAL_FAILURE(info.consumerUsageMask =
+                              mMapper->getConsumerUsageMask(buffer));
+
+  EXPECT_EQ(mDummyDescriptorInfo.width, info.width);
+  EXPECT_EQ(mDummyDescriptorInfo.height, info.height);
+  EXPECT_EQ(mDummyDescriptorInfo.format, info.format);
+  EXPECT_EQ(mDummyDescriptorInfo.producerUsageMask, info.producerUsageMask);
+  EXPECT_EQ(mDummyDescriptorInfo.consumerUsageMask, info.consumerUsageMask);
+
+  ASSERT_NO_FATAL_FAILURE(mMapper->getBackingStore(buffer));
+
+  uint32_t stride;
+  ASSERT_NO_FATAL_FAILURE(stride = mMapper->getStride(buffer));
+  EXPECT_LE(info.width, stride);
+}
+
+/**
+ * Test IMapper::lock and IMapper::unlock.
+ */
+TEST_F(GraphicsMapperHidlTest, LockBasic) {
+  const auto& info = mDummyDescriptorInfo;
+
+  const native_handle_t* buffer;
+  ASSERT_NO_FATAL_FAILURE(
+      buffer = mMapper->allocate(mAllocatorClient, mDummyDescriptorInfo));
+
+  uint32_t stride;
+  ASSERT_NO_FATAL_FAILURE(stride = mMapper->getStride(buffer));
+
+  // lock buffer for writing
+  const IMapper::Rect region{0, 0, static_cast<int32_t>(info.width),
+                             static_cast<int32_t>(info.height)};
+  int fence = -1;
+  uint32_t* data;
+  ASSERT_NO_FATAL_FAILURE(
+      data = static_cast<uint32_t*>(
+          mMapper->lock(buffer, info.producerUsageMask, 0, region, fence)));
+
+  for (uint32_t y = 0; y < info.height; y++) {
+    for (uint32_t x = 0; x < info.width; x++) {
+      data[stride * y + x] = info.height * y + x;
+    }
+  }
+
+  ASSERT_NO_FATAL_FAILURE(fence = mMapper->unlock(buffer));
+
+  // lock buffer for reading
+  ASSERT_NO_FATAL_FAILURE(
+      data = static_cast<uint32_t*>(
+          mMapper->lock(buffer, 0, info.consumerUsageMask, region, fence)));
+  for (uint32_t y = 0; y < info.height; y++) {
+    for (uint32_t x = 0; x < info.width; x++) {
+      EXPECT_EQ(info.height * y + x, data[stride * y + x]);
+    }
+  }
+
+  ASSERT_NO_FATAL_FAILURE(fence = mMapper->unlock(buffer));
+  if (fence >= 0) {
+    close(fence);
+  }
+}
+
+/**
+ * Test IMapper::lockFlex.  This locks a YV12 buffer, and makes sure we can
+ * write to and read from it.
+ */
+TEST_F(GraphicsMapperHidlTest, LockFlexBasic) {
+  auto info = mDummyDescriptorInfo;
+  info.format = PixelFormat::YV12;
+
+  const native_handle_t* buffer;
+  ASSERT_NO_FATAL_FAILURE(buffer = mMapper->allocate(mAllocatorClient, info));
+
+  // lock buffer for writing
+  const IMapper::Rect region{0, 0, static_cast<int32_t>(info.width),
+                             static_cast<int32_t>(info.height)};
+  int fence = -1;
+  FlexLayout layout;
+  ASSERT_NO_FATAL_FAILURE(
+      layout =
+          mMapper->lockFlex(buffer, info.producerUsageMask, 0, region, fence));
+  ASSERT_EQ(FlexFormat::YCBCR, layout.format);
+  ASSERT_EQ(3u, layout.planes.size());
+
+  const auto y_stride = layout.planes[0].vIncrement;
+  const auto c_stride = layout.planes[1].vIncrement;
+  auto y_data = static_cast<uint8_t*>(layout.planes[0].topLeft);
+  auto cb_data = static_cast<uint8_t*>(layout.planes[1].topLeft);
+  auto cr_data = static_cast<uint8_t*>(layout.planes[2].topLeft);
+
+  for (uint32_t y = 0; y < info.height; y++) {
+    for (uint32_t x = 0; x < info.width; x++) {
+      auto val = static_cast<uint8_t>(info.height * y + x);
+
+      y_data[y_stride * y + x] = val;
+      if (y % 2 == 0 && x % 2 == 0) {
+        cb_data[c_stride * y / 2 + x / 2] = val;
+        cr_data[c_stride * y / 2 + x / 2] = val;
+      }
+    }
+  }
+
+  ASSERT_NO_FATAL_FAILURE(fence = mMapper->unlock(buffer));
+
+  // lock buffer for reading
+  ASSERT_NO_FATAL_FAILURE(
+      layout =
+          mMapper->lockFlex(buffer, 0, info.consumerUsageMask, region, fence));
+
+  y_data = static_cast<uint8_t*>(layout.planes[0].topLeft);
+  cb_data = static_cast<uint8_t*>(layout.planes[1].topLeft);
+  cr_data = static_cast<uint8_t*>(layout.planes[2].topLeft);
+  for (uint32_t y = 0; y < info.height; y++) {
+    for (uint32_t x = 0; x < info.width; x++) {
+      auto val = static_cast<uint8_t>(info.height * y + x);
+
+      EXPECT_EQ(val, y_data[y_stride * y + x]);
+      if (y % 2 == 0 && x % 2 == 0) {
+        EXPECT_EQ(val, cb_data[c_stride * y / 2 + x / 2]);
+        EXPECT_EQ(val, cr_data[c_stride * y / 2 + x / 2]);
+      }
+    }
+  }
+
+  ASSERT_NO_FATAL_FAILURE(fence = mMapper->unlock(buffer));
+  if (fence >= 0) {
+    close(fence);
+  }
+}
+
+}  // namespace anonymous
+}  // namespace tests
+}  // namespace V2_0
+}  // namespace mapper
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
+
+int main(int argc, char** argv) {
+  ::testing::InitGoogleTest(&argc, argv);
+
+  int status = RUN_ALL_TESTS();
+  LOG(INFO) << "Test result = " << status;
+
+  return status;
+}
diff --git a/graphics/mapper/2.0/vts/functional/graphics_mapper_hidl_hal_test.cpp b/graphics/mapper/2.0/vts/functional/graphics_mapper_hidl_hal_test.cpp
deleted file mode 100644
index 840da1a..0000000
--- a/graphics/mapper/2.0/vts/functional/graphics_mapper_hidl_hal_test.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (C) 2016 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 "graphics_mapper_hidl_hal_test"
-
-#include <android-base/logging.h>
-#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
-#include <gtest/gtest.h>
-#include <sync/sync.h>
-
-namespace android {
-namespace hardware {
-namespace graphics {
-namespace mapper {
-namespace V2_0 {
-namespace tests {
-namespace {
-
-using namespace android::hardware::graphics::allocator::V2_0;
-using namespace android::hardware::graphics::common::V1_0;
-
-class GraphicsMapperHidlTest : public ::testing::Test {
- protected:
-  void SetUp() override {
-    mAllocator = IAllocator::getService("gralloc");
-    ASSERT_NE(mAllocator, nullptr);
-
-    mAllocator->createClient([this](const auto& error, const auto& client) {
-      if (error == Error::NONE) {
-        mAllocatorClient = client;
-      }
-    });
-    ASSERT_NE(mAllocatorClient, nullptr);
-
-    mMapper = IMapper::getService("gralloc-mapper");
-    ASSERT_NE(nullptr, mMapper.get());
-    ASSERT_FALSE(mMapper->isRemote());
-
-    mDummyDescriptorInfo.width = 64;
-    mDummyDescriptorInfo.height = 64;
-    mDummyDescriptorInfo.layerCount = 1;
-    mDummyDescriptorInfo.format = PixelFormat::RGBA_8888;
-    mDummyDescriptorInfo.producerUsageMask =
-        static_cast<uint64_t>(ProducerUsage::CPU_WRITE);
-    mDummyDescriptorInfo.consumerUsageMask =
-        static_cast<uint64_t>(ConsumerUsage::CPU_READ);
-  }
-
-  void TearDown() override {}
-
-  const native_handle_t* allocate(
-      const IAllocatorClient::BufferDescriptorInfo& info) {
-    // create descriptor
-    Error err = Error::NO_RESOURCES;
-    BufferDescriptor descriptor;
-    mAllocatorClient->createDescriptor(
-        info, [&](const auto& tmpError, const auto& tmpDescriptor) {
-          err = tmpError;
-          descriptor = tmpDescriptor;
-        });
-    if (err != Error::NONE) {
-      return nullptr;
-    }
-
-    // allocate buffer
-    hidl_vec<BufferDescriptor> descriptors;
-    hidl_vec<Buffer> buffers;
-    descriptors.setToExternal(&descriptor, 1);
-    err = Error::NO_RESOURCES;
-    mAllocatorClient->allocate(
-        descriptors, [&](const auto& tmpError, const auto& tmpBuffers) {
-          err = tmpError;
-          buffers = tmpBuffers;
-        });
-    if ((err != Error::NONE && err != Error::NOT_SHARED) ||
-        buffers.size() != 1) {
-      mAllocatorClient->destroyDescriptor(descriptors[0]);
-      return nullptr;
-    }
-
-    // export handle
-    err = Error::NO_RESOURCES;
-    const native_handle_t* handle = nullptr;
-    mAllocatorClient->exportHandle(
-        descriptors[0], buffers[0],
-        [&](const auto& tmpError, const auto& tmpHandle) {
-          err = tmpError;
-          if (err != Error::NONE) {
-            return;
-          }
-
-          handle = native_handle_clone(tmpHandle);
-          if (!handle) {
-            err = Error::NO_RESOURCES;
-            return;
-          }
-
-          err = mMapper->retain(handle);
-          if (err != Error::NONE) {
-            native_handle_close(handle);
-            native_handle_delete(const_cast<native_handle_t*>(handle));
-            handle = nullptr;
-          }
-        });
-
-    mAllocatorClient->destroyDescriptor(descriptors[0]);
-    mAllocatorClient->free(buffers[0]);
-
-    if (err != Error::NONE) {
-      return nullptr;
-    }
-
-    return handle;
-  }
-
-  sp<IMapper> mMapper;
-
-  IAllocatorClient::BufferDescriptorInfo mDummyDescriptorInfo{};
-
- private:
-  sp<IAllocator> mAllocator;
-  sp<IAllocatorClient> mAllocatorClient;
-};
-
-/**
- * Test IMapper::retain and IMapper::release.
- */
-TEST_F(GraphicsMapperHidlTest, RetainRelease) {
-  const native_handle_t* buffer = allocate(mDummyDescriptorInfo);
-  ASSERT_NE(buffer, nullptr);
-
-  const int maxRefs = 10;
-  for (int i = 0; i < maxRefs; i++) {
-    auto err = mMapper->retain(buffer);
-    EXPECT_EQ(Error::NONE, err);
-  }
-  for (int i = 0; i < maxRefs; i++) {
-    auto err = mMapper->release(buffer);
-    EXPECT_EQ(Error::NONE, err);
-  }
-
-  auto err = mMapper->release(buffer);
-  EXPECT_EQ(Error::NONE, err);
-}
-
-/**
- * Test IMapper::get* getters.
- */
-TEST_F(GraphicsMapperHidlTest, Getters) {
-  const native_handle_t* buffer = allocate(mDummyDescriptorInfo);
-  ASSERT_NE(buffer, nullptr);
-
-  Error err = Error::NO_RESOURCES;
-  IAllocatorClient::BufferDescriptorInfo info{};
-  mMapper->getDimensions(buffer, [&](const auto& tmpError, const auto& tmpWidth,
-                                     const auto& tmpHeight) {
-    err = tmpError;
-    info.width = tmpWidth;
-    info.height = tmpHeight;
-  });
-  EXPECT_EQ(Error::NONE, err);
-  mMapper->getFormat(buffer, [&](const auto& tmpError, const auto& tmpFormat) {
-    err = tmpError;
-    info.format = tmpFormat;
-  });
-  EXPECT_EQ(Error::NONE, err);
-  mMapper->getProducerUsageMask(
-      buffer, [&](const auto& tmpError, const auto& tmpUsage) {
-        err = tmpError;
-        info.producerUsageMask = tmpUsage;
-      });
-  EXPECT_EQ(Error::NONE, err);
-  mMapper->getConsumerUsageMask(
-      buffer, [&](const auto& tmpError, const auto& tmpUsage) {
-        err = tmpError;
-        info.consumerUsageMask = tmpUsage;
-      });
-  EXPECT_EQ(Error::NONE, err);
-
-  EXPECT_EQ(mDummyDescriptorInfo.width, info.width);
-  EXPECT_EQ(mDummyDescriptorInfo.height, info.height);
-  EXPECT_EQ(mDummyDescriptorInfo.format, info.format);
-  EXPECT_EQ(mDummyDescriptorInfo.producerUsageMask, info.producerUsageMask);
-  EXPECT_EQ(mDummyDescriptorInfo.consumerUsageMask, info.consumerUsageMask);
-
-  BackingStore store = 0;
-  mMapper->getBackingStore(buffer,
-                           [&](const auto& tmpError, const auto& tmpStore) {
-                             err = tmpError;
-                             store = tmpStore;
-                           });
-  EXPECT_EQ(Error::NONE, err);
-
-  uint32_t stride = 0;
-  mMapper->getStride(buffer, [&](const auto& tmpError, const auto& tmpStride) {
-    err = tmpError;
-    stride = tmpStride;
-  });
-  EXPECT_EQ(Error::NONE, err);
-  EXPECT_LE(info.width, stride);
-
-  err = mMapper->release(buffer);
-  EXPECT_EQ(Error::NONE, err);
-}
-
-/**
- * Test IMapper::lock and IMapper::unlock.
- */
-TEST_F(GraphicsMapperHidlTest, LockBasic) {
-  const auto& info = mDummyDescriptorInfo;
-  const native_handle_t* buffer = allocate(info);
-  ASSERT_NE(buffer, nullptr);
-
-  Error err = Error::NO_RESOURCES;
-  uint32_t stride = 0;
-  mMapper->getStride(buffer, [&](const auto& tmpError, const auto& tmpStride) {
-    err = tmpError;
-    stride = tmpStride;
-  });
-  EXPECT_EQ(Error::NONE, err);
-
-  // lock buffer for writing
-  const IMapper::Rect region{0, 0, static_cast<int32_t>(info.width),
-                             static_cast<int32_t>(info.height)};
-  hidl_handle acquireFence(nullptr);
-  uint32_t* data;
-  err = Error::NO_RESOURCES;
-  mMapper->lock(buffer, info.producerUsageMask, 0, region, acquireFence,
-          [&](const auto& tmpError, const auto& tmpData) {
-            err = tmpError;
-            data = static_cast<uint32_t*>(tmpData);
-          });
-
-  if (err == Error::NONE) {
-    for (uint32_t y = 0; y < info.height; y++) {
-      for (uint32_t x = 0; x < info.width; x++) {
-        data[stride * y + x] = info.height * y + x;
-      }
-    }
-  } else {
-    EXPECT_EQ(Error::NONE, err);
-  }
-
-  err = Error::NO_RESOURCES;
-  mMapper->unlock(buffer, [&](const auto& tmpError, const auto& tmpReleaseFence) {
-            err = tmpError;
-            auto handle = tmpReleaseFence.getNativeHandle();
-            if (handle && handle->numFds == 1) {
-                sync_wait(handle->data[0], -1);
-                close(handle->data[0]);
-            }
-          });
-  EXPECT_EQ(Error::NONE, err);
-
-  // lock buffer for reading
-  mMapper->lock(buffer, 0, info.consumerUsageMask, region, acquireFence,
-          [&](const auto& tmpError, const auto& tmpData) {
-            err = tmpError;
-            data = static_cast<uint32_t*>(tmpData);
-          });
-  if (err == Error::NONE) {
-    for (uint32_t y = 0; y < info.height; y++) {
-      for (uint32_t x = 0; x < info.width; x++) {
-        EXPECT_EQ(info.height * y + x, data[stride * y + x]);
-      }
-    }
-  } else {
-    EXPECT_EQ(Error::NONE, err);
-  }
-
-  err = Error::NO_RESOURCES;
-  mMapper->unlock(buffer, [&](const auto& tmpError, const auto& tmpReleaseFence) {
-            err = tmpError;
-            auto handle = tmpReleaseFence.getNativeHandle();
-            if (handle && handle->numFds == 1) {
-                sync_wait(handle->data[0], -1);
-                close(handle->data[0]);
-            }
-          });
-  EXPECT_EQ(Error::NONE, err);
-
-  err = mMapper->release(buffer);
-  EXPECT_EQ(Error::NONE, err);
-}
-
-}  // namespace anonymous
-}  // namespace tests
-}  // namespace V2_0
-}  // namespace mapper
-}  // namespace graphics
-}  // namespace hardware
-}  // namespace android
-
-int main(int argc, char** argv) {
-  ::testing::InitGoogleTest(&argc, argv);
-
-  int status = RUN_ALL_TESTS();
-  LOG(INFO) << "Test result = " << status;
-
-  return status;
-}
diff --git a/graphics/mapper/2.0/vts/types.vts b/graphics/mapper/2.0/vts/types.vts
deleted file mode 100644
index fee8535..0000000
--- a/graphics/mapper/2.0/vts/types.vts
+++ /dev/null
@@ -1,139 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.graphics.mapper"
-
-
-attribute: {
-    name: "::android::hardware::graphics::mapper::V2_0::FlexComponent"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "Y"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CB"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CR"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "R"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "G"
-        scalar_value: {
-            int32_t: 2048
-        }
-        enumerator: "B"
-        scalar_value: {
-            int32_t: 4096
-        }
-        enumerator: "A"
-        scalar_value: {
-            int32_t: 1073741824
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::graphics::mapper::V2_0::FlexFormat"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INVALID"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "Y"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "YCBCR"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "YCBCRA"
-        scalar_value: {
-            int32_t: 1073741831
-        }
-        enumerator: "RGB"
-        scalar_value: {
-            int32_t: 7168
-        }
-        enumerator: "RGBA"
-        scalar_value: {
-            int32_t: 1073748992
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::graphics::mapper::V2_0::FlexPlane"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "topLeft"
-        type: TYPE_POINTER
-    }
-    struct_value: {
-        name: "component"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexComponent"
-    }
-    struct_value: {
-        name: "bitsPerComponent"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "bitsUsed"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "hIncrement"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "vIncrement"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "hSubsampling"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "vSubsampling"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::graphics::mapper::V2_0::FlexLayout"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "format"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexFormat"
-    }
-    struct_value: {
-        name: "planes"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexPlane"
-        }
-    }
-}
-
diff --git a/health/1.0/default/Android.mk b/health/1.0/default/Android.mk
index 3c97185..96ff91f 100644
--- a/health/1.0/default/Android.mk
+++ b/health/1.0/default/Android.mk
@@ -12,7 +12,6 @@
     libcutils \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     liblog \
     libutils \
     android.hardware.health@1.0 \
@@ -51,7 +50,6 @@
     libdl \
     libbase \
     libutils \
-    libhwbinder \
     libhidlbase \
     libhidltransport \
     android.hardware.health@1.0 \
diff --git a/health/1.0/default/HealthService.cpp b/health/1.0/default/HealthService.cpp
index 107f33d..55848d2 100644
--- a/health/1.0/default/HealthService.cpp
+++ b/health/1.0/default/HealthService.cpp
@@ -23,5 +23,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IHealth>("health");
+    return defaultPassthroughServiceImplementation<IHealth>();
 }
diff --git a/ir/1.0/default/Android.bp b/ir/1.0/default/Android.bp
index ed0b807..2b15387 100644
--- a/ir/1.0/default/Android.bp
+++ b/ir/1.0/default/Android.bp
@@ -14,6 +14,7 @@
 // limitations under the License.
 cc_library_shared {
     name: "android.hardware.ir@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["ConsumerIr.cpp"],
@@ -21,7 +22,6 @@
         "libhidlbase",
         "libhidltransport",
         "libhardware",
-        "libhwbinder",
         "liblog",
         "libutils",
         "android.hardware.ir@1.0",
@@ -30,6 +30,7 @@
 
 cc_binary {
     relative_install_path: "hw",
+    defaults: ["hidl_defaults"],
     name: "android.hardware.ir@1.0-service",
     proprietary: true,
     init_rc: ["android.hardware.ir@1.0-service.rc"],
@@ -37,7 +38,6 @@
 
     shared_libs: [
         "liblog",
-        "libhwbinder",
         "libhardware",
         "libhidlbase",
         "libhidltransport",
diff --git a/ir/1.0/vts/ConsumerIr.vts b/ir/1.0/vts/ConsumerIr.vts
deleted file mode 100644
index c31331e..0000000
--- a/ir/1.0/vts/ConsumerIr.vts
+++ /dev/null
@@ -1,45 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IConsumerIr"
-
-package: "android.hardware.ir"
-
-import: "android.hardware.ir@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "transmit"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int32_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getCarrierFreqs"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::ir::V1_0::ConsumerIrFreqRange"
-            }
-        }
-    }
-
-}
diff --git a/ir/1.0/vts/functional/Android.bp b/ir/1.0/vts/functional/Android.bp
index 1acd2a0..4aac297 100644
--- a/ir/1.0/vts/functional/Android.bp
+++ b/ir/1.0/vts/functional/Android.bp
@@ -15,20 +15,19 @@
 //
 
 cc_test {
-    name: "ir_hidl_hal_test",
-    gtest: true,
-    srcs: ["ir_hidl_hal_test.cpp"],
+    name: "VtsHalIrV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalIrV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libutils",
         "android.hardware.ir@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/ir/1.0/vts/functional/ir_hidl_hal_test.cpp b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
similarity index 92%
rename from ir/1.0/vts/functional/ir_hidl_hal_test.cpp
rename to ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
index 08c7974..3dad3c1 100644
--- a/ir/1.0/vts/functional/ir_hidl_hal_test.cpp
+++ b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
 #include <android/hardware/ir/1.0/IConsumerIr.h>
 #include <android/hardware/ir/1.0/types.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <algorithm>
 
 using ::android::hardware::ir::V1_0::IConsumerIr;
@@ -31,10 +31,10 @@
 using ::android::sp;
 
 // The main test class for IR HIDL HAL.
-class ConsumerIrHidlTest : public ::testing::Test {
+class ConsumerIrHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    ir = IConsumerIr::getService();
+    ir = ::testing::VtsHalHidlTargetTestBase::getService<IConsumerIr>();
     ASSERT_NE(ir, nullptr);
   }
 
@@ -45,7 +45,6 @@
 
 // Test transmit() for the min and max frequency of every available range
 TEST_F(ConsumerIrHidlTest, TransmitTest) {
-  int32_t freqs;
   bool success;
   hidl_vec<ConsumerIrFreqRange> ranges;
   auto cb = [&](bool s, hidl_vec<ConsumerIrFreqRange> v) {
diff --git a/ir/1.0/vts/types.vts b/ir/1.0/vts/types.vts
deleted file mode 100644
index f1e9cbe..0000000
--- a/ir/1.0/vts/types.vts
+++ /dev/null
@@ -1,22 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.ir"
-
-
-attribute: {
-    name: "::android::hardware::ir::V1_0::ConsumerIrFreqRange"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "min"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "max"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
diff --git a/keymaster/3.0/default/Android.mk b/keymaster/3.0/default/Android.mk
index 87a8a05..c537346 100644
--- a/keymaster/3.0/default/Android.mk
+++ b/keymaster/3.0/default/Android.mk
@@ -14,7 +14,6 @@
     libkeymaster1 \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     libhardware \
     android.hardware.keymaster@3.0
@@ -37,7 +36,6 @@
     libutils \
     libhardware_legacy \
     libhardware \
-    libhwbinder \
     libhidlbase \
     libhidltransport \
     android.hardware.keymaster@3.0
diff --git a/keymaster/3.0/default/service.cpp b/keymaster/3.0/default/service.cpp
index c4387c3..a6a9a93 100644
--- a/keymaster/3.0/default/service.cpp
+++ b/keymaster/3.0/default/service.cpp
@@ -29,5 +29,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IKeymasterDevice>("keymaster", 1);
+    return defaultPassthroughServiceImplementation<IKeymasterDevice>();
 }
diff --git a/light/2.0/default/Android.mk b/light/2.0/default/Android.mk
index 7bd096c..3439c9b 100644
--- a/light/2.0/default/Android.mk
+++ b/light/2.0/default/Android.mk
@@ -10,7 +10,6 @@
 LOCAL_SHARED_LIBRARIES := \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     liblog \
     libcutils \
@@ -39,7 +38,6 @@
     libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-    libhwbinder \
     libhidlbase \
     libhidltransport \
     android.hardware.light@2.0 \
diff --git a/light/2.0/vts/Light.vts b/light/2.0/vts/Light.vts
deleted file mode 100644
index 163405f..0000000
--- a/light/2.0/vts/Light.vts
+++ /dev/null
@@ -1,38 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "ILight"
-
-package: "android.hardware.light"
-
-import: "android.hardware.light@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "setLight"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::light::V2_0::Status"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::light::V2_0::Type"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::light::V2_0::LightState"
-        }
-    }
-
-    api: {
-        name: "getSupportedTypes"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::light::V2_0::Type"
-            }
-        }
-    }
-
-}
diff --git a/light/2.0/vts/functional/Android.bp b/light/2.0/vts/functional/Android.bp
index 53f5d7f..0558ff2 100644
--- a/light/2.0/vts/functional/Android.bp
+++ b/light/2.0/vts/functional/Android.bp
@@ -15,9 +15,9 @@
 //
 
 cc_test {
-    name: "light_hidl_hal_test",
-    gtest: true,
-    srcs: ["light_hidl_hal_test.cpp"],
+    name: "VtsHalLightV2_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalLightV2_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "libhidlbase",
@@ -25,7 +25,7 @@
         "libutils",
         "android.hardware.light@2.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/light/2.0/vts/functional/light_hidl_hal_test.cpp b/light/2.0/vts/functional/VtsHalLightV2_0TargetTest.cpp
similarity index 82%
rename from light/2.0/vts/functional/light_hidl_hal_test.cpp
rename to light/2.0/vts/functional/VtsHalLightV2_0TargetTest.cpp
index 71a8b4e..3405422 100644
--- a/light/2.0/vts/functional/light_hidl_hal_test.cpp
+++ b/light/2.0/vts/functional/VtsHalLightV2_0TargetTest.cpp
@@ -19,7 +19,7 @@
 #include <android-base/logging.h>
 #include <android/hardware/light/2.0/ILight.h>
 #include <android/hardware/light/2.0/types.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <set>
 #include <unistd.h>
 
@@ -37,31 +37,6 @@
 #define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
 #define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
 
-class LightHidlTest : public ::testing::Test {
-public:
-    virtual void SetUp() override {
-        light = ILight::getService();
-
-        ASSERT_NE(light, nullptr);
-        LOG(INFO) << "Test is remote " << light->isRemote();
-
-        ASSERT_OK(light->getSupportedTypes([this](const hidl_vec<Type> &types) {
-            supportedTypes = types;
-        }));
-    }
-
-    virtual void TearDown() override {}
-
-    sp<ILight> light;
-    std::vector<Type> supportedTypes;
-};
-
-class LightHidlEnvironment : public ::testing::Environment {
-public:
-    virtual void SetUp() {}
-    virtual void TearDown() {}
-};
-
 const static LightState kWhite = {
     .color = 0xFFFFFFFF,
     .flashMode = Flash::TIMED,
@@ -97,6 +72,41 @@
     Type::WIFI
 };
 
+class LightHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+public:
+    virtual void SetUp() override {
+        light = ::testing::VtsHalHidlTargetTestBase::getService<ILight>();
+
+        ASSERT_NE(light, nullptr);
+        LOG(INFO) << "Test is remote " << light->isRemote();
+
+        ASSERT_OK(light->getSupportedTypes([this](const hidl_vec<Type> &types) {
+            supportedTypes = types;
+        }));
+    }
+
+    sp<ILight> light;
+    std::vector<Type> supportedTypes;
+
+    virtual void TearDown() override {
+        for (const Type& type: supportedTypes) {
+            Return<Status> ret = light->setLight(type, kOff);
+            EXPECT_OK(ret);
+            EXPECT_EQ(Status::SUCCESS, static_cast<Status>(ret));
+        }
+
+        // must leave the device in a useable condition
+        if (std::find(supportedTypes.begin(),
+                      supportedTypes.end(),
+                      Type::BACKLIGHT) != supportedTypes.end()) {
+            Return<Status> ret = light->setLight(Type::BACKLIGHT, kWhite);
+            EXPECT_OK(ret);
+            EXPECT_EQ(Status::SUCCESS, static_cast<Status>(ret));
+        }
+    }
+
+};
+
 /**
  * Ensure all lights which are reported as supported work.
  */
@@ -106,12 +116,6 @@
         EXPECT_OK(ret);
         EXPECT_EQ(Status::SUCCESS, static_cast<Status>(ret));
     }
-
-    for (const Type& type: supportedTypes) {
-        Return<Status> ret = light->setLight(type, kOff);
-        EXPECT_OK(ret);
-        EXPECT_EQ(Status::SUCCESS, static_cast<Status>(ret));
-    }
 }
 
 /**
@@ -126,12 +130,6 @@
         EXPECT_TRUE(Status::SUCCESS == status ||
                     Status::BRIGHTNESS_NOT_SUPPORTED == status);
     }
-
-    for (const Type& type: supportedTypes) {
-        Return<Status> ret = light->setLight(type, kOff);
-        EXPECT_OK(ret);
-        EXPECT_EQ(Status::SUCCESS, static_cast<Status>(ret));
-    }
 }
 
 /**
@@ -151,7 +149,6 @@
 }
 
 int main(int argc, char **argv) {
-    ::testing::AddGlobalTestEnvironment(new LightHidlEnvironment);
     ::testing::InitGoogleTest(&argc, argv);
     int status = RUN_ALL_TESTS();
     LOG(INFO) << "Test result = " << status;
diff --git a/light/2.0/vts/types.vts b/light/2.0/vts/types.vts
deleted file mode 100644
index a9c8cab..0000000
--- a/light/2.0/vts/types.vts
+++ /dev/null
@@ -1,149 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.light"
-
-
-attribute: {
-    name: "::android::hardware::light::V2_0::Status"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "LIGHT_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "BRIGHTNESS_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::light::V2_0::Flash"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "TIMED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "HARDWARE"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::light::V2_0::Brightness"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "USER"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SENSOR"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "LOW_PERSISTENCE"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::light::V2_0::Type"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "BACKLIGHT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "KEYBOARD"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "BUTTONS"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "BATTERY"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "NOTIFICATIONS"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ATTENTION"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "BLUETOOTH"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "WIFI"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "COUNT"
-        scalar_value: {
-            int32_t: 8
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::light::V2_0::LightState"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "color"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "flashMode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::light::V2_0::Flash"
-    }
-    struct_value: {
-        name: "flashOnMs"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "flashOffMs"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "brightnessMode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::light::V2_0::Brightness"
-    }
-}
-
diff --git a/memtrack/1.0/default/Android.bp b/memtrack/1.0/default/Android.bp
index b43a159..76d7fc8 100644
--- a/memtrack/1.0/default/Android.bp
+++ b/memtrack/1.0/default/Android.bp
@@ -14,6 +14,7 @@
 
 cc_library_shared {
     name: "android.hardware.memtrack@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Memtrack.cpp"],
@@ -24,7 +25,6 @@
         "libhidlbase",
         "libhidltransport",
         "libhardware",
-        "libhwbinder",
         "libutils",
         "android.hardware.memtrack@1.0",
     ],
@@ -33,6 +33,7 @@
 
 cc_binary {
     relative_install_path: "hw",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     name: "android.hardware.memtrack@1.0-service",
     init_rc: ["android.hardware.memtrack@1.0-service.rc"],
@@ -46,7 +47,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "android.hardware.memtrack@1.0",
     ],
 
diff --git a/memtrack/1.0/vts/Memtrack.vts b/memtrack/1.0/vts/Memtrack.vts
deleted file mode 100644
index 42a422e..0000000
--- a/memtrack/1.0/vts/Memtrack.vts
+++ /dev/null
@@ -1,34 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IMemtrack"
-
-package: "android.hardware.memtrack"
-
-import: "android.hardware.memtrack@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getMemory"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::memtrack::V1_0::MemtrackStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::memtrack::V1_0::MemtrackRecord"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::memtrack::V1_0::MemtrackType"
-        }
-    }
-
-}
diff --git a/memtrack/1.0/vts/functional/Android.bp b/memtrack/1.0/vts/functional/Android.bp
index 0f57adc..71e6111 100644
--- a/memtrack/1.0/vts/functional/Android.bp
+++ b/memtrack/1.0/vts/functional/Android.bp
@@ -15,20 +15,19 @@
 //
 
 cc_test {
-    name: "memtrack_hidl_hal_test",
-    gtest: true,
-    srcs: ["memtrack_hidl_hal_test.cpp"],
+    name: "VtsHalMemtrackV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalMemtrackV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhardware",
         "libhidlbase",
-        "libhwbinder",
         "libutils",
         "android.hardware.memtrack@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/memtrack/1.0/vts/functional/memtrack_hidl_hal_test.cpp b/memtrack/1.0/vts/functional/VtsHalMemtrackV1_0TargetTest.cpp
similarity index 77%
rename from memtrack/1.0/vts/functional/memtrack_hidl_hal_test.cpp
rename to memtrack/1.0/vts/functional/VtsHalMemtrackV1_0TargetTest.cpp
index a4b4fa9..a8d8aea 100644
--- a/memtrack/1.0/vts/functional/memtrack_hidl_hal_test.cpp
+++ b/memtrack/1.0/vts/functional/VtsHalMemtrackV1_0TargetTest.cpp
@@ -16,9 +16,11 @@
 
 #define LOG_TAG "memtrack_hidl_hal_test"
 #include <android-base/logging.h>
+#include <android-base/unique_fd.h>
+
 #include <android/hardware/memtrack/1.0/IMemtrack.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include <algorithm>
 #include <vector>
@@ -31,13 +33,14 @@
 using ::android::hardware::hidl_vec;
 using ::android::hardware::Return;
 using ::android::sp;
+using ::android::base::unique_fd;
 using std::vector;
 using std::count_if;
 
-class MemtrackHidlTest : public ::testing::Test {
+class MemtrackHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    memtrack = IMemtrack::getService();
+    memtrack = ::testing::VtsHalHidlTargetTestBase::getService<IMemtrack>();
     ASSERT_NE(memtrack, nullptr);
   }
 
@@ -66,42 +69,6 @@
   return std::find(statusVec.begin(), statusVec.end(), s) != statusVec.end();
 }
 
-/* Returns a pid found in /proc for which the string read from
- * /proc/[pid]/cmdline matches cmd, or -1 if no such pid exists.
- */
-pid_t getPidFromCmd(const char cmd[], uint32_t len) {
-  const char procs[] = "/proc/";
-  DIR *dir = opendir(procs);
-  if (!dir) {
-    return -1;
-  }
-
-  struct dirent *proc;
-  while ((proc = readdir(dir)) != NULL) {
-    if (!isdigit(proc->d_name[0])) {
-      continue;
-    }
-    char line[len];
-    char fname[PATH_MAX];
-    snprintf(fname, PATH_MAX, "/proc/%s/cmdline", proc->d_name);
-
-    FILE *file = fopen(fname, "r");
-    if (!file) {
-      continue;
-    }
-    char *str = fgets(line, len, file);
-    fclose(file);
-    if (!str || strcmp(str, cmd)) {
-      continue;
-    } else {
-      closedir(dir);
-      return atoi(proc->d_name);
-    }
-  }
-  closedir(dir);
-  return -1;
-}
-
 auto generate_cb(MemtrackStatus *s, hidl_vec<MemtrackRecord> *v) {
   return [=](MemtrackStatus status, hidl_vec<MemtrackRecord> vec) {
     *s = status;
@@ -135,15 +102,15 @@
   ASSERT_TRUE(validStatus(s));
 }
 
-/* Call memtrack on the surfaceflinger process and check that the results are
- * reasonable for all memory types, including valid flag combinations for
- * every MemtrackRecord returned.
+/* Call memtrack on this process and check that the results are reasonable
+ * for all memory types, including valid flag combinations for every
+ * MemtrackRecord returned.
  */
-TEST_F(MemtrackHidlTest, SurfaceflingerTest) {
-  const char cmd[] = "/system/bin/surfaceflinger";
-  const uint32_t len = sizeof(cmd);
-  pid_t pid = getPidFromCmd(cmd, len);
-  ASSERT_LE(0, pid) << "Surfaceflinger process not found";
+TEST_F(MemtrackHidlTest, GetMemoryTest) {
+  /* Opening this device causes the kernel to provide memtrack with memory
+   * info for this process.
+   */
+  unique_fd fd(open("/dev/kgsl-3d0", O_RDWR));
 
   MemtrackStatus s;
   hidl_vec<MemtrackRecord> v;
@@ -152,7 +119,7 @@
   for (uint32_t i = 0; i < static_cast<uint32_t>(MemtrackType::NUM_TYPES);
        i++) {
     Return<void> ret =
-        memtrack->getMemory(pid, static_cast<MemtrackType>(i), cb);
+        memtrack->getMemory(getpid(), static_cast<MemtrackType>(i), cb);
     ASSERT_TRUE(ret.isOk());
 
     switch (s) {
diff --git a/memtrack/1.0/vts/types.vts b/memtrack/1.0/vts/types.vts
deleted file mode 100644
index bec090f..0000000
--- a/memtrack/1.0/vts/types.vts
+++ /dev/null
@@ -1,121 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.memtrack"
-
-
-attribute: {
-    name: "::android::hardware::memtrack::V1_0::MemtrackFlag"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SMAPS_ACCOUNTED"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "SMAPS_UNACCOUNTED"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "SHARED"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "SHARED_PSS"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "PRIVATE"
-        scalar_value: {
-            uint32_t: 32
-        }
-        enumerator: "SYSTEM"
-        scalar_value: {
-            uint32_t: 64
-        }
-        enumerator: "DEDICATED"
-        scalar_value: {
-            uint32_t: 128
-        }
-        enumerator: "NONSECURE"
-        scalar_value: {
-            uint32_t: 256
-        }
-        enumerator: "SECURE"
-        scalar_value: {
-            uint32_t: 512
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::memtrack::V1_0::MemtrackType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "OTHER"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "GL"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "GRAPHICS"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "MULTIMEDIA"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "CAMERA"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "NUM_TYPES"
-        scalar_value: {
-            uint32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::memtrack::V1_0::MemtrackStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "MEMORY_TRACKING_NOT_SUPPORTED"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "TYPE_NOT_SUPPORTED"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::memtrack::V1_0::MemtrackRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sizeInBytes"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "flags"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
diff --git a/nfc/1.0/default/Android.bp b/nfc/1.0/default/Android.bp
index 02f5664..a157f86 100644
--- a/nfc/1.0/default/Android.bp
+++ b/nfc/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.nfc@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["Nfc.cpp"],
@@ -7,7 +8,6 @@
         "liblog",
         "libcutils",
         "libhardware",
-        "libhwbinder",
         "libbase",
         "libcutils",
         "libutils",
diff --git a/nfc/1.0/default/Android.mk b/nfc/1.0/default/Android.mk
index fbb340f..2e1f17f 100644
--- a/nfc/1.0/default/Android.mk
+++ b/nfc/1.0/default/Android.mk
@@ -18,7 +18,6 @@
 	libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-	libhwbinder \
 	libhidlbase \
 	libhidltransport \
 	android.hardware.nfc@1.0 \
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index 3bd5e41..c610406 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -14,12 +14,14 @@
 
 sp<INfcClientCallback> Nfc::mCallback = NULL;
 
-Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device) {
+Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device),
+    mDeathRecipient(new NfcDeathRecipient(this)) {
 }
 
 // Methods from ::android::hardware::nfc::V1_0::INfc follow.
 ::android::hardware::Return<NfcStatus> Nfc::open(const sp<INfcClientCallback>& clientCallback)  {
     mCallback = clientCallback;
+    mCallback->linkToDeath(mDeathRecipient, 0 /*cookie*/);
     int ret = mDevice->open(mDevice, eventCallback, dataCallback);
     return ret == 0 ? NfcStatus::OK : NfcStatus::FAILED;
 }
@@ -39,6 +41,7 @@
 }
 
 ::android::hardware::Return<NfcStatus> Nfc::close()  {
+    mCallback->unlinkToDeath(mDeathRecipient);
     return mDevice->close(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
 }
 
diff --git a/nfc/1.0/default/Nfc.h b/nfc/1.0/default/Nfc.h
index 13004a5..d8787fd 100644
--- a/nfc/1.0/default/Nfc.h
+++ b/nfc/1.0/default/Nfc.h
@@ -19,6 +19,16 @@
 using ::android::hardware::hidl_string;
 using ::android::sp;
 
+struct NfcDeathRecipient : hidl_death_recipient {
+    NfcDeathRecipient(const sp<INfc> nfc) : mNfc(nfc) {
+    }
+
+    virtual void serviceDied(uint64_t /*cookie*/, const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+        mNfc->close();
+    }
+    sp<INfc> mNfc;
+};
+
 struct Nfc : public INfc {
   Nfc(nfc_nci_device_t* device);
   ::android::hardware::Return<NfcStatus> open(const sp<INfcClientCallback>& clientCallback)  override;
@@ -31,21 +41,28 @@
 
   static void eventCallback(uint8_t event, uint8_t status) {
       if (mCallback != nullptr) {
-          mCallback->sendEvent(
+          auto ret = mCallback->sendEvent(
                   (::android::hardware::nfc::V1_0::NfcEvent) event,
                   (::android::hardware::nfc::V1_0::NfcStatus) status);
+          if (!ret.isOk()) {
+              ALOGW("Failed to call back into NFC process.");
+          }
       }
   }
   static void dataCallback(uint16_t data_len, uint8_t* p_data) {
       hidl_vec<uint8_t> data;
       data.setToExternal(p_data, data_len);
       if (mCallback != nullptr) {
-          mCallback->sendData(data);
+          auto ret = mCallback->sendData(data);
+          if (!ret.isOk()) {
+              ALOGW("Failed to call back into NFC process.");
+          }
       }
   }
   private:
     static sp<INfcClientCallback> mCallback;
     const nfc_nci_device_t*       mDevice;
+    sp<NfcDeathRecipient>         mDeathRecipient;
 };
 
 extern "C" INfc* HIDL_FETCH_INfc(const char* name);
diff --git a/nfc/1.0/vts/Nfc.vts b/nfc/1.0/vts/Nfc.vts
deleted file mode 100644
index 48b2750..0000000
--- a/nfc/1.0/vts/Nfc.vts
+++ /dev/null
@@ -1,133 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "INfc"
-
-package: "android.hardware.nfc"
-
-import: "android.hardware.nfc@1.0::INfcClientCallback"
-import: "android.hardware.nfc@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "open"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::nfc::V1_0::INfcClientCallback"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "write"
-            next: "coreInitialized"
-            next: "prediscover"
-            next: "powerCycle"
-            next: "controlGranted"
-        }
-    }
-
-    api: {
-        name: "write"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        callflow: {
-            next: "write"
-            next: "prediscover"
-            next: "coreInitialized"
-            next: "close"
-            next: "powerCycle"
-            next: "controlGranted"
-        }
-    }
-
-    api: {
-        name: "coreInitialized"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        callflow: {
-            next: "write"
-            next: "prediscover"
-            next: "close"
-        }
-    }
-
-    api: {
-        name: "prediscover"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
-        }
-        callflow: {
-            next: "write"
-            next: "close"
-            next: "coreInitialized"
-            next: "powerCycle"
-            next: "controlGranted"
-        }
-    }
-
-    api: {
-        name: "close"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-    api: {
-        name: "controlGranted"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
-        }
-        callflow: {
-            next: "write"
-            next: "close"
-            next: "prediscover"
-            next: "coreInitialized"
-            next: "powerCycle"
-        }
-    }
-
-    api: {
-        name: "powerCycle"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
-        }
-        callflow: {
-            next: "write"
-            next: "coreInitialized"
-            next: "prediscover"
-            next: "controlGranted"
-            next: "close"
-        }
-    }
-
-}
diff --git a/nfc/1.0/vts/NfcClientCallback.vts b/nfc/1.0/vts/NfcClientCallback.vts
deleted file mode 100644
index b06f12b..0000000
--- a/nfc/1.0/vts/NfcClientCallback.vts
+++ /dev/null
@@ -1,34 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "INfcClientCallback"
-
-package: "android.hardware.nfc"
-
-import: "android.hardware.nfc@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "sendEvent"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcEvent"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
-        }
-    }
-
-    api: {
-        name: "sendData"
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-}
diff --git a/nfc/1.0/vts/functional/Android.bp b/nfc/1.0/vts/functional/Android.bp
index 0f9eb3d..d9ba702 100644
--- a/nfc/1.0/vts/functional/Android.bp
+++ b/nfc/1.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "nfc_hidl_hal_test",
-    gtest: true,
-    srcs: ["nfc_hidl_hal_test.cpp"],
+    name: "VtsHalNfcV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalNfcV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.nfc@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
similarity index 77%
rename from nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp
rename to nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
index a0c5f1a..aa3bc9c 100644
--- a/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp
+++ b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
@@ -22,7 +22,7 @@
 #include <android/hardware/nfc/1.0/types.h>
 #include <hardware/nfc.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <chrono>
 #include <condition_variable>
 #include <mutex>
@@ -56,10 +56,10 @@
 #define TIMEOUT_PERIOD 5
 
 // The main test class for NFC HIDL HAL.
-class NfcHidlTest : public ::testing::Test {
+class NfcHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    nfc_ = INfc::getService();
+    nfc_ = ::testing::VtsHalHidlTargetTestBase::getService<INfc>();
     ASSERT_NE(nfc_, nullptr);
 
     nfc_cb_ = new NfcClientCallback(*this);
@@ -325,18 +325,42 @@
 }
 
 /*
+ * PowerCycleAfterClose:
+ * Calls powerCycle() after close()
+ * Checks status
+ */
+TEST_F(NfcHidlTest, PowerCycleAfterClose) {
+  EXPECT_EQ(NfcStatus::OK, nfc_->close());
+  // Wait for CLOSE_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::CLOSE_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+
+  EXPECT_EQ(NfcStatus::FAILED, nfc_->powerCycle());
+
+  EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
+  // Wait for OPEN_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::OPEN_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+}
+
+/*
  * CoreInitialized:
- * Calls coreInitialized()
+ * Calls coreInitialized() with different data
  * Waits for NfcEvent.POST_INIT_CPLT
  */
 TEST_F(NfcHidlTest, CoreInitialized) {
   NfcData data;
   data.resize(1);
-  data[0] = 0;
-  EXPECT_EQ(NfcStatus::OK, nfc_->coreInitialized(data));
-  // Wait for NfcEvent.POST_INIT_CPLT
-  EXPECT_EQ(std::cv_status::no_timeout, wait());
-  EXPECT_EQ(NfcEvent::POST_INIT_CPLT, last_event_);
+  for (int i = 0; i <= 6; i++)
+  {
+    data[0] = i;
+    EXPECT_EQ(NfcStatus::OK, nfc_->coreInitialized(data));
+    // Wait for NfcEvent.POST_INIT_CPLT
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(NfcEvent::POST_INIT_CPLT, last_event_);
+  }
 }
 
 /*
@@ -348,6 +372,27 @@
   EXPECT_EQ(NfcStatus::OK, nfc_->controlGranted());
 }
 
+/*
+ * ControlGrantedAfterClose:
+ * Call controlGranted() after close
+ * Checks the return value
+ */
+TEST_F(NfcHidlTest, ControlGrantedAfterClose) {
+  EXPECT_EQ(NfcStatus::OK, nfc_->close());
+  // Wait for CLOSE_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::CLOSE_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+
+  EXPECT_EQ(NfcStatus::OK, nfc_->controlGranted());
+
+  EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
+  // Wait for OPEN_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::OPEN_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+}
+
 /* PreDiscover:
  * Calls prediscover()
  * Checks the return value
@@ -356,6 +401,59 @@
   EXPECT_EQ(NfcStatus::OK, nfc_->prediscover());
 }
 
+/*
+ * PreDiscoverAfterClose:
+ * Call prediscover() after close
+ * Checks the return value
+ */
+TEST_F(NfcHidlTest, PreDiscoverAfterClose) {
+  EXPECT_EQ(NfcStatus::OK, nfc_->close());
+  // Wait for CLOSE_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::CLOSE_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+
+  EXPECT_EQ(NfcStatus::OK, nfc_->prediscover());
+
+  EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
+  // Wait for OPEN_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::OPEN_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+}
+
+/*
+ * CloseAfterClose:
+ * Calls close() multiple times
+ * Checks status
+ */
+TEST_F(NfcHidlTest, CloseAfterClose) {
+  EXPECT_EQ(NfcStatus::OK, nfc_->close());
+  // Wait for CLOSE_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::CLOSE_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+
+  EXPECT_EQ(NfcStatus::FAILED, nfc_->close());
+
+  EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
+  // Wait for OPEN_CPLT event
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(NfcEvent::OPEN_CPLT, last_event_);
+  EXPECT_EQ(NfcStatus::OK, last_status_);
+}
+
+
+/*
+ * OpenAfterOpen:
+ * Calls open() multiple times
+ * Checks status
+ */
+TEST_F(NfcHidlTest, OpenAfterOpen) {
+  EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
+  EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
+}
+
 int main(int argc, char** argv) {
   ::testing::AddGlobalTestEnvironment(new NfcHidlEnvironment);
   ::testing::InitGoogleTest(&argc, argv);
diff --git a/nfc/1.0/vts/types.vts b/nfc/1.0/vts/types.vts
deleted file mode 100644
index e43db1e..0000000
--- a/nfc/1.0/vts/types.vts
+++ /dev/null
@@ -1,73 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.nfc"
-
-
-attribute: {
-    name: "::android::hardware::nfc::V1_0::NfcEvent"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "OPEN_CPLT"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "CLOSE_CPLT"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "POST_INIT_CPLT"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "PRE_DISCOVER_CPLT"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "REQUEST_CONTROL"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "RELEASE_CONTROL"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "ERROR"
-        scalar_value: {
-            uint32_t: 6
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::nfc::V1_0::NfcStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "OK"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "FAILED"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "ERR_TRANSPORT"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "ERR_CMD_TIMEOUT"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "REFUSED"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
diff --git a/power/1.0/default/Android.bp b/power/1.0/default/Android.bp
index 71daaeb..4f43b95 100644
--- a/power/1.0/default/Android.bp
+++ b/power/1.0/default/Android.bp
@@ -14,6 +14,7 @@
 
 cc_library_shared {
     name: "android.hardware.power@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Power.cpp"],
@@ -28,7 +29,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libutils",
         "android.hardware.power@1.0",
     ],
@@ -37,6 +37,7 @@
 
 cc_binary {
     proprietary: true,
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     name: "android.hardware.power@1.0-service",
     init_rc: ["android.hardware.power@1.0-service.rc"],
@@ -54,7 +55,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "android.hardware.power@1.0",
     ],
 
diff --git a/power/1.0/vts/Power.vts b/power/1.0/vts/Power.vts
deleted file mode 100644
index 4d3d4ff..0000000
--- a/power/1.0/vts/Power.vts
+++ /dev/null
@@ -1,58 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IPower"
-
-package: "android.hardware.power"
-
-import: "android.hardware.power@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "setInteractive"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "powerHint"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::power::V1_0::PowerHint"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setFeature"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::power::V1_0::Feature"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getPlatformLowPowerStats"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::power::V1_0::PowerStatePlatformSleepState"
-            }
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::power::V1_0::Status"
-        }
-    }
-
-}
diff --git a/power/1.0/vts/functional/Android.bp b/power/1.0/vts/functional/Android.bp
index 7aa2611..5ab1eb4 100644
--- a/power/1.0/vts/functional/Android.bp
+++ b/power/1.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "power_hidl_hal_test",
-    gtest: true,
-    srcs: ["power_hidl_hal_test.cpp"],
+    name: "VtsHalPowerV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalPowerV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.power@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
new file mode 100644
index 0000000..cd1a261
--- /dev/null
+++ b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2016 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 "power_hidl_hal_test"
+#include <android-base/logging.h>
+
+#include <cutils/properties.h>
+
+#include <android-base/unique_fd.h>
+#include <android/hardware/power/1.0/IPower.h>
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include <algorithm>
+
+using ::android::hardware::power::V1_0::IPower;
+using ::android::hardware::power::V1_0::Feature;
+using ::android::hardware::power::V1_0::PowerHint;
+using ::android::hardware::power::V1_0::PowerStatePlatformSleepState;
+using ::android::hardware::power::V1_0::Status;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::sp;
+using ::android::base::unique_fd;
+
+using std::vector;
+
+#define CPU_GOVERNOR_PATH \
+  "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
+#define AVAILABLE_GOVERNORS_PATH \
+  "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
+
+class PowerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+ public:
+  virtual void SetUp() override {
+    power = ::testing::VtsHalHidlTargetTestBase::getService<IPower>();
+    ASSERT_NE(power, nullptr);
+  }
+
+  virtual void TearDown() override {}
+
+  sp<IPower> power;
+};
+
+// Sanity check Power::setInteractive.
+TEST_F(PowerHidlTest, SetInteractive) {
+  Return<void> ret;
+
+  ret = power->setInteractive(true);
+  ASSERT_TRUE(ret.isOk());
+
+  ret = power->setInteractive(false);
+  ASSERT_TRUE(ret.isOk());
+}
+
+// Test Power::setInteractive and Power::powerHint(Launch)
+// with each available CPU governor, if available
+TEST_F(PowerHidlTest, TryDifferentGovernors) {
+  Return<void> ret;
+
+  unique_fd fd1(open(CPU_GOVERNOR_PATH, O_RDWR));
+  unique_fd fd2(open(AVAILABLE_GOVERNORS_PATH, O_RDONLY));
+  if (fd1 < 0 || fd2 < 0) {
+    // Files don't exist, so skip the rest of the test case
+    SUCCEED();
+  }
+
+  char old_governor[80];
+  ASSERT_LE(0, read(fd1, old_governor, 80));
+
+  char governors[1024];
+  unsigned len = read(fd2, governors, 1024);
+  ASSERT_LE(0u, len);
+  governors[len] = '\0';
+
+  char *saveptr;
+  char *name = strtok_r(governors, " \n", &saveptr);
+  while (name) {
+    ASSERT_LE(0, write(fd1, name, strlen(name)));
+    ret = power->setInteractive(true);
+    ASSERT_TRUE(ret.isOk());
+
+    ret = power->setInteractive(false);
+    ASSERT_TRUE(ret.isOk());
+
+    ret = power->setInteractive(false);
+    ASSERT_TRUE(ret.isOk());
+
+    power->powerHint(PowerHint::LAUNCH, 1);
+    power->powerHint(PowerHint::LAUNCH, 0);
+
+    name = strtok_r(NULL, " \n", &saveptr);
+  }
+
+  ASSERT_LE(0, write(fd1, old_governor, strlen(old_governor)));
+}
+
+// Sanity check Power::powerHint on good and bad inputs.
+TEST_F(PowerHidlTest, PowerHint) {
+  PowerHint badHint = static_cast<PowerHint>(0xA);
+  auto hints = {PowerHint::VSYNC,         PowerHint::INTERACTION,
+                PowerHint::VIDEO_ENCODE,  PowerHint::VIDEO_DECODE,
+                PowerHint::LOW_POWER,     PowerHint::SUSTAINED_PERFORMANCE,
+                PowerHint::VR_MODE,       PowerHint::LAUNCH,
+                badHint};
+  Return<void> ret;
+  for (auto hint : hints) {
+    ret = power->powerHint(hint, 30000);
+    ASSERT_TRUE(ret.isOk());
+
+    ret = power->powerHint(hint, 0);
+    ASSERT_TRUE(ret.isOk());
+  }
+
+  // Turning these hints on in different orders triggers different code paths,
+  // so iterate over possible orderings.
+  std::vector<PowerHint> hints2 = {PowerHint::LAUNCH, PowerHint::VR_MODE,
+                                   PowerHint::SUSTAINED_PERFORMANCE,
+                                   PowerHint::INTERACTION};
+  auto compareHints = [](PowerHint l, PowerHint r) {
+    return static_cast<uint32_t>(l) < static_cast<uint32_t>(r);
+  };
+  std::sort(hints2.begin(), hints2.end(), compareHints);
+  do {
+    for (auto iter = hints2.begin(); iter != hints2.end(); iter++) {
+      ret = power->powerHint(*iter, 0);
+      ASSERT_TRUE(ret.isOk());
+    }
+    for (auto iter = hints2.begin(); iter != hints2.end(); iter++) {
+      ret = power->powerHint(*iter, 30000);
+      ASSERT_TRUE(ret.isOk());
+    }
+  } while (std::next_permutation(hints2.begin(), hints2.end(), compareHints));
+}
+
+// Sanity check Power::setFeature() on good and bad inputs.
+TEST_F(PowerHidlTest, SetFeature) {
+  Return<void> ret;
+  ret = power->setFeature(Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE, true);
+  ASSERT_TRUE(ret.isOk());
+  ret = power->setFeature(Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE, false);
+  ASSERT_TRUE(ret.isOk());
+
+  Feature badFeature = static_cast<Feature>(0x2);
+  ret = power->setFeature(badFeature, true);
+  ASSERT_TRUE(ret.isOk());
+  ret = power->setFeature(badFeature, false);
+  ASSERT_TRUE(ret.isOk());
+}
+
+// Sanity check Power::getPlatformLowPowerStats().
+TEST_F(PowerHidlTest, GetPlatformLowPowerStats) {
+  hidl_vec<PowerStatePlatformSleepState> vec;
+  Status s;
+  auto cb = [&vec, &s](hidl_vec<PowerStatePlatformSleepState> states,
+                       Status status) {
+    vec = states;
+    s = status;
+  };
+  Return<void> ret = power->getPlatformLowPowerStats(cb);
+  ASSERT_TRUE(ret.isOk());
+  ASSERT_TRUE(s == Status::SUCCESS || s == Status::FILESYSTEM_ERROR);
+}
+
+int main(int argc, char **argv) {
+  ::testing::InitGoogleTest(&argc, argv);
+  int status = RUN_ALL_TESTS();
+  LOG(INFO) << "Test result = " << status;
+  return status;
+}
diff --git a/power/1.0/vts/functional/power_hidl_hal_test.cpp b/power/1.0/vts/functional/power_hidl_hal_test.cpp
deleted file mode 100644
index b114944..0000000
--- a/power/1.0/vts/functional/power_hidl_hal_test.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2016 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 "power_hidl_hal_test"
-#include <android-base/logging.h>
-
-#include <cutils/properties.h>
-
-#include <android/hardware/power/1.0/IPower.h>
-
-#include <gtest/gtest.h>
-
-using ::android::hardware::power::V1_0::IPower;
-using ::android::hardware::power::V1_0::Feature;
-using ::android::hardware::power::V1_0::PowerHint;
-using ::android::hardware::power::V1_0::PowerStatePlatformSleepState;
-using ::android::hardware::power::V1_0::Status;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::Return;
-using ::android::sp;
-
-class PowerHidlTest : public ::testing::Test {
- public:
-  virtual void SetUp() override {
-    power = IPower::getService();
-    ASSERT_NE(power, nullptr);
-  }
-
-  virtual void TearDown() override {}
-
-  sp<IPower> power;
-};
-
-// Sanity check Power::setInteractive.
-TEST_F(PowerHidlTest, SetInteractive) {
-  Return<void> ret;
-
-  ret = power->setInteractive(true);
-  ASSERT_TRUE(ret.isOk());
-
-  ret = power->setInteractive(false);
-  ASSERT_TRUE(ret.isOk());
-}
-
-// Sanity check Power::powerHint on good and bad inputs.
-TEST_F(PowerHidlTest, PowerHint) {
-  PowerHint badHint = static_cast<PowerHint>(0xA);
-  auto hints = {PowerHint::VSYNC,         PowerHint::INTERACTION,
-                PowerHint::VIDEO_ENCODE,  PowerHint::VIDEO_DECODE,
-                PowerHint::LOW_POWER,     PowerHint::SUSTAINED_PERFORMANCE,
-                PowerHint::VR_MODE,       PowerHint::LAUNCH,
-                badHint};
-  Return<void> ret;
-  for (auto hint : hints) {
-    ret = power->powerHint(hint, 1);
-    ASSERT_TRUE(ret.isOk());
-
-    ret = power->powerHint(hint, 0);
-    ASSERT_TRUE(ret.isOk());
-  }
-}
-
-// Sanity check Power::setFeature() on good and bad inputs.
-TEST_F(PowerHidlTest, SetFeature) {
-  Return<void> ret;
-  ret = power->setFeature(Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE, true);
-  ASSERT_TRUE(ret.isOk());
-  ret = power->setFeature(Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE, false);
-  ASSERT_TRUE(ret.isOk());
-
-  Feature badFeature = static_cast<Feature>(0x2);
-  ret = power->setFeature(badFeature, true);
-  ASSERT_TRUE(ret.isOk());
-  ret = power->setFeature(badFeature, false);
-  ASSERT_TRUE(ret.isOk());
-}
-
-// Sanity check Power::getPlatformLowPowerStats().
-TEST_F(PowerHidlTest, GetPlatformLowPowerStats) {
-  hidl_vec<PowerStatePlatformSleepState> vec;
-  Status s;
-  auto cb = [&vec, &s](hidl_vec<PowerStatePlatformSleepState> states,
-                       Status status) {
-    vec = states;
-    s = status;
-  };
-  Return<void> ret = power->getPlatformLowPowerStats(cb);
-  ASSERT_TRUE(ret.isOk());
-  ASSERT_TRUE(s == Status::SUCCESS || s == Status::FILESYSTEM_ERROR);
-}
-
-int main(int argc, char **argv) {
-  ::testing::InitGoogleTest(&argc, argv);
-  int status = RUN_ALL_TESTS();
-  LOG(INFO) << "Test result = " << status;
-  return status;
-}
diff --git a/power/1.0/vts/types.vts b/power/1.0/vts/types.vts
deleted file mode 100644
index 5724946..0000000
--- a/power/1.0/vts/types.vts
+++ /dev/null
@@ -1,129 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.power"
-
-
-attribute: {
-    name: "::android::hardware::power::V1_0::PowerHint"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "VSYNC"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "INTERACTION"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "VIDEO_ENCODE"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "VIDEO_DECODE"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "LOW_POWER"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "SUSTAINED_PERFORMANCE"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "VR_MODE"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "LAUNCH"
-        scalar_value: {
-            uint32_t: 8
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::power::V1_0::Feature"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "POWER_FEATURE_DOUBLE_TAP_TO_WAKE"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::power::V1_0::Status"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "FILESYSTEM_ERROR"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::power::V1_0::PowerStateVoter"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "totalTimeInMsecVotedForSinceBoot"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "totalNumberOfTimesVotedSinceBoot"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::power::V1_0::PowerStatePlatformSleepState"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "residencyInMsecSinceBoot"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "totalTransitions"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "supportedOnlyInSuspend"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "voters"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::power::V1_0::PowerStateVoter"
-        }
-    }
-}
-
diff --git a/radio/1.0/Android.mk b/radio/1.0/Android.mk
index 7f4c7d4..94072fb 100644
--- a/radio/1.0/Android.mk
+++ b/radio/1.0/Android.mk
@@ -929,6 +929,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (CellIdentity)
+#
+GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentity.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio@1.0::types.CellIdentity
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (CellIdentityCdma)
 #
 GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentityCdma.java
@@ -3944,6 +3963,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (CellIdentity)
+#
+GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentity.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio@1.0::types.CellIdentity
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (CellIdentityCdma)
 #
 GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentityCdma.java
diff --git a/radio/1.0/IRadio.hal b/radio/1.0/IRadio.hal
index bda7d65..b3e3e98 100644
--- a/radio/1.0/IRadio.hal
+++ b/radio/1.0/IRadio.hal
@@ -378,13 +378,18 @@
      * @param radioTechnology Radio technology to use.
      * @param dataProfileInfo data profile info.
      * @param modemCognitive Indicating this profile was sent to the modem through setDataProfile
-     *        earlier.
+     *                       earlier.
      * @param roamingAllowed Indicating data roaming is allowed or not by the user.
+     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+     *                  RIL API must be filled accordingly based on the roaming condition.
+     *                  Note this is for backward compatibility with the old radio modem. The modem
+     *                  must not use this param for any other reason.
      *
      * Response function is IRadioResponse.setupDataCallResponse()
      */
     oneway setupDataCall(int32_t serial, RadioTechnology radioTechnology,
-            DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed);
+            DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
+            bool isRoaming);
 
     /*
      * Request ICC I/O operation.
@@ -726,40 +731,6 @@
     oneway getDataCallList(int32_t serial);
 
     /*
-     * This request is reserved for OEM-specific uses. It passes raw byte arrays back and forth.
-     *
-     * @param serial Serial number of request.
-     * @param data data passed as raw bytes to oem
-     *
-     * Response function is IRadioResponse.sendOemRadioRequestRawResponse()
-     */
-    oneway sendOemRadioRequestRaw(int32_t serial, vec<uint8_t> data);
-
-    /*
-     * This request is reserved for OEM-specific uses. It passes strings back and forth.
-     *
-     * @param serial Serial number of request.
-     * @param data data passed as strings to oem
-     *
-     * Response function is IRadioResponse.sendOemRadioRequestStringsResponse()
-     */
-    oneway sendOemRadioRequestStrings(int32_t serial, vec<string> data);
-
-    /*
-     * Indicates the current state of the screen. When the screen is off, the
-     * Radio must notify the baseband to suppress certain notifications (eg,
-     * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
-     * in an effort to conserve power. These notifications must resume when the
-     * screen is on.
-     *
-     * @param serial Serial number of request.
-     * @param enable true = screen on, false = screen off.
-     *
-     * Response function is IRadioResponse.sendScreenStateResponse()
-     */
-    oneway sendScreenState(int32_t serial, bool enable);
-
-    /*
      * Enables/disables supplementary service related notifications from the network.
      * Notifications are reported via unsolSuppSvcNotification().
      *
@@ -1159,7 +1130,7 @@
     oneway reportSmsMemoryStatus(int32_t serial, bool available);
 
     /*
-     * Indicates that the StkSerivce is running and is
+     * Indicates that the StkService is running and is
      * ready to receive unsolicited stkXXXXX commands.
      *
      * @param serial Serial number of request.
@@ -1261,13 +1232,17 @@
      *
      * @param serial Serial number of request.
      * @param dataProfileInfo data profile containing APN settings
-     * @param modemCognitive is indicating the data profile was sent to the modem through
-     *        setDataProfile earlier.
+     * @param modemCognitive indicating the data profile was sent to the modem through
+     *                       setDataProfile earlier.
+     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+     *                  RIL_InitialAttachApn must be filled accordingly based on the roaming
+     *                  condition. Note this is for backward compatibility with the old radio modem.
+     *                  The modem must not use this param for any other reason.
      *
      * Response callback is IRadioResponse.setInitialAttachApnResponse()
      */
     oneway setInitialAttachApn(int32_t serial, DataProfileInfo dataProfileInfo,
-            bool modemCognitive);
+            bool modemCognitive, bool isRoaming);
 
     /*
      * Request current IMS registration state
@@ -1433,10 +1408,14 @@
      *
      * @param serial Serial number of request.
      * @param profiles Array of DataProfiles to set.
+     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+     *                  RIL API RIL_DataProfileInfo must be filled accordingly based on the
+     *                  roaming condition. Note this is for backward compatibility with the old
+     *                  radio modem. The modem must not use this param for any other reason.
      *
      * Response callback is IRadioResponse.setDataProfileResponse()
      */
-    oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles);
+    oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles, bool isRoaming);
 
     /*
      * Device is shutting down. All further commands are ignored
@@ -1449,7 +1428,7 @@
     oneway requestShutdown(int32_t serial);
 
     /*
-     * Used to get phone radio capablility.
+     * Used to get phone radio capability.
      *
      * @param serial Serial number of request.
      *
diff --git a/radio/1.0/IRadioIndication.hal b/radio/1.0/IRadioIndication.hal
index 81ac13a..0b95821 100644
--- a/radio/1.0/IRadioIndication.hal
+++ b/radio/1.0/IRadioIndication.hal
@@ -293,14 +293,6 @@
    oneway cdmaInfoRec(RadioIndicationType type, CdmaInformationRecords records);
 
    /*
-    * This is for OEM specific use.
-    *
-    * @param type Type of radio indication
-    * @param data data passed as raw bytes
-    */
-   oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
-
-   /*
     * Indicates that nework doesn't have in-band information, need to
     * play out-band tone.
     *
diff --git a/radio/1.0/IRadioResponse.hal b/radio/1.0/IRadioResponse.hal
index 637f697..cd0899a 100644
--- a/radio/1.0/IRadioResponse.hal
+++ b/radio/1.0/IRadioResponse.hal
@@ -923,41 +923,6 @@
 
     /*
      * @param info Response info struct containing response type, serial no. and error
-     * @param data data returned by oem
-     *
-     * Valid errors returned:
-     *   RadioError:NONE
-     *   RadioError:RADIO_NOT_AVAILABLE
-     *   RadioError:INVALID_ARGUMENTS
-     *   RadioError:OEM_ERROR_X
-     */
-    oneway sendOemRilRequestRawResponse(RadioResponseInfo info, vec<uint8_t> data);
-
-    /*
-     * @param info Response info struct containing response type, serial no. and error
-     * @param data data returned by oem
-     *
-     * Valid errors returned:
-     *   RadioError:NONE
-     *   RadioError:RADIO_NOT_AVAILABLE
-     *   RadioError:INVALID_ARGUMENTS
-     *   RadioError:OEM_ERROR_X
-     */
-    oneway sendOemRilRequestStringsResponse(RadioResponseInfo info, vec<string> data);
-
-    /*
-     * @param info Response info struct containing response type, serial no. and error
-     *
-     * Valid errors returned:
-     *   RadioError:NONE
-     *   RadioError:RADIO_NOT_AVAILABLE
-     *   RadioError:INVALID_ARGUMENTS
-     *   RadioError:GENERIC_FAILURE
-     */
-    oneway sendScreenStateResponse(RadioResponseInfo info);
-
-    /*
-     * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
      *   RadioError:NONE
diff --git a/radio/1.0/types.hal b/radio/1.0/types.hal
index 91030ef..7c1d143 100644
--- a/radio/1.0/types.hal
+++ b/radio/1.0/types.hal
@@ -499,21 +499,21 @@
  * "managed roaming"
  */
 enum RegState : int32_t {
-    NOT_REG_MT_NOT_SEARCHING_OP,          // Not registered, MT is not currently searching
+    NOT_REG_MT_NOT_SEARCHING_OP = 0,      // Not registered, MT is not currently searching
                                           // a new operator to register
-    REG_HOME,                             // Registered, home network
-    NOT_REG_MT_SEARCHING_OP,              // Not registered, but MT is currently searching
+    REG_HOME = 1,                         // Registered, home network
+    NOT_REG_MT_SEARCHING_OP = 2,          // Not registered, but MT is currently searching
                                           // a new operator to register
-    REG_DENIED,                           // Registration denied
-    UNKNOWN,                              // Unknown
-    REG_ROAMING,                          // Registered, roaming
-    NOT_REG_MT_NOT_SEARCHING_OP_EM,       // Same as NOT_REG_MT_NOT_SEARCHING_OP but indicates that
+    REG_DENIED = 3,                       // Registration denied
+    UNKNOWN = 4,                          // Unknown
+    REG_ROAMING = 5,                      // Registered, roaming
+    NOT_REG_MT_NOT_SEARCHING_OP_EM = 10,  // Same as NOT_REG_MT_NOT_SEARCHING_OP but indicates that
                                           // emergency calls are enabled.
-    NOT_REG_MT_SEARCHING_OP_EM,           // Same as NOT_REG_MT_SEARCHING_OP but indicates that
+    NOT_REG_MT_SEARCHING_OP_EM = 12,      // Same as NOT_REG_MT_SEARCHING_OP but indicates that
                                           // emergency calls are enabled.
-    REG_DENIED_EM,                        // Same as REG_DENIED but indicates that
+    REG_DENIED_EM = 13,                   // Same as REG_DENIED but indicates that
                                           // emergency calls are enabled.
-    UNKNOWN_EM,                           // Same as UNKNOWN but indicates that
+    UNKNOWN_EM = 14,                      // Same as UNKNOWN but indicates that
                                           // emergency calls are enabled.
 };
 
@@ -815,6 +815,7 @@
 };
 
 enum CellInfoType : int32_t {
+    NONE = 0,
     GSM = 1,
     CDMA = 2,
     LTE = 3,
@@ -1281,11 +1282,11 @@
 };
 
 struct SetupDataCallResult {
-    int32_t status;                       // A RadioDataCallFailCause, 0 which is
-                                          // RadioDataCallFailCause:NONE if no error
-    int32_t suggestedRetryTime;           // If status != 0, this fields indicates the suggested
-                                          // retry back-off timer value RIL wants to override the
-                                          // one pre-configured in FW.
+    DataCallFailCause status;             // Data call fail cause. DataCallFailCause.NONE if no
+                                          // error.
+    int32_t suggestedRetryTime;           // If status != DataCallFailCause.NONE, this field
+                                          // indicates the suggested retry back-off timer value RIL
+                                          // wants to override the one pre-configured in FW.
                                           // The unit is milliseconds.
                                           // The value < 0 means no value is suggested.
                                           // The value 0 means retry must be done ASAP.
@@ -1296,8 +1297,8 @@
     string type;                          // One of the PDP_type values in TS 27.007 section 10.1.1.
                                           // For example, "IP", "IPV6", "IPV4V6", or "PPP". If
                                           // status is
-                                          // RadioDataCallFailCause:ONLY_SINGLE_BEARER_ALLOWED this
-                                          // is the type supported such as "IP" or "IPV6"
+                                          // DataCallFailCause.ONLY_SINGLE_BEARER_ALLOWED, this
+                                          // is the type supported such as "IP" or "IPV6".
     string ifname;                        // The network interface name
     string addresses;                     // A space-delimited list of addresses with optional "/"
                                           // prefix length, e.g., "192.0.1.3" or
@@ -1343,125 +1344,6 @@
                                           // Base64 format, see 3GPP TS 31.102 7.1.2
 };
 
-struct VoiceRegStateResult {
-    RegState regState;
-    int32_t lac;                          // LAC if registered on a GSM/WCDMA system or
-                                          // -1 if not.Valid LAC are 0x0000 - 0xffff
-    int32_t cid;                          // CID. if registered on a * GSM/WCDMA or -1 if not
-                                          // Valid CID are 0x00000000 - 0xffffffff
-                                          // In GSM, CID is Cell ID (see TS 27.007) in 16 bits
-                                          // In UMTS, CID is UMTS Cell Identity (see TS 25.331)
-                                          // in 28 bits
-    int32_t rat;                          // indicates the available voice radio technology,
-                                          // valid values as defined by RadioTechnology.
-    int32_t baseStationId;                // Base Station ID. if registered on a CDMA
-                                          // system or -1 if not. Base Station ID in decimal format
-    int32_t baseStationLatitude;          // Base Station latitude. if registered on a
-                                          // CDMA system or -1 if not. Base Station latitude is a
-                                          // decimal number as specified in 3GPP2 C.S0005-A v6.0.
-                                          // It is represented in units of 0.25 seconds and ranges
-                                          // from -1296000 to 1296000, both values inclusive
-                                          // (corresponding to a range of -90 to +90 degrees).
-    int32_t baseStationLongitude;         // Base Station longitude. if registered on a
-                                          // CDMA system or -1 if not. Base Station
-                                          // longitude is a decimal number as specified in
-                                          // 3GPP2 C.S0005-A v6.0. It is represented in
-                                          // units of 0.25 seconds and ranges from -2592000
-                                          // to 2592000, both values inclusive (corresponding
-                                          // to a range of -180 to +180 degrees).
-    bool cssSupported;                    // concurrent services support indicator. if
-                                          // registered on a CDMA system.
-                                          // false - Concurrent services not supported,
-                                          // true - Concurrent services supported
-    int32_t systemId;                     // System ID. if registered on a CDMA system or
-                                          // -1 if not. Valid System ID are 0 - 32767
-    int32_t networkId;                    // Network ID. if registered on a CDMA system or
-                                          // -1 if not. Valid System ID are 0 - 65535
-    int32_t roamingIndicator;             // TSB-58 Roaming Indicator if registered
-                                          // on a CDMA or EVDO system or -1 if not.
-                                          // Valid values are 0-255.
-    int32_t systemIsInPrl;                // indicates whether the current system is in the
-                                          // PRL if registered on a CDMA or EVDO system or -1 if
-                                          // not. 0=not in the PRL, 1=in the PRL
-    int32_t defaultRoamingIndicator;      // default Roaming Indicator from the PRL,
-                                          // if registered on a CDMA or EVDO system or -1 if not.
-                                          // Valid values are 0-255.
-    int32_t reasonForDenial;              // reasonForDenial if registration state is 3
-                                          // (Registration denied) this is an enumerated reason why
-                                          // registration was denied. See 3GPP TS 24.008,
-                                          // 10.5.3.6 and Annex G.
-                                          // 0 - General
-                                          // 1 - Authentication Failure
-                                          // 2 - IMSI unknown in HLR
-                                          // 3 - Illegal MS
-                                          // 4 - Illegal ME
-                                          // 5 - PLMN not allowed
-                                          // 6 - Location area not allowed
-                                          // 7 - Roaming not allowed
-                                          // 8 - No Suitable Cells in this Location Area
-                                          // 9 - Network failure
-                                          // 10 - Persistent location update reject
-                                          // 11 - PLMN not allowed
-                                          // 12 - Location area not allowed
-                                          // 13 - Roaming not allowed in this Location Area
-                                          // 15 - No Suitable Cells in this Location Area
-                                          // 17 - Network Failure
-                                          // 20 - MAC Failure
-                                          // 21 - Sync Failure
-                                          // 22 - Congestion
-                                          // 23 - GSM Authentication unacceptable
-                                          // 25 - Not Authorized for this CSG
-                                          // 32 - Service option not supported
-                                          // 33 - Requested service option not subscribed
-                                          // 34 - Service option temporarily out of order
-                                          // 38 - Call cannot be identified
-                                          // 48-63 - Retry upon entry into a new cell
-                                          // 95 - Semantically incorrect message
-                                          // 96 - Invalid mandatory information
-                                          // 97 - Message type non-existent or not implemented
-                                          // 98 - Message type not compatible with protocol state
-                                          // 99 - Information element non-existent or not implemented
-                                          // 100 - Conditional IE error
-                                          // 101 - Message not compatible with protocol state
-                                          // 111 - Protocol error, unspecified
-    int32_t psc;                          // Primary Scrambling Code of the current
-                                          // cell as described in TS 25.331, in hexadecimal
-                                          // format, or -1 if unknown or not registered
-                                          // to a UMTS network.
-};
-
-struct DataRegStateResult {
-    RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
-                                          // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
-                                          // UNKNOWN, REG_ROAMING defined in RegState
-    int32_t lac;                          // LAC if registered or -1 if not
-                                          // valid LAC are 0x0000 - 0xffff
-    int32_t cid;                          // CID if registered or -1 if not
-                                          // valid CID are 0x00000000 - 0x0fffffff
-    int32_t rat;                          // indicates the available data radio technology,
-                                          // valid values as defined by RadioTechnology.
-    int32_t reasonDataDenied;             // if registration state is 3 (Registration
-                                          // denied) this is an enumerated reason why
-                                          // registration was denied. See 3GPP TS 24.008,
-                                          // Annex G.6 "Additional cause codes for GMM".
-                                          // 7 == GPRS services not allowed
-                                          // 8 == GPRS services and non-GPRS services not allowed
-                                          // 9 == MS identity cannot be derived by the network
-                                          // 10 == Implicitly detached
-                                          // 14 == GPRS services not allowed in this PLMN
-                                          // 16 == MSC temporarily not reachable
-                                          // 40 == No PDP context activated
-    int32_t maxDataCalls;                 // The maximum number of simultaneous Data Calls that
-                                          // must be established using setupDataCall().
-    // The values below are optional LTE location information in decimal.
-    // If a value is unknown that value must be -1.
-    int32_t tac;                          // a 16-bit Tracking Area Code.
-    int32_t phyCid;                       // a 0-503 Physical Cell Identifier.
-    int32_t eci;                          // a 28-bit E-UTRAN Cell Identifier.
-    int32_t csgid;                        // a 27-bit Closed Subscriber Group Identity.
-    int32_t tadv;                         // a 6-bit timing advance value.
-};
-
 // See also com.android.internal.telephony.gsm.CallForwardInfo
 struct CallForwardInfo {
     CallForwardInfoStatus status;         // For queryCallForwardStatus()
@@ -1687,6 +1569,100 @@
                                           // empty
 };
 
+struct CellIdentity {
+    CellInfoType cellInfoType;            // cell type for selecting from union CellInfo
+    // Only one of the below vectors must be of size 1, based on a valid CellInfoType and
+    // others must be of size 0. If cell info type is NONE, then all the vectors
+    // must be of size 0.
+    vec<CellIdentityGsm> cellIdentityGsm;
+    vec<CellIdentityWcdma> cellIdentityWcdma;
+    vec<CellIdentityCdma> cellIdentityCdma;
+    vec<CellIdentityLte> cellIdentityLte;
+    vec<CellIdentityTdscdma> cellIdentityTdscdma;
+};
+
+struct VoiceRegStateResult {
+    RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
+                                          // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
+                                          // UNKNOWN, REG_ROAMING defined in RegState
+    int32_t rat;                          // indicates the available voice radio technology,
+                                          // valid values as defined by RadioTechnology.
+    bool cssSupported;                    // concurrent services support indicator. if
+                                          // registered on a CDMA system.
+                                          // false - Concurrent services not supported,
+                                          // true - Concurrent services supported
+    int32_t roamingIndicator;             // TSB-58 Roaming Indicator if registered
+                                          // on a CDMA or EVDO system or -1 if not.
+                                          // Valid values are 0-255.
+    int32_t systemIsInPrl;                // indicates whether the current system is in the
+                                          // PRL if registered on a CDMA or EVDO system or -1 if
+                                          // not. 0=not in the PRL, 1=in the PRL
+    int32_t defaultRoamingIndicator;      // default Roaming Indicator from the PRL,
+                                          // if registered on a CDMA or EVDO system or -1 if not.
+                                          // Valid values are 0-255.
+    int32_t reasonForDenial;              // reasonForDenial if registration state is 3
+                                          // (Registration denied) this is an enumerated reason why
+                                          // registration was denied. See 3GPP TS 24.008,
+                                          // 10.5.3.6 and Annex G.
+                                          // 0 - General
+                                          // 1 - Authentication Failure
+                                          // 2 - IMSI unknown in HLR
+                                          // 3 - Illegal MS
+                                          // 4 - Illegal ME
+                                          // 5 - PLMN not allowed
+                                          // 6 - Location area not allowed
+                                          // 7 - Roaming not allowed
+                                          // 8 - No Suitable Cells in this Location Area
+                                          // 9 - Network failure
+                                          // 10 - Persistent location update reject
+                                          // 11 - PLMN not allowed
+                                          // 12 - Location area not allowed
+                                          // 13 - Roaming not allowed in this Location Area
+                                          // 15 - No Suitable Cells in this Location Area
+                                          // 17 - Network Failure
+                                          // 20 - MAC Failure
+                                          // 21 - Sync Failure
+                                          // 22 - Congestion
+                                          // 23 - GSM Authentication unacceptable
+                                          // 25 - Not Authorized for this CSG
+                                          // 32 - Service option not supported
+                                          // 33 - Requested service option not subscribed
+                                          // 34 - Service option temporarily out of order
+                                          // 38 - Call cannot be identified
+                                          // 48-63 - Retry upon entry into a new cell
+                                          // 95 - Semantically incorrect message
+                                          // 96 - Invalid mandatory information
+                                          // 97 - Message type non-existent or not implemented
+                                          // 98 - Message type not compatible with protocol state
+                                          // 99 - Information element non-existent or not implemented
+                                          // 100 - Conditional IE error
+                                          // 101 - Message not compatible with protocol state
+                                          // 111 - Protocol error, unspecified
+    CellIdentity cellIdentity;
+};
+
+struct DataRegStateResult {
+    RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
+                                          // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
+                                          // UNKNOWN, REG_ROAMING defined in RegState
+    int32_t rat;                          // indicates the available data radio technology,
+                                          // valid values as defined by RadioTechnology.
+    int32_t reasonDataDenied;             // if registration state is 3 (Registration
+                                          // denied) this is an enumerated reason why
+                                          // registration was denied. See 3GPP TS 24.008,
+                                          // Annex G.6 "Additional cause codes for GMM".
+                                          // 7 == GPRS services not allowed
+                                          // 8 == GPRS services and non-GPRS services not allowed
+                                          // 9 == MS identity cannot be derived by the network
+                                          // 10 == Implicitly detached
+                                          // 14 == GPRS services not allowed in this PLMN
+                                          // 16 == MSC temporarily not reachable
+                                          // 40 == No PDP context activated
+    int32_t maxDataCalls;                 // The maximum number of simultaneous Data Calls that
+                                          // must be established using setupDataCall().
+    CellIdentity cellIdentity;
+};
+
 struct GsmSmsMessage {
     string smscPdu;                       // SMSC address in GSM BCD format prefixed by a length
                                           // byte (as expected by TS 27.005) or empty string for
@@ -2005,4 +1981,4 @@
                                           // to send all of them.
     vec<uint8_t> contents;                // Carrier-defined content. It is binary, opaque and
                                           // loosely defined in LTE Layer 3 spec 24.008
-};
\ No newline at end of file
+};
diff --git a/radio/1.0/vts/Radio.vts b/radio/1.0/vts/Radio.vts
deleted file mode 100644
index 68cf620..0000000
--- a/radio/1.0/vts/Radio.vts
+++ /dev/null
@@ -1,1521 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IRadio"
-
-package: "android.hardware.radio"
-
-import: "android.hardware.radio@1.0::IRadioIndication"
-import: "android.hardware.radio@1.0::IRadioResponse"
-import: "android.hardware.radio@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "setResponseFunctions"
-        arg: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::radio::V1_0::IRadioResponse"
-        }
-        arg: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::radio::V1_0::IRadioIndication"
-        }
-    }
-
-    api: {
-        name: "getIccCardStatus"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "supplyIccPinForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "supplyIccPukForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "supplyIccPin2ForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "supplyIccPuk2ForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "changeIccPinForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "changeIccPin2ForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "supplyNetworkDepersonalization"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getCurrentCalls"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "dial"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::Dial"
-        }
-    }
-
-    api: {
-        name: "getImsiForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "hangup"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "hangupWaitingOrBackground"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "hangupForegroundResumeBackground"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "switchWaitingOrHoldingAndActive"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "conference"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "rejectCall"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getLastCallFailCause"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getSignalStrength"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getVoiceRegistrationState"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getDataRegistrationState"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getOperator"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setRadioPower"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "sendDtmf"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "sendSms"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::GsmSmsMessage"
-        }
-    }
-
-    api: {
-        name: "sendSMSExpectMore"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::GsmSmsMessage"
-        }
-    }
-
-    api: {
-        name: "setupDataCall"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioTechnology"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::DataProfileInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "iccIOForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::IccIo"
-        }
-    }
-
-    api: {
-        name: "sendUssd"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "cancelPendingUssd"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getClir"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setClir"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getCallForwardStatus"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CallForwardInfo"
-        }
-    }
-
-    api: {
-        name: "setCallForward"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CallForwardInfo"
-        }
-    }
-
-    api: {
-        name: "getCallWaiting"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setCallWaiting"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "acknowledgeLastIncomingGsmSms"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SmsAcknowledgeFailCause"
-        }
-    }
-
-    api: {
-        name: "acceptCall"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "deactivateDataCall"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getFacilityLockForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setFacilityLockForApp"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setBarringPassword"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getNetworkSelectionMode"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setNetworkSelectionModeAutomatic"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setNetworkSelectionModeManual"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getAvailableNetworks"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "startDtmf"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "stopDtmf"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getBasebandVersion"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "separateConnection"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setMute"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getMute"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getClip"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getDataCallList"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "sendOemRadioRequestRaw"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "sendOemRadioRequestStrings"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRING
-            }
-        }
-    }
-
-    api: {
-        name: "sendScreenState"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setSuppServiceNotifications"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "writeSmsToSim"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SmsWriteArgs"
-        }
-    }
-
-    api: {
-        name: "deleteSmsOnSim"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setBandMode"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioBandMode"
-        }
-    }
-
-    api: {
-        name: "getAvailableBandModes"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "sendEnvelope"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "sendTerminalResponseToSim"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "handleStkCallSetupRequestFromSim"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "explicitCallTransfer"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setPreferredNetworkType"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::PreferredNetworkType"
-        }
-    }
-
-    api: {
-        name: "getPreferredNetworkType"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getNeighboringCids"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setLocationUpdates"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setCdmaSubscriptionSource"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSubscriptionSource"
-        }
-    }
-
-    api: {
-        name: "setCdmaRoamingPreference"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::CdmaRoamingType"
-        }
-    }
-
-    api: {
-        name: "getCdmaRoamingPreference"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setTTYMode"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::TtyMode"
-        }
-    }
-
-    api: {
-        name: "getTTYMode"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setPreferredVoicePrivacy"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getPreferredVoicePrivacy"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "sendCDMAFeatureCode"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "sendBurstDtmf"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "sendCdmaSms"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSmsMessage"
-        }
-    }
-
-    api: {
-        name: "acknowledgeLastIncomingCdmaSms"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSmsAck"
-        }
-    }
-
-    api: {
-        name: "getGsmBroadcastConfig"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setGsmBroadcastConfig"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "setGsmBroadcastActivation"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getCdmaBroadcastConfig"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setCdmaBroadcastConfig"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::CdmaBroadcastSmsConfigInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "setCdmaBroadcastActivation"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getCDMASubscription"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "writeSmsToRuim"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSmsWriteArgs"
-        }
-    }
-
-    api: {
-        name: "deleteSmsOnRuim"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getDeviceIdentity"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "exitEmergencyCallbackMode"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getSmscAddress"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setSmscAddress"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "reportSmsMemoryStatus"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "reportStkServiceIsRunning"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getCdmaSubscriptionSource"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "requestIsimAuthentication"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "acknowledgeIncomingGsmSmsWithPdu"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "sendEnvelopeWithStatus"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getVoiceRadioTechnology"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getCellInfoList"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setCellInfoListRate"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setInitialAttachApn"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::DataProfileInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getImsRegistrationState"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "sendImsSms"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::ImsSmsMessage"
-        }
-    }
-
-    api: {
-        name: "iccTransmitApduBasicChannel"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SimApdu"
-        }
-    }
-
-    api: {
-        name: "iccOpenLogicalChannel"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "iccCloseLogicalChannel"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "iccTransmitApduLogicalChannel"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SimApdu"
-        }
-    }
-
-    api: {
-        name: "nvReadItem"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::NvItem"
-        }
-    }
-
-    api: {
-        name: "nvWriteItem"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::NvWriteItem"
-        }
-    }
-
-    api: {
-        name: "nvWriteCdmaPrl"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "nvResetConfig"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::ResetNvType"
-        }
-    }
-
-    api: {
-        name: "setUiccSubscription"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SelectUiccSub"
-        }
-    }
-
-    api: {
-        name: "setDataAllowed"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getHardwareConfig"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "requestIccSimAuthentication"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setDataProfile"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::DataProfileInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "requestShutdown"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getRadioCapability"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setRadioCapability"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioCapability"
-        }
-    }
-
-    api: {
-        name: "startLceService"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "stopLceService"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "pullLceData"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getModemActivityInfo"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setAllowedCarriers"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CarrierRestrictions"
-        }
-    }
-
-    api: {
-        name: "getAllowedCarriers"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "sendDeviceState"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::DeviceStateType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setIndicationFilter"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "int32_t"
-            predefined_type: "::android::hardware::radio::V1_0::IndicationFilter"
-        }
-    }
-
-    api: {
-        name: "setSimCardPower"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "responseAcknowledgement"
-    }
-
-}
diff --git a/radio/1.0/vts/RadioIndication.vts b/radio/1.0/vts/RadioIndication.vts
deleted file mode 100644
index cce8ada..0000000
--- a/radio/1.0/vts/RadioIndication.vts
+++ /dev/null
@@ -1,546 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IRadioIndication"
-
-package: "android.hardware.radio"
-
-import: "android.hardware.radio@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "radioStateChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioState"
-        }
-    }
-
-    api: {
-        name: "callStateChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "networkStateChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "newSms"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "newSmsStatusReport"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "newSmsOnSim"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "onUssd"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::UssdModeType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "nitzTimeReceived"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-    }
-
-    api: {
-        name: "currentSignalStrength"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SignalStrength"
-        }
-    }
-
-    api: {
-        name: "dataCallListChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::SetupDataCallResult"
-            }
-        }
-    }
-
-    api: {
-        name: "suppSvcNotify"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SuppSvcNotification"
-        }
-    }
-
-    api: {
-        name: "stkSessionEnd"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "stkProactiveCommand"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "stkEventNotify"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "stkCallSetup"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int64_t"
-        }
-    }
-
-    api: {
-        name: "simSmsStorageFull"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "simRefresh"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SimRefreshResult"
-        }
-    }
-
-    api: {
-        name: "callRing"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSignalInfoRecord"
-        }
-    }
-
-    api: {
-        name: "simStatusChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "cdmaNewSms"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSmsMessage"
-        }
-    }
-
-    api: {
-        name: "newBroadcastSms"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "cdmaRuimSmsStorageFull"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "restrictedStateChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::PhoneRestrictedState"
-        }
-    }
-
-    api: {
-        name: "enterEmergencyCallbackMode"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "cdmaCallWaiting"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaCallWaiting"
-        }
-    }
-
-    api: {
-        name: "cdmaOtaProvisionStatus"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::CdmaOtaProvisionStatus"
-        }
-    }
-
-    api: {
-        name: "cdmaInfoRec"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaInformationRecords"
-        }
-    }
-
-    api: {
-        name: "oemHookRaw"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "indicateRingbackTone"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "resendIncallMute"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "cdmaSubscriptionSourceChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSubscriptionSource"
-        }
-    }
-
-    api: {
-        name: "cdmaPrlChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "exitEmergencyCallbackMode"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "rilConnected"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "voiceRadioTechChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioTechnology"
-        }
-    }
-
-    api: {
-        name: "cellInfoList"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::CellInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "imsNetworkStateChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-    }
-
-    api: {
-        name: "subscriptionStatusChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "srvccStateNotify"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SrvccState"
-        }
-    }
-
-    api: {
-        name: "hardwareConfigChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::HardwareConfig"
-            }
-        }
-    }
-
-    api: {
-        name: "radioCapabilityIndication"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioCapability"
-        }
-    }
-
-    api: {
-        name: "onSupplementaryServiceIndication"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::StkCcUnsolSsResult"
-        }
-    }
-
-    api: {
-        name: "stkCallControlAlphaNotify"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "lceData"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::LceDataInfo"
-        }
-    }
-
-    api: {
-        name: "pcoData"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::PcoDataInfo"
-        }
-    }
-
-    api: {
-        name: "modemReset"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-}
diff --git a/radio/1.0/vts/RadioResponse.vts b/radio/1.0/vts/RadioResponse.vts
deleted file mode 100644
index a6c5223..0000000
--- a/radio/1.0/vts/RadioResponse.vts
+++ /dev/null
@@ -1,1415 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IRadioResponse"
-
-package: "android.hardware.radio"
-
-import: "android.hardware.radio@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getIccCardStatusResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CardStatus"
-        }
-    }
-
-    api: {
-        name: "supplyIccPinForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "supplyIccPukForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "supplyIccPin2ForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "supplyIccPuk2ForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "changeIccPinForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "changeIccPin2ForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "supplyNetworkDepersonalizationResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getCurrentCallsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::Call"
-            }
-        }
-    }
-
-    api: {
-        name: "dialResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getIMSIForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "hangupConnectionResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "hangupWaitingOrBackgroundResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "hangupForegroundResumeBackgroundResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "switchWaitingOrHoldingAndActiveResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "conferenceResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "rejectCallResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getLastCallFailCauseResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::LastCallFailCauseInfo"
-        }
-    }
-
-    api: {
-        name: "getSignalStrengthResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SignalStrength"
-        }
-    }
-
-    api: {
-        name: "getVoiceRegistrationStateResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::VoiceRegStateResult"
-        }
-    }
-
-    api: {
-        name: "getDataRegistrationStateResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::DataRegStateResult"
-        }
-    }
-
-    api: {
-        name: "getOperatorResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setRadioPowerResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "sendDtmfResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "sendSmsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
-        }
-    }
-
-    api: {
-        name: "sendSMSExpectMoreResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
-        }
-    }
-
-    api: {
-        name: "setupDataCallResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SetupDataCallResult"
-        }
-    }
-
-    api: {
-        name: "iccIOForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
-        }
-    }
-
-    api: {
-        name: "sendUssdResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "cancelPendingUssdResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getClirResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setClirResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getCallForwardStatusResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::CallForwardInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "setCallForwardResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getCallWaitingResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setCallWaitingResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "acknowledgeLastIncomingGsmSmsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "acceptCallResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "deactivateDataCallResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getFacilityLockForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setFacilityLockForAppResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setBarringPasswordResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getNetworkSelectionModeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setNetworkSelectionModeAutomaticResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setNetworkSelectionModeManualResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getAvailableNetworksResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::OperatorInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "startDtmfResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "stopDtmfResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getBasebandVersionResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "separateConnectionResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setMuteResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getMuteResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getClipResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::ClipStatus"
-        }
-    }
-
-    api: {
-        name: "getDataCallListResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::SetupDataCallResult"
-            }
-        }
-    }
-
-    api: {
-        name: "sendOemRilRequestRawResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "sendOemRilRequestStringsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRING
-            }
-        }
-    }
-
-    api: {
-        name: "sendScreenStateResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setSuppServiceNotificationsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "writeSmsToSimResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "deleteSmsOnSimResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setBandModeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getAvailableBandModesResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::radio::V1_0::RadioBandMode"
-            }
-        }
-    }
-
-    api: {
-        name: "sendEnvelopeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "sendTerminalResponseToSimResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "handleStkCallSetupRequestFromSimResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "explicitCallTransferResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setPreferredNetworkTypeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getPreferredNetworkTypeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::PreferredNetworkType"
-        }
-    }
-
-    api: {
-        name: "getNeighboringCidsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::NeighboringCell"
-            }
-        }
-    }
-
-    api: {
-        name: "setLocationUpdatesResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setCdmaSubscriptionSourceResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setCdmaRoamingPreferenceResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getCdmaRoamingPreferenceResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::CdmaRoamingType"
-        }
-    }
-
-    api: {
-        name: "setTTYModeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getTTYModeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::TtyMode"
-        }
-    }
-
-    api: {
-        name: "setPreferredVoicePrivacyResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getPreferredVoicePrivacyResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "sendCDMAFeatureCodeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "sendBurstDtmfResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "sendCdmaSmsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
-        }
-    }
-
-    api: {
-        name: "acknowledgeLastIncomingCdmaSmsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getGsmBroadcastConfigResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "setGsmBroadcastConfigResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setGsmBroadcastActivationResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getCdmaBroadcastConfigResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::CdmaBroadcastSmsConfigInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "setCdmaBroadcastConfigResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setCdmaBroadcastActivationResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getCDMASubscriptionResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "writeSmsToRuimResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "deleteSmsOnRuimResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getDeviceIdentityResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "exitEmergencyCallbackModeResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getSmscAddressResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setSmscAddressResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "reportSmsMemoryStatusResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "reportStkServiceIsRunningResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getCdmaSubscriptionSourceResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSubscriptionSource"
-        }
-    }
-
-    api: {
-        name: "requestIsimAuthenticationResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "acknowledgeIncomingGsmSmsWithPduResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "sendEnvelopeWithStatusResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
-        }
-    }
-
-    api: {
-        name: "getVoiceRadioTechnologyResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioTechnology"
-        }
-    }
-
-    api: {
-        name: "getCellInfoListResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::CellInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "setCellInfoListRateResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setInitialAttachApnResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getImsRegistrationStateResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::RadioTechnologyFamily"
-        }
-    }
-
-    api: {
-        name: "sendImsSmsResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
-        }
-    }
-
-    api: {
-        name: "iccTransmitApduBasicChannelResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
-        }
-    }
-
-    api: {
-        name: "iccOpenLogicalChannelResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "iccCloseLogicalChannelResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "iccTransmitApduLogicalChannelResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
-        }
-    }
-
-    api: {
-        name: "nvReadItemResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "nvWriteItemResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "nvWriteCdmaPrlResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "nvResetConfigResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setUiccSubscriptionResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setDataAllowedResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getHardwareConfigResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::radio::V1_0::HardwareConfig"
-            }
-        }
-    }
-
-    api: {
-        name: "requestIccSimAuthenticationResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
-        }
-    }
-
-    api: {
-        name: "setDataProfileResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "requestShutdownResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "getRadioCapabilityResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioCapability"
-        }
-    }
-
-    api: {
-        name: "setRadioCapabilityResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioCapability"
-        }
-    }
-
-    api: {
-        name: "startLceServiceResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::LceStatusInfo"
-        }
-    }
-
-    api: {
-        name: "stopLceServiceResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::LceStatusInfo"
-        }
-    }
-
-    api: {
-        name: "pullLceDataResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::LceDataInfo"
-        }
-    }
-
-    api: {
-        name: "getModemActivityInfoResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::ActivityStatsInfo"
-        }
-    }
-
-    api: {
-        name: "setAllowedCarriersResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "getAllowedCarriersResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CarrierRestrictions"
-        }
-    }
-
-    api: {
-        name: "sendDeviceStateResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setIndicationFilterResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "setSimCardPowerResponse"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
-        }
-    }
-
-    api: {
-        name: "acknowledgeRequest"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-}
diff --git a/radio/1.0/vts/Sap.vts b/radio/1.0/vts/Sap.vts
deleted file mode 100644
index b4983da..0000000
--- a/radio/1.0/vts/Sap.vts
+++ /dev/null
@@ -1,107 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISap"
-
-package: "android.hardware.radio"
-
-import: "android.hardware.radio@1.0::ISapCallback"
-import: "android.hardware.radio@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "setCallback"
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::radio::V1_0::ISapCallback"
-        }
-    }
-
-    api: {
-        name: "connectReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "disconnectReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "apduReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapApduType"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "transferAtrReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "powerReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "resetSimReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "transferCardReaderStatusReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "setTransferProtocolReq"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapTransferProtocol"
-        }
-    }
-
-}
diff --git a/radio/1.0/vts/SapCallback.vts b/radio/1.0/vts/SapCallback.vts
deleted file mode 100644
index 3a33dba..0000000
--- a/radio/1.0/vts/SapCallback.vts
+++ /dev/null
@@ -1,157 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISapCallback"
-
-package: "android.hardware.radio"
-
-import: "android.hardware.radio@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "connectResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapConnectRsp"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "disconnectResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "disconnectIndication"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapDisconnectType"
-        }
-    }
-
-    api: {
-        name: "apduResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapResultCode"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "transferAtrResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapResultCode"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "powerResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapResultCode"
-        }
-    }
-
-    api: {
-        name: "resetSimResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapResultCode"
-        }
-    }
-
-    api: {
-        name: "statusIndication"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapStatus"
-        }
-    }
-
-    api: {
-        name: "transferCardReaderStatusResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapResultCode"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "errorResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "transferProtocolResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::SapResultCode"
-        }
-    }
-
-}
diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp
index a01e270..7f16163 100644
--- a/radio/1.0/vts/functional/Android.bp
+++ b/radio/1.0/vts/functional/Android.bp
@@ -15,26 +15,27 @@
 //
 
 cc_test {
-    name: "radio_hidl_hal_test",
-    gtest: true,
+    name: "VtsHalRadioV1_0TargetTest",
+    defaults: ["hidl_defaults"],
     srcs: ["radio_hidl_hal_test.cpp",
            "radio_response.cpp",
+           "radio_hidl_hal_voice.cpp",
            "radio_hidl_hal_icc.cpp",
-           "radio_hidl_hal_main.cpp"],
+           "radio_hidl_hal_sms.cpp",
+           "VtsHalRadioV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.radio@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
     ],
-}
\ No newline at end of file
+}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_main.cpp b/radio/1.0/vts/functional/VtsHalRadioV1_0TargetTest.cpp
similarity index 100%
rename from radio/1.0/vts/functional/radio_hidl_hal_main.cpp
rename to radio/1.0/vts/functional/VtsHalRadioV1_0TargetTest.cpp
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
index 9b540e8..bd979b0 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
@@ -20,86 +20,271 @@
  * Test IRadio.getIccCardStatus() for the response returned.
  */
 TEST_F(RadioHidlTest, getIccCardStatus) {
-    radio->getIccCardStatus(1);
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(1, radioRsp->rspInfo.serial);
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
-
-    EXPECT_LE(radioRsp->cardStatus.applications.size(), (unsigned int) RadioConst::CARD_MAX_APPS);
-    EXPECT_LT(radioRsp->cardStatus.gsmUmtsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
-    EXPECT_LT(radioRsp->cardStatus.cdmaSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
-    EXPECT_LT(radioRsp->cardStatus.imsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LE(cardStatus.applications.size(), (unsigned int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LT(cardStatus.gsmUmtsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LT(cardStatus.cdmaSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LT(cardStatus.imsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
 }
 
 /*
- * Test IRadio.supplyIccPinForApp() for the response returned.
+ * Test IRadio.supplyIccPinForApp() for the response returned
  */
 TEST_F(RadioHidlTest, supplyIccPinForApp) {
-    radio->supplyIccPinForApp(2, hidl_string("test1"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(2, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPinForApp(++serial, hidl_string("test1"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.supplyIccPukForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, supplyIccPukForApp) {
-    radio->supplyIccPukForApp(3, hidl_string("test1"), hidl_string("test2"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(3, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPukForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.supplyIccPin2ForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, supplyIccPin2ForApp) {
-    radio->supplyIccPin2ForApp(4, hidl_string("test1"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(4, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPin2ForApp(++serial, hidl_string("test1"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.supplyIccPuk2ForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, supplyIccPuk2ForApp) {
-    radio->supplyIccPuk2ForApp(5, hidl_string("test1"), hidl_string("test2"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(5, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPuk2ForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.changeIccPinForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, changeIccPinForApp) {
-    radio->changeIccPinForApp(6, hidl_string("test1"), hidl_string("test2"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(6, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->changeIccPinForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.changeIccPin2ForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, changeIccPin2ForApp) {
-    radio->changeIccPin2ForApp(7, hidl_string("test1"), hidl_string("test2"), hidl_string());
+    int serial = 1;
+
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->changeIccPin2ForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
+}
+
+/*
+ * Test IRadio.getImsiForApp() for the response returned.
+ */
+TEST_F(RadioHidlTest, getImsiForApp) {
+    int serial = 1;
+
+    // Check success returned while getting imsi for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->getImsiForApp(++serial, cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
+
+            // IMSI (MCC+MNC+MSIN) is at least 6 digits, but not more than 15
+            if (radioRsp->rspInfo.error == RadioError::NONE) {
+                EXPECT_NE(radioRsp->imsi, hidl_string());
+                EXPECT_GE((int) (radioRsp->imsi).size(), 6);
+                EXPECT_LE((int) (radioRsp->imsi).size(), 15);
+            }
+        }
+    }
+}
+
+/*
+ * Test IRadio.iccIOForApp() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccIOForApp) {
+    int serial = 1;
+
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        IccIo iccIo;
+        iccIo.command = 0xc0;
+        iccIo.fileId = 0x6f11;
+        iccIo.path = hidl_string("3F007FFF");
+        iccIo.p1 = 0;
+        iccIo.p2 = 0;
+        iccIo.p3 = 0;
+        iccIo.data = hidl_string();
+        iccIo.pin2 = hidl_string();
+        iccIo.aid = cardStatus.applications[i].aidPtr;
+
+        radio->iccIOForApp(++serial, iccIo);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+    }
+}
+
+/*
+ * Test IRadio.iccTransmitApduBasicChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) {
+    int serial = 1;
+    SimApdu msg;
+    memset(&msg, 0, sizeof(msg));
+    msg.data = hidl_string();
+
+    radio->iccTransmitApduBasicChannel(serial, msg);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(7, radioRsp->rspInfo.serial);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // TODO(sanketpadawe): Add test for error code
 }
+
+/*
+ * Test IRadio.iccOpenLogicalChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
+    int serial = 1;
+
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        radio->iccOpenLogicalChannel(++serial, cardStatus.applications[i].aidPtr);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    }
+}
+
+/*
+ * Test IRadio.iccCloseLogicalChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccCloseLogicalChannel) {
+    int serial = 1;
+    // Try closing invalid channel and check INVALID_ARGUMENTS returned as error
+    radio->iccCloseLogicalChannel(serial, 0);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error);
+}
+
+/*
+ * Test IRadio.iccTransmitApduLogicalChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) {
+    SimApdu msg;
+    memset(&msg, 0, sizeof(msg));
+    msg.data = hidl_string();
+
+    radio->iccTransmitApduLogicalChannel(1, msg);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(1, radioRsp->rspInfo.serial);
+
+    // TODO(sanketpadawe): Add test for error code
+}
+
+/*
+ * Test IRadio.requestIccSimAuthentication() for the response returned.
+ */
+TEST_F(RadioHidlTest, requestIccSimAuthentication) {
+    int serial = 1;
+
+    // Pass wrong challenge string and check RadioError::INVALID_ARGUMENTS returned as error.
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        radio->requestIccSimAuthentication(++serial, 0, hidl_string("test"),
+                cardStatus.applications[i].aidPtr);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+        EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error);
+    }
+}
\ No newline at end of file
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
new file mode 100644
index 0000000..5bf7ae2
--- /dev/null
+++ b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
@@ -0,0 +1,431 @@
+/*
+ * 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.
+ */
+
+#include<radio_hidl_hal_utils.h>
+
+using namespace ::android::hardware::radio::V1_0;
+
+/*
+ * Test IRadio.sendSms() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendSms) {
+    int serial = 0;
+    GsmSmsMessage msg;
+    msg.smscPdu = "";
+    msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
+
+    radio->sendSms(++serial, msg);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        EXPECT_EQ(RadioError::INVALID_STATE, radioRsp->rspInfo.error);
+        EXPECT_EQ(0, radioRsp->sendSmsResult.errorCode);
+    } else {
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
+        EXPECT_EQ("", radioRsp->sendSmsResult.ackPDU);
+        EXPECT_EQ(-1, radioRsp->sendSmsResult.errorCode);
+    }
+}
+
+/*
+ * Test IRadio.sendSMSExpectMore() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendSMSExpectMore) {
+    int serial = 0;
+    GsmSmsMessage msg;
+    msg.smscPdu = "";
+    msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
+
+    radio->sendSMSExpectMore(++serial, msg);
+
+    // TODO(shuoq): add more test for this API when inserted sim card is considered
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        EXPECT_EQ(RadioError::INVALID_STATE, radioRsp->rspInfo.error);
+    } else {
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
+        EXPECT_EQ("", radioRsp->sendSmsResult.ackPDU);
+        EXPECT_EQ(-1, radioRsp->sendSmsResult.errorCode);
+    }
+}
+
+/*
+ * Test IRadio.acknowledgeLastIncomingGsmSms() for the response returned.
+ */
+TEST_F(RadioHidlTest, acknowledgeLastIncomingGsmSms) {
+    int serial = 0;
+    bool success = true;
+
+    radio->acknowledgeLastIncomingGsmSms(++serial, success,
+        SmsAcknowledgeFailCause::MEMORY_CAPACITY_EXCEEDED);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        EXPECT_EQ(RadioError::INVALID_STATE, radioRsp->rspInfo.error);
+    } else {
+        // TODO(shuoq): Will test right behavior when inserted sim card is considered
+    }
+}
+
+/*
+ * Test IRadio.acknowledgeIncomingGsmSmsWithPdu() for the response returned.
+ */
+TEST_F(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) {
+    int serial = 0;
+    bool success = true;
+    std::string ackPdu = "";
+
+    radio->acknowledgeIncomingGsmSmsWithPdu(++serial, success, ackPdu);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        // TODO(shuoq): Will test right behavior when inserted sim card is considered
+    }
+}
+
+/*
+ * Test IRadio.sendCdmaSms() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendCdmaSms) {
+    int serial = 0;
+
+    // Create a CdmaSmsAddress
+    CdmaSmsAddress cdmaSmsAddress;
+    cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT;
+    cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK;
+    cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN;
+    cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN;
+    cdmaSmsAddress.digits = (std::vector<uint8_t>) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
+
+    // Create a CdmaSmsSubAddress
+    CdmaSmsSubaddress cdmaSmsSubaddress;
+    cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP;
+    cdmaSmsSubaddress.odd = false;
+    cdmaSmsSubaddress.digits = (std::vector<uint8_t>) {};
+
+    // Create a CdmaSmsMessage
+    android::hardware::radio::V1_0::CdmaSmsMessage cdmaSmsMessage;
+    cdmaSmsMessage.teleserviceId = 4098;
+    cdmaSmsMessage.isServicePresent = false;
+    cdmaSmsMessage.serviceCategory = 0;
+    cdmaSmsMessage.address = cdmaSmsAddress;
+    cdmaSmsMessage.subAddress = cdmaSmsSubaddress;
+    cdmaSmsMessage.bearerData = (std::vector<uint8_t>)
+        {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
+
+    radio->sendCdmaSms(++serial, cdmaSmsMessage);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        // TODO(shuoq): radioRsp->sendSmsResult needs to be investigated when Sim card is in
+    }
+}
+
+/*
+ * Test IRadio.acknowledgeLastIncomingCdmaSms() for the response returned.
+ */
+TEST_F(RadioHidlTest, acknowledgeLastIncomingCdmaSms) {
+    int serial = 0;
+
+    // Create a CdmaSmsAck
+    CdmaSmsAck cdmaSmsAck;
+    cdmaSmsAck.errorClass = CdmaSmsErrorClass::NO_ERROR;
+    cdmaSmsAck.smsCauseCode = 1;
+
+    radio->acknowledgeLastIncomingCdmaSms(++serial, cdmaSmsAck);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        EXPECT_EQ(RadioError::NO_SMS_TO_ACK, radioRsp->rspInfo.error);
+    } else {
+        EXPECT_EQ(RadioError::NO_SMS_TO_ACK, radioRsp->rspInfo.error);
+    }
+}
+
+/*
+ * Test IRadio.sendImsSms() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendImsSms) {
+    int serial = 1;
+
+    // Create a CdmaSmsAddress
+    CdmaSmsAddress cdmaSmsAddress;
+    cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT;
+    cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK;
+    cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN;
+    cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN;
+    cdmaSmsAddress.digits = (std::vector<uint8_t>) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
+
+    // Create a CdmaSmsSubAddress
+    CdmaSmsSubaddress cdmaSmsSubaddress;
+    cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP;
+    cdmaSmsSubaddress.odd = false;
+    cdmaSmsSubaddress.digits = (std::vector<uint8_t>) {};
+
+    // Create a CdmaSmsMessage
+    CdmaSmsMessage cdmaSmsMessage;
+    cdmaSmsMessage.teleserviceId = 4098;
+    cdmaSmsMessage.isServicePresent = false;
+    cdmaSmsMessage.serviceCategory = 0;
+    cdmaSmsMessage.address = cdmaSmsAddress;
+    cdmaSmsMessage.subAddress = cdmaSmsSubaddress;
+    cdmaSmsMessage.bearerData = (std::vector<uint8_t>)
+        {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
+
+    // Creata an ImsSmsMessage
+    ImsSmsMessage msg;
+    msg.tech = RadioTechnologyFamily::THREE_GPP2;
+    msg.retry = false;
+    msg.messageRef = 0;
+    msg.cdmaMessage = (std::vector<CdmaSmsMessage>) {cdmaSmsMessage};
+    msg.gsmMessage = (std::vector<GsmSmsMessage>) {};
+
+    radio->sendImsSms(serial, msg);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error);
+    } else {
+        EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error);
+        // TODO(shuoq): radioRsp->sendSmsResult needs to be investigated when sim card is in
+    }
+}
+
+/*
+ * Test IRadio.getSmscAddress() for the response returned.
+ */
+TEST_F(RadioHidlTest, getSmscAddress) {
+    int serial = 0;
+
+    radio->getSmscAddress(++serial);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
+        // TODO(shuoq): radioRsp->smscAddress needs to be investigated when Sim card is in
+    }
+}
+
+/*
+ * Test IRadio.setSmscAddress() for the response returned.
+ */
+TEST_F(RadioHidlTest, setSmscAddress) {
+    int serial = 0;
+    hidl_string address = hidl_string("smscAddress");
+
+    radio->setSmscAddress(++serial, address);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        EXPECT_EQ(RadioError::INVALID_SMS_FORMAT, radioRsp->rspInfo.error);
+    } else {
+        EXPECT_EQ(RadioError::INVALID_SMS_FORMAT, radioRsp->rspInfo.error);
+    }
+}
+
+/*
+ * Test IRadio.writeSmsToSim() for the response returned.
+ */
+TEST_F(RadioHidlTest, writeSmsToSim) {
+    int serial = 0;
+    SmsWriteArgs smsWriteArgs;
+    smsWriteArgs.status = SmsWriteArgsStatus::REC_UNREAD;
+    smsWriteArgs.smsc = "";
+    smsWriteArgs.pdu = "01000b916105770203f3000006d4f29c3e9b01";
+
+    radio->writeSmsToSim(++serial, smsWriteArgs);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        // TODO(shuoq): radioRsp->writeSmsToSimIndex needs to be investigated when Sim card is in
+    }
+}
+
+/*
+ * Test IRadio.deleteSmsOnSim() for the response returned.
+ */
+TEST_F(RadioHidlTest, deleteSmsOnSim) {
+    int serial = 0;
+    int index = 1;
+
+    radio->deleteSmsOnSim(++serial, index);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        EXPECT_EQ(RadioError::NO_SUCH_ENTRY, radioRsp->rspInfo.error);
+    }
+}
+
+/*
+ * Test IRadio.writeSmsToRuim() for the response returned.
+ */
+TEST_F(RadioHidlTest, writeSmsToRuim) {
+    int serial = 0;
+
+    // Create a CdmaSmsAddress
+    CdmaSmsAddress cdmaSmsAddress;
+    cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT;
+    cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK;
+    cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN;
+    cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN;
+    cdmaSmsAddress.digits = (std::vector<uint8_t>) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
+
+    // Create a CdmaSmsSubAddress
+    CdmaSmsSubaddress cdmaSmsSubaddress;
+    cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP;
+    cdmaSmsSubaddress.odd = false;
+    cdmaSmsSubaddress.digits = (std::vector<uint8_t>) {};
+
+    // Create a CdmaSmsMessage
+    CdmaSmsMessage cdmaSmsMessage;
+    cdmaSmsMessage.teleserviceId = 4098;
+    cdmaSmsMessage.isServicePresent = false;
+    cdmaSmsMessage.serviceCategory = 0;
+    cdmaSmsMessage.address = cdmaSmsAddress;
+    cdmaSmsMessage.subAddress = cdmaSmsSubaddress;
+    cdmaSmsMessage.bearerData = (std::vector<uint8_t>)
+        {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
+
+    // Create a CdmaSmsWriteArgs
+    CdmaSmsWriteArgs cdmaSmsWriteArgs;
+    cdmaSmsWriteArgs.status = CdmaSmsWriteArgsStatus::REC_UNREAD;
+    cdmaSmsWriteArgs.message = cdmaSmsMessage;
+
+    radio->writeSmsToRuim(++serial, cdmaSmsWriteArgs);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        // TODO(shuoq): radioRsp->writeSmsToRuimIndex needs to be investigated when sim card is in
+    }
+}
+
+/*
+ * Test IRadio.deleteSmsOnRuim() for the response returned.
+ */
+TEST_F(RadioHidlTest, deleteSmsOnRuim) {
+    int serial = 0;
+    int index = 1;
+
+    // Create a CdmaSmsAddress
+    CdmaSmsAddress cdmaSmsAddress;
+    cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT;
+    cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK;
+    cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN;
+    cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN;
+    cdmaSmsAddress.digits = (std::vector<uint8_t>) {11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
+
+    // Create a CdmaSmsSubAddress
+    CdmaSmsSubaddress cdmaSmsSubaddress;
+    cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP;
+    cdmaSmsSubaddress.odd = false;
+    cdmaSmsSubaddress.digits = (std::vector<uint8_t>) {};
+
+    // Create a CdmaSmsMessage
+    CdmaSmsMessage cdmaSmsMessage;
+    cdmaSmsMessage.teleserviceId = 4098;
+    cdmaSmsMessage.isServicePresent = false;
+    cdmaSmsMessage.serviceCategory = 0;
+    cdmaSmsMessage.address = cdmaSmsAddress;
+    cdmaSmsMessage.subAddress = cdmaSmsSubaddress;
+    cdmaSmsMessage.bearerData = (std::vector<uint8_t>)
+        {15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
+
+    // Create a CdmaSmsWriteArgs
+    CdmaSmsWriteArgs cdmaSmsWriteArgs;
+    cdmaSmsWriteArgs.status = CdmaSmsWriteArgsStatus::REC_UNREAD;
+    cdmaSmsWriteArgs.message = cdmaSmsMessage;
+
+    radio->deleteSmsOnRuim(++serial, index);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        // TODO(shuoq): Will test right behavior when inserted sim card is considered
+    }
+}
+
+/*
+ * Test IRadio.reportSmsMemoryStatus() for the response returned.
+ */
+TEST_F(RadioHidlTest, reportSmsMemoryStatus) {
+    int serial = 0;
+    bool available = true;
+
+    radio->reportSmsMemoryStatus(++serial, available);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        // TODO(shuoq): Will add error check when we know the expected error from QC
+    } else {
+        EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
+    }
+}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
index 2a67954..db7356f 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -17,7 +17,7 @@
 #include<radio_hidl_hal_utils.h>
 
 void RadioHidlTest::SetUp() {
-    radio = IRadio::getService(hidl_string("rild"));
+    radio = ::testing::VtsHalHidlTargetTestBase::getService<IRadio>(hidl_string("rild"));
     ASSERT_NE(radio, nullptr);
 
     radioRsp = new RadioResponse(*this);
@@ -27,6 +27,12 @@
 
     radioInd = NULL;
     radio->setResponseFunctions(radioRsp, radioInd);
+
+    radio->getIccCardStatus(1);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(1, radioRsp->rspInfo.serial);
+    EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
 }
 
 void RadioHidlTest::TearDown() {
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
index 23b6ffa..bb693ac 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <chrono>
 #include <condition_variable>
 #include <mutex>
@@ -27,7 +27,9 @@
 #include <android/hardware/radio/1.0/types.h>
 
 using ::android::hardware::radio::V1_0::ActivityStatsInfo;
+using ::android::hardware::radio::V1_0::AppType;
 using ::android::hardware::radio::V1_0::CardStatus;
+using ::android::hardware::radio::V1_0::CardState;
 using ::android::hardware::radio::V1_0::Call;
 using ::android::hardware::radio::V1_0::CallForwardInfo;
 using ::android::hardware::radio::V1_0::CarrierRestrictions;
@@ -37,8 +39,10 @@
 using ::android::hardware::radio::V1_0::CellInfo;
 using ::android::hardware::radio::V1_0::ClipStatus;
 using ::android::hardware::radio::V1_0::DataRegStateResult;
+using ::android::hardware::radio::V1_0::Dial;
 using ::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo;
 using ::android::hardware::radio::V1_0::HardwareConfig;
+using ::android::hardware::radio::V1_0::IccIo;
 using ::android::hardware::radio::V1_0::IccIoResult;
 using ::android::hardware::radio::V1_0::IRadio;
 using ::android::hardware::radio::V1_0::IRadioResponse;
@@ -60,6 +64,7 @@
 using ::android::hardware::radio::V1_0::SendSmsResult;
 using ::android::hardware::radio::V1_0::SetupDataCallResult;
 using ::android::hardware::radio::V1_0::SignalStrength;
+using ::android::hardware::radio::V1_0::SimApdu;
 using ::android::hardware::radio::V1_0::TtyMode;
 using ::android::hardware::radio::V1_0::VoiceRegStateResult;
 
@@ -71,6 +76,7 @@
 #define TIMEOUT_PERIOD 20
 
 class RadioHidlTest;
+extern CardStatus cardStatus;
 
 /* Callback class for radio response */
 class RadioResponse : public IRadioResponse {
@@ -79,7 +85,15 @@
 
 public:
     RadioResponseInfo rspInfo;
-    CardStatus cardStatus;
+    hidl_string imsi;
+    IccIoResult iccIoResult;
+    int channelId;
+
+    // Sms
+    SendSmsResult sendSmsResult;
+    hidl_string smscAddress;
+    uint32_t writeSmsToSimIndex;
+    uint32_t writeSmsToRuimIndex;
 
     RadioResponse(RadioHidlTest& parent);
 
@@ -228,8 +242,6 @@
     Return<void> sendOemRilRequestStringsResponse(const RadioResponseInfo& info,
             const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data);
 
-    Return<void> sendScreenStateResponse(const RadioResponseInfo& info);
-
     Return<void> setSuppServiceNotificationsResponse(
             const RadioResponseInfo& info);
 
@@ -423,7 +435,7 @@
 };
 
 // The main test class for Radio HIDL.
-class RadioHidlTest : public ::testing::Test {
+class RadioHidlTest : public ::testing::VtsHalHidlTargetTestBase {
 private:
     std::mutex mtx;
     std::condition_variable cv;
@@ -443,6 +455,7 @@
     sp<IRadio> radio;
     sp<RadioResponse> radioRsp;
     sp<IRadioIndication> radioInd;
+
 };
 
 // A class for test environment setup
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
new file mode 100644
index 0000000..3638ccb
--- /dev/null
+++ b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
@@ -0,0 +1,476 @@
+/*
+ * 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.
+ */
+
+#include<radio_hidl_hal_utils.h>
+
+/*
+ * Test IRadio.getCurrentCalls() for the response returned.
+ */
+TEST_F(RadioHidlTest, getCurrentCalls) {
+    int serial = 1;
+
+    radio->getCurrentCalls(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE
+                || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
+    }
+}
+
+/*
+ * Test IRadio.dial() for the response returned.
+ */
+TEST_F(RadioHidlTest, dial) {
+    int serial = 1;
+
+    Dial dialInfo;
+    memset(&dialInfo, 0, sizeof(dialInfo));
+    dialInfo.address = hidl_string("123456789");
+
+    radio->dial(serial, dialInfo);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.hangup() for the response returned.
+ */
+TEST_F(RadioHidlTest, hangup) {
+    int serial = 1;
+
+    radio->hangup(serial, 1);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.hangupWaitingOrBackground() for the response returned.
+ */
+TEST_F(RadioHidlTest, hangupWaitingOrBackground) {
+    int serial = 1;
+
+    radio->hangupWaitingOrBackground(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.hangupForegroundResumeBackground() for the response returned.
+ */
+TEST_F(RadioHidlTest, hangupForegroundResumeBackground) {
+    int serial = 1;
+
+    radio->hangupForegroundResumeBackground(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.switchWaitingOrHoldingAndActive() for the response returned.
+ */
+TEST_F(RadioHidlTest, switchWaitingOrHoldingAndActive) {
+    int serial = 1;
+
+    radio->switchWaitingOrHoldingAndActive(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.conference() for the response returned.
+ */
+TEST_F(RadioHidlTest, conference) {
+    int serial = 1;
+
+    radio->conference(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.rejectCall() for the response returned.
+ */
+TEST_F(RadioHidlTest, rejectCall) {
+    int serial = 1;
+
+    radio->rejectCall(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.getLastCallFailCause() for the response returned.
+ */
+TEST_F(RadioHidlTest, getLastCallFailCause) {
+    int serial = 1;
+
+    radio->getLastCallFailCause(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::NONE);
+    }
+}
+
+/*
+ * Test IRadio.sendUssd() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendUssd) {
+    int serial = 1;
+    radio->sendUssd(serial, hidl_string("test"));
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::SYSTEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.cancelPendingUssd() for the response returned.
+ */
+TEST_F(RadioHidlTest, cancelPendingUssd) {
+    int serial = 1;
+
+    radio->cancelPendingUssd(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.getCallForwardStatus() for the response returned.
+ */
+TEST_F(RadioHidlTest, getCallForwardStatus) {
+    int serial = 1;
+    CallForwardInfo callInfo;
+    memset(&callInfo, 0, sizeof(callInfo));
+    callInfo.number = hidl_string();
+
+    radio->getCallForwardStatus(serial, callInfo);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.setCallForward() for the response returned.
+ */
+TEST_F(RadioHidlTest, setCallForward) {
+    int serial = 1;
+    CallForwardInfo callInfo;
+    memset(&callInfo, 0, sizeof(callInfo));
+    callInfo.number = hidl_string();
+
+    radio->setCallForward(serial, callInfo);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.getCallWaiting() for the response returned.
+ */
+TEST_F(RadioHidlTest, getCallWaiting) {
+    int serial = 1;
+
+    radio->getCallWaiting(serial, 1);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::NONE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.setCallWaiting() for the response returned.
+ */
+TEST_F(RadioHidlTest, setCallWaiting) {
+    int serial = 1;
+
+    radio->setCallWaiting(serial, true, 1);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.acceptCall() for the response returned.
+ */
+TEST_F(RadioHidlTest, acceptCall) {
+    int serial = 1;
+
+    radio->acceptCall(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.separateConnection() for the response returned.
+ */
+TEST_F(RadioHidlTest, separateConnection) {
+    int serial = 1;
+
+    radio->separateConnection(serial, 1);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::SYSTEM_ERR
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.explicitCallTransfer() for the response returned.
+ */
+TEST_F(RadioHidlTest, explicitCallTransfer) {
+    int serial = 1;
+
+    radio->explicitCallTransfer(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.sendDtmf() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendDtmf) {
+    int serial = 1;
+
+    radio->sendDtmf(serial, "1");
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::NO_RESOURCES
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+    }
+}
+
+/*
+ * Test IRadio.startDtmf() for the response returned.
+ */
+TEST_F(RadioHidlTest, startDtmf) {
+    int serial = 1;
+
+    radio->startDtmf(serial, "1");
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::SYSTEM_ERR
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.stopDtmf() for the response returned.
+ */
+TEST_F(RadioHidlTest, stopDtmf) {
+    int serial = 1;
+
+    radio->stopDtmf(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::SYSTEM_ERR
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.setMute() for the response returned.
+ */
+TEST_F(RadioHidlTest, setMute) {
+    int serial = 1;
+
+    radio->setMute(serial, true);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::NONE);
+    }
+}
+
+/*
+ * Test IRadio.getMute() for the response returned.
+ */
+TEST_F(RadioHidlTest, getMute) {
+    int serial = 1;
+
+    radio->getMute(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::NONE);
+    }
+}
+
+/*
+ * Test IRadio.sendBurstDtmf() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendBurstDtmf) {
+    int serial = 1;
+
+    radio->sendBurstDtmf(serial, "1", 0, 0);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
+                || radioRsp->rspInfo.error == RadioError::SYSTEM_ERR
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR
+                || radioRsp->rspInfo.error == RadioError::INVALID_STATE);
+    }
+}
\ No newline at end of file
diff --git a/radio/1.0/vts/functional/radio_response.cpp b/radio/1.0/vts/functional/radio_response.cpp
index b2a74f4..3db2dd1 100644
--- a/radio/1.0/vts/functional/radio_response.cpp
+++ b/radio/1.0/vts/functional/radio_response.cpp
@@ -16,6 +16,8 @@
 
 #include<radio_hidl_hal_utils.h>
 
+CardStatus cardStatus;
+
 RadioResponse::RadioResponse(RadioHidlTest& parent) : parent(parent) {
 }
 
@@ -28,638 +30,745 @@
 }
 
 Return<void> RadioResponse::supplyIccPinForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::supplyIccPukForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::supplyIccPin2ForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
   rspInfo = info;
   parent.notify();
   return Void();
 }
 
 Return<void> RadioResponse::supplyIccPuk2ForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::changeIccPinForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::changeIccPin2ForAppResponse(
-        const RadioResponseInfo& info, int32_t remaining_retries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& /*info*/, int32_t /*remainingRetries*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCurrentCallsResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_vec<Call>& calls) {
+        const RadioResponseInfo& info, const ::android::hardware::hidl_vec<Call>& /*calls*/) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::dialResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::getIMSIForAppResponse(
         const RadioResponseInfo& info, const ::android::hardware::hidl_string& imsi) {
+    rspInfo = info;
+    this->imsi = imsi;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::hangupConnectionResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::hangupForegroundResumeBackgroundResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::conferenceResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::rejectCallResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::getLastCallFailCauseResponse(
-        const RadioResponseInfo& info, const LastCallFailCauseInfo& failCauseInfo) {
+        const RadioResponseInfo& info, const LastCallFailCauseInfo& /*failCauseInfo*/) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::getSignalStrengthResponse(
-        const RadioResponseInfo& info, const SignalStrength& sig_strength) {
+        const RadioResponseInfo& /*info*/, const SignalStrength& /*sig_strength*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getVoiceRegistrationStateResponse(
-        const RadioResponseInfo& info, const VoiceRegStateResult& voiceRegResponse) {
+        const RadioResponseInfo& /*info*/, const VoiceRegStateResult& /*voiceRegResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getDataRegistrationStateResponse(
-        const RadioResponseInfo& info, const DataRegStateResult& dataRegResponse) {
+        const RadioResponseInfo& /*info*/, const DataRegStateResult& /*dataRegResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getOperatorResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& longName,
-        const ::android::hardware::hidl_string& shortName,
-        const ::android::hardware::hidl_string& numeric) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*longName*/,
+        const ::android::hardware::hidl_string& /*shortName*/,
+        const ::android::hardware::hidl_string& /*numeric*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendDtmfResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::sendSmsResponse(const RadioResponseInfo& info,
         const SendSmsResult& sms) {
+    rspInfo = info;
+    sendSmsResult = sms;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::sendSMSExpectMoreResponse(
         const RadioResponseInfo& info, const SendSmsResult& sms) {
+    rspInfo = info;
+    sendSmsResult = sms;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::setupDataCallResponse(
-        const RadioResponseInfo& info, const SetupDataCallResult& dcResponse) {
+        const RadioResponseInfo& /*info*/, const SetupDataCallResult& /*dcResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::iccIOForAppResponse(
         const RadioResponseInfo& info, const IccIoResult& iccIo) {
+    rspInfo = info;
+    this->iccIoResult = iccIo;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::sendUssdResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& info, int32_t n, int32_t m) {
+Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& /*info*/, int32_t /*n*/,
+        int32_t /*m*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCallForwardStatusResponse(
         const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CallForwardInfo>&
-        callForwardInfos) {
+        /*callForwardInfos*/) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::setCallForwardResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::getCallWaitingResponse(
-        const RadioResponseInfo& info, bool enable, int32_t serviceClass) {
+        const RadioResponseInfo& info, bool /*enable*/, int32_t /*serviceClass*/) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::setCallWaitingResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::acceptCallResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& info,
-        int32_t response) {
+Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& /*info*/,
+        int32_t /*response*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& info,
-        int32_t retry) {
+Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& /*info*/,
+        int32_t /*retry*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getNetworkSelectionModeResponse(
-        const RadioResponseInfo& info, bool manual) {
+        const RadioResponseInfo& /*info*/, bool /*manual*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setNetworkSelectionModeAutomaticResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setNetworkSelectionModeManualResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setNetworkSelectionModeManualResponse(
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getAvailableNetworksResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<OperatorInfo>& networkInfos) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<OperatorInfo>& /*networkInfos*/) {
     return Void();
 }
 
 Return<void> RadioResponse::startDtmfResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::stopDtmfResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::getBasebandVersionResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& version) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*version*/) {
     return Void();
 }
 
 Return<void> RadioResponse::separateConnectionResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::setMuteResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool enable) {
+Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool /*enable*/) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& info, ClipStatus status) {
+Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& /*info*/,
+        ClipStatus /*status*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getDataCallListResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<SetupDataCallResult>& dcResponse) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<SetupDataCallResult>& /*dcResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendOemRilRequestRawResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<uint8_t>& data) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<uint8_t>& /*data*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendOemRilRequestStringsResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data) {
-    return Void();
-}
-
-Return<void> RadioResponse::sendScreenStateResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& /*data*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setSuppServiceNotificationsResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::writeSmsToSimResponse(
         const RadioResponseInfo& info, int32_t index) {
+    rspInfo = info;
+    writeSmsToSimIndex = index;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::deleteSmsOnSimResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::setBandModeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setBandModeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getAvailableBandModesResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<RadioBandMode>& bandModes) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<RadioBandMode>& /*bandModes*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendEnvelopeResponse(const RadioResponseInfo& info,
-        const ::android::hardware::hidl_string& commandResponse) {
+Return<void> RadioResponse::sendEnvelopeResponse(const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_string& /*commandResponse*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::handleStkCallSetupRequestFromSimResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getPreferredNetworkTypeResponse(
-        const RadioResponseInfo& info, PreferredNetworkType nw_type) {
+        const RadioResponseInfo& /*info*/, PreferredNetworkType /*nw_type*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getNeighboringCidsResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<NeighboringCell>& cells) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<NeighboringCell>& /*cells*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setLocationUpdatesResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(
-        const RadioResponseInfo& info, CdmaRoamingType type) {
+        const RadioResponseInfo& /*info*/, CdmaRoamingType /*type*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& info, TtyMode mode) {
+Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& /*info*/,
+        TtyMode /*mode*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getPreferredVoicePrivacyResponse(
-        const RadioResponseInfo& info, bool enable) {
+        const RadioResponseInfo& /*info*/, bool /*enable*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::sendCdmaSmsResponse(
         const RadioResponseInfo& info, const SendSmsResult& sms) {
+    rspInfo = info;
+    sendSmsResult = sms;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::getGsmBroadcastConfigResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& configs) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& /*configs*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCdmaBroadcastConfigResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& configs) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& /*configs*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCDMASubscriptionResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& mdn,
-        const ::android::hardware::hidl_string& hSid, const ::android::hardware::hidl_string& hNid,
-        const ::android::hardware::hidl_string& min,
-        const ::android::hardware::hidl_string& prl) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*mdn*/,
+        const ::android::hardware::hidl_string& /*hSid*/,
+        const ::android::hardware::hidl_string& /*hNid*/,
+        const ::android::hardware::hidl_string& /*min*/,
+        const ::android::hardware::hidl_string& /*prl*/) {
     return Void();
 }
 
 Return<void> RadioResponse::writeSmsToRuimResponse(
         const RadioResponseInfo& info, uint32_t index) {
+    rspInfo = info;
+    writeSmsToRuimIndex = index;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::deleteSmsOnRuimResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::getDeviceIdentityResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& imei,
-        const ::android::hardware::hidl_string& imeisv, const ::android::hardware::hidl_string& esn,
-        const ::android::hardware::hidl_string& meid) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*imei*/,
+        const ::android::hardware::hidl_string& /*imeisv*/,
+        const ::android::hardware::hidl_string& /*esn*/,
+        const ::android::hardware::hidl_string& /*meid*/) {
     return Void();
 }
 
-Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getSmscAddressResponse(
         const RadioResponseInfo& info, const ::android::hardware::hidl_string& smsc) {
+    rspInfo = info;
+    smscAddress = smsc;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(
-        const RadioResponseInfo& info, CdmaSubscriptionSource source) {
+        const RadioResponseInfo& /*info*/, CdmaSubscriptionSource /*source*/) {
     return Void();
 }
 
 Return<void> RadioResponse::requestIsimAuthenticationResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& response) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*response*/) {
     return Void();
 }
 
 Return<void> RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse(
         const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::sendEnvelopeWithStatusResponse(
-        const RadioResponseInfo& info, const IccIoResult& iccIo) {
+        const RadioResponseInfo& /*info*/, const IccIoResult& /*iccIo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getVoiceRadioTechnologyResponse(
-        const RadioResponseInfo& info, RadioTechnology rat) {
+        const RadioResponseInfo& /*info*/, RadioTechnology /*rat*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCellInfoListResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& cellInfo) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<CellInfo>& /*cellInfo*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getImsRegistrationStateResponse(
-        const RadioResponseInfo& info, bool isRegistered, RadioTechnologyFamily ratFamily) {
+        const RadioResponseInfo& /*info*/, bool /*isRegistered*/,
+        RadioTechnologyFamily /*ratFamily*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendImsSmsResponse(
         const RadioResponseInfo& info, const SendSmsResult& sms) {
+    rspInfo = info;
+    sendSmsResult = sms;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::iccTransmitApduBasicChannelResponse(
         const RadioResponseInfo& info, const IccIoResult& result) {
+    rspInfo = info;
+    this->iccIoResult = result;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::iccOpenLogicalChannelResponse(
         const RadioResponseInfo& info, int32_t channelId,
-        const ::android::hardware::hidl_vec<int8_t>& selectResponse) {
+        const ::android::hardware::hidl_vec<int8_t>& /*selectResponse*/) {
+    rspInfo = info;
+    this->channelId = channelId;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::iccCloseLogicalChannelResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::iccTransmitApduLogicalChannelResponse(
         const RadioResponseInfo& info, const IccIoResult& result) {
+    rspInfo = info;
+    this->iccIoResult = result;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::nvReadItemResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& result) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*result*/) {
     return Void();
 }
 
-Return<void> RadioResponse::nvWriteItemResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::nvWriteItemResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::nvResetConfigResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::nvResetConfigResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setDataAllowedResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setDataAllowedResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getHardwareConfigResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<HardwareConfig>& config) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<HardwareConfig>& /*config*/) {
     return Void();
 }
 
 Return<void> RadioResponse::requestIccSimAuthenticationResponse(
         const RadioResponseInfo& info, const IccIoResult& result) {
+    rspInfo = info;
+    this->iccIoResult = result;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::setDataProfileResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setDataProfileResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::requestShutdownResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::requestShutdownResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getRadioCapabilityResponse(
-        const RadioResponseInfo& info, const RadioCapability& rc) {
+        const RadioResponseInfo& /*info*/, const RadioCapability& /*rc*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setRadioCapabilityResponse(
-        const RadioResponseInfo& info, const RadioCapability& rc) {
+        const RadioResponseInfo& /*info*/, const RadioCapability& /*rc*/) {
     return Void();
 }
 
 Return<void> RadioResponse::startLceServiceResponse(
-        const RadioResponseInfo& info, const LceStatusInfo& statusInfo) {
+        const RadioResponseInfo& /*info*/, const LceStatusInfo& /*statusInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::stopLceServiceResponse(
-        const RadioResponseInfo& info, const LceStatusInfo& statusInfo) {
+        const RadioResponseInfo& /*info*/, const LceStatusInfo& /*statusInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::pullLceDataResponse(
-        const RadioResponseInfo& info, const LceDataInfo& lceInfo) {
+        const RadioResponseInfo& /*info*/, const LceDataInfo& /*lceInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getModemActivityInfoResponse(
-        const RadioResponseInfo& info, const ActivityStatsInfo& activityInfo) {
+        const RadioResponseInfo& /*info*/, const ActivityStatsInfo& /*activityInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setAllowedCarriersResponse(
-        const RadioResponseInfo& info, int32_t numAllowed) {
+        const RadioResponseInfo& /*info*/, int32_t /*numAllowed*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getAllowedCarriersResponse(
-        const RadioResponseInfo& info, bool allAllowed, const CarrierRestrictions& carriers) {
+        const RadioResponseInfo& /*info*/, bool /*allAllowed*/,
+        const CarrierRestrictions& /*carriers*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendDeviceStateResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setIndicationFilterResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setSimCardPowerResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::acknowledgeRequest(int32_t serial) {
+Return<void> RadioResponse::acknowledgeRequest(int32_t /*serial*/) {
     return Void();
 }
diff --git a/radio/1.0/vts/types.vts b/radio/1.0/vts/types.vts
deleted file mode 100644
index 6d42016..0000000
--- a/radio/1.0/vts/types.vts
+++ /dev/null
@@ -1,5696 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.radio"
-
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioConst"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "CDMA_ALPHA_INFO_BUFFER_LENGTH"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "CDMA_NUMBER_INFO_BUFFER_LENGTH"
-        scalar_value: {
-            int32_t: 81
-        }
-        enumerator: "MAX_RILDS"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "MAX_SOCKET_NAME_LENGTH"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "MAX_CLIENT_ID_LENGTH"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "MAX_DEBUG_SOCKET_NAME_LENGTH"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "MAX_QEMU_PIPE_NAME_LENGTH"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "MAX_UUID_LENGTH"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "CARD_MAX_APPS"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "CDMA_MAX_NUMBER_OF_INFO_RECS"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "SS_INFO_MAX"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NUM_SERVICE_CLASSES"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "NUM_TX_POWER_LEVELS"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioCdmaSmsConst"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ADDRESS_MAX"
-        scalar_value: {
-            int32_t: 36
-        }
-        enumerator: "SUBADDRESS_MAX"
-        scalar_value: {
-            int32_t: 36
-        }
-        enumerator: "BEARER_DATA_MAX"
-        scalar_value: {
-            int32_t: 255
-        }
-        enumerator: "UDH_MAX_SND_SIZE"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "UDH_EO_DATA_SEGMENT_MAX"
-        scalar_value: {
-            int32_t: 131
-        }
-        enumerator: "MAX_UD_HEADERS"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "USER_DATA_MAX"
-        scalar_value: {
-            int32_t: 229
-        }
-        enumerator: "UDH_LARGE_PIC_SIZE"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "UDH_SMALL_PIC_SIZE"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "UDH_VAR_PIC_SIZE"
-        scalar_value: {
-            int32_t: 134
-        }
-        enumerator: "UDH_ANIM_NUM_BITMAPS"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "UDH_LARGE_BITMAP_SIZE"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "UDH_SMALL_BITMAP_SIZE"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "UDH_OTHER_SIZE"
-        scalar_value: {
-            int32_t: 226
-        }
-        enumerator: "IP_ADDRESS_SIZE"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioError"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RADIO_NOT_AVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "GENERIC_FAILURE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "PASSWORD_INCORRECT"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SIM_PIN2"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "SIM_PUK2"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "REQUEST_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "CANCELLED"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "OP_NOT_ALLOWED_DURING_VOICE_CALL"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "OP_NOT_ALLOWED_BEFORE_REG_TO_NW"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "SMS_SEND_FAIL_RETRY"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "SIM_ABSENT"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "SUBSCRIPTION_NOT_AVAILABLE"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "MODE_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "FDN_CHECK_FAILURE"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "ILLEGAL_SIM_OR_ME"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "MISSING_RESOURCE"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "NO_SUCH_ELEMENT"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "DIAL_MODIFIED_TO_USSD"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "DIAL_MODIFIED_TO_SS"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "DIAL_MODIFIED_TO_DIAL"
-        scalar_value: {
-            int32_t: 20
-        }
-        enumerator: "USSD_MODIFIED_TO_DIAL"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "USSD_MODIFIED_TO_SS"
-        scalar_value: {
-            int32_t: 22
-        }
-        enumerator: "USSD_MODIFIED_TO_USSD"
-        scalar_value: {
-            int32_t: 23
-        }
-        enumerator: "SS_MODIFIED_TO_DIAL"
-        scalar_value: {
-            int32_t: 24
-        }
-        enumerator: "SS_MODIFIED_TO_USSD"
-        scalar_value: {
-            int32_t: 25
-        }
-        enumerator: "SUBSCRIPTION_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 26
-        }
-        enumerator: "SS_MODIFIED_TO_SS"
-        scalar_value: {
-            int32_t: 27
-        }
-        enumerator: "LCE_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 36
-        }
-        enumerator: "NO_MEMORY"
-        scalar_value: {
-            int32_t: 37
-        }
-        enumerator: "INTERNAL_ERR"
-        scalar_value: {
-            int32_t: 38
-        }
-        enumerator: "SYSTEM_ERR"
-        scalar_value: {
-            int32_t: 39
-        }
-        enumerator: "MODEM_ERR"
-        scalar_value: {
-            int32_t: 40
-        }
-        enumerator: "INVALID_STATE"
-        scalar_value: {
-            int32_t: 41
-        }
-        enumerator: "NO_RESOURCES"
-        scalar_value: {
-            int32_t: 42
-        }
-        enumerator: "SIM_ERR"
-        scalar_value: {
-            int32_t: 43
-        }
-        enumerator: "INVALID_ARGUMENTS"
-        scalar_value: {
-            int32_t: 44
-        }
-        enumerator: "INVALID_SIM_STATE"
-        scalar_value: {
-            int32_t: 45
-        }
-        enumerator: "INVALID_MODEM_STATE"
-        scalar_value: {
-            int32_t: 46
-        }
-        enumerator: "INVALID_CALL_ID"
-        scalar_value: {
-            int32_t: 47
-        }
-        enumerator: "NO_SMS_TO_ACK"
-        scalar_value: {
-            int32_t: 48
-        }
-        enumerator: "NETWORK_ERR"
-        scalar_value: {
-            int32_t: 49
-        }
-        enumerator: "REQUEST_RATE_LIMITED"
-        scalar_value: {
-            int32_t: 50
-        }
-        enumerator: "SIM_BUSY"
-        scalar_value: {
-            int32_t: 51
-        }
-        enumerator: "SIM_FULL"
-        scalar_value: {
-            int32_t: 52
-        }
-        enumerator: "NETWORK_REJECT"
-        scalar_value: {
-            int32_t: 53
-        }
-        enumerator: "OPERATION_NOT_ALLOWED"
-        scalar_value: {
-            int32_t: 54
-        }
-        enumerator: "EMPTY_RECORD"
-        scalar_value: {
-            int32_t: 55
-        }
-        enumerator: "INVALID_SMS_FORMAT"
-        scalar_value: {
-            int32_t: 56
-        }
-        enumerator: "ENCODING_ERR"
-        scalar_value: {
-            int32_t: 57
-        }
-        enumerator: "INVALID_SMSC_ADDRESS"
-        scalar_value: {
-            int32_t: 58
-        }
-        enumerator: "NO_SUCH_ENTRY"
-        scalar_value: {
-            int32_t: 59
-        }
-        enumerator: "NETWORK_NOT_READY"
-        scalar_value: {
-            int32_t: 60
-        }
-        enumerator: "NOT_PROVISIONED"
-        scalar_value: {
-            int32_t: 61
-        }
-        enumerator: "NO_SUBSCRIPTION"
-        scalar_value: {
-            int32_t: 62
-        }
-        enumerator: "NO_NETWORK_FOUND"
-        scalar_value: {
-            int32_t: 63
-        }
-        enumerator: "DEVICE_IN_USE"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "ABORTED"
-        scalar_value: {
-            int32_t: 65
-        }
-        enumerator: "INVALID_RESPONSE"
-        scalar_value: {
-            int32_t: 66
-        }
-        enumerator: "OEM_ERROR_1"
-        scalar_value: {
-            int32_t: 501
-        }
-        enumerator: "OEM_ERROR_2"
-        scalar_value: {
-            int32_t: 502
-        }
-        enumerator: "OEM_ERROR_3"
-        scalar_value: {
-            int32_t: 503
-        }
-        enumerator: "OEM_ERROR_4"
-        scalar_value: {
-            int32_t: 504
-        }
-        enumerator: "OEM_ERROR_5"
-        scalar_value: {
-            int32_t: 505
-        }
-        enumerator: "OEM_ERROR_6"
-        scalar_value: {
-            int32_t: 506
-        }
-        enumerator: "OEM_ERROR_7"
-        scalar_value: {
-            int32_t: 507
-        }
-        enumerator: "OEM_ERROR_8"
-        scalar_value: {
-            int32_t: 508
-        }
-        enumerator: "OEM_ERROR_9"
-        scalar_value: {
-            int32_t: 509
-        }
-        enumerator: "OEM_ERROR_10"
-        scalar_value: {
-            int32_t: 510
-        }
-        enumerator: "OEM_ERROR_11"
-        scalar_value: {
-            int32_t: 511
-        }
-        enumerator: "OEM_ERROR_12"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "OEM_ERROR_13"
-        scalar_value: {
-            int32_t: 513
-        }
-        enumerator: "OEM_ERROR_14"
-        scalar_value: {
-            int32_t: 514
-        }
-        enumerator: "OEM_ERROR_15"
-        scalar_value: {
-            int32_t: 515
-        }
-        enumerator: "OEM_ERROR_16"
-        scalar_value: {
-            int32_t: 516
-        }
-        enumerator: "OEM_ERROR_17"
-        scalar_value: {
-            int32_t: 517
-        }
-        enumerator: "OEM_ERROR_18"
-        scalar_value: {
-            int32_t: 518
-        }
-        enumerator: "OEM_ERROR_19"
-        scalar_value: {
-            int32_t: 519
-        }
-        enumerator: "OEM_ERROR_20"
-        scalar_value: {
-            int32_t: 520
-        }
-        enumerator: "OEM_ERROR_21"
-        scalar_value: {
-            int32_t: 521
-        }
-        enumerator: "OEM_ERROR_22"
-        scalar_value: {
-            int32_t: 522
-        }
-        enumerator: "OEM_ERROR_23"
-        scalar_value: {
-            int32_t: 523
-        }
-        enumerator: "OEM_ERROR_24"
-        scalar_value: {
-            int32_t: 524
-        }
-        enumerator: "OEM_ERROR_25"
-        scalar_value: {
-            int32_t: 525
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioResponseType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SOLICITED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SOLICITED_ACK"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SOLICITED_ACK_EXP"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioIndicationType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNSOLICITED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "UNSOLICITED_ACK_EXP"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RestrictedState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CS_EMERGENCY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CS_NORMAL"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CS_ALL"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "PS_ALL"
-        scalar_value: {
-            int32_t: 16
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CardState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ABSENT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "PRESENT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ERROR"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "RESTRICTED"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::PinState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ENABLED_NOT_VERIFIED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ENABLED_VERIFIED"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "DISABLED"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ENABLED_BLOCKED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ENABLED_PERM_BLOCKED"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::AppType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SIM"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "USIM"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "RUIM"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CSIM"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ISIM"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::AppState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DETECTED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "PIN"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "PUK"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SUBSCRIPTION_PERSO"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "READY"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::PersoSubstate"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "IN_PROGRESS"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "READY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SIM_NETWORK"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SIM_NETWORK_SUBSET"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "SIM_CORPORATE"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "SIM_SERVICE_PROVIDER"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "SIM_SIM"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "SIM_NETWORK_PUK"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "SIM_NETWORK_SUBSET_PUK"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "SIM_CORPORATE_PUK"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "SIM_SERVICE_PROVIDER_PUK"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "SIM_SIM_PUK"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "RUIM_NETWORK1"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "RUIM_NETWORK2"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "RUIM_HRPD"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "RUIM_CORPORATE"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "RUIM_SERVICE_PROVIDER"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "RUIM_RUIM"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "RUIM_NETWORK1_PUK"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "RUIM_NETWORK2_PUK"
-        scalar_value: {
-            int32_t: 20
-        }
-        enumerator: "RUIM_HRPD_PUK"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "RUIM_CORPORATE_PUK"
-        scalar_value: {
-            int32_t: 22
-        }
-        enumerator: "RUIM_SERVICE_PROVIDER_PUK"
-        scalar_value: {
-            int32_t: 23
-        }
-        enumerator: "RUIM_RUIM_PUK"
-        scalar_value: {
-            int32_t: 24
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OFF"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "UNAVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ON"
-        scalar_value: {
-            int32_t: 10
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SapConnectRsp"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CONNECT_FAILURE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "MSG_SIZE_TOO_LARGE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "MSG_SIZE_TOO_SMALL"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CONNECT_OK_CALL_ONGOING"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SapDisconnectType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "GRACEFUL"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "IMMEDIATE"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SapApduType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "APDU"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "APDU7816"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SapResultCode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "GENERIC_FAILURE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CARD_NOT_ACCESSSIBLE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CARD_ALREADY_POWERED_OFF"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CARD_REMOVED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "CARD_ALREADY_POWERED_ON"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "DATA_NOT_AVAILABLE"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 7
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SapStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN_ERROR"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CARD_RESET"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CARD_NOT_ACCESSIBLE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CARD_REMOVED"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CARD_INSERTED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "RECOVERED"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SapTransferProtocol"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "T0"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "T1"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CallState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ACTIVE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "HOLDING"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DIALING"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ALERTING"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "INCOMING"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "WAITING"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::UusType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "TYPE1_IMPLICIT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "TYPE1_REQUIRED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "TYPE1_NOT_REQUIRED"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "TYPE2_REQUIRED"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "TYPE2_NOT_REQUIRED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "TYPE3_REQUIRED"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "TYPE3_NOT_REQUIRED"
-        scalar_value: {
-            int32_t: 6
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::UusDcs"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "USP"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "OSIHLP"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "X244"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "RMCF"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "IA5C"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CallPresentation"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ALLOWED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RESTRICTED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "PAYPHONE"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::Clir"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DEFAULT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "INVOCATION"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SUPPRESSION"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::LastCallFailCause"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNOBTAINABLE_NUMBER"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NO_ROUTE_TO_DESTINATION"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CHANNEL_UNACCEPTABLE"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "OPERATOR_DETERMINED_BARRING"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "NORMAL"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "BUSY"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "NO_USER_RESPONDING"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "NO_ANSWER_FROM_USER"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "CALL_REJECTED"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "NUMBER_CHANGED"
-        scalar_value: {
-            int32_t: 22
-        }
-        enumerator: "PREEMPTION"
-        scalar_value: {
-            int32_t: 25
-        }
-        enumerator: "DESTINATION_OUT_OF_ORDER"
-        scalar_value: {
-            int32_t: 27
-        }
-        enumerator: "INVALID_NUMBER_FORMAT"
-        scalar_value: {
-            int32_t: 28
-        }
-        enumerator: "FACILITY_REJECTED"
-        scalar_value: {
-            int32_t: 29
-        }
-        enumerator: "RESP_TO_STATUS_ENQUIRY"
-        scalar_value: {
-            int32_t: 30
-        }
-        enumerator: "NORMAL_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 31
-        }
-        enumerator: "CONGESTION"
-        scalar_value: {
-            int32_t: 34
-        }
-        enumerator: "NETWORK_OUT_OF_ORDER"
-        scalar_value: {
-            int32_t: 38
-        }
-        enumerator: "TEMPORARY_FAILURE"
-        scalar_value: {
-            int32_t: 41
-        }
-        enumerator: "SWITCHING_EQUIPMENT_CONGESTION"
-        scalar_value: {
-            int32_t: 42
-        }
-        enumerator: "ACCESS_INFORMATION_DISCARDED"
-        scalar_value: {
-            int32_t: 43
-        }
-        enumerator: "REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE"
-        scalar_value: {
-            int32_t: 44
-        }
-        enumerator: "RESOURCES_UNAVAILABLE_OR_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 47
-        }
-        enumerator: "QOS_UNAVAILABLE"
-        scalar_value: {
-            int32_t: 49
-        }
-        enumerator: "REQUESTED_FACILITY_NOT_SUBSCRIBED"
-        scalar_value: {
-            int32_t: 50
-        }
-        enumerator: "INCOMING_CALLS_BARRED_WITHIN_CUG"
-        scalar_value: {
-            int32_t: 55
-        }
-        enumerator: "BEARER_CAPABILITY_NOT_AUTHORIZED"
-        scalar_value: {
-            int32_t: 57
-        }
-        enumerator: "BEARER_CAPABILITY_UNAVAILABLE"
-        scalar_value: {
-            int32_t: 58
-        }
-        enumerator: "SERVICE_OPTION_NOT_AVAILABLE"
-        scalar_value: {
-            int32_t: 63
-        }
-        enumerator: "BEARER_SERVICE_NOT_IMPLEMENTED"
-        scalar_value: {
-            int32_t: 65
-        }
-        enumerator: "ACM_LIMIT_EXCEEDED"
-        scalar_value: {
-            int32_t: 68
-        }
-        enumerator: "REQUESTED_FACILITY_NOT_IMPLEMENTED"
-        scalar_value: {
-            int32_t: 69
-        }
-        enumerator: "ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE"
-        scalar_value: {
-            int32_t: 70
-        }
-        enumerator: "SERVICE_OR_OPTION_NOT_IMPLEMENTED"
-        scalar_value: {
-            int32_t: 79
-        }
-        enumerator: "INVALID_TRANSACTION_IDENTIFIER"
-        scalar_value: {
-            int32_t: 81
-        }
-        enumerator: "USER_NOT_MEMBER_OF_CUG"
-        scalar_value: {
-            int32_t: 87
-        }
-        enumerator: "INCOMPATIBLE_DESTINATION"
-        scalar_value: {
-            int32_t: 88
-        }
-        enumerator: "INVALID_TRANSIT_NW_SELECTION"
-        scalar_value: {
-            int32_t: 91
-        }
-        enumerator: "SEMANTICALLY_INCORRECT_MESSAGE"
-        scalar_value: {
-            int32_t: 95
-        }
-        enumerator: "INVALID_MANDATORY_INFORMATION"
-        scalar_value: {
-            int32_t: 96
-        }
-        enumerator: "MESSAGE_TYPE_NON_IMPLEMENTED"
-        scalar_value: {
-            int32_t: 97
-        }
-        enumerator: "MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"
-        scalar_value: {
-            int32_t: 98
-        }
-        enumerator: "INFORMATION_ELEMENT_NON_EXISTENT"
-        scalar_value: {
-            int32_t: 99
-        }
-        enumerator: "CONDITIONAL_IE_ERROR"
-        scalar_value: {
-            int32_t: 100
-        }
-        enumerator: "MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"
-        scalar_value: {
-            int32_t: 101
-        }
-        enumerator: "RECOVERY_ON_TIMER_EXPIRED"
-        scalar_value: {
-            int32_t: 102
-        }
-        enumerator: "PROTOCOL_ERROR_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 111
-        }
-        enumerator: "INTERWORKING_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 127
-        }
-        enumerator: "CALL_BARRED"
-        scalar_value: {
-            int32_t: 240
-        }
-        enumerator: "FDN_BLOCKED"
-        scalar_value: {
-            int32_t: 241
-        }
-        enumerator: "IMSI_UNKNOWN_IN_VLR"
-        scalar_value: {
-            int32_t: 242
-        }
-        enumerator: "IMEI_NOT_ACCEPTED"
-        scalar_value: {
-            int32_t: 243
-        }
-        enumerator: "DIAL_MODIFIED_TO_USSD"
-        scalar_value: {
-            int32_t: 244
-        }
-        enumerator: "DIAL_MODIFIED_TO_SS"
-        scalar_value: {
-            int32_t: 245
-        }
-        enumerator: "DIAL_MODIFIED_TO_DIAL"
-        scalar_value: {
-            int32_t: 246
-        }
-        enumerator: "CDMA_LOCKED_UNTIL_POWER_CYCLE"
-        scalar_value: {
-            int32_t: 1000
-        }
-        enumerator: "CDMA_DROP"
-        scalar_value: {
-            int32_t: 1001
-        }
-        enumerator: "CDMA_INTERCEPT"
-        scalar_value: {
-            int32_t: 1002
-        }
-        enumerator: "CDMA_REORDER"
-        scalar_value: {
-            int32_t: 1003
-        }
-        enumerator: "CDMA_SO_REJECT"
-        scalar_value: {
-            int32_t: 1004
-        }
-        enumerator: "CDMA_RETRY_ORDER"
-        scalar_value: {
-            int32_t: 1005
-        }
-        enumerator: "CDMA_ACCESS_FAILURE"
-        scalar_value: {
-            int32_t: 1006
-        }
-        enumerator: "CDMA_PREEMPTED"
-        scalar_value: {
-            int32_t: 1007
-        }
-        enumerator: "CDMA_NOT_EMERGENCY"
-        scalar_value: {
-            int32_t: 1008
-        }
-        enumerator: "CDMA_ACCESS_BLOCKED"
-        scalar_value: {
-            int32_t: 1009
-        }
-        enumerator: "ERROR_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 65535
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::DataCallFailCause"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "OPERATOR_BARRED"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "NAS_SIGNALLING"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "INSUFFICIENT_RESOURCES"
-        scalar_value: {
-            int32_t: 26
-        }
-        enumerator: "MISSING_UKNOWN_APN"
-        scalar_value: {
-            int32_t: 27
-        }
-        enumerator: "UNKNOWN_PDP_ADDRESS_TYPE"
-        scalar_value: {
-            int32_t: 28
-        }
-        enumerator: "USER_AUTHENTICATION"
-        scalar_value: {
-            int32_t: 29
-        }
-        enumerator: "ACTIVATION_REJECT_GGSN"
-        scalar_value: {
-            int32_t: 30
-        }
-        enumerator: "ACTIVATION_REJECT_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 31
-        }
-        enumerator: "SERVICE_OPTION_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "SERVICE_OPTION_NOT_SUBSCRIBED"
-        scalar_value: {
-            int32_t: 33
-        }
-        enumerator: "SERVICE_OPTION_OUT_OF_ORDER"
-        scalar_value: {
-            int32_t: 34
-        }
-        enumerator: "NSAPI_IN_USE"
-        scalar_value: {
-            int32_t: 35
-        }
-        enumerator: "REGULAR_DEACTIVATION"
-        scalar_value: {
-            int32_t: 36
-        }
-        enumerator: "QOS_NOT_ACCEPTED"
-        scalar_value: {
-            int32_t: 37
-        }
-        enumerator: "NETWORK_FAILURE"
-        scalar_value: {
-            int32_t: 38
-        }
-        enumerator: "UMTS_REACTIVATION_REQ"
-        scalar_value: {
-            int32_t: 39
-        }
-        enumerator: "FEATURE_NOT_SUPP"
-        scalar_value: {
-            int32_t: 40
-        }
-        enumerator: "TFT_SEMANTIC_ERROR"
-        scalar_value: {
-            int32_t: 41
-        }
-        enumerator: "TFT_SYTAX_ERROR"
-        scalar_value: {
-            int32_t: 42
-        }
-        enumerator: "UNKNOWN_PDP_CONTEXT"
-        scalar_value: {
-            int32_t: 43
-        }
-        enumerator: "FILTER_SEMANTIC_ERROR"
-        scalar_value: {
-            int32_t: 44
-        }
-        enumerator: "FILTER_SYTAX_ERROR"
-        scalar_value: {
-            int32_t: 45
-        }
-        enumerator: "PDP_WITHOUT_ACTIVE_TFT"
-        scalar_value: {
-            int32_t: 46
-        }
-        enumerator: "ONLY_IPV4_ALLOWED"
-        scalar_value: {
-            int32_t: 50
-        }
-        enumerator: "ONLY_IPV6_ALLOWED"
-        scalar_value: {
-            int32_t: 51
-        }
-        enumerator: "ONLY_SINGLE_BEARER_ALLOWED"
-        scalar_value: {
-            int32_t: 52
-        }
-        enumerator: "ESM_INFO_NOT_RECEIVED"
-        scalar_value: {
-            int32_t: 53
-        }
-        enumerator: "PDN_CONN_DOES_NOT_EXIST"
-        scalar_value: {
-            int32_t: 54
-        }
-        enumerator: "MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED"
-        scalar_value: {
-            int32_t: 55
-        }
-        enumerator: "MAX_ACTIVE_PDP_CONTEXT_REACHED"
-        scalar_value: {
-            int32_t: 65
-        }
-        enumerator: "UNSUPPORTED_APN_IN_CURRENT_PLMN"
-        scalar_value: {
-            int32_t: 66
-        }
-        enumerator: "INVALID_TRANSACTION_ID"
-        scalar_value: {
-            int32_t: 81
-        }
-        enumerator: "MESSAGE_INCORRECT_SEMANTIC"
-        scalar_value: {
-            int32_t: 95
-        }
-        enumerator: "INVALID_MANDATORY_INFO"
-        scalar_value: {
-            int32_t: 96
-        }
-        enumerator: "MESSAGE_TYPE_UNSUPPORTED"
-        scalar_value: {
-            int32_t: 97
-        }
-        enumerator: "MSG_TYPE_NONCOMPATIBLE_STATE"
-        scalar_value: {
-            int32_t: 98
-        }
-        enumerator: "UNKNOWN_INFO_ELEMENT"
-        scalar_value: {
-            int32_t: 99
-        }
-        enumerator: "CONDITIONAL_IE_ERROR"
-        scalar_value: {
-            int32_t: 100
-        }
-        enumerator: "MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE"
-        scalar_value: {
-            int32_t: 101
-        }
-        enumerator: "PROTOCOL_ERRORS"
-        scalar_value: {
-            int32_t: 111
-        }
-        enumerator: "APN_TYPE_CONFLICT"
-        scalar_value: {
-            int32_t: 112
-        }
-        enumerator: "INVALID_PCSCF_ADDR"
-        scalar_value: {
-            int32_t: 113
-        }
-        enumerator: "INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN"
-        scalar_value: {
-            int32_t: 114
-        }
-        enumerator: "EMM_ACCESS_BARRED"
-        scalar_value: {
-            int32_t: 115
-        }
-        enumerator: "EMERGENCY_IFACE_ONLY"
-        scalar_value: {
-            int32_t: 116
-        }
-        enumerator: "IFACE_MISMATCH"
-        scalar_value: {
-            int32_t: 117
-        }
-        enumerator: "COMPANION_IFACE_IN_USE"
-        scalar_value: {
-            int32_t: 118
-        }
-        enumerator: "IP_ADDRESS_MISMATCH"
-        scalar_value: {
-            int32_t: 119
-        }
-        enumerator: "IFACE_AND_POL_FAMILY_MISMATCH"
-        scalar_value: {
-            int32_t: 120
-        }
-        enumerator: "EMM_ACCESS_BARRED_INFINITE_RETRY"
-        scalar_value: {
-            int32_t: 121
-        }
-        enumerator: "AUTH_FAILURE_ON_EMERGENCY_CALL"
-        scalar_value: {
-            int32_t: 122
-        }
-        enumerator: "OEM_DCFAILCAUSE_1"
-        scalar_value: {
-            int32_t: 4097
-        }
-        enumerator: "OEM_DCFAILCAUSE_2"
-        scalar_value: {
-            int32_t: 4098
-        }
-        enumerator: "OEM_DCFAILCAUSE_3"
-        scalar_value: {
-            int32_t: 4099
-        }
-        enumerator: "OEM_DCFAILCAUSE_4"
-        scalar_value: {
-            int32_t: 4100
-        }
-        enumerator: "OEM_DCFAILCAUSE_5"
-        scalar_value: {
-            int32_t: 4101
-        }
-        enumerator: "OEM_DCFAILCAUSE_6"
-        scalar_value: {
-            int32_t: 4102
-        }
-        enumerator: "OEM_DCFAILCAUSE_7"
-        scalar_value: {
-            int32_t: 4103
-        }
-        enumerator: "OEM_DCFAILCAUSE_8"
-        scalar_value: {
-            int32_t: 4104
-        }
-        enumerator: "OEM_DCFAILCAUSE_9"
-        scalar_value: {
-            int32_t: 4105
-        }
-        enumerator: "OEM_DCFAILCAUSE_10"
-        scalar_value: {
-            int32_t: 4106
-        }
-        enumerator: "OEM_DCFAILCAUSE_11"
-        scalar_value: {
-            int32_t: 4107
-        }
-        enumerator: "OEM_DCFAILCAUSE_12"
-        scalar_value: {
-            int32_t: 4108
-        }
-        enumerator: "OEM_DCFAILCAUSE_13"
-        scalar_value: {
-            int32_t: 4109
-        }
-        enumerator: "OEM_DCFAILCAUSE_14"
-        scalar_value: {
-            int32_t: 4110
-        }
-        enumerator: "OEM_DCFAILCAUSE_15"
-        scalar_value: {
-            int32_t: 4111
-        }
-        enumerator: "VOICE_REGISTRATION_FAIL"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "DATA_REGISTRATION_FAIL"
-        scalar_value: {
-            int32_t: -2
-        }
-        enumerator: "SIGNAL_LOST"
-        scalar_value: {
-            int32_t: -3
-        }
-        enumerator: "PREF_RADIO_TECH_CHANGED"
-        scalar_value: {
-            int32_t: -4
-        }
-        enumerator: "RADIO_POWER_OFF"
-        scalar_value: {
-            int32_t: -5
-        }
-        enumerator: "TETHERED_CALL_ACTIVE"
-        scalar_value: {
-            int32_t: -6
-        }
-        enumerator: "ERROR_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 65535
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RegState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NOT_REG_MT_NOT_SEARCHING_OP"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "REG_HOME"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NOT_REG_MT_SEARCHING_OP"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "REG_DENIED"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "REG_ROAMING"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "NOT_REG_MT_NOT_SEARCHING_OP_EM"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "NOT_REG_MT_SEARCHING_OP_EM"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "REG_DENIED_EM"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "UNKNOWN_EM"
-        scalar_value: {
-            int32_t: 9
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioTechnology"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "GPRS"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "EDGE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "UMTS"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "IS95A"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "IS95B"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "ONE_X_RTT"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "EVDO_0"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "EVDO_A"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "HSDPA"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "HSUPA"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "HSPA"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "EVDO_B"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "EHRPD"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "LTE"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "HSPAP"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "GSM"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "TD_SCDMA"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "IWLAN"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "LTE_CA"
-        scalar_value: {
-            int32_t: 19
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::DataProfileId"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DEFAULT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "TETHERED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "IMS"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FOTA"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CBS"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "OEM_BASE"
-        scalar_value: {
-            int32_t: 1000
-        }
-        enumerator: "INVALID"
-        scalar_value: {
-            int32_t: -1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SmsAcknowledgeFailCause"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "MEMORY_CAPACITY_EXCEEDED"
-        scalar_value: {
-            int32_t: 211
-        }
-        enumerator: "UNSPECIFIED_ERROR"
-        scalar_value: {
-            int32_t: 255
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CallForwardInfoStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DISABLE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ENABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "INTERROGATE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "REGISTRATION"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ERASURE"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::ClipStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "CLIP_PROVISIONED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CLIP_UNPROVISIONED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SmsWriteArgsStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "REC_UNREAD"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "REC_READ"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "STO_UNSENT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "STO_SENT"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioBandMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "BAND_MODE_UNSPECIFIED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "BAND_MODE_EURO"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "BAND_MODE_USA"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "BAND_MODE_JPN"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "BAND_MODE_AUS"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "BAND_MODE_AUS_2"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "BAND_MODE_CELL_800"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "BAND_MODE_PCS"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "BAND_MODE_JTACS"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "BAND_MODE_KOREA_PCS"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "BAND_MODE_5_450M"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "BAND_MODE_IMT2000"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "BAND_MODE_7_700M_2"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "BAND_MODE_8_1800M"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "BAND_MODE_9_900M"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "BAND_MODE_10_800M_2"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "BAND_MODE_EURO_PAMR_400M"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "BAND_MODE_AWS"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "BAND_MODE_USA_2500M"
-        scalar_value: {
-            int32_t: 18
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::OperatorStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "AVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CURRENT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FORBIDDEN"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::PreferredNetworkType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "GSM_WCDMA"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "GSM_ONLY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "WCDMA"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "GSM_WCDMA_AUTO"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CDMA_EVDO_AUTO"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "CDMA_ONLY"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "EVDO_ONLY"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "GSM_WCDMA_CDMA_EVDO_AUTO"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "LTE_CDMA_EVDO"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "LTE_GSM_WCDMA"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "LTE_CMDA_EVDO_GSM_WCDMA"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "LTE_ONLY"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "LTE_WCDMA"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "TD_SCDMA_ONLY"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "TD_SCDMA_WCDMA"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "TD_SCDMA_LTE"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "TD_SCDMA_GSM"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "TD_SCDMA_GSM_LTE"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "TD_SCDMA_GSM_WCDMA"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "TD_SCDMA_WCDMA_LTE"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "TD_SCDMA_GSM_WCDMA_LTE"
-        scalar_value: {
-            int32_t: 20
-        }
-        enumerator: "TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA"
-        scalar_value: {
-            int32_t: 22
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSubscriptionSource"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "RUIM_SIM"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "NV"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaRoamingType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "HOME_NETWORK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "AFFILIATED_ROAM"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ANY_ROAM"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::TtyMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OFF"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "FULL"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "HCO"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "VCO"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::NvItem"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "CDMA_MEID"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CDMA_MIN"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CDMA_MDN"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CDMA_ACCOLC"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "DEVICE_MSL"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "RTN_RECONDITIONED_STATUS"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "RTN_ACTIVATION_DATE"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "RTN_LIFE_TIMER"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "RTN_LIFE_CALLS"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "RTN_LIFE_DATA_TX"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "RTN_LIFE_DATA_RX"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "OMADM_HFA_LEVEL"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "MIP_PROFILE_NAI"
-        scalar_value: {
-            int32_t: 31
-        }
-        enumerator: "MIP_PROFILE_HOME_ADDRESS"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "MIP_PROFILE_AAA_AUTH"
-        scalar_value: {
-            int32_t: 33
-        }
-        enumerator: "MIP_PROFILE_HA_AUTH"
-        scalar_value: {
-            int32_t: 34
-        }
-        enumerator: "MIP_PROFILE_PRI_HA_ADDR"
-        scalar_value: {
-            int32_t: 35
-        }
-        enumerator: "MIP_PROFILE_SEC_HA_ADDR"
-        scalar_value: {
-            int32_t: 36
-        }
-        enumerator: "MIP_PROFILE_REV_TUN_PREF"
-        scalar_value: {
-            int32_t: 37
-        }
-        enumerator: "MIP_PROFILE_HA_SPI"
-        scalar_value: {
-            int32_t: 38
-        }
-        enumerator: "MIP_PROFILE_AAA_SPI"
-        scalar_value: {
-            int32_t: 39
-        }
-        enumerator: "MIP_PROFILE_MN_HA_SS"
-        scalar_value: {
-            int32_t: 40
-        }
-        enumerator: "MIP_PROFILE_MN_AAA_SS"
-        scalar_value: {
-            int32_t: 41
-        }
-        enumerator: "CDMA_PRL_VERSION"
-        scalar_value: {
-            int32_t: 51
-        }
-        enumerator: "CDMA_BC10"
-        scalar_value: {
-            int32_t: 52
-        }
-        enumerator: "CDMA_BC14"
-        scalar_value: {
-            int32_t: 53
-        }
-        enumerator: "CDMA_SO68"
-        scalar_value: {
-            int32_t: 54
-        }
-        enumerator: "CDMA_SO73_COP0"
-        scalar_value: {
-            int32_t: 55
-        }
-        enumerator: "CDMA_SO73_COP1TO7"
-        scalar_value: {
-            int32_t: 56
-        }
-        enumerator: "CDMA_1X_ADVANCED_ENABLED"
-        scalar_value: {
-            int32_t: 57
-        }
-        enumerator: "CDMA_EHRPD_ENABLED"
-        scalar_value: {
-            int32_t: 58
-        }
-        enumerator: "CDMA_EHRPD_FORCED"
-        scalar_value: {
-            int32_t: 59
-        }
-        enumerator: "LTE_BAND_ENABLE_25"
-        scalar_value: {
-            int32_t: 71
-        }
-        enumerator: "LTE_BAND_ENABLE_26"
-        scalar_value: {
-            int32_t: 72
-        }
-        enumerator: "LTE_BAND_ENABLE_41"
-        scalar_value: {
-            int32_t: 73
-        }
-        enumerator: "LTE_SCAN_PRIORITY_25"
-        scalar_value: {
-            int32_t: 74
-        }
-        enumerator: "LTE_SCAN_PRIORITY_26"
-        scalar_value: {
-            int32_t: 75
-        }
-        enumerator: "LTE_SCAN_PRIORITY_41"
-        scalar_value: {
-            int32_t: 76
-        }
-        enumerator: "LTE_HIDDEN_BAND_PRIORITY_25"
-        scalar_value: {
-            int32_t: 77
-        }
-        enumerator: "LTE_HIDDEN_BAND_PRIORITY_26"
-        scalar_value: {
-            int32_t: 78
-        }
-        enumerator: "LTE_HIDDEN_BAND_PRIORITY_41"
-        scalar_value: {
-            int32_t: 79
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::ResetNvType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "RELOAD"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ERASE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "FACTORY_RESET"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::HardwareConfigType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "MODEM"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SIM"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::HardwareConfigState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ENABLED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "STANDBY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DISABLED"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::LceStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "STOPPED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ACTIVE"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CarrierMatchType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ALL"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SPN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "IMSI_PREFIX"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "GID1"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "GID2"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::NeighboringCell"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cid"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "rssi"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsDigitMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FOUR_BIT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "EIGHT_BIT"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsNumberMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NOT_DATA_NETWORK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DATA_NETWORK"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsNumberType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "INTERNATIONAL_OR_DATA_IP"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NATIONAL_OR_INTERNET_MAIL"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "NETWORK"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SUBSCRIBER"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ALPHANUMERIC"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "ABBREVIATED"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "RESERVED_7"
-        scalar_value: {
-            int32_t: 7
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsNumberPlan"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "TELEPHONY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "RESERVED_2"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "DATA"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "TELEX"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "RESERVED_5"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "RESERVED_6"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "RESERVED_7"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "RESERVED_8"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "PRIVATE"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "RESERVED_10"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "RESERVED_11"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "RESERVED_12"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "RESERVED_13"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "RESERVED_14"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "RESERVED_15"
-        scalar_value: {
-            int32_t: 15
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsSubaddressType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NSAP"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "USER_SPECIFIED"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsErrorClass"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NO_ERROR"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ERROR"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsWriteArgsStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "REC_UNREAD"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "REC_READ"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "STO_UNSENT"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "STO_SENT"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellInfoType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "GSM"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CDMA"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "LTE"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "WCDMA"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "TD_SCDMA"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::TimeStampType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ANTENNA"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "MODEM"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "OEM_RIL"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "JAVA_RIL"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::ApnAuthType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NO_PAP_NO_CHAP"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "PAP_NO_CHAP"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NO_PAP_CHAP"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "PAP_CHAP"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioTechnologyFamily"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "THREE_GPP"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "THREE_GPP2"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioCapabilityPhase"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "CONFIGURED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "START"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "APPLY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "UNSOL_RSP"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "FINISH"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioCapabilityStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "FAIL"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioAccessFamily"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "GPRS"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "EDGE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "UMTS"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "IS95A"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "IS95B"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "ONE_X_RTT"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "EVDO_0"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "EVDO_A"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "HSDPA"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "HSUPA"
-        scalar_value: {
-            int32_t: 1024
-        }
-        enumerator: "HSPA"
-        scalar_value: {
-            int32_t: 2048
-        }
-        enumerator: "EVDO_B"
-        scalar_value: {
-            int32_t: 4096
-        }
-        enumerator: "EHRPD"
-        scalar_value: {
-            int32_t: 8192
-        }
-        enumerator: "LTE"
-        scalar_value: {
-            int32_t: 16384
-        }
-        enumerator: "HSPAP"
-        scalar_value: {
-            int32_t: 32768
-        }
-        enumerator: "GSM"
-        scalar_value: {
-            int32_t: 65536
-        }
-        enumerator: "TD_SCDMA"
-        scalar_value: {
-            int32_t: 131072
-        }
-        enumerator: "LTE_CA"
-        scalar_value: {
-            int32_t: 524288
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::UssdModeType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NOTIFY"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "REQUEST"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NW_RELEASE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "LOCAL_CLIENT"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NW_TIMEOUT"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SimRefreshType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SIM_FILE_UPDATE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SIM_INIT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SIM_RESET"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SrvccState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "HANDOVER_STARTED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "HANDOVER_COMPLETED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "HANDOVER_FAILED"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "HANDOVER_CANCELED"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::UiccSubActStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DEACTIVATE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ACTIVATE"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SubscriptionType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUBSCRIPTION_1"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SUBSCRIPTION_2"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "SUBSCRIPTION_3"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::DataProfileInfoType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "COMMON"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "THREE_GPP"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "THREE_GPP2"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::PhoneRestrictedState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CS_EMERGENCY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CS_NORMAL"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CS_ALL"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "PS_ALL"
-        scalar_value: {
-            int32_t: 16
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberPresentation"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ALLOWED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RESTRICTED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "INTERNATIONAL"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NATIONAL"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "NETWORK_SPECIFIC"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SUBSCRIBER"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberPlan"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ISDN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DATA"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "TELEX"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "NATIONAL"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "PRIVATE"
-        scalar_value: {
-            int32_t: 9
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaOtaProvisionStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SPL_UNLOCKED"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SPC_RETRIES_EXCEEDED"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "A_KEY_EXCHANGED"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SSD_UPDATED"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "NAM_DOWNLOADED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "MDN_DOWNLOADED"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "IMSI_DOWNLOADED"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "PRL_DOWNLOADED"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "COMMITTED"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "OTAPA_STARTED"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "OTAPA_STOPPED"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "OTAPA_ABORTED"
-        scalar_value: {
-            int32_t: 11
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaInfoRecName"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DISPLAY"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CALLED_PARTY_NUMBER"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CALLING_PARTY_NUMBER"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CONNECTED_NUMBER"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SIGNAL"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "REDIRECTING_NUMBER"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "LINE_CONTROL"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "EXTENDED_DISPLAY"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "T53_CLIR"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "T53_RELEASE"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "T53_AUDIO_CONTROL"
-        scalar_value: {
-            int32_t: 10
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaRedirectingReason"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CALL_FORWARDING_BUSY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CALL_FORWARDING_NO_REPLY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CALLED_DTE_OUT_OF_ORDER"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "CALL_FORWARDING_BY_THE_CALLED_DTE"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "CALL_FORWARDING_UNCONDITIONAL"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "RESERVED"
-        scalar_value: {
-            int32_t: 16
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SsServiceType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "CFU"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CF_BUSY"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CF_NO_REPLY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "CF_NOT_REACHABLE"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "CF_ALL"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "CF_ALL_CONDITIONAL"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "CLIP"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "CLIR"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "COLP"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "COLR"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "WAIT"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "BAOC"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "BAOIC"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "BAOIC_EXC_HOME"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "BAIC"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "BAIC_ROAMING"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "ALL_BARRING"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "OUTGOING_BARRING"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "INCOMING_BARRING"
-        scalar_value: {
-            int32_t: 18
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SsRequestType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ACTIVATION"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DEACTIVATION"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "INTERROGATION"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "REGISTRATION"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "ERASURE"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SsTeleserviceType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ALL_TELE_AND_BEARER_SERVICES"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ALL_TELESEVICES"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "TELEPHONY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ALL_DATA_TELESERVICES"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SMS_SERVICES"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ALL_TELESERVICES_EXCEPT_SMS"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SuppServiceClass"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "VOICE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DATA"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FAX"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "SMS"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "DATA_SYNC"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "DATA_ASYNC"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "PACKET"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "PAD"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "MAX"
-        scalar_value: {
-            int32_t: 128
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::ApnTypes"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DEFAULT"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "MMS"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SUPL"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "DUN"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "HIPRI"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "FOTA"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "IMS"
-        scalar_value: {
-            int32_t: 64
-        }
-        enumerator: "CBS"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "IA"
-        scalar_value: {
-            int32_t: 256
-        }
-        enumerator: "EMERGENCY"
-        scalar_value: {
-            int32_t: 512
-        }
-        enumerator: "ALL"
-        scalar_value: {
-            int32_t: 1023
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::IndicationFilter"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "SIGNAL_STRENGTH"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "FULL_NETWORK_STATE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "DATA_CALL_DORMANCY_CHANGED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "ALL"
-        scalar_value: {
-            int32_t: 7
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::MvnoType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "IMSI"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "GID"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SPN"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::DeviceStateType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "POWER_SAVE_MODE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "CHARGING_STATE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "LOW_DATA_EXPECTED"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioResponseInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RadioResponseType"
-    }
-    struct_value: {
-        name: "serial"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "error"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RadioError"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::AppStatus"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "appType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::AppType"
-    }
-    struct_value: {
-        name: "appState"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::AppState"
-    }
-    struct_value: {
-        name: "persoSubstate"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::PersoSubstate"
-    }
-    struct_value: {
-        name: "aidPtr"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "appLabelPtr"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "pin1Replaced"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "pin1"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::PinState"
-    }
-    struct_value: {
-        name: "pin2"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::PinState"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CardStatus"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cardState"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CardState"
-    }
-    struct_value: {
-        name: "universalPinState"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::PinState"
-    }
-    struct_value: {
-        name: "gsmUmtsSubscriptionAppIndex"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cdmaSubscriptionAppIndex"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "imsSubscriptionAppIndex"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "applications"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::AppStatus"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::UusInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "uusType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::UusType"
-    }
-    struct_value: {
-        name: "uusDcs"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::UusDcs"
-    }
-    struct_value: {
-        name: "uusData"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::Call"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "state"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CallState"
-    }
-    struct_value: {
-        name: "index"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "toa"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "isMpty"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "isMT"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "als"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "isVoice"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "isVoicePrivacy"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "number"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "numberPresentation"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CallPresentation"
-    }
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "namePresentation"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CallPresentation"
-    }
-    struct_value: {
-        name: "uusInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::UusInfo"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::Dial"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "address"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "clir"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::Clir"
-    }
-    struct_value: {
-        name: "uusInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::UusInfo"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::LastCallFailCauseInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "causeCode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::LastCallFailCause"
-    }
-    struct_value: {
-        name: "vendorCause"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::GsmSignalStrength"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "signalStrength"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "bitErrorRate"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "timingAdvance"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::WcdmaSignalStrength"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "signalStrength"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "bitErrorRate"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSignalStrength"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "dbm"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "ecio"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::EvdoSignalStrength"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "dbm"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "ecio"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "signalNoiseRatio"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::LteSignalStrength"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "signalStrength"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "rsrp"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "rsrq"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "rssnr"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cqi"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "timingAdvance"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::TdScdmaSignalStrength"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "rscp"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SignalStrength"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "gw"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::GsmSignalStrength"
-    }
-    struct_value: {
-        name: "cdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSignalStrength"
-    }
-    struct_value: {
-        name: "evdo"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::EvdoSignalStrength"
-    }
-    struct_value: {
-        name: "lte"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::LteSignalStrength"
-    }
-    struct_value: {
-        name: "tdScdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::TdScdmaSignalStrength"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SendSmsResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "messageRef"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "ackPDU"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "errorCode"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SetupDataCallResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "status"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "suggestedRetryTime"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "active"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "ifname"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "addresses"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "dnses"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "gateways"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "pcscf"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "mtu"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::IccIo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "command"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "fileId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "path"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "p1"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "p2"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "p3"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "data"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "pin2"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "aid"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::IccIoResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sw1"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "sw2"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "simResponse"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::VoiceRegStateResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "regState"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RegState"
-    }
-    struct_value: {
-        name: "lac"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "rat"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "baseStationId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "baseStationLatitude"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "baseStationLongitude"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cssSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "systemId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "networkId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "roamingIndicator"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "systemIsInPrl"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "defaultRoamingIndicator"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "reasonForDenial"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "psc"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::DataRegStateResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "regState"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RegState"
-    }
-    struct_value: {
-        name: "lac"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "rat"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "reasonDataDenied"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "maxDataCalls"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "tac"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "phyCid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "eci"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "csgid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "tadv"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CallForwardInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CallForwardInfoStatus"
-    }
-    struct_value: {
-        name: "reason"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "serviceClass"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "toa"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "number"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "timeSeconds"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::OperatorInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "alphaLong"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "alphaShort"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "operatorNumeric"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::OperatorStatus"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SmsWriteArgs"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::SmsWriteArgsStatus"
-    }
-    struct_value: {
-        name: "pdu"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "smsc"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsAddress"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "digitMode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsDigitMode"
-    }
-    struct_value: {
-        name: "numberMode"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsNumberMode"
-    }
-    struct_value: {
-        name: "numberType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsNumberType"
-    }
-    struct_value: {
-        name: "numberPlan"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsNumberPlan"
-    }
-    struct_value: {
-        name: "digits"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsSubaddress"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "subaddressType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsSubaddressType"
-    }
-    struct_value: {
-        name: "odd"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "digits"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsMessage"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "teleserviceId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "isServicePresent"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "serviceCategory"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "address"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsAddress"
-    }
-    struct_value: {
-        name: "subAddress"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsSubaddress"
-    }
-    struct_value: {
-        name: "bearerData"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsAck"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "errorClass"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsErrorClass"
-    }
-    struct_value: {
-        name: "smsCauseCode"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaBroadcastSmsConfigInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "serviceCategory"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "language"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "selected"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSmsWriteArgs"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsWriteArgsStatus"
-    }
-    struct_value: {
-        name: "message"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSmsMessage"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "fromServiceId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "toServiceId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "fromCodeScheme"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "toCodeScheme"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "selected"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellIdentityGsm"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "mcc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "mnc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "lac"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "arfcn"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "bsic"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellIdentityWcdma"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "mcc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "mnc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "lac"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "psc"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "uarfcn"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellIdentityCdma"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "networkId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "systemId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "baseStationId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "longitude"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "latitude"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellIdentityLte"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "mcc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "mnc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "ci"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "pci"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "tac"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "earfcn"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellIdentityTdscdma"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "mcc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "mnc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "lac"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cpid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellInfoGsm"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cellIdentityGsm"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CellIdentityGsm"
-    }
-    struct_value: {
-        name: "signalStrengthGsm"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::GsmSignalStrength"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellInfoWcdma"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cellIdentityWcdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CellIdentityWcdma"
-    }
-    struct_value: {
-        name: "signalStrengthWcdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::WcdmaSignalStrength"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellInfoCdma"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cellIdentityCdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CellIdentityCdma"
-    }
-    struct_value: {
-        name: "signalStrengthCdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSignalStrength"
-    }
-    struct_value: {
-        name: "signalStrengthEvdo"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::EvdoSignalStrength"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellInfoLte"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cellIdentityLte"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CellIdentityLte"
-    }
-    struct_value: {
-        name: "signalStrengthLte"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::LteSignalStrength"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellInfoTdscdma"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cellIdentityTdscdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CellIdentityTdscdma"
-    }
-    struct_value: {
-        name: "signalStrengthTdscdma"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::TdScdmaSignalStrength"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CellInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cellInfoType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CellInfoType"
-    }
-    struct_value: {
-        name: "registered"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "timeStampType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::TimeStampType"
-    }
-    struct_value: {
-        name: "timeStamp"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "gsm"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CellInfoGsm"
-        }
-    }
-    struct_value: {
-        name: "cdma"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CellInfoCdma"
-        }
-    }
-    struct_value: {
-        name: "lte"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CellInfoLte"
-        }
-    }
-    struct_value: {
-        name: "wcdma"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CellInfoWcdma"
-        }
-    }
-    struct_value: {
-        name: "tdscdma"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CellInfoTdscdma"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::GsmSmsMessage"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "smscPdu"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "pdu"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::ImsSmsMessage"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "tech"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RadioTechnologyFamily"
-    }
-    struct_value: {
-        name: "retry"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "messageRef"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cdmaMessage"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSmsMessage"
-        }
-    }
-    struct_value: {
-        name: "gsmMessage"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::GsmSmsMessage"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SimApdu"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sessionId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "cla"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "instruction"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "p1"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "p2"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "p3"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "data"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::NvWriteItem"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "itemId"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::NvItem"
-    }
-    struct_value: {
-        name: "value"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SelectUiccSub"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "slot"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "appIndex"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "subType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::SubscriptionType"
-    }
-    struct_value: {
-        name: "actStatus"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::UiccSubActStatus"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::HardwareConfigModem"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "rilModel"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "rat"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxVoice"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "maxData"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "maxStandby"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::HardwareConfigSim"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "modemUuid"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::HardwareConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::HardwareConfigType"
-    }
-    struct_value: {
-        name: "uuid"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "state"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::HardwareConfigState"
-    }
-    struct_value: {
-        name: "modem"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::HardwareConfigModem"
-        }
-    }
-    struct_value: {
-        name: "sim"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::HardwareConfigSim"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::DataProfileInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "profileId"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::DataProfileId"
-    }
-    struct_value: {
-        name: "apn"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "protocol"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "roamingProtocol"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "authType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::ApnAuthType"
-    }
-    struct_value: {
-        name: "user"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "password"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::DataProfileInfoType"
-    }
-    struct_value: {
-        name: "maxConnsTime"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "maxConns"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "waitTime"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "enabled"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "supportedApnTypesBitmap"
-        type: TYPE_MASK
-        scalar_type: "int32_t"
-        predefined_type: "::android::hardware::radio::V1_0::ApnTypes"
-    }
-    struct_value: {
-        name: "bearerBitmap"
-        type: TYPE_MASK
-        scalar_type: "int32_t"
-        predefined_type: "::android::hardware::radio::V1_0::RadioAccessFamily"
-    }
-    struct_value: {
-        name: "mtu"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "mvnoType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::MvnoType"
-    }
-    struct_value: {
-        name: "mvnoMatchData"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::RadioCapability"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "session"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "phase"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RadioCapabilityPhase"
-    }
-    struct_value: {
-        name: "raf"
-        type: TYPE_MASK
-        scalar_type: "int32_t"
-        predefined_type: "::android::hardware::radio::V1_0::RadioAccessFamily"
-    }
-    struct_value: {
-        name: "logicalModemUuid"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RadioCapabilityStatus"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::LceStatusInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "lceStatus"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::LceStatus"
-    }
-    struct_value: {
-        name: "actualIntervalMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::LceDataInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "lastHopCapacityKbps"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "confidenceLevel"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "lceSuspended"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::ActivityStatsInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sleepModeTimeMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "idleModeTimeMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "txmModetimeMs"
-        type: TYPE_ARRAY
-        vector_size: 5
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-    struct_value: {
-        name: "rxModeTimeMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::Carrier"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "mcc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "mnc"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "matchType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CarrierMatchType"
-    }
-    struct_value: {
-        name: "matchData"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CarrierRestrictions"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "allowedCarriers"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::Carrier"
-        }
-    }
-    struct_value: {
-        name: "excludedCarriers"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::Carrier"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SuppSvcNotification"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "isMT"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "code"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "index"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "number"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SimRefreshResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::SimRefreshType"
-    }
-    struct_value: {
-        name: "efId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "aid"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaSignalInfoRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "isPresent"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "signalType"
-        type: TYPE_SCALAR
-        scalar_type: "int8_t"
-    }
-    struct_value: {
-        name: "alertPitch"
-        type: TYPE_SCALAR
-        scalar_type: "int8_t"
-    }
-    struct_value: {
-        name: "signal"
-        type: TYPE_SCALAR
-        scalar_type: "int8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaCallWaiting"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "number"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "numberPresentation"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberPresentation"
-    }
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "signalInfoRecord"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CdmaSignalInfoRecord"
-    }
-    struct_value: {
-        name: "numberType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberType"
-    }
-    struct_value: {
-        name: "numberPlan"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberPlan"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaDisplayInfoRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "alphaBuf"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaNumberInfoRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "number"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "numberType"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "numberPlan"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "pi"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "si"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaRedirectingNumberInfoRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "redirectingNumber"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::radio::V1_0::CdmaNumberInfoRecord"
-    }
-    struct_value: {
-        name: "redirectingReason"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaRedirectingReason"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaLineControlInfoRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "lineCtrlPolarityIncluded"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "lineCtrlToggle"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "lineCtrlReverse"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "lineCtrlPowerDenial"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaT53ClirInfoRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cause"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaT53AudioControlInfoRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "upLink"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "downLink"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaInformationRecord"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "name"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::CdmaInfoRecName"
-    }
-    struct_value: {
-        name: "display"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaDisplayInfoRecord"
-        }
-    }
-    struct_value: {
-        name: "number"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaNumberInfoRecord"
-        }
-    }
-    struct_value: {
-        name: "signal"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaSignalInfoRecord"
-        }
-    }
-    struct_value: {
-        name: "redir"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaRedirectingNumberInfoRecord"
-        }
-    }
-    struct_value: {
-        name: "lineCtrl"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaLineControlInfoRecord"
-        }
-    }
-    struct_value: {
-        name: "clir"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaT53ClirInfoRecord"
-        }
-    }
-    struct_value: {
-        name: "audioCtrl"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaT53AudioControlInfoRecord"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CdmaInformationRecords"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "infoRec"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CdmaInformationRecord"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::CfData"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cfInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CallForwardInfo"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::SsInfoData"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "ssInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::StkCcUnsolSsResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "serviceType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::SsServiceType"
-    }
-    struct_value: {
-        name: "requestType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::SsRequestType"
-    }
-    struct_value: {
-        name: "teleserviceType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::SsTeleserviceType"
-    }
-    struct_value: {
-        name: "serviceClass"
-        type: TYPE_MASK
-        scalar_type: "int32_t"
-        predefined_type: "::android::hardware::radio::V1_0::SuppServiceClass"
-    }
-    struct_value: {
-        name: "result"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::radio::V1_0::RadioError"
-    }
-    struct_value: {
-        name: "ssInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::SsInfoData"
-        }
-    }
-    struct_value: {
-        name: "cfData"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::radio::V1_0::CfData"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::radio::V1_0::PcoDataInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "cid"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "bearerProto"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "pcoId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "contents"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
diff --git a/radio/Android.bp b/radio/Android.bp
index 33f70eb..8bda000 100644
--- a/radio/Android.bp
+++ b/radio/Android.bp
@@ -2,4 +2,5 @@
 subdirs = [
     "1.0",
     "1.0/vts/functional",
+    "deprecated/1.0",
 ]
diff --git a/radio/deprecated/1.0/Android.bp b/radio/deprecated/1.0/Android.bp
new file mode 100644
index 0000000..f8a9c64
--- /dev/null
+++ b/radio/deprecated/1.0/Android.bp
@@ -0,0 +1,75 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.radio.deprecated@1.0_hal",
+    srcs: [
+        "IOemHook.hal",
+        "IOemHookIndication.hal",
+        "IOemHookResponse.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio.deprecated@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
+    srcs: [
+        ":android.hardware.radio.deprecated@1.0_hal",
+    ],
+    out: [
+        "android/hardware/radio/deprecated/1.0/OemHookAll.cpp",
+        "android/hardware/radio/deprecated/1.0/OemHookIndicationAll.cpp",
+        "android/hardware/radio/deprecated/1.0/OemHookResponseAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio.deprecated@1.0_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
+    srcs: [
+        ":android.hardware.radio.deprecated@1.0_hal",
+    ],
+    out: [
+        "android/hardware/radio/deprecated/1.0/IOemHook.h",
+        "android/hardware/radio/deprecated/1.0/IHwOemHook.h",
+        "android/hardware/radio/deprecated/1.0/BnHwOemHook.h",
+        "android/hardware/radio/deprecated/1.0/BpHwOemHook.h",
+        "android/hardware/radio/deprecated/1.0/BsOemHook.h",
+        "android/hardware/radio/deprecated/1.0/IOemHookIndication.h",
+        "android/hardware/radio/deprecated/1.0/IHwOemHookIndication.h",
+        "android/hardware/radio/deprecated/1.0/BnHwOemHookIndication.h",
+        "android/hardware/radio/deprecated/1.0/BpHwOemHookIndication.h",
+        "android/hardware/radio/deprecated/1.0/BsOemHookIndication.h",
+        "android/hardware/radio/deprecated/1.0/IOemHookResponse.h",
+        "android/hardware/radio/deprecated/1.0/IHwOemHookResponse.h",
+        "android/hardware/radio/deprecated/1.0/BnHwOemHookResponse.h",
+        "android/hardware/radio/deprecated/1.0/BpHwOemHookResponse.h",
+        "android/hardware/radio/deprecated/1.0/BsOemHookResponse.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.radio.deprecated@1.0",
+    generated_sources: ["android.hardware.radio.deprecated@1.0_genc++"],
+    generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hardware.radio@1.0",
+        "android.hidl.base@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.radio@1.0",
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/radio/deprecated/1.0/Android.mk b/radio/deprecated/1.0/Android.mk
new file mode 100644
index 0000000..4cce633
--- /dev/null
+++ b/radio/deprecated/1.0/Android.mk
@@ -0,0 +1,162 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio.deprecated@1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hardware.radio@1.0-java \
+    android.hidl.base@1.0-java \
+
+
+#
+# Build IOemHook.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHook.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHook.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio.deprecated@1.0::IOemHook
+
+$(GEN): $(LOCAL_PATH)/IOemHook.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio.deprecated@1.0::IOemHookIndication
+
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio.deprecated@1.0::IOemHookResponse
+
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio.deprecated@1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hardware.radio@1.0-java-static \
+    android.hidl.base@1.0-java-static \
+
+
+#
+# Build IOemHook.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHook.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHook.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio.deprecated@1.0::IOemHook
+
+$(GEN): $(LOCAL_PATH)/IOemHook.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio.deprecated@1.0::IOemHookIndication
+
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio.deprecated@1.0::IOemHookResponse
+
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/radio/deprecated/1.0/IOemHook.hal b/radio/deprecated/1.0/IOemHook.hal
new file mode 100644
index 0000000..2b6db65
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHook.hal
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import IOemHookResponse;
+import IOemHookIndication;
+
+/**
+ * This interface has APIs for OEM-specific use-cases.
+ * USE OF THIS INTERFACE IS DISCOURATED. IT IS PRESENT ONLY FOR BACKWARD COMPATIBILITY AND WILL BE
+ * REMOVED IN O (ATTEMPTING TO REMOVE IT IN O, BUT IF NOT IN O WILL BE REMOVED IN P).
+ * ALSO NOTE THAT FRAMEWORK EXPECTS THE SERVICE IMPLEMENTING THIS INTERFACE TO RESIDE
+ * IN THE SAME PROCESS AS IRADIO SERVICE.
+ */
+interface IOemHook {
+    /**
+     * Set response functions for oem hook requests & oem hook indications.
+     *
+     * @param oemHookResponse Object containing response functions
+     * @param oemHookIndication Object containing oem hook indications
+     */
+    setResponseFunctions(IOemHookResponse oemHookResponse, IOemHookIndication oemHookIndication);
+
+    /**
+     * This request passes raw byte arrays between framework and vendor code.
+     *
+     * @param serial Serial number of request.
+     * @param data data passed as raw bytes
+     *
+     * Response function is IOemHookResponse.sendRequestRawResponse()
+     */
+    oneway sendRequestRaw(int32_t serial, vec<uint8_t> data);
+
+    /**
+     * This request passes strings between framework and vendor code.
+     *
+     * @param serial Serial number of request.
+     * @param data data passed as strings
+     *
+     * Response function is IOemHookResponse.sendRequestStringsResponse()
+     */
+    oneway sendRequestStrings(int32_t serial, vec<string> data);
+};
\ No newline at end of file
diff --git a/radio/deprecated/1.0/IOemHookIndication.hal b/radio/deprecated/1.0/IOemHookIndication.hal
new file mode 100644
index 0000000..936779f
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHookIndication.hal
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import android.hardware.radio@1.0::types;
+
+/*
+ * Interface declaring unsolicited oem hook indications.
+ */
+interface IOemHookIndication {
+   /*
+    * This is for OEM specific use.
+    *
+    * @param type Type of radio indication
+    * @param data data passed as raw bytes
+    */
+   oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
+};
\ No newline at end of file
diff --git a/radio/deprecated/1.0/IOemHookResponse.hal b/radio/deprecated/1.0/IOemHookResponse.hal
new file mode 100644
index 0000000..4e49acc
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHookResponse.hal
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import android.hardware.radio@1.0::types;
+
+/*
+ * Interface declaring response functions to solicited oem hook requests.
+ * Response functions defined in this interface are as per following convention:
+ * <xyz>Response is response to IOemHook.<xyz>
+ */
+interface IOemHookResponse {
+    /*
+     * @param info Response info struct containing response type, serial no. and error
+     * @param data data returned by oem
+     *
+     * Valid errors returned:
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:INVALID_ARGUMENTS
+     *   RadioError:OEM_ERROR_X
+     */
+    oneway sendRequestRawResponse(RadioResponseInfo info, vec<uint8_t> data);
+
+    /*
+     * @param info Response info struct containing response type, serial no. and error
+     * @param data data returned by oem
+     *
+     * Valid errors returned:
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:INVALID_ARGUMENTS
+     *   RadioError:OEM_ERROR_X
+     */
+    oneway sendRequestStringsResponse(RadioResponseInfo info, vec<string> data);
+};
\ No newline at end of file
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index 5ae7027..cce34e7 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -1,13 +1,20 @@
 // This file is autogenerated by hidl-gen. Do not edit manually.
 
+filegroup {
+    name: "android.hardware.renderscript@1.0_hal",
+    srcs: [
+        "types.hal",
+        "IContext.hal",
+        "IDevice.hal",
+    ],
+}
+
 genrule {
     name: "android.hardware.renderscript@1.0_genc++",
     tools: ["hidl-gen"],
     cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
     srcs: [
-        "types.hal",
-        "IContext.hal",
-        "IDevice.hal",
+        ":android.hardware.renderscript@1.0_hal",
     ],
     out: [
         "android/hardware/renderscript/1.0/types.cpp",
@@ -21,9 +28,7 @@
     tools: ["hidl-gen"],
     cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
     srcs: [
-        "types.hal",
-        "IContext.hal",
-        "IDevice.hal",
+        ":android.hardware.renderscript@1.0_hal",
     ],
     out: [
         "android/hardware/renderscript/1.0/types.h",
@@ -62,114 +67,3 @@
         "android.hidl.base@1.0",
     ],
 }
-
-genrule {
-    name: "android.hardware.renderscript.vts.driver@1.0_genc++",
-    tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
-    srcs: [
-        "types.hal",
-        "IContext.hal",
-        "IDevice.hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/types.vts.cpp",
-        "android/hardware/renderscript/1.0/Context.vts.cpp",
-        "android/hardware/renderscript/1.0/Device.vts.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.renderscript.vts.driver@1.0_genc++_headers",
-    tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
-    srcs: [
-        "types.hal",
-        "IContext.hal",
-        "IDevice.hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/types.vts.h",
-        "android/hardware/renderscript/1.0/Context.vts.h",
-        "android/hardware/renderscript/1.0/Device.vts.h",
-    ],
-}
-
-cc_library_shared {
-    name: "android.hardware.renderscript.vts.driver@1.0",
-    generated_sources: ["android.hardware.renderscript.vts.driver@1.0_genc++"],
-    generated_headers: ["android.hardware.renderscript.vts.driver@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.renderscript.vts.driver@1.0_genc++_headers"],
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
-        "libvts_common",
-        "libvts_datatype",
-        "libvts_measurement",
-        "libvts_multidevice_proto",
-        "libcamera_metadata",
-        "libprotobuf-cpp-full",
-        "android.hidl.base@1.0",
-        "android.hardware.renderscript@1.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hidl.base@1.0",
-    ],
-}
-
-genrule {
-    name: "android.hardware.renderscript@1.0-vts.profiler_genc++",
-    tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
-    srcs: [
-        "types.hal",
-        "IContext.hal",
-        "IDevice.hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/types.vts.cpp",
-        "android/hardware/renderscript/1.0/Context.vts.cpp",
-        "android/hardware/renderscript/1.0/Device.vts.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.renderscript@1.0-vts.profiler_genc++_headers",
-    tools: ["hidl-gen", "vtsc"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
-    srcs: [
-        "types.hal",
-        "IContext.hal",
-        "IDevice.hal",
-    ],
-    out: [
-        "android/hardware/renderscript/1.0/types.vts.h",
-        "android/hardware/renderscript/1.0/Context.vts.h",
-        "android/hardware/renderscript/1.0/Device.vts.h",
-    ],
-}
-
-cc_library_shared {
-    name: "android.hardware.renderscript@1.0-vts.profiler",
-    generated_sources: ["android.hardware.renderscript@1.0-vts.profiler_genc++"],
-    generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
-    export_generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
-    shared_libs: [
-        "libbase",
-        "libhidlbase",
-        "libhidltransport",
-        "libvts_profiling",
-        "libvts_multidevice_proto",
-        "libprotobuf-cpp-full",
-        "android.hidl.base@1.0",
-        "android.hardware.renderscript@1.0",
-    ],
-}
diff --git a/renderscript/1.0/Android.mk b/renderscript/1.0/Android.mk
index 3a7babd..5c3a37d 100644
--- a/renderscript/1.0/Android.mk
+++ b/renderscript/1.0/Android.mk
@@ -8,7 +8,7 @@
 LOCAL_MODULE := android.hardware.renderscript@1.0-java-constants
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 
-intermediates := $(local-generated-sources-dir)
+intermediates := $(call local-generated-sources-dir, COMMON)
 
 HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
 #
diff --git a/renderscript/1.0/default/Android.bp b/renderscript/1.0/default/Android.bp
index 348f6af..29b781e 100644
--- a/renderscript/1.0/default/Android.bp
+++ b/renderscript/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.renderscript@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: [
@@ -14,7 +15,6 @@
         "liblog",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libutils",
         "android.hardware.renderscript@1.0",
         "android.hidl.base@1.0",
diff --git a/renderscript/1.0/default/Context.cpp b/renderscript/1.0/default/Context.cpp
index 4e0964e..ef17b463 100644
--- a/renderscript/1.0/default/Context.cpp
+++ b/renderscript/1.0/default/Context.cpp
@@ -711,7 +711,7 @@
     RsScript _vs = hidl_to_rs<RsScript>(vs);
     uint32_t _slot = slot;
     size_t _len = static_cast<size_t>(len);
-    std::vector<uint8_t> _data(static_cast<size_t>(len));
+    std::vector<uint8_t> _data(_len);
     Device::getHal().ScriptGetVarV(mContext, _vs, _slot, _data.data(), _data.size());
     hidl_vec<uint8_t> data = _data;
     _hidl_cb(data);
diff --git a/sensors/1.0/default/Android.bp b/sensors/1.0/default/Android.bp
index 3930504..2ab1b90 100644
--- a/sensors/1.0/default/Android.bp
+++ b/sensors/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.sensors@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Sensors.cpp"],
@@ -7,7 +8,6 @@
         "liblog",
         "libcutils",
         "libhardware",
-        "libhwbinder",
         "libbase",
         "libutils",
         "libhidlbase",
@@ -23,13 +23,13 @@
 
 cc_library_static {
     name: "android.hardware.sensors@1.0-convert",
+    defaults: ["hidl_defaults"],
     srcs: ["convert.cpp"],
     export_include_dirs: ["include"],
     shared_libs: [
         "liblog",
         "libcutils",
         "libhardware",
-        "libhwbinder",
         "libbase",
         "libutils",
         "libhidlbase",
diff --git a/sensors/1.0/default/Android.mk b/sensors/1.0/default/Android.mk
index 6a1aab4..bc1cfbd 100644
--- a/sensors/1.0/default/Android.mk
+++ b/sensors/1.0/default/Android.mk
@@ -18,7 +18,6 @@
         libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-        libhwbinder \
         libhidlbase \
         libhidltransport \
         android.hardware.sensors@1.0 \
diff --git a/sensors/1.0/default/Sensors.cpp b/sensors/1.0/default/Sensors.cpp
index 41eb945..2457310 100644
--- a/sensors/1.0/default/Sensors.cpp
+++ b/sensors/1.0/default/Sensors.cpp
@@ -145,22 +145,42 @@
 }
 
 Return<void> Sensors::poll(int32_t maxCount, poll_cb _hidl_cb) {
+
     hidl_vec<Event> out;
     hidl_vec<SensorInfo> dynamicSensorsAdded;
 
-    if (maxCount <= 0) {
-        _hidl_cb(Result::BAD_VALUE, out, dynamicSensorsAdded);
-        return Void();
+    std::unique_ptr<sensors_event_t[]> data;
+    int err = android::NO_ERROR;
+
+    { // scope of reentry lock
+
+        // This enforces a single client, meaning that a maximum of one client can call poll().
+        // If this function is re-entred, it means that we are stuck in a state that may prevent
+        // the system from proceeding normally.
+        //
+        // Exit and let the system restart the sensor-hal-implementation hidl service.
+        //
+        // This function must not call _hidl_cb(...) or return until there is no risk of blocking.
+        std::unique_lock<std::mutex> lock(mPollLock, std::try_to_lock);
+        if(!lock.owns_lock()){
+            // cannot get the lock, hidl service will go into deadlock if it is not restarted.
+            // This is guaranteed to not trigger in passthrough mode.
+            LOG(ERROR) <<
+                    "ISensors::poll() re-entry. I do not know what to do except killing myself.";
+            ::exit(-1);
+        }
+
+        if (maxCount <= 0) {
+            err = android::BAD_VALUE;
+        } else {
+            int bufferSize = maxCount <= kPollMaxBufferSize ? maxCount : kPollMaxBufferSize;
+            data.reset(new sensors_event_t[bufferSize]);
+            err = mSensorDevice->poll(
+                    reinterpret_cast<sensors_poll_device_t *>(mSensorDevice),
+                    data.get(), bufferSize);
+        }
     }
 
-    int bufferSize = maxCount <= kPollMaxBufferSize ? maxCount : kPollMaxBufferSize;
-
-    std::unique_ptr<sensors_event_t[]> data(new sensors_event_t[bufferSize]);
-
-    int err = mSensorDevice->poll(
-            reinterpret_cast<sensors_poll_device_t *>(mSensorDevice),
-            data.get(), bufferSize);
-
     if (err < 0) {
         _hidl_cb(ResultFromStatus(err), out, dynamicSensorsAdded);
         return Void();
diff --git a/sensors/1.0/default/Sensors.h b/sensors/1.0/default/Sensors.h
index 09729d3..7d715e0 100644
--- a/sensors/1.0/default/Sensors.h
+++ b/sensors/1.0/default/Sensors.h
@@ -20,6 +20,7 @@
 
 #include <android/hardware/sensors/1.0/ISensors.h>
 #include <hardware/sensors.h>
+#include <mutex>
 
 namespace android {
 namespace hardware {
@@ -65,6 +66,7 @@
     status_t mInitCheck;
     sensors_module_t *mSensorModule;
     sensors_poll_device_1_t *mSensorDevice;
+    std::mutex mPollLock;
 
     int getHalDeviceVersion() const;
 
diff --git a/sensors/1.0/default/convert.cpp b/sensors/1.0/default/convert.cpp
index 748a963..306d3a3 100644
--- a/sensors/1.0/default/convert.cpp
+++ b/sensors/1.0/default/convert.cpp
@@ -25,8 +25,8 @@
 namespace implementation {
 
 void convertFromSensor(const sensor_t &src, SensorInfo *dst) {
-    dst->name = src.name == nullptr ? "" : src.name;
-    dst->vendor = src.vendor == nullptr ? "" : src.vendor;
+    dst->name = src.name;
+    dst->vendor = src.vendor;
     dst->version = src.version;
     dst->sensorHandle = src.handle;
     dst->type = (SensorType)src.type;
@@ -36,8 +36,8 @@
     dst->minDelay = src.minDelay;
     dst->fifoReservedEventCount = src.fifoReservedEventCount;
     dst->fifoMaxEventCount = src.fifoMaxEventCount;
-    dst->typeAsString = src.stringType == nullptr ? "" : src.stringType;
-    dst->requiredPermission = src.requiredPermission == nullptr ? "" : src.requiredPermission;
+    dst->typeAsString = src.stringType;
+    dst->requiredPermission = src.requiredPermission;
     dst->maxDelay = src.maxDelay;
     dst->flags = src.flags;
 }
diff --git a/sensors/1.0/vts/Sensors.vts b/sensors/1.0/vts/Sensors.vts
deleted file mode 100644
index 558c36d..0000000
--- a/sensors/1.0/vts/Sensors.vts
+++ /dev/null
@@ -1,172 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISensors"
-
-package: "android.hardware.sensors"
-
-import: "android.hardware.sensors@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getSensorsList"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::sensors::V1_0::SensorInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "setOperationMode"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::OperationMode"
-        }
-    }
-
-    api: {
-        name: "activate"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "poll"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::sensors::V1_0::Event"
-            }
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::sensors::V1_0::SensorInfo"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "batch"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int64_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int64_t"
-        }
-    }
-
-    api: {
-        name: "flush"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "injectSensorData"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::sensors::V1_0::Event"
-        }
-    }
-
-    api: {
-        name: "registerDirectChannel"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::sensors::V1_0::SharedMemInfo"
-        }
-    }
-
-    api: {
-        name: "unregisterDirectChannel"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "configDirectReport"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::Result"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::RateLevel"
-        }
-    }
-
-}
diff --git a/sensors/1.0/vts/functional/Android.bp b/sensors/1.0/vts/functional/Android.bp
index 9ca6230..af149ba 100644
--- a/sensors/1.0/vts/functional/Android.bp
+++ b/sensors/1.0/vts/functional/Android.bp
@@ -15,9 +15,9 @@
 //
 
 cc_test {
-    name: "sensors_hidl_hal_test",
-    gtest: true,
-    srcs: ["sensors_hidl_hal_test.cpp"],
+    name: "VtsHalSensorsV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalSensorsV1_0TargetTest.cpp"],
     shared_libs: [
         "android.hardware.sensors@1.0",
         "libcutils",
@@ -25,7 +25,7 @@
         "liblog",
         "libutils",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
similarity index 98%
rename from sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
rename to sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
index 9a71745..1298e16 100644
--- a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
+++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
@@ -20,7 +20,7 @@
 #include <android/hardware/sensors/1.0/types.h>
 #include <android/log.h>
 #include <cutils/ashmem.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <hardware/sensors.h>       // for sensor type strings
 
 #include <algorithm>
@@ -80,7 +80,7 @@
 };
 
 void SensorsHidlEnvironment::SetUp() {
-  sensors = ISensors::getService();
+  sensors = ::testing::VtsHalHidlTargetTestBase::getService<ISensors>();
   ALOGI_IF(sensors, "sensors is not nullptr, %p", sensors.get());
   ASSERT_NE(sensors, nullptr);
 
@@ -213,7 +213,7 @@
     int32_t type = *reinterpret_cast<int32_t *>(mBuffer + offset + kOffsetType);
     int64_t timestamp = *reinterpret_cast<int64_t *>(mBuffer + offset + kOffsetTimestamp);
 
-    ALOGV("offset = %zu, cnt %" PRId32 ", token %" PRId32 ", type %" PRId32 ", timestamp %" PRId64,
+    ALOGV("offset = %zu, cnt %" PRId64 ", token %" PRId32 ", type %" PRId32 ", timestamp %" PRId64,
         offset, atomicCounter, token, type, timestamp);
 
     Event event = {
@@ -309,7 +309,7 @@
 }
 
 // The main test class for SENSORS HIDL HAL.
-class SensorsHidlTest : public ::testing::Test {
+class SensorsHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
   }
@@ -688,7 +688,7 @@
 
   ALOGI("Collected %zu samples", events.size());
 
-  ASSERT_GT(events.size(), 0);
+  ASSERT_GT(events.size(), 0u);
 
   size_t nRealEvent = 0;
   for (auto & e : events) {
@@ -773,7 +773,6 @@
   std::vector<Event> events1, events2;
 
   constexpr int64_t batchingPeriodInNs = 0; // no batching
-  constexpr useconds_t minTimeUs = 5*1000*1000;  // 5 s
   constexpr size_t minNEvent = 50;
   constexpr SensorType type = SensorType::ACCELEROMETER;
 
@@ -826,7 +825,7 @@
       ++ nEvent;
     }
   }
-  ASSERT_GT(nEvent, 2);
+  ASSERT_GT(nEvent, 2u);
   minDelayAverageInterval = timestampInterval / (nEvent - 1);
 
   nEvent = 0;
@@ -842,7 +841,7 @@
       ++ nEvent;
     }
   }
-  ASSERT_GT(nEvent, 2);
+  ASSERT_GT(nEvent, 2u);
   maxDelayAverageInterval = timestampInterval / (nEvent - 1);
 
   // change of rate is significant.
@@ -859,8 +858,6 @@
   std::vector<Event> events;
 
   constexpr int64_t oneSecondInNs = 1ull * 1000 * 1000 * 1000;
-  constexpr useconds_t minTimeUs = 5*1000*1000;  // 5 s
-  constexpr size_t minNEvent = 50;
   constexpr SensorType type = SensorType::ACCELEROMETER;
   constexpr int64_t maxBatchingTestTimeNs = 30ull * 1000 * 1000 * 1000;
 
@@ -974,7 +971,7 @@
   auto events = mem->parseEvents();
 
   // allowed to be 55% of nominal freq (50Hz)
-  ASSERT_GT(events.size(), 50 / 2);
+  ASSERT_GT(events.size(), 50u / 2u);
   ASSERT_LT(events.size(), static_cast<size_t>(110*1.5));
 
   int64_t lastTimestamp = 0;
diff --git a/sensors/1.0/vts/types.vts b/sensors/1.0/vts/types.vts
deleted file mode 100644
index bc87823..0000000
--- a/sensors/1.0/vts/types.vts
+++ /dev/null
@@ -1,901 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.sensors"
-
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::Result"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "PERMISSION_DENIED"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "NO_MEMORY"
-        scalar_value: {
-            int32_t: -12
-        }
-        enumerator: "BAD_VALUE"
-        scalar_value: {
-            int32_t: -22
-        }
-        enumerator: "INVALID_OPERATION"
-        scalar_value: {
-            int32_t: -38
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::OperationMode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "NORMAL"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "DATA_INJECTION"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SensorType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "META_DATA"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "ACCELEROMETER"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "MAGNETIC_FIELD"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "ORIENTATION"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "GYROSCOPE"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "LIGHT"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "PRESSURE"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "TEMPERATURE"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "PROXIMITY"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "GRAVITY"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "LINEAR_ACCELERATION"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "ROTATION_VECTOR"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "RELATIVE_HUMIDITY"
-        scalar_value: {
-            int32_t: 12
-        }
-        enumerator: "AMBIENT_TEMPERATURE"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "MAGNETIC_FIELD_UNCALIBRATED"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "GAME_ROTATION_VECTOR"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "GYROSCOPE_UNCALIBRATED"
-        scalar_value: {
-            int32_t: 16
-        }
-        enumerator: "SIGNIFICANT_MOTION"
-        scalar_value: {
-            int32_t: 17
-        }
-        enumerator: "STEP_DETECTOR"
-        scalar_value: {
-            int32_t: 18
-        }
-        enumerator: "STEP_COUNTER"
-        scalar_value: {
-            int32_t: 19
-        }
-        enumerator: "GEOMAGNETIC_ROTATION_VECTOR"
-        scalar_value: {
-            int32_t: 20
-        }
-        enumerator: "HEART_RATE"
-        scalar_value: {
-            int32_t: 21
-        }
-        enumerator: "TILT_DETECTOR"
-        scalar_value: {
-            int32_t: 22
-        }
-        enumerator: "WAKE_GESTURE"
-        scalar_value: {
-            int32_t: 23
-        }
-        enumerator: "GLANCE_GESTURE"
-        scalar_value: {
-            int32_t: 24
-        }
-        enumerator: "PICK_UP_GESTURE"
-        scalar_value: {
-            int32_t: 25
-        }
-        enumerator: "WRIST_TILT_GESTURE"
-        scalar_value: {
-            int32_t: 26
-        }
-        enumerator: "DEVICE_ORIENTATION"
-        scalar_value: {
-            int32_t: 27
-        }
-        enumerator: "POSE_6DOF"
-        scalar_value: {
-            int32_t: 28
-        }
-        enumerator: "STATIONARY_DETECT"
-        scalar_value: {
-            int32_t: 29
-        }
-        enumerator: "MOTION_DETECT"
-        scalar_value: {
-            int32_t: 30
-        }
-        enumerator: "HEART_BEAT"
-        scalar_value: {
-            int32_t: 31
-        }
-        enumerator: "DYNAMIC_SENSOR_META"
-        scalar_value: {
-            int32_t: 32
-        }
-        enumerator: "ADDITIONAL_INFO"
-        scalar_value: {
-            int32_t: 33
-        }
-        enumerator: "LOW_LATENCY_OFFBODY_DETECT"
-        scalar_value: {
-            int32_t: 34
-        }
-        enumerator: "ACCELEROMETER_UNCALIBRATED"
-        scalar_value: {
-            int32_t: 35
-        }
-        enumerator: "DEVICE_PRIVATE_BASE"
-        scalar_value: {
-            int32_t: 65536
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SensorFlagBits"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "WAKE_UP"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "CONTINUOUS_MODE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "ON_CHANGE_MODE"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "ONE_SHOT_MODE"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "SPECIAL_REPORTING_MODE"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "DATA_INJECTION"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "DYNAMIC_SENSOR"
-        scalar_value: {
-            uint32_t: 32
-        }
-        enumerator: "ADDITIONAL_INFO"
-        scalar_value: {
-            uint32_t: 64
-        }
-        enumerator: "DIRECT_CHANNEL_ASHMEM"
-        scalar_value: {
-            uint32_t: 1024
-        }
-        enumerator: "DIRECT_CHANNEL_GRALLOC"
-        scalar_value: {
-            uint32_t: 2048
-        }
-        enumerator: "MASK_REPORTING_MODE"
-        scalar_value: {
-            uint32_t: 14
-        }
-        enumerator: "MASK_DIRECT_REPORT"
-        scalar_value: {
-            uint32_t: 896
-        }
-        enumerator: "MASK_DIRECT_CHANNEL"
-        scalar_value: {
-            uint32_t: 3072
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SensorFlagShift"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint8_t"
-
-        enumerator: "REPORTING_MODE"
-        scalar_value: {
-            uint8_t: 1
-        }
-        enumerator: "DATA_INJECTION"
-        scalar_value: {
-            uint8_t: 4
-        }
-        enumerator: "DYNAMIC_SENSOR"
-        scalar_value: {
-            uint8_t: 5
-        }
-        enumerator: "ADDITIONAL_INFO"
-        scalar_value: {
-            uint8_t: 6
-        }
-        enumerator: "DIRECT_REPORT"
-        scalar_value: {
-            uint8_t: 7
-        }
-        enumerator: "DIRECT_CHANNEL"
-        scalar_value: {
-            uint8_t: 10
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SensorInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sensorHandle"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "vendor"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "version"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::SensorType"
-    }
-    struct_value: {
-        name: "typeAsString"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "maxRange"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "resolution"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "power"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "minDelay"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "fifoReservedEventCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "fifoMaxEventCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "requiredPermission"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "maxDelay"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "flags"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::sensors::V1_0::SensorFlagBits"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SensorStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int8_t"
-
-        enumerator: "NO_CONTACT"
-        scalar_value: {
-            int8_t: -1
-        }
-        enumerator: "UNRELIABLE"
-        scalar_value: {
-            int8_t: 0
-        }
-        enumerator: "ACCURACY_LOW"
-        scalar_value: {
-            int8_t: 1
-        }
-        enumerator: "ACCURACY_MEDIUM"
-        scalar_value: {
-            int8_t: 2
-        }
-        enumerator: "ACCURACY_HIGH"
-        scalar_value: {
-            int8_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::Vec3"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "x"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "y"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "z"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::SensorStatus"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::Vec4"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "x"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "y"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "z"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "w"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::Uncal"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "x"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "y"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "z"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "x_bias"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "y_bias"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "z_bias"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::HeartRate"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "bpm"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::SensorStatus"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::MetaDataEventType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "META_DATA_FLUSH_COMPLETE"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::MetaData"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "what"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::MetaDataEventType"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::DynamicSensorInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "connected"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "sensorHandle"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "uuid"
-        type: TYPE_ARRAY
-        vector_size: 16
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::AdditionalInfoType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "AINFO_BEGIN"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "AINFO_END"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "AINFO_UNTRACKED_DELAY"
-        scalar_value: {
-            uint32_t: 65536
-        }
-        enumerator: "AINFO_INTERNAL_TEMPERATURE"
-        scalar_value: {
-            uint32_t: 65537
-        }
-        enumerator: "AINFO_VEC3_CALIBRATION"
-        scalar_value: {
-            uint32_t: 65538
-        }
-        enumerator: "AINFO_SENSOR_PLACEMENT"
-        scalar_value: {
-            uint32_t: 65539
-        }
-        enumerator: "AINFO_SAMPLING"
-        scalar_value: {
-            uint32_t: 65540
-        }
-        enumerator: "AINFO_CHANNEL_NOISE"
-        scalar_value: {
-            uint32_t: 131072
-        }
-        enumerator: "AINFO_CHANNEL_SAMPLER"
-        scalar_value: {
-            uint32_t: 131073
-        }
-        enumerator: "AINFO_CHANNEL_FILTER"
-        scalar_value: {
-            uint32_t: 131074
-        }
-        enumerator: "AINFO_CHANNEL_LINEAR_TRANSFORM"
-        scalar_value: {
-            uint32_t: 131075
-        }
-        enumerator: "AINFO_CHANNEL_NONLINEAR_MAP"
-        scalar_value: {
-            uint32_t: 131076
-        }
-        enumerator: "AINFO_CHANNEL_RESAMPLER"
-        scalar_value: {
-            uint32_t: 131077
-        }
-        enumerator: "AINFO_LOCAL_GEOMAGNETIC_FIELD"
-        scalar_value: {
-            uint32_t: 196608
-        }
-        enumerator: "AINFO_LOCAL_GRAVITY"
-        scalar_value: {
-            uint32_t: 196609
-        }
-        enumerator: "AINFO_DOCK_STATE"
-        scalar_value: {
-            uint32_t: 196610
-        }
-        enumerator: "AINFO_HIGH_PERFORMANCE_MODE"
-        scalar_value: {
-            uint32_t: 196611
-        }
-        enumerator: "AINFO_MAGNETIC_FIELD_CALIBRATION"
-        scalar_value: {
-            uint32_t: 196612
-        }
-        enumerator: "AINFO_CUSTOM_START"
-        scalar_value: {
-            uint32_t: 268435456
-        }
-        enumerator: "AINFO_DEBUGGING_START"
-        scalar_value: {
-            uint32_t: 1073741824
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::AdditionalInfo"
-    type: TYPE_STRUCT
-    sub_struct: {
-        name: "::android::hardware::sensors::V1_0::AdditionalInfo::Payload"
-        type: TYPE_UNION
-        union_value: {
-            name: "data_int32"
-            type: TYPE_ARRAY
-            vector_size: 14
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int32_t"
-            }
-        }
-        union_value: {
-            name: "data_float"
-            type: TYPE_ARRAY
-            vector_size: 14
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "float_t"
-            }
-        }
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfoType"
-    }
-    struct_value: {
-        name: "serial"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "u"
-        type: TYPE_UNION
-        predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfo::Payload"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::EventPayload"
-    type: TYPE_UNION
-    union_value: {
-        name: "vec3"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::sensors::V1_0::Vec3"
-    }
-    union_value: {
-        name: "vec4"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::sensors::V1_0::Vec4"
-    }
-    union_value: {
-        name: "uncal"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::sensors::V1_0::Uncal"
-    }
-    union_value: {
-        name: "meta"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::sensors::V1_0::MetaData"
-    }
-    union_value: {
-        name: "scalar"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    union_value: {
-        name: "stepCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    union_value: {
-        name: "heartRate"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::sensors::V1_0::HeartRate"
-    }
-    union_value: {
-        name: "pose6DOF"
-        type: TYPE_ARRAY
-        vector_size: 15
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-    }
-    union_value: {
-        name: "dynamic"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::sensors::V1_0::DynamicSensorInfo"
-    }
-    union_value: {
-        name: "additional"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfo"
-    }
-    union_value: {
-        name: "data"
-        type: TYPE_ARRAY
-        vector_size: 16
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::Event"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "timestamp"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "sensorHandle"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "sensorType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::SensorType"
-    }
-    struct_value: {
-        name: "u"
-        type: TYPE_UNION
-        predefined_type: "::android::hardware::sensors::V1_0::EventPayload"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::RateLevel"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "STOP"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "NORMAL"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "FAST"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "VERY_FAST"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SharedMemType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "ASHMEM"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "GRALLOC"
-        scalar_value: {
-            int32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SharedMemFormat"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SENSORS_EVENT"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SensorsEventFormatOffset"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint16_t"
-
-        enumerator: "SIZE_FIELD"
-        scalar_value: {
-            uint16_t: 0
-        }
-        enumerator: "REPORT_TOKEN"
-        scalar_value: {
-            uint16_t: 4
-        }
-        enumerator: "SENSOR_TYPE"
-        scalar_value: {
-            uint16_t: 8
-        }
-        enumerator: "ATOMIC_COUNTER"
-        scalar_value: {
-            uint16_t: 12
-        }
-        enumerator: "TIMESTAMP"
-        scalar_value: {
-            uint16_t: 16
-        }
-        enumerator: "DATA"
-        scalar_value: {
-            uint16_t: 24
-        }
-        enumerator: "RESERVED"
-        scalar_value: {
-            uint16_t: 88
-        }
-        enumerator: "TOTAL_LENGTH"
-        scalar_value: {
-            uint16_t: 104
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::sensors::V1_0::SharedMemInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::SharedMemType"
-    }
-    struct_value: {
-        name: "format"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::sensors::V1_0::SharedMemFormat"
-    }
-    struct_value: {
-        name: "size"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "memoryHandle"
-        type: TYPE_HANDLE
-    }
-}
-
diff --git a/soundtrigger/2.0/default/Android.mk b/soundtrigger/2.0/default/Android.mk
index 70c78e0..068c6b4 100644
--- a/soundtrigger/2.0/default/Android.mk
+++ b/soundtrigger/2.0/default/Android.mk
@@ -27,7 +27,6 @@
         libhidlbase \
         libhidltransport \
         liblog \
-        libhwbinder \
         libutils \
         libhardware \
         android.hardware.soundtrigger@2.0 \
diff --git a/soundtrigger/2.0/default/SoundTriggerHalImpl.h b/soundtrigger/2.0/default/SoundTriggerHalImpl.h
index 4e0d01d..8aa9285 100644
--- a/soundtrigger/2.0/default/SoundTriggerHalImpl.h
+++ b/soundtrigger/2.0/default/SoundTriggerHalImpl.h
@@ -20,6 +20,7 @@
 #include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
 #include <android/hardware/soundtrigger/2.0/ISoundTriggerHwCallback.h>
 #include <hidl/Status.h>
+#include <stdatomic.h>
 #include <utils/threads.h>
 #include <utils/KeyedVector.h>
 #include <system/sound_trigger.h>
diff --git a/soundtrigger/2.0/vts/functional/Android.bp b/soundtrigger/2.0/vts/functional/Android.bp
index 8abdf06..8f0cc4e 100644
--- a/soundtrigger/2.0/vts/functional/Android.bp
+++ b/soundtrigger/2.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "soundtrigger_hidl_hal_test",
-    gtest: true,
-    srcs: ["soundtrigger_hidl_hal_test.cpp"],
+    name: "VtsHalSoundtriggerV2_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalSoundtriggerV2_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.soundtrigger@2.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp b/soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp
similarity index 65%
rename from soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp
rename to soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp
index cb00ad5..0ef4063 100644
--- a/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp
+++ b/soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp
@@ -15,6 +15,12 @@
  */
 
 #define LOG_TAG "SoundTriggerHidlHalTest"
+#include <stdlib.h>
+#include <time.h>
+
+#include <condition_variable>
+#include <mutex>
+
 #include <android/log.h>
 #include <cutils/native_handle.h>
 
@@ -22,7 +28,9 @@
 #include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
 #include <android/hardware/soundtrigger/2.0/types.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
+
+#define SHORT_TIMEOUT_PERIOD (1)
 
 using ::android::hardware::audio::common::V2_0::AudioDevice;
 using ::android::hardware::soundtrigger::V2_0::SoundModelHandle;
@@ -36,43 +44,101 @@
 using ::android::hardware::Void;
 using ::android::sp;
 
+/**
+ * Test code uses this class to wait for notification from callback.
+ */
+class Monitor {
+ public:
+  Monitor() : mCount(0) {}
+
+  /**
+   * Adds 1 to the internal counter and unblocks one of the waiting threads.
+   */
+  void notify() {
+    std::unique_lock<std::mutex> lock(mMtx);
+    mCount++;
+    mCv.notify_one();
+  }
+
+  /**
+   * Blocks until the internal counter becomes greater than 0.
+   *
+   * If notified, this method decreases the counter by 1 and returns true.
+   * If timeout, returns false.
+   */
+  bool wait(int timeoutSeconds) {
+    std::unique_lock<std::mutex> lock(mMtx);
+    auto deadline = std::chrono::system_clock::now() +
+        std::chrono::seconds(timeoutSeconds);
+    while (mCount == 0) {
+      if (mCv.wait_until(lock, deadline) == std::cv_status::timeout) {
+        return false;
+      }
+    }
+    mCount--;
+    return true;
+  }
+
+ private:
+  std::mutex mMtx;
+  std::condition_variable mCv;
+  int mCount;
+};
+
 // The main test class for Sound Trigger HIDL HAL.
-class SoundTriggerHidlTest : public ::testing::Test {
+class SoundTriggerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    mSoundTriggerHal = ISoundTriggerHw::getService("sound_trigger.primary");
+    mSoundTriggerHal = ::testing::VtsHalHidlTargetTestBase::getService<ISoundTriggerHw>("sound_trigger.primary");
     ASSERT_NE(nullptr, mSoundTriggerHal.get());
-    mCallback = new MyCallback();
+    mCallback = new SoundTriggerHwCallback(*this);
     ASSERT_NE(nullptr, mCallback.get());
   }
 
-  class MyCallback : public ISoundTriggerHwCallback {
-      virtual Return<void> recognitionCallback(
-                  const ISoundTriggerHwCallback::RecognitionEvent& event __unused,
-                  int32_t cookie __unused) {
-          ALOGI("%s", __FUNCTION__);
-          return Void();
-      }
+  static void SetUpTestCase() {
+    srand(time(nullptr));
+  }
 
-      virtual Return<void> phraseRecognitionCallback(
-              const ISoundTriggerHwCallback::PhraseRecognitionEvent& event __unused,
-              int32_t cookie __unused) {
-          ALOGI("%s", __FUNCTION__);
-          return Void();
-      }
+  class SoundTriggerHwCallback : public ISoundTriggerHwCallback {
+   private:
+    SoundTriggerHidlTest& mParent;
 
-      virtual Return<void> soundModelCallback(
-              const ISoundTriggerHwCallback::ModelEvent& event __unused,
-              int32_t cookie __unused) {
-          ALOGI("%s", __FUNCTION__);
-          return Void();
-      }
+   public:
+    SoundTriggerHwCallback(SoundTriggerHidlTest& parent) : mParent(parent) {}
+
+    virtual Return<void> recognitionCallback(
+        const ISoundTriggerHwCallback::RecognitionEvent& event __unused,
+        int32_t cookie __unused) {
+      ALOGI("%s", __FUNCTION__);
+      return Void();
+    }
+
+    virtual Return<void> phraseRecognitionCallback(
+        const ISoundTriggerHwCallback::PhraseRecognitionEvent& event __unused,
+        int32_t cookie __unused) {
+      ALOGI("%s", __FUNCTION__);
+      return Void();
+    }
+
+    virtual Return<void> soundModelCallback(
+        const ISoundTriggerHwCallback::ModelEvent& event,
+        int32_t cookie __unused) {
+      ALOGI("%s", __FUNCTION__);
+      mParent.lastModelEvent = event;
+      mParent.monitor.notify();
+      return Void();
+    }
   };
 
   virtual void TearDown() override {}
 
+  Monitor monitor;
+  // updated by soundModelCallback()
+  ISoundTriggerHwCallback::ModelEvent lastModelEvent;
+
+ protected:
   sp<ISoundTriggerHw> mSoundTriggerHal;
-  sp<MyCallback> mCallback;
+  sp<SoundTriggerHwCallback> mCallback;
 };
 
 // A class for test environment setup (kept since this file is a template).
@@ -137,6 +203,36 @@
 
   EXPECT_TRUE(hidlReturn.isOk());
   EXPECT_NE(0, ret);
+  EXPECT_FALSE(monitor.wait(SHORT_TIMEOUT_PERIOD));
+}
+
+/**
+ * Test ISoundTriggerHw::loadSoundModel() method
+ *
+ * Verifies that:
+ *  - the implementation returns error when passed a sound model with random data.
+ */
+TEST_F(SoundTriggerHidlTest, LoadGenericSoundModelFail) {
+  int ret = -ENODEV;
+  ISoundTriggerHw::SoundModel model;
+  SoundModelHandle handle = 0;
+
+  model.type = SoundModelType::GENERIC;
+  model.data.resize(100);
+  for (auto& d : model.data) {
+    d = rand();
+  }
+
+  Return<void> loadReturn = mSoundTriggerHal->loadSoundModel(
+      model,
+      mCallback, 0, [&](int32_t retval, auto res) {
+    ret = retval;
+    handle = res;
+  });
+
+  EXPECT_TRUE(loadReturn.isOk());
+  EXPECT_NE(0, ret);
+  EXPECT_FALSE(monitor.wait(SHORT_TIMEOUT_PERIOD));
 }
 
 /**
@@ -214,7 +310,6 @@
  */
 TEST_F(SoundTriggerHidlTest, stopAllRecognitions) {
     Return<int32_t> hidlReturn(0);
-    SoundModelHandle handle = 0;
 
     hidlReturn = mSoundTriggerHal->stopAllRecognitions();
 
diff --git a/tests/Android.bp b/tests/Android.bp
index 040a6fb..6606d94 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -3,6 +3,7 @@
     "bar/1.0",
     "bar/1.0/default",
     "baz/1.0",
+    "baz/1.0/default",
     "expression/1.0",
     "extension/light/2.0",
     "foo/1.0",
@@ -15,6 +16,7 @@
     "memory/1.0",
     "memory/1.0/default",
     "msgq/1.0",
+    "msgq/1.0/default",
     "pointer/1.0",
     "pointer/1.0/default",
     "pointer/1.0/default/lib",
diff --git a/tests/bar/1.0/default/Android.bp b/tests/bar/1.0/default/Android.bp
index 2c79357..2a9607b 100644
--- a/tests/bar/1.0/default/Android.bp
+++ b/tests/bar/1.0/default/Android.bp
@@ -2,6 +2,7 @@
 
 cc_library_shared {
     name: "android.hardware.tests.bar@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: [
@@ -14,7 +15,6 @@
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libutils",
         "android.hardware.tests.foo@1.0",
diff --git a/tests/baz/1.0/IBaz.hal b/tests/baz/1.0/IBaz.hal
index 40e4024..e4eb145 100644
--- a/tests/baz/1.0/IBaz.hal
+++ b/tests/baz/1.0/IBaz.hal
@@ -21,6 +21,14 @@
 
 interface IBaz extends IBase {
 
+    enum BitField : uint8_t {
+        V0 = 1 << 0,
+        V1 = 1 << 1,
+        V2 = 1 << 2,
+        V3 = 1 << 3,
+        VALL = V0 | V1 | V2 | V3,
+    };
+
     enum SomeOtherEnum : uint8_t {
         bar = 66
     };
@@ -45,6 +53,21 @@
         vec<T> matrices;
     };
 
+    struct Quux {
+        string first;
+        string last;
+    };
+    struct Everything {
+        int8_t number;
+        int32_t anotherNumber;
+        string s;
+        vec<string> vs;
+        string[2][2] multidimArray;
+        string[3] sArray;
+        Quux anotherStruct;
+        bitfield<BitField> bf;
+    };
+
     @Fragile @NoReally(very="yes", array={"a","b","c"})
     oneway doThis(float param);
 
diff --git a/tests/baz/1.0/default/Android.bp b/tests/baz/1.0/default/Android.bp
new file mode 100644
index 0000000..794cdf5
--- /dev/null
+++ b/tests/baz/1.0/default/Android.bp
@@ -0,0 +1,17 @@
+cc_library_shared {
+    name: "android.hardware.tests.baz@1.0-impl",
+    defaults: ["hidl_defaults"],
+    relative_install_path: "hw",
+    proprietary: true,
+    srcs: [
+        "Baz.cpp",
+    ],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.tests.baz@1.0",
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/tests/baz/1.0/default/Baz.cpp b/tests/baz/1.0/default/Baz.cpp
new file mode 100644
index 0000000..6252fbe
--- /dev/null
+++ b/tests/baz/1.0/default/Baz.cpp
@@ -0,0 +1,514 @@
+#include "Baz.h"
+#include <android-base/logging.h>
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace baz {
+namespace V1_0 {
+namespace implementation {
+
+struct BazCallback : public IBazCallback {
+    Return<void> heyItsMe(const sp<IBazCallback> &cb) override;
+    Return<void> hey() override;
+};
+
+Return<void> BazCallback::heyItsMe(
+        const sp<IBazCallback> &cb) {
+    LOG(INFO) << "SERVER: heyItsMe cb = " << cb.get();
+
+    return Void();
+}
+
+Return<void> BazCallback::hey() {
+    LOG(INFO) << "SERVER: hey";
+
+    return Void();
+}
+
+// TODO(b/35703683) : replace usage of below methods with toString()
+
+static std::string to_string(const IBaz::Foo::Bar &bar);
+static std::string to_string(const IBaz::Foo &foo);
+static std::string to_string(const hidl_string &s);
+static std::string to_string(bool x);
+static std::string to_string(const IBaz::StringMatrix5x3 &M);
+
+template<typename T, size_t SIZE>
+static std::string to_string(const hidl_array<T, SIZE> &array);
+
+template<size_t SIZE>
+static std::string to_string(const hidl_array<uint8_t, SIZE> &array);
+
+template<typename T>
+static std::string to_string(const hidl_vec<T> &vec) {
+    std::string out;
+    out = "[";
+    for (size_t i = 0; i < vec.size(); ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+        out += to_string(vec[i]);
+    }
+    out += "]";
+
+    return out;
+}
+
+template<typename T, size_t SIZE>
+static std::string to_string(const hidl_array<T, SIZE> &array) {
+    std::string out;
+    out = "[";
+    for (size_t i = 0; i < SIZE; ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+        out += to_string(array[i]);
+    }
+    out += "]";
+
+    return out;
+}
+
+template<size_t SIZE>
+static std::string to_string(const hidl_array<uint8_t, SIZE> &array) {
+    std::string out;
+    for (size_t i = 0; i < SIZE; ++i) {
+        if (i > 0) {
+            out += ":";
+        }
+
+        char tmp[3];
+        sprintf(tmp, "%02x", array[i]);
+
+        out += tmp;
+    }
+
+    return out;
+}
+
+template<typename T, size_t SIZE1, size_t SIZE2>
+static std::string to_string(const hidl_array<T, SIZE1, SIZE2> &array) {
+    std::string out;
+    out = "[";
+    for (size_t i = 0; i < SIZE1; ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+
+        out += "[";
+        for (size_t j = 0; j < SIZE2; ++j) {
+            if (j > 0) {
+                out += ", ";
+            }
+
+            out += to_string(array[i][j]);
+        }
+        out += "]";
+    }
+    out += "]";
+
+    return out;
+}
+
+static std::string to_string(bool x) {
+    return x ? "true" : "false";
+}
+
+static std::string to_string(const hidl_string &s) {
+    return std::string("'") + s.c_str() + "'";
+}
+
+static std::string to_string(const IBaz::Foo::Bar &bar) {
+    std::string out;
+    out = "Bar(";
+    out += "z = " + to_string(bar.z) + ", ";
+    out += "s = '" + std::string(bar.s.c_str()) + "'";
+    out += ")";
+
+    return out;
+}
+
+static std::string to_string(const IBaz::Foo &foo) {
+    std::string out;
+    out = "Foo(";
+    out += "x = " + to_string(foo.x) + ", ";
+    out += "y = " + to_string(foo.y) + ", ";
+    out += "aaa = " + to_string(foo.aaa);
+    out += ")";
+
+    return out;
+}
+
+static std::string to_string(const IBaz::StringMatrix5x3 &M) {
+    return to_string(M.s);
+}
+
+static std::string VectorOfArray_to_string(const IBaz::VectorOfArray &in) {
+    std::string out;
+    out += "VectorOfArray(";
+
+    for (size_t i = 0; i < in.addresses.size(); ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+
+        for (size_t j = 0; j < 6; ++j) {
+            if (j > 0) {
+                out += ":";
+            }
+
+            char tmp[3];
+            sprintf(tmp, "%02x", in.addresses[i][j]);
+
+            out += tmp;
+        }
+    }
+
+    out += ")";
+
+    return out;
+}
+
+// Methods from ::android::hardware::tests::baz::V1_0::IBase follow.
+Return<void> Baz::someBaseMethod() {
+    LOG(INFO) << "Baz::someBaseMethod";
+
+    return Void();
+}
+
+Return<bool> Baz::someBoolMethod(bool x) {
+    LOG(INFO) << "Baz::someBoolMethod(" << to_string(x) << ")";
+
+    return !x;
+}
+
+Return<void> Baz::someBoolArrayMethod(const hidl_array<bool, 3>& x,
+                                      someBoolArrayMethod_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someBoolArrayMethod("
+        << to_string(x[0])
+        << ", "
+        << to_string(x[1])
+        << ", "
+        << to_string(x[2])
+        << ")";
+
+    hidl_array<bool, 4> out;
+    out[0] = !x[0];
+    out[1] = !x[1];
+    out[2] = !x[2];
+    out[3] = true;
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::someBoolVectorMethod(const hidl_vec<bool>& x, someBoolVectorMethod_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someBoolVectorMethod(" << to_string(x) << ")";
+
+    hidl_vec<bool> out;
+    out.resize(x.size());
+    for (size_t i = 0; i < x.size(); ++i) {
+        out[i] = !x[i];
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::someOtherBaseMethod(const IBase::Foo& foo, someOtherBaseMethod_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someOtherBaseMethod "
+              << to_string(foo);
+
+    _hidl_cb(foo);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodWithFooArrays(const hidl_array<IBase::Foo, 2>& fooInput,
+                                          someMethodWithFooArrays_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodWithFooArrays "
+              << to_string(fooInput);
+
+    hidl_array<IBaz::Foo, 2> fooOutput;
+    fooOutput[0] = fooInput[1];
+    fooOutput[1] = fooInput[0];
+
+    _hidl_cb(fooOutput);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodWithFooVectors(const hidl_vec<IBase::Foo>& fooInput,
+                                           someMethodWithFooVectors_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodWithFooVectors "
+              << to_string(fooInput);
+
+    hidl_vec<IBaz::Foo> fooOutput;
+    fooOutput.resize(2);
+    fooOutput[0] = fooInput[1];
+    fooOutput[1] = fooInput[0];
+
+    _hidl_cb(fooOutput);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodWithVectorOfArray(const IBase::VectorOfArray& in,
+                                              someMethodWithVectorOfArray_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodWithVectorOfArray "
+              << VectorOfArray_to_string(in);
+
+    IBase::VectorOfArray out;
+
+    const size_t n = in.addresses.size();
+    out.addresses.resize(n);
+
+    for (size_t i = 0; i < n; ++i) {
+        out.addresses[i] = in.addresses[n - 1 - i];
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodTakingAVectorOfArray(const hidl_vec<hidl_array<uint8_t, 6>>& in,
+                                                 someMethodTakingAVectorOfArray_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodTakingAVectorOfArray "
+              << to_string(in);
+
+    const size_t n = in.size();
+
+    hidl_vec<hidl_array<uint8_t, 6> > out;
+    out.resize(n);
+
+    for (size_t i = 0; i < n; ++i) {
+        out[i] = in[n - 1 - i];
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::transpose(const IBase::StringMatrix5x3& in, transpose_cb _hidl_cb) {
+    LOG(INFO) << "Baz::transpose " << to_string(in);
+
+    IBase::StringMatrix3x5 out;
+    for (size_t i = 0; i < 3; ++i) {
+        for (size_t j = 0; j < 5; ++j) {
+            out.s[i][j] = in.s[j][i];
+        }
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::transpose2(const hidl_array<hidl_string, 5, 3>& in, transpose2_cb _hidl_cb) {
+    LOG(INFO) << "Baz::transpose2 " << to_string(in);
+
+    hidl_array<hidl_string, 3, 5> out;
+    for (size_t i = 0; i < 3; ++i) {
+        for (size_t j = 0; j < 5; ++j) {
+            out[i][j] = in[j][i];
+        }
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::takeAMask(IBase::BitField bf,
+                            uint8_t first,
+                            const IBase::MyMask& second,
+                            uint8_t third,
+                            takeAMask_cb _hidl_cb) {
+    _hidl_cb(bf, bf | first, second.value & bf, (bf | bf) & third);
+    return Void();
+}
+
+// Methods from ::android::hardware::tests::baz::V1_0::IBaz follow.
+
+Return<void> Baz::doThis(float param) {
+    LOG(INFO) << "Baz::doThis(" << param << ")";
+
+    return Void();
+}
+
+Return<int32_t> Baz::doThatAndReturnSomething(int64_t param) {
+    LOG(INFO) << "Baz::doThatAndReturnSomething(" << param << ")";
+
+    return 666;
+}
+
+Return<double> Baz::doQuiteABit(int32_t a, int64_t b, float c, double d) {
+    LOG(INFO) << "Baz::doQuiteABit("
+              << a
+              << ", "
+              << b
+              << ", "
+              << c
+              << ", "
+              << d
+              << ")";
+
+    return 666.5;
+}
+
+Return<void> Baz::doSomethingElse(const hidl_array<int32_t, 15>& param,
+                                  doSomethingElse_cb _hidl_cb) {
+    LOG(INFO) << "Baz::doSomethingElse(...)";
+
+    hidl_array<int32_t, 32> result;
+    for (size_t i = 0; i < 15; ++i) {
+        result[i] = 2 * param[i];
+        result[15 + i] = param[i];
+    }
+    result[30] = 1;
+    result[31] = 2;
+
+    _hidl_cb(result);
+
+    return Void();
+}
+
+Return<void> Baz::doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb) {
+    LOG(INFO) << "doStuffAndReturnAString";
+
+    hidl_string s;
+    s = "Hello, world!";
+
+    _hidl_cb(s);
+
+    return Void();
+}
+
+Return<void> Baz::mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb) {
+    LOG(INFO) << "mapThisVector";
+
+    hidl_vec<int32_t> out;
+    out.resize(param.size());
+    for (size_t i = 0; i < param.size(); ++i) {
+        out[i] = param[i] * 2;
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::callMe(const sp<IBazCallback>& cb) {
+    LOG(INFO) << "callMe " << cb.get();
+
+    if (cb != NULL) {
+        sp<IBazCallback> my_cb = new BazCallback;
+        cb->heyItsMe(my_cb);
+    }
+
+    return Void();
+}
+
+Return<void> Baz::callMeLater(const sp<IBazCallback>& cb) {
+    LOG(INFO) << "callMeLater " << cb.get();
+
+    mStoredCallback = cb;
+
+    return Void();
+}
+
+Return<void> Baz::iAmFreeNow() {
+    if (mStoredCallback != nullptr) {
+        mStoredCallback->hey();
+    }
+    return Void();
+}
+
+Return<void> Baz::dieNow() {
+    exit(1);
+    return Void();
+}
+
+Return<IBaz::SomeEnum> Baz::useAnEnum(IBaz::SomeEnum zzz) {
+    LOG(INFO) << "useAnEnum " << (int)zzz;
+
+    return SomeEnum::goober;
+}
+
+Return<void> Baz::haveSomeStrings(const hidl_array<hidl_string, 3>& array,
+                                  haveSomeStrings_cb _hidl_cb) {
+    LOG(INFO) << "haveSomeStrings("
+              << to_string(array)
+              << ")";
+
+    hidl_array<hidl_string, 2> result;
+    result[0] = "Hello";
+    result[1] = "World";
+
+    _hidl_cb(result);
+
+    return Void();
+}
+
+Return<void> Baz::haveAStringVec(const hidl_vec<hidl_string>& vector,
+                                 haveAStringVec_cb _hidl_cb) {
+    LOG(INFO) << "haveAStringVec(" << to_string(vector) << ")";
+
+    hidl_vec<hidl_string> result;
+    result.resize(2);
+
+    result[0] = "Hello";
+    result[1] = "World";
+
+    _hidl_cb(result);
+
+    return Void();
+}
+
+Return<void> Baz::returnABunchOfStrings(returnABunchOfStrings_cb _hidl_cb) {
+    hidl_string eins; eins = "Eins";
+    hidl_string zwei; zwei = "Zwei";
+    hidl_string drei; drei = "Drei";
+    _hidl_cb(eins, zwei, drei);
+
+    return Void();
+}
+
+Return<uint8_t> Baz::returnABitField() {
+    return 0;
+}
+
+Return<uint32_t> Baz::size(uint32_t size) {
+    return size;
+}
+
+Return<void> Baz::getNestedStructs(getNestedStructs_cb _hidl_cb) {
+    int size = 5;
+    hidl_vec<IBaz::NestedStruct> result;
+    result.resize(size);
+    for (int i = 0; i < size; i++) {
+        result[i].a = i;
+        if (i == 1) {
+            result[i].matrices.resize(6);
+        }
+    }
+    _hidl_cb(result);
+    return Void();
+}
+// Methods from ::android::hidl::base::V1_0::IBase follow.
+
+IBaz* HIDL_FETCH_IBaz(const char* /* name */) {
+    return new Baz();
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace baz
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
diff --git a/tests/baz/1.0/default/Baz.h b/tests/baz/1.0/default/Baz.h
new file mode 100644
index 0000000..ceb3035
--- /dev/null
+++ b/tests/baz/1.0/default/Baz.h
@@ -0,0 +1,92 @@
+#ifndef ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
+#define ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
+
+#include <android/hardware/tests/baz/1.0/IBaz.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace baz {
+namespace V1_0 {
+namespace implementation {
+
+// using ::android::hardware::tests::baz::V1_0::IBase;
+using ::android::hardware::tests::baz::V1_0::IBaz;
+using ::android::hardware::tests::baz::V1_0::IBazCallback;
+using ::android::hidl::base::V1_0::DebugInfo;
+using ::android::hidl::base::V1_0::IBase;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+struct Baz : public IBaz {
+    // Methods from ::android::hardware::tests::baz::V1_0::IBase follow.
+    Return<void> someBaseMethod() override;
+    Return<bool> someBoolMethod(bool x) override;
+    Return<void> someBoolArrayMethod(const hidl_array<bool, 3>& x,
+                                     someBoolArrayMethod_cb _hidl_cb) override;
+    Return<void> someBoolVectorMethod(const hidl_vec<bool>& x,
+                                      someBoolVectorMethod_cb _hidl_cb) override;
+    Return<void> someOtherBaseMethod(const IBase::Foo& foo,
+                                     someOtherBaseMethod_cb _hidl_cb) override;
+    Return<void> someMethodWithFooArrays(const hidl_array<IBase::Foo, 2>& fooInput,
+                                         someMethodWithFooArrays_cb _hidl_cb) override;
+    Return<void> someMethodWithFooVectors(const hidl_vec<IBase::Foo>& fooInput,
+                                          someMethodWithFooVectors_cb _hidl_cb) override;
+    Return<void> someMethodWithVectorOfArray(const IBase::VectorOfArray& in,
+                                             someMethodWithVectorOfArray_cb _hidl_cb) override;
+    Return<void> someMethodTakingAVectorOfArray(const hidl_vec<hidl_array<uint8_t, 6>>& in,
+                                                someMethodTakingAVectorOfArray_cb _hidl_cb) override;
+    Return<void> transpose(const IBase::StringMatrix5x3& in,
+                           transpose_cb _hidl_cb) override;
+    Return<void> transpose2(const hidl_array<hidl_string, 5, 3>& in,
+                            transpose2_cb _hidl_cb) override;
+    Return<void> takeAMask(IBase::BitField bf,
+                           uint8_t first,
+                           const IBase::MyMask& second,
+                           uint8_t third,
+                           takeAMask_cb _hidl_cb) override;
+
+    // Methods from ::android::hardware::tests::baz::V1_0::IBaz follow.
+    Return<void> doThis(float param) override;
+    Return<int32_t> doThatAndReturnSomething(int64_t param) override;
+    Return<double> doQuiteABit(int32_t a, int64_t b, float c, double d) override;
+    Return<void> doSomethingElse(const hidl_array<int32_t, 15>& param,
+                                 doSomethingElse_cb _hidl_cb) override;
+    Return<void> doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb) override;
+    Return<void> mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb) override;
+    Return<void> callMe(const sp<IBazCallback>& cb) override;
+    Return<void> callMeLater(const sp<IBazCallback>& cb) override;
+    Return<void> iAmFreeNow() override;
+    Return<void> dieNow() override;
+    Return<IBaz::SomeEnum> useAnEnum(IBaz::SomeEnum zzz) override;
+    Return<void> haveSomeStrings(const hidl_array<hidl_string, 3>& array,
+                                 haveSomeStrings_cb _hidl_cb) override;
+    Return<void> haveAStringVec(const hidl_vec<hidl_string>& vector,
+                                haveAStringVec_cb _hidl_cb) override;
+    Return<void> returnABunchOfStrings(returnABunchOfStrings_cb _hidl_cb) override;
+    Return<uint8_t> returnABitField() override;
+    Return<uint32_t> size(uint32_t size) override;
+    Return<void> getNestedStructs(getNestedStructs_cb _hidl_cb) override;
+
+    // Methods from ::android::hidl::base::V1_0::IBase follow.
+ private:
+    sp<IBazCallback> mStoredCallback;
+};
+
+extern "C" IBaz* HIDL_FETCH_IBaz(const char* name);
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace baz
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
diff --git a/tests/extension/light/2.0/default/Android.mk b/tests/extension/light/2.0/default/Android.mk
index 4dee3ee..b30d11c 100644
--- a/tests/extension/light/2.0/default/Android.mk
+++ b/tests/extension/light/2.0/default/Android.mk
@@ -12,7 +12,6 @@
 LOCAL_SHARED_LIBRARIES := \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     android.hardware.light@2.0 \
     android.hardware.tests.extension.light@2.0 \
diff --git a/tests/foo/1.0/IFoo.hal b/tests/foo/1.0/IFoo.hal
index 76aefcf..a43b883 100644
--- a/tests/foo/1.0/IFoo.hal
+++ b/tests/foo/1.0/IFoo.hal
@@ -38,6 +38,7 @@
         V1 = 1 << 1,
         V2 = 1 << 2,
         V3 = 1 << 3,
+        VALL = V0 | V1 | V2 | V3,
     };
 
     struct Fumble {
diff --git a/tests/foo/1.0/default/Android.bp b/tests/foo/1.0/default/Android.bp
index f4a80d5..f8acf9d 100644
--- a/tests/foo/1.0/default/Android.bp
+++ b/tests/foo/1.0/default/Android.bp
@@ -2,6 +2,7 @@
 
 cc_library_shared {
     name: "android.hardware.tests.foo@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: [
@@ -14,7 +15,6 @@
         "libhidlbase",
         "libhidltransport",
         "libfootest",
-        "libhwbinder",
         "liblog",
         "libutils",
         "android.hardware.tests.foo@1.0",
diff --git a/tests/foo/1.0/default/lib/Android.bp b/tests/foo/1.0/default/lib/Android.bp
index 7873203..895582c 100644
--- a/tests/foo/1.0/default/lib/Android.bp
+++ b/tests/foo/1.0/default/lib/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "libfootest",
+    defaults: ["hidl_defaults"],
     srcs: [
         "FooHelper.cpp"
     ],
@@ -7,7 +8,6 @@
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "android.hardware.tests.foo@1.0",
     ],
     local_include_dirs: ["include/hidl-test"],
diff --git a/tests/inheritance/1.0/default/Android.bp b/tests/inheritance/1.0/default/Android.bp
index 090c36e..f6ca88a 100644
--- a/tests/inheritance/1.0/default/Android.bp
+++ b/tests/inheritance/1.0/default/Android.bp
@@ -2,6 +2,7 @@
 
 cc_library_shared {
     name: "android.hardware.tests.inheritance@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: [
@@ -14,7 +15,6 @@
         "libbase",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libutils",
         "android.hardware.tests.inheritance@1.0",
diff --git a/tests/libhwbinder/1.0/default/Android.bp b/tests/libhwbinder/1.0/default/Android.bp
index 0edabfc..e690ca5 100644
--- a/tests/libhwbinder/1.0/default/Android.bp
+++ b/tests/libhwbinder/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.tests.libhwbinder@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: [
@@ -10,7 +11,6 @@
         "libbase",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "libutils",
         "android.hardware.tests.libhwbinder@1.0",
diff --git a/tests/memory/1.0/default/Android.bp b/tests/memory/1.0/default/Android.bp
index 14dc08d..e889bd8 100644
--- a/tests/memory/1.0/default/Android.bp
+++ b/tests/memory/1.0/default/Android.bp
@@ -14,6 +14,7 @@
 
 cc_library_shared {
     name: "android.hardware.tests.memory@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: [
@@ -22,7 +23,6 @@
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libhidlmemory",
         "liblog",
         "libutils",
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
index d17efe4..2d42699 100644
--- a/tests/msgq/1.0/Android.bp
+++ b/tests/msgq/1.0/Android.bp
@@ -3,6 +3,7 @@
 filegroup {
     name: "android.hardware.tests.msgq@1.0_hal",
     srcs: [
+        "IBenchmarkMsgQ.hal",
         "ITestMsgQ.hal",
     ],
 }
@@ -15,6 +16,7 @@
         ":android.hardware.tests.msgq@1.0_hal",
     ],
     out: [
+        "android/hardware/tests/msgq/1.0/BenchmarkMsgQAll.cpp",
         "android/hardware/tests/msgq/1.0/TestMsgQAll.cpp",
     ],
 }
@@ -27,6 +29,11 @@
         ":android.hardware.tests.msgq@1.0_hal",
     ],
     out: [
+        "android/hardware/tests/msgq/1.0/IBenchmarkMsgQ.h",
+        "android/hardware/tests/msgq/1.0/IHwBenchmarkMsgQ.h",
+        "android/hardware/tests/msgq/1.0/BnHwBenchmarkMsgQ.h",
+        "android/hardware/tests/msgq/1.0/BpHwBenchmarkMsgQ.h",
+        "android/hardware/tests/msgq/1.0/BsBenchmarkMsgQ.h",
         "android/hardware/tests/msgq/1.0/ITestMsgQ.h",
         "android/hardware/tests/msgq/1.0/IHwTestMsgQ.h",
         "android/hardware/tests/msgq/1.0/BnHwTestMsgQ.h",
diff --git a/benchmarks/msgq/1.0/IBenchmarkMsgQ.hal b/tests/msgq/1.0/IBenchmarkMsgQ.hal
similarity index 98%
rename from benchmarks/msgq/1.0/IBenchmarkMsgQ.hal
rename to tests/msgq/1.0/IBenchmarkMsgQ.hal
index c4b9d95..81754a4 100644
--- a/benchmarks/msgq/1.0/IBenchmarkMsgQ.hal
+++ b/tests/msgq/1.0/IBenchmarkMsgQ.hal
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.benchmarks.msgq@1.0;
+package android.hardware.tests.msgq@1.0;
 
 interface IBenchmarkMsgQ {
     /*
diff --git a/tests/msgq/1.0/default/Android.bp b/tests/msgq/1.0/default/Android.bp
new file mode 100644
index 0000000..692edda
--- /dev/null
+++ b/tests/msgq/1.0/default/Android.bp
@@ -0,0 +1,20 @@
+cc_library_shared {
+    name: "android.hardware.tests.msgq@1.0-impl",
+    defaults: ["hidl_defaults"],
+    relative_install_path: "hw",
+    proprietary: true,
+    srcs: [
+        "TestMsgQ.cpp",
+    ],
+    shared_libs: [
+        "libbase",
+        "libcutils",
+        "libfmq",
+        "libhidlbase",
+        "libhidltransport",
+        "liblog",
+        "libutils",
+        "android.hardware.tests.msgq@1.0",
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/tests/msgq/1.0/default/TestMsgQ.cpp b/tests/msgq/1.0/default/TestMsgQ.cpp
new file mode 100644
index 0000000..7cc4f5b
--- /dev/null
+++ b/tests/msgq/1.0/default/TestMsgQ.cpp
@@ -0,0 +1,135 @@
+#include "TestMsgQ.h"
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace msgq {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow.
+Return<void> TestMsgQ::configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _hidl_cb) {
+    static constexpr size_t kNumElementsInQueue = 1024;
+    mFmqSynchronized.reset(new (std::nothrow) MessageQueueSync(
+            kNumElementsInQueue, true /* configureEventFlagWord */));
+    if ((mFmqSynchronized == nullptr) || (mFmqSynchronized->isValid() == false)) {
+        _hidl_cb(false /* ret */, MessageQueueSync::Descriptor());
+    } else {
+        /*
+         * Initialize the EventFlag word with bit FMQ_NOT_FULL.
+         */
+        auto evFlagWordPtr = mFmqSynchronized->getEventFlagWord();
+        if (evFlagWordPtr != nullptr) {
+            std::atomic_init(evFlagWordPtr,
+                             static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_FULL));
+        }
+        _hidl_cb(true /* ret */, *mFmqSynchronized->getDesc());
+    }
+    return Void();
+}
+
+Return<void> TestMsgQ::getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) {
+    if (configureFmq) {
+        static constexpr size_t kNumElementsInQueue = 1024;
+        mFmqUnsynchronized.reset(new (std::nothrow) MessageQueueUnsync(kNumElementsInQueue));
+    }
+    if ((mFmqUnsynchronized == nullptr) ||
+        (mFmqUnsynchronized->isValid() == false)) {
+        _hidl_cb(false /* ret */, MessageQueueUnsync::Descriptor());
+    } else {
+        _hidl_cb(true /* ret */, *mFmqUnsynchronized->getDesc());
+    }
+    return Void();
+}
+
+Return<bool> TestMsgQ::requestWriteFmqSync(int32_t count) {
+    std::vector<uint16_t> data(count);
+    for (int i = 0; i < count; i++) {
+        data[i] = i;
+    }
+    bool result = mFmqSynchronized->write(&data[0], count);
+    return result;
+}
+
+Return<bool> TestMsgQ::requestReadFmqSync(int32_t count) {
+    std::vector<uint16_t> data(count);
+    bool result = mFmqSynchronized->read(&data[0], count)
+            && verifyData(&data[0], count);
+    return result;
+}
+
+Return<bool> TestMsgQ::requestWriteFmqUnsync(int32_t count) {
+    std::vector<uint16_t> data(count);
+    for (int i = 0; i < count; i++) {
+        data[i] = i;
+    }
+    bool result = mFmqUnsynchronized->write(&data[0], count);
+    return result;
+}
+
+Return<bool> TestMsgQ::requestReadFmqUnsync(int32_t count) {
+    std::vector<uint16_t> data(count);
+    bool result =
+            mFmqUnsynchronized->read(&data[0], count) && verifyData(&data[0], count);
+    return result;
+}
+
+Return<void> TestMsgQ::requestBlockingRead(int32_t count) {
+    std::vector<uint16_t> data(count);
+    bool result = mFmqSynchronized->readBlocking(
+            &data[0],
+            count,
+            static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_FULL),
+            static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_EMPTY),
+            5000000000 /* timeOutNanos */);
+
+    if (result == false) {
+        ALOGE("Blocking read fails");
+    }
+    return Void();
+}
+
+Return<void> TestMsgQ::requestBlockingReadDefaultEventFlagBits(int32_t count) {
+    std::vector<uint16_t> data(count);
+    bool result = mFmqSynchronized->readBlocking(
+            &data[0],
+            count);
+
+    if (result == false) {
+        ALOGE("Blocking read fails");
+    }
+
+    return Void();
+}
+
+Return<void> TestMsgQ::requestBlockingReadRepeat(int32_t count, int32_t numIter) {
+    std::vector<uint16_t> data(count);
+    for (int i = 0; i < numIter; i++) {
+        bool result = mFmqSynchronized->readBlocking(
+                &data[0],
+                count,
+                static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_FULL),
+                static_cast<uint32_t>(ITestMsgQ::EventFlagBits::FMQ_NOT_EMPTY),
+                5000000000 /* timeOutNanos */);
+
+        if (result == false) {
+            ALOGE("Blocking read fails");
+            break;
+        }
+    }
+    return Void();
+}
+
+
+// Methods from ::android::hidl::base::V1_0::IBase follow.
+
+ITestMsgQ* HIDL_FETCH_ITestMsgQ(const char* /* name */) {
+    return new TestMsgQ();
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace msgq
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
diff --git a/tests/msgq/1.0/default/TestMsgQ.h b/tests/msgq/1.0/default/TestMsgQ.h
new file mode 100644
index 0000000..760d931
--- /dev/null
+++ b/tests/msgq/1.0/default/TestMsgQ.h
@@ -0,0 +1,77 @@
+#ifndef ANDROID_HARDWARE_TESTS_MSGQ_V1_0_TESTMSGQ_H
+#define ANDROID_HARDWARE_TESTS_MSGQ_V1_0_TESTMSGQ_H
+
+#include <android/hardware/tests/msgq/1.0/ITestMsgQ.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+#include <fmq/MessageQueue.h>
+#include <fmq/EventFlag.h>
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace msgq {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::tests::msgq::V1_0::ITestMsgQ;
+using ::android::hidl::base::V1_0::DebugInfo;
+using ::android::hidl::base::V1_0::IBase;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+using android::hardware::kSynchronizedReadWrite;
+using android::hardware::kUnsynchronizedWrite;
+using android::hardware::MQDescriptorSync;
+using android::hardware::MQDescriptorUnsync;
+
+using android::hardware::MessageQueue;
+
+struct TestMsgQ : public ITestMsgQ {
+    typedef MessageQueue<uint16_t, kSynchronizedReadWrite> MessageQueueSync;
+    typedef MessageQueue<uint16_t, kUnsynchronizedWrite> MessageQueueUnsync;
+
+    TestMsgQ() : mFmqSynchronized(nullptr), mFmqUnsynchronized(nullptr) {}
+
+    // Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow.
+    Return<void> configureFmqSyncReadWrite(configureFmqSyncReadWrite_cb _hidl_cb) override;
+    Return<void> getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) override;
+    Return<bool> requestWriteFmqSync(int32_t count) override;
+    Return<bool> requestReadFmqSync(int32_t count) override;
+    Return<bool> requestWriteFmqUnsync(int32_t count) override;
+    Return<bool> requestReadFmqUnsync(int32_t count) override;
+    Return<void> requestBlockingRead(int32_t count) override;
+    Return<void> requestBlockingReadDefaultEventFlagBits(int32_t count) override;
+    Return<void> requestBlockingReadRepeat(int32_t count, int32_t numIter) override;
+
+    // Methods from ::android::hidl::base::V1_0::IBase follow.
+private:
+    std::unique_ptr<MessageQueueSync> mFmqSynchronized;
+    std::unique_ptr<MessageQueueUnsync> mFmqUnsynchronized;
+
+    /*
+     * Utility function to verify data read from the fast message queue.
+     */
+    bool verifyData(uint16_t* data, int count) {
+        for (int i = 0; i < count; i++) {
+            if (data[i] != i) return false;
+        }
+        return true;
+    }
+};
+
+extern "C" ITestMsgQ* HIDL_FETCH_ITestMsgQ(const char* name);
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace msgq
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_TESTS_MSGQ_V1_0_TESTMSGQ_H
diff --git a/tests/pointer/1.0/default/Android.bp b/tests/pointer/1.0/default/Android.bp
index ab7f8fa..4615463 100644
--- a/tests/pointer/1.0/default/Android.bp
+++ b/tests/pointer/1.0/default/Android.bp
@@ -2,6 +2,7 @@
 
 cc_library_shared {
     name: "android.hardware.tests.pointer@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     srcs: [
@@ -14,7 +15,6 @@
         "libhidlbase",
         "libhidltransport",
         "libpointertest",
-        "libhwbinder",
         "liblog",
         "libutils",
         "android.hardware.tests.pointer@1.0",
diff --git a/tests/pointer/1.0/default/lib/Android.bp b/tests/pointer/1.0/default/lib/Android.bp
index a7203c7..ae07b04 100644
--- a/tests/pointer/1.0/default/lib/Android.bp
+++ b/tests/pointer/1.0/default/lib/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "libpointertest",
+    defaults: ["hidl_defaults"],
     srcs: [
         "PointerHelper.cpp"
     ],
@@ -8,7 +9,6 @@
         "libbase",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "liblog",
         "android.hardware.tests.pointer@1.0",
     ],
diff --git a/tests/versioning/2.3/Android.bp b/tests/versioning/2.3/Android.bp
index 3cc2076..122c484 100644
--- a/tests/versioning/2.3/Android.bp
+++ b/tests/versioning/2.3/Android.bp
@@ -63,7 +63,6 @@
         "libcutils",
         "android.hardware.tests.versioning@1.0",
         "android.hardware.tests.versioning@2.2",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -72,6 +71,5 @@
         "libutils",
         "android.hardware.tests.versioning@1.0",
         "android.hardware.tests.versioning@2.2",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/thermal/1.0/default/Android.bp b/thermal/1.0/default/Android.bp
index 96f69cc..1510509 100644
--- a/thermal/1.0/default/Android.bp
+++ b/thermal/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.thermal@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Thermal.cpp"],
@@ -7,7 +8,6 @@
         "liblog",
         "libcutils",
         "libhardware",
-        "libhwbinder",
         "libbase",
         "libcutils",
         "libutils",
diff --git a/thermal/1.0/default/Android.mk b/thermal/1.0/default/Android.mk
index 72c46af..2d25dc3 100644
--- a/thermal/1.0/default/Android.mk
+++ b/thermal/1.0/default/Android.mk
@@ -33,7 +33,6 @@
         libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-        libhwbinder \
         libhidlbase \
         libhidltransport \
         android.hardware.thermal@1.0 \
diff --git a/thermal/1.0/vts/Thermal.vts b/thermal/1.0/vts/Thermal.vts
deleted file mode 100644
index 4611924..0000000
--- a/thermal/1.0/vts/Thermal.vts
+++ /dev/null
@@ -1,83 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IThermal"
-
-package: "android.hardware.thermal"
-
-import: "android.hardware.thermal@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getTemperatures"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::thermal::V1_0::Temperature"
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-    api: {
-        name: "getCpuUsages"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::thermal::V1_0::CpuUsage"
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-    api: {
-        name: "getCoolingDevices"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::thermal::V1_0::CoolingDevice"
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-}
diff --git a/thermal/1.0/vts/functional/Android.bp b/thermal/1.0/vts/functional/Android.bp
index fedb760..9046882 100644
--- a/thermal/1.0/vts/functional/Android.bp
+++ b/thermal/1.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "thermal_hidl_hal_test",
-    gtest: true,
-    srcs: ["thermal_hidl_hal_test.cpp"],
+    name: "VtsHalThermalV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalThermalV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.thermal@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp b/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp
similarity index 97%
rename from thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
rename to thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp
index 5bdd2c2..3989c94 100644
--- a/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
+++ b/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp
@@ -24,7 +24,7 @@
 #include <android-base/logging.h>
 #include <android/hardware/thermal/1.0/IThermal.h>
 #include <android/hardware/thermal/1.0/types.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <unistd.h>
 
 using ::android::hardware::hidl_string;
@@ -46,10 +46,10 @@
 #define MAX_FAN_SPEED 20000
 
 // The main test class for THERMAL HIDL HAL.
-class ThermalHidlTest : public ::testing::Test {
+class ThermalHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    thermal_ = IThermal::getService();
+    thermal_ = ::testing::VtsHalHidlTargetTestBase::getService<IThermal>();
     ASSERT_NE(thermal_, nullptr);
     baseSize_ = 0;
     names_.clear();
diff --git a/thermal/1.0/vts/types.vts b/thermal/1.0/vts/types.vts
deleted file mode 100644
index f004bd8..0000000
--- a/thermal/1.0/vts/types.vts
+++ /dev/null
@@ -1,157 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.thermal"
-
-
-attribute: {
-    name: "::android::hardware::thermal::V1_0::TemperatureType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "CPU"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "GPU"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "BATTERY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SKIN"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::thermal::V1_0::CoolingType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "FAN_RPM"
-        scalar_value: {
-            uint32_t: 0
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::thermal::V1_0::Temperature"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::thermal::V1_0::TemperatureType"
-    }
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "currentValue"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "throttlingThreshold"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "shutdownThreshold"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-    struct_value: {
-        name: "vrThrottlingThreshold"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::thermal::V1_0::CoolingDevice"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::thermal::V1_0::CoolingType"
-    }
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "currentValue"
-        type: TYPE_SCALAR
-        scalar_type: "float_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::thermal::V1_0::CpuUsage"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "name"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "active"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "total"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "isOnline"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::thermal::V1_0::ThermalStatusCode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "FAILURE"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::thermal::V1_0::ThermalStatus"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "code"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::thermal::V1_0::ThermalStatusCode"
-    }
-    struct_value: {
-        name: "debugMessage"
-        type: TYPE_STRING
-    }
-}
-
diff --git a/tv/cec/1.0/default/Android.mk b/tv/cec/1.0/default/Android.mk
index 3f986e6..9d37344 100644
--- a/tv/cec/1.0/default/Android.mk
+++ b/tv/cec/1.0/default/Android.mk
@@ -10,7 +10,6 @@
 LOCAL_SHARED_LIBRARIES := \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     liblog \
     libbase \
     libutils \
@@ -38,7 +37,6 @@
     libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-    libhwbinder \
     libhidlbase \
     libhidltransport \
     android.hardware.tv.cec@1.0 \
diff --git a/tv/cec/1.0/default/service.cpp b/tv/cec/1.0/default/service.cpp
index 3c11e24..74b1f62 100644
--- a/tv/cec/1.0/default/service.cpp
+++ b/tv/cec/1.0/default/service.cpp
@@ -23,5 +23,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IHdmiCec>("tv.cec");
+    return defaultPassthroughServiceImplementation<IHdmiCec>();
 }
diff --git a/tv/cec/1.0/vts/HdmiCec.vts b/tv/cec/1.0/vts/HdmiCec.vts
deleted file mode 100644
index 6e71d24..0000000
--- a/tv/cec/1.0/vts/HdmiCec.vts
+++ /dev/null
@@ -1,172 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IHdmiCec"
-
-package: "android.hardware.tv.cec"
-
-import: "android.hardware.tv.cec@1.0::IHdmiCecCallback"
-import: "android.hardware.tv.cec@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "addLogicalAddress"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::cec::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "clearLogicalAddress"
-        callflow: {
-            next: "addLogicalAddress"
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-    api: {
-        name: "getPhysicalAddress"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::cec::V1_0::Result"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "sendMessage"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::cec::V1_0::SendMessageResult"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::tv::cec::V1_0::CecMessage"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setCallback"
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::tv::cec::V1_0::IHdmiCecCallback"
-        }
-        callflow: {
-            next: "addLogicalAddress"
-        }
-        callflow: {
-            entry: true
-        }
-    }
-
-    api: {
-        name: "getCecVersion"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getVendorId"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getPortInfo"
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::tv::cec::V1_0::HdmiPortInfo"
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setOption"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::cec::V1_0::OptionKey"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "setLanguage"
-        arg: {
-            type: TYPE_STRING
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "enableAudioReturnChannel"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "isConnected"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-}
diff --git a/tv/cec/1.0/vts/HdmiCecCallback.vts b/tv/cec/1.0/vts/HdmiCecCallback.vts
deleted file mode 100644
index a98db06..0000000
--- a/tv/cec/1.0/vts/HdmiCecCallback.vts
+++ /dev/null
@@ -1,27 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IHdmiCecCallback"
-
-package: "android.hardware.tv.cec"
-
-import: "android.hardware.tv.cec@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onCecMessage"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::tv::cec::V1_0::CecMessage"
-        }
-    }
-
-    api: {
-        name: "onHotplugEvent"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::tv::cec::V1_0::HotplugEvent"
-        }
-    }
-
-}
diff --git a/tv/cec/1.0/vts/types.vts b/tv/cec/1.0/vts/types.vts
deleted file mode 100644
index ae972a5..0000000
--- a/tv/cec/1.0/vts/types.vts
+++ /dev/null
@@ -1,604 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.tv.cec"
-
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::MaxLength"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "MESSAGE_BODY"
-        scalar_value: {
-            int32_t: 15
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::CecDeviceType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INACTIVE"
-        scalar_value: {
-            int32_t: -1
-        }
-        enumerator: "TV"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RECORDER"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "TUNER"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "PLAYBACK"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "AUDIO_SYSTEM"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "MAX"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "TV"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "RECORDER_1"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "RECORDER_2"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "TUNER_1"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "PLAYBACK_1"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "AUDIO_SYSTEM"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "TUNER_2"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "TUNER_3"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "PLAYBACK_2"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "RECORDER_3"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "TUNER_4"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "PLAYBACK_3"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "FREE_USE"
-        scalar_value: {
-            int32_t: 14
-        }
-        enumerator: "UNREGISTERED"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "BROADCAST"
-        scalar_value: {
-            int32_t: 15
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::CecMessageType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "FEATURE_ABORT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "IMAGE_VIEW_ON"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "TUNER_STEP_INCREMENT"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "TUNER_STEP_DECREMENT"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "TUNER_DEVICE_STATUS"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "GIVE_TUNER_DEVICE_STATUS"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "RECORD_ON"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "RECORD_STATUS"
-        scalar_value: {
-            int32_t: 10
-        }
-        enumerator: "RECORD_OFF"
-        scalar_value: {
-            int32_t: 11
-        }
-        enumerator: "TEXT_VIEW_ON"
-        scalar_value: {
-            int32_t: 13
-        }
-        enumerator: "RECORD_TV_SCREEN"
-        scalar_value: {
-            int32_t: 15
-        }
-        enumerator: "GIVE_DECK_STATUS"
-        scalar_value: {
-            int32_t: 26
-        }
-        enumerator: "DECK_STATUS"
-        scalar_value: {
-            int32_t: 27
-        }
-        enumerator: "SET_MENU_LANGUAGE"
-        scalar_value: {
-            int32_t: 50
-        }
-        enumerator: "CLEAR_ANALOG_TIMER"
-        scalar_value: {
-            int32_t: 51
-        }
-        enumerator: "SET_ANALOG_TIMER"
-        scalar_value: {
-            int32_t: 52
-        }
-        enumerator: "TIMER_STATUS"
-        scalar_value: {
-            int32_t: 53
-        }
-        enumerator: "STANDBY"
-        scalar_value: {
-            int32_t: 54
-        }
-        enumerator: "PLAY"
-        scalar_value: {
-            int32_t: 65
-        }
-        enumerator: "DECK_CONTROL"
-        scalar_value: {
-            int32_t: 66
-        }
-        enumerator: "TIMER_CLEARED_STATUS"
-        scalar_value: {
-            int32_t: 67
-        }
-        enumerator: "USER_CONTROL_PRESSED"
-        scalar_value: {
-            int32_t: 68
-        }
-        enumerator: "USER_CONTROL_RELEASED"
-        scalar_value: {
-            int32_t: 69
-        }
-        enumerator: "GIVE_OSD_NAME"
-        scalar_value: {
-            int32_t: 70
-        }
-        enumerator: "SET_OSD_NAME"
-        scalar_value: {
-            int32_t: 71
-        }
-        enumerator: "SET_OSD_STRING"
-        scalar_value: {
-            int32_t: 100
-        }
-        enumerator: "SET_TIMER_PROGRAM_TITLE"
-        scalar_value: {
-            int32_t: 103
-        }
-        enumerator: "SYSTEM_AUDIO_MODE_REQUEST"
-        scalar_value: {
-            int32_t: 112
-        }
-        enumerator: "GIVE_AUDIO_STATUS"
-        scalar_value: {
-            int32_t: 113
-        }
-        enumerator: "SET_SYSTEM_AUDIO_MODE"
-        scalar_value: {
-            int32_t: 114
-        }
-        enumerator: "REPORT_AUDIO_STATUS"
-        scalar_value: {
-            int32_t: 122
-        }
-        enumerator: "GIVE_SYSTEM_AUDIO_MODE_STATUS"
-        scalar_value: {
-            int32_t: 125
-        }
-        enumerator: "SYSTEM_AUDIO_MODE_STATUS"
-        scalar_value: {
-            int32_t: 126
-        }
-        enumerator: "ROUTING_CHANGE"
-        scalar_value: {
-            int32_t: 128
-        }
-        enumerator: "ROUTING_INFORMATION"
-        scalar_value: {
-            int32_t: 129
-        }
-        enumerator: "ACTIVE_SOURCE"
-        scalar_value: {
-            int32_t: 130
-        }
-        enumerator: "GIVE_PHYSICAL_ADDRESS"
-        scalar_value: {
-            int32_t: 131
-        }
-        enumerator: "REPORT_PHYSICAL_ADDRESS"
-        scalar_value: {
-            int32_t: 132
-        }
-        enumerator: "REQUEST_ACTIVE_SOURCE"
-        scalar_value: {
-            int32_t: 133
-        }
-        enumerator: "SET_STREAM_PATH"
-        scalar_value: {
-            int32_t: 134
-        }
-        enumerator: "DEVICE_VENDOR_ID"
-        scalar_value: {
-            int32_t: 135
-        }
-        enumerator: "VENDOR_COMMAND"
-        scalar_value: {
-            int32_t: 137
-        }
-        enumerator: "VENDOR_REMOTE_BUTTON_DOWN"
-        scalar_value: {
-            int32_t: 138
-        }
-        enumerator: "VENDOR_REMOTE_BUTTON_UP"
-        scalar_value: {
-            int32_t: 139
-        }
-        enumerator: "GIVE_DEVICE_VENDOR_ID"
-        scalar_value: {
-            int32_t: 140
-        }
-        enumerator: "MENU_REQUEST"
-        scalar_value: {
-            int32_t: 141
-        }
-        enumerator: "MENU_STATUS"
-        scalar_value: {
-            int32_t: 142
-        }
-        enumerator: "GIVE_DEVICE_POWER_STATUS"
-        scalar_value: {
-            int32_t: 143
-        }
-        enumerator: "REPORT_POWER_STATUS"
-        scalar_value: {
-            int32_t: 144
-        }
-        enumerator: "GET_MENU_LANGUAGE"
-        scalar_value: {
-            int32_t: 145
-        }
-        enumerator: "SELECT_ANALOG_SERVICE"
-        scalar_value: {
-            int32_t: 146
-        }
-        enumerator: "SELECT_DIGITAL_SERVICE"
-        scalar_value: {
-            int32_t: 147
-        }
-        enumerator: "SET_DIGITAL_TIMER"
-        scalar_value: {
-            int32_t: 151
-        }
-        enumerator: "CLEAR_DIGITAL_TIMER"
-        scalar_value: {
-            int32_t: 153
-        }
-        enumerator: "SET_AUDIO_RATE"
-        scalar_value: {
-            int32_t: 154
-        }
-        enumerator: "INACTIVE_SOURCE"
-        scalar_value: {
-            int32_t: 157
-        }
-        enumerator: "CEC_VERSION"
-        scalar_value: {
-            int32_t: 158
-        }
-        enumerator: "GET_CEC_VERSION"
-        scalar_value: {
-            int32_t: 159
-        }
-        enumerator: "VENDOR_COMMAND_WITH_ID"
-        scalar_value: {
-            int32_t: 160
-        }
-        enumerator: "CLEAR_EXTERNAL_TIMER"
-        scalar_value: {
-            int32_t: 161
-        }
-        enumerator: "SET_EXTERNAL_TIMER"
-        scalar_value: {
-            int32_t: 162
-        }
-        enumerator: "INITIATE_ARC"
-        scalar_value: {
-            int32_t: 192
-        }
-        enumerator: "REPORT_ARC_INITIATED"
-        scalar_value: {
-            int32_t: 193
-        }
-        enumerator: "REPORT_ARC_TERMINATED"
-        scalar_value: {
-            int32_t: 194
-        }
-        enumerator: "REQUEST_ARC_INITIATION"
-        scalar_value: {
-            int32_t: 195
-        }
-        enumerator: "REQUEST_ARC_TERMINATION"
-        scalar_value: {
-            int32_t: 196
-        }
-        enumerator: "TERMINATE_ARC"
-        scalar_value: {
-            int32_t: 197
-        }
-        enumerator: "ABORT"
-        scalar_value: {
-            int32_t: 255
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::AbortReason"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "UNRECOGNIZED_MODE"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "NOT_IN_CORRECT_MODE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "CANNOT_PROVIDE_SOURCE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "INVALID_OPERAND"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "REFUSED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "UNABLE_TO_DETERMINE"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::Result"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "FAILURE_UNKNOWN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "FAILURE_INVALID_ARGS"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FAILURE_INVALID_STATE"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "FAILURE_NOT_SUPPORTED"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "FAILURE_BUSY"
-        scalar_value: {
-            int32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::SendMessageResult"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "NACK"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "BUSY"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "FAIL"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::HdmiPortType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INPUT"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "OUTPUT"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::OptionKey"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "WAKEUP"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "ENABLE_CEC"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "SYSTEM_CEC_CONTROL"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::CecMessage"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "initiator"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
-    }
-    struct_value: {
-        name: "destination"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
-    }
-    struct_value: {
-        name: "body"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::HotplugEvent"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "connected"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "portId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::cec::V1_0::HdmiPortInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::tv::cec::V1_0::HdmiPortType"
-    }
-    struct_value: {
-        name: "portId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "cecSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "arcSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "physicalAddress"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-}
-
diff --git a/tv/input/1.0/default/Android.mk b/tv/input/1.0/default/Android.mk
index be1775d..210da86 100644
--- a/tv/input/1.0/default/Android.mk
+++ b/tv/input/1.0/default/Android.mk
@@ -13,7 +13,6 @@
     libhardware \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     libutils \
     android.hardware.audio.common@2.0 \
     android.hardware.tv.input@1.0 \
@@ -38,7 +37,6 @@
     libhardware \
 
 LOCAL_SHARED_LIBRARIES += \
-    libhwbinder \
     libhidlbase \
     libhidltransport \
     android.hardware.audio.common@2.0 \
diff --git a/tv/input/1.0/vts/TvInput.vts b/tv/input/1.0/vts/TvInput.vts
deleted file mode 100644
index f049fc1..0000000
--- a/tv/input/1.0/vts/TvInput.vts
+++ /dev/null
@@ -1,99 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ITvInput"
-
-package: "android.hardware.tv.input"
-
-import: "android.hardware.audio.common@2.0::types"
-import: "android.hardware.tv.input@1.0::ITvInputCallback"
-import: "android.hardware.tv.input@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "setCallback"
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::tv::input::V1_0::ITvInputCallback"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "getStreamConfigurations"
-        }
-    }
-
-    api: {
-        name: "getStreamConfigurations"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::input::V1_0::Result"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::tv::input::V1_0::TvStreamConfig"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        callflow: {
-            next: "openStream"
-            next: "getStreamConfigurations"
-            next: "closeStream"
-        }
-    }
-
-    api: {
-        name: "openStream"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::input::V1_0::Result"
-        }
-        return_type_hidl: {
-            type: TYPE_HANDLE
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        callflow: {
-            next: "closeStream"
-            next: "getStreamConfigurations"
-            next: "openStream"
-        }
-    }
-
-    api: {
-        name: "closeStream"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::tv::input::V1_0::Result"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        callflow: {
-            next: "getStreamConfigurations"
-            next: "openStream"
-            next: "closeStream"
-        }
-    }
-
-}
diff --git a/tv/input/1.0/vts/TvInputCallback.vts b/tv/input/1.0/vts/TvInputCallback.vts
deleted file mode 100644
index 8082b9f..0000000
--- a/tv/input/1.0/vts/TvInputCallback.vts
+++ /dev/null
@@ -1,20 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ITvInputCallback"
-
-package: "android.hardware.tv.input"
-
-import: "android.hardware.audio.common@2.0::types"
-import: "android.hardware.tv.input@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "notify"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::tv::input::V1_0::TvInputEvent"
-        }
-    }
-
-}
diff --git a/tv/input/1.0/vts/functional/Android.bp b/tv/input/1.0/vts/functional/Android.bp
index c327733..c862429 100644
--- a/tv/input/1.0/vts/functional/Android.bp
+++ b/tv/input/1.0/vts/functional/Android.bp
@@ -15,21 +15,20 @@
 //
 
 cc_test {
-    name: "tv_input_hidl_hal_test",
-    gtest: true,
-    srcs: ["tv_input_hidl_hal_test.cpp"],
+    name: "VtsHalTvInputV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalTvInputV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.tv.input@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/tv/input/1.0/vts/functional/tv_input_hidl_hal_test.cpp b/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp
similarity index 98%
rename from tv/input/1.0/vts/functional/tv_input_hidl_hal_test.cpp
rename to tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp
index 3747dc5..0d5110e 100644
--- a/tv/input/1.0/vts/functional/tv_input_hidl_hal_test.cpp
+++ b/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
 #include <android/hardware/tv/input/1.0/ITvInput.h>
 #include <android/hardware/tv/input/1.0/ITvInputCallback.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <utils/KeyedVector.h>
 #include <mutex>
 #include <vector>
@@ -43,10 +43,10 @@
 #define DEFAULT_ID INT32_MIN
 
 /* The main test class for TV Input HIDL HAL. */
-class TvInputHidlTest : public ::testing::Test {
+class TvInputHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    tv_input_ = ITvInput::getService();
+    tv_input_ = ::testing::VtsHalHidlTargetTestBase::getService<ITvInput>();
     ASSERT_NE(tv_input_, nullptr);
     tv_input_callback_ = new TvInputCallback(*this);
     ASSERT_NE(tv_input_callback_, nullptr);
diff --git a/tv/input/1.0/vts/types.vts b/tv/input/1.0/vts/types.vts
deleted file mode 100644
index cb1d472..0000000
--- a/tv/input/1.0/vts/types.vts
+++ /dev/null
@@ -1,176 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.tv.input"
-
-import: "android.hardware.audio.common@2.0::types"
-
-attribute: {
-    name: "::android::hardware::tv::input::V1_0::Result"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OK"
-        scalar_value: {
-            int32_t: 0
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "NO_RESOURCE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "INVALID_ARGUMENTS"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "INVALID_STATE"
-        scalar_value: {
-            int32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::input::V1_0::TvInputType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "OTHER"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "TUNER"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "COMPOSITE"
-        scalar_value: {
-            int32_t: 3
-        }
-        enumerator: "SVIDEO"
-        scalar_value: {
-            int32_t: 4
-        }
-        enumerator: "SCART"
-        scalar_value: {
-            int32_t: 5
-        }
-        enumerator: "COMPONENT"
-        scalar_value: {
-            int32_t: 6
-        }
-        enumerator: "VGA"
-        scalar_value: {
-            int32_t: 7
-        }
-        enumerator: "DVI"
-        scalar_value: {
-            int32_t: 8
-        }
-        enumerator: "HDMI"
-        scalar_value: {
-            int32_t: 9
-        }
-        enumerator: "DISPLAY_PORT"
-        scalar_value: {
-            int32_t: 10
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::input::V1_0::TvInputDeviceInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "deviceId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::tv::input::V1_0::TvInputType"
-    }
-    struct_value: {
-        name: "portId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "audioType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
-    }
-    struct_value: {
-        name: "audioAddress"
-        type: TYPE_ARRAY
-        vector_size: 32
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::input::V1_0::TvInputEventType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "DEVICE_AVAILABLE"
-        scalar_value: {
-            int32_t: 1
-        }
-        enumerator: "DEVICE_UNAVAILABLE"
-        scalar_value: {
-            int32_t: 2
-        }
-        enumerator: "STREAM_CONFIGURATIONS_CHANGED"
-        scalar_value: {
-            int32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::input::V1_0::TvInputEvent"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::tv::input::V1_0::TvInputEventType"
-    }
-    struct_value: {
-        name: "deviceInfo"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::tv::input::V1_0::TvInputDeviceInfo"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::tv::input::V1_0::TvStreamConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "streamId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "maxVideoWidth"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxVideoHeight"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
diff --git a/usb/1.0/default/Android.mk b/usb/1.0/default/Android.mk
index 489293c..afd53cf 100644
--- a/usb/1.0/default/Android.mk
+++ b/usb/1.0/default/Android.mk
@@ -14,7 +14,6 @@
     libhidlbase \
     libhidltransport \
     liblog \
-    libhwbinder \
     libutils \
     libhardware \
     android.hardware.usb@1.0 \
diff --git a/usb/1.0/default/Usb.cpp b/usb/1.0/default/Usb.cpp
index f46ff66..6eb8842 100644
--- a/usb/1.0/default/Usb.cpp
+++ b/usb/1.0/default/Usb.cpp
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <assert.h>
 #include <dirent.h>
 #include <iostream>
 #include <fstream>
@@ -34,6 +35,9 @@
 namespace V1_0 {
 namespace implementation {
 
+// Set by the signal handler to destroy the thread
+volatile bool destroyThread;
+
 int32_t readFile(std::string filename, std::string& contents) {
     std::ifstream file(filename);
 
@@ -172,17 +176,22 @@
                 ports++;
             }
         }
+
+        if (ports == 0) {
+            closedir(dp);
+            return Status::SUCCESS;
+        }
+
         names.resize(ports);
         rewinddir(dp);
 
         while ((ep = readdir (dp))) {
-            /* Check to see if new ports were added since the first pass. */
-            if (current >= ports) {
-               rewinddir(dp);
-               goto rescan;
-            }
-
             if (ep->d_type == DT_LNK) {
+                /* Check to see if new ports were added since the first pass. */
+                if (current >= ports) {
+                    rewinddir(dp);
+                    goto rescan;
+                }
                 names[current++] = ep->d_name;
             }
         }
@@ -234,7 +243,7 @@
 
     if (result == Status::SUCCESS) {
         currentPortStatus.resize(names.size());
-        for(std::vector<std::string>::size_type i = 0; i != names.size(); i++) {
+        for(std::vector<std::string>::size_type i = 0; i < names.size(); i++) {
             ALOGI("%s", names[i].c_str());
             currentPortStatus[i].portName = names[i];
 
@@ -374,7 +383,7 @@
         goto error;
     }
 
-    while (1) {
+    while (!destroyThread) {
         struct epoll_event events[64];
 
         nevents = epoll_wait(epoll_fd, events, 64, -1);
@@ -392,6 +401,7 @@
         }
     }
 
+    ALOGI("exiting worker thread");
 error:
     close(uevent_fd);
 
@@ -401,26 +411,61 @@
     return NULL;
 }
 
+void sighandler(int sig)
+{
+    if (sig == SIGUSR1) {
+        destroyThread = true;
+        ALOGI("destroy set");
+        return;
+    }
+    signal(SIGUSR1, sighandler);
+}
 
 Return<void> Usb::setCallback(const sp<IUsbCallback>& callback) {
 
-    if (mCallback != NULL) {
-        ALOGE("Callback already registered");
+    pthread_mutex_lock(&mLock);
+    if ((mCallback == NULL && callback == NULL) ||
+            (mCallback != NULL && callback != NULL)) {
+        mCallback = callback;
+        pthread_mutex_unlock(&mLock);
         return Void();
     }
 
     mCallback = callback;
     ALOGI("registering callback");
 
-    if (pthread_create(&mPoll, NULL, work, this)) {
-        ALOGE("pthread creation failed %d", errno);
-        mCallback = NULL;
+    if (mCallback == NULL) {
+        if  (!pthread_kill(mPoll, SIGUSR1)) {
+            pthread_join(mPoll, NULL);
+            ALOGI("pthread destroyed");
+        }
+        pthread_mutex_unlock(&mLock);
         return Void();
     }
 
+    destroyThread = false;
+    signal(SIGUSR1, sighandler);
+
+    if (pthread_create(&mPoll, NULL, work, this)) {
+        ALOGE("pthread creation failed %d", errno);
+        mCallback = NULL;
+    }
+    pthread_mutex_unlock(&mLock);
     return Void();
 }
 
+// Protects *usb assignment
+pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+Usb *usb;
+
+Usb::Usb() {
+    pthread_mutex_lock(&lock);
+    // Make this a singleton class
+    assert(usb == NULL);
+    usb = this;
+    pthread_mutex_unlock(&lock);
+}
+
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace usb
diff --git a/usb/1.0/default/Usb.h b/usb/1.0/default/Usb.h
index cf418f4..c34d080 100644
--- a/usb/1.0/default/Usb.h
+++ b/usb/1.0/default/Usb.h
@@ -32,6 +32,7 @@
 using ::android::sp;
 
 struct Usb : public IUsb {
+    Usb();
     Return<void> switchRole(const hidl_string& portName, const PortRole& role) override;
     Return<void> setCallback(const sp<IUsbCallback>& callback) override;
     Return<void> queryPortStatus() override;
@@ -39,6 +40,7 @@
     sp<IUsbCallback> mCallback;
     private:
         pthread_t mPoll;
+        pthread_mutex_t mLock = PTHREAD_MUTEX_INITIALIZER;
 };
 
 }  // namespace implementation
diff --git a/usb/1.0/vts/functional/Android.bp b/usb/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..7438bc7
--- /dev/null
+++ b/usb/1.0/vts/functional/Android.bp
@@ -0,0 +1,36 @@
+//
+// 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.
+//
+
+cc_test {
+    name: "VtsHalUsbV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalUsbV1_0TargetTest.cpp"],
+    shared_libs: [
+        "libbase",
+        "liblog",
+        "libcutils",
+        "libhidlbase",
+        "libhidltransport",
+        "libnativehelper",
+        "libutils",
+        "android.hardware.usb@1.0",
+    ],
+    static_libs: ["VtsHalHidlTargetTestBase"],
+    cflags: [
+        "-O0",
+        "-g",
+    ],
+}
diff --git a/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp b/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
new file mode 100644
index 0000000..54db8c2
--- /dev/null
+++ b/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
@@ -0,0 +1,351 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "VtsHalUsbV1_0TargetTest"
+#include <android-base/logging.h>
+
+#include <android/hardware/usb/1.0/IUsb.h>
+#include <android/hardware/usb/1.0/IUsbCallback.h>
+#include <android/hardware/usb/1.0/types.h>
+
+#include <VtsHalHidlTargetTestBase.h>
+#include <stdlib.h>
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+#define TIMEOUT_PERIOD 10
+
+using ::android::hardware::usb::V1_0::IUsbCallback;
+using ::android::hardware::usb::V1_0::IUsb;
+using ::android::hardware::usb::V1_0::PortDataRole;
+using ::android::hardware::usb::V1_0::PortMode;
+using ::android::hardware::usb::V1_0::PortPowerRole;
+using ::android::hardware::usb::V1_0::PortRole;
+using ::android::hardware::usb::V1_0::PortRoleType;
+using ::android::hardware::usb::V1_0::PortStatus;
+using ::android::hardware::usb::V1_0::Status;
+using ::android::hidl::base::V1_0::IBase;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+#define USB_SERVICE_NAME "usb_hal"
+
+// The main test class for the USB hidl HAL
+class UsbHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+ public:
+  // Callback class for the USB HIDL hal.
+  // Usb Hal will call this object upon role switch or port query.
+  class UsbCallback : public IUsbCallback {
+    UsbHidlTest& parent_;
+    int cookie;
+
+   public:
+    UsbCallback(UsbHidlTest& parent, int cookie)
+        : parent_(parent), cookie(cookie){};
+
+    virtual ~UsbCallback() = default;
+
+    // Callback method for the port status.
+    Return<void> notifyPortStatusChange(
+        const hidl_vec<PortStatus>& currentPortStatus, Status retval) override {
+      if (retval == Status::SUCCESS) {
+        parent_.usb_last_port_status.portName =
+            currentPortStatus[0].portName.c_str();
+        parent_.usb_last_port_status.currentDataRole =
+            currentPortStatus[0].currentDataRole;
+        parent_.usb_last_port_status.currentPowerRole =
+            currentPortStatus[0].currentPowerRole;
+        parent_.usb_last_port_status.currentMode =
+            currentPortStatus[0].currentMode;
+      }
+      parent_.usb_last_cookie = cookie;
+      parent_.notify();
+      return Void();
+    };
+
+    // Callback method for the status of role switch operation.
+    Return<void> notifyRoleSwitchStatus(const hidl_string& /*portName*/,
+                                        const PortRole& newRole,
+                                        Status retval) override {
+      parent_.usb_last_status = retval;
+      parent_.usb_last_cookie = cookie;
+      parent_.usb_last_port_role = newRole;
+      parent_.usb_role_switch_done = true;
+      parent_.notify();
+      return Void();
+    };
+  };
+
+  virtual void SetUp() override {
+    ALOGI("Setup");
+    usb = ::testing::VtsHalHidlTargetTestBase::getService<IUsb>(USB_SERVICE_NAME);
+    ASSERT_NE(usb, nullptr);
+
+    usb_cb_2 = new UsbCallback(*this, 2);
+    ASSERT_NE(usb_cb_2, nullptr);
+    Return<void> ret = usb->setCallback(usb_cb_2);
+    ASSERT_TRUE(ret.isOk());
+  }
+
+  virtual void TearDown() override { ALOGI("Teardown"); }
+
+  // Used as a mechanism to inform the test about data/event callback.
+  inline void notify() {
+    std::unique_lock<std::mutex> lock(usb_mtx);
+    usb_count++;
+    usb_cv.notify_one();
+  }
+
+  // Test code calls this function to wait for data/event callback.
+  inline std::cv_status wait() {
+    std::unique_lock<std::mutex> lock(usb_mtx);
+
+    std::cv_status status = std::cv_status::no_timeout;
+    auto now = std::chrono::system_clock::now();
+    while (usb_count == 0) {
+      status =
+          usb_cv.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
+      if (status == std::cv_status::timeout) {
+        ALOGI("timeout");
+        return status;
+      }
+    }
+    usb_count--;
+    return status;
+  }
+
+  // USB hidl hal Proxy
+  sp<IUsb> usb;
+
+  // Callback objects for usb hidl
+  // Methods of these objects are called to notify port status updates.
+  sp<IUsbCallback> usb_cb_1, usb_cb_2;
+
+  // The last conveyed status of the USB ports.
+  // Stores information of currentt_data_role, power_role for all the USB ports
+  PortStatus usb_last_port_status;
+
+  // Status of the last role switch operation.
+  Status usb_last_status;
+
+  // Port role information of the last role switch operation.
+  PortRole usb_last_port_role;
+
+  // Flag to indicate the invocation of role switch callback.
+  bool usb_role_switch_done;
+
+  // Identifier for the usb callback object.
+  // Stores the cookie of the last invoked usb callback object.
+  int usb_last_cookie;
+
+  // synchronization primitives to coordinate between main test thread
+  // and the callback thread.
+  std::mutex usb_mtx;
+  std::condition_variable usb_cv;
+  int usb_count;
+};
+
+/*
+ * Test to see if setCallback succeeds.
+ * Callback oject is created and registered.
+ * Check to see if the hidl transaction succeeded.
+ */
+TEST_F(UsbHidlTest, setCallback) {
+  usb_cb_1 = new UsbCallback(*this, 1);
+  ASSERT_NE(usb_cb_1, nullptr);
+  Return<void> ret = usb->setCallback(usb_cb_1);
+  ASSERT_TRUE(ret.isOk());
+}
+
+/*
+ * Check to see if querying type-c
+ * port status succeeds.
+ */
+TEST_F(UsbHidlTest, queryPortStatus) {
+  Return<void> ret = usb->queryPortStatus();
+  ASSERT_TRUE(ret.isOk());
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(2, usb_last_cookie);
+  ALOGI("rightafter: %s", usb_last_port_status.portName.c_str());
+}
+
+/*
+ * Trying to switch a non-existent port should fail.
+ * This test case tried to switch the port with empty
+ * name which is expected to fail.
+ */
+TEST_F(UsbHidlTest, switchEmptyPort) {
+  struct PortRole role;
+  role.type = PortRoleType::DATA_ROLE;
+
+  Return<void> ret = usb->switchRole("", role);
+  ASSERT_TRUE(ret.isOk());
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(Status::ERROR, usb_last_status);
+  EXPECT_EQ(2, usb_last_cookie);
+}
+
+/*
+ * Test switching the mode of usb port.
+ * Test case queries the usb ports present in device.
+ * If there is atleast one usb port, a mode switch
+ * to DFP is attempted for the port.
+ * The callback parametes are checked to see if the mode
+ * switch was successfull. Upon success, Status::SUCCESS
+ * is expected to be returned.
+ */
+TEST_F(UsbHidlTest, switchModetoDFP) {
+  struct PortRole role;
+  role.type = PortRoleType::MODE;
+  role.role = static_cast<uint32_t>(PortMode::DFP);
+
+  Return<void> ret = usb->queryPortStatus();
+  ASSERT_TRUE(ret.isOk());
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(2, usb_last_cookie);
+
+  if (!usb_last_port_status.portName.empty()) {
+    hidl_string portBeingSwitched = usb_last_port_status.portName;
+    ALOGI("mode portname:%s", portBeingSwitched.c_str());
+    usb_role_switch_done = false;
+    Return<void> ret = usb->switchRole(portBeingSwitched.c_str(), role);
+    ASSERT_TRUE(ret.isOk());
+
+    std::cv_status waitStatus = wait();
+    while (waitStatus == std::cv_status::no_timeout &&
+           usb_role_switch_done == false)
+      waitStatus = wait();
+
+    EXPECT_EQ(std::cv_status::no_timeout, waitStatus);
+    EXPECT_EQ(2, usb_last_cookie);
+
+    EXPECT_EQ(static_cast<uint32_t>(PortRoleType::MODE),
+              static_cast<uint32_t>(usb_last_port_role.type));
+    if (usb_last_status == Status::SUCCESS) {
+      EXPECT_EQ(static_cast<uint32_t>(PortMode::DFP),
+                static_cast<uint32_t>(usb_last_port_role.role));
+    } else {
+      EXPECT_NE(static_cast<uint32_t>(PortMode::UFP),
+                static_cast<uint32_t>(usb_last_port_role.role));
+    }
+  }
+}
+
+/*
+ * Test switching the power role of usb port.
+ * Test case queries the usb ports present in device.
+ * If there is atleast one usb port, a power role switch
+ * to SOURCE is attempted for the port.
+ * The callback parametes are checked to see if the power role
+ * switch was successfull. Upon success, Status::SUCCESS
+ * is expected to be returned.
+ */
+
+TEST_F(UsbHidlTest, switchPowerRole) {
+  struct PortRole role;
+  role.type = PortRoleType::POWER_ROLE;
+  role.role = static_cast<uint32_t>(PortPowerRole::SOURCE);
+
+  Return<void> ret = usb->queryPortStatus();
+  ASSERT_TRUE(ret.isOk());
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(2, usb_last_cookie);
+
+  if (!usb_last_port_status.portName.empty()) {
+    hidl_string portBeingSwitched = usb_last_port_status.portName;
+    ALOGI("switchPower role portname:%s", portBeingSwitched.c_str());
+    usb_role_switch_done = false;
+    Return<void> ret = usb->switchRole(portBeingSwitched.c_str(), role);
+    ASSERT_TRUE(ret.isOk());
+
+    std::cv_status waitStatus = wait();
+    while (waitStatus == std::cv_status::no_timeout &&
+           usb_role_switch_done == false)
+      waitStatus = wait();
+
+    EXPECT_EQ(std::cv_status::no_timeout, waitStatus);
+    EXPECT_EQ(2, usb_last_cookie);
+
+    EXPECT_EQ(static_cast<uint32_t>(PortRoleType::POWER_ROLE),
+              static_cast<uint32_t>(usb_last_port_role.type));
+    if (usb_last_status == Status::SUCCESS) {
+      EXPECT_EQ(static_cast<uint32_t>(PortPowerRole::SOURCE),
+                static_cast<uint32_t>(usb_last_port_role.role));
+    } else {
+      EXPECT_NE(static_cast<uint32_t>(PortPowerRole::SINK),
+                static_cast<uint32_t>(usb_last_port_role.role));
+    }
+  }
+}
+
+/*
+ * Test switching the data role of usb port.
+ * Test case queries the usb ports present in device.
+ * If there is atleast one usb port, a power role switch
+ * to HOST is attempted for the port.
+ * The callback parametes are checked to see if the power role
+ * switch was successfull. Upon success, Status::SUCCESS
+ * is expected to be returned.
+ */
+TEST_F(UsbHidlTest, switchDataRole) {
+  struct PortRole role;
+  role.type = PortRoleType::DATA_ROLE;
+  role.role = static_cast<uint32_t>(PortDataRole::HOST);
+
+  Return<void> ret = usb->queryPortStatus();
+  ASSERT_TRUE(ret.isOk());
+  EXPECT_EQ(std::cv_status::no_timeout, wait());
+  EXPECT_EQ(2, usb_last_cookie);
+
+  if (!usb_last_port_status.portName.empty()) {
+    hidl_string portBeingSwitched = usb_last_port_status.portName;
+    ALOGI("portname:%s", portBeingSwitched.c_str());
+    usb_role_switch_done = false;
+    Return<void> ret = usb->switchRole(portBeingSwitched.c_str(), role);
+    ASSERT_TRUE(ret.isOk());
+
+    std::cv_status waitStatus = wait();
+    while (waitStatus == std::cv_status::no_timeout &&
+           usb_role_switch_done == false)
+      waitStatus = wait();
+
+    EXPECT_EQ(std::cv_status::no_timeout, waitStatus);
+    EXPECT_EQ(2, usb_last_cookie);
+
+    EXPECT_EQ(static_cast<uint32_t>(PortRoleType::DATA_ROLE),
+              static_cast<uint32_t>(usb_last_port_role.type));
+    if (usb_last_status == Status::SUCCESS) {
+      EXPECT_EQ(static_cast<uint32_t>(PortDataRole::HOST),
+                static_cast<uint32_t>(usb_last_port_role.role));
+    } else {
+      EXPECT_NE(static_cast<uint32_t>(PortDataRole::DEVICE),
+                static_cast<uint32_t>(usb_last_port_role.role));
+    }
+  }
+}
+
+int main(int argc, char** argv) {
+  ::testing::InitGoogleTest(&argc, argv);
+  int status = RUN_ALL_TESTS();
+  ALOGI("Test result = %d", status);
+  return status;
+}
diff --git a/usb/Android.bp b/usb/Android.bp
index bbb3e4b..33f70eb 100644
--- a/usb/Android.bp
+++ b/usb/Android.bp
@@ -1,4 +1,5 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
     "1.0",
+    "1.0/vts/functional",
 ]
diff --git a/vibrator/1.0/default/Android.bp b/vibrator/1.0/default/Android.bp
index 6cb9802..d4200da 100644
--- a/vibrator/1.0/default/Android.bp
+++ b/vibrator/1.0/default/Android.bp
@@ -15,6 +15,7 @@
 
 cc_library_shared {
     name: "android.hardware.vibrator@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Vibrator.cpp"],
@@ -22,7 +23,6 @@
         "libhidlbase",
         "libhidltransport",
         "liblog",
-        "libhwbinder",
         "libutils",
         "libhardware",
         "android.hardware.vibrator@1.0",
diff --git a/vibrator/1.0/default/Android.mk b/vibrator/1.0/default/Android.mk
index 091d615..af4a955 100644
--- a/vibrator/1.0/default/Android.mk
+++ b/vibrator/1.0/default/Android.mk
@@ -28,7 +28,6 @@
   libhidlbase \
   libhidltransport \
   liblog \
-  libhwbinder \
   libutils \
   libhardware \
   android.hardware.vibrator@1.0
diff --git a/vibrator/1.0/vts/Vibrator.vts b/vibrator/1.0/vts/Vibrator.vts
deleted file mode 100644
index 07ec30e..0000000
--- a/vibrator/1.0/vts/Vibrator.vts
+++ /dev/null
@@ -1,31 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IVibrator"
-
-package: "android.hardware.vibrator"
-
-import: "android.hardware.vibrator@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "on"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::vibrator::V1_0::Status"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "off"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::vibrator::V1_0::Status"
-        }
-    }
-
-}
diff --git a/vibrator/1.0/vts/functional/Android.bp b/vibrator/1.0/vts/functional/Android.bp
index a24cf5c..9e25def 100644
--- a/vibrator/1.0/vts/functional/Android.bp
+++ b/vibrator/1.0/vts/functional/Android.bp
@@ -15,9 +15,9 @@
 //
 
 cc_test {
-    name: "vibrator_hidl_hal_test",
-    gtest: true,
-    srcs: ["vibrator_hidl_hal_test.cpp"],
+    name: "VtsHalVibratorV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalVibratorV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
         "libhidlbase",
@@ -25,7 +25,7 @@
         "libutils",
         "android.hardware.vibrator@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp b/vibrator/1.0/vts/functional/VtsHalVibratorV1_0TargetTest.cpp
similarity index 90%
rename from vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp
rename to vibrator/1.0/vts/functional/VtsHalVibratorV1_0TargetTest.cpp
index 435b002..a978f2c 100644
--- a/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp
+++ b/vibrator/1.0/vts/functional/VtsHalVibratorV1_0TargetTest.cpp
@@ -19,7 +19,7 @@
 #include <android-base/logging.h>
 #include <android/hardware/vibrator/1.0/IVibrator.h>
 #include <android/hardware/vibrator/1.0/types.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <unistd.h>
 
 using ::android::hardware::vibrator::V1_0::IVibrator;
@@ -29,10 +29,10 @@
 using ::android::sp;
 
 // The main test class for VIBRATOR HIDL HAL.
-class VibratorHidlTest : public ::testing::Test {
+class VibratorHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   virtual void SetUp() override {
-    vibrator = IVibrator::getService();
+    vibrator = ::testing::VtsHalHidlTargetTestBase::getService<IVibrator>();
     ASSERT_NE(vibrator, nullptr);
   }
 
diff --git a/vibrator/1.0/vts/types.vts b/vibrator/1.0/vts/types.vts
deleted file mode 100644
index d1bf1e1..0000000
--- a/vibrator/1.0/vts/types.vts
+++ /dev/null
@@ -1,24 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.vibrator"
-
-
-attribute: {
-    name: "::android::hardware::vibrator::V1_0::Status"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "OK"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "ERR"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
diff --git a/vr/1.0/default/Android.bp b/vr/1.0/default/Android.bp
index 0d374d3..ddc1bfb 100644
--- a/vr/1.0/default/Android.bp
+++ b/vr/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.vr@1.0-impl",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     relative_install_path: "hw",
     srcs: ["Vr.cpp"],
@@ -7,7 +8,6 @@
         "liblog",
         "libcutils",
         "libhardware",
-        "libhwbinder",
         "libbase",
         "libcutils",
         "libutils",
@@ -19,6 +19,7 @@
 
 cc_binary {
     relative_install_path: "hw",
+    defaults: ["hidl_defaults"],
     proprietary: true,
     name: "android.hardware.vr@1.0-service",
     init_rc: ["android.hardware.vr@1.0-service.rc"],
@@ -30,7 +31,6 @@
         "libhardware",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "android.hardware.vr@1.0",
     ],
 }
diff --git a/vr/1.0/default/Vr.cpp b/vr/1.0/default/Vr.cpp
index a0de998..4bba9eb 100644
--- a/vr/1.0/default/Vr.cpp
+++ b/vr/1.0/default/Vr.cpp
@@ -42,16 +42,15 @@
     return Void();
 }
 
-IVr* HIDL_FETCH_IVr(const char *name) {
-    vr_module_t *vr_module;
+IVr* HIDL_FETCH_IVr(const char * /*name*/) {
     const hw_module_t *hw_module = NULL;
 
-    int ret = hw_get_module(name, &hw_module);
+    int ret = hw_get_module(VR_HARDWARE_MODULE_ID, &hw_module);
     if (ret == 0) {
         return new Vr(reinterpret_cast<vr_module_t*>(
                 const_cast<hw_module_t*>(hw_module)));
     } else {
-        ALOGE("hw_get_module %s failed: %d", name, ret);
+        ALOGE("hw_get_module %s failed: %d", VR_HARDWARE_MODULE_ID, ret);
         return nullptr;
     }
 }
diff --git a/vr/1.0/default/service.cpp b/vr/1.0/default/service.cpp
index c27ceaf..22fb7d1 100644
--- a/vr/1.0/default/service.cpp
+++ b/vr/1.0/default/service.cpp
@@ -23,5 +23,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IVr>("vr");
+    return defaultPassthroughServiceImplementation<IVr>();
 }
diff --git a/vr/1.0/vts/Vr.vts b/vr/1.0/vts/Vr.vts
deleted file mode 100644
index fdc4a5c..0000000
--- a/vr/1.0/vts/Vr.vts
+++ /dev/null
@@ -1,37 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IVr"
-
-package: "android.hardware.vr"
-
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "init"
-        callflow: {
-            next: "*"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-    api: {
-        name: "setVrMode"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        callflow: {
-            next: "*"
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
-}
diff --git a/vr/1.0/vts/functional/Android.bp b/vr/1.0/vts/functional/Android.bp
index 529f92d..5d5a99a 100644
--- a/vr/1.0/vts/functional/Android.bp
+++ b/vr/1.0/vts/functional/Android.bp
@@ -15,16 +15,16 @@
 //
 
 cc_test {
-    name: "vr_hidl_hal_test",
-    gtest: true,
-    srcs: ["vr_hidl_hal_test.cpp"],
+    name: "VtsHalVrV1_0TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalVrV1_0TargetTest.cpp"],
     shared_libs: [
         "liblog",
         "libhidlbase",
         "libutils",
         "android.hardware.vr@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
        "-O0",
         "-g",
diff --git a/vr/1.0/vts/functional/vr_hidl_hal_test.cpp b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
similarity index 92%
rename from vr/1.0/vts/functional/vr_hidl_hal_test.cpp
rename to vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
index 29888fd..a983731 100644
--- a/vr/1.0/vts/functional/vr_hidl_hal_test.cpp
+++ b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
@@ -18,7 +18,7 @@
 #include <android-base/logging.h>
 #include <android/hardware/vr/1.0/IVr.h>
 #include <android/log.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 #include <hardware/vr.h>
 
 using ::android::hardware::vr::V1_0::IVr;
@@ -26,13 +26,11 @@
 using ::android::hardware::Void;
 using ::android::sp;
 
-#define VR_SERVICE_NAME "vr"
-
 // The main test class for VR HIDL HAL.
-class VrHidlTest : public ::testing::Test {
+class VrHidlTest : public ::testing::VtsHalHidlTargetTestBase {
  public:
   void SetUp() override {
-    vr = IVr::getService(VR_SERVICE_NAME);
+    vr = ::testing::VtsHalHidlTargetTestBase::getService<IVr>();
     ASSERT_NE(vr, nullptr);
   }
 
diff --git a/wifi/1.0/Android.mk b/wifi/1.0/Android.mk
index 4476b14..eabc63d 100644
--- a/wifi/1.0/Android.mk
+++ b/wifi/1.0/Android.mk
@@ -796,25 +796,6 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build types.hal (StaBackgroundScanBand)
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBand.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.wifi@1.0::types.StaBackgroundScanBand
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBucketEventReportSchemeMask.java
@@ -1062,6 +1043,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (StaScanLimits)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/StaScanLimits.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.wifi@1.0::types.StaScanLimits
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (StaScanResult)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/StaScanResult.java
@@ -1081,6 +1081,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (WifiBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiBand.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.wifi@1.0::types.WifiBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (WifiChannelInfo)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiChannelInfo.java
@@ -2599,25 +2618,6 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build types.hal (StaBackgroundScanBand)
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBand.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.wifi@1.0::types.StaBackgroundScanBand
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBucketEventReportSchemeMask.java
@@ -2865,6 +2865,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (StaScanLimits)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/StaScanLimits.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.wifi@1.0::types.StaScanLimits
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (StaScanResult)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/StaScanResult.java
@@ -2884,6 +2903,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (WifiBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiBand.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.wifi@1.0::types.WifiBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (WifiChannelInfo)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiChannelInfo.java
diff --git a/wifi/1.0/IWifiApIface.hal b/wifi/1.0/IWifiApIface.hal
index aeca2cd..1f6ee7c 100644
--- a/wifi/1.0/IWifiApIface.hal
+++ b/wifi/1.0/IWifiApIface.hal
@@ -33,4 +33,21 @@
    *         |WifiStatusCode.FAILURE_IFACE_INVALID|
    */
   setCountryCode(int8_t[2] code) generates (WifiStatus status);
+
+  /**
+   * Used to query the list of valid frequencies (depending on country code set)
+   * for the provided band.
+   *
+   * @param band Band for which the frequency list is being generated.
+   * @return status WifiStatus of the operation.
+   *         Possible status codes:
+   *         |WifiStatusCode.SUCCESS|,
+   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
+   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
+   *         |WifiStatusCode.ERROR_UNKNOWN|
+   * @return frequencies vector of valid frequencies for the provided band.
+   */
+  getValidFrequenciesForBand(WifiBand band)
+      generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
 };
diff --git a/wifi/1.0/IWifiChip.hal b/wifi/1.0/IWifiChip.hal
index b0598a4..611c449 100644
--- a/wifi/1.0/IWifiChip.hal
+++ b/wifi/1.0/IWifiChip.hal
@@ -629,6 +629,19 @@
   forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status);
 
   /**
+   * API to stop the debug data collection for all ring buffers.
+   *
+   * @return status WifiStatus of the operation.
+   *         Possible status codes:
+   *         |WifiStatusCode.SUCCESS|,
+   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+   *         |WifiStatusCode.NOT_AVAILABLE|,
+   *         |WifiStatusCode.UNKNOWN|
+   */
+  stopLoggingToDebugRingBuffer() generates (WifiStatus status);
+
+  /**
    * API to retrieve the wifi wake up reason stats for debugging.
    * The driver is expected to start maintaining these stats once the chip
    * is configured using |configureChip|. These stats must be reset whenever
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 96dc54a..43c3126 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -180,7 +180,6 @@
    * for the provided band. These channels may be specifed in the
    * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
    * request.
-   * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
    *
    * @param band Band for which the frequency list is being generated.
    * @return status WifiStatus of the operation.
@@ -192,7 +191,7 @@
    *         |WifiStatusCode.ERROR_UNKNOWN|
    * @return frequencies vector of valid frequencies for the provided band.
    */
-  getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band)
+  getValidFrequenciesForBand(WifiBand band)
       generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
 
   /**
diff --git a/wifi/1.0/IWifiStaIfaceEventCallback.hal b/wifi/1.0/IWifiStaIfaceEventCallback.hal
index e8df4c2..e51ea6d 100644
--- a/wifi/1.0/IWifiStaIfaceEventCallback.hal
+++ b/wifi/1.0/IWifiStaIfaceEventCallback.hal
@@ -31,9 +31,12 @@
    * |StaBackgroundScanBucketParameters.eventReportScheme|.
    *
    * @param cmdId command ID corresponding to the request.
+   * @param bucketsScanned Bitset where each bit indicates if the bucket with
+   *        that index (starting at 0) was scanned.
    * @parm result Full scan result for an AP.
    */
-  oneway onBackgroundFullScanResult(CommandId cmdId, StaScanResult result);
+  oneway onBackgroundFullScanResult(
+      CommandId cmdId, uint32_t bucketsScanned, StaScanResult result);
 
   /**
    * Called when the |StaBackgroundScanBucketParameters.eventReportScheme| flags
diff --git a/wifi/1.0/default/Android.mk b/wifi/1.0/default/Android.mk
index 2d2d898..00e5f98 100644
--- a/wifi/1.0/default/Android.mk
+++ b/wifi/1.0/default/Android.mk
@@ -39,7 +39,6 @@
     libcutils \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     liblog \
     libnl \
     libutils \
diff --git a/wifi/1.0/default/android.hardware.wifi@1.0-service.rc b/wifi/1.0/default/android.hardware.wifi@1.0-service.rc
index c0ae4d4..696b1f9 100644
--- a/wifi/1.0/default/android.hardware.wifi@1.0-service.rc
+++ b/wifi/1.0/default/android.hardware.wifi@1.0-service.rc
@@ -1,4 +1,4 @@
 service wifi_hal_legacy /vendor/bin/hw/android.hardware.wifi@1.0-service
     class hal
     user wifi
-    group wifi
+    group wifi gps
diff --git a/wifi/1.0/default/hidl_callback_util.h b/wifi/1.0/default/hidl_callback_util.h
new file mode 100644
index 0000000..7136279
--- /dev/null
+++ b/wifi/1.0/default/hidl_callback_util.h
@@ -0,0 +1,121 @@
+/*
+ * 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.
+ */
+
+#ifndef HIDL_CALLBACK_UTIL_H_
+#define HIDL_CALLBACK_UTIL_H_
+
+#include <set>
+
+#include <hidl/HidlSupport.h>
+
+namespace {
+// Type of callback invoked by the death handler.
+using on_death_cb_function = std::function<void(uint64_t)>;
+
+// Private class used to keep track of death of individual
+// callbacks stored in HidlCallbackHandler.
+template <typename CallbackType>
+class HidlDeathHandler : public android::hardware::hidl_death_recipient {
+ public:
+  HidlDeathHandler(const on_death_cb_function& user_cb_function)
+      : cb_function_(user_cb_function) {}
+  ~HidlDeathHandler() = default;
+
+  // Death notification for callbacks.
+  void serviceDied(
+      uint64_t cookie,
+      const android::wp<android::hidl::base::V1_0::IBase>& /* who */) override {
+    cb_function_(cookie);
+  }
+
+ private:
+  on_death_cb_function cb_function_;
+
+  DISALLOW_COPY_AND_ASSIGN(HidlDeathHandler);
+};
+}  // namespace
+
+namespace android {
+namespace hardware {
+namespace wifi {
+namespace V1_0 {
+namespace implementation {
+namespace hidl_callback_util {
+template <typename CallbackType>
+// Provides a class to manage callbacks for the various HIDL interfaces and
+// handle the death of the process hosting each callback.
+class HidlCallbackHandler {
+ public:
+  HidlCallbackHandler()
+      : death_handler_(new HidlDeathHandler<CallbackType>(
+            std::bind(&HidlCallbackHandler::onObjectDeath,
+                      this,
+                      std::placeholders::_1))) {}
+  ~HidlCallbackHandler() = default;
+
+  bool addCallback(const sp<CallbackType>& cb) {
+    // TODO(b/33818800): Can't compare proxies yet. So, use the cookie
+    // (callback proxy's raw pointer) to track the death of individual clients.
+    uint64_t cookie = reinterpret_cast<uint64_t>(cb.get());
+    if (cb_set_.find(cb) != cb_set_.end()) {
+      LOG(WARNING) << "Duplicate death notification registration";
+      return true;
+    }
+    if (!cb->linkToDeath(death_handler_, cookie)) {
+      LOG(ERROR) << "Failed to register death notification";
+      return false;
+    }
+    cb_set_.insert(cb);
+    return true;
+  }
+
+  const std::set<android::sp<CallbackType>> getCallbacks() { return cb_set_; }
+
+  // Death notification for callbacks.
+  void onObjectDeath(uint64_t cookie) {
+    CallbackType* cb = reinterpret_cast<CallbackType*>(cookie);
+    const auto& iter = cb_set_.find(cb);
+    if (iter == cb_set_.end()) {
+      LOG(ERROR) << "Unknown callback death notification received";
+      return;
+    }
+    cb_set_.erase(iter);
+    LOG(DEBUG) << "Dead callback removed from list";
+  }
+
+  void invalidate() {
+    for (const sp<CallbackType>& cb : cb_set_) {
+      if (!cb->unlinkToDeath(death_handler_)) {
+        LOG(ERROR) << "Failed to deregister death notification";
+      }
+    }
+    cb_set_.clear();
+  }
+
+ private:
+  std::set<sp<CallbackType>> cb_set_;
+  sp<HidlDeathHandler<CallbackType>> death_handler_;
+
+  DISALLOW_COPY_AND_ASSIGN(HidlCallbackHandler);
+};
+
+}  // namespace hidl_callback_util
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace wifi
+}  // namespace hardware
+}  // namespace android
+#endif  // HIDL_CALLBACK_UTIL_H_
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 4dd1ba6..a89f8c0 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -96,7 +96,7 @@
   if (!hidl_caps) {
     return false;
   }
-  *hidl_caps = 0;
+  *hidl_caps = {};
   using HidlChipCaps = IWifiChip::ChipCapabilityMask;
   for (const auto feature : {legacy_hal::WIFI_LOGGER_MEMORY_DUMP_SUPPORTED,
                              legacy_hal::WIFI_LOGGER_DRIVER_DUMP_SUPPORTED,
@@ -133,6 +133,7 @@
   if (!hidl_status) {
     return false;
   }
+  *hidl_status = {};
   hidl_status->ringName = reinterpret_cast<const char*>(legacy_status.name);
   hidl_status->flags = 0;
   for (const auto flag : {WIFI_RING_BUFFER_FLAG_HAS_BINARY_ENTRIES,
@@ -165,7 +166,7 @@
   if (!hidl_status_vec) {
     return false;
   }
-  hidl_status_vec->clear();
+  *hidl_status_vec = {};
   for (const auto& legacy_status : legacy_status_vec) {
     WifiDebugRingBufferStatus hidl_status;
     if (!convertLegacyDebugRingBufferStatusToHidl(legacy_status,
@@ -183,6 +184,7 @@
   if (!hidl_stats) {
     return false;
   }
+  *hidl_stats = {};
   hidl_stats->totalCmdEventWakeCnt =
       legacy_stats.wake_reason_cnt.total_cmd_event_wake;
   hidl_stats->cmdEventWakeCntPerType = legacy_stats.cmd_event_wake_cnt;
@@ -227,6 +229,7 @@
   if (!hidl_caps) {
     return false;
   }
+  *hidl_caps = {};
   *hidl_caps = 0;
   using HidlStaIfaceCaps = IWifiStaIface::StaIfaceCapabilityMask;
   for (const auto feature : {legacy_hal::WIFI_LOGGER_PACKET_FATE_SUPPORTED}) {
@@ -263,6 +266,7 @@
   if (!hidl_caps) {
     return false;
   }
+  *hidl_caps = {};
   hidl_caps->version = legacy_caps.version;
   hidl_caps->maxLength = legacy_caps.max_len;
   return true;
@@ -299,6 +303,7 @@
   if (!hidl_caps) {
     return false;
   }
+  *hidl_caps = {};
   hidl_caps->maxCacheSize = legacy_caps.max_scan_cache_size;
   hidl_caps->maxBuckets = legacy_caps.max_scan_buckets;
   hidl_caps->maxApCachePerScan = legacy_caps.max_ap_cache_per_scan;
@@ -306,21 +311,21 @@
   return true;
 }
 
-legacy_hal::wifi_band convertHidlGscanBandToLegacy(StaBackgroundScanBand band) {
+legacy_hal::wifi_band convertHidlWifiBandToLegacy(WifiBand band) {
   switch (band) {
-    case StaBackgroundScanBand::BAND_UNSPECIFIED:
+    case WifiBand::BAND_UNSPECIFIED:
       return legacy_hal::WIFI_BAND_UNSPECIFIED;
-    case StaBackgroundScanBand::BAND_24GHZ:
+    case WifiBand::BAND_24GHZ:
       return legacy_hal::WIFI_BAND_BG;
-    case StaBackgroundScanBand::BAND_5GHZ:
+    case WifiBand::BAND_5GHZ:
       return legacy_hal::WIFI_BAND_A;
-    case StaBackgroundScanBand::BAND_5GHZ_DFS:
+    case WifiBand::BAND_5GHZ_DFS:
       return legacy_hal::WIFI_BAND_A_DFS;
-    case StaBackgroundScanBand::BAND_5GHZ_WITH_DFS:
+    case WifiBand::BAND_5GHZ_WITH_DFS:
       return legacy_hal::WIFI_BAND_A_WITH_DFS;
-    case StaBackgroundScanBand::BAND_24GHZ_5GHZ:
+    case WifiBand::BAND_24GHZ_5GHZ:
       return legacy_hal::WIFI_BAND_ABG;
-    case StaBackgroundScanBand::BAND_24GHZ_5GHZ_WITH_DFS:
+    case WifiBand::BAND_24GHZ_5GHZ_WITH_DFS:
       return legacy_hal::WIFI_BAND_ABG_WITH_DFS;
   };
   CHECK(false);
@@ -332,13 +337,13 @@
   if (!legacy_scan_params) {
     return false;
   }
+  *legacy_scan_params = {};
   legacy_scan_params->base_period = hidl_scan_params.basePeriodInMs;
   legacy_scan_params->max_ap_per_scan = hidl_scan_params.maxApPerScan;
   legacy_scan_params->report_threshold_percent =
       hidl_scan_params.reportThresholdPercent;
   legacy_scan_params->report_threshold_num_scans =
       hidl_scan_params.reportThresholdNumScans;
-  // TODO(b/33194311): Expose these max limits in the HIDL interface.
   if (hidl_scan_params.buckets.size() > MAX_BUCKETS) {
     return false;
   }
@@ -349,9 +354,12 @@
         hidl_scan_params.buckets[bucket_idx];
     legacy_hal::wifi_scan_bucket_spec& legacy_bucket_spec =
         legacy_scan_params->buckets[bucket_idx];
-    legacy_bucket_spec.bucket = bucket_idx;
+    if (hidl_bucket_spec.bucketIdx >= MAX_BUCKETS) {
+      return false;
+    }
+    legacy_bucket_spec.bucket = hidl_bucket_spec.bucketIdx;
     legacy_bucket_spec.band =
-        static_cast<legacy_hal::wifi_band>(hidl_bucket_spec.band);
+        convertHidlWifiBandToLegacy(hidl_bucket_spec.band);
     legacy_bucket_spec.period = hidl_bucket_spec.periodInMs;
     legacy_bucket_spec.max_period = hidl_bucket_spec.exponentialMaxPeriodInMs;
     legacy_bucket_spec.base = hidl_bucket_spec.exponentialBase;
@@ -366,7 +374,6 @@
             convertHidlGscanReportEventFlagToLegacy(flag);
       }
     }
-    // TODO(b/33194311): Expose these max limits in the HIDL interface.
     if (hidl_bucket_spec.frequencies.size() > MAX_CHANNELS) {
       return false;
     }
@@ -386,6 +393,7 @@
   if (!hidl_ie) {
     return false;
   }
+  *hidl_ie = {};
   hidl_ie->id = legacy_ie.id;
   hidl_ie->data =
       std::vector<uint8_t>(legacy_ie.data, legacy_ie.data + legacy_ie.len);
@@ -398,6 +406,7 @@
   if (!ie_blob || !hidl_ies) {
     return false;
   }
+  *hidl_ies = {};
   const uint8_t* ies_begin = ie_blob;
   const uint8_t* ies_end = ie_blob + ie_blob_len;
   const uint8_t* next_ie = ies_begin;
@@ -428,10 +437,11 @@
   if (!hidl_scan_result) {
     return false;
   }
+  *hidl_scan_result = {};
   hidl_scan_result->timeStampInUs = legacy_scan_result.ts;
   hidl_scan_result->ssid = std::vector<uint8_t>(
       legacy_scan_result.ssid,
-      legacy_scan_result.ssid + sizeof(legacy_scan_result.ssid));
+      legacy_scan_result.ssid + strlen(legacy_scan_result.ssid));
   memcpy(hidl_scan_result->bssid.data(),
          legacy_scan_result.bssid,
          hidl_scan_result->bssid.size());
@@ -458,6 +468,7 @@
   if (!hidl_scan_data) {
     return false;
   }
+  *hidl_scan_data = {};
   hidl_scan_data->flags = 0;
   for (const auto flag : {legacy_hal::WIFI_SCAN_FLAG_INTERRUPTED}) {
     if (legacy_cached_scan_result.flags & flag) {
@@ -494,7 +505,7 @@
   if (!hidl_scan_datas) {
     return false;
   }
-  hidl_scan_datas->clear();
+  *hidl_scan_datas = {};
   for (const auto& legacy_cached_scan_result : legacy_cached_scan_results) {
     StaScanData hidl_scan_data;
     if (!convertLegacyCachedGscanResultsToHidl(legacy_cached_scan_result,
@@ -581,6 +592,7 @@
   if (!hidl_frame) {
     return false;
   }
+  *hidl_frame = {};
   hidl_frame->frameType =
       convertLegacyDebugPacketFateFrameTypeToHidl(legacy_frame.payload_type);
   hidl_frame->frameLen = legacy_frame.frame_len;
@@ -599,6 +611,7 @@
   if (!hidl_fate) {
     return false;
   }
+  *hidl_fate = {};
   hidl_fate->fate = convertLegacyDebugTxPacketFateToHidl(legacy_fate.fate);
   return convertLegacyDebugPacketFateFrameToHidl(legacy_fate.frame_inf,
                                                  &hidl_fate->frameInfo);
@@ -610,7 +623,7 @@
   if (!hidl_fates) {
     return false;
   }
-  hidl_fates->clear();
+  *hidl_fates = {};
   for (const auto& legacy_fate : legacy_fates) {
     WifiDebugTxPacketFateReport hidl_fate;
     if (!convertLegacyDebugTxPacketFateToHidl(legacy_fate, &hidl_fate)) {
@@ -627,6 +640,7 @@
   if (!hidl_fate) {
     return false;
   }
+  *hidl_fate = {};
   hidl_fate->fate = convertLegacyDebugRxPacketFateToHidl(legacy_fate.fate);
   return convertLegacyDebugPacketFateFrameToHidl(legacy_fate.frame_inf,
                                                  &hidl_fate->frameInfo);
@@ -638,7 +652,7 @@
   if (!hidl_fates) {
     return false;
   }
-  hidl_fates->clear();
+  *hidl_fates = {};
   for (const auto& legacy_fate : legacy_fates) {
     WifiDebugRxPacketFateReport hidl_fate;
     if (!convertLegacyDebugRxPacketFateToHidl(legacy_fate, &hidl_fate)) {
@@ -655,6 +669,7 @@
   if (!hidl_stats) {
     return false;
   }
+  *hidl_stats = {};
   // iface legacy_stats conversion.
   hidl_stats->iface.beaconRx = legacy_stats.iface.beacon_rx;
   hidl_stats->iface.avgRssiMgmt = legacy_stats.iface.rssi_mgmt;
@@ -708,6 +723,7 @@
   if (!hidl_caps) {
     return false;
   }
+  *hidl_caps = {};
   hidl_caps->maxBlacklistSize = legacy_caps.max_blacklist_size;
   hidl_caps->maxWhitelistSize = legacy_caps.max_whitelist_size;
   return true;
@@ -719,6 +735,7 @@
   if (!legacy_config) {
     return false;
   }
+  *legacy_config = {};
   if (hidl_config.bssidBlacklist.size() > MAX_BLACKLIST_BSSID ||
       hidl_config.ssidWhitelist.size() > MAX_WHITELIST_SSID) {
     return false;
@@ -764,7 +781,7 @@
     LOG(ERROR) << "convertHidlNanEnableRequestToLegacy: null legacy_request";
     return false;
   }
-  memset(legacy_request, 0, sizeof(legacy_hal::NanEnableRequest));
+  *legacy_request = {};
 
   legacy_request->config_2dot4g_support = 1;
   legacy_request->support_2dot4g_val = hidl_request.operateInBand[
@@ -795,9 +812,6 @@
   legacy_request->config_disc_mac_addr_randomization = 1;
   legacy_request->disc_mac_addr_rand_interval_sec =
         hidl_request.configParams.macAddressRandomizationIntervalSec;
-  legacy_request->config_responder_auto_response = 1;
-  legacy_request->ranging_auto_response_cfg = hidl_request.configParams.acceptRangingRequests ?
-       legacy_hal::NAN_RANGING_AUTO_RESPONSE_ENABLE : legacy_hal::NAN_RANGING_AUTO_RESPONSE_DISABLE;
   legacy_request->config_2dot4g_rssi_close = 1;
   if (hidl_request.configParams.bandSpecificConfig.size() != 2) {
     LOG(ERROR) << "convertHidlNanEnableRequestToLegacy: bandSpecificConfig.size() != 2";
@@ -897,7 +911,7 @@
     LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: null legacy_request";
     return false;
   }
-  memset(legacy_request, 0, sizeof(legacy_hal::NanPublishRequest));
+  *legacy_request = {};
 
   legacy_request->publish_id = hidl_request.baseConfigs.sessionId;
   legacy_request->ttl = hidl_request.baseConfigs.ttlSec;
@@ -920,7 +934,15 @@
   memcpy(legacy_request->service_specific_info,
         hidl_request.baseConfigs.serviceSpecificInfo.data(),
         legacy_request->service_specific_info_len);
-  // TODO: b/35193423 add support for extended service specific info
+  legacy_request->sdea_service_specific_info_len =
+        hidl_request.baseConfigs.extendedServiceSpecificInfo.size();
+  if (legacy_request->sdea_service_specific_info_len > NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN) {
+    LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: sdea_service_specific_info_len too large";
+    return false;
+  }
+  memcpy(legacy_request->sdea_service_specific_info,
+        hidl_request.baseConfigs.extendedServiceSpecificInfo.data(),
+        legacy_request->sdea_service_specific_info_len);
   legacy_request->rx_match_filter_len = hidl_request.baseConfigs.rxMatchFilter.size();
   if (legacy_request->rx_match_filter_len > NAN_MAX_MATCH_FILTER_LEN) {
     LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: rx_match_filter_len too large";
@@ -945,7 +967,7 @@
         hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
   legacy_request->recv_indication_cfg |=
         hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
-  legacy_request->cipher_type = hidl_request.baseConfigs.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
   legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: pmk_len too large";
@@ -963,8 +985,13 @@
         hidl_request.baseConfigs.configRangingIndications;
   legacy_request->ranging_cfg.distance_ingress_cm = hidl_request.baseConfigs.distanceIngressCm;
   legacy_request->ranging_cfg.distance_egress_cm = hidl_request.baseConfigs.distanceEgressCm;
+  legacy_request->ranging_auto_response = hidl_request.baseConfigs.rangingRequired ?
+        legacy_hal::NAN_RANGING_AUTO_RESPONSE_ENABLE : legacy_hal::NAN_RANGING_AUTO_RESPONSE_DISABLE;
+  legacy_request->sdea_params.range_report = legacy_hal::NAN_DISABLE_RANGE_REPORT;
   legacy_request->publish_type = (legacy_hal::NanPublishType) hidl_request.publishType;
   legacy_request->tx_type = (legacy_hal::NanTxType) hidl_request.txType;
+  legacy_request->service_responder_policy = hidl_request.autoAcceptDataPathRequests ?
+        legacy_hal::NAN_SERVICE_ACCEPT_POLICY_ALL : legacy_hal::NAN_SERVICE_ACCEPT_POLICY_NONE;
 
   return true;
 }
@@ -976,7 +1003,7 @@
     LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: legacy_request is null";
     return false;
   }
-  memset(legacy_request, 0, sizeof(legacy_hal::NanSubscribeRequest));
+  *legacy_request = {};
 
   legacy_request->subscribe_id = hidl_request.baseConfigs.sessionId;
   legacy_request->ttl = hidl_request.baseConfigs.ttlSec;
@@ -999,7 +1026,16 @@
   memcpy(legacy_request->service_specific_info,
         hidl_request.baseConfigs.serviceSpecificInfo.data(),
         legacy_request->service_specific_info_len);
-  // TODO: b/35193423 add support for extended service specific info
+  legacy_request->sdea_service_specific_info_len =
+        hidl_request.baseConfigs.extendedServiceSpecificInfo.size();
+  if (legacy_request->sdea_service_specific_info_len > NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN) {
+    LOG(ERROR) <<
+        "convertHidlNanSubscribeRequestToLegacy: sdea_service_specific_info_len too large";
+    return false;
+  }
+  memcpy(legacy_request->sdea_service_specific_info,
+        hidl_request.baseConfigs.extendedServiceSpecificInfo.data(),
+        legacy_request->sdea_service_specific_info_len);
   legacy_request->rx_match_filter_len = hidl_request.baseConfigs.rxMatchFilter.size();
   if (legacy_request->rx_match_filter_len > NAN_MAX_MATCH_FILTER_LEN) {
     LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: rx_match_filter_len too large";
@@ -1024,7 +1060,7 @@
         hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
   legacy_request->recv_indication_cfg |=
         hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
-  legacy_request->cipher_type = hidl_request.baseConfigs.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
   legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: pmk_len too large";
@@ -1042,6 +1078,9 @@
         hidl_request.baseConfigs.configRangingIndications;
   legacy_request->ranging_cfg.distance_ingress_cm = hidl_request.baseConfigs.distanceIngressCm;
   legacy_request->ranging_cfg.distance_egress_cm = hidl_request.baseConfigs.distanceEgressCm;
+  legacy_request->ranging_auto_response = hidl_request.baseConfigs.rangingRequired ?
+        legacy_hal::NAN_RANGING_AUTO_RESPONSE_ENABLE : legacy_hal::NAN_RANGING_AUTO_RESPONSE_DISABLE;
+  legacy_request->sdea_params.range_report = legacy_hal::NAN_DISABLE_RANGE_REPORT;
   legacy_request->subscribe_type = (legacy_hal::NanSubscribeType) hidl_request.subscribeType;
   legacy_request->serviceResponseFilter = (legacy_hal::NanSRFType) hidl_request.srfType;
   legacy_request->serviceResponseInclude = hidl_request.srfRespondIfInAddressSet ?
@@ -1069,7 +1108,7 @@
     LOG(ERROR) << "convertHidlNanTransmitFollowupRequestToLegacy: legacy_request is null";
     return false;
   }
-  memset(legacy_request, 0, sizeof(legacy_hal::NanTransmitFollowupRequest));
+  *legacy_request = {};
 
   legacy_request->publish_subscribe_id = hidl_request.discoverySessionId;
   legacy_request->requestor_instance_id = hidl_request.peerId;
@@ -1080,13 +1119,22 @@
         legacy_hal::NAN_TRANSMIT_IN_DW : legacy_hal::NAN_TRANSMIT_IN_FAW;
   legacy_request->service_specific_info_len = hidl_request.serviceSpecificInfo.size();
   if (legacy_request->service_specific_info_len > NAN_MAX_SERVICE_SPECIFIC_INFO_LEN) {
-    LOG(ERROR) << "convertHidlNanTransmitFollowupRequestToLegacy: service_specific_info_len too large";
+    LOG(ERROR) <<
+        "convertHidlNanTransmitFollowupRequestToLegacy: service_specific_info_len too large";
     return false;
   }
   memcpy(legacy_request->service_specific_info,
         hidl_request.serviceSpecificInfo.data(),
         legacy_request->service_specific_info_len);
-  // TODO: b/35193423 add support for extended service specific info
+  legacy_request->sdea_service_specific_info_len = hidl_request.extendedServiceSpecificInfo.size();
+  if (legacy_request->sdea_service_specific_info_len > NAN_MAX_SDEA_SERVICE_SPECIFIC_INFO_LEN) {
+    LOG(ERROR) <<
+        "convertHidlNanTransmitFollowupRequestToLegacy: sdea_service_specific_info_len too large";
+    return false;
+  }
+  memcpy(legacy_request->sdea_service_specific_info,
+        hidl_request.extendedServiceSpecificInfo.data(),
+        legacy_request->sdea_service_specific_info_len);
   legacy_request->recv_indication_cfg = hidl_request.disableFollowupResultIndication ? 0x1 : 0x0;
 
   return true;
@@ -1099,7 +1147,7 @@
     LOG(ERROR) << "convertHidlNanConfigRequestToLegacy: legacy_request is null";
     return false;
   }
-  memset(legacy_request, 0, sizeof(legacy_hal::NanConfigRequest));
+  *legacy_request = {};
 
   // TODO: b/34059183 tracks missing configurations in legacy HAL or uknown defaults
   legacy_request->master_pref = hidl_request.masterPref;
@@ -1123,9 +1171,6 @@
   legacy_request->config_disc_mac_addr_randomization = 1;
   legacy_request->disc_mac_addr_rand_interval_sec =
         hidl_request.macAddressRandomizationIntervalSec;
-  legacy_request->config_responder_auto_response = 1;
-  legacy_request->ranging_auto_response_cfg = hidl_request.acceptRangingRequests ?
-       legacy_hal::NAN_RANGING_AUTO_RESPONSE_ENABLE : legacy_hal::NAN_RANGING_AUTO_RESPONSE_DISABLE;
   /* TODO : missing
   legacy_request->config_2dot4g_rssi_close = 1;
   legacy_request->rssi_close_2dot4g_val =
@@ -1192,7 +1237,7 @@
     LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: legacy_request is null";
     return false;
   }
-  memset(legacy_request, 0, sizeof(legacy_hal::NanDataPathInitiatorRequest));
+  *legacy_request = {};
 
   legacy_request->requestor_instance_id = hidl_request.peerId;
   memcpy(legacy_request->peer_disc_mac_addr, hidl_request.peerDiscMacAddr.data(), 6);
@@ -1204,14 +1249,15 @@
         legacy_hal::NAN_DP_CONFIG_SECURITY : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
   legacy_request->app_info.ndp_app_info_len = hidl_request.appInfo.size();
   if (legacy_request->app_info.ndp_app_info_len > NAN_DP_MAX_APP_INFO_LEN) {
-    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: ndp_app_info_len to large";
+    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: ndp_app_info_len too large";
     return false;
   }
   memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
         legacy_request->app_info.ndp_app_info_len);
-  legacy_request->cipher_type = hidl_request.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
   legacy_request->pmk_len = hidl_request.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
+    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: pmk_len too large";
     return false;
   }
   memcpy(legacy_request->pmk, hidl_request.pmk.data(), legacy_request->pmk_len);
@@ -1226,7 +1272,7 @@
     LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: legacy_request is null";
     return false;
   }
-  memset(legacy_request, 0, sizeof(legacy_hal::NanDataPathIndicationResponse));
+  *legacy_request = {};
 
   legacy_request->rsp_code = hidl_request.acceptRequest ?
         legacy_hal::NAN_DP_REQUEST_ACCEPT : legacy_hal::NAN_DP_REQUEST_REJECT;
@@ -1241,7 +1287,7 @@
   }
   memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
         legacy_request->app_info.ndp_app_info_len);
-  legacy_request->cipher_type = hidl_request.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
   legacy_request->pmk_len = hidl_request.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: pmk_len too large";
@@ -1259,9 +1305,10 @@
     LOG(ERROR) << "convertLegacyNanResponseHeaderToHidl: wifiNanStatus is null";
     return false;
   }
+  *wifiNanStatus = {};
+
   wifiNanStatus->status = convertLegacyNanStatusTypeToHidl(legacy_response.status);
   wifiNanStatus->description = legacy_response.nan_error;
-
   return true;
 }
 
@@ -1272,6 +1319,8 @@
     LOG(ERROR) << "convertLegacyNanCapabilitiesResponseToHidl: hidl_response is null";
     return false;
   }
+  *hidl_response = {};
+
   hidl_response->maxConcurrentClusters = legacy_response.max_concurrent_nan_clusters;
   hidl_response->maxPublishes = legacy_response.max_publishes;
   hidl_response->maxSubscribes = legacy_response.max_subscribes;
@@ -1279,14 +1328,13 @@
   hidl_response->maxMatchFilterLen = legacy_response.max_match_filter_len;
   hidl_response->maxTotalMatchFilterLen = legacy_response.max_total_match_filter_len;
   hidl_response->maxServiceSpecificInfoLen = legacy_response.max_service_specific_info_len;
-  // TODO: b/35193423 add support for extended service specific info
-  hidl_response->maxExtendedServiceSpecificInfoLen = 0;
+  hidl_response->maxExtendedServiceSpecificInfoLen =
+    legacy_response.max_sdea_service_specific_info_len;
   hidl_response->maxNdiInterfaces = legacy_response.max_ndi_interfaces;
   hidl_response->maxNdpSessions = legacy_response.max_ndp_sessions;
   hidl_response->maxAppInfoLen = legacy_response.max_app_info_len;
   hidl_response->maxQueuedTransmitFollowupMsgs = legacy_response.max_queued_transmit_followup_msgs;
-  // TODO: b/34059183 to add to underlying HAL
-  hidl_response->maxSubscribeInterfaceAddresses = NAN_MAX_SUBSCRIBE_MAX_ADDRESS;
+  hidl_response->maxSubscribeInterfaceAddresses = legacy_response.max_subscribe_address;
   hidl_response->supportedCipherSuites = legacy_response.cipher_suites_supported;
 
   return true;
@@ -1299,24 +1347,28 @@
     LOG(ERROR) << "convertLegacyNanMatchIndToHidl: hidl_ind is null";
     return false;
   }
+  *hidl_ind = {};
+
   hidl_ind->discoverySessionId = legacy_ind.publish_subscribe_id;
   hidl_ind->peerId = legacy_ind.requestor_instance_id;
   hidl_ind->addr = hidl_array<uint8_t, 6>(legacy_ind.addr);
   hidl_ind->serviceSpecificInfo = std::vector<uint8_t>(legacy_ind.service_specific_info,
         legacy_ind.service_specific_info + legacy_ind.service_specific_info_len);
-  // TODO: b/35193423 add support for extended service specific info
+  hidl_ind->extendedServiceSpecificInfo = std::vector<uint8_t>(
+        legacy_ind.sdea_service_specific_info,
+        legacy_ind.sdea_service_specific_info + legacy_ind.sdea_service_specific_info_len);
   hidl_ind->matchFilter = std::vector<uint8_t>(legacy_ind.sdf_match_filter,
         legacy_ind.sdf_match_filter + legacy_ind.sdf_match_filter_len);
   hidl_ind->matchOccuredInBeaconFlag = legacy_ind.match_occured_flag == 1;
   hidl_ind->outOfResourceFlag = legacy_ind.out_of_resource_flag == 1;
   hidl_ind->rssiValue = legacy_ind.rssi_value;
-  hidl_ind->peerSupportedCipherTypes = legacy_ind.peer_cipher_type;
+  hidl_ind->peerCipherType = (NanCipherSuiteType) legacy_ind.peer_cipher_type;
   hidl_ind->peerRequiresSecurityEnabledInNdp =
         legacy_ind.peer_sdea_params.security_cfg == legacy_hal::NAN_DP_CONFIG_SECURITY;
   hidl_ind->peerRequiresRanging =
         legacy_ind.peer_sdea_params.ranging_state == legacy_hal::NAN_RANGING_ENABLE;
-  hidl_ind->rangingMeasurementInCm = legacy_ind.range_result.range_measurement_cm;
-  hidl_ind->rangingIndicationType = legacy_ind.range_result.ranging_event_type;
+  hidl_ind->rangingMeasurementInCm = legacy_ind.range_info.range_measurement_cm;
+  hidl_ind->rangingIndicationType = legacy_ind.range_info.ranging_event_type;
 
   return true;
 }
@@ -1328,12 +1380,17 @@
     LOG(ERROR) << "convertLegacyNanFollowupIndToHidl: hidl_ind is null";
     return false;
   }
+  *hidl_ind = {};
+
   hidl_ind->discoverySessionId = legacy_ind.publish_subscribe_id;
   hidl_ind->peerId = legacy_ind.requestor_instance_id;
   hidl_ind->addr = hidl_array<uint8_t, 6>(legacy_ind.addr);
   hidl_ind->receivedInFaw = legacy_ind.dw_or_faw == 1;
   hidl_ind->serviceSpecificInfo = std::vector<uint8_t>(legacy_ind.service_specific_info,
         legacy_ind.service_specific_info + legacy_ind.service_specific_info_len);
+  hidl_ind->extendedServiceSpecificInfo = std::vector<uint8_t>(
+        legacy_ind.sdea_service_specific_info,
+        legacy_ind.sdea_service_specific_info + legacy_ind.sdea_service_specific_info_len);
 
   return true;
 }
@@ -1345,6 +1402,8 @@
     LOG(ERROR) << "convertLegacyNanDataPathRequestIndToHidl: hidl_ind is null";
     return false;
   }
+  *hidl_ind = {};
+
   hidl_ind->discoverySessionId = legacy_ind.service_instance_id;
   hidl_ind->peerDiscMacAddr = hidl_array<uint8_t, 6>(legacy_ind.peer_disc_mac_addr);
   hidl_ind->ndpInstanceId = legacy_ind.ndp_instance_id;
@@ -1363,6 +1422,8 @@
     LOG(ERROR) << "convertLegacyNanDataPathConfirmIndToHidl: hidl_ind is null";
     return false;
   }
+  *hidl_ind = {};
+
   hidl_ind->ndpInstanceId = legacy_ind.ndp_instance_id;
   hidl_ind->dataPathSetupSuccess = legacy_ind.rsp_code == legacy_hal::NAN_DP_REQUEST_ACCEPT;
   hidl_ind->peerNdiMacAddr = hidl_array<uint8_t, 6>(legacy_ind.peer_ndi_mac_addr);
@@ -1604,6 +1665,7 @@
   if (!legacy_info) {
     return false;
   }
+  *legacy_info = {};
   legacy_info->width = convertHidlWifiChannelWidthToLegacy(hidl_info.width);
   legacy_info->center_freq = hidl_info.centerFreq;
   legacy_info->center_freq0 = hidl_info.centerFreq0;
@@ -1617,6 +1679,7 @@
   if (!hidl_info) {
     return false;
   }
+  *hidl_info = {};
   hidl_info->width = convertLegacyWifiChannelWidthToHidl(legacy_info.width);
   hidl_info->centerFreq = legacy_info.center_freq;
   hidl_info->centerFreq0 = legacy_info.center_freq0;
@@ -1629,6 +1692,7 @@
   if (!legacy_config) {
     return false;
   }
+  *legacy_config = {};
   CHECK(hidl_config.addr.size() == sizeof(legacy_config->addr));
   memcpy(legacy_config->addr, hidl_config.addr.data(), hidl_config.addr.size());
   legacy_config->type = convertHidlRttTypeToLegacy(hidl_config.type);
@@ -1657,7 +1721,7 @@
   if (!legacy_configs) {
     return false;
   }
-  legacy_configs->clear();
+  *legacy_configs = {};
   for (const auto& hidl_config : hidl_configs) {
     legacy_hal::wifi_rtt_config legacy_config;
     if (!convertHidlRttConfigToLegacy(hidl_config, &legacy_config)) {
@@ -1674,6 +1738,7 @@
   if (!legacy_info) {
     return false;
   }
+  *legacy_info = {};
   legacy_info->latitude = hidl_info.latitude;
   legacy_info->longitude = hidl_info.longitude;
   legacy_info->altitude = hidl_info.altitude;
@@ -1694,6 +1759,7 @@
   if (!legacy_info) {
     return false;
   }
+  *legacy_info = {};
   CHECK(hidl_info.countryCode.size() == sizeof(legacy_info->country_code));
   memcpy(legacy_info->country_code,
          hidl_info.countryCode.data(),
@@ -1714,6 +1780,7 @@
   if (!legacy_responder) {
     return false;
   }
+  *legacy_responder = {};
   if (!convertHidlWifiChannelInfoToLegacy(hidl_responder.channel,
                                           &legacy_responder->channel)) {
     return false;
@@ -1729,6 +1796,7 @@
   if (!hidl_responder) {
     return false;
   }
+  *hidl_responder = {};
   if (!convertLegacyWifiChannelInfoToHidl(legacy_responder.channel,
                                           &hidl_responder->channel)) {
     return false;
@@ -1744,6 +1812,7 @@
   if (!hidl_capabilities) {
     return false;
   }
+  *hidl_capabilities = {};
   hidl_capabilities->rttOneSidedSupported =
       legacy_capabilities.rtt_one_sided_supported;
   hidl_capabilities->rttFtmSupported = legacy_capabilities.rtt_ftm_supported;
@@ -1783,6 +1852,7 @@
   if (!hidl_rate) {
     return false;
   }
+  *hidl_rate = {};
   hidl_rate->preamble =
       convertLegacyWifiRatePreambleToHidl(legacy_rate.preamble);
   hidl_rate->nss = convertLegacyWifiRateNssToHidl(legacy_rate.nss);
@@ -1798,6 +1868,7 @@
   if (!hidl_result) {
     return false;
   }
+  *hidl_result = {};
   CHECK(sizeof(legacy_result.addr) == hidl_result->addr.size());
   memcpy(
       hidl_result->addr.data(), legacy_result.addr, sizeof(legacy_result.addr));
@@ -1827,10 +1898,12 @@
   hidl_result->timeStampInUs = legacy_result.ts;
   hidl_result->burstDurationInMs = legacy_result.burst_duration;
   hidl_result->negotiatedBurstNum = legacy_result.negotiated_burst_num;
-  if (!convertLegacyIeToHidl(*legacy_result.LCI, &hidl_result->lci)) {
+  if (legacy_result.LCI && !convertLegacyIeToHidl(*legacy_result.LCI,
+                                                  &hidl_result->lci)) {
     return false;
   }
-  if (!convertLegacyIeToHidl(*legacy_result.LCR, &hidl_result->lcr)) {
+  if (legacy_result.LCR && !convertLegacyIeToHidl(*legacy_result.LCR,
+                                                  &hidl_result->lcr)) {
     return false;
   }
   return true;
@@ -1842,7 +1915,7 @@
   if (!hidl_results) {
     return false;
   }
-  hidl_results->clear();
+  *hidl_results = {};
   for (const auto legacy_result : legacy_results) {
     RttResult hidl_result;
     if (!convertLegacyRttResultToHidl(*legacy_result, &hidl_result)) {
diff --git a/wifi/1.0/default/hidl_struct_util.h b/wifi/1.0/default/hidl_struct_util.h
index 490dcae..41e97b3 100644
--- a/wifi/1.0/default/hidl_struct_util.h
+++ b/wifi/1.0/default/hidl_struct_util.h
@@ -60,7 +60,7 @@
 bool convertLegacyGscanCapabilitiesToHidl(
     const legacy_hal::wifi_gscan_capabilities& legacy_caps,
     StaBackgroundScanCapabilities* hidl_caps);
-legacy_hal::wifi_band convertHidlGscanBandToLegacy(StaBackgroundScanBand band);
+legacy_hal::wifi_band convertHidlWifiBandToLegacy(WifiBand band);
 bool convertHidlGscanParamsToLegacy(
     const StaBackgroundScanParameters& hidl_scan_params,
     legacy_hal::wifi_scan_cmd_params* legacy_scan_params);
diff --git a/wifi/1.0/default/wifi.cpp b/wifi/1.0/default/wifi.cpp
index 8feb836..b48844e 100644
--- a/wifi/1.0/default/wifi.cpp
+++ b/wifi/1.0/default/wifi.cpp
@@ -85,8 +85,9 @@
 
 WifiStatus Wifi::registerEventCallbackInternal(
     const sp<IWifiEventCallback>& event_callback) {
-  // TODO(b/31632518): remove the callback when the client is destroyed
-  event_callbacks_.emplace_back(event_callback);
+  if (!event_cb_handler_.addCallback(event_callback)) {
+    return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN);
+  }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
 
@@ -102,18 +103,19 @@
     // Create the chip instance once the HAL is started.
     chip_ = new WifiChip(kChipId, legacy_hal_, mode_controller_);
     run_state_ = RunState::STARTED;
-    for (const auto& callback : event_callbacks_) {
+    for (const auto& callback : event_cb_handler_.getCallbacks()) {
       if (!callback->onStart().isOk()) {
         LOG(ERROR) << "Failed to invoke onStart callback";
       };
     }
   } else {
-    for (const auto& callback : event_callbacks_) {
+    for (const auto& callback : event_cb_handler_.getCallbacks()) {
       if (!callback->onFailure(wifi_status).isOk()) {
         LOG(ERROR) << "Failed to invoke onFailure callback";
       }
     }
   }
+  LOG(INFO) << "Wifi HAL started";
   return wifi_status;
 }
 
@@ -126,18 +128,25 @@
   }
   WifiStatus wifi_status = stopLegacyHalAndDeinitializeModeController();
   if (wifi_status.code == WifiStatusCode::SUCCESS) {
-    for (const auto& callback : event_callbacks_) {
+    for (const auto& callback : event_cb_handler_.getCallbacks()) {
       if (!callback->onStop().isOk()) {
         LOG(ERROR) << "Failed to invoke onStop callback";
       };
     }
   } else {
-    for (const auto& callback : event_callbacks_) {
+    for (const auto& callback : event_cb_handler_.getCallbacks()) {
       if (!callback->onFailure(wifi_status).isOk()) {
         LOG(ERROR) << "Failed to invoke onFailure callback";
       }
     }
   }
+  // Clear the chip object and its child objects since the HAL is now
+  // stopped.
+  if (chip_.get()) {
+    chip_->invalidate();
+    chip_.clear();
+  }
+  LOG(INFO) << "Wifi HAL stopped";
   return wifi_status;
 }
 
@@ -171,13 +180,7 @@
 
 WifiStatus Wifi::stopLegacyHalAndDeinitializeModeController() {
   run_state_ = RunState::STOPPING;
-  const auto on_complete_callback_ = [&]() {
-    if (chip_.get()) {
-      chip_->invalidate();
-    }
-    chip_.clear();
-    run_state_ = RunState::STOPPED;
-  };
+  const auto on_complete_callback_ = [&]() { run_state_ = RunState::STOPPED; };
   legacy_hal::wifi_error legacy_status =
       legacy_hal_->stop(on_complete_callback_);
   if (legacy_status != legacy_hal::WIFI_SUCCESS) {
diff --git a/wifi/1.0/default/wifi.h b/wifi/1.0/default/wifi.h
index 40d3552..c6fa84c 100644
--- a/wifi/1.0/default/wifi.h
+++ b/wifi/1.0/default/wifi.h
@@ -23,6 +23,7 @@
 #include <android/hardware/wifi/1.0/IWifi.h>
 #include <utils/Looper.h>
 
+#include "hidl_callback_util.h"
 #include "wifi_chip.h"
 #include "wifi_legacy_hal.h"
 #include "wifi_mode_controller.h"
@@ -71,8 +72,8 @@
   std::shared_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
   std::shared_ptr<mode_controller::WifiModeController> mode_controller_;
   RunState run_state_;
-  std::vector<sp<IWifiEventCallback>> event_callbacks_;
   sp<WifiChip> chip_;
+  hidl_callback_util::HidlCallbackHandler<IWifiEventCallback> event_cb_handler_;
 
   DISALLOW_COPY_AND_ASSIGN(Wifi);
 };
diff --git a/wifi/1.0/default/wifi_ap_iface.cpp b/wifi/1.0/default/wifi_ap_iface.cpp
index 1a8b31d..e2beec2 100644
--- a/wifi/1.0/default/wifi_ap_iface.cpp
+++ b/wifi/1.0/default/wifi_ap_iface.cpp
@@ -17,6 +17,7 @@
 #include <android-base/logging.h>
 
 #include "hidl_return_util.h"
+#include "hidl_struct_util.h"
 #include "wifi_ap_iface.h"
 #include "wifi_status_util.h"
 
@@ -64,6 +65,15 @@
                          code);
 }
 
+Return<void> WifiApIface::getValidFrequenciesForBand(
+    WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) {
+  return validateAndCall(this,
+                         WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+                         &WifiApIface::getValidFrequenciesForBandInternal,
+                         hidl_status_cb,
+                         band);
+}
+
 std::pair<WifiStatus, std::string> WifiApIface::getNameInternal() {
   return {createWifiStatus(WifiStatusCode::SUCCESS), ifname_};
 }
@@ -79,6 +89,16 @@
   return createWifiStatusFromLegacyError(legacy_status);
 }
 
+std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
+WifiApIface::getValidFrequenciesForBandInternal(WifiBand band) {
+  static_assert(sizeof(WifiChannelInMhz) == sizeof(uint32_t), "Size mismatch");
+  legacy_hal::wifi_error legacy_status;
+  std::vector<uint32_t> valid_frequencies;
+  std::tie(legacy_status, valid_frequencies) =
+      legacy_hal_.lock()->getValidFrequenciesForBand(
+          hidl_struct_util::convertHidlWifiBandToLegacy(band));
+  return {createWifiStatusFromLegacyError(legacy_status), valid_frequencies};
+}
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace wifi
diff --git a/wifi/1.0/default/wifi_ap_iface.h b/wifi/1.0/default/wifi_ap_iface.h
index 23d6435..efc168a 100644
--- a/wifi/1.0/default/wifi_ap_iface.h
+++ b/wifi/1.0/default/wifi_ap_iface.h
@@ -44,12 +44,16 @@
   Return<void> getType(getType_cb hidl_status_cb) override;
   Return<void> setCountryCode(const hidl_array<int8_t, 2>& code,
                               setCountryCode_cb hidl_status_cb) override;
+  Return<void> getValidFrequenciesForBand(
+      WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) override;
 
  private:
   // Corresponding worker functions for the HIDL methods.
   std::pair<WifiStatus, std::string> getNameInternal();
   std::pair<WifiStatus, IfaceType> getTypeInternal();
   WifiStatus setCountryCodeInternal(const std::array<int8_t, 2>& code);
+  std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
+  getValidFrequenciesForBandInternal(WifiBand band);
 
   std::string ifname_;
   std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
diff --git a/wifi/1.0/default/wifi_chip.cpp b/wifi/1.0/default/wifi_chip.cpp
index 0e2d54e..6f980c0 100644
--- a/wifi/1.0/default/wifi_chip.cpp
+++ b/wifi/1.0/default/wifi_chip.cpp
@@ -63,7 +63,7 @@
 void WifiChip::invalidate() {
   invalidateAndRemoveAllIfaces();
   legacy_hal_.reset();
-  event_callbacks_.clear();
+  event_cb_handler_.invalidate();
   is_valid_ = false;
 }
 
@@ -71,8 +71,8 @@
   return is_valid_;
 }
 
-std::vector<sp<IWifiChipEventCallback>> WifiChip::getEventCallbacks() {
-  return event_callbacks_;
+std::set<sp<IWifiChipEventCallback>> WifiChip::getEventCallbacks() {
+  return event_cb_handler_.getCallbacks();
 }
 
 Return<void> WifiChip::getId(getId_cb hidl_status_cb) {
@@ -317,6 +317,14 @@
                          ring_name);
 }
 
+Return<void> WifiChip::stopLoggingToDebugRingBuffer(
+    stopLoggingToDebugRingBuffer_cb hidl_status_cb) {
+  return validateAndCall(this,
+                         WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
+                         &WifiChip::stopLoggingToDebugRingBufferInternal,
+                         hidl_status_cb);
+}
+
 Return<void> WifiChip::getDebugHostWakeReasonStats(
     getDebugHostWakeReasonStats_cb hidl_status_cb) {
   return validateAndCall(this,
@@ -353,8 +361,9 @@
 
 WifiStatus WifiChip::registerEventCallbackInternal(
     const sp<IWifiChipEventCallback>& event_callback) {
-  // TODO(b/31632518): remove the callback when the client is destroyed
-  event_callbacks_.emplace_back(event_callback);
+  if (!event_cb_handler_.addCallback(event_callback)) {
+    return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN);
+  }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
 
@@ -414,14 +423,14 @@
   }
   WifiStatus status = handleChipConfiguration(mode_id);
   if (status.code != WifiStatusCode::SUCCESS) {
-    for (const auto& callback : event_callbacks_) {
+    for (const auto& callback : event_cb_handler_.getCallbacks()) {
       if (!callback->onChipReconfigureFailure(status).isOk()) {
         LOG(ERROR) << "Failed to invoke onChipReconfigureFailure callback";
       }
     }
     return status;
   }
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onChipReconfigured(mode_id).isOk()) {
       LOG(ERROR) << "Failed to invoke onChipReconfigured callback";
     }
@@ -503,7 +512,7 @@
   }
   std::string ifname = legacy_hal_.lock()->getApIfaceName();
   ap_iface_ = new WifiApIface(ifname, legacy_hal_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceAdded(IfaceType::AP, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
     }
@@ -533,7 +542,7 @@
     return createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS);
   }
   invalidateAndClear(ap_iface_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceRemoved(IfaceType::AP, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceRemoved callback";
     }
@@ -549,7 +558,7 @@
   }
   std::string ifname = legacy_hal_.lock()->getNanIfaceName();
   nan_iface_ = new WifiNanIface(ifname, legacy_hal_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceAdded(IfaceType::NAN, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
     }
@@ -579,7 +588,7 @@
     return createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS);
   }
   invalidateAndClear(nan_iface_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceRemoved(IfaceType::NAN, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
     }
@@ -595,7 +604,7 @@
   }
   std::string ifname = legacy_hal_.lock()->getP2pIfaceName();
   p2p_iface_ = new WifiP2pIface(ifname, legacy_hal_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceAdded(IfaceType::P2P, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
     }
@@ -625,7 +634,7 @@
     return createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS);
   }
   invalidateAndClear(p2p_iface_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceRemoved(IfaceType::P2P, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceRemoved callback";
     }
@@ -639,7 +648,7 @@
   }
   std::string ifname = legacy_hal_.lock()->getStaIfaceName();
   sta_iface_ = new WifiStaIface(ifname, legacy_hal_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceAdded(IfaceType::STA, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
     }
@@ -669,7 +678,7 @@
     return createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS);
   }
   invalidateAndClear(sta_iface_);
-  for (const auto& callback : event_callbacks_) {
+  for (const auto& callback : event_cb_handler_.getCallbacks()) {
     if (!callback->onIfaceRemoved(IfaceType::STA, ifname).isOk()) {
       LOG(ERROR) << "Failed to invoke onIfaceRemoved callback";
     }
@@ -734,6 +743,12 @@
   return createWifiStatusFromLegacyError(legacy_status);
 }
 
+WifiStatus WifiChip::stopLoggingToDebugRingBufferInternal() {
+  legacy_hal::wifi_error legacy_status =
+      legacy_hal_.lock()->deregisterRingBufferCallbackHandler();
+  return createWifiStatusFromLegacyError(legacy_status);
+}
+
 std::pair<WifiStatus, WifiDebugHostWakeReasonStats>
 WifiChip::getDebugHostWakeReasonStatsInternal() {
   legacy_hal::wifi_error legacy_status;
diff --git a/wifi/1.0/default/wifi_chip.h b/wifi/1.0/default/wifi_chip.h
index 938b180..406938c 100644
--- a/wifi/1.0/default/wifi_chip.h
+++ b/wifi/1.0/default/wifi_chip.h
@@ -22,6 +22,7 @@
 #include <android-base/macros.h>
 #include <android/hardware/wifi/1.0/IWifiChip.h>
 
+#include "hidl_callback_util.h"
 #include "wifi_ap_iface.h"
 #include "wifi_legacy_hal.h"
 #include "wifi_mode_controller.h"
@@ -62,7 +63,7 @@
   // valid before processing them.
   void invalidate();
   bool isValid();
-  std::vector<sp<IWifiChipEventCallback>> getEventCallbacks();
+  std::set<sp<IWifiChipEventCallback>> getEventCallbacks();
 
   // HIDL methods exposed.
   Return<void> getId(getId_cb hidl_status_cb) override;
@@ -118,6 +119,8 @@
   Return<void> forceDumpToDebugRingBuffer(
       const hidl_string& ring_name,
       forceDumpToDebugRingBuffer_cb hidl_status_cb) override;
+  Return<void> stopLoggingToDebugRingBuffer(
+      stopLoggingToDebugRingBuffer_cb hidl_status_cb) override;
   Return<void> getDebugHostWakeReasonStats(
       getDebugHostWakeReasonStats_cb hidl_status_cb) override;
   Return<void> enableDebugErrorAlerts(
@@ -169,6 +172,7 @@
       uint32_t max_interval_in_sec,
       uint32_t min_data_size_in_bytes);
   WifiStatus forceDumpToDebugRingBufferInternal(const hidl_string& ring_name);
+  WifiStatus stopLoggingToDebugRingBufferInternal();
   std::pair<WifiStatus, WifiDebugHostWakeReasonStats>
   getDebugHostWakeReasonStatsInternal();
   WifiStatus enableDebugErrorAlertsInternal(bool enable);
@@ -179,7 +183,6 @@
   ChipId chip_id_;
   std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
   std::weak_ptr<mode_controller::WifiModeController> mode_controller_;
-  std::vector<sp<IWifiChipEventCallback>> event_callbacks_;
   sp<WifiApIface> ap_iface_;
   sp<WifiNanIface> nan_iface_;
   sp<WifiP2pIface> p2p_iface_;
@@ -191,6 +194,8 @@
   // registration mechanism. Use this to check if we have already
   // registered a callback.
   bool debug_ring_buffer_cb_registered_;
+  hidl_callback_util::HidlCallbackHandler<IWifiChipEventCallback>
+      event_cb_handler_;
 
   DISALLOW_COPY_AND_ASSIGN(WifiChip);
 };
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index cd89acc..f902e64 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -59,6 +59,8 @@
   const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_stop_complete_internal_callback) {
     on_stop_complete_internal_callback(handle);
+    // Invalidate this callback since we don't want this firing again.
+    on_stop_complete_internal_callback = nullptr;
   }
 }
 
@@ -289,6 +291,24 @@
     on_nan_event_transmit_follow_up_user_callback(*event);
   }
 }
+
+std::function<void(const NanRangeRequestInd&)>
+    on_nan_event_range_request_user_callback;
+void onAysncNanEventRangeRequest(NanRangeRequestInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
+  if (on_nan_event_range_request_user_callback && event) {
+    on_nan_event_range_request_user_callback(*event);
+  }
+}
+
+std::function<void(const NanRangeReportInd&)>
+    on_nan_event_range_report_user_callback;
+void onAysncNanEventRangeReport(NanRangeReportInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
+  if (on_nan_event_range_report_user_callback && event) {
+    on_nan_event_range_report_user_callback(*event);
+  }
+}
 // End of the free-standing "C" style callbacks.
 
 WifiLegacyHal::WifiLegacyHal()
@@ -544,7 +564,7 @@
 }
 
 std::pair<wifi_error, std::vector<uint32_t>>
-WifiLegacyHal::getValidFrequenciesForGscan(wifi_band band) {
+WifiLegacyHal::getValidFrequenciesForBand(wifi_band band) {
   static_assert(sizeof(uint32_t) >= sizeof(wifi_channel),
                 "Wifi Channel cannot be represented in output");
   std::vector<uint32_t> freqs;
@@ -1023,6 +1043,10 @@
       user_callbacks.on_event_data_path_end;
   on_nan_event_transmit_follow_up_user_callback =
       user_callbacks.on_event_transmit_follow_up;
+  on_nan_event_range_request_user_callback =
+      user_callbacks.on_event_range_request;
+  on_nan_event_range_report_user_callback =
+      user_callbacks.on_event_range_report;
 
   return global_func_table_.wifi_nan_register_handler(
       wlan_interface_handle_,
@@ -1039,7 +1063,9 @@
        onAysncNanEventDataPathRequest,
        onAysncNanEventDataPathConfirm,
        onAysncNanEventDataPathEnd,
-       onAysncNanEventTransmitFollowUp});
+       onAysncNanEventTransmitFollowUp,
+       onAysncNanEventRangeRequest,
+       onAysncNanEventRangeReport});
 }
 
 wifi_error WifiLegacyHal::nanEnableRequest(transaction_id id,
@@ -1237,7 +1263,6 @@
 void WifiLegacyHal::invalidate() {
   global_handle_ = nullptr;
   wlan_interface_handle_ = nullptr;
-  on_stop_complete_internal_callback = nullptr;
   on_driver_memory_dump_internal_callback = nullptr;
   on_firmware_memory_dump_internal_callback = nullptr;
   on_gscan_event_internal_callback = nullptr;
@@ -1261,6 +1286,8 @@
   on_nan_event_data_path_confirm_user_callback = nullptr;
   on_nan_event_data_path_end_user_callback = nullptr;
   on_nan_event_transmit_follow_up_user_callback = nullptr;
+  on_nan_event_range_request_user_callback = nullptr;
+  on_nan_event_range_report_user_callback = nullptr;
 }
 
 }  // namespace legacy_hal
diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h
index e65b79b..c8fd5bd 100644
--- a/wifi/1.0/default/wifi_legacy_hal.h
+++ b/wifi/1.0/default/wifi_legacy_hal.h
@@ -89,6 +89,10 @@
   std::function<void(const NanDataPathEndInd&)> on_event_data_path_end;
   std::function<void(const NanTransmitFollowupInd&)>
       on_event_transmit_follow_up;
+  std::function<void(const NanRangeRequestInd&)>
+      on_event_range_request;
+  std::function<void(const NanRangeReportInd&)>
+      on_event_range_report;
 };
 
 // Full scan results contain IE info and are hence passed by reference, to
@@ -171,7 +175,7 @@
       const on_gscan_results_callback& on_results_callback,
       const on_gscan_full_result_callback& on_full_result_callback);
   wifi_error stopGscan(wifi_request_id id);
-  std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForGscan(
+  std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForBand(
       wifi_band band);
   // Link layer stats functions.
   wifi_error enableLinkLayerStats(bool debug);
diff --git a/wifi/1.0/default/wifi_nan_iface.cpp b/wifi/1.0/default/wifi_nan_iface.cpp
index 8d76f91..6977fc0 100644
--- a/wifi/1.0/default/wifi_nan_iface.cpp
+++ b/wifi/1.0/default/wifi_nan_iface.cpp
@@ -55,7 +55,7 @@
 
     switch (msg.response_type) {
     case legacy_hal::NAN_RESPONSE_ENABLED: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyEnableResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -63,7 +63,7 @@
         break;
     }
     case legacy_hal::NAN_RESPONSE_DISABLED: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyDisableResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -71,7 +71,7 @@
         break;
     }
     case legacy_hal::NAN_RESPONSE_PUBLISH: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyStartPublishResponse(id, wifiNanStatus,
                         msg.body.publish_response.publish_id).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
@@ -80,7 +80,7 @@
         break;
     }
     case legacy_hal::NAN_RESPONSE_PUBLISH_CANCEL: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyStopPublishResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -88,7 +88,7 @@
         break;
     }
     case legacy_hal::NAN_RESPONSE_TRANSMIT_FOLLOWUP: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyTransmitFollowupResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -96,7 +96,7 @@
         break;
     }
     case legacy_hal::NAN_RESPONSE_SUBSCRIBE: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyStartSubscribeResponse(id, wifiNanStatus,
                         msg.body.subscribe_response.subscribe_id).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
@@ -105,7 +105,7 @@
         break;
     }
     case legacy_hal::NAN_RESPONSE_SUBSCRIBE_CANCEL: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyStopSubscribeResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -113,7 +113,7 @@
         break;
     }
     case legacy_hal::NAN_RESPONSE_CONFIG: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyConfigResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -127,7 +127,7 @@
             LOG(ERROR) << "Failed to convert nan capabilities response";
             return;
         }
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyCapabilitiesResponse(id, wifiNanStatus,
                                                     hidl_struct).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
@@ -136,7 +136,7 @@
         break;
     }
     case legacy_hal::NAN_DP_INTERFACE_CREATE: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyCreateDataInterfaceResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -144,7 +144,7 @@
         break;
     }
     case legacy_hal::NAN_DP_INTERFACE_DELETE: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyDeleteDataInterfaceResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -152,7 +152,7 @@
         break;
     }
     case legacy_hal::NAN_DP_INITIATOR_RESPONSE: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyInitiateDataPathResponse(id, wifiNanStatus,
                 msg.body.data_request_response.ndp_instance_id).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
@@ -161,14 +161,15 @@
         break;
     }
     case legacy_hal::NAN_DP_RESPONDER_RESPONSE: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyRespondToDataPathIndicationResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
         }
+        break;
     }
     case legacy_hal::NAN_DP_END: {
-        for (const auto& callback : shared_ptr_this->event_callbacks_) {
+        for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
           if (!callback->notifyTerminateDataPathResponse(id, wifiNanStatus).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
           }
@@ -201,7 +202,7 @@
       hidl_struct.eventType = (NanClusterEventType) msg.event_type;
       hidl_struct.addr = msg.data.mac_addr.addr;
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventClusterEvent(hidl_struct).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -219,7 +220,7 @@
       status.status = hidl_struct_util::convertLegacyNanStatusTypeToHidl(msg.reason);
       status.description = msg.nan_reason;
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventDisabled(status).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -237,7 +238,7 @@
       status.status = hidl_struct_util::convertLegacyNanStatusTypeToHidl(msg.reason);
       status.description = msg.nan_reason;
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventPublishTerminated(msg.publish_id, status).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -255,7 +256,7 @@
       status.status = hidl_struct_util::convertLegacyNanStatusTypeToHidl(msg.reason);
       status.description = msg.nan_reason;
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventSubscribeTerminated(msg.subscribe_id, status).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -276,7 +277,7 @@
           return;
       }
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventMatch(hidl_struct).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -290,7 +291,7 @@
         LOG(ERROR) << "Callback invoked on an invalid object";
         return;
       }
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventMatchExpired(msg.publish_subscribe_id,
                 msg.requestor_instance_id).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
@@ -312,7 +313,7 @@
           return;
       }
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventFollowupReceived(hidl_struct).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -330,7 +331,7 @@
       status.status = hidl_struct_util::convertLegacyNanStatusTypeToHidl(msg.reason);
       status.description = msg.nan_reason;
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventTransmitFollowup(msg.id, status).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -351,7 +352,7 @@
           return;
       }
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventDataPathRequest(hidl_struct).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -372,7 +373,7 @@
           return;
       }
 
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         if (!callback->eventDataPathConfirm(hidl_struct).isOk()) {
             LOG(ERROR) << "Failed to invoke the callback";
         }
@@ -386,7 +387,7 @@
         LOG(ERROR) << "Callback invoked on an invalid object";
         return;
       }
-      for (const auto& callback : shared_ptr_this->event_callbacks_) {
+      for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
         for (int i = 0; i < msg.num_ndp_instances; ++i) {
             if (!callback->eventDataPathTerminated(msg.ndp_instance_id[i]).isOk()) {
                 LOG(ERROR) << "Failed to invoke the callback";
@@ -400,6 +401,16 @@
       LOG(ERROR) << "on_event_beacon_sdf_payload - should not be called";
   };
 
+  callback_handlers.on_event_range_request = [weak_ptr_this](
+        const legacy_hal::NanRangeRequestInd& /* msg */) {
+      LOG(ERROR) << "on_event_range_request - should not be called";
+  };
+
+  callback_handlers.on_event_range_report = [weak_ptr_this](
+        const legacy_hal::NanRangeReportInd& /* msg */) {
+      LOG(ERROR) << "on_event_range_report - should not be called";
+  };
+
   legacy_hal::wifi_error legacy_status =
       legacy_hal_.lock()->nanRegisterCallbackHandlers(callback_handlers);
   if (legacy_status != legacy_hal::WIFI_SUCCESS) {
@@ -410,7 +421,7 @@
 
 void WifiNanIface::invalidate() {
   legacy_hal_.reset();
-  event_callbacks_.clear();
+  event_cb_handler_.invalidate();
   is_valid_ = false;
 }
 
@@ -418,6 +429,10 @@
   return is_valid_;
 }
 
+std::set<sp<IWifiNanIfaceEventCallback>> WifiNanIface::getEventCallbacks() {
+  return event_cb_handler_.getCallbacks();
+}
+
 Return<void> WifiNanIface::getName(getName_cb hidl_status_cb) {
   return validateAndCall(this,
                          WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
@@ -609,11 +624,9 @@
 
 WifiStatus WifiNanIface::registerEventCallbackInternal(
     const sp<IWifiNanIfaceEventCallback>& callback) {
-  // TODO(b/31632518): remove the callback when the client is destroyed and/or
-  // make sure that the same callback is only registered once (i.e. detect duplicates)
-  // OR: consider having a single listener - not clear why multiple listeners (managers) are
-  // necessary, nor how they would coordinate (at least command IDs).
-  event_callbacks_.emplace_back(callback);
+  if (!event_cb_handler_.addCallback(callback)) {
+    return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN);
+  }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
 
diff --git a/wifi/1.0/default/wifi_nan_iface.h b/wifi/1.0/default/wifi_nan_iface.h
index d1da60e..e1edd29 100644
--- a/wifi/1.0/default/wifi_nan_iface.h
+++ b/wifi/1.0/default/wifi_nan_iface.h
@@ -21,6 +21,7 @@
 #include <android/hardware/wifi/1.0/IWifiNanIface.h>
 #include <android/hardware/wifi/1.0/IWifiNanIfaceEventCallback.h>
 
+#include "hidl_callback_util.h"
 #include "wifi_legacy_hal.h"
 
 namespace android {
@@ -119,10 +120,13 @@
   WifiStatus terminateDataPathRequestInternal(
       uint16_t cmd_id, uint32_t ndpInstanceId);
 
+  std::set<sp<IWifiNanIfaceEventCallback>> getEventCallbacks();
+
   std::string ifname_;
   std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
-  std::vector<sp<IWifiNanIfaceEventCallback>> event_callbacks_;
   bool is_valid_;
+  hidl_callback_util::HidlCallbackHandler<IWifiNanIfaceEventCallback>
+      event_cb_handler_;
 
   DISALLOW_COPY_AND_ASSIGN(WifiNanIface);
 };
diff --git a/wifi/1.0/default/wifi_sta_iface.cpp b/wifi/1.0/default/wifi_sta_iface.cpp
index 6100334..626b195 100644
--- a/wifi/1.0/default/wifi_sta_iface.cpp
+++ b/wifi/1.0/default/wifi_sta_iface.cpp
@@ -35,7 +35,7 @@
 
 void WifiStaIface::invalidate() {
   legacy_hal_.reset();
-  event_callbacks_.clear();
+  event_cb_handler_.invalidate();
   is_valid_ = false;
 }
 
@@ -43,8 +43,8 @@
   return is_valid_;
 }
 
-std::vector<sp<IWifiStaIfaceEventCallback>> WifiStaIface::getEventCallbacks() {
-  return event_callbacks_;
+std::set<sp<IWifiStaIfaceEventCallback>> WifiStaIface::getEventCallbacks() {
+  return event_cb_handler_.getCallbacks();
 }
 
 Return<void> WifiStaIface::getName(getName_cb hidl_status_cb) {
@@ -106,15 +106,13 @@
                          hidl_status_cb);
 }
 
-Return<void> WifiStaIface::getValidFrequenciesForBackgroundScan(
-    StaBackgroundScanBand band,
-    getValidFrequenciesForBackgroundScan_cb hidl_status_cb) {
-  return validateAndCall(
-      this,
-      WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
-      &WifiStaIface::getValidFrequenciesForBackgroundScanInternal,
-      hidl_status_cb,
-      band);
+Return<void> WifiStaIface::getValidFrequenciesForBand(
+    WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) {
+  return validateAndCall(this,
+                         WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+                         &WifiStaIface::getValidFrequenciesForBandInternal,
+                         hidl_status_cb,
+                         band);
 }
 
 Return<void> WifiStaIface::startBackgroundScan(
@@ -293,8 +291,9 @@
 
 WifiStatus WifiStaIface::registerEventCallbackInternal(
     const sp<IWifiStaIfaceEventCallback>& callback) {
-  // TODO(b/31632518): remove the callback when the client is destroyed
-  event_callbacks_.emplace_back(callback);
+  if (!event_cb_handler_.addCallback(callback)) {
+    return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN);
+  }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
 
@@ -362,14 +361,13 @@
 }
 
 std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
-WifiStaIface::getValidFrequenciesForBackgroundScanInternal(
-    StaBackgroundScanBand band) {
+WifiStaIface::getValidFrequenciesForBandInternal(WifiBand band) {
   static_assert(sizeof(WifiChannelInMhz) == sizeof(uint32_t), "Size mismatch");
   legacy_hal::wifi_error legacy_status;
   std::vector<uint32_t> valid_frequencies;
   std::tie(legacy_status, valid_frequencies) =
-      legacy_hal_.lock()->getValidFrequenciesForGscan(
-          hidl_struct_util::convertHidlGscanBandToLegacy(band));
+      legacy_hal_.lock()->getValidFrequenciesForBand(
+          hidl_struct_util::convertHidlWifiBandToLegacy(band));
   return {createWifiStatusFromLegacyError(legacy_status), valid_frequencies};
 }
 
@@ -417,7 +415,7 @@
   const auto& on_full_result_callback = [weak_ptr_this](
       legacy_hal::wifi_request_id id,
       const legacy_hal::wifi_scan_result* result,
-      uint32_t /* buckets_scanned */) {
+      uint32_t buckets_scanned) {
     const auto shared_ptr_this = weak_ptr_this.promote();
     if (!shared_ptr_this.get() || !shared_ptr_this->isValid()) {
       LOG(ERROR) << "Callback invoked on an invalid object";
@@ -430,7 +428,8 @@
       return;
     }
     for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-      if (!callback->onBackgroundFullScanResult(id, hidl_scan_result).isOk()) {
+      if (!callback->onBackgroundFullScanResult(
+              id, buckets_scanned, hidl_scan_result).isOk()) {
         LOG(ERROR) << "Failed to invoke onBackgroundFullScanResult callback";
       }
     }
@@ -570,7 +569,8 @@
   return createWifiStatusFromLegacyError(legacy_status);
 }
 
-WifiStatus WifiStaIface::setScanningMacOuiInternal(const std::array<uint8_t, 3>& oui) {
+WifiStatus WifiStaIface::setScanningMacOuiInternal(
+    const std::array<uint8_t, 3>& oui) {
   legacy_hal::wifi_error legacy_status =
       legacy_hal_.lock()->setScanningMacOui(oui);
   return createWifiStatusFromLegacyError(legacy_status);
diff --git a/wifi/1.0/default/wifi_sta_iface.h b/wifi/1.0/default/wifi_sta_iface.h
index bc2d75f..08faa2f 100644
--- a/wifi/1.0/default/wifi_sta_iface.h
+++ b/wifi/1.0/default/wifi_sta_iface.h
@@ -21,6 +21,7 @@
 #include <android/hardware/wifi/1.0/IWifiStaIface.h>
 #include <android/hardware/wifi/1.0/IWifiStaIfaceEventCallback.h>
 
+#include "hidl_callback_util.h"
 #include "wifi_legacy_hal.h"
 
 namespace android {
@@ -39,7 +40,7 @@
   // Refer to |WifiChip::invalidate()|.
   void invalidate();
   bool isValid();
-  std::vector<sp<IWifiStaIfaceEventCallback>> getEventCallbacks();
+  std::set<sp<IWifiStaIfaceEventCallback>> getEventCallbacks();
 
   // HIDL methods exposed.
   Return<void> getName(getName_cb hidl_status_cb) override;
@@ -56,9 +57,8 @@
       installApfPacketFilter_cb hidl_status_cb) override;
   Return<void> getBackgroundScanCapabilities(
       getBackgroundScanCapabilities_cb hidl_status_cb) override;
-  Return<void> getValidFrequenciesForBackgroundScan(
-      StaBackgroundScanBand band,
-      getValidFrequenciesForBackgroundScan_cb hidl_status_cb) override;
+  Return<void> getValidFrequenciesForBand(
+      WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) override;
   Return<void> startBackgroundScan(
       uint32_t cmd_id,
       const StaBackgroundScanParameters& params,
@@ -118,7 +118,7 @@
   std::pair<WifiStatus, StaBackgroundScanCapabilities>
   getBackgroundScanCapabilitiesInternal();
   std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
-  getValidFrequenciesForBackgroundScanInternal(StaBackgroundScanBand band);
+  getValidFrequenciesForBandInternal(WifiBand band);
   WifiStatus startBackgroundScanInternal(
       uint32_t cmd_id, const StaBackgroundScanParameters& params);
   WifiStatus stopBackgroundScanInternal(uint32_t cmd_id);
@@ -151,8 +151,9 @@
 
   std::string ifname_;
   std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
-  std::vector<sp<IWifiStaIfaceEventCallback>> event_callbacks_;
   bool is_valid_;
+  hidl_callback_util::HidlCallbackHandler<IWifiStaIfaceEventCallback>
+      event_cb_handler_;
 
   DISALLOW_COPY_AND_ASSIGN(WifiStaIface);
 };
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index 1c6d0e0..d90d5be 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -210,6 +210,37 @@
 };
 
 /**
+ * Wifi bands defined in 80211 spec.
+ */
+enum WifiBand : uint32_t {
+  BAND_UNSPECIFIED = 0,
+  /**
+   * 2.4 GHz.
+   */
+  BAND_24GHZ = 1,
+  /**
+   * 5 GHz without DFS.
+   */
+  BAND_5GHZ = 2,
+  /**
+   * 5 GHz DFS only.
+   */
+  BAND_5GHZ_DFS = 4,
+  /**
+   * 5 GHz with DFS.
+   */
+  BAND_5GHZ_WITH_DFS = 6,
+  /**
+   * 2.4 GHz + 5 GHz; no DFS.
+   */
+  BAND_24GHZ_5GHZ = 3,
+  /**
+   * 2.4 GHz + 5 GHz with DFS
+   */
+  BAND_24GHZ_5GHZ_WITH_DFS = 7
+};
+
+/**
  * STA specific types.
  * TODO(b/32159498): Move to a separate sta_types.hal.
  */
@@ -251,37 +282,6 @@
 };
 
 /**
- * Bands that can be specified in Background scan requests.
- */
-enum StaBackgroundScanBand : uint32_t {
-  BAND_UNSPECIFIED = 0,
-  /**
-   * 2.4 GHz.
-   */
-  BAND_24GHZ = 1,
-  /**
-   * 5 GHz without DFS.
-   */
-  BAND_5GHZ = 2,
-  /**
-   * 5 GHz DFS only.
-   */
-  BAND_5GHZ_DFS = 4,
-  /**
-   * 5 GHz with DFS.
-   */
-  BAND_5GHZ_WITH_DFS = 6,
-  /**
-   * 2.4 GHz + 5 GHz; no DFS.
-   */
-  BAND_24GHZ_5GHZ = 3,
-  /**
-   * 2.4 GHz + 5 GHz with DFS
-   */
-  BAND_24GHZ_5GHZ_WITH_DFS = 7
-};
-
-/**
  * Mask of event reporting schemes that can be specified in background scan
  * requests.
  */
@@ -306,17 +306,33 @@
 };
 
 /**
+ * Max limits for background scan.
+ */
+enum StaScanLimits : uint32_t {
+  MAX_CHANNELS = 16,
+  MAX_BUCKETS = 16,
+  MAX_AP_CACHE_PER_SCAN = 32
+};
+
+/**
  * Background Scan parameters per bucket that can be specified in background
  * scan requests.
  */
 struct StaBackgroundScanBucketParameters {
   /**
-   * Bands to scan or 0 if frequencies list must be used instead.
+   * Bucket index. This index is used to report results in
+   * |StaScanData.bucketsScanned|.
    */
-  StaBackgroundScanBand band;
+  uint32_t bucketIdx;
+  /**
+   * Bands to scan or |BAND_UNSPECIFIED| if frequencies list must be used
+   * instead.
+   */
+  WifiBand band;
   /**
    * Channel frequencies (in Mhz) to scan if |band| is set to
-   * |UNSPECIFIED|.
+   * |BAND_UNSPECIFIED|.
+   * Max length: |StaScanLimits.MAX_CHANNELS|.
    */
   vec<WifiChannelInMhz> frequencies;
   /**
@@ -360,6 +376,7 @@
   /**
    * Maximum number of APs that must be stored for each scan. If the maximum
    * is reached the highest RSSI results must be returned.
+   * Max length: |StaScanLimits.MAX_AP_CACHE_PER_SCAN|.
    */
   uint32_t maxApPerScan;
   /**
@@ -373,6 +390,7 @@
   uint32_t reportThresholdNumScans;
   /**
    * List of buckets to be scheduled.
+   * Max length: |StaScanLimits.MAX_BUCKETS|.
    */
   vec<StaBackgroundScanBucketParameters> buckets;
 };
@@ -505,8 +523,8 @@
    */
   bitfield<StaScanDataFlagMask> flags;
   /**
-   * Bitset where each bit indicates if the bucket with that index was
-   * scanned.
+   * Bitset where each bit indicates if the bucket with that index (starting at
+   * 0) was scanned.
    */
   uint32_t bucketsScanned;
   /**
@@ -844,11 +862,6 @@
    */
   uint32_t macAddressRandomizationIntervalSec;
   /**
-   * Accept (if true) or not (if false) ranging requests from peers - whether in the context of
-   * discovery or otherwise.
-   */
-  bool acceptRangingRequests;
-  /**
    * Additional configuration provided per band: indexed by |NanBandIndex|.
    */
   NanBandSpecificConfig[2] bandSpecificConfig;
@@ -881,6 +894,7 @@
  * Cipher suite flags.
  */
 enum NanCipherSuiteType : uint32_t {
+  NONE = 0, // No (open) security
   SHARED_KEY_128_MASK = 1 << 0, // NCS-SK-128
   SHARED_KEY_256_MASK = 1 << 1  // NCS-SK-256
 };
@@ -995,13 +1009,15 @@
    */
   bool disableFollowupReceivedIndication;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session.
+   * Cipher type for data-paths constructed in the context of this discovery session. Must be
+   * specified as |NanCipherSuiteType.NONE| if no |pmk| is provided.
    */
-  bitfield<NanCipherSuiteType> supportedCipherTypes;
+  NanCipherSuiteType cipherType;
   /**
    * Optional Pairwise Master Key (PMK) for data-paths constructed in the context of this discovery
    * session. A PMK can also be provided during the actual construction of the data-path (which
-   * allows for unique PMKs for each data-path).
+   * allows for unique PMKs for each data-path). The |cipherType| must be specified if a PMK is
+   * provided.
    * Max length: 32
    * Ref: IEEE 802.11i
    */
@@ -1014,7 +1030,12 @@
   bool securityEnabledInNdp;
   /**
    * Specifies whether or not there is a ranging requirement in this discovery session.
-   * Note that ranging is only performed if all other match criteria with the peer are met.
+   * Ranging is only performed if all other match criteria with the peer are met. Ranging must
+   * be performed if both peers in the discovery session (publisher and subscriber) set this
+   * flag to true. Otherwise, if either peer sets this flag to false, ranging must not be performed
+   * and must not impact discovery decisions.
+   * Note: specifying that ranging is required also implies that this device must automatically
+   * accept ranging requests from peers.
    * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Ranging Require.
    */
   bool rangingRequired;
@@ -1058,6 +1079,13 @@
    * peer.
    */
   NanTxType txType;
+  /**
+   * Specifies whether data-path requests |IWifiNanIfaceEventCallback.eventDataPathRequest| (in
+   * the context of this discovery session) are automatically accepted (if true) - in which case
+   * the Responder must not call the |IWifiNanIface.respondToDataPathIndicationRequest| method and
+   * the device must automatically accept the data-path request and complete the negotiation.
+   */
+  bool autoAcceptDataPathRequests;
 };
 
 /**
@@ -1198,11 +1226,13 @@
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session.
+   * Cipher type for the data-path being requested. Must be specified as |NanCipherSuiteType.NONE|
+   * if no |pmk| is provided.
    */
-  bitfield<NanCipherSuiteType> supportedCipherTypes;
+  NanCipherSuiteType cipherType;
   /**
    * Pairwise Master Key (PMK) for the data-path being requested (if |securityRequired| is true).
+   * The |cipherType| must be specified if a PMK is provided.
    * Max length: 32
    * Ref: IEEE 802.11i
    */
@@ -1242,11 +1272,13 @@
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session.
+   * Cipher type for the data-path being negotiated. Must be specified as |NanCipherSuiteType.NONE|
+   * if no |pmk| is provided.
    */
-  bitfield<NanCipherSuiteType> supportedCipherTypes;
+  NanCipherSuiteType cipherType;
   /**
    * Pairwise Master Key (PMK) for the data-path being negotiated (if |securityRequired| is true).
+   * The |cipherType| must be specified if a PMK is provided.
    * Max length: 32
    */
   vec<uint8_t> pmk;
@@ -1373,13 +1405,14 @@
    */
   uint8_t rssiValue;
   /**
-   * Cipher types supported by the peer for data-paths constructed in the context of this discovery
-   * session.
+   * Cipher type for data-paths constructed in the context of this discovery session. Valid if
+   * |peerRequiresSecurityEnabledInNdp| is true.
    */
-  bitfield<NanCipherSuiteType> peerSupportedCipherTypes;
+  NanCipherSuiteType peerCipherType;
   /**
    * Indicates whether or not the peer requires security enabled in any data-path (NDP) constructed
-   * in the context of this discovery session.
+   * in the context of this discovery session. The |cipherType| specifies the cipher type for such
+   * data-paths.
    * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Security Required
    */
   bool peerRequiresSecurityEnabledInNdp;
diff --git a/wifi/1.0/vts/Wifi.vts b/wifi/1.0/vts/Wifi.vts
deleted file mode 100644
index 3f567a4..0000000
--- a/wifi/1.0/vts/Wifi.vts
+++ /dev/null
@@ -1,119 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifi"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::IWifiApIface"
-import: "android.hardware.wifi@1.0::IWifiChip"
-import: "android.hardware.wifi@1.0::IWifiChipEventCallback"
-import: "android.hardware.wifi@1.0::IWifiEventCallback"
-import: "android.hardware.wifi@1.0::IWifiIface"
-import: "android.hardware.wifi@1.0::IWifiNanIface"
-import: "android.hardware.wifi@1.0::IWifiNanIfaceEventCallback"
-import: "android.hardware.wifi@1.0::IWifiP2pIface"
-import: "android.hardware.wifi@1.0::IWifiRttController"
-import: "android.hardware.wifi@1.0::IWifiRttControllerEventCallback"
-import: "android.hardware.wifi@1.0::IWifiStaIface"
-import: "android.hardware.wifi@1.0::IWifiStaIfaceEventCallback"
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "registerEventCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiEventCallback"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "isStarted"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "start"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            next: "registerEventCallback"
-            next: "start"
-            next: "stop"
-            next: "getChip"
-        }
-    }
-
-    api: {
-        name: "stop"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        callflow: {
-            exit: true
-        }
-        callflow: {
-            next: "registerEventCallback"
-            next: "start"
-            next: "stop"
-        }
-    }
-
-    api: {
-        name: "getChipIds"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-    api: {
-        name: "getChip"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiChip"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        callflow: {
-            next: "*"
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiApIface.vts b/wifi/1.0/vts/WifiApIface.vts
deleted file mode 100644
index 6b58058..0000000
--- a/wifi/1.0/vts/WifiApIface.vts
+++ /dev/null
@@ -1,51 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiApIface"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::IWifiIface"
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setCountryCode"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 2
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int8_t"
-            }
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiChip.vts b/wifi/1.0/vts/WifiChip.vts
deleted file mode 100644
index 1208202..0000000
--- a/wifi/1.0/vts/WifiChip.vts
+++ /dev/null
@@ -1,539 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiChip"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::IWifiApIface"
-import: "android.hardware.wifi@1.0::IWifiChipEventCallback"
-import: "android.hardware.wifi@1.0::IWifiIface"
-import: "android.hardware.wifi@1.0::IWifiNanIface"
-import: "android.hardware.wifi@1.0::IWifiNanIfaceEventCallback"
-import: "android.hardware.wifi@1.0::IWifiP2pIface"
-import: "android.hardware.wifi@1.0::IWifiRttController"
-import: "android.hardware.wifi@1.0::IWifiRttControllerEventCallback"
-import: "android.hardware.wifi@1.0::IWifiStaIface"
-import: "android.hardware.wifi@1.0::IWifiStaIfaceEventCallback"
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::V1_0::IWifiChip::ChipIfaceCombinationLimit"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "types"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-            }
-        }
-        struct_value: {
-            name: "maxIfaces"
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::V1_0::IWifiChip::ChipIfaceCombination"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "limits"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::IWifiChip::ChipIfaceCombinationLimit"
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::V1_0::IWifiChip::ChipMode"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "id"
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        struct_value: {
-            name: "availableCombinations"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::IWifiChip::ChipIfaceCombination"
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::V1_0::IWifiChip::ChipDebugInfo"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "driverDescription"
-            type: TYPE_STRING
-        }
-        struct_value: {
-            name: "firmwareDescription"
-            type: TYPE_STRING
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::V1_0::IWifiChip::ChipCapabilityMask"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "DEBUG_MEMORY_FIRMWARE_DUMP"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "DEBUG_MEMORY_DRIVER_DUMP"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "DEBUG_RING_BUFFER_CONNECT_EVENT"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "DEBUG_RING_BUFFER_POWER_EVENT"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "DEBUG_RING_BUFFER_WAKELOCK_EVENT"
-            scalar_value: {
-                uint32_t: 16
-            }
-            enumerator: "DEBUG_RING_BUFFER_VENDOR_DATA"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "DEBUG_HOST_WAKE_REASON_STATS"
-            scalar_value: {
-                uint32_t: 64
-            }
-            enumerator: "DEBUG_ERROR_ALERTS"
-            scalar_value: {
-                uint32_t: 128
-            }
-        }
-    }
-
-    api: {
-        name: "getId"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "registerEventCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiChipEventCallback"
-        }
-    }
-
-    api: {
-        name: "getCapabilities"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiChip::ChipCapabilityMask"
-        }
-    }
-
-    api: {
-        name: "getAvailableModes"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::IWifiChip::ChipMode"
-            }
-        }
-    }
-
-    api: {
-        name: "configureChip"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getMode"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "requestChipDebugInfo"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiChip::ChipDebugInfo"
-        }
-    }
-
-    api: {
-        name: "requestDriverDebugDump"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "requestFirmwareDebugDump"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "createApIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiApIface"
-        }
-    }
-
-    api: {
-        name: "getApIfaceNames"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRING
-            }
-        }
-    }
-
-    api: {
-        name: "getApIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiApIface"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "removeApIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "createNanIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiNanIface"
-        }
-    }
-
-    api: {
-        name: "getNanIfaceNames"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRING
-            }
-        }
-    }
-
-    api: {
-        name: "getNanIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiNanIface"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "removeNanIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "createP2pIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiP2pIface"
-        }
-    }
-
-    api: {
-        name: "getP2pIfaceNames"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRING
-            }
-        }
-    }
-
-    api: {
-        name: "getP2pIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiP2pIface"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "removeP2pIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "createStaIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIface"
-        }
-    }
-
-    api: {
-        name: "getStaIfaceNames"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRING
-            }
-        }
-    }
-
-    api: {
-        name: "getStaIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIface"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "removeStaIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "createRttController"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiRttController"
-        }
-        arg: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiIface"
-        }
-    }
-
-    api: {
-        name: "getDebugRingBuffersStatus"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::WifiDebugRingBufferStatus"
-            }
-        }
-    }
-
-    api: {
-        name: "startLoggingToDebugRingBuffer"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::WifiDebugRingBufferVerboseLevel"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "forceDumpToDebugRingBuffer"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getDebugHostWakeReasonStats"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonStats"
-        }
-    }
-
-    api: {
-        name: "enableDebugErrorAlerts"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiChipEventCallback.vts b/wifi/1.0/vts/WifiChipEventCallback.vts
deleted file mode 100644
index 2246f82..0000000
--- a/wifi/1.0/vts/WifiChipEventCallback.vts
+++ /dev/null
@@ -1,79 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiChipEventCallback"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onChipReconfigured"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onChipReconfigureFailure"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-    }
-
-    api: {
-        name: "onIfaceAdded"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onIfaceRemoved"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onDebugRingBufferDataAvailable"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiDebugRingBufferStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onDebugErrorAlert"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiEventCallback.vts b/wifi/1.0/vts/WifiEventCallback.vts
deleted file mode 100644
index 60ec87c..0000000
--- a/wifi/1.0/vts/WifiEventCallback.vts
+++ /dev/null
@@ -1,27 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiEventCallback"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onStart"
-    }
-
-    api: {
-        name: "onStop"
-    }
-
-    api: {
-        name: "onFailure"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiIface.vts b/wifi/1.0/vts/WifiIface.vts
deleted file mode 100644
index 0de0f8d..0000000
--- a/wifi/1.0/vts/WifiIface.vts
+++ /dev/null
@@ -1,34 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiIface"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiNanIface.vts b/wifi/1.0/vts/WifiNanIface.vts
deleted file mode 100644
index 66c8755..0000000
--- a/wifi/1.0/vts/WifiNanIface.vts
+++ /dev/null
@@ -1,262 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiNanIface"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::IWifiIface"
-import: "android.hardware.wifi@1.0::IWifiNanIfaceEventCallback"
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "registerEventCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiNanIfaceEventCallback"
-        }
-    }
-
-    api: {
-        name: "getCapabilitiesRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-    }
-
-    api: {
-        name: "enableRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanEnableRequest"
-        }
-    }
-
-    api: {
-        name: "configRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanConfigRequest"
-        }
-    }
-
-    api: {
-        name: "disableRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-    }
-
-    api: {
-        name: "startPublishRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanPublishRequest"
-        }
-    }
-
-    api: {
-        name: "stopPublishRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-
-    api: {
-        name: "startSubscribeRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanSubscribeRequest"
-        }
-    }
-
-    api: {
-        name: "stopSubscribeRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-
-    api: {
-        name: "transmitFollowupRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanTransmitFollowupRequest"
-        }
-    }
-
-    api: {
-        name: "createDataInterfaceRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "deleteDataInterfaceRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "initiateDataPathRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanInitiateDataPathRequest"
-        }
-    }
-
-    api: {
-        name: "respondToDataPathIndicationRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanRespondToDataPathIndicationRequest"
-        }
-    }
-
-    api: {
-        name: "terminateDataPathRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiNanIfaceEventCallback.vts b/wifi/1.0/vts/WifiNanIfaceEventCallback.vts
deleted file mode 100644
index e3e82f7..0000000
--- a/wifi/1.0/vts/WifiNanIfaceEventCallback.vts
+++ /dev/null
@@ -1,299 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiNanIfaceEventCallback"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "notifyCapabilitiesResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanCapabilities"
-        }
-    }
-
-    api: {
-        name: "notifyEnableResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyConfigResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyDisableResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyStartPublishResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-
-    api: {
-        name: "notifyStopPublishResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyStartSubscribeResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-
-    api: {
-        name: "notifyStopSubscribeResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyTransmitFollowupResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyCreateDataInterfaceResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyDeleteDataInterfaceResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyInitiateDataPathResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "notifyRespondToDataPathIndicationResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "notifyTerminateDataPathResponse"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "eventClusterEvent"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanClusterEventInd"
-        }
-    }
-
-    api: {
-        name: "eventDisabled"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "eventPublishTerminated"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "eventSubscribeTerminated"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "eventMatch"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanMatchInd"
-        }
-    }
-
-    api: {
-        name: "eventMatchExpired"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "eventFollowupReceived"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanFollowupReceivedInd"
-        }
-    }
-
-    api: {
-        name: "eventTransmitFollowup"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-        }
-    }
-
-    api: {
-        name: "eventDataPathRequest"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanDataPathRequestInd"
-        }
-    }
-
-    api: {
-        name: "eventDataPathConfirm"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanDataPathConfirmInd"
-        }
-    }
-
-    api: {
-        name: "eventDataPathTerminated"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiP2pIface.vts b/wifi/1.0/vts/WifiP2pIface.vts
deleted file mode 100644
index 220f332..0000000
--- a/wifi/1.0/vts/WifiP2pIface.vts
+++ /dev/null
@@ -1,35 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiP2pIface"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::IWifiIface"
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiRttController.vts b/wifi/1.0/vts/WifiRttController.vts
deleted file mode 100644
index 45fb309..0000000
--- a/wifi/1.0/vts/WifiRttController.vts
+++ /dev/null
@@ -1,171 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiRttController"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::IWifiIface"
-import: "android.hardware.wifi@1.0::IWifiRttControllerEventCallback"
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getBoundIface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiIface"
-        }
-    }
-
-    api: {
-        name: "registerEventCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiRttControllerEventCallback"
-        }
-    }
-
-    api: {
-        name: "rangeRequest"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::RttConfig"
-            }
-        }
-    }
-
-    api: {
-        name: "rangeCancel"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ARRAY
-                vector_size: 6
-                vector_value: {
-                    type: TYPE_SCALAR
-                    scalar_type: "uint8_t"
-                }
-            }
-        }
-    }
-
-    api: {
-        name: "getCapabilities"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::RttCapabilities"
-        }
-    }
-
-    api: {
-        name: "setLci"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::RttLciInformation"
-        }
-    }
-
-    api: {
-        name: "setLcr"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::RttLcrInformation"
-        }
-    }
-
-    api: {
-        name: "getResponderInfo"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::RttResponder"
-        }
-    }
-
-    api: {
-        name: "enableResponder"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiChannelInfo"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::RttResponder"
-        }
-    }
-
-    api: {
-        name: "disableResponder"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiRttControllerEventCallback.vts b/wifi/1.0/vts/WifiRttControllerEventCallback.vts
deleted file mode 100644
index e3c2651..0000000
--- a/wifi/1.0/vts/WifiRttControllerEventCallback.vts
+++ /dev/null
@@ -1,26 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiRttControllerEventCallback"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onResults"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::RttResult"
-            }
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiStaIface.vts b/wifi/1.0/vts/WifiStaIface.vts
deleted file mode 100644
index 1edf4db..0000000
--- a/wifi/1.0/vts/WifiStaIface.vts
+++ /dev/null
@@ -1,441 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiStaIface"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::IWifiIface"
-import: "android.hardware.wifi@1.0::IWifiStaIfaceEventCallback"
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::V1_0::IWifiStaIface::StaIfaceCapabilityMask"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "APF"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "BACKGROUND_SCAN"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "LINK_LAYER_STATS"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "RSSI_MONITOR"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "CONTROL_ROAMING"
-            scalar_value: {
-                uint32_t: 16
-            }
-            enumerator: "PROBE_IE_WHITELIST"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "SCAN_RAND"
-            scalar_value: {
-                uint32_t: 64
-            }
-            enumerator: "STA_5G"
-            scalar_value: {
-                uint32_t: 128
-            }
-            enumerator: "HOTSPOT"
-            scalar_value: {
-                uint32_t: 256
-            }
-            enumerator: "PNO"
-            scalar_value: {
-                uint32_t: 512
-            }
-            enumerator: "TDLS"
-            scalar_value: {
-                uint32_t: 1024
-            }
-            enumerator: "TDLS_OFFCHANNEL"
-            scalar_value: {
-                uint32_t: 2048
-            }
-            enumerator: "ND_OFFLOAD"
-            scalar_value: {
-                uint32_t: 4096
-            }
-            enumerator: "KEEP_ALIVE"
-            scalar_value: {
-                uint32_t: 8192
-            }
-            enumerator: "DEBUG_PACKET_FATE"
-            scalar_value: {
-                uint32_t: 16384
-            }
-        }
-    }
-
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "registerEventCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIfaceEventCallback"
-        }
-    }
-
-    api: {
-        name: "getCapabilities"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIface::StaIfaceCapabilityMask"
-        }
-    }
-
-    api: {
-        name: "getApfPacketFilterCapabilities"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaApfPacketFilterCapabilities"
-        }
-    }
-
-    api: {
-        name: "installApfPacketFilter"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getBackgroundScanCapabilities"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaBackgroundScanCapabilities"
-        }
-    }
-
-    api: {
-        name: "getValidFrequenciesForBackgroundScan"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::StaBackgroundScanBand"
-        }
-    }
-
-    api: {
-        name: "startBackgroundScan"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaBackgroundScanParameters"
-        }
-    }
-
-    api: {
-        name: "stopBackgroundScan"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "enableLinkLayerStatsCollection"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "disableLinkLayerStatsCollection"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-    }
-
-    api: {
-        name: "getLinkLayerStats"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaLinkLayerStats"
-        }
-    }
-
-    api: {
-        name: "startRssiMonitoring"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-    api: {
-        name: "stopRssiMonitoring"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getRoamingCapabilities"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaRoamingCapabilities"
-        }
-    }
-
-    api: {
-        name: "configureRoaming"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaRoamingConfig"
-        }
-    }
-
-    api: {
-        name: "setRoamingState"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::V1_0::StaRoamingState"
-        }
-    }
-
-    api: {
-        name: "enableNdOffload"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "startSendingKeepAlivePackets"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "stopSendingKeepAlivePackets"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "setScanningMacOui"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 3
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "startDebugPacketFateMonitoring"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-    }
-
-    api: {
-        name: "getDebugTxPacketFates"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::WifiDebugTxPacketFateReport"
-            }
-        }
-    }
-
-    api: {
-        name: "getDebugRxPacketFates"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::WifiDebugRxPacketFateReport"
-            }
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/WifiStaIfaceEventCallback.vts b/wifi/1.0/vts/WifiStaIfaceEventCallback.vts
deleted file mode 100644
index 99bf03f..0000000
--- a/wifi/1.0/vts/WifiStaIfaceEventCallback.vts
+++ /dev/null
@@ -1,66 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IWifiStaIfaceEventCallback"
-
-package: "android.hardware.wifi"
-
-import: "android.hardware.wifi@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onBackgroundScanFailure"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onBackgroundFullScanResult"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaScanResult"
-        }
-    }
-
-    api: {
-        name: "onBackgroundScanResults"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::V1_0::StaScanData"
-            }
-        }
-    }
-
-    api: {
-        name: "onRssiThresholdBreached"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-    }
-
-}
diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp
index 8a5d7e0..eab338b 100644
--- a/wifi/1.0/vts/functional/Android.bp
+++ b/wifi/1.0/vts/functional/Android.bp
@@ -15,10 +15,10 @@
 //
 
 cc_test {
-    name: "wifi_hidl_test",
-    gtest: true,
+    name: "VtsHalWifiV1_0TargetTest",
+    defaults: ["hidl_defaults"],
     srcs: [
-        "main.cpp",
+        "VtsHalWifiV1_0TargetTest.cpp",
         "wifi_ap_iface_hidl_test.cpp",
         "wifi_chip_hidl_test.cpp",
         "wifi_hidl_call_util_selftest.cpp",
@@ -34,12 +34,11 @@
         "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "libhwbinder",
         "libnativehelper",
         "libutils",
         "android.hardware.wifi@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetTestBase"],
     cflags: [
         "-O0",
         "-g",
diff --git a/wifi/1.0/vts/functional/main.cpp b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
similarity index 96%
rename from wifi/1.0/vts/functional/main.cpp
rename to wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
index b33b5eb..b56ed2b 100644
--- a/wifi/1.0/vts/functional/main.cpp
+++ b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "wifi_hidl_test_utils.h"
 
diff --git a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
index dc7b0b9..42d9a96 100644
--- a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiApIface.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all AP Iface HIDL interface tests.
  */
-class WifiApIfaceHidlTest : public ::testing::Test {
+class WifiApIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
index b6ecd8b..084067c 100644
--- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
@@ -18,23 +18,125 @@
 
 #include <android/hardware/wifi/1.0/IWifiChip.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
+#include "wifi_hidl_call_util.h"
 #include "wifi_hidl_test_utils.h"
 
-using ::android::hardware::wifi::V1_0::IWifiChip;
 using ::android::sp;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::wifi::V1_0::IfaceType;
+using ::android::hardware::wifi::V1_0::ChipId;
+using ::android::hardware::wifi::V1_0::ChipModeId;
+using ::android::hardware::wifi::V1_0::WifiDebugRingBufferStatus;
+using ::android::hardware::wifi::V1_0::WifiDebugRingBufferVerboseLevel;
+using ::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonStats;
+using ::android::hardware::wifi::V1_0::WifiStatus;
+using ::android::hardware::wifi::V1_0::WifiStatusCode;
+using ::android::hardware::wifi::V1_0::IWifiChip;
+using ::android::hardware::wifi::V1_0::IWifiApIface;
+using ::android::hardware::wifi::V1_0::IWifiIface;
+using ::android::hardware::wifi::V1_0::IWifiNanIface;
+using ::android::hardware::wifi::V1_0::IWifiP2pIface;
+using ::android::hardware::wifi::V1_0::IWifiRttController;
+using ::android::hardware::wifi::V1_0::IWifiStaIface;
+
+namespace {
+constexpr WifiDebugRingBufferVerboseLevel kDebugRingBufferVerboseLvl =
+    WifiDebugRingBufferVerboseLevel::VERBOSE;
+constexpr uint32_t kDebugRingBufferMaxInterval = 5;
+constexpr uint32_t kDebugRingBufferMaxDataSize = 1024;
+
+/**
+ * Check if any of the ring buffer capabilities are set.
+ */
+bool hasAnyRingBufferCapabilities(uint32_t caps) {
+    return (caps &
+            (IWifiChip::ChipCapabilityMask::DEBUG_RING_BUFFER_CONNECT_EVENT |
+             IWifiChip::ChipCapabilityMask::DEBUG_RING_BUFFER_POWER_EVENT |
+             IWifiChip::ChipCapabilityMask::DEBUG_RING_BUFFER_WAKELOCK_EVENT |
+             IWifiChip::ChipCapabilityMask::DEBUG_RING_BUFFER_VENDOR_DATA));
+}
+}  // namespace
 
 /**
  * Fixture to use for all Wifi chip HIDL interface tests.
  */
-class WifiChipHidlTest : public ::testing::Test {
+class WifiChipHidlTest : public ::testing::VtsHalHidlTargetTestBase {
    public:
-    virtual void SetUp() override {}
+    virtual void SetUp() override {
+        wifi_chip_ = getWifiChip();
+        ASSERT_NE(nullptr, wifi_chip_.get());
+    }
 
     virtual void TearDown() override { stopWifi(); }
 
    protected:
+    // Helper function to configure the Chip in one of the supported modes.
+    // Most of the non-mode-configuration-related methods require chip
+    // to be first configured.
+    ChipModeId configureChipForIfaceType(IfaceType type) {
+        ChipModeId mode_id;
+        EXPECT_TRUE(
+            configureChipToSupportIfaceType(wifi_chip_, type, &mode_id));
+        return mode_id;
+    }
+
+    uint32_t configureChipForStaIfaceAndGetCapabilities() {
+        configureChipForIfaceType(IfaceType::STA);
+        const auto& status_and_caps = HIDL_INVOKE(wifi_chip_, getCapabilities);
+        EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code);
+        return status_and_caps.second;
+    }
+
+    std::string getIfaceName(const sp<IWifiIface>& iface) {
+        const auto& status_and_name = HIDL_INVOKE(iface, getName);
+        EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_name.first.code);
+        return status_and_name.second;
+    }
+
+    WifiStatusCode createApIface(sp<IWifiApIface>* ap_iface) {
+        const auto& status_and_iface = HIDL_INVOKE(wifi_chip_, createApIface);
+        *ap_iface = status_and_iface.second;
+        return status_and_iface.first.code;
+    }
+
+    WifiStatusCode removeApIface(const std::string& name) {
+        return HIDL_INVOKE(wifi_chip_, removeApIface, name).code;
+    }
+
+    WifiStatusCode createNanIface(sp<IWifiNanIface>* nan_iface) {
+        const auto& status_and_iface = HIDL_INVOKE(wifi_chip_, createNanIface);
+        *nan_iface = status_and_iface.second;
+        return status_and_iface.first.code;
+    }
+
+    WifiStatusCode removeNanIface(const std::string& name) {
+        return HIDL_INVOKE(wifi_chip_, removeNanIface, name).code;
+    }
+
+    WifiStatusCode createP2pIface(sp<IWifiP2pIface>* p2p_iface) {
+        const auto& status_and_iface = HIDL_INVOKE(wifi_chip_, createP2pIface);
+        *p2p_iface = status_and_iface.second;
+        return status_and_iface.first.code;
+    }
+
+    WifiStatusCode removeP2pIface(const std::string& name) {
+        return HIDL_INVOKE(wifi_chip_, removeP2pIface, name).code;
+    }
+
+    WifiStatusCode createStaIface(sp<IWifiStaIface>* sta_iface) {
+        const auto& status_and_iface = HIDL_INVOKE(wifi_chip_, createStaIface);
+        *sta_iface = status_and_iface.second;
+        return status_and_iface.first.code;
+    }
+
+    WifiStatusCode removeStaIface(const std::string& name) {
+        return HIDL_INVOKE(wifi_chip_, removeStaIface, name).code;
+    }
+
+    sp<IWifiChip> wifi_chip_;
 };
 
 /*
@@ -46,3 +148,581 @@
     EXPECT_NE(nullptr, getWifiChip().get());
     stopWifi();
 }
+
+/*
+ * GetId:
+ */
+TEST_F(WifiChipHidlTest, GetId) {
+    EXPECT_EQ(WifiStatusCode::SUCCESS,
+              HIDL_INVOKE(wifi_chip_, getId).first.code);
+}
+
+/*
+ * GetAvailableMode:
+ */
+TEST_F(WifiChipHidlTest, GetAvailableModes) {
+    const auto& status_and_modes = HIDL_INVOKE(wifi_chip_, getAvailableModes);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_modes.first.code);
+    EXPECT_LT(0u, status_and_modes.second.size());
+}
+
+/*
+ * ConfigureChip:
+ */
+TEST_F(WifiChipHidlTest, ConfigureChip) {
+    const auto& status_and_modes = HIDL_INVOKE(wifi_chip_, getAvailableModes);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_modes.first.code);
+    EXPECT_LT(0u, status_and_modes.second.size());
+    for (const auto& mode : status_and_modes.second) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS,
+                  HIDL_INVOKE(wifi_chip_, configureChip, mode.id).code);
+    }
+}
+
+/*
+ * GetCapabilities:
+ */
+TEST_F(WifiChipHidlTest, GetCapabilities) {
+    configureChipForIfaceType(IfaceType::STA);
+    const auto& status_and_caps = HIDL_INVOKE(wifi_chip_, getCapabilities);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code);
+    EXPECT_NE(0u, status_and_caps.second);
+}
+
+/*
+ * GetMode:
+ */
+TEST_F(WifiChipHidlTest, GetMode) {
+    ChipModeId chip_mode_id = configureChipForIfaceType(IfaceType::STA);
+    const auto& status_and_mode = HIDL_INVOKE(wifi_chip_, getMode);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_mode.first.code);
+    EXPECT_EQ(chip_mode_id, status_and_mode.second);
+}
+
+/*
+ * RequestChipDebugInfo:
+ */
+TEST_F(WifiChipHidlTest, RequestChipDebugInfo) {
+    configureChipForIfaceType(IfaceType::STA);
+    const auto& status_and_chip_info =
+        HIDL_INVOKE(wifi_chip_, requestChipDebugInfo);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_chip_info.first.code);
+    EXPECT_LT(0u, status_and_chip_info.second.driverDescription.size());
+    EXPECT_LT(0u, status_and_chip_info.second.firmwareDescription.size());
+}
+
+/*
+ * RequestFirmwareDebugDump
+ */
+TEST_F(WifiChipHidlTest, RequestFirmwareDebugDump) {
+    uint32_t caps = configureChipForStaIfaceAndGetCapabilities();
+    const auto& status_and_firmware_dump =
+        HIDL_INVOKE(wifi_chip_, requestFirmwareDebugDump);
+    if (caps & IWifiChip::ChipCapabilityMask::DEBUG_MEMORY_FIRMWARE_DUMP) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_firmware_dump.first.code);
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED,
+                  status_and_firmware_dump.first.code);
+    }
+}
+
+/*
+ * RequestDriverDebugDump
+ */
+TEST_F(WifiChipHidlTest, RequestDriverDebugDump) {
+    uint32_t caps = configureChipForStaIfaceAndGetCapabilities();
+    const auto& status_and_driver_dump =
+        HIDL_INVOKE(wifi_chip_, requestDriverDebugDump);
+    if (caps & IWifiChip::ChipCapabilityMask::DEBUG_MEMORY_DRIVER_DUMP) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_driver_dump.first.code);
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED,
+                  status_and_driver_dump.first.code);
+    }
+}
+
+/*
+ * GetDebugRingBuffersStatus
+ */
+TEST_F(WifiChipHidlTest, GetDebugRingBuffersStatus) {
+    uint32_t caps = configureChipForStaIfaceAndGetCapabilities();
+    const auto& status_and_ring_buffer_status =
+        HIDL_INVOKE(wifi_chip_, getDebugRingBuffersStatus);
+    if (hasAnyRingBufferCapabilities(caps)) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS,
+                  status_and_ring_buffer_status.first.code);
+        for (const auto& ring_buffer : status_and_ring_buffer_status.second) {
+            EXPECT_LT(0u, ring_buffer.ringName.size());
+        }
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED,
+                  status_and_ring_buffer_status.first.code);
+    }
+}
+
+/*
+ * StartLoggingToDebugRingBuffer
+ */
+TEST_F(WifiChipHidlTest, StartLoggingToDebugRingBuffer) {
+    uint32_t caps = configureChipForStaIfaceAndGetCapabilities();
+    std::string ring_name;
+    const auto& status_and_ring_buffer_status =
+        HIDL_INVOKE(wifi_chip_, getDebugRingBuffersStatus);
+    if (hasAnyRingBufferCapabilities(caps)) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS,
+                  status_and_ring_buffer_status.first.code);
+        ASSERT_LT(0u, status_and_ring_buffer_status.second.size());
+        ring_name = status_and_ring_buffer_status.second[0].ringName.c_str();
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED,
+                  status_and_ring_buffer_status.first.code);
+    }
+    const auto& status =
+        HIDL_INVOKE(wifi_chip_, startLoggingToDebugRingBuffer, ring_name,
+                    kDebugRingBufferVerboseLvl, kDebugRingBufferMaxInterval,
+                    kDebugRingBufferMaxDataSize);
+    if (hasAnyRingBufferCapabilities(caps)) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS, status.code);
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED, status.code);
+    }
+}
+
+/*
+ * ForceDumpToDebugRingBuffer
+ */
+TEST_F(WifiChipHidlTest, ForceDumpToDebugRingBuffer) {
+    uint32_t caps = configureChipForStaIfaceAndGetCapabilities();
+    std::string ring_name;
+    const auto& status_and_ring_buffer_status =
+        HIDL_INVOKE(wifi_chip_, getDebugRingBuffersStatus);
+    if (hasAnyRingBufferCapabilities(caps)) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS,
+                  status_and_ring_buffer_status.first.code);
+        ASSERT_LT(0u, status_and_ring_buffer_status.second.size());
+        ring_name = status_and_ring_buffer_status.second[0].ringName.c_str();
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED,
+                  status_and_ring_buffer_status.first.code);
+    }
+    const auto& status =
+        HIDL_INVOKE(wifi_chip_, forceDumpToDebugRingBuffer, ring_name);
+    if (hasAnyRingBufferCapabilities(caps)) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS, status.code);
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED, status.code);
+    }
+}
+
+/*
+ * GetDebugHostWakeReasonStats
+ */
+TEST_F(WifiChipHidlTest, GetDebugHostWakeReasonStats) {
+    uint32_t caps = configureChipForStaIfaceAndGetCapabilities();
+    const auto& status_and_debug_wake_reason =
+        HIDL_INVOKE(wifi_chip_, getDebugHostWakeReasonStats);
+    if (caps & IWifiChip::ChipCapabilityMask::DEBUG_HOST_WAKE_REASON_STATS) {
+        EXPECT_EQ(WifiStatusCode::SUCCESS,
+                  status_and_debug_wake_reason.first.code);
+    } else {
+        EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED,
+                  status_and_debug_wake_reason.first.code);
+    }
+}
+
+/*
+ * CreateApIface
+ * Configures the chip in AP mode and ensures that only 1 iface creation
+ * succeeds. The 2nd iface creation should be rejected.
+ */
+TEST_F(WifiChipHidlTest, CreateApIface) {
+    configureChipForIfaceType(IfaceType::AP);
+
+    sp<IWifiApIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createApIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createApIface(&iface));
+}
+
+/*
+ * GetApIfaceNames
+ * Configures the chip in AP mode and ensures that the iface list is empty
+ * before creating the iface. Then, create the iface and ensure that
+ * iface name is returned via the list.
+ */
+TEST_F(WifiChipHidlTest, GetApIfaceNames) {
+    configureChipForIfaceType(IfaceType::AP);
+
+    const auto& status_and_iface_names1 =
+        HIDL_INVOKE(wifi_chip_, getApIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names1.first.code);
+    EXPECT_EQ(0u, status_and_iface_names1.second.size());
+
+    sp<IWifiApIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createApIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    std::string iface_name = getIfaceName(iface);
+    const auto& status_and_iface_names2 =
+        HIDL_INVOKE(wifi_chip_, getApIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names2.first.code);
+    EXPECT_EQ(1u, status_and_iface_names2.second.size());
+    EXPECT_EQ(iface_name, status_and_iface_names2.second[0]);
+
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeApIface(iface_name));
+    const auto& status_and_iface_names3 =
+        HIDL_INVOKE(wifi_chip_, getApIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names3.first.code);
+    EXPECT_EQ(0u, status_and_iface_names3.second.size());
+}
+
+/*
+ * GetApIface
+ * Configures the chip in AP mode and create an iface. Then, retrieve
+ * the iface object using the correct name and ensure any other name
+ * doesn't retrieve an iface object.
+ */
+TEST_F(WifiChipHidlTest, GetApIface) {
+    configureChipForIfaceType(IfaceType::AP);
+
+    sp<IWifiApIface> ap_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createApIface(&ap_iface));
+    EXPECT_NE(nullptr, ap_iface.get());
+
+    std::string iface_name = getIfaceName(ap_iface);
+    const auto& status_and_iface1 =
+        HIDL_INVOKE(wifi_chip_, getApIface, iface_name);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface1.first.code);
+    EXPECT_NE(nullptr, status_and_iface1.second.get());
+
+    std::string invalid_name = iface_name + "0";
+    const auto& status_and_iface2 =
+        HIDL_INVOKE(wifi_chip_, getApIface, invalid_name);
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, status_and_iface2.first.code);
+    EXPECT_EQ(nullptr, status_and_iface2.second.get());
+}
+
+/*
+ * RemoveApIface
+ * Configures the chip in AP mode and create an iface. Then, remove
+ * the iface object using the correct name and ensure any other name
+ * doesn't remove the iface.
+ */
+TEST_F(WifiChipHidlTest, RemoveApIface) {
+    configureChipForIfaceType(IfaceType::AP);
+
+    sp<IWifiApIface> ap_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createApIface(&ap_iface));
+    EXPECT_NE(nullptr, ap_iface.get());
+
+    std::string iface_name = getIfaceName(ap_iface);
+    std::string invalid_name = iface_name + "0";
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeApIface(invalid_name));
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeApIface(iface_name));
+
+    // No such iface exists now. So, this should return failure.
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeApIface(iface_name));
+}
+
+/*
+ * CreateNanIface
+ * Configures the chip in NAN mode and ensures that only 1 iface creation
+ * succeeds. The 2nd iface creation should be rejected.
+ */
+TEST_F(WifiChipHidlTest, CreateNanIface) {
+    configureChipForIfaceType(IfaceType::NAN);
+
+    sp<IWifiNanIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createNanIface(&iface));
+}
+
+/*
+ * GetNanIfaceNames
+ * Configures the chip in NAN mode and ensures that the iface list is empty
+ * before creating the iface. Then, create the iface and ensure that
+ * iface name is returned via the list.
+ */
+TEST_F(WifiChipHidlTest, GetNanIfaceNames) {
+    configureChipForIfaceType(IfaceType::NAN);
+
+    const auto& status_and_iface_names1 =
+        HIDL_INVOKE(wifi_chip_, getNanIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names1.first.code);
+    EXPECT_EQ(0u, status_and_iface_names1.second.size());
+
+    sp<IWifiNanIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    std::string iface_name = getIfaceName(iface);
+    const auto& status_and_iface_names2 =
+        HIDL_INVOKE(wifi_chip_, getNanIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names2.first.code);
+    EXPECT_EQ(1u, status_and_iface_names2.second.size());
+    EXPECT_EQ(iface_name, status_and_iface_names2.second[0]);
+
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeNanIface(iface_name));
+    const auto& status_and_iface_names3 =
+        HIDL_INVOKE(wifi_chip_, getNanIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names3.first.code);
+    EXPECT_EQ(0u, status_and_iface_names3.second.size());
+}
+
+/*
+ * GetNanIface
+ * Configures the chip in NAN mode and create an iface. Then, retrieve
+ * the iface object using the correct name and ensure any other name
+ * doesn't retrieve an iface object.
+ */
+TEST_F(WifiChipHidlTest, GetNanIface) {
+    configureChipForIfaceType(IfaceType::NAN);
+
+    sp<IWifiNanIface> nan_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));
+    EXPECT_NE(nullptr, nan_iface.get());
+
+    std::string iface_name = getIfaceName(nan_iface);
+    const auto& status_and_iface1 =
+        HIDL_INVOKE(wifi_chip_, getNanIface, iface_name);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface1.first.code);
+    EXPECT_NE(nullptr, status_and_iface1.second.get());
+
+    std::string invalid_name = iface_name + "0";
+    const auto& status_and_iface2 =
+        HIDL_INVOKE(wifi_chip_, getNanIface, invalid_name);
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, status_and_iface2.first.code);
+    EXPECT_EQ(nullptr, status_and_iface2.second.get());
+}
+
+/*
+ * RemoveNanIface
+ * Configures the chip in NAN mode and create an iface. Then, remove
+ * the iface object using the correct name and ensure any other name
+ * doesn't remove the iface.
+ */
+TEST_F(WifiChipHidlTest, RemoveNanIface) {
+    configureChipForIfaceType(IfaceType::NAN);
+
+    sp<IWifiNanIface> nan_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));
+    EXPECT_NE(nullptr, nan_iface.get());
+
+    std::string iface_name = getIfaceName(nan_iface);
+    std::string invalid_name = iface_name + "0";
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeNanIface(invalid_name));
+
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeNanIface(iface_name));
+
+    // No such iface exists now. So, this should return failure.
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeNanIface(iface_name));
+}
+
+/*
+ * CreateP2pIface
+ * Configures the chip in P2P mode and ensures that only 1 iface creation
+ * succeeds. The 2nd iface creation should be rejected.
+ */
+TEST_F(WifiChipHidlTest, CreateP2pIface) {
+    configureChipForIfaceType(IfaceType::P2P);
+
+    sp<IWifiP2pIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createP2pIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createP2pIface(&iface));
+}
+
+/*
+ * GetP2pIfaceNames
+ * Configures the chip in P2P mode and ensures that the iface list is empty
+ * before creating the iface. Then, create the iface and ensure that
+ * iface name is returned via the list.
+ */
+TEST_F(WifiChipHidlTest, GetP2pIfaceNames) {
+    configureChipForIfaceType(IfaceType::P2P);
+
+    const auto& status_and_iface_names1 =
+        HIDL_INVOKE(wifi_chip_, getP2pIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names1.first.code);
+    EXPECT_EQ(0u, status_and_iface_names1.second.size());
+
+    sp<IWifiP2pIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createP2pIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    std::string iface_name = getIfaceName(iface);
+    const auto& status_and_iface_names2 =
+        HIDL_INVOKE(wifi_chip_, getP2pIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names2.first.code);
+    EXPECT_EQ(1u, status_and_iface_names2.second.size());
+    EXPECT_EQ(iface_name, status_and_iface_names2.second[0]);
+
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeP2pIface(iface_name));
+    const auto& status_and_iface_names3 =
+        HIDL_INVOKE(wifi_chip_, getP2pIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names3.first.code);
+    EXPECT_EQ(0u, status_and_iface_names3.second.size());
+}
+
+/*
+ * GetP2pIface
+ * Configures the chip in P2P mode and create an iface. Then, retrieve
+ * the iface object using the correct name and ensure any other name
+ * doesn't retrieve an iface object.
+ */
+TEST_F(WifiChipHidlTest, GetP2pIface) {
+    configureChipForIfaceType(IfaceType::P2P);
+
+    sp<IWifiP2pIface> p2p_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createP2pIface(&p2p_iface));
+    EXPECT_NE(nullptr, p2p_iface.get());
+
+    std::string iface_name = getIfaceName(p2p_iface);
+    const auto& status_and_iface1 =
+        HIDL_INVOKE(wifi_chip_, getP2pIface, iface_name);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface1.first.code);
+    EXPECT_NE(nullptr, status_and_iface1.second.get());
+
+    std::string invalid_name = iface_name + "0";
+    const auto& status_and_iface2 =
+        HIDL_INVOKE(wifi_chip_, getP2pIface, invalid_name);
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, status_and_iface2.first.code);
+    EXPECT_EQ(nullptr, status_and_iface2.second.get());
+}
+
+/*
+ * RemoveP2pIface
+ * Configures the chip in P2P mode and create an iface. Then, remove
+ * the iface object using the correct name and ensure any other name
+ * doesn't remove the iface.
+ */
+TEST_F(WifiChipHidlTest, RemoveP2pIface) {
+    configureChipForIfaceType(IfaceType::P2P);
+
+    sp<IWifiP2pIface> p2p_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createP2pIface(&p2p_iface));
+    EXPECT_NE(nullptr, p2p_iface.get());
+
+    std::string iface_name = getIfaceName(p2p_iface);
+    std::string invalid_name = iface_name + "0";
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeP2pIface(invalid_name));
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeP2pIface(iface_name));
+
+    // No such iface exists now. So, this should return failure.
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeP2pIface(iface_name));
+}
+
+/*
+ * CreateStaIface
+ * Configures the chip in STA mode and ensures that only 1 iface creation
+ * succeeds. The 2nd iface creation should be rejected.
+ */
+TEST_F(WifiChipHidlTest, CreateStaIface) {
+    configureChipForIfaceType(IfaceType::STA);
+
+    sp<IWifiStaIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createStaIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createStaIface(&iface));
+}
+
+/*
+ * GetStaIfaceNames
+ * Configures the chip in STA mode and ensures that the iface list is empty
+ * before creating the iface. Then, create the iface and ensure that
+ * iface name is returned via the list.
+ */
+TEST_F(WifiChipHidlTest, GetStaIfaceNames) {
+    configureChipForIfaceType(IfaceType::STA);
+
+    const auto& status_and_iface_names1 =
+        HIDL_INVOKE(wifi_chip_, getStaIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names1.first.code);
+    EXPECT_EQ(0u, status_and_iface_names1.second.size());
+
+    sp<IWifiStaIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createStaIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    std::string iface_name = getIfaceName(iface);
+    const auto& status_and_iface_names2 =
+        HIDL_INVOKE(wifi_chip_, getStaIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names2.first.code);
+    EXPECT_EQ(1u, status_and_iface_names2.second.size());
+    EXPECT_EQ(iface_name, status_and_iface_names2.second[0]);
+
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeStaIface(iface_name));
+    const auto& status_and_iface_names3 =
+        HIDL_INVOKE(wifi_chip_, getStaIfaceNames);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface_names3.first.code);
+    EXPECT_EQ(0u, status_and_iface_names3.second.size());
+}
+
+/*
+ * GetStaIface
+ * Configures the chip in STA mode and create an iface. Then, retrieve
+ * the iface object using the correct name and ensure any other name
+ * doesn't retrieve an iface object.
+ */
+TEST_F(WifiChipHidlTest, GetStaIface) {
+    configureChipForIfaceType(IfaceType::STA);
+
+    sp<IWifiStaIface> sta_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createStaIface(&sta_iface));
+    EXPECT_NE(nullptr, sta_iface.get());
+
+    std::string iface_name = getIfaceName(sta_iface);
+    const auto& status_and_iface1 =
+        HIDL_INVOKE(wifi_chip_, getStaIface, iface_name);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface1.first.code);
+    EXPECT_NE(nullptr, status_and_iface1.second.get());
+
+    std::string invalid_name = iface_name + "0";
+    const auto& status_and_iface2 =
+        HIDL_INVOKE(wifi_chip_, getStaIface, invalid_name);
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, status_and_iface2.first.code);
+    EXPECT_EQ(nullptr, status_and_iface2.second.get());
+}
+
+/*
+ * RemoveStaIface
+ * Configures the chip in STA mode and create an iface. Then, remove
+ * the iface object using the correct name and ensure any other name
+ * doesn't remove the iface.
+ */
+TEST_F(WifiChipHidlTest, RemoveStaIface) {
+    configureChipForIfaceType(IfaceType::STA);
+
+    sp<IWifiStaIface> sta_iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createStaIface(&sta_iface));
+    EXPECT_NE(nullptr, sta_iface.get());
+
+    std::string iface_name = getIfaceName(sta_iface);
+    std::string invalid_name = iface_name + "0";
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeStaIface(invalid_name));
+    EXPECT_EQ(WifiStatusCode::SUCCESS, removeStaIface(iface_name));
+
+    // No such iface exists now. So, this should return failure.
+    EXPECT_EQ(WifiStatusCode::ERROR_INVALID_ARGS, removeStaIface(iface_name));
+}
+
+/*
+ * CreateRttController
+ */
+TEST_F(WifiChipHidlTest, CreateRttController) {
+    configureChipForIfaceType(IfaceType::AP);
+
+    sp<IWifiApIface> iface;
+    EXPECT_EQ(WifiStatusCode::SUCCESS, createApIface(&iface));
+    EXPECT_NE(nullptr, iface.get());
+
+    const auto& status_and_rtt_controller =
+        HIDL_INVOKE(wifi_chip_, createRttController, iface);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_rtt_controller.first.code);
+    EXPECT_NE(nullptr, status_and_rtt_controller.second.get());
+}
diff --git a/wifi/1.0/vts/functional/wifi_hidl_call_util.h b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
index 03200a0..f3ca517 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_call_util.h
+++ b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
@@ -21,7 +21,7 @@
 #include <type_traits>
 #include <utility>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 namespace {
 namespace detail {
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
index 3e350e5..b8e501c 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifi.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all root Wifi HIDL interface tests.
  */
-class WifiHidlTest : public ::testing::Test {
+class WifiHidlTest : public ::testing::VtsHalHidlTargetTestBase {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
index 8f34a88..2d0b081 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "wifi_hidl_call_util.h"
 #include "wifi_hidl_test_utils.h"
@@ -35,15 +35,63 @@
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
 
+namespace {
+bool findAnyModeSupportingIfaceType(
+    IfaceType desired_type, const std::vector<IWifiChip::ChipMode>& modes,
+    ChipModeId* mode_id) {
+    for (const auto& mode : modes) {
+        for (const auto& combination : mode.availableCombinations) {
+            for (const auto& iface_limit : combination.limits) {
+                const auto& iface_types = iface_limit.types;
+                if (std::find(iface_types.begin(), iface_types.end(),
+                              desired_type) != iface_types.end()) {
+                    *mode_id = mode.id;
+                    return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
+bool configureChipToSupportIfaceTypeInternal(const sp<IWifiChip>& wifi_chip,
+                                             IfaceType type,
+                                             ChipModeId* configured_mode_id) {
+    if (!configured_mode_id) {
+        return false;
+    }
+    const auto& status_and_modes = HIDL_INVOKE(wifi_chip, getAvailableModes);
+    if (status_and_modes.first.code != WifiStatusCode::SUCCESS) {
+        return false;
+    }
+    if (!findAnyModeSupportingIfaceType(type, status_and_modes.second,
+                                        configured_mode_id)) {
+        return false;
+    }
+    if (HIDL_INVOKE(wifi_chip, configureChip, *configured_mode_id).code !=
+        WifiStatusCode::SUCCESS) {
+        return false;
+    }
+    return true;
+}
+
+bool configureChipToSupportIfaceTypeInternal(const sp<IWifiChip>& wifi_chip,
+                                             IfaceType type) {
+    ChipModeId mode_id;
+    return configureChipToSupportIfaceTypeInternal(wifi_chip, type, &mode_id);
+}
+}  // namespace
+
 void stopFramework() {
-    ASSERT_EQ(std::system("svc wifi disable"), 0);
+    ASSERT_EQ(std::system("stop"), 0);
+    stopWifi();
     sleep(5);
 }
 
-void startFramework() { ASSERT_EQ(std::system("svc wifi enable"), 0); }
+void startFramework() { ASSERT_EQ(std::system("start"), 0); }
 
 sp<IWifi> getWifi() {
-    sp<IWifi> wifi = IWifi::getService();
+    sp<IWifi> wifi = ::testing::VtsHalHidlTargetTestBase::getService<IWifi>();
     return wifi;
 }
 
@@ -52,79 +100,30 @@
     if (!wifi.get()) {
         return nullptr;
     }
-
     if (HIDL_INVOKE(wifi, start).code != WifiStatusCode::SUCCESS) {
         return nullptr;
     }
-
     const auto& status_and_chip_ids = HIDL_INVOKE(wifi, getChipIds);
     const auto& chip_ids = status_and_chip_ids.second;
     if (status_and_chip_ids.first.code != WifiStatusCode::SUCCESS ||
         chip_ids.size() != 1) {
         return nullptr;
     }
-
     const auto& status_and_chip = HIDL_INVOKE(wifi, getChip, chip_ids[0]);
     if (status_and_chip.first.code != WifiStatusCode::SUCCESS) {
         return nullptr;
     }
-
     return status_and_chip.second;
 }
 
-// Since we currently only support one iface of each type. Just iterate thru the
-// modes of operation and find the mode ID to use for that iface type.
-bool findModeToSupportIfaceType(IfaceType type,
-                                const std::vector<IWifiChip::ChipMode>& modes,
-                                ChipModeId* mode_id) {
-    for (const auto& mode : modes) {
-        std::vector<IWifiChip::ChipIfaceCombination> combinations =
-            mode.availableCombinations;
-        for (const auto& combination : combinations) {
-            std::vector<IWifiChip::ChipIfaceCombinationLimit> iface_limits =
-                combination.limits;
-            for (const auto& iface_limit : iface_limits) {
-                std::vector<IfaceType> iface_types = iface_limit.types;
-                for (const auto& iface_type : iface_types) {
-                    if (iface_type == type) {
-                        *mode_id = mode.id;
-                        return true;
-                    }
-                }
-            }
-        }
-    }
-    return false;
-}
-
-bool configureChipToSupportIfaceType(const sp<IWifiChip>& wifi_chip,
-                                     IfaceType type) {
-    const auto& status_and_modes = HIDL_INVOKE(wifi_chip, getAvailableModes);
-    if (status_and_modes.first.code != WifiStatusCode::SUCCESS) {
-        return false;
-    }
-
-    ChipModeId mode_id;
-    if (!findModeToSupportIfaceType(type, status_and_modes.second, &mode_id)) {
-        return false;
-    }
-
-    if (HIDL_INVOKE(wifi_chip, configureChip, mode_id).code !=
-        WifiStatusCode::SUCCESS) {
-        return false;
-    }
-    return true;
-}
-
 sp<IWifiApIface> getWifiApIface() {
     sp<IWifiChip> wifi_chip = getWifiChip();
     if (!wifi_chip.get()) {
         return nullptr;
     }
-    if (!configureChipToSupportIfaceType(wifi_chip, IfaceType::AP)) {
+    if (!configureChipToSupportIfaceTypeInternal(wifi_chip, IfaceType::AP)) {
         return nullptr;
     }
-
     const auto& status_and_iface = HIDL_INVOKE(wifi_chip, createApIface);
     if (status_and_iface.first.code != WifiStatusCode::SUCCESS) {
         return nullptr;
@@ -137,10 +136,9 @@
     if (!wifi_chip.get()) {
         return nullptr;
     }
-    if (!configureChipToSupportIfaceType(wifi_chip, IfaceType::NAN)) {
+    if (!configureChipToSupportIfaceTypeInternal(wifi_chip, IfaceType::NAN)) {
         return nullptr;
     }
-
     const auto& status_and_iface = HIDL_INVOKE(wifi_chip, createNanIface);
     if (status_and_iface.first.code != WifiStatusCode::SUCCESS) {
         return nullptr;
@@ -153,10 +151,9 @@
     if (!wifi_chip.get()) {
         return nullptr;
     }
-    if (!configureChipToSupportIfaceType(wifi_chip, IfaceType::P2P)) {
+    if (!configureChipToSupportIfaceTypeInternal(wifi_chip, IfaceType::P2P)) {
         return nullptr;
     }
-
     const auto& status_and_iface = HIDL_INVOKE(wifi_chip, createP2pIface);
     if (status_and_iface.first.code != WifiStatusCode::SUCCESS) {
         return nullptr;
@@ -169,10 +166,9 @@
     if (!wifi_chip.get()) {
         return nullptr;
     }
-    if (!configureChipToSupportIfaceType(wifi_chip, IfaceType::STA)) {
+    if (!configureChipToSupportIfaceTypeInternal(wifi_chip, IfaceType::STA)) {
         return nullptr;
     }
-
     const auto& status_and_iface = HIDL_INVOKE(wifi_chip, createStaIface);
     if (status_and_iface.first.code != WifiStatusCode::SUCCESS) {
         return nullptr;
@@ -189,7 +185,6 @@
     if (!wifi_sta_iface.get()) {
         return nullptr;
     }
-
     const auto& status_and_controller =
         HIDL_INVOKE(wifi_chip, createRttController, wifi_sta_iface);
     if (status_and_controller.first.code != WifiStatusCode::SUCCESS) {
@@ -198,6 +193,13 @@
     return status_and_controller.second;
 }
 
+bool configureChipToSupportIfaceType(const sp<IWifiChip>& wifi_chip,
+                                     IfaceType type,
+                                     ChipModeId* configured_mode_id) {
+    return configureChipToSupportIfaceTypeInternal(wifi_chip, type,
+                                                   configured_mode_id);
+}
+
 void stopWifi() {
     sp<IWifi> wifi = getWifi();
     ASSERT_NE(wifi, nullptr);
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.h b/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
index 08933d9..a723b2a 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
@@ -41,5 +41,11 @@
 android::sp<android::hardware::wifi::V1_0::IWifiStaIface> getWifiStaIface();
 android::sp<android::hardware::wifi::V1_0::IWifiRttController>
 getWifiRttController();
+// Configure the chip in a mode to support the creation of the provided
+// iface type.
+bool configureChipToSupportIfaceType(
+    const android::sp<android::hardware::wifi::V1_0::IWifiChip>& wifi_chip,
+    android::hardware::wifi::V1_0::IfaceType type,
+    android::hardware::wifi::V1_0::ChipModeId* configured_mode_id);
 // Used to trigger IWifi.stop() at the end of every test.
 void stopWifi();
diff --git a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
index a8be48c..85bcccd 100644
--- a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
@@ -17,24 +17,427 @@
 #include <android-base/logging.h>
 
 #include <android/hardware/wifi/1.0/IWifiNanIface.h>
+#include <android/hardware/wifi/1.0/IWifiNanIfaceEventCallback.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
 
+#include "wifi_hidl_call_util.h"
 #include "wifi_hidl_test_utils.h"
 
-using ::android::hardware::wifi::V1_0::IWifiNanIface;
+using namespace ::android::hardware::wifi::V1_0;
+
+using ::android::hardware::Return;
+using ::android::hardware::Void;
 using ::android::sp;
 
+#define TIMEOUT_PERIOD 10
+
 /**
  * Fixture to use for all NAN Iface HIDL interface tests.
  */
-class WifiNanIfaceHidlTest : public ::testing::Test {
-   public:
-    virtual void SetUp() override {}
+class WifiNanIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+  public:
+    virtual void SetUp() override {
+      iwifiNanIface = getWifiNanIface();
+      ASSERT_NE(nullptr, iwifiNanIface.get());
+      ASSERT_EQ(WifiStatusCode::SUCCESS, HIDL_INVOKE(iwifiNanIface, registerEventCallback,
+            new WifiNanIfaceEventCallback(*this)).code);
+    }
 
-    virtual void TearDown() override { stopWifi(); }
+    virtual void TearDown() override {
+      stopWifi();
+    }
 
-   protected:
+    /* Used as a mechanism to inform the test about data/event callback */
+    inline void notify() {
+      std::unique_lock<std::mutex> lock(mtx_);
+      count_++;
+      cv_.notify_one();
+    }
+
+    enum CallbackType {
+        INVALID = -2,
+        ANY_CALLBACK = -1,
+
+        NOTIFY_CAPABILITIES_RESPONSE = 0,
+        NOTIFY_ENABLE_RESPONSE,
+        NOTIFY_CONFIG_RESPONSE,
+        NOTIFY_DISABLE_RESPONSE,
+        NOTIFY_START_PUBLISH_RESPONSE,
+        NOTIFY_STOP_PUBLISH_RESPONSE,
+        NOTIFY_START_SUBSCRIBE_RESPONSE,
+        NOTIFY_STOP_SUBSCRIBE_RESPONSE,
+        NOTIFY_TRANSMIT_FOLLOWUP_RESPONSE,
+        NOTIFY_CREATE_DATA_INTERFACE_RESPONSE,
+        NOTIFY_DELETE_DATA_INTERFACE_RESPONSE,
+        NOTIFY_INITIATE_DATA_PATH_RESPONSE,
+        NOTIFY_RESPOND_TO_DATA_PATH_INDICATION_RESPONSE,
+        NOTIFY_TERMINATE_DATA_PATH_RESPONSE,
+
+        EVENT_CLUSTER_EVENT,
+        EVENT_DISABLED,
+        EVENT_PUBLISH_TERMINATED,
+        EVENT_SUBSCRIBE_TERMINATED,
+        EVENT_MATCH,
+        EVENT_MATCH_EXPIRED,
+        EVENT_FOLLOWUP_RECEIVED,
+        EVENT_TRANSMIT_FOLLOWUP,
+        EVENT_DATA_PATH_REQUEST,
+        EVENT_DATA_PATH_CONFIRM,
+        EVENT_DATA_PATH_TERMINATED
+    };
+
+    /* Test code calls this function to wait for data/event callback */
+    inline std::cv_status wait(CallbackType waitForCallbackType) {
+      std::unique_lock<std::mutex> lock(mtx_);
+
+      EXPECT_NE(INVALID, waitForCallbackType); // can't ASSERT in a non-void-returning method
+
+      callbackType = INVALID;
+      std::cv_status status = std::cv_status::no_timeout;
+      auto now = std::chrono::system_clock::now();
+      while (count_ == 0) {
+        status = cv_.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
+        if (status == std::cv_status::timeout) return status;
+        if (waitForCallbackType != ANY_CALLBACK && callbackType != INVALID
+            && callbackType != waitForCallbackType) {
+          count_--;
+        }
+      }
+      count_--;
+      return status;
+    }
+
+    class WifiNanIfaceEventCallback: public IWifiNanIfaceEventCallback {
+      WifiNanIfaceHidlTest& parent_;
+
+     public:
+      WifiNanIfaceEventCallback(WifiNanIfaceHidlTest& parent) : parent_(parent) {};
+
+      virtual ~WifiNanIfaceEventCallback() = default;
+
+      Return<void> notifyCapabilitiesResponse(
+            uint16_t id,
+            const WifiNanStatus& status,
+            const NanCapabilities& capabilities) override {
+        parent_.callbackType = NOTIFY_CAPABILITIES_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+        parent_.capabilities = capabilities;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyEnableResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_ENABLE_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyConfigResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_CONFIG_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyDisableResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_DISABLE_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyStartPublishResponse(
+            uint16_t id,
+            const WifiNanStatus& status,
+            uint8_t sessionId) override {
+        parent_.callbackType = NOTIFY_START_PUBLISH_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+        parent_.sessionId = sessionId;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyStopPublishResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_STOP_PUBLISH_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyStartSubscribeResponse(
+            uint16_t id,
+            const WifiNanStatus& status,
+            uint8_t sessionId) override {
+        parent_.callbackType = NOTIFY_START_SUBSCRIBE_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+        parent_.sessionId = sessionId;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyStopSubscribeResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_STOP_SUBSCRIBE_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyTransmitFollowupResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_TRANSMIT_FOLLOWUP_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyCreateDataInterfaceResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_CREATE_DATA_INTERFACE_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyDeleteDataInterfaceResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_DELETE_DATA_INTERFACE_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyInitiateDataPathResponse(
+            uint16_t id,
+            const WifiNanStatus& status,
+            uint32_t ndpInstanceId) override {
+        parent_.callbackType = NOTIFY_INITIATE_DATA_PATH_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+        parent_.ndpInstanceId = ndpInstanceId;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyRespondToDataPathIndicationResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_RESPOND_TO_DATA_PATH_INDICATION_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> notifyTerminateDataPathResponse(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = NOTIFY_TERMINATE_DATA_PATH_RESPONSE;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventClusterEvent(
+            const NanClusterEventInd& event) override {
+        parent_.callbackType = EVENT_CLUSTER_EVENT;
+
+        parent_.nanClusterEventInd = event;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventDisabled(
+            const WifiNanStatus& status) override {
+        parent_.callbackType = EVENT_DISABLED;
+
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventPublishTerminated(
+            uint8_t sessionId,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = EVENT_PUBLISH_TERMINATED;
+
+        parent_.sessionId = sessionId;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventSubscribeTerminated(
+            uint8_t sessionId,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = EVENT_SUBSCRIBE_TERMINATED;
+
+        parent_.sessionId = sessionId;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventMatch(
+            const NanMatchInd& event) override {
+        parent_.callbackType = EVENT_MATCH;
+
+        parent_.nanMatchInd = event;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventMatchExpired(
+            uint8_t discoverySessionId,
+            uint32_t peerId) override {
+        parent_.callbackType = EVENT_MATCH_EXPIRED;
+
+        parent_.sessionId = discoverySessionId;
+        parent_.peerId = peerId;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventFollowupReceived(
+            const NanFollowupReceivedInd& event) override {
+        parent_.callbackType = EVENT_FOLLOWUP_RECEIVED;
+
+        parent_.nanFollowupReceivedInd = event;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventTransmitFollowup(
+            uint16_t id,
+            const WifiNanStatus& status) override {
+        parent_.callbackType = EVENT_TRANSMIT_FOLLOWUP;
+
+        parent_.id = id;
+        parent_.status = status;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventDataPathRequest(
+            const NanDataPathRequestInd& event) override {
+        parent_.callbackType = EVENT_DATA_PATH_REQUEST;
+
+        parent_.nanDataPathRequestInd = event;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventDataPathConfirm(
+            const NanDataPathConfirmInd& event) override {
+        parent_.callbackType = EVENT_DATA_PATH_CONFIRM;
+
+        parent_.nanDataPathConfirmInd = event;
+
+        parent_.notify();
+        return Void();
+      }
+
+      Return<void> eventDataPathTerminated(
+            uint32_t ndpInstanceId) override {
+        parent_.callbackType = EVENT_DATA_PATH_TERMINATED;
+
+        parent_.ndpInstanceId = ndpInstanceId;
+
+        parent_.notify();
+        return Void();
+      }
+    };
+
+    private:
+      // synchronization objects
+      std::mutex mtx_;
+      std::condition_variable cv_;
+      int count_;
+
+    protected:
+      android::sp<IWifiNanIface> iwifiNanIface;
+
+      // Data from IWifiNanIfaceEventCallback callbacks: this is the collection of all
+      // arguments to all callbacks. They are set by the callback (notifications or
+      // events) and can be retrieved by tests.
+      CallbackType callbackType;
+      uint16_t id;
+      WifiNanStatus status;
+      NanCapabilities capabilities;
+      uint8_t sessionId;
+      uint32_t ndpInstanceId;
+      NanClusterEventInd nanClusterEventInd;
+      NanMatchInd nanMatchInd;
+      uint32_t peerId;
+      NanFollowupReceivedInd nanFollowupReceivedInd;
+      NanDataPathRequestInd nanDataPathRequestInd;
+      NanDataPathConfirmInd nanDataPathConfirmInd;
 };
 
 /*
@@ -43,6 +446,49 @@
  * successfully created.
  */
 TEST(WifiNanIfaceHidlTestNoFixture, Create) {
-    EXPECT_NE(nullptr, getWifiNanIface().get());
-    stopWifi();
+  ASSERT_NE(nullptr, getWifiNanIface().get());
+  stopWifi();
+}
+
+/*
+ * Fail: use past destruction
+ * Ensure that API calls fail with ERROR_WIFI_IFACE_INVALID when using an interface once wifi
+ * is disabled.
+ */
+TEST(WifiNanIfaceHidlTestNoFixture, FailOnIfaceInvalid) {
+  android::sp<IWifiNanIface> iwifiNanIface = getWifiNanIface();
+  ASSERT_NE(nullptr, iwifiNanIface.get());
+  stopWifi();
+  sleep(5); // make sure that all chips/interfaces are invalidated
+  ASSERT_EQ(WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+          HIDL_INVOKE(iwifiNanIface, getCapabilitiesRequest, 0).code);
+}
+
+/*
+ * getCapabilitiesRequest: validate that returns capabilities.
+ */
+TEST_F(WifiNanIfaceHidlTest, getCapabilitiesRequest) {
+  uint16_t inputCmdId = 10;
+  ASSERT_EQ(WifiStatusCode::SUCCESS,
+        HIDL_INVOKE(iwifiNanIface, getCapabilitiesRequest, inputCmdId).code);
+  // wait for a callback
+  ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_CAPABILITIES_RESPONSE));
+  ASSERT_EQ(NOTIFY_CAPABILITIES_RESPONSE, callbackType);
+  ASSERT_EQ(id, inputCmdId);
+
+  // check for reasonable capability values
+  EXPECT_GT(capabilities.maxConcurrentClusters, (unsigned int) 0);
+  EXPECT_GT(capabilities.maxPublishes, (unsigned int) 0);
+  EXPECT_GT(capabilities.maxSubscribes, (unsigned int) 0);
+  EXPECT_EQ(capabilities.maxServiceNameLen, (unsigned int) 255);
+  EXPECT_EQ(capabilities.maxMatchFilterLen, (unsigned int) 255);
+  EXPECT_GT(capabilities.maxTotalMatchFilterLen, (unsigned int) 255);
+  EXPECT_EQ(capabilities.maxServiceSpecificInfoLen, (unsigned int) 255);
+  EXPECT_GE(capabilities.maxExtendedServiceSpecificInfoLen, (unsigned int) 255);
+  EXPECT_GT(capabilities.maxNdiInterfaces, (unsigned int) 0);
+  EXPECT_GT(capabilities.maxNdpSessions, (unsigned int) 0);
+  EXPECT_GT(capabilities.maxAppInfoLen, (unsigned int) 0);
+  EXPECT_GT(capabilities.maxQueuedTransmitFollowupMsgs, (unsigned int) 0);
+  EXPECT_GT(capabilities.maxSubscribeInterfaceAddresses, (unsigned int) 0);
+  EXPECT_NE(capabilities.supportedCipherSuites, (unsigned int) 0);
 }
diff --git a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
index e29226d..269eb6c 100644
--- a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiP2pIface.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all P2P Iface HIDL interface tests.
  */
-class WifiP2pIfaceHidlTest : public ::testing::Test {
+class WifiP2pIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
index 7aee761..e13086d 100644
--- a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiRttController.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all RTT controller HIDL interface tests.
  */
-class WifiRttControllerHidlTest : public ::testing::Test {
+class WifiRttControllerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
index 770763c..95add61 100644
--- a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
@@ -18,23 +18,30 @@
 
 #include <android/hardware/wifi/1.0/IWifiStaIface.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
+#include "wifi_hidl_call_util.h"
 #include "wifi_hidl_test_utils.h"
 
-using ::android::hardware::wifi::V1_0::IWifiStaIface;
 using ::android::sp;
+using ::android::hardware::wifi::V1_0::IWifiStaIface;
+using ::android::hardware::wifi::V1_0::WifiStatus;
+using ::android::hardware::wifi::V1_0::WifiStatusCode;
 
 /**
  * Fixture to use for all STA Iface HIDL interface tests.
  */
-class WifiStaIfaceHidlTest : public ::testing::Test {
+class WifiStaIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
    public:
-    virtual void SetUp() override {}
+    virtual void SetUp() override {
+        wifi_sta_iface_ = getWifiStaIface();
+        ASSERT_NE(nullptr, wifi_sta_iface_.get());
+    }
 
     virtual void TearDown() override { stopWifi(); }
 
    protected:
+    sp<IWifiStaIface> wifi_sta_iface_;
 };
 
 /*
@@ -46,3 +53,12 @@
     EXPECT_NE(nullptr, getWifiStaIface().get());
     stopWifi();
 }
+
+/*
+ * GetCapabilities:
+ */
+TEST_F(WifiStaIfaceHidlTest, GetCapabilities) {
+    const auto& status_and_caps = HIDL_INVOKE(wifi_sta_iface_, getCapabilities);
+    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_caps.first.code);
+    EXPECT_NE(0u, status_and_caps.second);
+}
diff --git a/wifi/1.0/vts/types.vts b/wifi/1.0/vts/types.vts
deleted file mode 100644
index 388dbc3..0000000
--- a/wifi/1.0/vts/types.vts
+++ /dev/null
@@ -1,2834 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.wifi"
-
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiStatusCode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "ERROR_WIFI_CHIP_INVALID"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "ERROR_WIFI_IFACE_INVALID"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "ERROR_WIFI_RTT_CONTROLLER_INVALID"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "ERROR_NOT_SUPPORTED"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "ERROR_NOT_AVAILABLE"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "ERROR_NOT_STARTED"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "ERROR_INVALID_ARGS"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "ERROR_BUSY"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "ERROR_UNKNOWN"
-        scalar_value: {
-            uint32_t: 9
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiStatus"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "code"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiStatusCode"
-    }
-    struct_value: {
-        name: "description"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::IfaceType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "STA"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "AP"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "P2P"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "NAN"
-        scalar_value: {
-            uint32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiChannelWidthInMhz"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "WIDTH_20"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "WIDTH_40"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "WIDTH_80"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "WIDTH_160"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "WIDTH_80P80"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "WIDTH_5"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "WIDTH_10"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "WIDTH_INVALID"
-        scalar_value: {
-            uint32_t: 4294967295
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiChannelInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "width"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiChannelWidthInMhz"
-    }
-    struct_value: {
-        name: "centerFreq"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "centerFreq0"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "centerFreq1"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiInformationElement"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "id"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "data"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiRatePreamble"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "OFDM"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "CCK"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "HT"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "VHT"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "RESERVED"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiRateNss"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "NSS_1x1"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "NSS_2x2"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "NSS_3x3"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "NSS_4x4"
-        scalar_value: {
-            uint32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiRateInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "preamble"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiRatePreamble"
-    }
-    struct_value: {
-        name: "nss"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiRateNss"
-    }
-    struct_value: {
-        name: "bw"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiChannelWidthInMhz"
-    }
-    struct_value: {
-        name: "rateMcsIdx"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "bitRateInKbps"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaApfPacketFilterCapabilities"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "version"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxLength"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaBackgroundScanCapabilities"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "maxCacheSize"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxBuckets"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxApCachePerScan"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxReportingThreshold"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaBackgroundScanBand"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "BAND_UNSPECIFIED"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "BAND_24GHZ"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "BAND_5GHZ"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "BAND_5GHZ_DFS"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "BAND_5GHZ_WITH_DFS"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "BAND_24GHZ_5GHZ"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "BAND_24GHZ_5GHZ_WITH_DFS"
-        scalar_value: {
-            uint32_t: 7
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaBackgroundScanBucketEventReportSchemeMask"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "EACH_SCAN"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "FULL_RESULTS"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "NO_BATCH"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaBackgroundScanBucketParameters"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "band"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::StaBackgroundScanBand"
-    }
-    struct_value: {
-        name: "frequencies"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-    struct_value: {
-        name: "periodInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "eventReportScheme"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::StaBackgroundScanBucketEventReportSchemeMask"
-    }
-    struct_value: {
-        name: "exponentialMaxPeriodInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "exponentialBase"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "exponentialStepCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaBackgroundScanParameters"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "basePeriodInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxApPerScan"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "reportThresholdPercent"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "reportThresholdNumScans"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "buckets"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaBackgroundScanBucketParameters"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaLinkLayerIfacePacketStats"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "rxMpdu"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "txMpdu"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "lostMpdu"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "retries"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaLinkLayerIfaceStats"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "beaconRx"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "avgRssiMgmt"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "wmeBePktStats"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::StaLinkLayerIfacePacketStats"
-    }
-    struct_value: {
-        name: "wmeBkPktStats"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::StaLinkLayerIfacePacketStats"
-    }
-    struct_value: {
-        name: "wmeViPktStats"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::StaLinkLayerIfacePacketStats"
-    }
-    struct_value: {
-        name: "wmeVoPktStats"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::StaLinkLayerIfacePacketStats"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaLinkLayerRadioStats"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "onTimeInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "txTimeInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "txTimeInMsPerLevel"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-    struct_value: {
-        name: "rxTimeInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "onTimeInMsForScan"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaLinkLayerStats"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "iface"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::StaLinkLayerIfaceStats"
-    }
-    struct_value: {
-        name: "radio"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::StaLinkLayerRadioStats"
-    }
-    struct_value: {
-        name: "timeStampInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaScanResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "timeStampInUs"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "ssid"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "bssid"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "rssi"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "frequency"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "beaconPeriodInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "capability"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "informationElements"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::WifiInformationElement"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaScanDataFlagMask"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "int32_t"
-
-        enumerator: "INTERRUPTED"
-        scalar_value: {
-            int32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaScanData"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "flags"
-        type: TYPE_MASK
-        scalar_type: "int32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::StaScanDataFlagMask"
-    }
-    struct_value: {
-        name: "bucketsScanned"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "results"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::StaScanResult"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaRoamingCapabilities"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "maxBlacklistSize"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxWhitelistSize"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaRoamingConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "bssidBlacklist"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-    struct_value: {
-        name: "ssidWhitelist"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_ARRAY
-            vector_size: 32
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::StaRoamingState"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint8_t"
-
-        enumerator: "DISABLED"
-        scalar_value: {
-            uint8_t: 0
-        }
-        enumerator: "ENABLED"
-        scalar_value: {
-            uint8_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanStatusType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "INTERNAL_FAILURE"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "PROTOCOL_FAILURE"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "INVALID_SESSION_ID"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "NO_RESOURCES_AVAILABLE"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "INVALID_ARGS"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "INVALID_PEER_ID"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "INVALID_NDP_ID"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "NAN_NOT_ALLOWED"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "NO_OTA_ACK"
-        scalar_value: {
-            uint32_t: 9
-        }
-        enumerator: "ALREADY_ENABLED"
-        scalar_value: {
-            uint32_t: 10
-        }
-        enumerator: "FOLLOWUP_TX_QUEUE_FULL"
-        scalar_value: {
-            uint32_t: 11
-        }
-        enumerator: "UNSUPPORTED_CONCURRENCY_NAN_DISABLED"
-        scalar_value: {
-            uint32_t: 12
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanBandIndex"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "NAN_BAND_24GHZ"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "NAN_BAND_5GHZ"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiNanStatus"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanStatusType"
-    }
-    struct_value: {
-        name: "description"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanMatchAlg"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "MATCH_ONCE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "MATCH_CONTINUOUS"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "MATCH_NEVER"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanPublishType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "UNSOLICITED"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "SOLICITED"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "UNSOLICITED_SOLICITED"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanTxType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "BROADCAST"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "UNICAST"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanSubscribeType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "PASSIVE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "ACTIVE"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanSrfType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "BLOOM_FILTER"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "PARTIAL_MAC_ADDR"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanDataPathChannelCfg"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "CHANNEL_NOT_REQUESTED"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "REQUEST_CHANNEL_SETUP"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "FORCE_CHANNEL_SETUP"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanBandSpecificConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "rssiClose"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "rssiMiddle"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "rssiCloseProximity"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "dwellTimeMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "scanPeriodSec"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "validDiscoveryWindowIntervalVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "discoveryWindowIntervalVal"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanDebugConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "validClusterIdVals"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "clusterIdBottomRangeVal"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "clusterIdTopRangeVal"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "validIntfAddrVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "intfAddrVal"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "validOuiVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "ouiVal"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "validRandomFactorForceVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "randomFactorForceVal"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "validHopCountForceVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "hopCountForceVal"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "validDiscoveryChannelVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "discoveryChannelMhzVal"
-        type: TYPE_ARRAY
-        vector_size: 2
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-    struct_value: {
-        name: "validUseBeaconsInBandVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "useBeaconsInBandVal"
-        type: TYPE_ARRAY
-        vector_size: 2
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-    struct_value: {
-        name: "validUseSdfInBandVal"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "useSdfInBandVal"
-        type: TYPE_ARRAY
-        vector_size: 2
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanConfigRequest"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "masterPref"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "disableDiscoveryAddressChangeIndication"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "disableStartedClusterIndication"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "disableJoinedClusterIndication"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "includePublishServiceIdsInBeacon"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "numberOfPublishServiceIdsInBeacon"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "includeSubscribeServiceIdsInBeacon"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "numberOfSubscribeServiceIdsInBeacon"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "rssiWindowSize"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "macAddressRandomizationIntervalSec"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "acceptRangingRequests"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "bandSpecificConfig"
-        type: TYPE_ARRAY
-        vector_size: 2
-        vector_value: {
-            name: "::android::hardware::wifi::V1_0::NanBandSpecificConfig"
-            type: TYPE_STRUCT
-            struct_value: {
-                name: "rssiClose"
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-            struct_value: {
-                name: "rssiMiddle"
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-            struct_value: {
-                name: "rssiCloseProximity"
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-            struct_value: {
-                name: "dwellTimeMs"
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-            struct_value: {
-                name: "scanPeriodSec"
-                type: TYPE_SCALAR
-                scalar_type: "uint16_t"
-            }
-            struct_value: {
-                name: "validDiscoveryWindowIntervalVal"
-                type: TYPE_SCALAR
-                scalar_type: "bool_t"
-            }
-            struct_value: {
-                name: "discoveryWindowIntervalVal"
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanEnableRequest"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "operateInBand"
-        type: TYPE_ARRAY
-        vector_size: 2
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-    struct_value: {
-        name: "hopCountMax"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "configParams"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::NanConfigRequest"
-    }
-    struct_value: {
-        name: "debugConfigs"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::NanDebugConfig"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SHARED_KEY_128_MASK"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "SHARED_KEY_256_MASK"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanRangingIndication"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "CONTINUOUS_INDICATION_MASK"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "INGRESS_MET_MASK"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "EGRESS_MET_MASK"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanDiscoveryCommonConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "sessionId"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "ttlSec"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "discoveryWindowPeriod"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "discoveryCount"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "serviceName"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "discoveryMatchIndicator"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanMatchAlg"
-    }
-    struct_value: {
-        name: "serviceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "extendedServiceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "rxMatchFilter"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "txMatchFilter"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "useRssiThreshold"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "disableDiscoveryTerminationIndication"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "disableMatchExpirationIndication"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "disableFollowupReceivedIndication"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "supportedCipherTypes"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
-    }
-    struct_value: {
-        name: "pmk"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "securityEnabledInNdp"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "rangingRequired"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "rangingIntervalMsec"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "configRangingIndications"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::NanRangingIndication"
-    }
-    struct_value: {
-        name: "distanceIngressCm"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-    struct_value: {
-        name: "distanceEgressCm"
-        type: TYPE_SCALAR
-        scalar_type: "uint16_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanPublishRequest"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "baseConfigs"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::NanDiscoveryCommonConfig"
-    }
-    struct_value: {
-        name: "publishType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanPublishType"
-    }
-    struct_value: {
-        name: "txType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanTxType"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanSubscribeRequest"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "baseConfigs"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::NanDiscoveryCommonConfig"
-    }
-    struct_value: {
-        name: "subscribeType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanSubscribeType"
-    }
-    struct_value: {
-        name: "srfType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanSrfType"
-    }
-    struct_value: {
-        name: "srfRespondIfInAddressSet"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "shouldUseSrf"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "isSsiRequiredForMatch"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "intfAddr"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanTransmitFollowupRequest"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "discoverySessionId"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "peerId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "addr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "isHighPriority"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "shouldUseDiscoveryWindow"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "serviceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "extendedServiceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "disableFollowupResultIndication"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanInitiateDataPathRequest"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "peerId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "peerDiscMacAddr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "channelRequestType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanDataPathChannelCfg"
-    }
-    struct_value: {
-        name: "channel"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "ifaceName"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "securityRequired"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "appInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "supportedCipherTypes"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
-    }
-    struct_value: {
-        name: "pmk"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanRespondToDataPathIndicationRequest"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "acceptRequest"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "ndpInstanceId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "ifaceName"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "securityRequired"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "appInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "supportedCipherTypes"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
-    }
-    struct_value: {
-        name: "pmk"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanCapabilities"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "maxConcurrentClusters"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxPublishes"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxSubscribes"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxServiceNameLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxMatchFilterLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxTotalMatchFilterLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxServiceSpecificInfoLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxExtendedServiceSpecificInfoLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxNdiInterfaces"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxNdpSessions"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxAppInfoLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxQueuedTransmitFollowupMsgs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "maxSubscribeInterfaceAddresses"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "supportedCipherSuites"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanMatchInd"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "discoverySessionId"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "peerId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "addr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "serviceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "extendedServiceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "matchFilter"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "matchOccuredInBeaconFlag"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "outOfResourceFlag"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "rssiValue"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "peerSupportedCipherTypes"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
-    }
-    struct_value: {
-        name: "peerRequiresSecurityEnabledInNdp"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "peerRequiresRanging"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "rangingMeasurementInCm"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "rangingIndicationType"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::NanRangingIndication"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanFollowupReceivedInd"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "discoverySessionId"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "peerId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "addr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "receivedInFaw"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "serviceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "extendedServiceSpecificInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanClusterEventType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "DISCOVERY_MAC_ADDRESS_CHANGED"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "STARTED_CLUSTER"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "JOINED_CLUSTER"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanClusterEventInd"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "eventType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::NanClusterEventType"
-    }
-    struct_value: {
-        name: "addr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanDataPathRequestInd"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "discoverySessionId"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "peerDiscMacAddr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "ndpInstanceId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "securityRequired"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "appInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::NanDataPathConfirmInd"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "ndpInstanceId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "dataPathSetupSuccess"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "peerNdiMacAddr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "appInfo"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "status"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttStatus"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "FAILURE"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "FAIL_NO_RSP"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "FAIL_REJECTED"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "FAIL_NOT_SCHEDULED_YET"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "FAIL_TM_TIMEOUT"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "FAIL_AP_ON_DIFF_CHANNEL"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "FAIL_NO_CAPABILITY"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "ABORTED"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "FAIL_INVALID_TS"
-        scalar_value: {
-            uint32_t: 9
-        }
-        enumerator: "FAIL_PROTOCOL"
-        scalar_value: {
-            uint32_t: 10
-        }
-        enumerator: "FAIL_SCHEDULE"
-        scalar_value: {
-            uint32_t: 11
-        }
-        enumerator: "FAIL_BUSY_TRY_LATER"
-        scalar_value: {
-            uint32_t: 12
-        }
-        enumerator: "INVALID_REQ"
-        scalar_value: {
-            uint32_t: 13
-        }
-        enumerator: "NO_WIFI"
-        scalar_value: {
-            uint32_t: 14
-        }
-        enumerator: "FAIL_FTM_PARAM_OVERRIDE"
-        scalar_value: {
-            uint32_t: 15
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttPeerType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "AP"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "STA"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "P2P_GO"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "P2P_CLIENT"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "NAN"
-        scalar_value: {
-            uint32_t: 5
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttBw"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "BW_5MHZ"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "BW_10MHZ"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "BW_20MHZ"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "BW_40MHZ"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "BW_80MHZ"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "BW_160MHZ"
-        scalar_value: {
-            uint32_t: 32
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttPreamble"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "LEGACY"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "HT"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "VHT"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "ONE_SIDED"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "TWO_SIDED"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttConfig"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "addr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttType"
-    }
-    struct_value: {
-        name: "peer"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttPeerType"
-    }
-    struct_value: {
-        name: "channel"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiChannelInfo"
-    }
-    struct_value: {
-        name: "burstPeriod"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "numBurst"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "numFramesPerBurst"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "numRetriesPerRttFrame"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "numRetriesPerFtmr"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "mustRequestLci"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "mustRequestLcr"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "burstDuration"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "preamble"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttPreamble"
-    }
-    struct_value: {
-        name: "bw"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttBw"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttResult"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "addr"
-        type: TYPE_ARRAY
-        vector_size: 6
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-    struct_value: {
-        name: "burstNum"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "measurementNumber"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "successNumber"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "numberPerBurstPeer"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "status"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttStatus"
-    }
-    struct_value: {
-        name: "retryAfterDuration"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "type"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttType"
-    }
-    struct_value: {
-        name: "rssi"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "rssiSpread"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "txRate"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiRateInfo"
-    }
-    struct_value: {
-        name: "rxRate"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiRateInfo"
-    }
-    struct_value: {
-        name: "rtt"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "rttSd"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "rttSpread"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "distanceInMm"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "distanceSdInMm"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "distanceSpreadInMm"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "timeStampInUs"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "burstDurationInMs"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "negotiatedBurstNum"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "lci"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiInformationElement"
-    }
-    struct_value: {
-        name: "lcr"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiInformationElement"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttCapabilities"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "rttOneSidedSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "rttFtmSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "lciSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "lcrSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "responderSupported"
-        type: TYPE_SCALAR
-        scalar_type: "bool_t"
-    }
-    struct_value: {
-        name: "preambleSupport"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::RttPreamble"
-    }
-    struct_value: {
-        name: "bwSupport"
-        type: TYPE_MASK
-        scalar_type: "uint32_t"
-        predefined_type: "::android::hardware::wifi::V1_0::RttBw"
-    }
-    struct_value: {
-        name: "mcVersion"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttMotionPattern"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "NOT_EXPECTED"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "EXPECTED"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttLciInformation"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "latitude"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "longitude"
-        type: TYPE_SCALAR
-        scalar_type: "int64_t"
-    }
-    struct_value: {
-        name: "altitude"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "latitudeUnc"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "longitudeUnc"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "altitudeUnc"
-        type: TYPE_SCALAR
-        scalar_type: "uint8_t"
-    }
-    struct_value: {
-        name: "motionPattern"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttMotionPattern"
-    }
-    struct_value: {
-        name: "floor"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "heightAboveFloor"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-    struct_value: {
-        name: "heightUnc"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttLcrInformation"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "countryCode"
-        type: TYPE_ARRAY
-        vector_size: 2
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "int8_t"
-        }
-    }
-    struct_value: {
-        name: "civicInfo"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::RttResponder"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "channel"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiChannelInfo"
-    }
-    struct_value: {
-        name: "preamble"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::RttPreamble"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugRingBufferFlags"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "HAS_BINARY_ENTRIES"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "HAS_ASCII_ENTRIES"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "HAS_PER_PACKET_ENTRIES"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugRingBufferStatus"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "ringName"
-        type: TYPE_STRING
-    }
-    struct_value: {
-        name: "flags"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "ringId"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "sizeInBytes"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "freeSizeInBytes"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "verboseLevel"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugRingBufferVerboseLevel"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "NONE"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "DEFAULT"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "VERBOSE"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "EXCESSIVE"
-        scalar_value: {
-            uint32_t: 3
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugTxPacketFate"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "ACKED"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "SENT"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "FW_QUEUED"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "FW_DROP_INVALID"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "FW_DROP_NOBUFS"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "FW_DROP_OTHER"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "DRV_QUEUED"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "DRV_DROP_INVALID"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "DRV_DROP_NOBUFS"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "DRV_DROP_OTHER"
-        scalar_value: {
-            uint32_t: 9
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugRxPacketFate"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "FW_QUEUED"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "FW_DROP_FILTER"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "FW_DROP_INVALID"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "FW_DROP_NOBUFS"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "FW_DROP_OTHER"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "DRV_QUEUED"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "DRV_DROP_FILTER"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "DRV_DROP_INVALID"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "DRV_DROP_NOBUFS"
-        scalar_value: {
-            uint32_t: 9
-        }
-        enumerator: "DRV_DROP_OTHER"
-        scalar_value: {
-            uint32_t: 10
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugPacketFateFrameType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "UNKNOWN"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "ETHERNET_II"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "MGMT_80211"
-        scalar_value: {
-            uint32_t: 2
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugPacketFateFrameInfo"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "frameType"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugPacketFateFrameType"
-    }
-    struct_value: {
-        name: "frameLen"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "driverTimestampUsec"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "firmwareTimestampUsec"
-        type: TYPE_SCALAR
-        scalar_type: "uint64_t"
-    }
-    struct_value: {
-        name: "frameContent"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugTxPacketFateReport"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "fate"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugTxPacketFate"
-    }
-    struct_value: {
-        name: "frameInfo"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugPacketFateFrameInfo"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugRxPacketFateReport"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "fate"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugRxPacketFate"
-    }
-    struct_value: {
-        name: "frameInfo"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugPacketFateFrameInfo"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonRxPacketDetails"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "rxUnicastCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "rxMulticastCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "rxBroadcastCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonRxMulticastPacketDetails"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "ipv4RxMulticastAddrCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "ipv6RxMulticastAddrCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "otherRxMulticastAddrCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonRxIcmpPacketDetails"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "icmpPkt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "icmp6Pkt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "icmp6Ra"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "icmp6Na"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "icmp6Ns"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonStats"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "totalCmdEventWakeCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "cmdEventWakeCntPerType"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-    struct_value: {
-        name: "totalDriverFwLocalWakeCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "driverFwLocalWakeCntPerType"
-        type: TYPE_VECTOR
-        vector_value: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-    struct_value: {
-        name: "totalRxPacketWakeCnt"
-        type: TYPE_SCALAR
-        scalar_type: "uint32_t"
-    }
-    struct_value: {
-        name: "rxPktWakeDetails"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonRxPacketDetails"
-    }
-    struct_value: {
-        name: "rxMulticastPkWakeDetails"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonRxMulticastPacketDetails"
-    }
-    struct_value: {
-        name: "rxIcmpPkWakeDetails"
-        type: TYPE_STRUCT
-        predefined_type: "::android::hardware::wifi::V1_0::WifiDebugHostWakeReasonRxIcmpPacketDetails"
-    }
-}
-
diff --git a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
index 34237f0..2223022 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
@@ -214,45 +214,46 @@
    * Used to indicate the result of ANQP (either for IEEE 802.11u Interworking
    * or Hotspot 2.0) query.
    *
-   * @param macAddress MAC address of the access point.
+   * @param bssid BSSID of the access point.
    * @param data ANQP data fetched from the access point.
    *        All the fields in this struct must be empty if the query failed.
    * @param hs20Data ANQP data fetched from the Hotspot 2.0 access point.
    *        All the fields in this struct must be empty if the query failed.
    */
-  oneway onAnqpQueryDone(MacAddress macAddress,
-                         AnqpData data,
-                         Hs20AnqpData hs20Data);
+  oneway onAnqpQueryDone(Bssid bssid, AnqpData data, Hs20AnqpData hs20Data);
 
   /**
    * Used to indicate the result of Hotspot 2.0 Icon query.
    *
-   * @param macAddress MAC address of the access point.
+   * @param bssid BSSID of the access point.
    * @param fileName Name of the file that was requested.
    * @param data Icon data fetched from the access point.
    *        Must be empty if the query failed.
    */
-  oneway onHs20IconQueryDone(MacAddress macAddress,
-                             string fileName,
-                             vec<uint8_t> data);
+  oneway onHs20IconQueryDone(Bssid bssid, string fileName, vec<uint8_t> data);
 
   /**
    * Used to indicate a Hotspot 2.0 subscription remediation event.
    *
+   * @param bssid BSSID of the access point.
    * @param osuMethod OSU method.
    * @param url URL of the server.
    */
-  oneway onHs20SubscriptionRemediation(OsuMethod osuMethod, string url);
+  oneway onHs20SubscriptionRemediation(Bssid bssid,
+                                       OsuMethod osuMethod,
+                                       string url);
 
   /**
    * Used to indicate a Hotspot 2.0 imminent deauth notice.
    *
+   * @param bssid BSSID of the access point.
    * @param reasonCode Code to indicate the deauth reason.
    *        Refer to section 3.2.1.2 of the Hotspot 2.0 spec.
    * @param reAuthDelayInSec Delay before reauthenticating.
    * @param url URL of the server.
    */
-  oneway onHs20DeauthImminentNotice(uint32_t reasonCode,
+  oneway onHs20DeauthImminentNotice(Bssid bssid,
+                                    uint32_t reasonCode,
                                     uint32_t reAuthDelayInSec,
                                     string url);
 
@@ -277,8 +278,10 @@
    *        reject.
    * @param statusCode 802.11 code to indicate the reject reason.
    *        Refer to section 8.4.1.9 of IEEE 802.11 spec.
+   * @param timedOut Whether failure is due to timeout rather
+   *        than explicit rejection response from the AP.
    */
-  oneway onAssociationRejected(Bssid bssid, uint32_t statusCode);
+  oneway onAssociationRejected(Bssid bssid, uint32_t statusCode, bool timedOut);
 
   /**
    * Used to indicate the timeout of authentication to an AP.
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
index b16fb39..7d5159a 100644
--- a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -277,6 +277,20 @@
   setPskPassphrase(string psk) generates (SupplicantStatus status);
 
   /**
+   * Set raw psk for WPA_PSK network.
+   *
+   * @param psk value to set as specified in IEEE 802.11i-2004 standard.
+   *        This is the calculated using 'wpa_passphrase <ssid> [passphrase]'
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setPsk(uint8_t[32] psk) generates (SupplicantStatus status);
+
+  /**
    * Set WEP key for WEP network.
    *
    * @param keyIdx Index of wep key to set.
@@ -434,9 +448,11 @@
   setEapClientCert(string path) generates (SupplicantStatus status);
 
   /**
-   * Set EAP private key file path for this network.
+   * Set EAP private key Id for this network.
+   * This is used if private key operations for EAP-TLS are performed
+   * using a smartcard.
    *
-   * @param path value to set.
+   * @param id value to set.
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
@@ -444,7 +460,7 @@
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
    */
-  setEapPrivateKey(string path) generates (SupplicantStatus status);
+  setEapPrivateKeyId(string id) generates (SupplicantStatus status);
 
   /**
    * Set EAP subject match for this network.
@@ -660,6 +676,8 @@
 
   /**
    * Get passphrase for WPA_PSK network.
+   * Must return a failure if network has no passphrase set (use |getPsk| if
+   * network was configured with raw psk instead).
    *
    * @return status Status of the operation.
    *         Possible status codes:
@@ -670,6 +688,19 @@
   getPskPassphrase() generates (SupplicantStatus status, string psk);
 
   /**
+   * Get raw psk for WPA_PSK network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @param psk value set.
+   */
+  getPsk() generates (SupplicantStatus status, uint8_t[32] psk);
+
+  /**
    * Get WEP key for WEP network.
    *
    * @param keyIdx Index of wep key to be fetched.
@@ -810,16 +841,16 @@
   getEapClientCert() generates (SupplicantStatus status, string path);
 
   /**
-   * Get EAP private key file path set for this network.
+   * Get EAP private key Id set for this network.
    *
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return path value set.
+   * @return id value set.
    */
-  getEapPrivateKey() generates (SupplicantStatus status, string path);
+  getEapPrivateKeyId() generates (SupplicantStatus status, string id);
 
   /**
    * Get EAP subject match set for this network.
diff --git a/wifi/supplicant/1.0/vts/Supplicant.vts b/wifi/supplicant/1.0/vts/Supplicant.vts
deleted file mode 100644
index 534b1cf..0000000
--- a/wifi/supplicant/1.0/vts/Supplicant.vts
+++ /dev/null
@@ -1,160 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicant"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantCallback"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantIface"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicant::DebugLevel"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "EXCESSIVE"
-            scalar_value: {
-                uint32_t: 0
-            }
-            enumerator: "MSGDUMP"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "DEBUG"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "INFO"
-            scalar_value: {
-                uint32_t: 3
-            }
-            enumerator: "WARNING"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "ERROR"
-            scalar_value: {
-                uint32_t: 5
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicant::IfaceInfo"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "type"
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-        struct_value: {
-            name: "name"
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getInterface"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantIface"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicant::IfaceInfo"
-        }
-    }
-
-    api: {
-        name: "listInterfaces"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicant::IfaceInfo"
-            }
-        }
-    }
-
-    api: {
-        name: "registerCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantCallback"
-        }
-    }
-
-    api: {
-        name: "setDebugParams"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicant::DebugLevel"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getDebugLevel"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicant::DebugLevel"
-        }
-    }
-
-    api: {
-        name: "isDebugShowTimestampEnabled"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "isDebugShowKeysEnabled"
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setConcurrencyPriority"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantCallback.vts b/wifi/supplicant/1.0/vts/SupplicantCallback.vts
deleted file mode 100644
index 2d9e991..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantCallback.vts
+++ /dev/null
@@ -1,28 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantCallback"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "onInterfaceCreated"
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onInterfaceRemoved"
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onTerminating"
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantIface.vts b/wifi/supplicant/1.0/vts/SupplicantIface.vts
deleted file mode 100644
index c703ec0..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantIface.vts
+++ /dev/null
@@ -1,203 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantIface"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantIface::ParamSizeLimits"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "WPS_DEVICE_NAME_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_MANUFACTURER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 64
-            }
-            enumerator: "WPS_MODEL_NAME_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_MODEL_NUMBER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_SERIAL_NUMBER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "addNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
-        }
-    }
-
-    api: {
-        name: "removeNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "listNetworks"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setWpsDeviceName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsDeviceType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 8
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setWpsManufacturer"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsModelName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsModelNumber"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsSerialNumber"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsConfigMethods"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint16_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantNetwork.vts b/wifi/supplicant/1.0/vts/SupplicantNetwork.vts
deleted file mode 100644
index c90f396..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantNetwork.vts
+++ /dev/null
@@ -1,46 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantNetwork"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getId"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getInterfaceName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts b/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts
deleted file mode 100644
index 2515b60..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts
+++ /dev/null
@@ -1,801 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantP2pIface"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantIface"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantP2pIfaceCallback"
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::WpsProvisionMethod"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "PBC"
-            scalar_value: {
-                uint32_t: 0
-            }
-            enumerator: "DISPLAY"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "KEYPAD"
-            scalar_value: {
-                uint32_t: 2
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::FreqRange"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "min"
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        struct_value: {
-            name: "max"
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::MiracastMode"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint8_t"
-
-            enumerator: "DISABLED"
-            scalar_value: {
-                uint8_t: 0
-            }
-            enumerator: "SOURCE"
-            scalar_value: {
-                uint8_t: 1
-            }
-            enumerator: "SINK"
-            scalar_value: {
-                uint8_t: 2
-            }
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "addNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
-        }
-    }
-
-    api: {
-        name: "removeNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "listNetworks"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setWpsDeviceName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsDeviceType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 8
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setWpsManufacturer"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsModelName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsModelNumber"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsSerialNumber"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsConfigMethods"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint16_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
-        }
-    }
-
-    api: {
-        name: "registerCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback"
-        }
-    }
-
-    api: {
-        name: "getDeviceAddress"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setSsidPostfix"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setGroupIdle"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "setPowerSave"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "find"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "stopFind"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "flush"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "connect"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::WpsProvisionMethod"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "cancelConnect"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "provisionDiscovery"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::WpsProvisionMethod"
-        }
-    }
-
-    api: {
-        name: "addGroup"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "removeGroup"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "reject"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "invite"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "reinvoke"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "configureExtListen"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "setListenChannel"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "setDisallowedFrequencies"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::FreqRange"
-            }
-        }
-    }
-
-    api: {
-        name: "getSsid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getGroupCapability"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::P2pGroupCapabilityMask"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "addBonjourService"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "removeBonjourService"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "addUpnpService"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "removeUpnpService"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "flushServices"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "requestServiceDiscovery"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "cancelServiceDiscovery"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint64_t"
-        }
-    }
-
-    api: {
-        name: "setMiracastMode"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::MiracastMode"
-        }
-    }
-
-    api: {
-        name: "startWpsPbc"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "startWpsPinKeypad"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "startWpsPinDisplay"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "cancelWps"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "enableWfd"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setWfdDeviceInfo"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 8
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts b/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts
deleted file mode 100644
index b3cf05b..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts
+++ /dev/null
@@ -1,524 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantP2pIfaceCallback"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback::WpsDevPasswordId"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint16_t"
-
-            enumerator: "DEFAULT"
-            scalar_value: {
-                uint16_t: 0
-            }
-            enumerator: "USER_SPECIFIED"
-            scalar_value: {
-                uint16_t: 1
-            }
-            enumerator: "MACHINE_SPECIFIED"
-            scalar_value: {
-                uint16_t: 2
-            }
-            enumerator: "REKEY"
-            scalar_value: {
-                uint16_t: 3
-            }
-            enumerator: "PUSHBUTTON"
-            scalar_value: {
-                uint16_t: 4
-            }
-            enumerator: "REGISTRAR_SPECIFIED"
-            scalar_value: {
-                uint16_t: 5
-            }
-            enumerator: "NFC_CONNECTION_HANDOVER"
-            scalar_value: {
-                uint16_t: 7
-            }
-            enumerator: "P2PS_DEFAULT"
-            scalar_value: {
-                uint16_t: 8
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback::P2pStatusCode"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "SUCCESS"
-            scalar_value: {
-                uint32_t: 0
-            }
-            enumerator: "FAIL_INFO_CURRENTLY_UNAVAILABLE"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "FAIL_INCOMPATIBLE_PARAMS"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "FAIL_LIMIT_REACHED"
-            scalar_value: {
-                uint32_t: 3
-            }
-            enumerator: "FAIL_INVALID_PARAMS"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "FAIL_UNABLE_TO_ACCOMMODATE"
-            scalar_value: {
-                uint32_t: 5
-            }
-            enumerator: "FAIL_PREV_PROTOCOL_ERROR"
-            scalar_value: {
-                uint32_t: 6
-            }
-            enumerator: "FAIL_NO_COMMON_CHANNELS"
-            scalar_value: {
-                uint32_t: 7
-            }
-            enumerator: "FAIL_UNKNOWN_GROUP"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "FAIL_BOTH_GO_INTENT_15"
-            scalar_value: {
-                uint32_t: 9
-            }
-            enumerator: "FAIL_INCOMPATIBLE_PROV_METHOD"
-            scalar_value: {
-                uint32_t: 10
-            }
-            enumerator: "FAIL_REJECTED_BY_USER"
-            scalar_value: {
-                uint32_t: 11
-            }
-            enumerator: "SUCCESS_DEFERRED"
-            scalar_value: {
-                uint32_t: 12
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback::P2pProvDiscStatusCode"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint8_t"
-
-            enumerator: "SUCCESS"
-            scalar_value: {
-                uint8_t: 0
-            }
-            enumerator: "TIMEOUT"
-            scalar_value: {
-                uint8_t: 1
-            }
-            enumerator: "REJECTED"
-            scalar_value: {
-                uint8_t: 2
-            }
-            enumerator: "TIMEOUT_JOIN"
-            scalar_value: {
-                uint8_t: 3
-            }
-            enumerator: "INFO_UNAVAILABLE"
-            scalar_value: {
-                uint8_t: 4
-            }
-        }
-    }
-
-    api: {
-        name: "onNetworkAdded"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onNetworkRemoved"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onDeviceFound"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 8
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint16_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint8_t"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::P2pGroupCapabilityMask"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 8
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onDeviceLost"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onFindStopped"
-    }
-
-    api: {
-        name: "onGoNegotiationRequest"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback::WpsDevPasswordId"
-        }
-    }
-
-    api: {
-        name: "onGoNegotiationCompleted"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback::P2pStatusCode"
-        }
-    }
-
-    api: {
-        name: "onGroupFormationSuccess"
-    }
-
-    api: {
-        name: "onGroupFormationFailure"
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onGroupStarted"
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 32
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "onGroupRemoved"
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "onInvitationReceived"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onInvitationResult"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback::P2pStatusCode"
-        }
-    }
-
-    api: {
-        name: "onProvisionDiscoveryPbcRequest"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onProvisionDiscoveryPbcResponse"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onProvisionDiscoveryShowPin"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onProvisionDiscoveryEnterPin"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onProvisionDiscoveryFailure"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onProvisionDiscoveryCompleted"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback::P2pProvDiscStatusCode"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint16_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onServiceDiscoveryResponse"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint16_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onStaAuthorized"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onStaDeauthorized"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts b/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts
deleted file mode 100644
index 8d0b5a1..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts
+++ /dev/null
@@ -1,127 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantP2pNetwork"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetworkCallback"
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    api: {
-        name: "getId"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getInterfaceName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "registerCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pNetworkCallback"
-        }
-    }
-
-    api: {
-        name: "getSsid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getBssid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "isCurrent"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "isPersistent"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "isGo"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts b/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts
deleted file mode 100644
index 9493c5e..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts
+++ /dev/null
@@ -1,10 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantP2pNetworkCallback"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hidl.base@1.0::types"
-
-interface: {
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaIface.vts b/wifi/supplicant/1.0/vts/SupplicantStaIface.vts
deleted file mode 100644
index cc52487..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantStaIface.vts
+++ /dev/null
@@ -1,658 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantStaIface"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantIface"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback"
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::AnqpInfoId"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint16_t"
-
-            enumerator: "VENUE_NAME"
-            scalar_value: {
-                uint16_t: 258
-            }
-            enumerator: "ROAMING_CONSORTIUM"
-            scalar_value: {
-                uint16_t: 261
-            }
-            enumerator: "IP_ADDR_TYPE_AVAILABILITY"
-            scalar_value: {
-                uint16_t: 262
-            }
-            enumerator: "NAI_REALM"
-            scalar_value: {
-                uint16_t: 263
-            }
-            enumerator: "ANQP_3GPP_CELLULAR_NETWORK"
-            scalar_value: {
-                uint16_t: 264
-            }
-            enumerator: "DOMAIN_NAME"
-            scalar_value: {
-                uint16_t: 268
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::Hs20AnqpSubtypes"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "OPERATOR_FRIENDLY_NAME"
-            scalar_value: {
-                uint32_t: 3
-            }
-            enumerator: "WAN_METRICS"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "CONNECTION_CAPABILITY"
-            scalar_value: {
-                uint32_t: 5
-            }
-            enumerator: "OSU_PROVIDERS_LIST"
-            scalar_value: {
-                uint32_t: 8
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::RxFilterType"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint8_t"
-
-            enumerator: "V4_MULTICAST"
-            scalar_value: {
-                uint8_t: 0
-            }
-            enumerator: "V6_MULTICAST"
-            scalar_value: {
-                uint8_t: 1
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::BtCoexistenceMode"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint8_t"
-
-            enumerator: "ENABLED"
-            scalar_value: {
-                uint8_t: 0
-            }
-            enumerator: "DISABLED"
-            scalar_value: {
-                uint8_t: 1
-            }
-            enumerator: "SENSE"
-            scalar_value: {
-                uint8_t: 2
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::ExtRadioWorkDefaults"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "TIMEOUT_IN_SECS"
-            scalar_value: {
-                uint32_t: 10
-            }
-        }
-    }
-
-    api: {
-        name: "getName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "addNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
-        }
-    }
-
-    api: {
-        name: "removeNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getNetwork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_HIDL_INTERFACE
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "listNetworks"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint32_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setWpsDeviceName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsDeviceType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 8
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setWpsManufacturer"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsModelName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsModelNumber"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsSerialNumber"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWpsConfigMethods"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint16_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
-        }
-    }
-
-    api: {
-        name: "registerCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback"
-        }
-    }
-
-    api: {
-        name: "reassociate"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "reconnect"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "disconnect"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "setPowerSave"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "initiateTdlsDiscover"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "initiateTdlsSetup"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "initiateTdlsTeardown"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "initiateAnqpQuery"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::AnqpInfoId"
-            }
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ENUM
-                predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::Hs20AnqpSubtypes"
-            }
-        }
-    }
-
-    api: {
-        name: "initiateHs20IconQuery"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getMacAddress"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "startRxFilter"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "stopRxFilter"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "addRxFilter"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::RxFilterType"
-        }
-    }
-
-    api: {
-        name: "removeRxFilter"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::RxFilterType"
-        }
-    }
-
-    api: {
-        name: "setBtCoexistenceMode"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::BtCoexistenceMode"
-        }
-    }
-
-    api: {
-        name: "setBtCoexistenceScanModeEnabled"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setSuspendModeEnabled"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setCountryCode"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 2
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "int8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "startWpsRegistrar"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "startWpsPbc"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "startWpsPinKeypad"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "startWpsPinDisplay"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "cancelWps"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "setExternalSim"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "addExtRadioWork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "removeExtRadioWork"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts b/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts
deleted file mode 100644
index 0a35848..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts
+++ /dev/null
@@ -1,516 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantStaIfaceCallback"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::State"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "DISCONNECTED"
-            scalar_value: {
-                uint32_t: 0
-            }
-            enumerator: "IFACE_DISABLED"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "INACTIVE"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "SCANNING"
-            scalar_value: {
-                uint32_t: 3
-            }
-            enumerator: "AUTHENTICATING"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "ASSOCIATING"
-            scalar_value: {
-                uint32_t: 5
-            }
-            enumerator: "ASSOCIATED"
-            scalar_value: {
-                uint32_t: 6
-            }
-            enumerator: "FOURWAY_HANDSHAKE"
-            scalar_value: {
-                uint32_t: 7
-            }
-            enumerator: "GROUP_HANDSHAKE"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "COMPLETED"
-            scalar_value: {
-                uint32_t: 9
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::OsuMethod"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint8_t"
-
-            enumerator: "OMA_DM"
-            scalar_value: {
-                uint8_t: 0
-            }
-            enumerator: "SOAP_XML_SPP"
-            scalar_value: {
-                uint8_t: 1
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::AnqpData"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "venueName"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "roamingConsortium"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "ipAddrTypeAvailability"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "naiRealm"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "anqp3gppCellularNetwork"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "domainName"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::Hs20AnqpData"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "operatorFriendlyName"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "wanMetrics"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "connectionCapability"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "osuProvidersList"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::WpsConfigError"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint16_t"
-
-            enumerator: "NO_ERROR"
-            scalar_value: {
-                uint16_t: 0
-            }
-            enumerator: "OOB_IFACE_READ_ERROR"
-            scalar_value: {
-                uint16_t: 1
-            }
-            enumerator: "DECRYPTION_CRC_FAILURE"
-            scalar_value: {
-                uint16_t: 2
-            }
-            enumerator: "CHAN_24_NOT_SUPPORTED"
-            scalar_value: {
-                uint16_t: 3
-            }
-            enumerator: "CHAN_50_NOT_SUPPORTED"
-            scalar_value: {
-                uint16_t: 4
-            }
-            enumerator: "SIGNAL_TOO_WEAK"
-            scalar_value: {
-                uint16_t: 5
-            }
-            enumerator: "NETWORK_AUTH_FAILURE"
-            scalar_value: {
-                uint16_t: 6
-            }
-            enumerator: "NETWORK_ASSOC_FAILURE"
-            scalar_value: {
-                uint16_t: 7
-            }
-            enumerator: "NO_DHCP_RESPONSE"
-            scalar_value: {
-                uint16_t: 8
-            }
-            enumerator: "FAILED_DHCP_CONFIG"
-            scalar_value: {
-                uint16_t: 9
-            }
-            enumerator: "IP_ADDR_CONFLICT"
-            scalar_value: {
-                uint16_t: 10
-            }
-            enumerator: "NO_CONN_TO_REGISTRAR"
-            scalar_value: {
-                uint16_t: 11
-            }
-            enumerator: "MULTIPLE_PBC_DETECTED"
-            scalar_value: {
-                uint16_t: 12
-            }
-            enumerator: "ROGUE_SUSPECTED"
-            scalar_value: {
-                uint16_t: 13
-            }
-            enumerator: "DEVICE_BUSY"
-            scalar_value: {
-                uint16_t: 14
-            }
-            enumerator: "SETUP_LOCKED"
-            scalar_value: {
-                uint16_t: 15
-            }
-            enumerator: "MSG_TIMEOUT"
-            scalar_value: {
-                uint16_t: 16
-            }
-            enumerator: "REG_SESS_TIMEOUT"
-            scalar_value: {
-                uint16_t: 17
-            }
-            enumerator: "DEV_PASSWORD_AUTH_FAILURE"
-            scalar_value: {
-                uint16_t: 18
-            }
-            enumerator: "CHAN_60G_NOT_SUPPORTED"
-            scalar_value: {
-                uint16_t: 19
-            }
-            enumerator: "PUBLIC_KEY_HASH_MISMATCH"
-            scalar_value: {
-                uint16_t: 20
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::WpsErrorIndication"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint16_t"
-
-            enumerator: "NO_ERROR"
-            scalar_value: {
-                uint16_t: 0
-            }
-            enumerator: "SECURITY_TKIP_ONLY_PROHIBITED"
-            scalar_value: {
-                uint16_t: 1
-            }
-            enumerator: "SECURITY_WEP_PROHIBITED"
-            scalar_value: {
-                uint16_t: 2
-            }
-            enumerator: "AUTH_FAILURE"
-            scalar_value: {
-                uint16_t: 3
-            }
-        }
-    }
-
-    api: {
-        name: "onNetworkAdded"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onNetworkRemoved"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onStateChanged"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::State"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onAnqpQueryDone"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::AnqpData"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::Hs20AnqpData"
-        }
-    }
-
-    api: {
-        name: "onHs20IconQueryDone"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onHs20SubscriptionRemediation"
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::OsuMethod"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onHs20DeauthImminentNotice"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "onConnected"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onDisconnected"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onAssociationCompleted"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onAssociationRejected"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onAuthenticationTimeout"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onEapFailure"
-    }
-
-    api: {
-        name: "onWpsEventSuccess"
-    }
-
-    api: {
-        name: "onWpsEventFail"
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::WpsConfigError"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback::WpsErrorIndication"
-        }
-    }
-
-    api: {
-        name: "onWpsEventPbcOverlap"
-    }
-
-    api: {
-        name: "onExtRadioWorkStart"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "onExtRadioWorkTimeout"
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts b/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts
deleted file mode 100644
index 8ad72f1..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts
+++ /dev/null
@@ -1,1156 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantStaNetwork"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
-import: "android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback"
-import: "android.hardware.wifi.supplicant@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::ParamSizeLimits"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "SSID_MAX_LEN_IN_BYTES"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "PSK_PASSPHRASE_MIN_LEN_IN_BYTES"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "PSK_PASSPHRASE_MAX_LEN_IN_BYTES"
-            scalar_value: {
-                uint32_t: 63
-            }
-            enumerator: "WEP_KEYS_MAX_NUM"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "WEP40_KEY_LEN_IN_BYTES"
-            scalar_value: {
-                uint32_t: 5
-            }
-            enumerator: "WEP104_KEY_LEN_IN_BYTES"
-            scalar_value: {
-                uint32_t: 13
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::KeyMgmtMask"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "WPA_EAP"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "WPA_PSK"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "NONE"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "IEEE8021X"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "FT_EAP"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "FT_PSK"
-            scalar_value: {
-                uint32_t: 64
-            }
-            enumerator: "OSEN"
-            scalar_value: {
-                uint32_t: 32768
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::ProtoMask"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "WPA"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "RSN"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "OSEN"
-            scalar_value: {
-                uint32_t: 8
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::AuthAlgMask"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "OPEN"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "SHARED"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "LEAP"
-            scalar_value: {
-                uint32_t: 4
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::GroupCipherMask"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "WEP40"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "WEP104"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "TKIP"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "CCMP"
-            scalar_value: {
-                uint32_t: 16
-            }
-            enumerator: "GTK_NOT_USED"
-            scalar_value: {
-                uint32_t: 16384
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::PairwiseCipherMask"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "NONE"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "TKIP"
-            scalar_value: {
-                uint32_t: 8
-            }
-            enumerator: "CCMP"
-            scalar_value: {
-                uint32_t: 16
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::EapMethod"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "PEAP"
-            scalar_value: {
-                uint32_t: 0
-            }
-            enumerator: "TLS"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "TTLS"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "PWD"
-            scalar_value: {
-                uint32_t: 3
-            }
-            enumerator: "SIM"
-            scalar_value: {
-                uint32_t: 4
-            }
-            enumerator: "AKA"
-            scalar_value: {
-                uint32_t: 5
-            }
-            enumerator: "AKA_PRIME"
-            scalar_value: {
-                uint32_t: 6
-            }
-            enumerator: "WFA_UNAUTH_TLS"
-            scalar_value: {
-                uint32_t: 7
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::EapPhase2Method"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "NONE"
-            scalar_value: {
-                uint32_t: 0
-            }
-            enumerator: "PAP"
-            scalar_value: {
-                uint32_t: 1
-            }
-            enumerator: "MSPAP"
-            scalar_value: {
-                uint32_t: 2
-            }
-            enumerator: "MSPAPV2"
-            scalar_value: {
-                uint32_t: 3
-            }
-            enumerator: "GTC"
-            scalar_value: {
-                uint32_t: 4
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::NetworkResponseEapSimGsmAuthParams"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "kc"
-            type: TYPE_ARRAY
-            vector_size: 8
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "sres"
-            type: TYPE_ARRAY
-            vector_size: 4
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::NetworkResponseEapSimUmtsAuthParams"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "res"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "ik"
-            type: TYPE_ARRAY
-            vector_size: 16
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "ck"
-            type: TYPE_ARRAY
-            vector_size: 16
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getId"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getInterfaceName"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getType"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-        }
-    }
-
-    api: {
-        name: "registerCallback"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_HIDL_CALLBACK
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetworkCallback"
-        }
-    }
-
-    api: {
-        name: "setSsid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setBssid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setScanSsid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setKeyMgmt"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::KeyMgmtMask"
-        }
-    }
-
-    api: {
-        name: "setProto"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::ProtoMask"
-        }
-    }
-
-    api: {
-        name: "setAuthAlg"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::AuthAlgMask"
-        }
-    }
-
-    api: {
-        name: "setGroupCipher"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::GroupCipherMask"
-        }
-    }
-
-    api: {
-        name: "setPairwiseCipher"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::PairwiseCipherMask"
-        }
-    }
-
-    api: {
-        name: "setPskPassphrase"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setWepKey"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setWepTxKeyIdx"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "setRequirePmf"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setEapMethod"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::EapMethod"
-        }
-    }
-
-    api: {
-        name: "setEapPhase2Method"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::EapPhase2Method"
-        }
-    }
-
-    api: {
-        name: "setEapIdentity"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setEapAnonymousIdentity"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setEapPassword"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "setEapCACert"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setEapCAPath"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setEapClientCert"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setEapPrivateKey"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setEapSubjectMatch"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setEapAltSubjectMatch"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setEapEngine"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setEapEngineID"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setEapDomainSuffixMatch"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setProactiveKeyCaching"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "setIdStr"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "setUpdateIdentifier"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getSsid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getBssid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ARRAY
-            vector_size: 6
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getScanSsid"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getKeyMgmt"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::KeyMgmtMask"
-        }
-    }
-
-    api: {
-        name: "getProto"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::ProtoMask"
-        }
-    }
-
-    api: {
-        name: "getAuthAlg"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::AuthAlgMask"
-        }
-    }
-
-    api: {
-        name: "getGroupCipher"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::GroupCipherMask"
-        }
-    }
-
-    api: {
-        name: "getPairwiseCipher"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_MASK
-            scalar_type: "uint32_t"
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::PairwiseCipherMask"
-        }
-    }
-
-    api: {
-        name: "getPskPassphrase"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getWepKey"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getWepTxKeyIdx"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
-    }
-
-    api: {
-        name: "getRequirePmf"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getEapMethod"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::EapMethod"
-        }
-    }
-
-    api: {
-        name: "getEapPhase2Method"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::EapPhase2Method"
-        }
-    }
-
-    api: {
-        name: "getEapIdentity"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getEapAnonymousIdentity"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getEapPassword"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "getEapCACert"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getEapCAPath"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getEapClientCert"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getEapPrivateKey"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getEapSubjectMatch"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getEapAltSubjectMatch"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getEapEngine"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "getEapEngineID"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getEapDomainSuffixMatch"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "getIdStr"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_STRING
-        }
-    }
-
-    api: {
-        name: "enable"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "bool_t"
-        }
-    }
-
-    api: {
-        name: "disable"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "select"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "sendNetworkEapSimGsmAuthResponse"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_STRUCT
-                predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::NetworkResponseEapSimGsmAuthParams"
-            }
-        }
-    }
-
-    api: {
-        name: "sendNetworkEapSimGsmAuthFailure"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "sendNetworkEapSimUmtsAuthResponse"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::NetworkResponseEapSimUmtsAuthParams"
-        }
-    }
-
-    api: {
-        name: "sendNetworkEapSimUmtsAutsResponse"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_ARRAY
-            vector_size: 14
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "sendNetworkEapSimUmtsAuthFailure"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-    }
-
-    api: {
-        name: "sendNetworkEapIdentityResponse"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-        }
-        arg: {
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts b/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts
deleted file mode 100644
index 1c91d57..0000000
--- a/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts
+++ /dev/null
@@ -1,70 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISupplicantStaNetworkCallback"
-
-package: "android.hardware.wifi.supplicant"
-
-import: "android.hidl.base@1.0::types"
-
-interface: {
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetworkCallback::NetworkRequestEapSimGsmAuthParams"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "rands"
-            type: TYPE_VECTOR
-            vector_value: {
-                type: TYPE_ARRAY
-                vector_size: 16
-                vector_value: {
-                    type: TYPE_SCALAR
-                    scalar_type: "uint8_t"
-                }
-            }
-        }
-    }
-
-    attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetworkCallback::NetworkRequestEapSimUmtsAuthParams"
-        type: TYPE_STRUCT
-        struct_value: {
-            name: "rand"
-            type: TYPE_ARRAY
-            vector_size: 16
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-        struct_value: {
-            name: "autn"
-            type: TYPE_ARRAY
-            vector_size: 16
-            vector_value: {
-                type: TYPE_SCALAR
-                scalar_type: "uint8_t"
-            }
-        }
-    }
-
-    api: {
-        name: "onNetworkEapSimGsmAuthRequest"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetworkCallback::NetworkRequestEapSimGsmAuthParams"
-        }
-    }
-
-    api: {
-        name: "onNetworkEapSimUmtsAuthRequest"
-        arg: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetworkCallback::NetworkRequestEapSimUmtsAuthParams"
-        }
-    }
-
-    api: {
-        name: "onNetworkEapIdentityRequest"
-    }
-
-}
diff --git a/wifi/supplicant/1.0/vts/functional/Android.mk b/wifi/supplicant/1.0/vts/functional/Android.mk
index 8fa649f..cfcd4f8 100644
--- a/wifi/supplicant/1.0/vts/functional/Android.mk
+++ b/wifi/supplicant/1.0/vts/functional/Android.mk
@@ -16,10 +16,10 @@
 LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
-LOCAL_MODULE := supplicant_hidl_test
+LOCAL_MODULE := VtsHalWifiSupplicantV1_0TargetTest
 LOCAL_CPPFLAGS := -Wall -Werror -Wextra
 LOCAL_SRC_FILES := \
-    main.cpp \
+    VtsHalWifiSupplicantV1_0TargetTest.cpp \
     supplicant_hidl_test.cpp \
     supplicant_hidl_test_utils.cpp \
     supplicant_p2p_iface_hidl_test.cpp \
@@ -31,13 +31,12 @@
     libcutils \
     libhidlbase \
     libhidltransport \
-    libhwbinder \
     liblog \
     libutils \
     libwifi-hal \
     libwifi-system
 LOCAL_STATIC_LIBRARIES := \
     libgmock \
-    libgtest
+    VtsHalHidlTargetTestBase
 include $(BUILD_NATIVE_TEST)
 
diff --git a/wifi/supplicant/1.0/vts/functional/main.cpp b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
similarity index 96%
rename from wifi/supplicant/1.0/vts/functional/main.cpp
rename to wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
index 81a2947..a69d14d 100644
--- a/wifi/supplicant/1.0/vts/functional/main.cpp
+++ b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
index 9922447..ab1b6a3 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
index 2f3405d..fdee0c6 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
@@ -15,7 +15,7 @@
  */
 
 #include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include <hidl/HidlTransportSupport.h>
 #include <android/hidl/manager/1.0/IServiceManager.h>
@@ -174,7 +174,7 @@
 }
 
 sp<ISupplicant> getSupplicant() {
-    return ISupplicant::getService(kSupplicantServiceName);
+    return getService<ISupplicant>(kSupplicantServiceName);
 }
 
 sp<ISupplicantStaIface> getSupplicantStaIface() {
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
index 968d4c9..332b57b 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
index 45cc6bc..c50539b 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
index 8c42a22..cde75fa 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/types.vts b/wifi/supplicant/1.0/vts/types.vts
deleted file mode 100644
index b8b29b3..0000000
--- a/wifi/supplicant/1.0/vts/types.vts
+++ /dev/null
@@ -1,189 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.wifi.supplicant"
-
-
-attribute: {
-    name: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatusCode"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "SUCCESS"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "FAILURE_UNKNOWN"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "FAILURE_ARGS_INVALID"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "FAILURE_IFACE_INVALID"
-        scalar_value: {
-            uint32_t: 3
-        }
-        enumerator: "FAILURE_IFACE_UNKNOWN"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "FAILURE_IFACE_EXISTS"
-        scalar_value: {
-            uint32_t: 5
-        }
-        enumerator: "FAILURE_IFACE_DISABLED"
-        scalar_value: {
-            uint32_t: 6
-        }
-        enumerator: "FAILURE_IFACE_NOT_DISCONNECTED"
-        scalar_value: {
-            uint32_t: 7
-        }
-        enumerator: "FAILURE_NETWORK_INVALID"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "FAILURE_NETWORK_UNKNOWN"
-        scalar_value: {
-            uint32_t: 9
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
-    type: TYPE_STRUCT
-    struct_value: {
-        name: "code"
-        type: TYPE_ENUM
-        predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatusCode"
-    }
-    struct_value: {
-        name: "debugMessage"
-        type: TYPE_STRING
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::supplicant::V1_0::IfaceType"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "STA"
-        scalar_value: {
-            uint32_t: 0
-        }
-        enumerator: "P2P"
-        scalar_value: {
-            uint32_t: 1
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::supplicant::V1_0::P2pGroupCapabilityMask"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "GROUP_OWNER"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "PERSISTENT_GROUP"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "GROUP_LIMIT"
-        scalar_value: {
-            uint32_t: 4
-        }
-        enumerator: "INTRA_BSS_DIST"
-        scalar_value: {
-            uint32_t: 8
-        }
-        enumerator: "CROSS_CONN"
-        scalar_value: {
-            uint32_t: 16
-        }
-        enumerator: "PERSISTENT_RECONN"
-        scalar_value: {
-            uint32_t: 32
-        }
-        enumerator: "GROUP_FORMATION"
-        scalar_value: {
-            uint32_t: 64
-        }
-    }
-}
-
-attribute: {
-    name: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint16_t"
-
-        enumerator: "USBA"
-        scalar_value: {
-            uint16_t: 1
-        }
-        enumerator: "ETHERNET"
-        scalar_value: {
-            uint16_t: 2
-        }
-        enumerator: "LABEL"
-        scalar_value: {
-            uint16_t: 4
-        }
-        enumerator: "DISPLAY"
-        scalar_value: {
-            uint16_t: 8
-        }
-        enumerator: "EXT_NFC_TOKEN"
-        scalar_value: {
-            uint16_t: 16
-        }
-        enumerator: "INT_NFC_TOKEN"
-        scalar_value: {
-            uint16_t: 32
-        }
-        enumerator: "NFC_INTERFACE"
-        scalar_value: {
-            uint16_t: 64
-        }
-        enumerator: "PUSHBUTTON"
-        scalar_value: {
-            uint16_t: 128
-        }
-        enumerator: "KEYPAD"
-        scalar_value: {
-            uint16_t: 256
-        }
-        enumerator: "VIRT_PUSHBUTTON"
-        scalar_value: {
-            uint16_t: 640
-        }
-        enumerator: "PHY_PUSHBUTTON"
-        scalar_value: {
-            uint16_t: 1152
-        }
-        enumerator: "P2PS"
-        scalar_value: {
-            uint16_t: 4096
-        }
-        enumerator: "VIRT_DISPLAY"
-        scalar_value: {
-            uint16_t: 8200
-        }
-        enumerator: "PHY_DISPLAY"
-        scalar_value: {
-            uint16_t: 16392
-        }
-    }
-}
-