Merge "Use the feature-based precondition checking for VR Test."
diff --git a/audio/2.0/IDevicesFactory.hal b/audio/2.0/IDevicesFactory.hal
index f1dc7d3..0ef6bc5 100644
--- a/audio/2.0/IDevicesFactory.hal
+++ b/audio/2.0/IDevicesFactory.hal
@@ -26,7 +26,8 @@
         PRIMARY,
         A2DP,
         USB,
-        R_SUBMIX
+        R_SUBMIX,
+        STUB
     };
 
     /*
diff --git a/audio/2.0/default/DevicesFactory.cpp b/audio/2.0/default/DevicesFactory.cpp
index 12ef2c8..8825107 100644
--- a/audio/2.0/default/DevicesFactory.cpp
+++ b/audio/2.0/default/DevicesFactory.cpp
@@ -37,6 +37,7 @@
         case IDevicesFactory::Device::A2DP: return AUDIO_HARDWARE_MODULE_ID_A2DP;
         case IDevicesFactory::Device::USB: return AUDIO_HARDWARE_MODULE_ID_USB;
         case IDevicesFactory::Device::R_SUBMIX: return AUDIO_HARDWARE_MODULE_ID_REMOTE_SUBMIX;
+        case IDevicesFactory::Device::STUB: return AUDIO_HARDWARE_MODULE_ID_STUB;
     }
 }
 
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index de7bf13..ad18986 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -275,7 +275,7 @@
     if (mDataMQ) {
         ALOGE("the client attempts to call prepareForReading twice");
         _hidl_cb(Result::INVALID_STATE,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<ReadStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
     std::unique_ptr<DataMQ> tempDataMQ(
@@ -285,7 +285,7 @@
         ALOGE_IF(!tempDataMQ->isValid(), "data MQ is invalid");
         ALOGE_IF(!tempStatusMQ->isValid(), "status MQ is invalid");
         _hidl_cb(Result::INVALID_ARGUMENTS,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<ReadStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
     // TODO: Remove event flag management once blocking MQ is implemented. b/33815422
@@ -293,7 +293,7 @@
     if (status != OK || !mEfGroup) {
         ALOGE("failed creating event flag for data MQ: %s", strerror(-status));
         _hidl_cb(Result::INVALID_ARGUMENTS,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<ReadStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
 
@@ -309,7 +309,7 @@
     if (status != OK) {
         ALOGW("failed to start reader thread: %s", strerror(-status));
         _hidl_cb(Result::INVALID_ARGUMENTS,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<ReadStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
 
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index ea6221e..1948b68 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -259,7 +259,7 @@
     if (mDataMQ) {
         ALOGE("the client attempts to call prepareForWriting twice");
         _hidl_cb(Result::INVALID_STATE,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<WriteStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
     std::unique_ptr<DataMQ> tempDataMQ(
@@ -269,7 +269,7 @@
         ALOGE_IF(!tempDataMQ->isValid(), "data MQ is invalid");
         ALOGE_IF(!tempStatusMQ->isValid(), "status MQ is invalid");
         _hidl_cb(Result::INVALID_ARGUMENTS,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<WriteStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
     // TODO: Remove event flag management once blocking MQ is implemented. b/33815422
@@ -277,7 +277,7 @@
     if (status != OK || !mEfGroup) {
         ALOGE("failed creating event flag for data MQ: %s", strerror(-status));
         _hidl_cb(Result::INVALID_ARGUMENTS,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<WriteStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
 
@@ -293,7 +293,7 @@
     if (status != OK) {
         ALOGW("failed to start writer thread: %s", strerror(-status));
         _hidl_cb(Result::INVALID_ARGUMENTS,
-                MQDescriptorSync<uint8_t>(), MQDescriptorSync<WriteStatus>());
+                DataMQ::Descriptor(), StatusMQ::Descriptor());
         return Void();
     }
 
diff --git a/audio/effect/2.0/IEffect.hal b/audio/effect/2.0/IEffect.hal
index 9027c68..9e10117 100644
--- a/audio/effect/2.0/IEffect.hal
+++ b/audio/effect/2.0/IEffect.hal
@@ -83,20 +83,17 @@
 
     /*
      * Set and get volume. Used by audio framework to delegate volume control to
-     * effect engine.  The effect implementation must set EFFECT_FLAG_VOLUME_IND
-     * or EFFECT_FLAG_VOLUME_CTRL flag in its descriptor to receive this command
-     * before every call to 'process' function If EFFECT_FLAG_VOLUME_CTRL flag
-     * is set in the effect descriptor, the effect engine must return the volume
-     * that should be applied before the effect is processed. The overall volume
-     * (the volume actually applied by the effect engine multiplied by the
-     * returned value) should match the value indicated in the command.
+     * effect engine. The effect implementation must set EFFECT_FLAG_VOLUME_CTRL
+     * flag in its descriptor to receive this command. The effect engine must
+     * return the volume that should be applied before the effect is
+     * processed. The overall volume (the volume actually applied by the effect
+     * engine multiplied by the returned value) should match the value indicated
+     * in the command.
      *
      * @param volumes vector containing volume for each channel defined in
      *                EffectConfig for output buffer expressed in 8.24 fixed
      *                point format.
-     * @return result updated volume values. It is OK to receive an empty vector
-     *                as a result in which case the effect framework has
-     *                delegated volume control to another effect.
+     * @return result updated volume values.
      * @return retval operation completion status.
      */
     @callflow(next={"*"})
@@ -104,6 +101,19 @@
             generates (Result retval, vec<uint32_t> result);
 
     /*
+     * Notify the effect of the volume change. The effect implementation must
+     * set EFFECT_FLAG_VOLUME_IND flag in its descriptor to receive this
+     * command.
+     *
+     * @param volumes vector containing volume for each channel defined in
+     *                EffectConfig for output buffer expressed in 8.24 fixed
+     *                point format.
+     * @return retval operation completion status.
+     */
+    volumeChangeNotification(vec<uint32_t> volumes)
+            generates (Result retval);
+
+    /*
      * Set the audio mode. The effect implementation must set
      * EFFECT_FLAG_AUDIO_MODE_IND flag in its descriptor to receive this command
      * when the audio mode changes.
diff --git a/audio/effect/2.0/default/AcousticEchoCancelerEffect.cpp b/audio/effect/2.0/default/AcousticEchoCancelerEffect.cpp
index f6e72bf..7b9ca30 100644
--- a/audio/effect/2.0/default/AcousticEchoCancelerEffect.cpp
+++ b/audio/effect/2.0/default/AcousticEchoCancelerEffect.cpp
@@ -66,6 +66,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> AcousticEchoCancelerEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> AcousticEchoCancelerEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/AcousticEchoCancelerEffect.h b/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
index c777b02..1ac925d 100644
--- a/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
+++ b/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
@@ -54,6 +54,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/AutomaticGainControlEffect.cpp b/audio/effect/2.0/default/AutomaticGainControlEffect.cpp
index 2c386d3..62fe5f7 100644
--- a/audio/effect/2.0/default/AutomaticGainControlEffect.cpp
+++ b/audio/effect/2.0/default/AutomaticGainControlEffect.cpp
@@ -81,6 +81,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> AutomaticGainControlEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> AutomaticGainControlEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/AutomaticGainControlEffect.h b/audio/effect/2.0/default/AutomaticGainControlEffect.h
index 73d94a5..5e1f279 100644
--- a/audio/effect/2.0/default/AutomaticGainControlEffect.h
+++ b/audio/effect/2.0/default/AutomaticGainControlEffect.h
@@ -56,6 +56,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/BassBoostEffect.cpp b/audio/effect/2.0/default/BassBoostEffect.cpp
index 4120e6e..8f35e5f 100644
--- a/audio/effect/2.0/default/BassBoostEffect.cpp
+++ b/audio/effect/2.0/default/BassBoostEffect.cpp
@@ -66,6 +66,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> BassBoostEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> BassBoostEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/BassBoostEffect.h b/audio/effect/2.0/default/BassBoostEffect.h
index 1861937..1e5053b 100644
--- a/audio/effect/2.0/default/BassBoostEffect.h
+++ b/audio/effect/2.0/default/BassBoostEffect.h
@@ -54,6 +54,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/DownmixEffect.cpp b/audio/effect/2.0/default/DownmixEffect.cpp
index 41497d0..92f15bd 100644
--- a/audio/effect/2.0/default/DownmixEffect.cpp
+++ b/audio/effect/2.0/default/DownmixEffect.cpp
@@ -66,6 +66,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> DownmixEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> DownmixEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/DownmixEffect.h b/audio/effect/2.0/default/DownmixEffect.h
index 1d4c3a9..125f34d 100644
--- a/audio/effect/2.0/default/DownmixEffect.h
+++ b/audio/effect/2.0/default/DownmixEffect.h
@@ -54,6 +54,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/Effect.cpp b/audio/effect/2.0/default/Effect.cpp
index 9ca5834..3c97fc4 100644
--- a/audio/effect/2.0/default/Effect.cpp
+++ b/audio/effect/2.0/default/Effect.cpp
@@ -533,6 +533,14 @@
     return Void();
 }
 
+Return<Result> Effect::volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  {
+    uint32_t halDataSize;
+    std::unique_ptr<uint8_t[]> halData = hidlVecToHal(volumes, &halDataSize);
+    return sendCommand(
+            EFFECT_CMD_SET_VOLUME, "SET_VOLUME",
+            halDataSize, &halData[0]);
+}
+
 Return<Result> Effect::setAudioMode(AudioMode mode)  {
     uint32_t halMode = static_cast<uint32_t>(mode);
     return sendCommand(
@@ -641,10 +649,13 @@
     uint32_t halResultSize = resultMaxSize;
     std::unique_ptr<uint8_t[]> halResult(new uint8_t[halResultSize]);
     memset(&halResult[0], 0, halResultSize);
+
+    void* dataPtr = halDataSize > 0 ? &halData[0] : NULL;
+    void* resultPtr = halResultSize > 0 ? &halResult[0] : NULL;
     status_t status = (*mHandle)->command(
-            mHandle, commandId, halDataSize, &halData[0], &halResultSize, &halResult[0]);
+            mHandle, commandId, halDataSize, dataPtr, &halResultSize, resultPtr);
     hidl_vec<uint8_t> result;
-    if (status == OK) {
+    if (status == OK && resultPtr != NULL) {
         result.setToExternal(&halResult[0], halResultSize);
     }
     _hidl_cb(status, result);
diff --git a/audio/effect/2.0/default/Effect.h b/audio/effect/2.0/default/Effect.h
index 8daffb8..13faec4 100644
--- a/audio/effect/2.0/default/Effect.h
+++ b/audio/effect/2.0/default/Effect.h
@@ -75,6 +75,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/EnvironmentalReverbEffect.cpp b/audio/effect/2.0/default/EnvironmentalReverbEffect.cpp
index 2c1fd68..86ff368 100644
--- a/audio/effect/2.0/default/EnvironmentalReverbEffect.cpp
+++ b/audio/effect/2.0/default/EnvironmentalReverbEffect.cpp
@@ -95,6 +95,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> EnvironmentalReverbEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> EnvironmentalReverbEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/EnvironmentalReverbEffect.h b/audio/effect/2.0/default/EnvironmentalReverbEffect.h
index d0c8962..794caac 100644
--- a/audio/effect/2.0/default/EnvironmentalReverbEffect.h
+++ b/audio/effect/2.0/default/EnvironmentalReverbEffect.h
@@ -66,6 +66,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/EqualizerEffect.cpp b/audio/effect/2.0/default/EqualizerEffect.cpp
index 833ea5b..223716c 100644
--- a/audio/effect/2.0/default/EqualizerEffect.cpp
+++ b/audio/effect/2.0/default/EqualizerEffect.cpp
@@ -86,6 +86,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> EqualizerEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> EqualizerEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/EqualizerEffect.h b/audio/effect/2.0/default/EqualizerEffect.h
index 200ca1a..c9bed4f 100644
--- a/audio/effect/2.0/default/EqualizerEffect.h
+++ b/audio/effect/2.0/default/EqualizerEffect.h
@@ -68,6 +68,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/LoudnessEnhancerEffect.cpp b/audio/effect/2.0/default/LoudnessEnhancerEffect.cpp
index 1f7124b..e58b42c 100644
--- a/audio/effect/2.0/default/LoudnessEnhancerEffect.cpp
+++ b/audio/effect/2.0/default/LoudnessEnhancerEffect.cpp
@@ -68,6 +68,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> LoudnessEnhancerEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> LoudnessEnhancerEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/LoudnessEnhancerEffect.h b/audio/effect/2.0/default/LoudnessEnhancerEffect.h
index 308c47f..039b8d6 100644
--- a/audio/effect/2.0/default/LoudnessEnhancerEffect.h
+++ b/audio/effect/2.0/default/LoudnessEnhancerEffect.h
@@ -64,6 +64,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/NoiseSuppressionEffect.cpp b/audio/effect/2.0/default/NoiseSuppressionEffect.cpp
index b0b929f..7c4e06d 100644
--- a/audio/effect/2.0/default/NoiseSuppressionEffect.cpp
+++ b/audio/effect/2.0/default/NoiseSuppressionEffect.cpp
@@ -79,6 +79,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> NoiseSuppressionEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> NoiseSuppressionEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/NoiseSuppressionEffect.h b/audio/effect/2.0/default/NoiseSuppressionEffect.h
index 5e3a5c1..5491201 100644
--- a/audio/effect/2.0/default/NoiseSuppressionEffect.h
+++ b/audio/effect/2.0/default/NoiseSuppressionEffect.h
@@ -66,6 +66,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/PresetReverbEffect.cpp b/audio/effect/2.0/default/PresetReverbEffect.cpp
index 803c9be..5f17791 100644
--- a/audio/effect/2.0/default/PresetReverbEffect.cpp
+++ b/audio/effect/2.0/default/PresetReverbEffect.cpp
@@ -66,6 +66,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> PresetReverbEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> PresetReverbEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/PresetReverbEffect.h b/audio/effect/2.0/default/PresetReverbEffect.h
index f6a900c..4eb074a 100644
--- a/audio/effect/2.0/default/PresetReverbEffect.h
+++ b/audio/effect/2.0/default/PresetReverbEffect.h
@@ -64,6 +64,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/VirtualizerEffect.cpp b/audio/effect/2.0/default/VirtualizerEffect.cpp
index 4f193e7..c1fe52f 100644
--- a/audio/effect/2.0/default/VirtualizerEffect.cpp
+++ b/audio/effect/2.0/default/VirtualizerEffect.cpp
@@ -78,6 +78,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> VirtualizerEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> VirtualizerEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/VirtualizerEffect.h b/audio/effect/2.0/default/VirtualizerEffect.h
index 5b0773d..536775f 100644
--- a/audio/effect/2.0/default/VirtualizerEffect.h
+++ b/audio/effect/2.0/default/VirtualizerEffect.h
@@ -65,6 +65,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/audio/effect/2.0/default/VisualizerEffect.cpp b/audio/effect/2.0/default/VisualizerEffect.cpp
index 141817b..2cd3240 100644
--- a/audio/effect/2.0/default/VisualizerEffect.cpp
+++ b/audio/effect/2.0/default/VisualizerEffect.cpp
@@ -66,6 +66,11 @@
     return mEffect->setAndGetVolume(volumes, _hidl_cb);
 }
 
+Return<Result> VisualizerEffect::volumeChangeNotification(
+        const hidl_vec<uint32_t>& volumes) {
+    return mEffect->volumeChangeNotification(volumes);
+}
+
 Return<Result> VisualizerEffect::setAudioMode(AudioMode mode) {
     return mEffect->setAudioMode(mode);
 }
diff --git a/audio/effect/2.0/default/VisualizerEffect.h b/audio/effect/2.0/default/VisualizerEffect.h
index b6dc768..fd40ca8 100644
--- a/audio/effect/2.0/default/VisualizerEffect.h
+++ b/audio/effect/2.0/default/VisualizerEffect.h
@@ -64,6 +64,7 @@
     Return<Result> setDevice(AudioDevice device)  override;
     Return<void> setAndGetVolume(
             const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb)  override;
+    Return<Result> volumeChangeNotification(const hidl_vec<uint32_t>& volumes)  override;
     Return<Result> setAudioMode(AudioMode mode)  override;
     Return<Result> setConfigReverse(
             const EffectConfig& config,
diff --git a/boot/Android.mk b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target_profiling/Android.mk
similarity index 75%
copy from boot/Android.mk
copy to audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target_profiling/Android.mk
index f9e3276..430600d 100644
--- a/boot/Android.mk
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target_profiling/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalAudioEffectHidlTargetBasicProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/audio/effect/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target_profiling/AndroidTest.xml b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..7febf26
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS Audio Effect HIDL HAL's basic target-side, profiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="HalAudioEffectHidlTargetBasicProfilingTest" />
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/audio_effect_hidl_hal_test/audio_effect_hidl_hal_test,
+            _64bit::DATA/nativetest64/audio_effect_hidl_hal_test/audio_effect_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/biometrics/fingerprint/2.1/Android.mk b/biometrics/fingerprint/2.1/Android.mk
index c1412a8..22da268 100644
--- a/biometrics/fingerprint/2.1/Android.mk
+++ b/biometrics/fingerprint/2.1/Android.mk
@@ -217,6 +217,8 @@
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBiometricsFingerprintClientCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
 $(GEN): PRIVATE_CUSTOM_TOOL = \
         $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
@@ -446,6 +448,8 @@
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBiometricsFingerprintClientCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
 $(GEN): PRIVATE_CUSTOM_TOOL = \
         $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
diff --git a/biometrics/fingerprint/2.1/default/Android.mk b/biometrics/fingerprint/2.1/default/Android.mk
index cd29b30..e5c79fe 100644
--- a/biometrics/fingerprint/2.1/default/Android.mk
+++ b/biometrics/fingerprint/2.1/default/Android.mk
@@ -9,11 +9,13 @@
     service.cpp \
 
 LOCAL_SHARED_LIBRARIES := \
+    libbinder \
     liblog \
     libhidlbase \
     libhidltransport \
     libhardware \
     libhwbinder \
+    libkeystore_binder \
     libutils \
     android.hardware.biometrics.fingerprint@2.1 \
 
diff --git a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
index 9167e70..516cd00 100644
--- a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
+++ b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
@@ -15,10 +15,18 @@
  */
 #define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service"
 
+// For communication with Keystore binder interface
+#include <binder/IServiceManager.h>
+#include <keystore/IKeystoreService.h>
+#include <keystore/keystore.h> // for error codes
+#include <hardware/hw_auth_token.h>
+
 #include <hardware/hardware.h>
 #include <hardware/fingerprint.h>
 #include "BiometricsFingerprint.h"
 
+#include <inttypes.h>
+
 namespace android {
 namespace hardware {
 namespace biometrics {
@@ -235,6 +243,23 @@
     return new BiometricsFingerprint(fp_device);
 }
 
+void BiometricsFingerprint::notifyKeystore(const uint8_t *auth_token, const size_t auth_token_length) {
+    if (auth_token != nullptr && auth_token_length > 0) {
+        // TODO: cache service?
+        sp<IServiceManager> sm = android::defaultServiceManager();
+        sp<::android::IBinder> binder = sm->getService(String16("android.security.keystore"));
+        sp<IKeystoreService> service = interface_cast<IKeystoreService>(binder);
+        if (service != nullptr) {
+            auto ret = service->addAuthToken(auth_token, auth_token_length);
+            if (!ret.isOk()) {
+                ALOGE("Failure sending auth token to KeyStore: %" PRId32, int32_t(ret));
+            }
+        } else {
+            ALOGE("Unable to communicate with KeyStore");
+        }
+    }
+}
+
 } // namespace implementation
 }  // namespace V2_1
 }  // namespace fingerprint
diff --git a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
index bc85c1c..1f44a1c 100644
--- a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
+++ b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
@@ -95,6 +95,11 @@
                     msg->data.removed.remaining_templates);
                 break;
             case FINGERPRINT_AUTHENTICATED:
+                if (msg->data.authenticated.finger.fid != 0) {
+                    const uint8_t* hat =
+                            reinterpret_cast<const uint8_t *>(&msg->data.authenticated.hat);
+                    notifyKeystore(hat, sizeof(msg->data.authenticated.hat));
+                }
                 mClientCallback->onAuthenticated(devId,
                     msg->data.authenticated.finger.fid,
                     msg->data.authenticated.finger.gid);
@@ -109,6 +114,7 @@
     }
 private:
     Return<RequestStatus> ErrorFilter(int32_t error);
+    static void notifyKeystore(const uint8_t *auth_token, const size_t auth_token_length);
     static FingerprintError VendorErrorFilter(int32_t error,
             int32_t* vendorCode);
     static FingerprintAcquiredInfo VendorAcquiredFilter(int32_t error,
diff --git a/bluetooth/1.0/IBluetoothHci.hal b/bluetooth/1.0/IBluetoothHci.hal
index 10cf914..8722616 100644
--- a/bluetooth/1.0/IBluetoothHci.hal
+++ b/bluetooth/1.0/IBluetoothHci.hal
@@ -35,12 +35,18 @@
      * required to communicate with the Bluetooth hardware in the
      * device.
      *
+     * The |oninitializationComplete| callback must be invoked in response
+     * to this function to indicate success before any other function
+     * (sendHciCommand, sendAclData, * sendScoData) is invoked on this
+     * interface.
+     *
      * @param callback implements IBluetoothHciCallbacks which will
      *    receive callbacks when incoming HCI packets are received
      *    from the controller to be sent to the host.
-     * @return status result of the initialization
      */
-    initialize(IBluetoothHciCallbacks callback) generates (Status status);
+    @entry
+    @callflow(next={"sendHciCommand", "sendAclData", "sendScoData", "close"})
+    initialize(IBluetoothHciCallbacks callback);
 
     /**
      * Send an HCI command (as specified in the Bluetooth Specification
@@ -49,6 +55,7 @@
      *
      * @param command is the HCI command to be sent
      */
+    @callflow(next={"sendHciCommand", "sendAclData", "sendScoData", "close"})
     sendHciCommand(HciPacket command);
 
     /**
@@ -57,6 +64,7 @@
      * Packets must be processed in order.
      * @param data HCI data packet to be sent
      */
+    @callflow(next={"sendHciCommand", "sendAclData", "sendScoData", "close"})
     sendAclData(HciPacket data);
 
     /**
@@ -65,10 +73,12 @@
      * Packets must be processed in order.
      * @param data HCI data packet to be sent
      */
+    @callflow(next={"sendHciCommand", "sendAclData", "sendScoData", "close"})
     sendScoData(HciPacket data);
 
     /**
      * Close the HCI interface
      */
+    @exit
     close();
 };
diff --git a/bluetooth/1.0/IBluetoothHciCallbacks.hal b/bluetooth/1.0/IBluetoothHciCallbacks.hal
index afaab6c..15db1ce 100644
--- a/bluetooth/1.0/IBluetoothHciCallbacks.hal
+++ b/bluetooth/1.0/IBluetoothHciCallbacks.hal
@@ -19,21 +19,27 @@
 /* The interface from the Bluetooth Controller to the stack. */
 interface IBluetoothHciCallbacks {
     /**
+     * Invoked when the Bluetooth controller initialization has been
+     * completed.
+     */
+    initializationComplete(Status status);
+
+    /**
      * This function is invoked when an HCI event is received from the
      * Bluetooth controller to be forwarded to the Bluetooth stack.
      * @param event is the HCI event to be sent to the Bluetooth stack.
      */
-    oneway hciEventReceived(HciPacket event);
+    hciEventReceived(HciPacket event);
 
     /**
      * Send an ACL data packet form the controller to the host.
      * @param data the ACL HCI packet to be passed to the host stack
      */
-    oneway aclDataReceived(HciPacket data);
+    aclDataReceived(HciPacket data);
 
     /**
      * Send a SCO data packet form the controller to the host.
      * @param data the SCO HCI packet to be passed to the host stack
      */
-    oneway scoDataReceived(HciPacket data);
+    scoDataReceived(HciPacket data);
 };
diff --git a/bluetooth/1.0/default/bluetooth_hci.cc b/bluetooth/1.0/default/bluetooth_hci.cc
index d12bfb9..1559119 100644
--- a/bluetooth/1.0/default/bluetooth_hci.cc
+++ b/bluetooth/1.0/default/bluetooth_hci.cc
@@ -30,12 +30,16 @@
 static const uint8_t HCI_DATA_TYPE_ACL = 2;
 static const uint8_t HCI_DATA_TYPE_SCO = 3;
 
-Return<Status> BluetoothHci::initialize(
+Return<void> BluetoothHci::initialize(
     const ::android::sp<IBluetoothHciCallbacks>& cb) {
   ALOGW("BluetoothHci::initialize()");
   event_cb_ = cb;
 
   bool rc = VendorInterface::Initialize(
+      [this](bool status) {
+        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:
@@ -52,9 +56,8 @@
             break;
         }
       });
-  if (!rc) return Status::INITIALIZATION_ERROR;
-
-  return Status::SUCCESS;
+  if (!rc) event_cb_->initializationComplete(Status::INITIALIZATION_ERROR);
+  return Void();
 }
 
 Return<void> BluetoothHci::close() {
diff --git a/bluetooth/1.0/default/bluetooth_hci.h b/bluetooth/1.0/default/bluetooth_hci.h
index d297570..da1b411 100644
--- a/bluetooth/1.0/default/bluetooth_hci.h
+++ b/bluetooth/1.0/default/bluetooth_hci.h
@@ -32,7 +32,7 @@
 
 class BluetoothHci : public IBluetoothHci {
  public:
-  Return<Status> initialize(
+  Return<void> initialize(
       const ::android::sp<IBluetoothHciCallbacks>& cb) override;
   Return<void> sendHciCommand(const hidl_vec<uint8_t>& packet) override;
   Return<void> sendAclData(const hidl_vec<uint8_t>& data) override;
diff --git a/bluetooth/1.0/default/service.cpp b/bluetooth/1.0/default/service.cpp
index a3c3cad..fa5106f 100644
--- a/bluetooth/1.0/default/service.cpp
+++ b/bluetooth/1.0/default/service.cpp
@@ -25,5 +25,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-  return defaultPassthroughServiceImplementation<IBluetoothHci>("bluetooth");
+  return defaultPassthroughServiceImplementation<IBluetoothHci>();
 }
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index 905e1a6..20b30ae 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -35,6 +35,7 @@
 namespace {
 
 using android::hardware::bluetooth::V1_0::implementation::VendorInterface;
+using android::hardware::hidl_vec;
 
 tINT_CMD_CBACK internal_command_cb;
 VendorInterface* g_vendor_interface = nullptr;
@@ -46,17 +47,14 @@
     0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO,
     HCI_LENGTH_OFFSET_EVT};
 
-size_t HciGetPacketLengthForType(
-    HciPacketType type, const android::hardware::hidl_vec<uint8_t>& packet) {
+size_t HciGetPacketLengthForType(HciPacketType type,
+                                 const hidl_vec<uint8_t>& packet) {
   size_t offset = packet_length_offset_for_type[type];
-  if (type == HCI_PACKET_TYPE_ACL_DATA) {
-    return (((packet[offset + 1]) << 8) | packet[offset]);
-  }
-  return packet[offset];
+  if (type != HCI_PACKET_TYPE_ACL_DATA) return packet[offset];
+  return (((packet[offset + 1]) << 8) | packet[offset]);
 }
 
-HC_BT_HDR* WrapPacketAndCopy(uint16_t event,
-                             const android::hardware::hidl_vec<uint8_t>& data) {
+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]);
   packet->offset = 0;
@@ -71,17 +69,16 @@
 
 uint8_t transmit_cb(uint16_t opcode, void* buffer, tINT_CMD_CBACK callback) {
   ALOGV("%s opcode: 0x%04x, ptr: %p", __func__, opcode, buffer);
-  HC_BT_HDR* bt_hdr = reinterpret_cast<HC_BT_HDR*>(buffer);
-
   internal_command_cb = callback;
   uint8_t type = HCI_PACKET_TYPE_COMMAND;
-  VendorInterface::get()->SendPrivate(&type, 1);
-  VendorInterface::get()->SendPrivate(bt_hdr->data, bt_hdr->len);
+  VendorInterface::get()->Send(&type, 1);
+  HC_BT_HDR* bt_hdr = reinterpret_cast<HC_BT_HDR*>(buffer);
+  VendorInterface::get()->Send(bt_hdr->data, bt_hdr->len);
   return true;
 }
 
 void firmware_config_cb(bt_vendor_op_result_t result) {
-  ALOGD("%s result: %d", __func__, result);
+  ALOGV("%s result: %d", __func__, result);
   VendorInterface::get()->OnFirmwareConfigured(result);
 }
 
@@ -131,10 +128,28 @@
 namespace V1_0 {
 namespace implementation {
 
-bool VendorInterface::Initialize(PacketReadCallback packet_read_cb) {
+class FirmwareStartupTimer {
+ public:
+  FirmwareStartupTimer() : start_time_(std::chrono::steady_clock::now()) {}
+
+  ~FirmwareStartupTimer() {
+    std::chrono::duration<double> duration =
+        std::chrono::steady_clock::now() - start_time_;
+    double s = duration.count();
+    if (s == 0) return;
+    ALOGD("Firmware configured in %.3fs", s);
+  }
+
+ private:
+  std::chrono::steady_clock::time_point start_time_;
+};
+
+bool VendorInterface::Initialize(
+    InitializeCompleteCallback initialize_complete_cb,
+    PacketReadCallback packet_read_cb) {
   assert(!g_vendor_interface);
   g_vendor_interface = new VendorInterface();
-  return g_vendor_interface->Open(packet_read_cb);
+  return g_vendor_interface->Open(initialize_complete_cb, packet_read_cb);
 }
 
 void VendorInterface::Shutdown() {
@@ -146,8 +161,9 @@
 
 VendorInterface* VendorInterface::get() { return g_vendor_interface; }
 
-bool VendorInterface::Open(PacketReadCallback packet_read_cb) {
-  firmware_configured_ = false;
+bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb,
+                           PacketReadCallback packet_read_cb) {
+  initialize_complete_cb_ = initialize_complete_cb;
   packet_read_cb_ = packet_read_cb;
 
   // Initialize vendor interface
@@ -209,6 +225,7 @@
                                          [this](int fd) { OnDataReady(fd); });
 
   // Start configuring the firmware
+  firmware_startup_timer_ = new FirmwareStartupTimer();
   lib_interface_->op(BT_VND_OP_FW_CFG, nullptr);
 
   return true;
@@ -229,31 +246,13 @@
     lib_handle_ = nullptr;
   }
 
-  firmware_configured_ = false;
+  if (firmware_startup_timer_ != nullptr) {
+    delete firmware_startup_timer_;
+    firmware_startup_timer_ = nullptr;
+  }
 }
 
 size_t VendorInterface::Send(const uint8_t* data, size_t length) {
-  if (firmware_configured_ && queued_data_.size() == 0)
-    return SendPrivate(data, length);
-
-  if (!firmware_configured_) {
-    ALOGI("%s queueing command", __func__);
-    queued_data_.resize(queued_data_.size() + length);
-    uint8_t* append_ptr = &queued_data_[queued_data_.size() - length];
-    memcpy(append_ptr, data, length);
-    return length;
-  }
-
-  ALOGI("%s sending queued command", __func__);
-  SendPrivate(queued_data_.data(), queued_data_.size());
-  queued_data_.resize(0);
-
-  ALOGI("%s done sending queued command", __func__);
-
-  return SendPrivate(data, length);
-}
-
-size_t VendorInterface::SendPrivate(const uint8_t* data, size_t length) {
   if (uart_fd_ == INVALID_FD) return 0;
 
   size_t transmitted_length = 0;
@@ -280,9 +279,18 @@
 }
 
 void VendorInterface::OnFirmwareConfigured(uint8_t result) {
-  ALOGI("%s: result = %d", __func__, result);
-  firmware_configured_ = true;
-  VendorInterface::get()->Send(NULL, 0);
+  ALOGD("%s result: %d", __func__, result);
+  internal_command_cb = nullptr;
+
+  if (firmware_startup_timer_ != nullptr) {
+    delete firmware_startup_timer_;
+    firmware_startup_timer_ = nullptr;
+  }
+
+  if (initialize_complete_cb_ != nullptr) {
+    initialize_complete_cb_(result == 0);
+    initialize_complete_cb_ = nullptr;
+  }
 }
 
 void VendorInterface::OnDataReady(int fd) {
@@ -331,16 +339,17 @@
       hci_packet_bytes_remaining_ -= bytes_read;
       hci_packet_bytes_read_ += bytes_read;
       if (hci_packet_bytes_remaining_ == 0) {
-        if (firmware_configured_) {
-          if (packet_read_cb_ != nullptr) {
-            packet_read_cb_(hci_packet_type_, hci_packet_);
-          }
+        if (internal_command_cb != nullptr) {
+          HC_BT_HDR* bt_hdr =
+              WrapPacketAndCopy(HCI_PACKET_TYPE_EVENT, hci_packet_);
+          internal_command_cb(bt_hdr);
+        } else if (packet_read_cb_ != nullptr &&
+                   initialize_complete_cb_ == nullptr) {
+          packet_read_cb_(hci_packet_type_, hci_packet_);
         } else {
-          if (internal_command_cb != nullptr) {
-            HC_BT_HDR* bt_hdr =
-                WrapPacketAndCopy(HCI_PACKET_TYPE_EVENT, hci_packet_);
-            internal_command_cb(bt_hdr);
-          }
+          ALOGE(
+              "%s HCI_PAYLOAD received without packet_read_cb or pending init.",
+              __func__);
         }
         hci_parser_state_ = HCI_IDLE;
       }
diff --git a/bluetooth/1.0/default/vendor_interface.h b/bluetooth/1.0/default/vendor_interface.h
index 73ff2eb..450b99c 100644
--- a/bluetooth/1.0/default/vendor_interface.h
+++ b/bluetooth/1.0/default/vendor_interface.h
@@ -29,55 +29,50 @@
 namespace implementation {
 
 using ::android::hardware::hidl_vec;
+using InitializeCompleteCallback = std::function<void(bool success)>;
 using PacketReadCallback =
     std::function<void(HciPacketType, const hidl_vec<uint8_t> &)>;
 
+class FirmwareStartupTimer;
+
 class VendorInterface {
  public:
-  static bool Initialize(PacketReadCallback packet_read_cb);
+  static bool Initialize(InitializeCompleteCallback initialize_complete_cb,
+                         PacketReadCallback packet_read_cb);
   static void Shutdown();
-  static VendorInterface* get();
+  static VendorInterface *get();
 
   size_t Send(const uint8_t *data, size_t length);
 
   void OnFirmwareConfigured(uint8_t result);
 
-  // Actually send the data.
-  size_t SendPrivate(const uint8_t *data, size_t length);
-
  private:
-  VendorInterface() { queued_data_.resize(0); }
   virtual ~VendorInterface() = default;
 
-  bool Open(PacketReadCallback packet_read_cb);
+  bool Open(InitializeCompleteCallback initialize_complete_cb, PacketReadCallback packet_read_cb);
   void Close();
 
   void OnDataReady(int fd);
 
-  // Queue data from Send() until the interface is ready.
-  hidl_vec<uint8_t> queued_data_;
-
   void *lib_handle_;
   bt_vendor_interface_t *lib_interface_;
   AsyncFdWatcher fd_watcher_;
   int uart_fd_;
   PacketReadCallback packet_read_cb_;
-  bool firmware_configured_;
+  InitializeCompleteCallback initialize_complete_cb_;
 
-  enum HciParserState {
-    HCI_IDLE,
-    HCI_TYPE_READY,
-    HCI_PAYLOAD
-  };
+  enum HciParserState { HCI_IDLE, HCI_TYPE_READY, HCI_PAYLOAD };
   HciParserState hci_parser_state_{HCI_IDLE};
   HciPacketType hci_packet_type_{HCI_PACKET_TYPE_UNKNOWN};
   hidl_vec<uint8_t> hci_packet_;
   size_t hci_packet_bytes_remaining_;
   size_t hci_packet_bytes_read_;
+
+  FirmwareStartupTimer *firmware_startup_timer_;
 };
 
-} // namespace implementation
-} // namespace V1_0
-} // namespace bluetooth
-} // namespace hardware
-} // namespace android
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace bluetooth
+}  // namespace hardware
+}  // namespace android
diff --git a/boot/Android.mk b/bluetooth/1.0/vts/Android.mk
similarity index 81%
copy from boot/Android.mk
copy to bluetooth/1.0/vts/Android.mk
index f9e3276..85e0c38 100644
--- a/boot/Android.mk
+++ b/bluetooth/1.0/vts/Android.mk
@@ -5,7 +5,7 @@
 # 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
+#       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,
@@ -16,4 +16,4 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(LOCAL_PATH)/functional/vts/testcases/hal/bluetooth/hidl/Android.mk
diff --git a/bluetooth/1.0/vts/BluetoothHci.vts b/bluetooth/1.0/vts/BluetoothHci.vts
new file mode 100644
index 0000000..1112371
--- /dev/null
+++ b/bluetooth/1.0/vts/BluetoothHci.vts
@@ -0,0 +1,61 @@
+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"
+
+interface: {
+    api: {
+        name: "initialize"
+        return_type_hidl: {
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::bluetooth::V1_0::Status"
+        }
+        arg: {
+            type: TYPE_HIDL_INTERFACE
+            predefined_type: "IBluetoothHciCallbacks"
+            is_callback: false
+        }
+    }
+
+    api: {
+        name: "sendHciCommand"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "sendAclData"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "sendScoData"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "close"
+    }
+
+}
diff --git a/bluetooth/1.0/vts/BluetoothHciCallbacks.vts b/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
new file mode 100644
index 0000000..f2df5b4
--- /dev/null
+++ b/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
@@ -0,0 +1,43 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IBluetoothHciCallbacks"
+
+package: "android.hardware.bluetooth"
+
+import: "android.hardware.bluetooth@1.0::types"
+
+interface: {
+    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/bluetooth_hidl_hal_test.cpp b/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
index 2a4bbdd..683029e 100644
--- a/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
+++ b/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
@@ -36,13 +36,12 @@
 using ::android::hardware::Void;
 using ::android::sp;
 
-#define Bluetooth_HCI_SERVICE_NAME "bluetooth"
-
 #define HCI_MINIMUM_HCI_VERSION 5  // Bluetooth Core Specification 3.0 + HS
 #define HCI_MINIMUM_LMP_VERSION 5  // Bluetooth Core Specification 3.0 + HS
 #define NUM_HCI_COMMANDS_BANDWIDTH 1000
 #define NUM_SCO_PACKETS_BANDWIDTH 1000
 #define NUM_ACL_PACKETS_BANDWIDTH 1000
+#define WAIT_FOR_INIT_TIMEOUT std::chrono::milliseconds(2000)
 #define WAIT_FOR_HCI_EVENT_TIMEOUT std::chrono::milliseconds(2000)
 #define WAIT_FOR_SCO_DATA_TIMEOUT std::chrono::milliseconds(1000)
 #define WAIT_FOR_ACL_DATA_TIMEOUT std::chrono::milliseconds(1000)
@@ -122,8 +121,8 @@
  public:
   virtual void SetUp() override {
     // currently test passthrough mode only
-    bluetooth = IBluetoothHci::getService(Bluetooth_HCI_SERVICE_NAME);
-    ALOGW("%s: getService(%s) is %s", __func__, Bluetooth_HCI_SERVICE_NAME,
+    bluetooth = IBluetoothHci::getService();
+    ALOGW("%s: getService() for bluetooth is %s", __func__,
           bluetooth->isRemote() ? "remote" : "local");
     ASSERT_NE(bluetooth, nullptr);
 
@@ -135,6 +134,8 @@
     max_acl_data_packets = 0;
     max_sco_data_packets = 0;
 
+    initialized = false;
+    initialized_count = 0;
     event_count = 0;
     acl_count = 0;
     sco_count = 0;
@@ -142,9 +143,12 @@
     acl_cb_count = 0;
     sco_cb_count = 0;
 
-    // Collision with android::hardware::Status
-    EXPECT_EQ(android::hardware::bluetooth::V1_0::Status::SUCCESS,
-              bluetooth->initialize(bluetooth_cb));
+    ASSERT_EQ(initialized, false);
+    bluetooth->initialize(bluetooth_cb);
+
+    wait_for_init_callback();
+
+    ASSERT_EQ(initialized, true);
   }
 
   virtual void TearDown() override {
@@ -167,6 +171,26 @@
   void wait_for_command_complete_event(hidl_vec<uint8_t> cmd);
   int wait_for_completed_packets_event(uint16_t handle);
 
+  // Inform the test about the initialization callback
+  inline void notify_initialized() {
+    std::unique_lock<std::mutex> lock(initialized_mutex);
+    initialized_count++;
+    initialized_condition.notify_one();
+  }
+
+  // Test code calls this function to wait for the init callback
+  inline void wait_for_init_callback() {
+    std::unique_lock<std::mutex> lock(initialized_mutex);
+
+    auto start_time = std::chrono::steady_clock::now();
+    while (initialized_count == 0)
+      if (initialized_condition.wait_until(lock,
+                                     start_time + WAIT_FOR_INIT_TIMEOUT) ==
+          std::cv_status::timeout)
+        return;
+    initialized_count--;
+  }
+
   // Inform the test about an event callback
   inline void notify_event_received() {
     std::unique_lock<std::mutex> lock(event_mutex);
@@ -230,6 +254,13 @@
 
     virtual ~BluetoothHciCallbacks() = default;
 
+    Return<void> initializationComplete(Status status) override {
+      parent_.initialized = true;
+      parent_.notify_initialized();
+      ALOGV("%s (status = %d)", __func__, static_cast<int>(status));
+      return Void();
+    };
+
     Return<void> hciEventReceived(
         const ::android::hardware::hidl_vec<uint8_t>& event) override {
       parent_.event_cb_count++;
@@ -262,6 +293,8 @@
   std::queue<hidl_vec<uint8_t>> acl_queue;
   std::queue<hidl_vec<uint8_t>> sco_queue;
 
+  bool initialized;
+
   int event_cb_count;
   int sco_cb_count;
   int acl_cb_count;
@@ -272,12 +305,15 @@
   int max_sco_data_packets;
 
  private:
+  std::mutex initialized_mutex;
   std::mutex event_mutex;
   std::mutex sco_mutex;
   std::mutex acl_mutex;
+  std::condition_variable initialized_condition;
   std::condition_variable event_condition;
   std::condition_variable sco_condition;
   std::condition_variable acl_condition;
+  int initialized_count;
   int event_count;
   int sco_count;
   int acl_count;
diff --git a/audio/Android.mk b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/Android.mk
similarity index 100%
rename from audio/Android.mk
rename to bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/Android.mk
diff --git a/boot/Android.mk b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/Android.mk
similarity index 77%
copy from boot/Android.mk
copy to bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/Android.mk
index f9e3276..98bb686 100644
--- a/boot/Android.mk
+++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalBluetoothHidlTargetBasicTest
+VTS_CONFIG_SRC_DIR := testcases/hal/bluetooth/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/AndroidTest.xml b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..54fb89b
--- /dev/null
+++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS Bluetooth HIDL HAL's basic target-side test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="HalBluetoothHidlTargetBasicTest" />
+        <option name="binary-test-sources" value="
+            _64bit::DATA/nativetest64/bluetooth_hidl_hal_test/bluetooth_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+    </test>
+</configuration>
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/Android.mk b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..81a2db9
--- /dev/null
+++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+## 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.
+# #
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := BluetoothHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/bluetooth/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/AndroidTest.xml b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..8052b3c
--- /dev/null
+++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS Bluetooth HIDL HAL's target-side profiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="BluetoothHidlTargetProfilingTest" />
+        <option name="binary-test-sources" value="
+            _64bit::DATA/nativetest64/bluetooth_hidl_hal_test/bluetooth_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+    <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/bluetooth/1.0/vts/types.vts b/bluetooth/1.0/vts/types.vts
new file mode 100644
index 0000000..59eb3d4
--- /dev/null
+++ b/bluetooth/1.0/vts/types.vts
@@ -0,0 +1,32 @@
+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/BootControl.cpp b/boot/1.0/default/BootControl.cpp
index 828da16..9a90076 100644
--- a/boot/1.0/default/BootControl.cpp
+++ b/boot/1.0/default/BootControl.cpp
@@ -93,14 +93,14 @@
 }
 
 
-IBootControl* HIDL_FETCH_IBootControl(const char* hal) {
+IBootControl* HIDL_FETCH_IBootControl(const char* /* hal */) {
     int ret = 0;
     boot_control_module_t* module = NULL;
     hw_module_t **hwm = reinterpret_cast<hw_module_t**>(&module);
-    ret = hw_get_module(hal, const_cast<const hw_module_t**>(hwm));
+    ret = hw_get_module(BOOT_CONTROL_HARDWARE_MODULE_ID, const_cast<const hw_module_t**>(hwm));
     if (ret)
     {
-        ALOGE("hw_get_module %s failed: %d", hal, ret);
+        ALOGE("hw_get_module %s failed: %d", BOOT_CONTROL_HARDWARE_MODULE_ID, ret);
         return nullptr;
     }
     module->init(module);
diff --git a/boot/1.0/default/service.cpp b/boot/1.0/default/service.cpp
index 0dc56bf..f3996ef 100644
--- a/boot/1.0/default/service.cpp
+++ b/boot/1.0/default/service.cpp
@@ -22,5 +22,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main (int /* argc */, char * /* argv */ []) {
-    return defaultPassthroughServiceImplementation<IBootControl>("bootctrl");
+    return defaultPassthroughServiceImplementation<IBootControl>();
 }
diff --git a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp b/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
index 3413a93..36142df 100644
--- a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
+++ b/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
@@ -35,7 +35,7 @@
 class BootHidlTest : public ::testing::Test {
  public:
   virtual void SetUp() override {
-    boot = IBootControl::getService("bootctrl");
+    boot = IBootControl::getService();
     ASSERT_NE(boot, nullptr);
   }
 
diff --git a/boot/Android.mk b/boot/1.0/vts/functional/vts/testcases/hal/boot/hidl/target_profiling/Android.mk
similarity index 78%
copy from boot/Android.mk
copy to boot/1.0/vts/functional/vts/testcases/hal/boot/hidl/target_profiling/Android.mk
index f9e3276..f7414df 100644
--- a/boot/Android.mk
+++ b/boot/1.0/vts/functional/vts/testcases/hal/boot/hidl/target_profiling/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalBootHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/boot/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/boot/1.0/vts/functional/vts/testcases/hal/boot/hidl/target_profiling/AndroidTest.xml b/boot/1.0/vts/functional/vts/testcases/hal/boot/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..dbc6300
--- /dev/null
+++ b/boot/1.0/vts/functional/vts/testcases/hal/boot/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS Boot HIDL HAL's target-side test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="HalBootHidlTargetProfilingTest"/>
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/boot_hidl_hal_test/boot_hidl_hal_test,
+            _64bit::DATA/nativetest64/boot_hidl_hal_test/boot_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="5m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/broadcastradio/Android.mk b/broadcastradio/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/broadcastradio/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/camera/device/3.2/default/Android.bp b/camera/device/3.2/default/Android.bp
index 9820220..40d4253 100644
--- a/camera/device/3.2/default/Android.bp
+++ b/camera/device/3.2/default/Android.bp
@@ -20,3 +20,27 @@
     ],
     export_include_dirs: ["."]
 }
+
+cc_library_shared {
+    name: "android.hardware.camera.device@3.2-impl-binderized",
+    srcs: ["CameraDevice.cpp",
+           "CameraDeviceSession.cpp",
+           "convert.cpp"],
+    cppflags: ["-DBINDERIZED"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "libcutils",
+        "android.hardware.camera.device@3.2",
+        "android.hardware.camera.provider@2.4",
+        "liblog",
+        "libhardware",
+        "libcamera_metadata"
+    ],
+    static_libs: [
+        "android.hardware.camera.common@1.0-helper"
+    ],
+    export_include_dirs: ["."]
+}
diff --git a/camera/device/3.2/default/CameraDeviceSession.cpp b/camera/device/3.2/default/CameraDeviceSession.cpp
index 201a3b4..26b7b73 100644
--- a/camera/device/3.2/default/CameraDeviceSession.cpp
+++ b/camera/device/3.2/default/CameraDeviceSession.cpp
@@ -94,15 +94,7 @@
         if (handle == nullptr || handle->numFds == 0) {
             fd = -1;
         } else if (handle->numFds == 1) {
-//TODO(b/34110242): make this hidl transport agnostic
-#ifdef BINDERIZED
             fd = dup(handle->data[0]);
-            // TODO(b/34169301)
-            // Camera service expect FD be closed by HAL process (in passthrough mode)
-            // close(handle->data[0]);
-#else
-            fd = handle->data[0];
-#endif
             if (fd < 0) {
                 ALOGE("failed to dup fence fd %d", handle->data[0]);
                 return false;
@@ -118,13 +110,9 @@
 
     void closeFence(int fd)
     {
-#ifdef BINDERIZED
         if (fd >= 0) {
             close(fd);
         }
-#else
-        (void) fd;
-#endif
     }
 
 private:
@@ -307,31 +295,40 @@
         hidl_vec<buffer_handle_t*>& allBufPtrs,
         hidl_vec<int>& allFences) {
     bool hasInputBuf = (request.inputBuffer.streamId != -1 &&
-            request.inputBuffer.buffer.getNativeHandle() != nullptr);
+            request.inputBuffer.bufferId != 0);
     size_t numOutputBufs = request.outputBuffers.size();
     size_t numBufs = numOutputBufs + (hasInputBuf ? 1 : 0);
     // Validate all I/O buffers
     hidl_vec<buffer_handle_t> allBufs;
+    hidl_vec<uint64_t> allBufIds;
     allBufs.resize(numBufs);
+    allBufIds.resize(numBufs);
     allBufPtrs.resize(numBufs);
     allFences.resize(numBufs);
     std::vector<int32_t> streamIds(numBufs);
 
     for (size_t i = 0; i < numOutputBufs; i++) {
         allBufs[i] = request.outputBuffers[i].buffer.getNativeHandle();
+        allBufIds[i] = request.outputBuffers[i].bufferId;
         allBufPtrs[i] = &allBufs[i];
         streamIds[i] = request.outputBuffers[i].streamId;
     }
     if (hasInputBuf) {
         allBufs[numOutputBufs] = request.inputBuffer.buffer.getNativeHandle();
+        allBufIds[numOutputBufs] = request.inputBuffer.bufferId;
         allBufPtrs[numOutputBufs] = &allBufs[numOutputBufs];
         streamIds[numOutputBufs] = request.inputBuffer.streamId;
     }
 
     for (size_t i = 0; i < numBufs; i++) {
         buffer_handle_t buf = allBufs[i];
+        uint64_t bufId = allBufIds[i];
         CirculatingBuffers& cbs = mCirculatingBuffers[streamIds[i]];
-        if (cbs.count(buf) == 0) {
+        if (cbs.count(bufId) == 0) {
+            if (buf == nullptr) {
+                ALOGE("%s: bufferId %" PRIu64 " has null buffer handle!", __FUNCTION__, bufId);
+                return Status::ILLEGAL_ARGUMENT;
+            }
             // Register a newly seen buffer
             buffer_handle_t importedBuf = buf;
             sHandleImporter.importBuffer(importedBuf);
@@ -339,10 +336,10 @@
                 ALOGE("%s: output buffer %zu is invalid!", __FUNCTION__, i);
                 return Status::INTERNAL_ERROR;
             } else {
-                cbs[buf] = importedBuf;
+                cbs[bufId] = importedBuf;
             }
         }
-        allBufPtrs[i] = &cbs[buf];
+        allBufPtrs[i] = &cbs[bufId];
     }
 
     // All buffers are imported. Now validate output buffer acquire fences
@@ -509,7 +506,7 @@
     hidl_vec<buffer_handle_t*> allBufPtrs;
     hidl_vec<int> allFences;
     bool hasInputBuf = (request.inputBuffer.streamId != -1 &&
-            request.inputBuffer.buffer.getNativeHandle() != nullptr);
+            request.inputBuffer.bufferId != 0);
     size_t numOutputBufs = request.outputBuffers.size();
     size_t numBufs = numOutputBufs + (hasInputBuf ? 1 : 0);
     status = importRequest(request, allBufPtrs, allFences);
diff --git a/camera/device/3.2/default/CameraDeviceSession.h b/camera/device/3.2/default/CameraDeviceSession.h
index 498617e..ca9d24d 100644
--- a/camera/device/3.2/default/CameraDeviceSession.h
+++ b/camera/device/3.2/default/CameraDeviceSession.h
@@ -100,44 +100,12 @@
     // (streamID, frameNumber) -> inflight buffer cache
     std::map<std::pair<int, uint32_t>, camera3_stream_buffer_t>  mInflightBuffers;
 
-    struct BufferHasher {
-        size_t operator()(const buffer_handle_t& buf) const {
-            if (buf == nullptr)
-                return 0;
-
-            size_t result = 1;
-            result = 31 * result + buf->numFds;
-            result = 31 * result + buf->numInts;
-            int length = buf->numFds + buf->numInts;
-            for (int i = 0; i < length; i++) {
-                result = 31 * result + buf->data[i];
-            }
-            return result;
-        }
-    };
-
-    struct BufferComparator {
-        bool operator()(const buffer_handle_t& buf1, const buffer_handle_t& buf2) const {
-            if (buf1->numFds == buf2->numFds && buf1->numInts == buf2->numInts) {
-                int length = buf1->numFds + buf1->numInts;
-                for (int i = 0; i < length; i++) {
-                    if (buf1->data[i] != buf2->data[i]) {
-                        return false;
-                    }
-                }
-                return true;
-            }
-            return false;
-        }
-    };
-
     // buffers currently ciculating between HAL and camera service
-    // key: buffer_handle_t sent via HIDL interface
+    // key: bufferId sent via HIDL interface
     // value: imported buffer_handle_t
     // Buffer will be imported during process_capture_request and will be freed
     // when the its stream is deleted or camera device session is closed
-    typedef std::unordered_map<buffer_handle_t, buffer_handle_t,
-            BufferHasher, BufferComparator> CirculatingBuffers;
+    typedef std::unordered_map<uint64_t, buffer_handle_t> CirculatingBuffers;
     // Stream ID -> circulating buffers map
     std::map<int, CirculatingBuffers> mCirculatingBuffers;
 
diff --git a/camera/device/3.2/types.hal b/camera/device/3.2/types.hal
index 1e0924c..c07a670 100644
--- a/camera/device/3.2/types.hal
+++ b/camera/device/3.2/types.hal
@@ -405,16 +405,33 @@
     /**
      * The ID of the stream this buffer is associated with. -1 indicates an
      * invalid (empty) StreamBuffer, in which case buffer must also point to
-     * null.
+     * null and bufferId must be 0.
      */
     int32_t streamId;
 
     /**
+     * The unique ID of the buffer within this StreamBuffer. 0 indicates this
+     * StreamBuffer contains no buffer.
+     * For StreamBuffers sent to the HAL in a CaptureRequest, this ID uniquely
+     * identifies a buffer. When a buffer is sent to HAL for the first time,
+     * both bufferId and buffer handle must be filled. HAL must keep track of
+     * the mapping between bufferId and corresponding buffer until the
+     * corresponding stream is removed from stream configuration or until camera
+     * device session is closed. After the first time a buffer is introduced to
+     * HAL, in the future camera service must refer to the same buffer using
+     * only bufferId, and keep the buffer handle null.
+     */
+    uint64_t bufferId;
+
+    /**
      * The graphics buffer handle to the buffer.
      *
-     * For StreamBuffers sent to the HAL in a CaptureRequest, this must be a
+     * For StreamBuffers sent to the HAL in a CaptureRequest, if the bufferId
+     * is not seen by the HAL before, this buffer handle is guaranteed to be a
      * valid handle to a graphics buffer, with dimensions and format matching
-     * that of the stream.
+     * that of the stream. If the bufferId has been sent to the HAL before, this
+     * buffer handle must be null and HAL must look up the actual buffer handle
+     * to use from its own bufferId to buffer handle map.
      *
      * For StreamBuffers returned in a CaptureResult, this must be null, since
      * the handle to the buffer is already known to the client (since the client
diff --git a/camera/provider/2.4/default/Android.bp b/camera/provider/2.4/default/Android.bp
index f28c9cd..ee40ce5 100644
--- a/camera/provider/2.4/default/Android.bp
+++ b/camera/provider/2.4/default/Android.bp
@@ -21,3 +21,29 @@
         "android.hardware.camera.common@1.0-helper"
     ]
 }
+
+cc_binary {
+    name: "android.hardware.camera.provider@2.4-service",
+    relative_install_path: "hw",
+    srcs: ["service.cpp", "CameraProvider.cpp"],
+    compile_multilib: "32",
+    init_rc: ["android.hardware.camera.provider@2.4-service.rc"],
+    shared_libs: [
+        "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",
+        "android.hardware.camera.device@3.2-impl-binderized",
+        "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 9617d8d..1a34aa6 100644
--- a/camera/provider/2.4/default/CameraProvider.cpp
+++ b/camera/provider/2.4/default/CameraProvider.cpp
@@ -17,8 +17,6 @@
 #define LOG_TAG "CamProvider@2.4-impl"
 #include <android/log.h>
 
-#include <regex>
-
 #include "CameraProvider.h"
 #include "CameraDevice.h"
 #include <string.h>
diff --git a/camera/provider/2.4/default/CameraProvider.h b/camera/provider/2.4/default/CameraProvider.h
index 8497ff3..2a43e2f 100644
--- a/camera/provider/2.4/default/CameraProvider.h
+++ b/camera/provider/2.4/default/CameraProvider.h
@@ -17,6 +17,7 @@
 #ifndef ANDROID_HARDWARE_CAMERA_PROVIDER_V2_4_CAMERAPROVIDER_H
 #define ANDROID_HARDWARE_CAMERA_PROVIDER_V2_4_CAMERAPROVIDER_H
 
+#include <regex>
 #include "hardware/camera_common.h"
 #include "utils/Mutex.h"
 #include "utils/SortedVector.h"
diff --git a/camera/provider/2.4/default/android.hardware.camera.provider@2.4-service.rc b/camera/provider/2.4/default/android.hardware.camera.provider@2.4-service.rc
new file mode 100644
index 0000000..31f0810
--- /dev/null
+++ b/camera/provider/2.4/default/android.hardware.camera.provider@2.4-service.rc
@@ -0,0 +1,6 @@
+service camera-provider-2-4 /system/bin/hw/android.hardware.camera.provider@2.4-service
+    class hal
+    user cameraserver
+    group audio camera input drmrpc
+    ioprio rt 4
+    writepid /dev/cpuset/camera-daemon/tasks /dev/stune/top-app/tasks
\ No newline at end of file
diff --git a/camera/provider/2.4/default/service.cpp b/camera/provider/2.4/default/service.cpp
new file mode 100644
index 0000000..2723dee
--- /dev/null
+++ b/camera/provider/2.4/default/service.cpp
@@ -0,0 +1,51 @@
+/*
+ * 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 "android.hardware.camera.provider@2.4-service"
+
+#include <android/hardware/camera/provider/2.4/ICameraProvider.h>
+#include <CameraProvider.h>
+
+#include <hidl/HidlTransportSupport.h>
+#include <utils/StrongPointer.h>
+
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+using android::sp;
+using android::hardware::camera::provider::V2_4::ICameraProvider;
+using android::hardware::camera::provider::V2_4::implementation::HIDL_FETCH_ICameraProvider;
+
+int main()
+{
+    const char instance[] = "legacy/0";
+
+    ALOGI("Camera provider Service is starting.");
+
+    configureRpcThreadpool(1, true /* callerWillJoin */);
+    // TODO (b/34510650): check the passthrough/binderized dev key
+    sp<ICameraProvider> service = HIDL_FETCH_ICameraProvider(instance);
+    if (service == nullptr) {
+        ALOGI("Camera provider getService returned NULL");
+        return -1;
+    }
+
+    LOG_FATAL_IF(service->isRemote(), "Camera provider service is REMOTE!");
+
+    service->registerAsService(instance);
+    joinRpcThreadpool();
+
+    return 0;
+}
\ No newline at end of file
diff --git a/drm/1.0/Android.bp b/drm/1.0/Android.bp
new file mode 100644
index 0000000..d899114
--- /dev/null
+++ b/drm/1.0/Android.bp
@@ -0,0 +1,88 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+    name: "android.hardware.drm@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm@1.0",
+    srcs: [
+        "types.hal",
+        "ICryptoFactory.hal",
+        "ICryptoPlugin.hal",
+        "IDrmFactory.hal",
+        "IDrmPlugin.hal",
+        "IDrmPluginListener.hal",
+    ],
+    out: [
+        "android/hardware/drm/1.0/types.cpp",
+        "android/hardware/drm/1.0/CryptoFactoryAll.cpp",
+        "android/hardware/drm/1.0/CryptoPluginAll.cpp",
+        "android/hardware/drm/1.0/DrmFactoryAll.cpp",
+        "android/hardware/drm/1.0/DrmPluginAll.cpp",
+        "android/hardware/drm/1.0/DrmPluginListenerAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.drm@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.drm@1.0",
+    srcs: [
+        "types.hal",
+        "ICryptoFactory.hal",
+        "ICryptoPlugin.hal",
+        "IDrmFactory.hal",
+        "IDrmPlugin.hal",
+        "IDrmPluginListener.hal",
+    ],
+    out: [
+        "android/hardware/drm/1.0/types.h",
+        "android/hardware/drm/1.0/ICryptoFactory.h",
+        "android/hardware/drm/1.0/IHwCryptoFactory.h",
+        "android/hardware/drm/1.0/BnHwCryptoFactory.h",
+        "android/hardware/drm/1.0/BpHwCryptoFactory.h",
+        "android/hardware/drm/1.0/BsCryptoFactory.h",
+        "android/hardware/drm/1.0/ICryptoPlugin.h",
+        "android/hardware/drm/1.0/IHwCryptoPlugin.h",
+        "android/hardware/drm/1.0/BnHwCryptoPlugin.h",
+        "android/hardware/drm/1.0/BpHwCryptoPlugin.h",
+        "android/hardware/drm/1.0/BsCryptoPlugin.h",
+        "android/hardware/drm/1.0/IDrmFactory.h",
+        "android/hardware/drm/1.0/IHwDrmFactory.h",
+        "android/hardware/drm/1.0/BnHwDrmFactory.h",
+        "android/hardware/drm/1.0/BpHwDrmFactory.h",
+        "android/hardware/drm/1.0/BsDrmFactory.h",
+        "android/hardware/drm/1.0/IDrmPlugin.h",
+        "android/hardware/drm/1.0/IHwDrmPlugin.h",
+        "android/hardware/drm/1.0/BnHwDrmPlugin.h",
+        "android/hardware/drm/1.0/BpHwDrmPlugin.h",
+        "android/hardware/drm/1.0/BsDrmPlugin.h",
+        "android/hardware/drm/1.0/IDrmPluginListener.h",
+        "android/hardware/drm/1.0/IHwDrmPluginListener.h",
+        "android/hardware/drm/1.0/BnHwDrmPluginListener.h",
+        "android/hardware/drm/1.0/BpHwDrmPluginListener.h",
+        "android/hardware/drm/1.0/BsDrmPluginListener.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.drm@1.0",
+    generated_sources: ["android.hardware.drm@1.0_genc++"],
+    generated_headers: ["android.hardware.drm@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.drm@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/drm/crypto/1.0/ICryptoFactory.hal b/drm/1.0/ICryptoFactory.hal
similarity index 97%
rename from drm/crypto/1.0/ICryptoFactory.hal
rename to drm/1.0/ICryptoFactory.hal
index 4b60ccc..aeab9bc 100644
--- a/drm/crypto/1.0/ICryptoFactory.hal
+++ b/drm/1.0/ICryptoFactory.hal
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.drm.crypto@1.0;
+package android.hardware.drm@1.0;
 
 import ICryptoPlugin;
 
diff --git a/drm/crypto/1.0/ICryptoPlugin.hal b/drm/1.0/ICryptoPlugin.hal
similarity index 79%
rename from drm/crypto/1.0/ICryptoPlugin.hal
rename to drm/1.0/ICryptoPlugin.hal
index e892e3c..d66151e 100644
--- a/drm/crypto/1.0/ICryptoPlugin.hal
+++ b/drm/1.0/ICryptoPlugin.hal
@@ -13,9 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.drm.crypto@1.0;
+package android.hardware.drm@1.0;
 
-import android.hardware.drm.crypto@1.0::types;
+import android.hardware.drm@1.0::types;
 
 /**
  * Ref: frameworks/native/include/media/hardware/CryptoAPI.h:CryptoPlugin
@@ -57,6 +57,15 @@
     setMediaDrmSession(vec<uint8_t> sessionId) generates(Status status);
 
     /**
+     * Set a shared memory base for subsequent decrypt operations. The buffer
+     * base is a hidl_memory which maps shared memory in the HAL module.
+     * 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.
+     */
+    setSharedBufferBase(memory base);
+
+    /**
      * Decrypt an array of subsamples from the source memory buffer to the
      * destination memory buffer.
      *
@@ -73,6 +82,8 @@
      * of clear and encrypted bytes to process. This allows the decrypt
      * call to operate on a range of subsamples in a single call
      * @param source the input buffer for the decryption
+     * @param offset the offset of the first byte of encrypted data from
+     * the base of the source buffer
      * @param destination the output buffer for the decryption
      * @return status the status of the call. The status must be OK or one of
      * the following errors: ERROR_DRM_NO_LICENSE if no license keys have been
@@ -83,9 +94,12 @@
      * ERROR_DRM_SESSION_NOT_OPENED if the decrypt session is not opened, or
      * ERROR_DRM_CANNOT_HANDLE in other failure cases.
      * @return bytesWritten the number of bytes output from the decryption
+     * @return detailedError if the error is a vendor-specific error, the
+     * vendor's crypto HAL may provide a detailed error string to help
+     * describe the error.
      */
     decrypt(bool secure, uint8_t[16] keyId, uint8_t[16] iv, Mode mode,
         Pattern pattern, vec<SubSample> subSamples,
-            memory source, DestinationBuffer destination)
-        generates(Status status, uint32_t bytesWritten);
+            SharedBuffer source, uint64_t offset, DestinationBuffer destination)
+        generates(Status status, uint32_t bytesWritten, string detailedError);
 };
diff --git a/drm/drm/1.0/IDrmFactory.hal b/drm/1.0/IDrmFactory.hal
similarity index 98%
rename from drm/drm/1.0/IDrmFactory.hal
rename to drm/1.0/IDrmFactory.hal
index 1ef1d27..de53929 100644
--- a/drm/drm/1.0/IDrmFactory.hal
+++ b/drm/1.0/IDrmFactory.hal
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.drm.drm@1.0;
+package android.hardware.drm@1.0;
 
 import IDrmPlugin;
 
diff --git a/drm/drm/1.0/IDrmPlugin.hal b/drm/1.0/IDrmPlugin.hal
similarity index 99%
rename from drm/drm/1.0/IDrmPlugin.hal
rename to drm/1.0/IDrmPlugin.hal
index 881bf80..5bae22d 100644
--- a/drm/drm/1.0/IDrmPlugin.hal
+++ b/drm/1.0/IDrmPlugin.hal
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.hardware.drm.drm@1.0;
+package android.hardware.drm@1.0;
 
 import IDrmPluginListener;
 
diff --git a/drm/drm/1.0/IDrmPluginListener.hal b/drm/1.0/IDrmPluginListener.hal
similarity index 96%
rename from drm/drm/1.0/IDrmPluginListener.hal
rename to drm/1.0/IDrmPluginListener.hal
index 92010a1..15ce008 100644
--- a/drm/drm/1.0/IDrmPluginListener.hal
+++ b/drm/1.0/IDrmPluginListener.hal
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package android.hardware.drm.drm@1.0;
+package android.hardware.drm@1.0;
 
-import android.hardware.drm.drm@1.0::types;
+import android.hardware.drm@1.0::types;
 
 /**
  * Ref: frameworks/native/include/media/drm/DrmAPI.h:DrmPluginListener
diff --git a/drm/1.0/default/Android.mk b/drm/1.0/default/Android.mk
new file mode 100644
index 0000000..ac5b90a
--- /dev/null
+++ b/drm/1.0/default/Android.mk
@@ -0,0 +1,79 @@
+#
+# 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.
+
+
+############# Build legacy drm service ############
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.drm@1.0-service
+LOCAL_INIT_RC := android.hardware.drm@1.0-service.rc
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_SRC_FILES := \
+  service.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+  android.hardware.drm@1.0 \
+  android.hidl.memory@1.0 \
+  libhidlbase \
+  libhidltransport \
+  libhardware \
+  libhwbinder \
+  liblog \
+  libutils \
+
+LOCAL_C_INCLUDES := \
+  hardware/interfaces/drm
+
+# TODO: The legacy DRM plugins only support 32-bit. They need
+# to be migrated to 64-bit (b/18948909)
+LOCAL_32_BIT_ONLY := true
+
+include $(BUILD_EXECUTABLE)
+
+############# Build legacy drm impl library ############
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.drm@1.0-impl
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_SRC_FILES := \
+    DrmFactory.cpp \
+    DrmPlugin.cpp \
+    CryptoFactory.cpp \
+    CryptoPlugin.cpp \
+    TypeConvert.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+    android.hardware.drm@1.0 \
+    android.hidl.memory@1.0 \
+    libhidlbase \
+    libhidlmemory \
+    libhidltransport \
+    libhwbinder \
+    liblog \
+    libmediadrm \
+    libstagefright_foundation \
+    libutils \
+
+LOCAL_C_INCLUDES := \
+    frameworks/native/include \
+    frameworks/av/include
+
+# TODO: The legacy DRM plugins only support 32-bit. They need
+# to be migrated to 64-bit (b/18948909)
+LOCAL_32_BIT_ONLY := true
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/drm/crypto/1.0/default/CryptoFactory.cpp b/drm/1.0/default/CryptoFactory.cpp
similarity index 89%
rename from drm/crypto/1.0/default/CryptoFactory.cpp
rename to drm/1.0/default/CryptoFactory.cpp
index 187d564..02084e7 100644
--- a/drm/crypto/1.0/default/CryptoFactory.cpp
+++ b/drm/1.0/default/CryptoFactory.cpp
@@ -22,14 +22,14 @@
 namespace android {
 namespace hardware {
 namespace drm {
-namespace crypto {
 namespace V1_0 {
 namespace implementation {
 
     CryptoFactory::CryptoFactory() :
-        loader("/vendor/lib/mediadrm", "createCryptoFactory") {}
+        loader("/vendor/lib/mediadrm", "createCryptoFactory") {
+    }
 
-    // Methods from ::android::hardware::drm::crypto::V1_0::ICryptoFactory follow.
+    // Methods from ::android::hardware::drm::V1_0::ICryptoFactory follow.
     Return<bool> CryptoFactory::isCryptoSchemeSupported(
             const hidl_array<uint8_t, 16>& uuid) {
         for (size_t i = 0; i < loader.factoryCount(); i++) {
@@ -42,7 +42,6 @@
 
     Return<void> CryptoFactory::createPlugin(const hidl_array<uint8_t, 16>& uuid,
             const hidl_vec<uint8_t>& initData, createPlugin_cb _hidl_cb) {
-
         for (size_t i = 0; i < loader.factoryCount(); i++) {
             if (loader.getFactory(i)->isCryptoSchemeSupported(uuid.data())) {
                 android::CryptoPlugin *legacyPlugin = NULL;
@@ -62,13 +61,12 @@
         return Void();
     }
 
-    ICryptoFactory* HIDL_FETCH_ICryptoFactory(const char /* *name */) {
+    ICryptoFactory* HIDL_FETCH_ICryptoFactory(const char* /* name */) {
         return new CryptoFactory();
     }
 
 }  // namespace implementation
 }  // namespace V1_0
-}  // namespace crypto
 }  // namespace drm
 }  // namespace hardware
 }  // namespace android
diff --git a/drm/crypto/1.0/default/CryptoFactory.h b/drm/1.0/default/CryptoFactory.h
similarity index 78%
rename from drm/crypto/1.0/default/CryptoFactory.h
rename to drm/1.0/default/CryptoFactory.h
index 0855996..412b557 100644
--- a/drm/crypto/1.0/default/CryptoFactory.h
+++ b/drm/1.0/default/CryptoFactory.h
@@ -13,10 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_DRM_CRYPTO_V1_0__CRYPTOFACTORY_H
-#define ANDROID_HARDWARE_DRM_CRYPTO_V1_0__CRYPTOFACTORY_H
+#ifndef ANDROID_HARDWARE_DRM_V1_0__CRYPTOFACTORY_H
+#define ANDROID_HARDWARE_DRM_V1_0__CRYPTOFACTORY_H
 
-#include <android/hardware/drm/crypto/1.0/ICryptoFactory.h>
+#include <android/hardware/drm/1.0/ICryptoFactory.h>
 #include <hidl/Status.h>
 #include <media/hardware/CryptoAPI.h>
 #include <media/PluginLoader.h>
@@ -25,12 +25,11 @@
 namespace android {
 namespace hardware {
 namespace drm {
-namespace crypto {
 namespace V1_0 {
 namespace implementation {
 
-using ::android::hardware::drm::crypto::V1_0::ICryptoFactory;
-using ::android::hardware::drm::crypto::V1_0::ICryptoPlugin;
+using ::android::hardware::drm::V1_0::ICryptoFactory;
+using ::android::hardware::drm::V1_0::ICryptoPlugin;
 using ::android::hardware::hidl_array;
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
@@ -42,7 +41,7 @@
     CryptoFactory();
     virtual ~CryptoFactory() {}
 
-    // Methods from ::android::hardware::drm::crypto::V1_0::ICryptoFactory follow.
+    // Methods from ::android::hardware::drm::V1_0::ICryptoFactory follow.
 
     Return<bool> isCryptoSchemeSupported(const hidl_array<uint8_t, 16>& uuid)
             override;
@@ -62,9 +61,8 @@
 
 }  // namespace implementation
 }  // namespace V1_0
-}  // namespace crypto
 }  // namespace drm
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_DRM_CRYPTO_V1_0__CRYPTOFACTORY_H
+#endif  // ANDROID_HARDWARE_DRM_V1_0__CRYPTOFACTORY_H
diff --git a/drm/crypto/1.0/default/CryptoPlugin.cpp b/drm/1.0/default/CryptoPlugin.cpp
similarity index 73%
rename from drm/crypto/1.0/default/CryptoPlugin.cpp
rename to drm/1.0/default/CryptoPlugin.cpp
index 7921852..073f030 100644
--- a/drm/crypto/1.0/default/CryptoPlugin.cpp
+++ b/drm/1.0/default/CryptoPlugin.cpp
@@ -17,22 +17,21 @@
 #include "CryptoPlugin.h"
 #include "TypeConvert.h"
 
-#include <media/stagefright/foundation/AString.h>
-
-#include <hidlmemory/mapping.h>
 #include <android/hidl/memory/1.0/IMemory.h>
+#include <hidlmemory/mapping.h>
+#include <media/stagefright/foundation/AString.h>
+#include <utils/Log.h>
 
+using android::hardware::hidl_memory;
 using android::hidl::memory::V1_0::IMemory;
 
-
 namespace android {
 namespace hardware {
 namespace drm {
-namespace crypto {
 namespace V1_0 {
 namespace implementation {
 
-    // Methods from ::android::hardware::drm::crypto::V1_0::ICryptoPlugin follow
+    // Methods from ::android::hardware::drm::V1_0::ICryptoPlugin follow
     Return<bool> CryptoPlugin::requiresSecureDecoderComponent(
             const hidl_string& mime) {
         return mLegacyPlugin->requiresSecureDecoderComponent(mime);
@@ -49,11 +48,17 @@
         return toStatus(mLegacyPlugin->setMediaDrmSession(toVector(sessionId)));
     }
 
+    Return<void> CryptoPlugin::setSharedBufferBase(const hidl_memory& base) {
+        mSharedBufferBase = mapMemory(base);
+        return Void();
+    }
+
     Return<void> CryptoPlugin::decrypt(bool secure,
             const hidl_array<uint8_t, 16>& keyId,
             const hidl_array<uint8_t, 16>& iv, Mode mode,
             const Pattern& pattern, const hidl_vec<SubSample>& subSamples,
-            const hidl_memory &source, const DestinationBuffer& destination,
+            const SharedBuffer& source, uint64_t offset,
+            const DestinationBuffer& destination,
             decrypt_cb _hidl_cb) {
 
         android::CryptoPlugin::Mode legacyMode;
@@ -87,25 +92,32 @@
 
         AString detailMessage;
 
-        void *destPtr = NULL;
-        sp<IMemory> sharedMemory;
+        if (source.offset + offset + source.size > mSharedBufferBase->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()));
+        void *srcPtr = static_cast<void *>(base + source.offset + offset);
+
+        void *destPtr = NULL;
         if (destination.type == BufferType::SHARED_MEMORY) {
-            sharedMemory = mapMemory(source);
-            destPtr = sharedMemory->getPointer();
-            sharedMemory->update();
+            const SharedBuffer& destBuffer = destination.nonsecureMemory;
+            if (destBuffer.offset + destBuffer.size > mSharedBufferBase->getSize()) {
+                _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, 0, "invalid buffer size");
+                return Void();
+            }
+            destPtr = static_cast<void *>(base + destination.nonsecureMemory.offset);
         } else if (destination.type == BufferType::NATIVE_HANDLE) {
             native_handle_t *handle = const_cast<native_handle_t *>(
                     destination.secureMemory.getNativeHandle());
             destPtr = static_cast<void *>(handle);
         }
         ssize_t result = mLegacyPlugin->decrypt(secure, keyId.data(), iv.data(),
-                legacyMode, legacyPattern, sharedMemory->getPointer(),
-                legacySubSamples, subSamples.size(), destPtr, &detailMessage);
+                legacyMode, legacyPattern, srcPtr, legacySubSamples,
+                subSamples.size(), destPtr, &detailMessage);
 
-        if (destination.type == BufferType::SHARED_MEMORY) {
-            sharedMemory->commit();
-        }
         delete[] legacySubSamples;
 
         uint32_t status;
@@ -119,13 +131,12 @@
             bytesWritten = 0;
         }
 
-        _hidl_cb(toStatus(status), bytesWritten);
+        _hidl_cb(toStatus(status), bytesWritten, detailMessage.c_str());
         return Void();
     }
 
 } // namespace implementation
 }  // namespace V1_0
-}  // namespace crypto
 }  // namespace drm
 }  // namespace hardware
 }  // namespace android
diff --git a/drm/crypto/1.0/default/CryptoPlugin.h b/drm/1.0/default/CryptoPlugin.h
similarity index 67%
rename from drm/crypto/1.0/default/CryptoPlugin.h
rename to drm/1.0/default/CryptoPlugin.h
index b17dade..f805f09 100644
--- a/drm/crypto/1.0/default/CryptoPlugin.h
+++ b/drm/1.0/default/CryptoPlugin.h
@@ -14,37 +14,39 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_DRM_CRYPTO_V1_0__CRYPTOPLUGIN_H
-#define ANDROID_HARDWARE_DRM_CRYPTO_V1_0__CRYPTOPLUGIN_H
+#ifndef ANDROID_HARDWARE_DRM_V1_0__CRYPTOPLUGIN_H
+#define ANDROID_HARDWARE_DRM_V1_0__CRYPTOPLUGIN_H
 
-#include <media/hardware/CryptoAPI.h>
-#include <android/hardware/drm/crypto/1.0/ICryptoPlugin.h>
+#include <android/hidl/memory/1.0/IMemory.h>
+#include <android/hardware/drm/1.0/ICryptoPlugin.h>
 #include <hidl/Status.h>
+#include <media/hardware/CryptoAPI.h>
 
 namespace android {
 namespace hardware {
 namespace drm {
-namespace crypto {
 namespace V1_0 {
 namespace implementation {
 
-using ::android::hardware::drm::crypto::V1_0::DestinationBuffer;
-using ::android::hardware::drm::crypto::V1_0::ICryptoPlugin;
-using ::android::hardware::drm::crypto::V1_0::Mode;
-using ::android::hardware::drm::crypto::V1_0::Pattern;
-using ::android::hardware::drm::crypto::V1_0::SubSample;
+using ::android::hardware::drm::V1_0::DestinationBuffer;
+using ::android::hardware::drm::V1_0::ICryptoPlugin;
+using ::android::hardware::drm::V1_0::Mode;
+using ::android::hardware::drm::V1_0::Pattern;
+using ::android::hardware::drm::V1_0::SubSample;
 using ::android::hardware::hidl_array;
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
+using ::android::hidl::memory::V1_0::IMemory;
 using ::android::sp;
 
 struct CryptoPlugin : public ICryptoPlugin {
     CryptoPlugin(android::CryptoPlugin *plugin) : mLegacyPlugin(plugin) {}
+
     ~CryptoPlugin() {delete mLegacyPlugin;}
 
-    // Methods from ::android::hardware::drm::crypto::V1_0::ICryptoPlugin
+    // Methods from ::android::hardware::drm::V1_0::ICryptoPlugin
     // follow.
 
     Return<bool> requiresSecureDecoderComponent(const hidl_string& mime)
@@ -55,13 +57,18 @@
     Return<Status> setMediaDrmSession(const hidl_vec<uint8_t>& sessionId)
             override;
 
+    Return<void> setSharedBufferBase(const ::android::hardware::hidl_memory& base)
+            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,
-            const hidl_vec<SubSample>& subSamples, const hidl_memory& source,
-            const DestinationBuffer& destination, decrypt_cb _hidl_cb) override;
+            const hidl_vec<SubSample>& subSamples, const SharedBuffer& source,
+            uint64_t offset, const DestinationBuffer& destination,
+            decrypt_cb _hidl_cb) override;
 
 private:
     android::CryptoPlugin *mLegacyPlugin;
+    sp<IMemory> mSharedBufferBase;
 
     CryptoPlugin() = delete;
     CryptoPlugin(const CryptoPlugin &) = delete;
@@ -70,9 +77,8 @@
 
 }  // namespace implementation
 }  // namespace V1_0
-}  // namespace crypto
 }  // namespace drm
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_DRM_CRYPTO_V1_0__CRYPTOPLUGIN_H
+#endif  // ANDROID_HARDWARE_DRM_V1_0__CRYPTOPLUGIN_H
diff --git a/drm/drm/1.0/default/DrmFactory.cpp b/drm/1.0/default/DrmFactory.cpp
similarity index 93%
rename from drm/drm/1.0/default/DrmFactory.cpp
rename to drm/1.0/default/DrmFactory.cpp
index f2d4a5a..cba2c99 100644
--- a/drm/drm/1.0/default/DrmFactory.cpp
+++ b/drm/1.0/default/DrmFactory.cpp
@@ -22,14 +22,14 @@
 namespace android {
 namespace hardware {
 namespace drm {
-namespace drm {
 namespace V1_0 {
 namespace implementation {
 
     DrmFactory::DrmFactory() :
-        loader("/vendor/lib/mediadrm", "createDrmFactory") {}
+        loader("/vendor/lib/mediadrm", "createDrmFactory") {
+    }
 
-    // Methods from ::android::hardware::drm::drm::V1_0::IDrmFactory follow.
+    // Methods from ::android::hardware::drm::V1_0::IDrmFactory follow.
     Return<bool> DrmFactory::isCryptoSchemeSupported (
             const hidl_array<uint8_t, 16>& uuid) {
         for (size_t i = 0; i < loader.factoryCount(); i++) {
@@ -79,6 +79,5 @@
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace drm
-}  // namespace drm
 }  // namespace hardware
 }  // namespace android
diff --git a/drm/drm/1.0/default/DrmFactory.h b/drm/1.0/default/DrmFactory.h
similarity index 80%
rename from drm/drm/1.0/default/DrmFactory.h
rename to drm/1.0/default/DrmFactory.h
index 2b88d00..78b7f6e 100644
--- a/drm/drm/1.0/default/DrmFactory.h
+++ b/drm/1.0/default/DrmFactory.h
@@ -13,10 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_DRM_DRM_V1_0__DRMFACTORY_H
-#define ANDROID_HARDWARE_DRM_DRM_V1_0__DRMFACTORY_H
+#ifndef ANDROID_HARDWARE_DRM_V1_0__DRMFACTORY_H
+#define ANDROID_HARDWARE_DRM_V1_0__DRMFACTORY_H
 
-#include <android/hardware/drm/drm/1.0/IDrmFactory.h>
+#include <android/hardware/drm/1.0/IDrmFactory.h>
 #include <hidl/Status.h>
 #include <media/drm/DrmAPI.h>
 #include <media/PluginLoader.h>
@@ -25,12 +25,11 @@
 namespace android {
 namespace hardware {
 namespace drm {
-namespace drm {
 namespace V1_0 {
 namespace implementation {
 
-using ::android::hardware::drm::drm::V1_0::IDrmFactory;
-using ::android::hardware::drm::drm::V1_0::IDrmPlugin;
+using ::android::hardware::drm::V1_0::IDrmFactory;
+using ::android::hardware::drm::V1_0::IDrmPlugin;
 using ::android::hardware::hidl_array;
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
@@ -42,7 +41,7 @@
     DrmFactory();
     virtual ~DrmFactory() {}
 
-    // Methods from ::android::hardware::drm::drm::V1_0::IDrmFactory follow.
+    // Methods from ::android::hardware::drm::V1_0::IDrmFactory follow.
 
     Return<bool> isCryptoSchemeSupported(const hidl_array<uint8_t, 16>& uuid)
             override;
@@ -65,8 +64,7 @@
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace drm
-}  // namespace drm
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_DRM_DRM_V1_0__DRMFACTORY_H
+#endif  // ANDROID_HARDWARE_DRM_V1_0__DRMFACTORY_H
diff --git a/drm/drm/1.0/default/DrmPlugin.cpp b/drm/1.0/default/DrmPlugin.cpp
similarity index 99%
rename from drm/drm/1.0/default/DrmPlugin.cpp
rename to drm/1.0/default/DrmPlugin.cpp
index 5c8f426..9204fc5 100644
--- a/drm/drm/1.0/default/DrmPlugin.cpp
+++ b/drm/1.0/default/DrmPlugin.cpp
@@ -23,14 +23,12 @@
 namespace android {
 namespace hardware {
 namespace drm {
-namespace drm {
 namespace V1_0 {
 namespace implementation {
 
-    // Methods from ::android::hardware::drm::drm::V1_0::IDrmPlugin follow.
+    // Methods from ::android::hardware::drm::V1_0::IDrmPlugin follow.
 
     Return<void> DrmPlugin::openSession(openSession_cb _hidl_cb) {
-
         Vector<uint8_t> legacySessionId;
         status_t status = mLegacyPlugin->openSession(legacySessionId);
         _hidl_cb(toStatus(status), toHidlVec(legacySessionId));
@@ -423,6 +421,5 @@
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace drm
-}  // namespace drm
 }  // namespace hardware
 }  // namespace android
diff --git a/drm/drm/1.0/default/DrmPlugin.h b/drm/1.0/default/DrmPlugin.h
similarity index 87%
rename from drm/drm/1.0/default/DrmPlugin.h
rename to drm/1.0/default/DrmPlugin.h
index 2bf3b5e..dce6c0c 100644
--- a/drm/drm/1.0/default/DrmPlugin.h
+++ b/drm/1.0/default/DrmPlugin.h
@@ -14,30 +14,28 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_DRM_DRM_V1_0__DRMPLUGIN_H
-#define ANDROID_HARDWARE_DRM_DRM_V1_0__DRMPLUGIN_H
+#ifndef ANDROID_HARDWARE_DRM_V1_0__DRMPLUGIN_H
+#define ANDROID_HARDWARE_DRM_V1_0__DRMPLUGIN_H
 
-#include <media/drm/DrmAPI.h>
-#include <android/hardware/drm/drm/1.0/IDrmPlugin.h>
-#include <android/hardware/drm/drm/1.0/IDrmPluginListener.h>
-#include <hidl/MQDescriptor.h>
+#include <android/hardware/drm/1.0/IDrmPlugin.h>
+#include <android/hardware/drm/1.0/IDrmPluginListener.h>
 #include <hidl/Status.h>
+#include <media/drm/DrmAPI.h>
 
 namespace android {
 namespace hardware {
 namespace drm {
-namespace drm {
 namespace V1_0 {
 namespace implementation {
 
-using ::android::hardware::drm::drm::V1_0::EventType;
-using ::android::hardware::drm::drm::V1_0::IDrmPlugin;
-using ::android::hardware::drm::drm::V1_0::IDrmPluginListener;
-using ::android::hardware::drm::drm::V1_0::KeyRequestType;
-using ::android::hardware::drm::drm::V1_0::KeyStatus;
-using ::android::hardware::drm::drm::V1_0::KeyType;
-using ::android::hardware::drm::drm::V1_0::KeyValue;
-using ::android::hardware::drm::drm::V1_0::SecureStop;
+using ::android::hardware::drm::V1_0::EventType;
+using ::android::hardware::drm::V1_0::IDrmPlugin;
+using ::android::hardware::drm::V1_0::IDrmPluginListener;
+using ::android::hardware::drm::V1_0::KeyRequestType;
+using ::android::hardware::drm::V1_0::KeyStatus;
+using ::android::hardware::drm::V1_0::KeyType;
+using ::android::hardware::drm::V1_0::KeyValue;
+using ::android::hardware::drm::V1_0::SecureStop;
 using ::android::hardware::hidl_array;
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
@@ -50,7 +48,7 @@
     DrmPlugin(android::DrmPlugin *plugin) : mLegacyPlugin(plugin) {}
     ~DrmPlugin() {delete mLegacyPlugin;}
 
-    // Methods from ::android::hardware::drm::drm::V1_0::IDrmPlugin follow.
+    // Methods from ::android::hardware::drm::V1_0::IDrmPlugin follow.
 
     Return<void> openSession(openSession_cb _hidl_cb) override;
 
@@ -165,8 +163,7 @@
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace drm
-}  // namespace drm
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_DRM_DRM_V1_0__DRMPLUGIN_H
+#endif  // ANDROID_HARDWARE_DRM_V1_0__DRMPLUGIN_H
diff --git a/drm/drm/1.0/default/TypeConvert.cpp b/drm/1.0/default/TypeConvert.cpp
similarity index 93%
rename from drm/drm/1.0/default/TypeConvert.cpp
rename to drm/1.0/default/TypeConvert.cpp
index 4bed284..52cc503 100644
--- a/drm/drm/1.0/default/TypeConvert.cpp
+++ b/drm/1.0/default/TypeConvert.cpp
@@ -19,7 +19,6 @@
 namespace android {
 namespace hardware {
 namespace drm {
-namespace drm {
 namespace V1_0 {
 namespace implementation {
 
@@ -53,6 +52,9 @@
     case android::ERROR_DRM_RESOURCE_BUSY:
         status = Status::ERROR_DRM_RESOURCE_BUSY;
         break;
+    case android::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION:
+        status = Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION;
+        break;
     case android::ERROR_DRM_DEVICE_REVOKED:
         status = Status::ERROR_DRM_DEVICE_REVOKED;
         break;
@@ -68,6 +70,5 @@
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace drm
-}  // namespace drm
 }  // namespace hardware
 }  // namespace android
diff --git a/drm/crypto/1.0/default/TypeConvert.h b/drm/1.0/default/TypeConvert.h
similarity index 86%
rename from drm/crypto/1.0/default/TypeConvert.h
rename to drm/1.0/default/TypeConvert.h
index 1655bab..107fda5 100644
--- a/drm/crypto/1.0/default/TypeConvert.h
+++ b/drm/1.0/default/TypeConvert.h
@@ -14,20 +14,16 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_DRM_CRYPTO_V1_0_TYPECONVERT
-#define ANDROID_HARDWARE_DRM_CRYPTO_V1_0_TYPECONVERT
+#ifndef ANDROID_HARDWARE_DRM_V1_0_TYPECONVERT
+#define ANDROID_HARDWARE_DRM_V1_0_TYPECONVERT
 
-#include <utils/Vector.h>
+#include <android/hardware/drm/1.0/types.h>
 #include <media/stagefright/MediaErrors.h>
-#include <media/hardware/CryptoAPI.h>
-
-#include <hidl/MQDescriptor.h>
-#include <android/hardware/drm/crypto/1.0/types.h>
+#include <utils/Vector.h>
 
 namespace android {
 namespace hardware {
 namespace drm {
-namespace crypto {
 namespace V1_0 {
 namespace implementation {
 
@@ -75,9 +71,8 @@
 
 }  // namespace implementation
 }  // namespace V1_0
-}  // namespace crypto
 }  // namespace drm
 }  // namespace hardware
 }  // namespace android
 
-#endif // ANDROID_HARDWARE_DRM_CRYPTO_V1_0_TYPECONVERT
+#endif // ANDROID_HARDWARE_DRM_V1_0_TYPECONVERT
diff --git a/drm/1.0/default/android.hardware.drm@1.0-service.rc b/drm/1.0/default/android.hardware.drm@1.0-service.rc
new file mode 100644
index 0000000..281dc4b
--- /dev/null
+++ b/drm/1.0/default/android.hardware.drm@1.0-service.rc
@@ -0,0 +1,6 @@
+service drm-hal-1-0 /system/bin/hw/android.hardware.drm@1.0-service
+    class hal
+    user media
+    group mediadrm drmrpc
+    ioprio rt 4
+    writepid /dev/cpuset/foreground/tasks
diff --git a/drm/1.0/default/service.cpp b/drm/1.0/default/service.cpp
new file mode 100644
index 0000000..fba56ec
--- /dev/null
+++ b/drm/1.0/default/service.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright 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 "android.hardware.drm@1.0-service"
+
+#include <1.0/default/CryptoFactory.h>
+#include <1.0/default/DrmFactory.h>
+
+#include <hidl/HidlTransportSupport.h>
+#include <hidl/LegacySupport.h>
+
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+using android::hardware::registerPassthroughServiceImplementation;
+
+using android::hardware::drm::V1_0::ICryptoFactory;
+using android::hardware::drm::V1_0::IDrmFactory;
+
+int main() {
+    ALOGD("android.hardware.drm@1.0-service starting...");
+    configureRpcThreadpool(8, true /* callerWillJoin */);
+    registerPassthroughServiceImplementation<IDrmFactory>("drm");
+    registerPassthroughServiceImplementation<ICryptoFactory>("crypto");
+    joinRpcThreadpool();
+}
diff --git a/drm/drm/1.0/types.hal b/drm/1.0/types.hal
similarity index 67%
rename from drm/drm/1.0/types.hal
rename to drm/1.0/types.hal
index e099418..33bbf9a 100644
--- a/drm/drm/1.0/types.hal
+++ b/drm/1.0/types.hal
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.hardware.drm.drm@1.0;
+package android.hardware.drm@1.0;
 
 enum Status : uint32_t {
     /**
@@ -54,7 +54,7 @@
     ERROR_DRM_INVALID_STATE,
 
     /**
-     * The Drm plugin must return BAD_VALUE whenever an illegal parameter is
+     * The DRM plugin must return BAD_VALUE whenever an illegal parameter is
      * passed to one of the interface functions.
      */
     BAD_VALUE,
@@ -74,7 +74,15 @@
     ERROR_DRM_RESOURCE_BUSY,
 
     /**
-     * The Drm Plugin must return ERROR_DRM_DEVICE_REVOKED from
+     * The DRM Plugin must return ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION
+     * when the output protection level enabled on the device is not
+     * sufficient to meet the requirements in the license policy.  HDCP is an
+     * example of a form of output protection.
+     */
+    ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION,
+
+    /**
+     * The DRM Plugin must return ERROR_DRM_DEVICE_REVOKED from
      * provideProvisionResponse and provideKeyResponse if the response indicates
      * that the device has been revoked. Device revocation means that the device
      * is no longer permitted to play content.
@@ -237,3 +245,92 @@
 };
 
 typedef vec<uint8_t> SecureStopId;
+
+
+/**
+ * Enumerate the supported crypto modes
+ */
+enum Mode : uint32_t {
+    UNENCRYPTED = 0, // Samples are unencrypted
+    AES_CTR     = 1, // Samples are encrypted with AES CTR mode
+    AES_CBC_CTS = 2, // Samples are encrypted with AES CBC CTS mode
+    AES_CBC     = 3, // Samples are encrypted with AES CBC mode
+};
+
+/**
+ * A subsample consists of some number of bytes of clear (unencrypted)
+ * data followed by a number of bytes of encrypted data.
+ */
+struct SubSample {
+    uint32_t numBytesOfClearData;
+    uint32_t numBytesOfEncryptedData;
+};
+
+/**
+ * A crypto Pattern is a repeating sequence of encrypted and clear blocks
+ * occuring within the bytes indicated by mNumBytesOfEncryptedDatad bytes
+ * of a subsample. Patterns are used to reduce the CPU overhead of
+ * decrypting samples. As an example, HLS uses 1:9 patterns where every
+ * 10th block is encrypted.
+ */
+struct Pattern {
+    /**
+     * The number of blocks to be encrypted in the pattern. If zero,
+     * pattern encryption is inoperative.
+     */
+    uint32_t encryptBlocks;
+
+    /**
+     * The number of blocks to be skipped (left clear) in the pattern. If
+     * zero, pattern encryption is inoperative.
+     */
+    uint32_t skipBlocks;
+};
+
+enum BufferType : uint32_t {
+    SHARED_MEMORY = 0,
+    NATIVE_HANDLE = 1,
+};
+
+/**
+ * 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().
+ */
+struct SharedBuffer {
+    /**
+     * The offset from the shared memory base
+     */
+    uint64_t offset;
+
+    /**
+     * The size of the shared buffer in bytes
+     */
+    uint64_t size;
+};
+
+
+/**
+ * A decrypt destination buffer can be either normal user-space shared
+ * memory for the non-secure decrypt case, or it can be a secure buffer
+ * which is referenced by a native-handle. The native handle is allocated
+ * by the vendor's buffer allocator.
+ */
+struct DestinationBuffer {
+    /**
+     * The type of the buffer
+     */
+    BufferType type;
+
+    /**
+     * If type == SHARED_MEMORY, the decrypted data must be written
+     * to user-space non-secure shared memory.
+     */
+    SharedBuffer nonsecureMemory;
+
+    /**
+     * If type == NATIVE_HANDLE, the decrypted data must be written
+     * to secure memory referenced by the vendor's buffer allocator.
+     */
+    handle secureMemory;
+};
diff --git a/drm/Android.bp b/drm/Android.bp
index 412e162..bbb3e4b 100644
--- a/drm/Android.bp
+++ b/drm/Android.bp
@@ -1,5 +1,4 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
-    "crypto/1.0",
-    "drm/1.0",
+    "1.0",
 ]
diff --git a/drm/crypto/1.0/Android.bp b/drm/crypto/1.0/Android.bp
deleted file mode 100644
index 73eded1..0000000
--- a/drm/crypto/1.0/Android.bp
+++ /dev/null
@@ -1,64 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-
-genrule {
-    name: "android.hardware.drm.crypto@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm.crypto@1.0",
-    srcs: [
-        "types.hal",
-        "ICryptoFactory.hal",
-        "ICryptoPlugin.hal",
-    ],
-    out: [
-        "android/hardware/drm/crypto/1.0/types.cpp",
-        "android/hardware/drm/crypto/1.0/CryptoFactoryAll.cpp",
-        "android/hardware/drm/crypto/1.0/CryptoPluginAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.drm.crypto@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.drm.crypto@1.0",
-    srcs: [
-        "types.hal",
-        "ICryptoFactory.hal",
-        "ICryptoPlugin.hal",
-    ],
-    out: [
-        "android/hardware/drm/crypto/1.0/types.h",
-        "android/hardware/drm/crypto/1.0/ICryptoFactory.h",
-        "android/hardware/drm/crypto/1.0/IHwCryptoFactory.h",
-        "android/hardware/drm/crypto/1.0/BnHwCryptoFactory.h",
-        "android/hardware/drm/crypto/1.0/BpHwCryptoFactory.h",
-        "android/hardware/drm/crypto/1.0/BsCryptoFactory.h",
-        "android/hardware/drm/crypto/1.0/ICryptoPlugin.h",
-        "android/hardware/drm/crypto/1.0/IHwCryptoPlugin.h",
-        "android/hardware/drm/crypto/1.0/BnHwCryptoPlugin.h",
-        "android/hardware/drm/crypto/1.0/BpHwCryptoPlugin.h",
-        "android/hardware/drm/crypto/1.0/BsCryptoPlugin.h",
-    ],
-}
-
-cc_library_shared {
-    name: "android.hardware.drm.crypto@1.0",
-    generated_sources: ["android.hardware.drm.crypto@1.0_genc++"],
-    generated_headers: ["android.hardware.drm.crypto@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.drm.crypto@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/drm/crypto/1.0/default/Android.mk b/drm/crypto/1.0/default/Android.mk
deleted file mode 100644
index 83794ac..0000000
--- a/drm/crypto/1.0/default/Android.mk
+++ /dev/null
@@ -1,41 +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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.drm.crypto@1.0-impl
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_SRC_FILES := \
-    CryptoFactory.cpp \
-    CryptoPlugin.cpp \
-    TypeConvert.cpp \
-
-LOCAL_SHARED_LIBRARIES := \
-    libhidlbase \
-    libhidltransport \
-    libhwbinder \
-    libhidlmemory \
-    libutils \
-    liblog \
-    libmediadrm \
-    libstagefright_foundation \
-    android.hardware.drm.crypto@1.0 \
-    android.hidl.memory@1.0
-
-LOCAL_C_INCLUDES := \
-    frameworks/native/include \
-    frameworks/av/include
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/drm/crypto/1.0/default/TypeConvert.cpp b/drm/crypto/1.0/default/TypeConvert.cpp
deleted file mode 100644
index ed95d15..0000000
--- a/drm/crypto/1.0/default/TypeConvert.cpp
+++ /dev/null
@@ -1,65 +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.
- */
-
-#include "TypeConvert.h"
-
-namespace android {
-namespace hardware {
-namespace drm {
-namespace crypto {
-namespace V1_0 {
-namespace implementation {
-
-Status toStatus(status_t legacyStatus) {
-    Status status;
-    switch(legacyStatus) {
-    case android::OK:
-        status = Status::OK;
-        break;
-    case android::ERROR_DRM_NO_LICENSE:
-        status = Status::ERROR_DRM_NO_LICENSE;
-        break;
-    case android::ERROR_DRM_LICENSE_EXPIRED:
-        status = Status::ERROR_DRM_LICENSE_EXPIRED;
-        break;
-    case android::ERROR_DRM_RESOURCE_BUSY:
-        status = Status::ERROR_DRM_RESOURCE_BUSY;
-        break;
-    case android::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION:
-        status = Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION;
-        break;
-    case android::ERROR_DRM_SESSION_NOT_OPENED:
-        status = Status::ERROR_DRM_SESSION_NOT_OPENED;
-        break;
-    case android::ERROR_DRM_CANNOT_HANDLE:
-    case android::BAD_VALUE:
-        status = Status::ERROR_DRM_CANNOT_HANDLE;
-        break;
-    default:
-        ALOGW("Unable to convert legacy status: %d, defaulting to UNKNOWN",
-                legacyStatus);
-        status = Status::ERROR_UNKNOWN_CRYPTO_EXCEPTION;
-        break;
-    }
-    return status;
-}
-
-}  // namespace implementation
-}  // namespace V1_0
-}  // namespace crypto
-}  // namespace drm
-}  // namespace hardware
-}  // namespace android
diff --git a/drm/crypto/1.0/types.hal b/drm/crypto/1.0/types.hal
deleted file mode 100644
index e71d73a..0000000
--- a/drm/crypto/1.0/types.hal
+++ /dev/null
@@ -1,141 +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.
- */
-
-package android.hardware.drm.crypto@1.0;
-
-enum Status : uint32_t {
-    /**
-     * The Crypto plugin must return OK when an operation completes without any
-     * errors.
-     */
-    OK,
-
-    /**
-     * The Crypto Plugin must return ERROR_DRM_NO_LICENSE if decryption is
-     * attempted when the license keys have not been loaded into the crypto
-     * session.
-     */
-    ERROR_DRM_NO_LICENSE,
-
-    /**
-     * The Crypto Plugin must return ERROR_DRM_LICENSE_EXPIRED if decryption
-     * is attempted when the license keys have expired and are no longer usable.
-     */
-    ERROR_DRM_LICENSE_EXPIRED,
-
-    /**
-     * The Crypto Plugin must return ERROR_DRM_RESOURCE_BUSY when a required
-     * crypto resource cannot be allocated while attempting decryption.
-     */
-    ERROR_DRM_RESOURCE_BUSY,
-
-    /**
-     * The Crypto Plugin must return ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION
-     * when the output protection level enabled on the device is not
-     * sufficient to meet the requirements in the license policy.  HDCP is an
-     * example of a form of output protection.
-     */
-    ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION,
-
-    /**
-     * The Crypto Plugin must return ERROR_DRM_SESSION_NOT_OPENED when
-     * decryption is attempted on a session that is not opened.
-     */
-    ERROR_DRM_SESSION_NOT_OPENED,
-
-    /**
-     * The Crypto Plugin must return ERROR_DRM_CANNOT_HANDLE when an operation
-     * is attempted that cannot be supported by the crypto system of the device.
-     */
-    ERROR_DRM_CANNOT_HANDLE,
-
-    /**
-     * The Crypto Plugin must return ERROR_UNKNOWN_CRYPTO_EXCEPTION in any
-     * fatal condition that is not covered by the other error messages.
-     */
-    ERROR_UNKNOWN_CRYPTO_EXCEPTION,
-};
-
-/**
- * Enumerate the supported crypto modes
- */
-enum Mode : uint32_t {
-    UNENCRYPTED = 0, // Samples are unencrypted
-    AES_CTR     = 1, // Samples are encrypted with AES CTR mode
-    AES_CBC_CTS = 2, // Samples are encrypted with AES CBC CTS mode
-    AES_CBC     = 3, // Samples are encrypted with AES CBC mode
-};
-
-/**
- * A subsample consists of some number of bytes of clear (unencrypted)
- * data followed by a number of bytes of encrypted data.
- */
-struct SubSample {
-    uint32_t numBytesOfClearData;
-    uint32_t numBytesOfEncryptedData;
-};
-
-/**
- * A crypto Pattern is a repeating sequence of encrypted and clear blocks
- * occuring within the bytes indicated by mNumBytesOfEncryptedDatad bytes
- * of a subsample. Patterns are used to reduce the CPU overhead of
- * decrypting samples. As an example, HLS uses 1:9 patterns where every
- * 10th block is encrypted.
- */
-struct Pattern {
-    /**
-     * The number of blocks to be encrypted in the pattern. If zero,
-     * pattern encryption is inoperative.
-     */
-    uint32_t encryptBlocks;
-
-    /**
-     * The number of blocks to be skipped (left clear) in the pattern. If
-     * zero, pattern encryption is inoperative.
-     */
-    uint32_t skipBlocks;
-};
-
-enum BufferType : uint32_t {
-    SHARED_MEMORY = 0,
-    NATIVE_HANDLE = 1,
-};
-
-
-/**
- * A decrypt destination buffer can be either normal user-space shared
- * memory for the non-secure decrypt case, or it can be a secure buffer
- * which is referenced by a native-handle. The native handle is allocated
- * by the vendor's buffer allocator.
- */
-struct DestinationBuffer {
-    /**
-     * The type of the buffer
-     */
-    BufferType type;
-
-    /**
-     * If type == SHARED_MEMORY, the decrypted data must be written
-     * to user-space non-secure shared memory.
-     */
-    memory nonsecureMemory;
-
-    /**
-     * If type == NATIVE_HANDLE, the decrypted data must be written
-     * to secure memory referenced by the vendor's buffer allocator.
-     */
-    handle secureMemory;
-};
diff --git a/drm/drm/1.0/Android.bp b/drm/drm/1.0/Android.bp
deleted file mode 100644
index dfff435..0000000
--- a/drm/drm/1.0/Android.bp
+++ /dev/null
@@ -1,72 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-
-genrule {
-    name: "android.hardware.drm.drm@1.0_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.drm.drm@1.0",
-    srcs: [
-        "types.hal",
-        "IDrmFactory.hal",
-        "IDrmPlugin.hal",
-        "IDrmPluginListener.hal",
-    ],
-    out: [
-        "android/hardware/drm/drm/1.0/types.cpp",
-        "android/hardware/drm/drm/1.0/DrmFactoryAll.cpp",
-        "android/hardware/drm/drm/1.0/DrmPluginAll.cpp",
-        "android/hardware/drm/drm/1.0/DrmPluginListenerAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.drm.drm@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.drm.drm@1.0",
-    srcs: [
-        "types.hal",
-        "IDrmFactory.hal",
-        "IDrmPlugin.hal",
-        "IDrmPluginListener.hal",
-    ],
-    out: [
-        "android/hardware/drm/drm/1.0/types.h",
-        "android/hardware/drm/drm/1.0/IDrmFactory.h",
-        "android/hardware/drm/drm/1.0/IHwDrmFactory.h",
-        "android/hardware/drm/drm/1.0/BnHwDrmFactory.h",
-        "android/hardware/drm/drm/1.0/BpHwDrmFactory.h",
-        "android/hardware/drm/drm/1.0/BsDrmFactory.h",
-        "android/hardware/drm/drm/1.0/IDrmPlugin.h",
-        "android/hardware/drm/drm/1.0/IHwDrmPlugin.h",
-        "android/hardware/drm/drm/1.0/BnHwDrmPlugin.h",
-        "android/hardware/drm/drm/1.0/BpHwDrmPlugin.h",
-        "android/hardware/drm/drm/1.0/BsDrmPlugin.h",
-        "android/hardware/drm/drm/1.0/IDrmPluginListener.h",
-        "android/hardware/drm/drm/1.0/IHwDrmPluginListener.h",
-        "android/hardware/drm/drm/1.0/BnHwDrmPluginListener.h",
-        "android/hardware/drm/drm/1.0/BpHwDrmPluginListener.h",
-        "android/hardware/drm/drm/1.0/BsDrmPluginListener.h",
-    ],
-}
-
-cc_library_shared {
-    name: "android.hardware.drm.drm@1.0",
-    generated_sources: ["android.hardware.drm.drm@1.0_genc++"],
-    generated_headers: ["android.hardware.drm.drm@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.drm.drm@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/drm/drm/1.0/Android.mk b/drm/drm/1.0/Android.mk
deleted file mode 100644
index 35d3463..0000000
--- a/drm/drm/1.0/Android.mk
+++ /dev/null
@@ -1,476 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.drm.drm@1.0-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hidl.base@1.0-java \
-
-
-#
-# Build types.hal (EventType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/EventType.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.drm.drm@1.0::types.EventType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyRequestType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyRequestType.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.drm.drm@1.0::types.KeyRequestType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyStatus)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyStatus.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.drm.drm@1.0::types.KeyStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyStatusType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyStatusType.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.drm.drm@1.0::types.KeyStatusType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyType.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.drm.drm@1.0::types.KeyType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyValue)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyValue.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.drm.drm@1.0::types.KeyValue
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SecureStop)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/SecureStop.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.drm.drm@1.0::types.SecureStop
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Status)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/Status.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.drm.drm@1.0::types.Status
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IDrmFactory.hal
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/IDrmFactory.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDrmFactory.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDrmPlugin.hal
-$(GEN): $(LOCAL_PATH)/IDrmPlugin.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(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.drm.drm@1.0::IDrmFactory
-
-$(GEN): $(LOCAL_PATH)/IDrmFactory.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IDrmPlugin.hal
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/IDrmPlugin.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDrmPlugin.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDrmPluginListener.hal
-$(GEN): $(LOCAL_PATH)/IDrmPluginListener.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(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.drm.drm@1.0::IDrmPlugin
-
-$(GEN): $(LOCAL_PATH)/IDrmPlugin.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IDrmPluginListener.hal
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/IDrmPluginListener.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDrmPluginListener.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(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.drm.drm@1.0::IDrmPluginListener
-
-$(GEN): $(LOCAL_PATH)/IDrmPluginListener.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.drm.drm@1.0-java-static
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(local-generated-sources-dir)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
-    android.hidl.base@1.0-java-static \
-
-
-#
-# Build types.hal (EventType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/EventType.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.drm.drm@1.0::types.EventType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyRequestType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyRequestType.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.drm.drm@1.0::types.KeyRequestType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyStatus)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyStatus.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.drm.drm@1.0::types.KeyStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyStatusType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyStatusType.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.drm.drm@1.0::types.KeyStatusType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyType)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyType.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.drm.drm@1.0::types.KeyType
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (KeyValue)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/KeyValue.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.drm.drm@1.0::types.KeyValue
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SecureStop)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/SecureStop.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.drm.drm@1.0::types.SecureStop
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Status)
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/Status.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.drm.drm@1.0::types.Status
-
-$(GEN): $(LOCAL_PATH)/types.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IDrmFactory.hal
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/IDrmFactory.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDrmFactory.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDrmPlugin.hal
-$(GEN): $(LOCAL_PATH)/IDrmPlugin.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(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.drm.drm@1.0::IDrmFactory
-
-$(GEN): $(LOCAL_PATH)/IDrmFactory.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IDrmPlugin.hal
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/IDrmPlugin.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDrmPlugin.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDrmPluginListener.hal
-$(GEN): $(LOCAL_PATH)/IDrmPluginListener.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(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.drm.drm@1.0::IDrmPlugin
-
-$(GEN): $(LOCAL_PATH)/IDrmPlugin.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IDrmPluginListener.hal
-#
-GEN := $(intermediates)/android/hardware/drm/drm/V1_0/IDrmPluginListener.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDrmPluginListener.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(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.drm.drm@1.0::IDrmPluginListener
-
-$(GEN): $(LOCAL_PATH)/IDrmPluginListener.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/drm/drm/1.0/default/Android.mk b/drm/drm/1.0/default/Android.mk
deleted file mode 100644
index 952957c..0000000
--- a/drm/drm/1.0/default/Android.mk
+++ /dev/null
@@ -1,39 +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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.drm.drm@1.0-impl
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_SRC_FILES := \
-    DrmFactory.cpp \
-    DrmPlugin.cpp \
-    TypeConvert.cpp \
-
-LOCAL_SHARED_LIBRARIES := \
-    libhidlbase \
-    libhidltransport \
-    libhwbinder \
-    libutils \
-    liblog \
-    libmediadrm \
-    libstagefright_foundation \
-    android.hardware.drm.drm@1.0 \
-
-LOCAL_C_INCLUDES := \
-    frameworks/native/include \
-    frameworks/av/include
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/drm/drm/1.0/default/TypeConvert.h b/drm/drm/1.0/default/TypeConvert.h
deleted file mode 100644
index 2f7875e..0000000
--- a/drm/drm/1.0/default/TypeConvert.h
+++ /dev/null
@@ -1,69 +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_DRM_DRM_V1_0_TYPECONVERT
-#define ANDROID_HARDWARE_DRM_DRM_V1_0_TYPECONVERT
-
-#include <utils/Vector.h>
-#include <media/stagefright/MediaErrors.h>
-#include <media/drm/DrmAPI.h>
-
-#include <hidl/MQDescriptor.h>
-#include <android/hardware/drm/drm/1.0/types.h>
-
-namespace android {
-namespace hardware {
-namespace drm {
-namespace drm {
-namespace V1_0 {
-namespace implementation {
-
-using ::android::hardware::hidl_vec;
-
-template<typename T> const hidl_vec<T> toHidlVec(const Vector<T> &Vector) {
-    hidl_vec<T> vec;
-    vec.setToExternal(const_cast<T *>(Vector.array()), Vector.size());
-    return vec;
-}
-
-template<typename T> hidl_vec<T> toHidlVec(Vector<T> &Vector) {
-    hidl_vec<T> vec;
-    vec.setToExternal(Vector.editArray(), Vector.size());
-    return vec;
-}
-
-template<typename T> const Vector<T> toVector(const hidl_vec<T> & vec) {
-    Vector<T> vector;
-    vector.appendArray(vec.data(), vec.size());
-    return *const_cast<const Vector<T> *>(&vector);
-}
-
-template<typename T> Vector<T> toVector(hidl_vec<T> &vec) {
-    Vector<T> vector;
-    vector.appendArray(vec.data(), vec.size());
-    return vector;
-}
-
-Status toStatus(status_t legacyStatus);
-
-}  // namespace implementation
-}  // namespace V1_0
-}  // namespace drm
-}  // namespace drm
-}  // namespace hardware
-}  // namespace android
-
-#endif // ANDROID_HARDWARE_DRM_DRM_V1_0_TYPECONVERT
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index f16192d..4d7e26e 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -108,13 +108,13 @@
         "android/hardware/gnss/1.0/BsGnss.h",
         "android/hardware/gnss/1.0/IGnssBatching.h",
         "android/hardware/gnss/1.0/IHwGnssBatching.h",
-        "android/hardware/gnss/1.0/BnGnssBatching.h",
-        "android/hardware/gnss/1.0/BpGnssBatching.h",
+        "android/hardware/gnss/1.0/BnHwGnssBatching.h",
+        "android/hardware/gnss/1.0/BpHwGnssBatching.h",
         "android/hardware/gnss/1.0/BsGnssBatching.h",
         "android/hardware/gnss/1.0/IGnssBatchingCallback.h",
         "android/hardware/gnss/1.0/IHwGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/BnGnssBatchingCallback.h",
-        "android/hardware/gnss/1.0/BpGnssBatchingCallback.h",
+        "android/hardware/gnss/1.0/BnHwGnssBatchingCallback.h",
+        "android/hardware/gnss/1.0/BpHwGnssBatchingCallback.h",
         "android/hardware/gnss/1.0/BsGnssBatchingCallback.h",
         "android/hardware/gnss/1.0/IGnssCallback.h",
         "android/hardware/gnss/1.0/IHwGnssCallback.h",
diff --git a/gnss/1.0/Android.mk b/gnss/1.0/Android.mk
index d72280f..130c14e 100644
--- a/gnss/1.0/Android.mk
+++ b/gnss/1.0/Android.mk
@@ -55,6 +55,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (GnssLocationFlags)
+#
+GEN := $(intermediates)/android/hardware/gnss/V1_0/GnssLocationFlags.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.gnss@1.0::types.GnssLocationFlags
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (GnssMax)
 #
 GEN := $(intermediates)/android/hardware/gnss/V1_0/GnssMax.java
@@ -558,6 +577,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (GnssLocationFlags)
+#
+GEN := $(intermediates)/android/hardware/gnss/V1_0/GnssLocationFlags.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.gnss@1.0::types.GnssLocationFlags
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (GnssMax)
 #
 GEN := $(intermediates)/android/hardware/gnss/V1_0/GnssMax.java
diff --git a/gnss/1.0/IAGnss.hal b/gnss/1.0/IAGnss.hal
index 2cce519..b8f5746 100644
--- a/gnss/1.0/IAGnss.hal
+++ b/gnss/1.0/IAGnss.hal
@@ -22,6 +22,7 @@
  * Extended interface for AGNSS support.
  */
 interface IAGnss {
+    @export(name="", value_prefix="APN_IP_")
     enum ApnIpType : uint8_t {
         INVALID  = 0,
         IPV4     = 1,
diff --git a/gnss/1.0/IAGnssCallback.hal b/gnss/1.0/IAGnssCallback.hal
index 1984725..fe2e101 100644
--- a/gnss/1.0/IAGnssCallback.hal
+++ b/gnss/1.0/IAGnssCallback.hal
@@ -19,11 +19,13 @@
 /** Callback structure for the AGNSS interface. */
 interface IAGnssCallback {
     /** AGNSS type **/
+    @export(name="", value_prefix="AGPS_")
     enum AGnssType : uint8_t {
         TYPE_SUPL         = 1,
         TYPE_C2K          = 2
     };
 
+    @export(name="", value_prefix="GNSS_")
     enum AGnssStatusValue : uint8_t {
         /** GNSS requests data connection for AGNSS. */
         REQUEST_AGNSS_DATA_CONN  = 1,
@@ -40,6 +42,7 @@
     /*
      * Represents the status of AGNSS augmented to support IPv4.
      */
+    @export(name="", value_prefix="GPS_")
     struct AGnssStatusIpV4 {
         AGnssType type;
         AGnssStatusValue status;
diff --git a/gnss/1.0/IAGnssRil.hal b/gnss/1.0/IAGnssRil.hal
index 499b874..6292273 100644
--- a/gnss/1.0/IAGnssRil.hal
+++ b/gnss/1.0/IAGnssRil.hal
@@ -25,12 +25,14 @@
  * location, unique subscriber ID, phone number string and network availability changes.
  */
 interface IAGnssRil {
+    @export(name="", value_prefix="AGPS_SETID_TYPE_")
     enum SetIDType : uint8_t {
         NONE    = 0,
         IMSI    = 1,
         MSISDM  = 2
     };
 
+    @export(name="", value_prefix="AGPS_RIL_NETWORK_TYPE_")
     enum NetworkType : uint8_t {
         MOBILE  = 0,
         WIFI    = 1,
@@ -41,6 +43,7 @@
         WIMAX   = 6,
     };
 
+    @export(name="", value_prefix="AGPS_REF_LOCATION_TYPE_")
     enum AGnssRefLocationType : uint8_t {
         GSM_CELLID   = 1,
         UMTS_CELLID  = 2,
diff --git a/gnss/1.0/IAGnssRilCallback.hal b/gnss/1.0/IAGnssRilCallback.hal
index ba29bd0..2d64e54 100644
--- a/gnss/1.0/IAGnssRilCallback.hal
+++ b/gnss/1.0/IAGnssRilCallback.hal
@@ -22,6 +22,7 @@
  */
 interface IAGnssRilCallback {
     /* Kinds of SET ID that can be requested */
+    @export(name="", value_prefix="AGPS_RIL_REQUEST_SETID_")
     enum ID : uint32_t {
         IMSI    = 1 << 0L,
         MSISDN  = 1 << 1L,
diff --git a/gnss/1.0/IGnss.hal b/gnss/1.0/IGnss.hal
index 24a5371..5cde79e 100644
--- a/gnss/1.0/IGnss.hal
+++ b/gnss/1.0/IGnss.hal
@@ -28,9 +28,10 @@
 import IGnssNi;
 import IGnssXtra;
 
-/* Represents the standard GNSS interface. */
+/* Represents the standard GNSS (Global Navigation Satellite System) interface. */
 interface IGnss {
     /* Requested operational mode for GNSS operation. */
+    @export(name="", value_prefix="GPS_POSITION_MODE_")
     enum GnssPositionMode : uint8_t {
         /** Mode for running GNSS standalone (no assistance). */
         STANDALONE  = 0,
@@ -44,6 +45,7 @@
     };
 
     /* Requested recurrence mode for GNSS operation. */
+    @export(name="", value_prefix="GPS_POSITION_")
     enum GnssPositionRecurrence : uint32_t {
         /** Receive GNSS fixes on a recurring basis at a specified period. */
         RECURRENCE_PERIODIC  = 0,
@@ -55,6 +57,7 @@
      * Flags used to specify which aiding data to delete when calling
      * deleteAidingData().
      */
+    @export(name="", value_prefix="GPS_")
     enum GnssAidingData : uint16_t {
         DELETE_EPHEMERIS    = 0x0001,
         DELETE_ALMANAC      = 0x0002,
diff --git a/gnss/1.0/IGnssBatching.hal b/gnss/1.0/IGnssBatching.hal
index 4f0695d..4d5affa 100644
--- a/gnss/1.0/IGnssBatching.hal
+++ b/gnss/1.0/IGnssBatching.hal
@@ -42,6 +42,7 @@
     /*
      * Enum which holds the bit masks for batching control.
      */
+    @export(name="", value_prefix="FLP_BATCH_")
     enum Flag : uint8_t {
         /*
          * If this flag is set, the hardware implementation
diff --git a/gnss/1.0/IGnssCallback.hal b/gnss/1.0/IGnssCallback.hal
index eb66d78..0c3b9f0 100644
--- a/gnss/1.0/IGnssCallback.hal
+++ b/gnss/1.0/IGnssCallback.hal
@@ -23,6 +23,7 @@
  */
 interface IGnssCallback {
     /* Flags for the gnssSetCapabilities callback. */
+    @export(name="", value_prefix="GPS_CAPABILITY_")
     enum Capabilities : uint32_t {
         /*
          * GNSS HAL schedules fixes for RECURRENCE_PERIODIC mode.
@@ -47,6 +48,7 @@
     };
 
     /* GNSS status event values. */
+    @export(name="", value_prefix="GPS_STATUS_")
     enum GnssStatusValue : uint8_t {
         /** GNSS status unknown. */
         NONE           = 0,
@@ -63,6 +65,7 @@
     /*
      * Flags that indicate information about the satellite
      */
+    @export(name="", value_prefix="GNSS_SV_FLAGS_")
     enum GnssSvFlags : uint8_t {
         NONE                  = 0,
         HAS_EPHEMERIS_DATA    = 1 << 0,
@@ -111,9 +114,16 @@
 
         /*
          * Carrier frequency of the signal tracked, for example it can be the
-         * GPS L1 = 1.57542e9 Hz, or L2, L5, varying GLO channels, etc. If
-         * the field is not set, it is the primary common use frequency,
-         * e.g. L1 for GPS.
+         * GPS central frequency for L1 = 1575.45 MHz, or L2 = 1227.60 MHz, L5 =
+         * 1176.45 MHz, varying GLO channels, etc. If the field is not set, it
+         * is the primary common use central frequency, e.g. L1 = 1575.45 MHz
+         * for GPS.
+         *
+         * For an L1, L5 receiver tracking a satellite on L1 and L5 at the same
+         * time, two GnssSvInfo structs must be reported for this same
+         * satellite, in one of the structs, all the values related
+         * to L1 must be filled, and in the other all of the values related to
+         * L5 must be filled.
          *
          * If the data is available, gnssClockFlags must contain
          * HAS_CARRIER_FREQUENCY.
diff --git a/gnss/1.0/IGnssGeofenceCallback.hal b/gnss/1.0/IGnssGeofenceCallback.hal
index 5c70c5e..722317e 100644
--- a/gnss/1.0/IGnssGeofenceCallback.hal
+++ b/gnss/1.0/IGnssGeofenceCallback.hal
@@ -91,17 +91,20 @@
  */
 
 interface IGnssGeofenceCallback {
+    @export(name="", value_prefix="GPS_GEOFENCE_")
     enum GeofenceTransition : int32_t {
         ENTERED   = (1 << 0L),
         EXITED    = (1 << 1L),
         UNCERTAIN = (1 << 2L),
     };
 
+    @export(name="", value_prefix="GPS_GEOFENCE_")
     enum GeofenceAvailability : int32_t {
         UNAVAILABLE = (1 << 0L),
         AVAILABLE   = (1 << 1L),
     };
 
+    @export(name="", value_prefix="GPS_GEOFENCE_")
     enum GeofenceStatus : int32_t {
         OPERATION_SUCCESS        = 0,
         ERROR_TOO_MANY_GEOFENCES = -100,
diff --git a/gnss/1.0/IGnssMeasurement.hal b/gnss/1.0/IGnssMeasurement.hal
index 5174273..8329442 100644
--- a/gnss/1.0/IGnssMeasurement.hal
+++ b/gnss/1.0/IGnssMeasurement.hal
@@ -22,6 +22,7 @@
  * Extended interface for GNSS Measurements support.
  */
 interface IGnssMeasurement {
+    @export(name="", value_prefix="GPS_MEASUREMENT_")
     enum GnssMeasurementStatus : int32_t {
         SUCCESS = 0,
         ERROR_ALREADY_INIT = -100,
diff --git a/gnss/1.0/IGnssMeasurementCallback.hal b/gnss/1.0/IGnssMeasurementCallback.hal
index de640ae..5789621 100644
--- a/gnss/1.0/IGnssMeasurementCallback.hal
+++ b/gnss/1.0/IGnssMeasurementCallback.hal
@@ -21,6 +21,7 @@
     /*
      * Flags to indicate what fields in GnssClock are valid.
      */
+    @export(name="", value_prefix="GNSS_CLOCK_")
     enum GnssClockFlags : uint16_t {
         /** A valid 'leap second' is stored in the data structure. */
         HAS_LEAP_SECOND        = 1 << 0,
@@ -41,6 +42,7 @@
     /*
      * Flags to indicate what fields in GnssMeasurement are valid.
      */
+    @export(name="", value_prefix="GNSS_MEASUREMENT_")
     enum GnssMeasurementFlags : uint32_t {
         /** A valid 'snr' is stored in the data structure. */
         HAS_SNR                        = 1 << 0,
@@ -60,6 +62,7 @@
      * Enumeration of available values for the GNSS Measurement's multipath
      * indicator.
      */
+    @export(name="", value_prefix="GNSS_MULTIPATH_")
     enum GnssMultipathIndicator : uint8_t {
         /** The indicator is not available or unknown. */
         INDICATOR_UNKNOWN      = 0,
@@ -82,6 +85,7 @@
      * If GNSS is still searching for a satellite, the corresponding state must be
      * set to STATE_UNKNOWN(0).
      */
+    @export(name="", value_prefix="GNSS_MEASUREMENT_")
     enum GnssMeasurementState : uint32_t {
         STATE_UNKNOWN                = 0,
         STATE_CODE_LOCK              = 1 << 0,
@@ -105,6 +109,7 @@
     /*
      * Flags indicating the Accumulated Delta Range's states.
      */
+    @export(name="", value_prefix="GNSS_")
     enum GnssAccumulatedDeltaRangeState : uint16_t {
         ADR_STATE_UNKNOWN    = 0,
         ADR_STATE_VALID      = 1 << 0,
@@ -480,9 +485,16 @@
 
         /*
          * Carrier frequency of the signal tracked, for example it can be the
-         * GPS L1 = 1.57542e9 Hz, or L2, L5, varying GLO channels, etc. If the
-         * field is not set, it is the primary common use frequency,
-         * e.g. L1 for GPS.
+         * GPS central frequency for L1 = 1575.45 MHz, or L2 = 1227.60 MHz, L5 =
+         * 1176.45 MHz, varying GLO channels, etc. If the field is not set, it
+         * is the primary common use central frequency, e.g. L1 = 1575.45 MHz
+         * for GPS.
+         *
+         * For an L1, L5 receiver tracking a satellite on L1 and L5 at the same
+         * time, two raw measurement structs must be reported for this same
+         * satellite, in one of the measurement structs, all the values related
+         * to L1 must be filled, and in the other all of the values related to
+         * L5 must be filled.
          *
          * If the data is available, gnssClockFlags must contain
          * HAS_CARRIER_FREQUENCY.
@@ -552,12 +564,12 @@
 
         /*
          * Automatic gain control (AGC) level. AGC acts as a variable gain
-         * amplifier adjusting the power of the incoming signal to minimize the
-         * quantization losses. The AGC level may be used to indicate potential
-         * interference. When AGC is at a nominal level, this value
-         * must be set as 0. Higher gain (and/or lower input power) must be
-         * output as a positive number. Hence in cases of strong jamming, in the
-         * band of this signal, this value must go more negative.
+         * amplifier adjusting the power of the incoming signal. The AGC level
+         * may be used to indicate potential interference. When AGC is at a
+         * nominal level, this value must be set as 0. Higher gain (and/or lower
+         * input power) must be output as a positive number. Hence in cases of
+         * strong jamming, in the band of this signal, this value must go more
+         * negative.
          *
          * Note: Different hardware designs (e.g. antenna, pre-amplification, or
          * other RF HW components) may also affect the typical output of of this
diff --git a/gnss/1.0/IGnssNavigationMessage.hal b/gnss/1.0/IGnssNavigationMessage.hal
index 11f2096..ddd9169 100644
--- a/gnss/1.0/IGnssNavigationMessage.hal
+++ b/gnss/1.0/IGnssNavigationMessage.hal
@@ -22,6 +22,7 @@
  * Extended interface for GNSS navigation message reporting support.
  */
 interface IGnssNavigationMessage {
+    @export(name="", value_prefix="GPS_NAVIGATION_MESSAGE_")
     enum GnssNavigationMessageStatus : int32_t {
         SUCCESS = 0,
         ERROR_ALREADY_INIT = -100,
diff --git a/gnss/1.0/IGnssNavigationMessageCallback.hal b/gnss/1.0/IGnssNavigationMessageCallback.hal
index 0cffa67..2e6b853 100644
--- a/gnss/1.0/IGnssNavigationMessageCallback.hal
+++ b/gnss/1.0/IGnssNavigationMessageCallback.hal
@@ -25,6 +25,7 @@
      * For convenience, first byte is the GnssConstellationType on which that signal
      * is typically transmitted.
      */
+    @export(name="", value_prefix="GNSS_NAVIGATION_MESSAGE_TYPE_")
     enum GnssNavigationMessageType : int16_t {
         UNKNOWN    = 0,
         /** GNSS L1 C/A message contained in the structure.  */
@@ -56,6 +57,7 @@
      * No need to send any navigation message that contains words with parity error
      * and cannot be corrected.
      */
+    @export(name="navigation_message_status", value_prefix="NAV_MESSAGE_STATUS_")
     enum NavigationMessageStatus : uint16_t {
         PARITY_PASSED  = (1 << 0),
         PARITY_REBUILT = (1 << 1),
diff --git a/gnss/1.0/IGnssNiCallback.hal b/gnss/1.0/IGnssNiCallback.hal
index a7abad9..c5fb223 100644
--- a/gnss/1.0/IGnssNiCallback.hal
+++ b/gnss/1.0/IGnssNiCallback.hal
@@ -21,6 +21,7 @@
     /*
      * GnssNiType constants
      */
+    @export(name="", value_prefix="GPS_NI_TYPE_")
     enum GnssNiType : uint8_t {
         VOICE           = 1,
         UMTS_SUPL       = 2,
@@ -30,6 +31,7 @@
     /*
      * GnssNiNotifyFlags constants
      */
+    @export(name="", value_prefix="GPS_NI_")
     enum GnssNiNotifyFlags : uint32_t {
         /** NI requires notification */
         NEED_NOTIFY      = 0x0001,
@@ -43,6 +45,7 @@
      * GNSS NI responses, used to define the response in
      * NI structures
      */
+    @export(name="", value_prefix="GPS_NI_")
     enum GnssUserResponseType : uint8_t {
         RESPONSE_ACCEPT  = 1,
         RESPONSE_DENY    = 2,
@@ -52,6 +55,7 @@
     /*
      * NI data encoding scheme
      */
+    @export(name="", value_prefix="GPS_")
     enum GnssNiEncodingType : int32_t {
         ENC_NONE              = 0,
         ENC_SUPL_GSM_DEFAULT  = 1,
diff --git a/gnss/1.0/types.hal b/gnss/1.0/types.hal
index 2721d44..d5e0e9b 100644
--- a/gnss/1.0/types.hal
+++ b/gnss/1.0/types.hal
@@ -16,6 +16,7 @@
 
 package android.hardware.gnss@1.0;
 
+@export(name="", value_prefix="GNSS_MAX_")
 enum GnssMax : uint32_t {
 /** Maximum number of SVs for gnssSvStatusCb(). */
     SVS_COUNT = 64,
@@ -27,6 +28,8 @@
 /*
  * Constellation type of GnssSvInfo
  */
+
+@export(name="", value_prefix="GNSS_CONSTELLATION_")
 enum GnssConstellationType : uint8_t {
     UNKNOWN = 0,
     GPS     = 1,
@@ -38,6 +41,7 @@
 };
 
 /** Bit mask to indicate which values are valid in a GnssLocation object. */
+@export(name="", value_prefix="GPS_LOCATION_")
 enum GnssLocationFlags : uint16_t {
     /** GnssLocation has valid latitude and longitude. */
     HAS_LAT_LONG              = 0x0001,
diff --git a/graphics/Android.mk b/graphics/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/graphics/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index c145bc2..48db3e9 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -220,4 +220,3 @@
         "android.hardware.graphics.allocator@2.0",
     ],
 }
-
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
index 721c632..b67afd1 100644
--- a/graphics/common/1.0/Android.bp
+++ b/graphics/common/1.0/Android.bp
@@ -44,55 +44,3 @@
         "libutils",
     ],
 }
-
-genrule {
-    name: "android.hardware.graphics.common.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.graphics.common@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
-    srcs: [
-        "types.hal",
-    ],
-    out: [
-        "android/hardware/graphics/common/1.0/types.vts.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.graphics.common.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.graphics.common@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
-    srcs: [
-        "types.hal",
-    ],
-    out: [
-        "android/hardware/graphics/common/1.0/types.vts.h",
-    ],
-}
-
-cc_library_shared {
-    name: "android.hardware.graphics.common.vts.driver@1.0",
-    generated_sources: ["android.hardware.graphics.common.vts.driver@1.0_genc++"],
-    generated_headers: ["android.hardware.graphics.common.vts.driver@1.0_genc++_headers"],
-    export_generated_headers: ["android.hardware.graphics.common.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.hardware.graphics.common@1.0",
-    ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-    ],
-}
\ No newline at end of file
diff --git a/graphics/common/1.0/types.hal b/graphics/common/1.0/types.hal
index ebdba77..6fddfaf 100644
--- a/graphics/common/1.0/types.hal
+++ b/graphics/common/1.0/types.hal
@@ -1264,7 +1264,7 @@
    *  red             0.680   0.320
    *  white (D65)     0.3127  0.3290
    *
-   * Gamma: 2.2
+   * Gamma: 2.6
    */
   DCI_P3 = 6,
 
@@ -1309,7 +1309,27 @@
    *
    * Gamma: 2.2
    */
-  ADOBE_RGB = 8
+  ADOBE_RGB = 8,
+
+  /*
+   * DISPLAY_P3 is a color space that uses the DCI_P3 primaries,
+   * the D65 white point and the SRGB transfer functions.
+   * Rendering Intent: Colorimetric
+   * Primaries:
+   *                  x       y
+   *  green           0.265   0.690
+   *  blue            0.150   0.060
+   *  red             0.680   0.320
+   *  white (D65)     0.3127  0.3290
+   *
+   * PC/Internet (sRGB) Gamma Correction (GC):
+   *
+   *  if Vlinear ≤ 0.0031308
+   *    Vnonlinear = 12.92 * Vlinear
+   *  else
+   *    Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055
+   */
+  DISPLAY_P3 = 9
 };
 
 /*
diff --git a/graphics/composer/2.1/default/HwcClient.cpp b/graphics/composer/2.1/default/HwcClient.cpp
index 54dfd89..edd161a 100644
--- a/graphics/composer/2.1/default/HwcClient.cpp
+++ b/graphics/composer/2.1/default/HwcClient.cpp
@@ -514,7 +514,7 @@
     if (outDescriptor) {
         hidl_cb(Error::NONE, *outDescriptor);
     } else {
-        hidl_cb(Error::NO_RESOURCES, MQDescriptorSync<uint32_t>());
+        hidl_cb(Error::NO_RESOURCES, CommandQueueType::Descriptor());
     }
 
     return Void();
@@ -651,7 +651,7 @@
 
 bool HwcClient::CommandReader::parseSelectDisplay(uint16_t length)
 {
-    if (length != CommandWriter::kSelectDisplayLength) {
+    if (length != CommandWriterBase::kSelectDisplayLength) {
         return false;
     }
 
@@ -663,7 +663,7 @@
 
 bool HwcClient::CommandReader::parseSelectLayer(uint16_t length)
 {
-    if (length != CommandWriter::kSelectLayerLength) {
+    if (length != CommandWriterBase::kSelectLayerLength) {
         return false;
     }
 
@@ -674,7 +674,7 @@
 
 bool HwcClient::CommandReader::parseSetColorTransform(uint16_t length)
 {
-    if (length != CommandWriter::kSetColorTransformLength) {
+    if (length != CommandWriterBase::kSetColorTransformLength) {
         return false;
     }
 
@@ -722,7 +722,7 @@
 
 bool HwcClient::CommandReader::parseSetOutputBuffer(uint16_t length)
 {
-    if (length != CommandWriter::kSetOutputBufferLength) {
+    if (length != CommandWriterBase::kSetOutputBufferLength) {
         return false;
     }
 
@@ -746,7 +746,7 @@
 
 bool HwcClient::CommandReader::parseValidateDisplay(uint16_t length)
 {
-    if (length != CommandWriter::kValidateDisplayLength) {
+    if (length != CommandWriterBase::kValidateDisplayLength) {
         return false;
     }
 
@@ -773,7 +773,7 @@
 
 bool HwcClient::CommandReader::parseAcceptDisplayChanges(uint16_t length)
 {
-    if (length != CommandWriter::kAcceptDisplayChangesLength) {
+    if (length != CommandWriterBase::kAcceptDisplayChangesLength) {
         return false;
     }
 
@@ -787,7 +787,7 @@
 
 bool HwcClient::CommandReader::parsePresentDisplay(uint16_t length)
 {
-    if (length != CommandWriter::kPresentDisplayLength) {
+    if (length != CommandWriterBase::kPresentDisplayLength) {
         return false;
     }
 
@@ -807,7 +807,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerCursorPosition(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerCursorPositionLength) {
+    if (length != CommandWriterBase::kSetLayerCursorPositionLength) {
         return false;
     }
 
@@ -822,7 +822,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerBuffer(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerBufferLength) {
+    if (length != CommandWriterBase::kSetLayerBufferLength) {
         return false;
     }
 
@@ -862,7 +862,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerBlendMode(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerBlendModeLength) {
+    if (length != CommandWriterBase::kSetLayerBlendModeLength) {
         return false;
     }
 
@@ -876,7 +876,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerColor(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerColorLength) {
+    if (length != CommandWriterBase::kSetLayerColorLength) {
         return false;
     }
 
@@ -890,7 +890,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerCompositionType(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerCompositionTypeLength) {
+    if (length != CommandWriterBase::kSetLayerCompositionTypeLength) {
         return false;
     }
 
@@ -904,7 +904,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerDataspace(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerDataspaceLength) {
+    if (length != CommandWriterBase::kSetLayerDataspaceLength) {
         return false;
     }
 
@@ -918,7 +918,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerDisplayFrame(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerDisplayFrameLength) {
+    if (length != CommandWriterBase::kSetLayerDisplayFrameLength) {
         return false;
     }
 
@@ -932,7 +932,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerPlaneAlpha(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerPlaneAlphaLength) {
+    if (length != CommandWriterBase::kSetLayerPlaneAlphaLength) {
         return false;
     }
 
@@ -946,7 +946,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerSidebandStream(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerSidebandStreamLength) {
+    if (length != CommandWriterBase::kSetLayerSidebandStreamLength) {
         return false;
     }
 
@@ -965,7 +965,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerSourceCrop(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerSourceCropLength) {
+    if (length != CommandWriterBase::kSetLayerSourceCropLength) {
         return false;
     }
 
@@ -979,7 +979,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerTransform(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerTransformLength) {
+    if (length != CommandWriterBase::kSetLayerTransformLength) {
         return false;
     }
 
@@ -1009,7 +1009,7 @@
 
 bool HwcClient::CommandReader::parseSetLayerZOrder(uint16_t length)
 {
-    if (length != CommandWriter::kSetLayerZOrderLength) {
+    if (length != CommandWriterBase::kSetLayerZOrderLength) {
         return false;
     }
 
diff --git a/graphics/composer/2.1/default/HwcClient.h b/graphics/composer/2.1/default/HwcClient.h
index c719774..35a0450 100644
--- a/graphics/composer/2.1/default/HwcClient.h
+++ b/graphics/composer/2.1/default/HwcClient.h
@@ -171,7 +171,7 @@
 
         HwcClient& mClient;
         HwcHal& mHal;
-        CommandWriter& mWriter;
+        CommandWriterBase& mWriter;
 
         Display mDisplay;
         Layer mLayer;
@@ -184,7 +184,7 @@
         64 * 1024 / sizeof(uint32_t) - 16;
     std::mutex mCommandMutex;
     CommandReader mReader;
-    CommandWriter mWriter;
+    CommandWriterBase mWriter;
 
     sp<IComposerCallback> mCallback;
 
diff --git a/graphics/composer/2.1/default/IComposerCommandBuffer.h b/graphics/composer/2.1/default/IComposerCommandBuffer.h
index 65e7799..fb78ef8 100644
--- a/graphics/composer/2.1/default/IComposerCommandBuffer.h
+++ b/graphics/composer/2.1/default/IComposerCommandBuffer.h
@@ -52,16 +52,16 @@
 
 // This class helps build a command queue.  Note that all sizes/lengths are in
 // units of uint32_t's.
-class CommandWriter {
+class CommandWriterBase {
 public:
-    CommandWriter(uint32_t initialMaxSize)
+    CommandWriterBase(uint32_t initialMaxSize)
         : mDataMaxSize(initialMaxSize)
     {
         mData = std::make_unique<uint32_t[]>(mDataMaxSize);
         reset();
     }
 
-    ~CommandWriter()
+    virtual ~CommandWriterBase()
     {
         reset();
     }
diff --git a/health/Android.mk b/health/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/health/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
index 3a8fceb..fb9f070 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -54,3 +54,106 @@
         "android.hidl.base@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.ir.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.ir@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    srcs: [
+        "types.hal",
+        "IConsumerIr.hal",
+    ],
+    out: [
+        "android/hardware/ir/1.0/types.vts.cpp",
+        "android/hardware/ir/1.0/ConsumerIr.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.ir.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.ir@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    srcs: [
+        "types.hal",
+        "IConsumerIr.hal",
+    ],
+    out: [
+        "android/hardware/ir/1.0/types.vts.h",
+        "android/hardware/ir/1.0/ConsumerIr.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.ir.vts.driver@1.0",
+    generated_sources: ["android.hardware.ir.vts.driver@1.0_genc++"],
+    generated_headers: ["android.hardware.ir.vts.driver@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.ir.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.ir@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hidl.base@1.0",
+    ],
+}
+
+genrule {
+    name: "android.hardware.ir@1.0-IConsumerIr-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.ir@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    srcs: [
+        "IConsumerIr.hal",
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/ir/1.0/ConsumerIr.vts.cpp",
+        "android/hardware/ir/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.ir@1.0-IConsumerIr-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.ir@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/ir/1.0/ $(genDir)/android/hardware/ir/1.0/",
+    srcs: [
+        "IConsumerIr.hal",
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/ir/1.0/ConsumerIr.vts.h",
+        "android/hardware/ir/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.ir@1.0-IConsumerIr-vts.profiler",
+    generated_sources: ["android.hardware.ir@1.0-IConsumerIr-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.ir@1.0-IConsumerIr-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.ir@1.0-IConsumerIr-vts.profiler_genc++_headers"],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libvts_profiling",
+        "libvts_multidevice_proto",
+        "libprotobuf-cpp-full",
+        "android.hidl.base@1.0",
+        "android.hardware.ir@1.0",
+    ],
+}
diff --git a/ir/1.0/default/ConsumerIr.cpp b/ir/1.0/default/ConsumerIr.cpp
index b96c695..69a25cf 100644
--- a/ir/1.0/default/ConsumerIr.cpp
+++ b/ir/1.0/default/ConsumerIr.cpp
@@ -63,13 +63,13 @@
 }
 
 
-IConsumerIr* HIDL_FETCH_IConsumerIr(const char *name) {
+IConsumerIr* HIDL_FETCH_IConsumerIr(const char * /*name*/) {
     consumerir_device_t *dev;
     const hw_module_t *hw_module = NULL;
 
-    int ret = hw_get_module(name, &hw_module);
+    int ret = hw_get_module(CONSUMERIR_HARDWARE_MODULE_ID, &hw_module);
     if (ret != 0) {
-        ALOGE("hw_get_module %s failed: %d", name, ret);
+        ALOGE("hw_get_module %s failed: %d", CONSUMERIR_HARDWARE_MODULE_ID, ret);
         return nullptr;
     }
     ret = hw_module->methods->open(hw_module, CONSUMERIR_TRANSMITTER, (hw_device_t **) &dev);
diff --git a/ir/1.0/default/service.cpp b/ir/1.0/default/service.cpp
index 237b2c9..10f6b7d 100644
--- a/ir/1.0/default/service.cpp
+++ b/ir/1.0/default/service.cpp
@@ -23,5 +23,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<IConsumerIr>("consumerir");
+    return defaultPassthroughServiceImplementation<IConsumerIr>();
 }
diff --git a/boot/Android.mk b/ir/1.0/vts/Android.mk
similarity index 81%
rename from boot/Android.mk
rename to ir/1.0/vts/Android.mk
index f9e3276..90c50c8 100644
--- a/boot/Android.mk
+++ b/ir/1.0/vts/Android.mk
@@ -5,7 +5,7 @@
 # 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
+#       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,
@@ -16,4 +16,4 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(LOCAL_PATH)/functional/vts/testcases/hal/ir/hidl/target/Android.mk
diff --git a/ir/1.0/vts/ConsumerIr.vts b/ir/1.0/vts/ConsumerIr.vts
new file mode 100644
index 0000000..bebc6cf
--- /dev/null
+++ b/ir/1.0/vts/ConsumerIr.vts
@@ -0,0 +1,44 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IConsumerIr"
+
+package: "android.hardware.ir"
+
+import: "android.hardware.ir@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
new file mode 100644
index 0000000..c5265de
--- /dev/null
+++ b/ir/1.0/vts/functional/Android.bp
@@ -0,0 +1,40 @@
+//
+// 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.
+//
+
+cc_test {
+    name: "ir_hidl_hal_test",
+    gtest: true,
+    srcs: ["ir_hidl_hal_test.cpp"],
+    shared_libs: [
+        "libbase",
+        "liblog",
+        "libcutils",
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.ir@1.0",
+    ],
+    static_libs: ["libgtest"],
+    cflags: [
+        "--coverage",
+        "-O0",
+        "-g",
+    ],
+    ldflags: [
+        "--coverage"
+    ]
+}
diff --git a/ir/1.0/vts/functional/ir_hidl_hal_test.cpp b/ir/1.0/vts/functional/ir_hidl_hal_test.cpp
new file mode 100644
index 0000000..57d0b73
--- /dev/null
+++ b/ir/1.0/vts/functional/ir_hidl_hal_test.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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 "ir_hidl_hal_test"
+
+#include <android-base/logging.h>
+
+#include <android/hardware/ir/1.0/IConsumerIr.h>
+#include <android/hardware/ir/1.0/types.h>
+
+#include <gtest/gtest.h>
+#include <algorithm>
+
+using ::android::hardware::ir::V1_0::IConsumerIr;
+using ::android::hardware::ir::V1_0::ConsumerIrFreqRange;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::sp;
+
+// The main test class for IR HIDL HAL.
+class ConsumerIrHidlTest : public ::testing::Test {
+ public:
+  virtual void SetUp() override {
+    ir = IConsumerIr::getService(false);
+    ASSERT_NE(ir, nullptr);
+  }
+
+  virtual void TearDown() override {}
+
+  sp<IConsumerIr> ir;
+};
+
+// 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) {
+    ranges = v;
+    success = s;
+  };
+  Return<void> ret = ir->getCarrierFreqs(cb);
+  ASSERT_TRUE(ret.isOk());
+  ASSERT_TRUE(success);
+
+  if (ranges.size() > 0) {
+    uint32_t len = 16;
+    hidl_vec<int32_t> vec;
+    vec.resize(len);
+    std::fill(vec.begin(), vec.end(), 1);
+    for (auto range = ranges.begin(); range != ranges.end(); range++) {
+      EXPECT_TRUE(ir->transmit(range->min, vec));
+      EXPECT_TRUE(ir->transmit(range->max, vec));
+    }
+  }
+}
+
+// Test transmit() when called with invalid frequencies
+TEST_F(ConsumerIrHidlTest, BadFreqTest) {
+  uint32_t len = 16;
+  hidl_vec<int32_t> vec;
+  vec.resize(len);
+  std::fill(vec.begin(), vec.end(), 1);
+  EXPECT_FALSE(ir->transmit(-1, vec));
+  EXPECT_FALSE(ir->transmit(0, vec));
+}
+
+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/boot/Android.mk b/ir/1.0/vts/functional/vts/testcases/hal/ir/hidl/target/Android.mk
similarity index 79%
copy from boot/Android.mk
copy to ir/1.0/vts/functional/vts/testcases/hal/ir/hidl/target/Android.mk
index f9e3276..a69fd08 100644
--- a/boot/Android.mk
+++ b/ir/1.0/vts/functional/vts/testcases/hal/ir/hidl/target/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalIrHidlTargetTest
+VTS_CONFIG_SRC_DIR := testcases/hal/ir/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/ir/1.0/vts/functional/vts/testcases/hal/ir/hidl/target/AndroidTest.xml b/ir/1.0/vts/functional/vts/testcases/hal/ir/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..3ad7e45
--- /dev/null
+++ b/ir/1.0/vts/functional/vts/testcases/hal/ir/hidl/target/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS IR HIDL HAL's target-side test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="HalIrHidlTargetTest"/>
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/ir_hidl_hal_test/ir_hidl_hal_test,
+            _64bit::DATA/nativetest64/ir_hidl_hal_test/ir_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="hal_hidl_gtest" />
+        <option name="hwbinder-service" value="android.hardware.ir" />
+        <option name="test-timeout" value="1m" />
+    </test>
+</configuration>
diff --git a/ir/1.0/vts/types.vts b/ir/1.0/vts/types.vts
new file mode 100644
index 0000000..d308b1f
--- /dev/null
+++ b/ir/1.0/vts/types.vts
@@ -0,0 +1,21 @@
+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"
+    }
+}
\ No newline at end of file
diff --git a/ir/Android.bp b/ir/Android.bp
index ba90f2c..ed19a37 100644
--- a/ir/Android.bp
+++ b/ir/Android.bp
@@ -2,4 +2,5 @@
 subdirs = [
     "1.0",
     "1.0/default",
+    "1.0/vts/functional",
 ]
diff --git a/power/Android.mk b/ir/Android.mk
similarity index 100%
rename from power/Android.mk
rename to ir/Android.mk
diff --git a/keymaster/3.0/types.hal b/keymaster/3.0/types.hal
index e99e9c8..7123e57 100644
--- a/keymaster/3.0/types.hal
+++ b/keymaster/3.0/types.hal
@@ -241,6 +241,7 @@
     SIGN = 2,       /* Usable with RSA, EC and HMAC keys. */
     VERIFY = 3,     /* Usable with RSA, EC and HMAC keys. */
     DERIVE_KEY = 4, /* Usable with EC keys. */
+    WRAP_KEY = 5,   /* Usable with wrapping keys. */
 };
 
 /**
diff --git a/light/2.0/default/service.cpp b/light/2.0/default/service.cpp
index b3848e9..70ae565 100644
--- a/light/2.0/default/service.cpp
+++ b/light/2.0/default/service.cpp
@@ -23,5 +23,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<ILight>("light");
+    return defaultPassthroughServiceImplementation<ILight>();
 }
diff --git a/light/2.0/vts/functional/light_hidl_hal_test.cpp b/light/2.0/vts/functional/light_hidl_hal_test.cpp
index 9b9f543..71a8b4e 100644
--- a/light/2.0/vts/functional/light_hidl_hal_test.cpp
+++ b/light/2.0/vts/functional/light_hidl_hal_test.cpp
@@ -34,15 +34,13 @@
 using ::android::hardware::Void;
 using ::android::sp;
 
-#define LIGHT_SERVICE_NAME "light"
-
 #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(LIGHT_SERVICE_NAME);
+        light = ILight::getService();
 
         ASSERT_NE(light, nullptr);
         LOG(INFO) << "Test is remote " << light->isRemote();
diff --git a/light/Android.mk b/light/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/light/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/memtrack/1.0/default/Memtrack.cpp b/memtrack/1.0/default/Memtrack.cpp
index 5c1a5c4..fa09c25 100644
--- a/memtrack/1.0/default/Memtrack.cpp
+++ b/memtrack/1.0/default/Memtrack.cpp
@@ -79,7 +79,7 @@
     memtrack_module_t *memtrack_module = NULL;
 
     ret = hw_get_module(name, &hw_module);
-    if (ret == 0 && hw_module->methods->open > 0)
+    if (ret == 0 && hw_module->methods->open)
     {
         ret = hw_module->methods->open(hw_module, name,
                 reinterpret_cast<hw_device_t**>(&memtrack_module));
diff --git a/memtrack/Android.mk b/memtrack/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/memtrack/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index 9d05fc2..3bd5e41 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -65,7 +65,7 @@
         }
     }
     else
-        ALOGE ("hw_get_module failed: %d", ret);
+        ALOGE ("hw_get_module %s failed: %d", NFC_NCI_HARDWARE_MODULE_ID, ret);
 
     if (ret == 0) {
         return new Nfc(nfc_device);
diff --git a/nfc/1.0/default/service.cpp b/nfc/1.0/default/service.cpp
index 32f9c28..731acd5 100644
--- a/nfc/1.0/default/service.cpp
+++ b/nfc/1.0/default/service.cpp
@@ -9,5 +9,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<INfc>("nfc_nci");
+    return defaultPassthroughServiceImplementation<INfc>();
 }
diff --git a/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp b/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp
index f5ed4d7..a50d88f 100644
--- a/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp
+++ b/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp
@@ -37,8 +37,6 @@
 using ::android::hardware::hidl_vec;
 using ::android::sp;
 
-#define NFC_NCI_SERVICE_NAME "nfc_nci"
-
 /* NCI Commands */
 #define CORE_RESET_CMD \
   { 0x20, 0x00, 0x01, 0x00 }
@@ -55,13 +53,11 @@
 #define VERSION 0x11
 #define TIMEOUT_PERIOD 5
 
-static bool passthrough = true;
-
 // The main test class for NFC HIDL HAL.
 class NfcHidlTest : public ::testing::Test {
  public:
   virtual void SetUp() override {
-    nfc_ = INfc::getService(NFC_NCI_SERVICE_NAME, passthrough);
+    nfc_ = INfc::getService();
     ASSERT_NE(nfc_, nullptr);
 
     nfc_cb_ = new NfcClientCallback(*this);
@@ -338,12 +334,6 @@
   ::testing::AddGlobalTestEnvironment(new NfcHidlEnvironment);
   ::testing::InitGoogleTest(&argc, argv);
 
-  for (int i = 0; i < argc; i++) {
-    if (strstr(argv[i], "passthrough=false") != nullptr) {
-      passthrough = false;
-      break;
-    }
-  }
   std::system("svc nfc disable"); /* Turn off NFC */
   sleep(5);
 
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
index f2f17f4..cb40931 100644
--- a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
@@ -54,7 +54,6 @@
             target_version=1.0,
             target_package="android.hardware.nfc",
             target_component_name="INfc",
-            hw_binder_service_name="nfc_nci",
             bits=64 if self.dut.is64Bit else 32)
 
     def tearDownClass(self):
diff --git a/nfc/Android.mk b/nfc/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/nfc/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/power/1.0/default/Power.cpp b/power/1.0/default/Power.cpp
index 656a2ae..6233a14 100644
--- a/power/1.0/default/Power.cpp
+++ b/power/1.0/default/Power.cpp
@@ -40,14 +40,14 @@
 
 // Methods from ::android::hardware::power::V1_0::IPower follow.
 Return<void> Power::setInteractive(bool interactive)  {
-    if (mModule->setInteractive > 0)
+    if (mModule->setInteractive)
         mModule->setInteractive(mModule, interactive ? 1 : 0);
     return Void();
 }
 
 Return<void> Power::powerHint(PowerHint hint, int32_t data)  {
     int32_t param = data;
-    if (mModule->powerHint > 0) {
+    if (mModule->powerHint) {
         if (data)
             mModule->powerHint(mModule, static_cast<power_hint_t>(hint), &param);
         else
@@ -57,7 +57,7 @@
 }
 
 Return<void> Power::setFeature(Feature feature, bool activate)  {
-    if (mModule->setFeature > 0)
+    if (mModule->setFeature)
         mModule->setFeature(mModule, static_cast<feature_t>(feature),
                 activate ? 1 : 0);
     return Void();
@@ -79,7 +79,7 @@
     }
 
     number_platform_modes = mModule->get_number_of_platform_modes(mModule);
-    if (number_platform_modes > 0)
+    if (number_platform_modes)
     {
        if (SIZE_MAX / sizeof(size_t) <= number_platform_modes)  // overflow
            goto done;
@@ -149,7 +149,7 @@
     const hw_module_t* hw_module = NULL;
     power_module_t *power_module;
     ret = hw_get_module(name, &hw_module);
-    if (ret == 0 && hw_module->methods->open > 0) {
+    if (ret == 0 && hw_module->methods->open) {
         ret = hw_module->methods->open(hw_module, name,
                 reinterpret_cast<hw_device_t**>(&power_module));
         if (ret == 0) {
diff --git a/radio/1.0/types.hal b/radio/1.0/types.hal
index 941a59e..593dc92 100644
--- a/radio/1.0/types.hal
+++ b/radio/1.0/types.hal
@@ -109,8 +109,8 @@
     INVALID_SMSC_ADDRESS = 58,            // SMSC address specified is invalid
     NO_SUCH_ENTRY = 59,                   // No such entry present to perform the request
     NETWORK_NOT_READY = 60,               // Network is not ready to perform the request
-    NOT_PROVISIONED = 61,                 // Device doesnot have this value provisioned
-    NO_SUBSCRIPTION = 62,                 // Device doesnot have subscription
+    NOT_PROVISIONED = 61,                 // Device does not have this value provisioned
+    NO_SUBSCRIPTION = 62,                 // Device does not have subscription
     NO_NETWORK_FOUND = 63,                // Network cannot be found
     DEVICE_IN_USE = 64,                   // Operation cannot be performed because the device
                                           // is currently in use
@@ -223,7 +223,7 @@
     RUIM_CORPORATE,
     RUIM_SERVICE_PROVIDER,
     RUIM_RUIM,
-    RUIM_NETWORK1_PUK,                   // The corresponding perso lock is blocked
+    RUIM_NETWORK1_PUK,                    // The corresponding perso lock is blocked
     RUIM_NETWORK2_PUK,
     RUIM_HRPD_PUK,
     RUIM_CORPORATE_PUK,
@@ -232,7 +232,7 @@
 };
 
 enum RadioState : int32_t {
-    OFF = 0,                              // Radio explictly powered off (eg CFUN=0)
+    OFF = 0,                              // Radio explicitly powered off (eg CFUN=0)
     UNAVAILABLE = 1,                      // Radio unavailable (eg, resetting or not booted)
     ON = 10,                              // Radio is ON
 };
@@ -242,17 +242,17 @@
     CONNECT_FAILURE,
     MSG_SIZE_TOO_LARGE,
     MSG_SIZE_TOO_SMALL,
-    CONNECT_OK_CALL_ONGOING
+    CONNECT_OK_CALL_ONGOING,
 };
 
 enum SapDisconnectType : int32_t {
     GRACEFUL,
-    IMMEDIATE
+    IMMEDIATE,
 };
 
 enum SapApduType : int32_t {
     APDU,
-    APDU7816
+    APDU7816,
 };
 
 enum SapResultCode : int32_t {
@@ -263,7 +263,7 @@
     CARD_REMOVED,
     CARD_ALREADY_POWERED_ON,
     DATA_NOT_AVAILABLE,
-    NOT_SUPPORTED
+    NOT_SUPPORTED,
 };
 
 enum SapStatus : int32_t {
@@ -272,21 +272,21 @@
     CARD_NOT_ACCESSIBLE,
     CARD_REMOVED,
     CARD_INSERTED,
-    RECOVERED
+    RECOVERED,
 };
 
 enum SapTransferProtocol : int32_t {
     T0,
-    T1
+    T1,
 };
 
 enum CallState : int32_t {
     ACTIVE,
     HOLDING,
-    DIALING,                             // MO call only
-    ALERTING,                            // MO call only
-    INCOMING,                            // MT call only
-    WAITING,                             // MT call only
+    DIALING,                              // MO call only
+    ALERTING,                             // MO call only
+    INCOMING,                             // MT call only
+    WAITING,                              // MT call only
 };
 
 /*
@@ -311,7 +311,7 @@
     USP,                                  // User specified protocol
     OSIHLP,                               // OSI higher layer protocol
     X244,                                 // X.244
-    RMCF,                                 // Reserved for system mangement convergence function
+    RMCF,                                 // Reserved for system management convergence function
     IA5C,                                 // IA5 characters
 };
 
@@ -323,9 +323,9 @@
 };
 
 enum Clir : int32_t {
-    DEFAULT,                               // "use subscription default value"
-    INVOCATION,                            // restrict CLI presentation
-    SUPPRESSION,                           // allow CLI presentation
+    DEFAULT,                              // "use subscription default value"
+    INVOCATION,                           // restrict CLI presentation
+    SUPPRESSION,                          // allow CLI presentation
 };
 
 enum LastCallFailCause : int32_t {
@@ -519,7 +519,7 @@
                                           // emergency calls are enabled.
     REG_DENIED_EM,                        // Same as REG_DENIED but indicates that
                                           // emergency calls are enabled.
-    UNKNOWN_EM                            // Same as UNKNOWN but indicates that
+    UNKNOWN_EM,                           // Same as UNKNOWN but indicates that
                                           // emergency calls are enabled.
 };
 
@@ -539,8 +539,8 @@
     EVDO_B = 12,
     EHRPD = 13,
     LTE = 14,
-    HSPAP = 15,                            // HSPA+
-    GSM = 16,                              // Only supports voice
+    HSPAP = 15,                           // HSPA+
+    GSM = 16,                             // Only supports voice
     TD_SCDMA = 17,
     IWLAN = 18,
     LTE_CA = 19,
@@ -557,7 +557,7 @@
 };
 
 enum SmsAcknowledgeFailCause : int32_t {
-    MEMORY_CAPAPCITY_EXCEEDED = 0xD3,
+    MEMORY_CAPACITY_EXCEEDED = 0xD3,
     UNSPECIFIED_ERROR = 0XFF,
 };
 
@@ -572,7 +572,7 @@
 enum ClipStatus : int32_t {
     CLIP_PROVISIONED,                     // CLIP provisioned
     CLIP_UNPROVISIONED,                   // CLIP not provisioned
-    UNKOWN,                               // unknown, e.g. no network etc
+    UNKNOWN,                              // unknown, e.g. no network etc
 };
 
 enum SmsWriteArgsStatus : int32_t {
@@ -659,63 +659,63 @@
 
 enum NvItem : int32_t {
     // CDMA radio and account information (items 1-10)
-    CDMA_MEID = 1,                       // CDMA MEID (hex)
-    CDMA_MIN = 2,                        // CDMA MIN (MSID)
-    CDMA_MDN = 3,                        // CDMA MDN
-    CDMA_ACCOLC = 4,                     // CDMA access overload control
+    CDMA_MEID = 1,                        // CDMA MEID (hex)
+    CDMA_MIN = 2,                         // CDMA MIN (MSID)
+    CDMA_MDN = 3,                         // CDMA MDN
+    CDMA_ACCOLC = 4,                      // CDMA access overload control
 
     // Carrier device provisioning (items 11-30)
-    DEVICE_MSL = 11,                     // device MSL
-    RTN_RECONDITIONED_STATUS = 12,       // RTN reconditioned status
-    RTN_ACTIVATION_DATE = 13,            // RTN activation date
-    RTN_LIFE_TIMER = 14,                 // RTN life timer
-    RTN_LIFE_CALLS = 15,                 // RTN life calls
-    RTN_LIFE_DATA_TX = 16,               // RTN life data TX
-    RTN_LIFE_DATA_RX = 17,               // RTN life data RX
-    OMADM_HFA_LEVEL = 18,                // HFA in progress
+    DEVICE_MSL = 11,                      // device MSL
+    RTN_RECONDITIONED_STATUS = 12,        // RTN reconditioned status
+    RTN_ACTIVATION_DATE = 13,             // RTN activation date
+    RTN_LIFE_TIMER = 14,                  // RTN life timer
+    RTN_LIFE_CALLS = 15,                  // RTN life calls
+    RTN_LIFE_DATA_TX = 16,                // RTN life data TX
+    RTN_LIFE_DATA_RX = 17,                // RTN life data RX
+    OMADM_HFA_LEVEL = 18,                 // HFA in progress
 
     // Mobile IP profile information (items 31-50)
-    MIP_PROFILE_NAI = 31,                // NAI realm
-    MIP_PROFILE_HOME_ADDRESS = 32,       // MIP home address
-    MIP_PROFILE_AAA_AUTH = 33,           // AAA auth
-    MIP_PROFILE_HA_AUTH = 34,            // HA auth
-    MIP_PROFILE_PRI_HA_ADDR = 35,        // primary HA address
-    MIP_PROFILE_SEC_HA_ADDR = 36,        // secondary HA address
-    MIP_PROFILE_REV_TUN_PREF = 37,       // reverse TUN preference
-    MIP_PROFILE_HA_SPI = 38,             // HA SPI
-    MIP_PROFILE_AAA_SPI = 39,            // AAA SPI
-    MIP_PROFILE_MN_HA_SS = 40,           // HA shared secret
-    MIP_PROFILE_MN_AAA_SS = 41,          // AAA shared secret
+    MIP_PROFILE_NAI = 31,                 // NAI realm
+    MIP_PROFILE_HOME_ADDRESS = 32,        // MIP home address
+    MIP_PROFILE_AAA_AUTH = 33,            // AAA auth
+    MIP_PROFILE_HA_AUTH = 34,             // HA auth
+    MIP_PROFILE_PRI_HA_ADDR = 35,         // primary HA address
+    MIP_PROFILE_SEC_HA_ADDR = 36,         // secondary HA address
+    MIP_PROFILE_REV_TUN_PREF = 37,        // reverse TUN preference
+    MIP_PROFILE_HA_SPI = 38,              // HA SPI
+    MIP_PROFILE_AAA_SPI = 39,             // AAA SPI
+    MIP_PROFILE_MN_HA_SS = 40,            // HA shared secret
+    MIP_PROFILE_MN_AAA_SS = 41,           // AAA shared secret
 
     // CDMA network and band config (items 51-70)
-    CDMA_PRL_VERSION = 51,               // CDMA PRL version
-    CDMA_BC10 = 52,                      // CDMA band class 10
-    CDMA_BC14 = 53,                      // CDMA band class 14
-    CDMA_SO68 = 54,                      // CDMA SO68
-    CDMA_SO73_COP0 = 55,                 // CDMA SO73 COP0
-    CDMA_SO73_COP1TO7 = 56,              // CDMA SO73 COP1-7
-    CDMA_1X_ADVANCED_ENABLED = 57,       // CDMA 1X Advanced enabled
-    CDMA_EHRPD_ENABLED = 58,             // CDMA eHRPD enabled
-    CDMA_EHRPD_FORCED = 59,              // CDMA eHRPD forced
+    CDMA_PRL_VERSION = 51,                // CDMA PRL version
+    CDMA_BC10 = 52,                       // CDMA band class 10
+    CDMA_BC14 = 53,                       // CDMA band class 14
+    CDMA_SO68 = 54,                       // CDMA SO68
+    CDMA_SO73_COP0 = 55,                  // CDMA SO73 COP0
+    CDMA_SO73_COP1TO7 = 56,               // CDMA SO73 COP1-7
+    CDMA_1X_ADVANCED_ENABLED = 57,        // CDMA 1X Advanced enabled
+    CDMA_EHRPD_ENABLED = 58,              // CDMA eHRPD enabled
+    CDMA_EHRPD_FORCED = 59,               // CDMA eHRPD forced
 
     // LTE network and band config (items 71-90)
-    LTE_BAND_ENABLE_25 = 71,             // LTE band 25 enable
-    LTE_BAND_ENABLE_26 = 72,             // LTE band 26 enable
-    LTE_BAND_ENABLE_41 = 73,             // LTE band 41 enable
+    LTE_BAND_ENABLE_25 = 71,              // LTE band 25 enable
+    LTE_BAND_ENABLE_26 = 72,              // LTE band 26 enable
+    LTE_BAND_ENABLE_41 = 73,              // LTE band 41 enable
 
-    LTE_SCAN_PRIORITY_25 = 74,           // LTE band 25 scan priority
-    LTE_SCAN_PRIORITY_26 = 75,           // LTE band 26 scan priority
-    LTE_SCAN_PRIORITY_41 = 76,           // LTE band 41 scan priority
+    LTE_SCAN_PRIORITY_25 = 74,            // LTE band 25 scan priority
+    LTE_SCAN_PRIORITY_26 = 75,            // LTE band 26 scan priority
+    LTE_SCAN_PRIORITY_41 = 76,            // LTE band 41 scan priority
 
-    LTE_HIDDEN_BAND_PRIORITY_25 = 77,    // LTE hidden band 25 priority
-    LTE_HIDDEN_BAND_PRIORITY_26 = 78,    // LTE hidden band 26 priority
-    LTE_HIDDEN_BAND_PRIORITY_41 = 79,    // LTE hidden band 41 priority
+    LTE_HIDDEN_BAND_PRIORITY_25 = 77,     // LTE hidden band 25 priority
+    LTE_HIDDEN_BAND_PRIORITY_26 = 78,     // LTE hidden band 26 priority
+    LTE_HIDDEN_BAND_PRIORITY_41 = 79,     // LTE hidden band 41 priority
 };
 
 enum ResetNvType : int32_t {
-    RELOAD,                              // reload all NV items
-    ERASE,                               // erase NV reset (SCRTN)
-    FACORY_RESET,                        // factory reset (RTN)
+    RELOAD,                               // reload all NV items
+    ERASE,                                // erase NV reset (SCRTN)
+    FACTORY_RESET,                        // factory reset (RTN)
 };
 
 enum HardwareConfigType : int32_t {
@@ -736,11 +736,11 @@
 };
 
 enum CarrierMatchType : int32_t {
-    ALL = 0,                               // Apply to all carriers with the same mcc/mnc
-    SPN = 1,                               // Use SPN and mcc/mnc to identify the carrier
-    IMSI_PREFIX = 2,                       // Use IMSI prefix and mcc/mnc to identify the carrier
-    GID1 = 3,                              // Use GID1 and mcc/mnc to identify the carrier
-    GID2 = 4,                              // Use GID2 and mcc/mnc to identify the carrier
+    ALL = 0,                              // Apply to all carriers with the same mcc/mnc
+    SPN = 1,                              // Use SPN and mcc/mnc to identify the carrier
+    IMSI_PREFIX = 2,                      // Use IMSI prefix and mcc/mnc to identify the carrier
+    GID1 = 3,                             // Use GID1 and mcc/mnc to identify the carrier
+    GID2 = 4,                             // Use GID2 and mcc/mnc to identify the carrier
 };
 
 struct NeighboringCell {
@@ -804,8 +804,8 @@
 };
 
 enum CdmaSmsSubaddressType : int32_t {
-    NSAP,                                // CCITT X.213 or ISO 8348 AD2
-    USER_SPECIFIED,                      // e.g. X.25
+    NSAP,                                 // CCITT X.213 or ISO 8348 AD2
+    USER_SPECIFIED,                       // e.g. X.25
 };
 
 enum CdmaSmsErrorClass : int32_t {
@@ -849,30 +849,30 @@
 };
 
 enum RadioCapabilityPhase : int32_t {
-    CONFIGURED = 0,                      // Logical Modem's (LM)  initial value
-                                         // and value after FINISH completes
-    START      = 1,                      // START is sent before APPLY and indicates that an
-                                         // APPLY is forthcoming with these same parameters
-    APPLY      = 2,                      // APPLY is sent after all LM's receive START and returned
-                                         // RadioCapability.status = 0. If any START's fail, hal
-                                         // implementation must not send APPLY.
-    UNSOL_RSP  = 3,                      // UNSOL_RSP is sent with unsol radioCapability()
-    FINISH     = 4                       // FINISH is sent after all commands have completed. If an
-                                         // error occurs in any previous command, the
-                                         // RadioAccessesFamily and logicalModemUuid fields must be
-                                         // the prior configuration thus restoring the configuration
-                                         // to the previous value. An error returned by FINISH
-                                         // will generally be ignored or may cause that logical
-                                         // modem to be removed from service.
+    CONFIGURED = 0,                       // Logical Modem's (LM)  initial value
+                                          // and value after FINISH completes
+    START      = 1,                       // START is sent before APPLY and indicates that an
+                                          // APPLY is forthcoming with these same parameters
+    APPLY      = 2,                       // APPLY is sent after all LM's receive START and returned
+                                          // RadioCapability.status = 0. If any START's fail, hal
+                                          // implementation must not send APPLY.
+    UNSOL_RSP  = 3,                       // UNSOL_RSP is sent with unsolicited radioCapability()
+    FINISH     = 4                        // FINISH is sent after all commands have completed. If an
+                                          // error occurs in any previous command, the
+                                          // RadioAccessesFamily and logicalModemUuid fields must be
+                                          // the prior configuration thus restoring the
+                                          // configuration to the previous value. An error returned
+                                          // by FINISH will generally be ignored or may cause that
+                                          // logical modem to be removed from service.
 };
 
 enum RadioCapabilityStatus : int32_t {
-    NONE       = 0,                      // This parameter has no meaning with
-                                         // RadioCapabilityPhase:START, RadioCapabilityPhase:APPLY
-    SUCCESS    = 1,                      // Tell modem the action transaction of set radio
-                                         // capability was success with RadioCapabilityPhase:FINISH
-    FAIL       = 2,                      // Tell modem the action transaction of set radio
-                                         // capability is fail with RadioCapabilityPhase:FINISH.
+    NONE       = 0,                       // This parameter has no meaning with
+                                          // RadioCapabilityPhase:START, RadioCapabilityPhase:APPLY
+    SUCCESS    = 1,                       // Tell modem the action transaction of set radio
+                                          // capability was success with RadioCapabilityPhase:FINISH
+    FAIL       = 2,                       // Tell modem the action transaction of set radio
+                                          // capability is fail with RadioCapabilityPhase:FINISH.
 };
 
 enum RadioAccessFamily : int32_t {
@@ -898,19 +898,19 @@
 };
 
 enum UssdModeType : int32_t {
-    NOTIFY,                                // USSD-Notify
-    REQUEST,                               // USSD-Request
-    NW_RELEASE,                            // Session terminated by network
-    LOCAL_CLIENT,                          // other local client (eg, SIM Toolkit) has responded
-    NOT_SUPPORTED,                         // Operation not supported
-    NW_TIMEOUT,                            // Network timeout
+    NOTIFY,                               // USSD-Notify
+    REQUEST,                              // USSD-Request
+    NW_RELEASE,                           // Session terminated by network
+    LOCAL_CLIENT,                         // other local client (eg, SIM Toolkit) has responded
+    NOT_SUPPORTED,                        // Operation not supported
+    NW_TIMEOUT,                           // Network timeout
 };
 
 enum SimRefreshType : int32_t {
-    SIM_FILE_UPDATE = 0,                   // A file on SIM has been updated.
-    SIM_INIT = 1,                          // SIM initialized. All files should be re-read.
-    SIM_RESET = 2                          // SIM reset. SIM power required, SIM may be locked a
-                                           // nd all files must be re-read.
+    SIM_FILE_UPDATE = 0,                  // A file on SIM has been updated.
+    SIM_INIT = 1,                         // SIM initialized. All files should be re-read.
+    SIM_RESET = 2                         // SIM reset. SIM power required, SIM may be locked a
+                                          // nd all files must be re-read.
 };
 
 enum SrvccState :int32_t {
@@ -938,15 +938,15 @@
 };
 
 enum PhoneRestrictedState : int32_t {
-    NONE = 0x00,                           // No restriction at all including voice/SMS/USSD/SS/AV64
-                                           // and packet data
-    CS_EMERGENCY = 0x01,                   // Block emergency call due to restriction. But allow all
-                                           // normal voice/SMS/USSD/SS/AV64.
-    CS_NORMAL = 0x02,                      // Block all normal voice/SMS/USSD/SS/AV64 due to
-                                           // restriction. Only Emergency call allowed.
-    CS_ALL = 0x04,                         // Block all voice/SMS/USSD/SS/AV64 including emergency
-                                           // call due to restriction.
-    PS_ALL = 0x10                          // Block packet data access due to restriction.
+    NONE = 0x00,                          // No restriction at all including voice/SMS/USSD/SS/AV64
+                                          // and packet data
+    CS_EMERGENCY = 0x01,                  // Block emergency call due to restriction. But allow all
+                                          // normal voice/SMS/USSD/SS/AV64.
+    CS_NORMAL = 0x02,                     // Block all normal voice/SMS/USSD/SS/AV64 due to
+                                          // restriction. Only Emergency call allowed.
+    CS_ALL = 0x04,                        // Block all voice/SMS/USSD/SS/AV64 including emergency
+                                          // call due to restriction.
+    PS_ALL = 0x10                         // Block packet data access due to restriction.
 };
 
 enum CdmaCallWaitingNumberPresentation : int32_t {
@@ -1199,7 +1199,7 @@
 };
 
 struct TdScdmaSignalStrength {
-    uint32_t rscp;                        // The Received Signal Code Power in dBm multipled by -1.
+    uint32_t rscp;                        // The Received Signal Code Power in dBm multiplied by -1.
                                           // Range : 25 to 120
                                           // INT_MAX: 0x7FFFFFFF denotes invalid value.
                                           // Reference: 3GPP TS 25.123, section 9.1.1.1
@@ -1228,7 +1228,7 @@
     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.
-                                          // The unit is miliseconds.
+                                          // The unit is milliseconds.
                                           // The value < 0 means no value is suggested.
                                           // The value 0 means retry must be done ASAP.
                                           // The value of INT_MAX(0x7fffffff) means no retry.
@@ -1266,7 +1266,7 @@
     int32_t command;                      // one of the commands listed for TS 27.007 +CRSM
     int32_t fileId;                       // EF id
     string path;                          // "pathid" from TS 27.007 +CRSM command.
-                                          // Path is in hex asciii format eg "7f205f70"
+                                          // Path is in hex ascii format eg "7f205f70"
                                           // Path must always be provided.
     int32_t p1;                           // Values of p1, p2 and p3 defined as per 3GPP TS 51.011
     int32_t p2;
@@ -1385,7 +1385,7 @@
     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 "Additonal cause codes for GMM".
+                                          // 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
@@ -1415,7 +1415,7 @@
     int32_t serviceClass;                 // From 27.007 +CCFC/+CLCK "class"
                                           // See table for Android mapping from
                                           // MMI service code
-                                          // 0 means user doesnt input class
+                                          // 0 means user doesn't input class
     int32_t toa;                          // "type" from TS 27.007 7.11
     string number;                        // "number" from TS 27.007 7.11.
     int32_t timeSeconds;
@@ -1439,27 +1439,27 @@
 };
 
 struct CdmaSmsAddress {
-    CdmaSmsDigitMode digitMode;          // CdmaSmsDigitMode is of two types : 4 bit and 8 bit.
-                                         // For 4-bit type, only "digits" field defined below in
-                                         // this struct is used.
-    CdmaSmsNumberMode numberMode;        // Used only when digitMode is 8-bit
-    CdmaSmsNumberType numberType;        // Used only when digitMode is 8-bit.
-                                         // To specify an international address, use the following:
-                                         // digitMode = CdmaSmsDigitMode:EIGHT_BIT:
-                                         // numberMode = CdmaSmsNumberMode:NOT_DATA_NETWORK
-                                         // numberType = CdmaSmsNumberType:INTERNATIONAL_OR_DATA_IP
-                                         // numberPlan = CdmaSmsNumberPlan:TELEPHONY
-                                         // numberOfDigits = number of digits
-                                         // digits = ASCII digits, e.g. '1', '2', '3', '4', and '5'
-    CdmaSmsNumberPlan numberPlan;        // Used only when digitMode is 8-bit
-    vec<uint8_t> digits;                 // Each byte in this array represents a 4 bit or 8-bit digit
-                                         // of address data
+    CdmaSmsDigitMode digitMode;           // CdmaSmsDigitMode is of two types : 4 bit and 8 bit.
+                                          // For 4-bit type, only "digits" field defined below in
+                                          // this struct is used.
+    CdmaSmsNumberMode numberMode;         // Used only when digitMode is 8-bit
+    CdmaSmsNumberType numberType;         // Used only when digitMode is 8-bit.
+                                          // To specify an international address, use the following:
+                                          // digitMode = CdmaSmsDigitMode:EIGHT_BIT:
+                                          // numberMode = CdmaSmsNumberMode:NOT_DATA_NETWORK
+                                          // numberType = CdmaSmsNumberType:INTERNATIONAL_OR_DATA_IP
+                                          // numberPlan = CdmaSmsNumberPlan:TELEPHONY
+                                          // numberOfDigits = number of digits
+                                          // digits = ASCII digits, e.g. '1', '2', '3', '4', and '5'
+    CdmaSmsNumberPlan numberPlan;         // Used only when digitMode is 8-bit
+    vec<uint8_t> digits;                  // Each byte in this array represents a 4 bit or 8-bit
+                                          // digit of address data
 };
 
 struct CdmaSmsSubaddress {
     CdmaSmsSubaddressType subaddressType;
-    bool odd;                            // true means the last byte's lower 4 bits must be ignored
-    vec<uint8_t> digits;                 // Each byte respresents an 8-bit digit of subaddress data
+    bool odd;                             // true means the last byte's lower 4 bits must be ignored
+    vec<uint8_t> digits;                  // Each byte represents an 8-bit digit of subaddress data
 };
 
 struct CdmaSmsMessage {
@@ -1468,29 +1468,29 @@
     int32_t serviceCategory;
     CdmaSmsAddress address;
     CdmaSmsSubaddress subAddress;
-    vec<uint8_t> bearerData;             // 3GPP2 C.S0015-B, v2.0,
+    vec<uint8_t> bearerData;              // 3GPP2 C.S0015-B, v2.0,
 };
 
 struct CdmaSmsAck {
     CdmaSmsErrorClass errorClass;
-    int32_t smsCauseCode;                // As defined in N.S00005, 6.5.2.125.
-                                         // Currently, only 35 (resource shortage) and
-                                         // 39 (other terminal problem) are reported.
+    int32_t smsCauseCode;                 // As defined in N.S00005, 6.5.2.125.
+                                          // Currently, only 35 (resource shortage) and
+                                          // 39 (other terminal problem) are reported.
 };
 
 struct CdmaBroadcastSmsConfigInfo {
-    int32_t serviceCategory;             // serviceCategory defines a Broadcast message identifier
-                                         // whose value is 0x0000 - 0xFFFF as defined in
-                                         // C.R1001G 9.3.1 and 9.3.2.
-    int32_t language;                    // language code of Broadcast Message
-                                         // whose value is 0x00 - 0x07 as defined in C.R1001G 9.2.
-    bool selected;                       // selected false means message types specified in
-                                         // serviceCategory are not accepted, while true means
-                                         // accepted.
+    int32_t serviceCategory;              // serviceCategory defines a Broadcast message identifier
+                                          // whose value is 0x0000 - 0xFFFF as defined in
+                                          // C.R1001G 9.3.1 and 9.3.2.
+    int32_t language;                     // language code of Broadcast Message
+                                          // whose value is 0x00 - 0x07 as defined in C.R1001G 9.2.
+    bool selected;                        // selected false means message types specified in
+                                          // serviceCategory are not accepted, while true means
+                                          // accepted.
 };
 
 struct CdmaSmsWriteArgs {
-    CdmaSmsWriteArgsStatus status;       // Status of message. See TS 27.005 3.1
+    CdmaSmsWriteArgsStatus status;        // Status of message. See TS 27.005 3.1
     CdmaSmsMessage message;
 };
 
@@ -1520,68 +1520,68 @@
 };
 
 struct CellIdentityGsm {
-    string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
-    string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
-                                         // unknown
-    int32_t lac;                         // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
-    int32_t cid;                         // 16-bit GSM Cell Identity described in
-                                         // TS 27.007, 0..65535, INT_MAX if unknown
-    int32_t arfcn;                       // 16-bit GSM Absolute RF channel number, INT_MAX if
-                                         // unknown
-    uint8_t bsic;                        // 6-bit Base Station Identity Code, 0xFF if unknown
+    string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
+    string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
+                                          // unknown
+    int32_t lac;                          // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
+    int32_t cid;                          // 16-bit GSM Cell Identity described in
+                                          // TS 27.007, 0..65535, INT_MAX if unknown
+    int32_t arfcn;                        // 16-bit GSM Absolute RF channel number, INT_MAX if
+                                          // unknown
+    uint8_t bsic;                         // 6-bit Base Station Identity Code, 0xFF if unknown
 };
 
 struct CellIdentityWcdma {
-    string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
-    string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX
-                                         // if unknown
-    int32_t lac;                         // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
-    int32_t cid;                         // 28-bit UMTS Cell Identity described in
-                                         // TS 25.331, 0..268435455, INT_MAX if unknown
-    int32_t psc;                         // 9-bit UMTS Primary Scrambling Code described in
-                                         // TS 25.331, 0..511, INT_MAX if unknown
-    int32_t uarfcn;                      // 16-bit UMTS Absolute RF Channel Number, INT_MAX if
-                                         // unknown
+    string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
+    string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX
+                                          // if unknown
+    int32_t lac;                          // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
+    int32_t cid;                          // 28-bit UMTS Cell Identity described in
+                                          // TS 25.331, 0..268435455, INT_MAX if unknown
+    int32_t psc;                          // 9-bit UMTS Primary Scrambling Code described in
+                                          // TS 25.331, 0..511, INT_MAX if unknown
+    int32_t uarfcn;                       // 16-bit UMTS Absolute RF Channel Number, INT_MAX if
+                                          // unknown
 };
 
 struct CellIdentityCdma {
-    int32_t networkId;                   // Network Id 0..65535, INT_MAX if unknown
-    int32_t systemId;                    // CDMA System Id 0..32767, INT_MAX if unknown
-    int32_t basestationId;               // Base Station Id 0..65535, INT_MAX if unknown
-    int32_t longitude;                   // 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). INT_MAX if unknown
-    int32_t latitude;                    // 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). INT_MAX if unknown
+    int32_t networkId;                    // Network Id 0..65535, INT_MAX if unknown
+    int32_t systemId;                     // CDMA System Id 0..32767, INT_MAX if unknown
+    int32_t baseStationId;                // Base Station Id 0..65535, INT_MAX if unknown
+    int32_t longitude;                    // 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). INT_MAX if unknown
+    int32_t latitude;                     // 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). INT_MAX if unknown
 };
 
 struct CellIdentityLte {
-    string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
-    string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
-                                         // unknown
-    int32_t ci;                          // 28-bit Cell Identity described in TS TS 27.007, INT_MAX
-                                         // if unknown
-    int32_t pci;                         // physical cell id 0..503, INT_MAX if unknown
-    int32_t tac;                         // 16-bit tracking area code, INT_MAX if unknown
-    int32_t earfcn;                      // 18-bit LTE Absolute RC Channel Number, INT_MAX if
-                                         // unknown
+    string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
+    string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
+                                          // unknown
+    int32_t ci;                           // 28-bit Cell Identity described in TS TS 27.007, INT_MAX
+                                          // if unknown
+    int32_t pci;                          // physical cell id 0..503, INT_MAX if unknown
+    int32_t tac;                          // 16-bit tracking area code, INT_MAX if unknown
+    int32_t earfcn;                       // 18-bit LTE Absolute RC Channel Number, INT_MAX if
+                                          // unknown
 };
 
 struct CellIdentityTdscdma {
-    string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
-    string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
-                                         // unknown
-    int32_t lac;                         // 16-bit Location Area Code, 0..65535, INT_MAX if
-                                         // unknown
-    int32_t cid;                         // 28-bit UMTS Cell Identity described in
-                                         // TS 25.331, 0..268435455, INT_MAX if unknown
-    int32_t cpid;                        // 8-bit Cell Parameters ID described in
-                                         // TS 25.331, 0..127, INT_MAX if unknown
+    string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
+    string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
+                                          // unknown
+    int32_t lac;                          // 16-bit Location Area Code, 0..65535, INT_MAX if
+                                          // unknown
+    int32_t cid;                          // 28-bit UMTS Cell Identity described in
+                                          // TS 25.331, 0..268435455, INT_MAX if unknown
+    int32_t cpid;                         // 8-bit Cell Parameters ID described in
+                                          // TS 25.331, 0..127, INT_MAX if unknown
 };
 
 struct CellInfoGsm {
@@ -1611,56 +1611,57 @@
 };
 
 struct CellInfo {
-    CellInfoType cellInfoType;           // cell type for selecting from union CellInfo
-    bool registered;                     // true if this cell is registered false if not registered
-    TimeStampType timeStampType;         // type of time stamp represented by timeStamp
-    uint64_t timeStamp;                  // Time in nanos as returned by ril_nano_time
+    CellInfoType cellInfoType;            // cell type for selecting from union CellInfo
+    bool registered;                      // true if this cell is registered false if not registered
+    TimeStampType timeStampType;          // type of time stamp represented by timeStamp
+    uint64_t timeStamp;                   // Time in nanos as returned by ril_nano_time
     // Only one of the below vectors must be of size 1 based on the CellInfoType and others must be
     // of size 0
-    vec<CellInfoGsm> gsm;                // Valid only if type = gsm and size = 1 else must be empty
-    vec<CellInfoCdma> cdma;              // Valid only if type = cdma and size = 1 else must be
-                                         // empty
-    vec<CellInfoLte> lte;                // Valid only if type = lte and size = 1 else must be
-                                         // empty
-    vec<CellInfoWcdma> wcdma;            // Valid only if type = wcdma and size = 1 else must be
-                                         // empty
-    vec<CellInfoTdscdma> tdscdma;        // Valid only if type = tdscdma and size = 1 else must be
-                                         // empty
+    vec<CellInfoGsm> gsm;                 // Valid only if type = gsm and size = 1 else must be
+                                          // empty
+    vec<CellInfoCdma> cdma;               // Valid only if type = cdma and size = 1 else must be
+                                          // empty
+    vec<CellInfoLte> lte;                 // Valid only if type = lte and size = 1 else must be
+                                          // empty
+    vec<CellInfoWcdma> wcdma;             // Valid only if type = wcdma and size = 1 else must be
+                                          // empty
+    vec<CellInfoTdscdma> tdscdma;         // Valid only if type = tdscdma and size = 1 else must be
+                                          // empty
 };
 
 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
-                                         // default SMSC
-    string pdu;                          // SMS in PDU format as an ASCII hex string less the
-                                         // SMSC address. TP-Layer-Length is be "strlen(pdu)/2
+    string smscPdu;                       // SMSC address in GSM BCD format prefixed by a length
+                                          // byte (as expected by TS 27.005) or empty string for
+                                          // default SMSC
+    string pdu;                           // SMS in PDU format as an ASCII hex string less the
+                                          // SMSC address. TP-Layer-Length is be "strlen(pdu)/2
 };
 
 struct ImsSmsMessage {
     RadioTechnologyFamily tech;
-    bool retry;                          // false == not retry, true == retry */
-    int32_t messageRef;                  // Valid field if retry is set to true.
-                                         // Contains messageRef from SendSmsResult stuct
-                                         // corresponding to failed MO SMS.
+    bool retry;                           // false == not retry, true == retry */
+    int32_t messageRef;                   // Valid field if retry is set to true.
+                                          // Contains messageRef from SendSmsResult struct
+                                          // corresponding to failed MO SMS.
     // Only one of the below vectors must be of size 1 based on the RadioTechnologyFamily and others
     // must be of size 0
-    vec<CdmaSmsMessage> cdmaMessage;     // Valid field if tech is 3GPP2 and size = 1 else must be
-                                         // empty
-    vec<GsmSmsMessage> gsmMessage;       // Valid field if tech is 3GPP and size = 1 else must be
-                                         // empty
+    vec<CdmaSmsMessage> cdmaMessage;      // Valid field if tech is 3GPP2 and size = 1 else must be
+                                          // empty
+    vec<GsmSmsMessage> gsmMessage;        // Valid field if tech is 3GPP and size = 1 else must be
+                                          // empty
 };
 
 struct SimApdu {
-    int32_t sessionId;                   // "sessionid" from TS 27.007 +CGLA command. Must be
-                                         // ignored for +CSIM command.
+    int32_t sessionId;                    // "sessionid" from TS 27.007 +CGLA command. Must be
+                                          // ignored for +CSIM command.
     // Following fields are used to derive the APDU ("command" and "length"
     // values in TS 27.007 +CSIM and +CGLA commands).
     int32_t cla;
     int32_t instruction;
     int32_t p1;
     int32_t p2;
-    int32_t p3;                          // A negative P3 implies a 4 byte APDU.
-    string data;                         // In hex string format ([a-fA-F0-9]*).
+    int32_t p3;                           // A negative P3 implies a 4 byte APDU.
+    string data;                          // In hex string format ([a-fA-F0-9]*).
 };
 
 struct NvWriteItem {
@@ -1670,160 +1671,159 @@
 
 struct SelectUiccSub {
     int32_t slot;
-    int32_t appIndex;                   // array subscriptor from
-                                        // applications[RadioConst:CARD_MAX_APPS] in
-                                        // getIccCardStatus()
+    int32_t appIndex;                     // array subscriptor from
+                                          // applications[RadioConst:CARD_MAX_APPS] in
+                                          // getIccCardStatus()
     SubscriptionType subType;
     UiccSubActStatus actStatus;
 };
 
 struct HardwareConfigModem {
     int32_t rilModel;
-    uint32_t rat;                       // bitset - ref. RadioTechnology.
+    uint32_t rat;                         // bitset - ref. RadioTechnology.
     int32_t maxVoice;
     int32_t maxData;
     int32_t maxStandby;
 };
 
 struct HardwareConfigSim {
-    string modemUuid;                   // RadioConst:MAX_UUID_LENGTH is max length of the
-                                        // string
+    string modemUuid;                     // RadioConst:MAX_UUID_LENGTH is max length of the string
 };
 
 struct HardwareConfig {
     HardwareConfigType type;
-    string uuid;                         // RadioConst:MAX_UUID_LENGTH is max length of the
-                                         // string
+    string uuid;                          // RadioConst:MAX_UUID_LENGTH is max length of the string
     HardwareConfigState state;
+
     // Only one of the below vectors must have size = 1 based on the HardwareConfigType and other
     // must have size = 0.
-    vec<HardwareConfigModem> modem;      // Valid only if type is Modem and size = 1 else must be
-                                         // empty
-    vec<HardwareConfigSim> sim;          // Valid only if type is SIM or else emptyand size = 1
-                                         // else must be empty
+    vec<HardwareConfigModem> modem;       // Valid only if type is Modem and size = 1 else must be
+                                          // empty
+    vec<HardwareConfigSim> sim;           // Valid only if type is SIM or else empty and size = 1
+                                          // else must be empty
 };
 
 struct DataProfileInfo {
-    int32_t profileId;                   // id of the data profile
-    string apn;                          // The APN to connect to
-    string protocol;                     // One of the PDP_type values in TS 27.007 section 10.1.1.
-                                         // For example, "IP", "IPV6", "IPV4V6", or "PPP".
+    int32_t profileId;                    // id of the data profile
+    string apn;                           // The APN to connect to
+    string protocol;                      // One of the PDP_type values in TS 27.007 section 10.1.1.
+                                          // For example, "IP", "IPV6", "IPV4V6", or "PPP".
     ApnAuthType authType;
-    string user;                         // The username for APN, or empty string
-    string password;                     // The password for APN, or empty string
+    string user;                          // The username for APN, or empty string
+    string password;                      // The password for APN, or empty string
     DataProfileInfoType type;
-    int32_t maxConnsTime;                // The period in seconds to limit the maximum connections
-    int32_t maxConns;                    // The maximum connections during maxConnsTime
-    int32_t waitTime;                    // The required wait time in seconds after a successful UE
-                                         // initiated disconnect of a given PDN connection before
-                                         // the device can send a new PDN connection request for
-                                         // that given PDN
-    bool enabled;                        // True to enable the profile, false to disable
+    int32_t maxConnsTime;                 // The period in seconds to limit the maximum connections
+    int32_t maxConns;                     // The maximum connections during maxConnsTime
+    int32_t waitTime;                     // The required wait time in seconds after a successful UE
+                                          // initiated disconnect of a given PDN connection before
+                                          // the device can send a new PDN connection request for
+                                          // that given PDN
+    bool enabled;                         // True to enable the profile, false to disable
 };
 
 struct RadioCapability {
-    int32_t session;                     // Unique session value defined by framework returned in
-                                         // all "responses/unsol"
+    int32_t session;                      // Unique session value defined by framework returned in
+                                          // all "responses/unsol"
     RadioCapabilityPhase phase;
-    RadioAccessFamily raf;
-    string logicalModemUuid;             // A UUID typically "com.xxxx.lmX where X is the logical
-                                         // modem. RadioConst:MAX_UUID_LENGTH is the max
-                                         // length
+    bitfield<RadioAccessFamily> raf;      // 32-bit bitmap of RadioAccessFamily
+    string logicalModemUuid;              // A UUID typically "com.xxxx.lmX where X is the logical
+                                          // modem. RadioConst:MAX_UUID_LENGTH is the max
+                                          // length
     RadioCapabilityStatus status;
 };
 
 struct LceStatusInfo {
     LceStatus lceStatus;
-    uint8_t actualIntervalMs;            // actual LCE reporting interval,
-                                         // meaningful only if LceStatus = ACTIVE.
+    uint8_t actualIntervalMs;             // actual LCE reporting interval,
+                                          // meaningful only if LceStatus = ACTIVE.
 };
 
 struct LceDataInfo {
-    uint32_t lastHopCapacityKbps;          // last-hop cellular capacity: kilobits/second.
-    uint8_t confidenceLevel;               // capacity estimate confidence: 0-100
-    bool lceSuspended;                     // LCE report going to be suspended? (e.g., radio
-                                           // moves to inactive state or network type change)
-                                           // true = suspended;
-                                           // false = not suspended.
+    uint32_t lastHopCapacityKbps;         // last-hop cellular capacity: kilobits/second.
+    uint8_t confidenceLevel;              // capacity estimate confidence: 0-100
+    bool lceSuspended;                    // LCE report going to be suspended? (e.g., radio
+                                          // moves to inactive state or network type change)
+                                          // true = suspended;
+                                          // false = not suspended.
 };
 
 struct ActivityStatsInfo {
-    uint32_t sleepModeTimeMs;              // total time (in ms) when modem is in a low power or
-                                           // sleep state
-    uint32_t idleModeTimeMs;               // total time (in ms) when modem is awake but neither
-                                           // the transmitter nor receiver are active/awake
+    uint32_t sleepModeTimeMs;             // total time (in ms) when modem is in a low power or
+                                          // sleep state
+    uint32_t idleModeTimeMs;              // total time (in ms) when modem is awake but neither
+                                          // the transmitter nor receiver are active/awake
     uint32_t[RadioConst:NUM_TX_POWER_LEVELS] txmModetimeMs;
-                                           // Each index represent total time (in ms) during which
-                                           // the transmitter is active/awake for a particular
-                                           // power range as shown below.
-                                           // index 0 = tx_power < 0dBm
-                                           // index 1 = 0dBm < tx_power < 5dBm
-                                           // index 2 = 5dBm < tx_power < 15dBm
-                                           // index 3 = 15dBm < tx_power < 20dBm
-                                           // index 4 = tx_power > 20dBm
-    uint32_t rxModeTimeMs;                 // total time (in ms) for which receiver is
-                                           // active/awake and the transmitter is inactive
+                                          // Each index represent total time (in ms) during which
+                                          // the transmitter is active/awake for a particular
+                                          // power range as shown below.
+                                          // index 0 = tx_power < 0dBm
+                                          // index 1 = 0dBm < tx_power < 5dBm
+                                          // index 2 = 5dBm < tx_power < 15dBm
+                                          // index 3 = 15dBm < tx_power < 20dBm
+                                          // index 4 = tx_power > 20dBm
+    uint32_t rxModeTimeMs;                // total time (in ms) for which receiver is
+                                          // active/awake and the transmitter is inactive
 };
 
 struct Carrier {
     string mcc;
     string mnc;
-    CarrierMatchType matchType;            // Specify match type for the carrier.
-                                           // If it’s ALL, matchData is empty string;
-                                           // otherwise, matchData is the value for the match type.
+    CarrierMatchType matchType;           // Specify match type for the carrier.
+                                          // If it’s ALL, matchData is empty string;
+                                          // otherwise, matchData is the value for the match type.
     string matchData;
 };
 
 struct CarrierRestrictions {
-    vec<Carrier> allowedCarriers;          // whitelist for allowed carriers
-    vec<Carrier> excludedCarriers;         // blacklist for explicitly excluded carriers
-                                           // which match allowed_carriers. Eg. allowedCarriers
-                                           // match mcc/mnc, excludedCarriers has same mcc/mnc and
-                                           // gid1 is ABCD. It means except the carrier whose gid1
-                                           // is ABCD, all carriers with the same mcc/mnc are
-                                           // allowed.
+    vec<Carrier> allowedCarriers;         // whitelist for allowed carriers
+    vec<Carrier> excludedCarriers;        // blacklist for explicitly excluded carriers
+                                          // which match allowed_carriers. Eg. allowedCarriers
+                                          // match mcc/mnc, excludedCarriers has same mcc/mnc and
+                                          // gid1 is ABCD. It means except the carrier whose gid1
+                                          // is ABCD, all carriers with the same mcc/mnc are
+                                          // allowed.
 };
 
 struct SuppSvcNotification {
-    bool isMT;                             // notification type
-                                           // false = MO intermediate result code
-                                           // true = MT unsolicited result code
-    int32_t code;                          // result code. See 27.007 7.17.
-    int32_t index;                         // CUG index. See 27.007 7.17.
-    int32_t type;                          // "type" from 27.007 7.17 (MT only).
-    string number;                         // "number" from 27.007 7.17
-                                           // (MT only, may be empty string).
+    bool isMT;                            // notification type
+                                          // false = MO intermediate result code
+                                          // true = MT unsolicited result code
+    int32_t code;                         // result code. See 27.007 7.17.
+    int32_t index;                        // CUG index. See 27.007 7.17.
+    int32_t type;                         // "type" from 27.007 7.17 (MT only).
+    string number;                        // "number" from 27.007 7.17
+                                          // (MT only, may be empty string).
 };
 
 struct SimRefreshResult {
     SimRefreshType type;
-    int32_t efId;                          // is the EFID of the updated file if the result is
-                                           // SIM_FILE_UPDATE or 0 for any other result.
-    string aid;                            // is AID(application ID) of the card application
-                                           // See ETSI 102.221 8.1 and 101.220 4
-                                           // For SIM_FILE_UPDATE result it must be set to AID of
-                                           // application in which updated EF resides or it must be
-                                           // empty string if EF is outside of an application.
-                                           // For SIM_INIT result this field is set to AID of
-                                           // application that caused REFRESH
-                                           // For SIM_RESET result it is empty string.
+    int32_t efId;                         // is the EFID of the updated file if the result is
+                                          // SIM_FILE_UPDATE or 0 for any other result.
+    string aid;                           // is AID(application ID) of the card application
+                                          // See ETSI 102.221 8.1 and 101.220 4
+                                          // For SIM_FILE_UPDATE result it must be set to AID of
+                                          // application in which updated EF resides or it must be
+                                          // empty string if EF is outside of an application.
+                                          // For SIM_INIT result this field is set to AID of
+                                          // application that caused REFRESH
+                                          // For SIM_RESET result it is empty string.
 };
 
 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
 struct CdmaSignalInfoRecord {
-    bool isPresent;                        // true if signal information record is present
-    int8_t signalType;                     // as defined 3.7.5.5-1
-    int8_t alertPitch;                     // as defined 3.7.5.5-2
-    int8_t signal;                         // as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5
+    bool isPresent;                       // true if signal information record is present
+    int8_t signalType;                    // as defined 3.7.5.5-1
+    int8_t alertPitch;                    // as defined 3.7.5.5-2
+    int8_t signal;                        // as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5
 };
 
 struct CdmaCallWaiting {
-    string number;                         // Remote party number
+    string number;                        // Remote party number
     CdmaCallWaitingNumberPresentation numberPresentation;
-    string name;                           // Remote party name
+    string name;                          // Remote party name
     CdmaSignalInfoRecord signalInfoRecord;
     // Number type/Number plan required to support International Call Waiting
-    CdmaCallWaitingNumberType numbertype;
+    CdmaCallWaitingNumberType numberType;
     CdmaCallWaitingNumberPlan numberPlan;
 };
 
@@ -1837,7 +1837,7 @@
  * The display_tag, display_len and chari fields are all 1 byte.
  */
 struct CdmaDisplayInfoRecord {
-    string alphaBuf;                       // Max length = RadioConst:CDMA_ALPHA_INFO_BUFFER_LENGTH
+    string alphaBuf;                      // Max length = RadioConst:CDMA_ALPHA_INFO_BUFFER_LENGTH
 };
 
 /*
@@ -1846,7 +1846,7 @@
  * Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
  */
 struct CdmaNumberInfoRecord {
-    string number;                         // Max length = RADIP_CDMA_NUMBER_INFO_BUFFER_LENGTH
+    string number;                        // Max length = RADIP_CDMA_NUMBER_INFO_BUFFER_LENGTH
     uint8_t numberType;
     uint8_t numberPlan;
     uint8_t pi;
@@ -1881,56 +1881,56 @@
     CdmaInfoRecName name;
     // Only one of the below vectors must have size = 1 based on the
     // CdmaInfoRecName. All other vectors must have size 0.
-    vec<CdmaDisplayInfoRecord> display;  // Display and Extended Display Info Rec
-    vec<CdmaNumberInfoRecord> number;    // Called Party Number, Calling Party Number, Connected
-                                         // number Info Rec
-    vec<CdmaSignalInfoRecord> signal;    // Signal Info Rec
+    vec<CdmaDisplayInfoRecord> display;   // Display and Extended Display Info Rec
+    vec<CdmaNumberInfoRecord> number;     // Called Party Number, Calling Party Number, Connected
+                                          // number Info Rec
+    vec<CdmaSignalInfoRecord> signal;     // Signal Info Rec
     vec<CdmaRedirectingNumberInfoRecord> redir; // Redirecting Number Info Rec
     vec<CdmaLineControlInfoRecord> lineCtrl;    // Line Control Info Rec
-    vec<CdmaT53ClirInfoRecord> clir;     // T53 CLIR Info Rec
+    vec<CdmaT53ClirInfoRecord> clir;      // T53 CLIR Info Rec
     vec<CdmaT53AudioControlInfoRecord> audioCtrl; // T53 Audio Control Info Rec
 };
 
 struct CdmaInformationRecords {
-    vec<CdmaInformationRecord> infoRec;  // Max length = RadioConst:CDMA_MAX_NUMBER_OF_INFO_RECS
+    vec<CdmaInformationRecord> infoRec;   // Max length = RadioConst:CDMA_MAX_NUMBER_OF_INFO_RECS
 };
 
 struct CfData {
-    vec<CallForwardInfo> cfInfo;         // This is the response data
-                                         // for SS request to query call
-                                         // forward status. see getCallForwardStatus()
-                                         // Max size = RadioConst:NUM_SERVICE_CLASSES
+    vec<CallForwardInfo> cfInfo;          // This is the response data
+                                          // for SS request to query call
+                                          // forward status. see getCallForwardStatus()
+                                          // Max size = RadioConst:NUM_SERVICE_CLASSES
 };
 
 struct SsInfoData {
-    vec<int32_t> ssInfo;                 // This is the response data for all of the SS GET/SET
-                                         // Radio requests. E.g. IRadio.getClir() returns
-                                         // two ints, so first two values of ssInfo[] will be
-                                         // used for response if serviceType is SS_CLIR and
-                                         // requestType is SS_INTERROGATION
-                                         // Max size = RadioConst:SS_INFO_MAX
+    vec<int32_t> ssInfo;                  // This is the response data for all of the SS GET/SET
+                                          // Radio requests. E.g. IRadio.getClir() returns
+                                          // two ints, so first two values of ssInfo[] will be
+                                          // used for response if serviceType is SS_CLIR and
+                                          // requestType is SS_INTERROGATION
+                                          // Max size = RadioConst:SS_INFO_MAX
 };
 
 struct StkCcUnsolSsResult {
     SsServiceType serviceType;
     SsRequestType requestType;
     SsTeleserviceType teleserviceType;
-    SuppServiceClass serviceClass;
+    bitfield<SuppServiceClass> serviceClass;
     RadioError result;
     // Only one of the below vectors may contain values and other must be empty
-    vec<SsInfoData> ssInfo;              // Valid only for all SsserviceType except
-                                         // SsServiceType:CF_* else empty.
-    vec<CfData> cfData;                  // Valid for SsServiceType:CF_* else empty
+    vec<SsInfoData> ssInfo;               // Valid only for all SsServiceType except
+                                          // SsServiceType:CF_* else empty.
+    vec<CfData> cfData;                   // Valid for SsServiceType:CF_* else empty
 };
 
 struct PcoDataInfo {
-    int32_t cid;                         // Context ID, uniquely identifies this call
-    string bearerProto;                  // One of the PDP_type values in TS 27.007 section 10.1.1.
-                                         // For example, "IP", "IPV6", "IPV4V6"
-    int32_t pcoId;                       // The protocol ID for this box. Note that only IDs from
-                                         // FF00H - FFFFH are accepted. If more than one is
-                                         // included from the network, multiple calls must be made
-                                         // 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
+    int32_t cid;                          // Context ID, uniquely identifies this call
+    string bearerProto;                   // One of the PDP_type values in TS 27.007 section 10.1.1.
+                                          // For example, "IP", "IPV6", "IPV4V6"
+    int32_t pcoId;                        // The protocol ID for this box. Note that only IDs from
+                                          // FF00H - FFFFH are accepted. If more than one is
+                                          // included from the network, multiple calls must be made
+                                          // 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
 };
diff --git a/radio/1.0/vts/Android.mk b/radio/1.0/vts/Android.mk
index df5dac8..4e1fb84 100644
--- a/radio/1.0/vts/Android.mk
+++ b/radio/1.0/vts/Android.mk
@@ -16,4 +16,4 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
\ No newline at end of file
+include $(LOCAL_PATH)/functional/vts/testcases/hal/radio/hidl/Android.mk
\ No newline at end of file
diff --git a/radio/1.0/vts/functional/vts/testcases/hal/radio/__init__.py b/radio/1.0/vts/functional/vts/testcases/hal/radio/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/radio/1.0/vts/functional/vts/testcases/hal/radio/__init__.py
diff --git a/radio/Android.mk b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/Android.mk
similarity index 100%
rename from radio/Android.mk
rename to radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/Android.mk
diff --git a/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/__init__.py b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/__init__.py
diff --git a/boot/Android.mk b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/Android.mk
similarity index 79%
copy from boot/Android.mk
copy to radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/Android.mk
index f9e3276..59f7c85 100644
--- a/boot/Android.mk
+++ b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := RadioHidlTest
+VTS_CONFIG_SRC_DIR := testcases/hal/radio/hidl/host
+include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
diff --git a/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/AndroidTest.xml b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/AndroidTest.xml
new file mode 100644
index 0000000..a826d20
--- /dev/null
+++ b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/AndroidTest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS HAL Radio test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+        <option name="cleanup" value="true" />
+        <option name="push" value="spec/hardware/interfaces/radio/1.0/vts/Radio.vts->/data/local/tmp/spec/Radio.vts" />
+        <option name="push" value="spec/hardware/interfaces/radio/1.0/vts/RadioIndication.vts->/data/local/tmp/spec/RadioIndication.vts" />
+        <option name="push" value="spec/hardware/interfaces/radio/1.0/vts/RadioResponse.vts->/data/local/tmp/spec/RadioResponse.vts" />
+        <option name="push" value="spec/hardware/interfaces/radio/1.0/vts/Sap.vts->/data/local/tmp/spec/Sap.vts" />
+        <option name="push" value="spec/hardware/interfaces/radio/1.0/vts/SapCallback.vts->/data/local/tmp/spec/SapCallback.vts" />
+        <option name="push" value="spec/hardware/interfaces/radio/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="RadioHidlTest" />
+        <option name="test-case-path" value="vts/testcases/hal/radio/hidl/host/RadioHidlTest" />
+    </test>
+</configuration>
diff --git a/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/RadioHidlTest.py b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/RadioHidlTest.py
new file mode 100644
index 0000000..33dac35
--- /dev/null
+++ b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/RadioHidlTest.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3.4
+#
+# 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.
+#
+
+import logging
+import time
+
+from vts.runners.host import asserts
+from vts.runners.host import base_test_with_webdb
+from vts.runners.host import test_runner
+from vts.utils.python.controllers import android_device
+from vts.utils.python.profiling import profiling_utils
+
+
+class VehicleHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
+    """A simple testcase for the VEHICLE HIDL HAL."""
+
+    def setUpClass(self):
+        """Creates a mirror and init vehicle hal."""
+        self.dut = self.registerController(android_device)[0]
+
+        self.dut.shell.InvokeTerminal("one")
+        self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
+
+        if self.enable_profiling:
+            profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+        self.dut.hal.InitHidlHal(
+            target_type="radio",
+            target_basepaths=self.dut.libPaths,
+            target_version=1.0,
+            target_package="android.hardware.radio",
+            target_component_name="IRadio",
+            hw_binder_service_name="Radio",
+            bits=64 if self.dut.is64Bit else 32)
+
+        self.radio = self.dut.hal.radio  # shortcut
+        self.radio_types = self.dut.hal.radio.GetHidlTypeInterface("types")
+        logging.info("Radio types: %s", self.radio_types)
+
+    def tearDownClass(self):
+        """Disables the profiling.
+
+        If profiling is enabled for the test, collect the profiling data
+        and disable profiling after the test is done.
+        """
+        if self.enable_profiling:
+            profiling_trace_path = getattr(
+                self, self.VTS_PROFILING_TRACING_PATH, "")
+            self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
+            profiling_utils.DisableVTSProfiling(self.dut.shell.one)
+
+    def testHelloWorld(self):
+        logging.info('hello world')
+
+
+if __name__ == "__main__":
+    test_runner.main()
diff --git a/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/__init__.py b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/radio/1.0/vts/functional/vts/testcases/hal/radio/hidl/host/__init__.py
diff --git a/radio/1.0/vts/types.vts b/radio/1.0/vts/types.vts
index cec9b6d..c11db63 100644
--- a/radio/1.0/vts/types.vts
+++ b/radio/1.0/vts/types.vts
@@ -2730,23 +2730,23 @@
 
         enumerator: "GSM"
         scalar_value: {
-            int32_t: 0
+            int32_t: 1
         }
         enumerator: "CDMA"
         scalar_value: {
-            int32_t: 1
+            int32_t: 2
         }
         enumerator: "LTE"
         scalar_value: {
-            int32_t: 2
+            int32_t: 3
         }
         enumerator: "WCDMA"
         scalar_value: {
-            int32_t: 3
+            int32_t: 4
         }
         enumerator: "TD_SCDMA"
         scalar_value: {
-            int32_t: 4
+            int32_t: 5
         }
     }
 }
diff --git a/sensors/1.0/ISensors.hal b/sensors/1.0/ISensors.hal
index c56da29..5c8301a 100644
--- a/sensors/1.0/ISensors.hal
+++ b/sensors/1.0/ISensors.hal
@@ -61,7 +61,9 @@
      * If there is no sensor event when this function is being called, block
      * until there are sensor events available.
      *
-     * @param  maxCount max number of samples can be returned.
+     * @param  maxCount max number of samples can be returned, must be > 0.
+     *         Actual number of events returned in data must be <= maxCount
+     *         and > 0.
      * @return result OK on success or BAD_VALUE if maxCount <= 0.
      * @return data vector of Event contains sensor events.
      * @return dynamicSensorsAdded vector of SensorInfo contains dynamic sensor
diff --git a/sensors/1.0/default/Sensors.cpp b/sensors/1.0/default/Sensors.cpp
index 8903397..41eb945 100644
--- a/sensors/1.0/default/Sensors.cpp
+++ b/sensors/1.0/default/Sensors.cpp
@@ -42,10 +42,12 @@
     switch (err) {
         case OK:
             return Result::OK;
-        case BAD_VALUE:
-            return Result::BAD_VALUE;
         case PERMISSION_DENIED:
             return Result::PERMISSION_DENIED;
+        case NO_MEMORY:
+            return Result::NO_MEMORY;
+        case BAD_VALUE:
+            return Result::BAD_VALUE;
         default:
             return Result::INVALID_OPERATION;
     }
@@ -151,12 +153,13 @@
         return Void();
     }
 
-    std::unique_ptr<sensors_event_t[]> data(new sensors_event_t[maxCount]);
+    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(),
-            maxCount);
+            data.get(), bufferSize);
 
     if (err < 0) {
         _hidl_cb(ResultFromStatus(err), out, dynamicSensorsAdded);
@@ -226,27 +229,68 @@
 
 Return<void> Sensors::registerDirectChannel(
         const SharedMemInfo& mem, registerDirectChannel_cb _hidl_cb) {
-    //TODO(b/30985702): finish implementation
-    (void) mem;
-    _hidl_cb(Result::INVALID_OPERATION, -1);
+    if (mSensorDevice->register_direct_channel == nullptr
+            || mSensorDevice->config_direct_report == nullptr) {
+        // HAL does not support
+        _hidl_cb(Result::INVALID_OPERATION, -1);
+        return Void();
+    }
+
+    sensors_direct_mem_t m;
+    if (!convertFromSharedMemInfo(mem, &m)) {
+      _hidl_cb(Result::BAD_VALUE, -1);
+      return Void();
+    }
+
+    int err = mSensorDevice->register_direct_channel(mSensorDevice, &m, -1);
+
+    if (err < 0) {
+        _hidl_cb(ResultFromStatus(err), -1);
+    } else {
+        int32_t channelHandle = static_cast<int32_t>(err);
+        _hidl_cb(Result::OK, channelHandle);
+    }
     return Void();
 }
 
 Return<Result> Sensors::unregisterDirectChannel(int32_t channelHandle) {
-    //TODO(b/30985702): finish implementation
-    (void) channelHandle;
-    return Result::INVALID_OPERATION;
+    if (mSensorDevice->register_direct_channel == nullptr
+            || mSensorDevice->config_direct_report == nullptr) {
+        // HAL does not support
+        return Result::INVALID_OPERATION;
+    }
+
+    mSensorDevice->register_direct_channel(mSensorDevice, nullptr, channelHandle);
+
+    return Result::OK;
 }
 
 Return<void> Sensors::configDirectReport(
         int32_t sensorHandle, int32_t channelHandle, RateLevel rate,
         configDirectReport_cb _hidl_cb) {
-    //TODO(b/30985702): finish implementation
-    (void) sensorHandle;
-    (void) channelHandle;
-    (void) rate;
+    if (mSensorDevice->register_direct_channel == nullptr
+            || mSensorDevice->config_direct_report == nullptr) {
+        // HAL does not support
+        _hidl_cb(Result::INVALID_OPERATION, -1);
+        return Void();
+    }
 
-    _hidl_cb(Result::INVALID_OPERATION, -1);
+    sensors_direct_cfg_t cfg = {
+        .rate_level = convertFromRateLevel(rate)
+    };
+    if (cfg.rate_level < 0) {
+        _hidl_cb(Result::BAD_VALUE, -1);
+        return Void();
+    }
+
+    int err = mSensorDevice->config_direct_report(mSensorDevice,
+            sensorHandle, channelHandle, &cfg);
+
+    if (rate == RateLevel::STOP) {
+        _hidl_cb(ResultFromStatus(err), -1);
+    } else {
+        _hidl_cb(err > 0 ? Result::OK : ResultFromStatus(err), err);
+    }
     return Void();
 }
 
diff --git a/sensors/1.0/default/Sensors.h b/sensors/1.0/default/Sensors.h
index e8bd98d..09729d3 100644
--- a/sensors/1.0/default/Sensors.h
+++ b/sensors/1.0/default/Sensors.h
@@ -27,6 +27,7 @@
 namespace V1_0 {
 namespace implementation {
 
+
 struct Sensors : public ::android::hardware::sensors::V1_0::ISensors {
     Sensors();
 
@@ -60,6 +61,7 @@
             configDirectReport_cb _hidl_cb) override;
 
 private:
+    static constexpr int32_t kPollMaxBufferSize = 128;
     status_t mInitCheck;
     sensors_module_t *mSensorModule;
     sensors_poll_device_1_t *mSensorDevice;
diff --git a/sensors/1.0/default/convert.cpp b/sensors/1.0/default/convert.cpp
index 6735e96..acff6ca 100644
--- a/sensors/1.0/default/convert.cpp
+++ b/sensors/1.0/default/convert.cpp
@@ -340,6 +340,50 @@
     }
 }
 
+bool convertFromSharedMemInfo(const SharedMemInfo& memIn, sensors_direct_mem_t *memOut) {
+    if (memOut == nullptr) {
+        return false;
+    }
+
+    switch(memIn.type) {
+        case SharedMemType::ASHMEM:
+            memOut->type = SENSOR_DIRECT_MEM_TYPE_ASHMEM;
+            break;
+        case SharedMemType::GRALLOC:
+            memOut->type = SENSOR_DIRECT_MEM_TYPE_GRALLOC;
+            break;
+        default:
+            return false;
+    }
+
+    switch(memIn.format) {
+        case SharedMemFormat::SENSORS_EVENT:
+            memOut->format = SENSOR_DIRECT_FMT_SENSORS_EVENT;
+            break;
+        default:
+            return false;
+    }
+
+    memOut->size = memIn.size;
+    memOut->handle = memIn.memoryHandle;
+    return true;
+}
+
+int convertFromRateLevel(RateLevel rate) {
+    switch(rate) {
+        case RateLevel::STOP:
+            return SENSOR_DIRECT_RATE_STOP;
+        case RateLevel::NORMAL:
+            return SENSOR_DIRECT_RATE_NORMAL;
+        case RateLevel::FAST:
+            return SENSOR_DIRECT_RATE_FAST;
+        case RateLevel::VERY_FAST:
+            return SENSOR_DIRECT_RATE_VERY_FAST;
+        default:
+            return -1;
+    }
+}
+
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace sensors
diff --git a/sensors/1.0/default/include/sensors/convert.h b/sensors/1.0/default/include/sensors/convert.h
index d289a81..c3a0125 100644
--- a/sensors/1.0/default/include/sensors/convert.h
+++ b/sensors/1.0/default/include/sensors/convert.h
@@ -33,6 +33,9 @@
 void convertFromSensorEvent(const sensors_event_t &src, Event *dst);
 void convertToSensorEvent(const Event &src, sensors_event_t *dst);
 
+bool convertFromSharedMemInfo(const SharedMemInfo& memIn, sensors_direct_mem_t *memOut);
+int convertFromRateLevel(RateLevel rate);
+
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace sensors
diff --git a/sensors/1.0/default/service.cpp b/sensors/1.0/default/service.cpp
index 230ead3..5bcfe4b 100644
--- a/sensors/1.0/default/service.cpp
+++ b/sensors/1.0/default/service.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "android.hardware.nfc@1.0-service"
+#define LOG_TAG "android.hardware.sensors@1.0-service"
 
 #include <android/hardware/sensors/1.0/ISensors.h>
 #include <hidl/LegacySupport.h>
@@ -23,5 +23,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<ISensors>("sensors");
+    return defaultPassthroughServiceImplementation<ISensors>();
 }
diff --git a/sensors/1.0/types.hal b/sensors/1.0/types.hal
index c8c8dfc..c0d8c5d 100644
--- a/sensors/1.0/types.hal
+++ b/sensors/1.0/types.hal
@@ -596,6 +596,7 @@
     /**
      * DYNAMIC_SENSOR_META
      * trigger-mode: special
+     * wake-up sensor: yes
      *
      * A sensor event of this type is received when a dynamic sensor is added to
      * or removed from the system. At most one sensor of this type can be
@@ -1224,23 +1225,32 @@
 @export(name="direct_format_t", value_prefix="SENSOR_DIRECT_FMT_")
 enum SharedMemFormat : int32_t {
     SENSORS_EVENT = 1,  // shared memory is formated as an array of data
-                        // elements, each sized 104 bytes. Details of fields:
-                        //
-                        // offset   type        name
-                        //-----------------------------------
-                        // 0x0000   int32_t     size (always 104)
-                        // 0x0004   int32_t     sensor report token
-                        // 0x0008   int32_t     type (see SensorType)
-                        // 0x000C   int32_t     atomic counter
-                        // 0x0010   int64_t     timestamp (see Event)
-                        // 0x0014   float[16]/  data
-                        //          int64_t[8]
-                        // 0x0058   int32_t[4]  reserved
-                        //
+                        // elements. See SensorsEventFormatOffset for details.
                         // Upon return of channel registration call, the
                         // shared memory space must be formated to all 0 by HAL.
 };
 
+enum SensorsEventFormatOffset : uint16_t {
+    // offset   type        name
+    //-----------------------------------
+    // 0x0000   int32_t     size (always 104)
+    // 0x0004   int32_t     sensor report token
+    // 0x0008   int32_t     type (see SensorType)
+    // 0x000C   uint32_t    atomic counter
+    // 0x0010   int64_t     timestamp (see Event)
+    // 0x0018   float[16]/  data
+    //          int64_t[8]
+    // 0x0058   int32_t[4]  reserved (set to zero)
+    SIZE_FIELD      = 0x0,
+    REPORT_TOKEN    = 0x4,
+    SENSOR_TYPE     = 0x8,
+    ATOMIC_COUNTER  = 0xC,
+    TIMESTAMP       = 0x10,
+    DATA            = 0x18,
+    RESERVED        = 0x58,
+    TOTAL_LENGTH    = 0x68
+};
+
 /**
  * Shared memory information for a direct channel
  */
diff --git a/sensors/1.0/vts/functional/Android.bp b/sensors/1.0/vts/functional/Android.bp
index 675484a..9ca6230 100644
--- a/sensors/1.0/vts/functional/Android.bp
+++ b/sensors/1.0/vts/functional/Android.bp
@@ -19,10 +19,11 @@
     gtest: true,
     srcs: ["sensors_hidl_hal_test.cpp"],
     shared_libs: [
-        "liblog",
-        "libhidlbase",
-        "libutils",
         "android.hardware.sensors@1.0",
+        "libcutils",
+        "libhidlbase",
+        "liblog",
+        "libutils",
     ],
     static_libs: ["libgtest"],
     cflags: [
diff --git a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp b/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
index 2edc5c3..9a71745 100644
--- a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
+++ b/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
@@ -19,16 +19,20 @@
 #include <android/hardware/sensors/1.0/ISensors.h>
 #include <android/hardware/sensors/1.0/types.h>
 #include <android/log.h>
+#include <cutils/ashmem.h>
 #include <gtest/gtest.h>
 #include <hardware/sensors.h>       // for sensor type strings
 
 #include <algorithm>
 #include <cinttypes>
 #include <cmath>
+#include <memory>
 #include <mutex>
 #include <thread>
+#include <unordered_set>
 #include <vector>
 
+#include <sys/mman.h>
 #include <unistd.h>
 
 using ::android::hardware::Return;
@@ -37,8 +41,6 @@
 using ::android::sp;
 using namespace ::android::hardware::sensors::V1_0;
 
-#define SENSORS_SERVICE_NAME "sensors"
-
 // Test environment for sensors
 class SensorsHidlEnvironment : public ::testing::Environment {
  public:
@@ -78,7 +80,7 @@
 };
 
 void SensorsHidlEnvironment::SetUp() {
-  sensors = ISensors::getService(SENSORS_SERVICE_NAME, false);
+  sensors = ISensors::getService();
   ALOGI_IF(sensors, "sensors is not nullptr, %p", sensors.get());
   ASSERT_NE(sensors, nullptr);
 
@@ -148,6 +150,164 @@
   ALOGD("polling thread end");
 }
 
+class SensorsTestSharedMemory {
+ public:
+  static SensorsTestSharedMemory* create(SharedMemType type, size_t size);
+  SharedMemInfo getSharedMemInfo() const;
+  char * getBuffer() const;
+  std::vector<Event> parseEvents(int64_t lastCounter = -1, size_t offset = 0) const;
+  virtual ~SensorsTestSharedMemory();
+ private:
+  SensorsTestSharedMemory(SharedMemType type, size_t size);
+
+  SharedMemType mType;
+  native_handle_t* mNativeHandle;
+  size_t mSize;
+  char* mBuffer;
+
+  DISALLOW_COPY_AND_ASSIGN(SensorsTestSharedMemory);
+};
+
+SharedMemInfo SensorsTestSharedMemory::getSharedMemInfo() const {
+  SharedMemInfo mem = {
+    .type = mType,
+    .format = SharedMemFormat::SENSORS_EVENT,
+    .size = static_cast<uint32_t>(mSize),
+    .memoryHandle = mNativeHandle
+  };
+  return mem;
+}
+
+char * SensorsTestSharedMemory::getBuffer() const {
+  return mBuffer;
+}
+
+std::vector<Event> SensorsTestSharedMemory::parseEvents(int64_t lastCounter, size_t offset) const {
+
+  constexpr size_t kEventSize = static_cast<size_t>(SensorsEventFormatOffset::TOTAL_LENGTH);
+  constexpr size_t kOffsetSize = static_cast<size_t>(SensorsEventFormatOffset::SIZE_FIELD);
+  constexpr size_t kOffsetToken = static_cast<size_t>(SensorsEventFormatOffset::REPORT_TOKEN);
+  constexpr size_t kOffsetType = static_cast<size_t>(SensorsEventFormatOffset::SENSOR_TYPE);
+  constexpr size_t kOffsetAtomicCounter =
+      static_cast<size_t>(SensorsEventFormatOffset::ATOMIC_COUNTER);
+  constexpr size_t kOffsetTimestamp = static_cast<size_t>(SensorsEventFormatOffset::TIMESTAMP);
+  constexpr size_t kOffsetData = static_cast<size_t>(SensorsEventFormatOffset::DATA);
+
+  std::vector<Event> events;
+  std::vector<float> data(16);
+
+  while (offset + kEventSize <= mSize) {
+    int64_t atomicCounter = *reinterpret_cast<uint32_t *>(mBuffer + offset + kOffsetAtomicCounter);
+    if (atomicCounter <= lastCounter) {
+      break;
+    }
+
+    int32_t size = *reinterpret_cast<int32_t *>(mBuffer + offset + kOffsetSize);
+    if (size != kEventSize) {
+      // unknown error, events parsed may be wrong, remove all
+      events.clear();
+      break;
+    }
+
+    int32_t token = *reinterpret_cast<int32_t *>(mBuffer + offset + kOffsetToken);
+    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,
+        offset, atomicCounter, token, type, timestamp);
+
+    Event event = {
+      .timestamp = timestamp,
+      .sensorHandle = token,
+      .sensorType = static_cast<SensorType>(type),
+    };
+    event.u.data = android::hardware::hidl_array<float, 16>
+        (reinterpret_cast<float*>(mBuffer + offset + kOffsetData));
+
+    events.push_back(event);
+
+    lastCounter = atomicCounter;
+    offset += kEventSize;
+  }
+
+  return events;
+}
+
+SensorsTestSharedMemory::SensorsTestSharedMemory(SharedMemType type, size_t size)
+    : mType(type), mSize(0), mBuffer(nullptr) {
+  native_handle_t *handle = nullptr;
+  char *buffer = nullptr;
+  switch(type) {
+    case SharedMemType::ASHMEM: {
+      int fd;
+      handle = ::native_handle_create(1 /*nFds*/, 0/*nInts*/);
+      if (handle != nullptr) {
+        handle->data[0] = fd = ::ashmem_create_region("SensorsTestSharedMemory", size);
+        if (handle->data[0] > 0) {
+          // memory is pinned by default
+          buffer = static_cast<char *>
+              (::mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
+          if (buffer != reinterpret_cast<char*>(MAP_FAILED)) {
+            break;
+          }
+          ::native_handle_close(handle);
+        }
+        ::native_handle_delete(handle);
+        handle = nullptr;
+      }
+      break;
+    }
+    default:
+      break;
+  }
+
+  if (buffer != nullptr) {
+    mNativeHandle = handle;
+    mSize = size;
+    mBuffer = buffer;
+  }
+}
+
+SensorsTestSharedMemory::~SensorsTestSharedMemory() {
+  switch(mType) {
+    case SharedMemType::ASHMEM: {
+      if (mSize != 0) {
+        ::munmap(mBuffer, mSize);
+        mBuffer = nullptr;
+
+        ::native_handle_close(mNativeHandle);
+        ::native_handle_delete(mNativeHandle);
+
+        mNativeHandle = nullptr;
+        mSize = 0;
+      }
+      break;
+    }
+    default: {
+      if (mNativeHandle != nullptr || mSize != 0 || mBuffer != nullptr) {
+        ALOGE("SensorsTestSharedMemory %p not properly destructed: "
+            "type %d, native handle %p, size %zu, buffer %p",
+            this, static_cast<int>(mType), mNativeHandle, mSize, mBuffer);
+      }
+      break;
+    }
+  }
+}
+
+SensorsTestSharedMemory* SensorsTestSharedMemory::create(SharedMemType type, size_t size) {
+  constexpr size_t kMaxSize = 128*1024*1024; // sensor test should not need more than 128M
+  if (size == 0 || size >= kMaxSize) {
+    return nullptr;
+  }
+
+  auto m = new SensorsTestSharedMemory(type, size);
+  if (m->mSize != size || m->mBuffer == nullptr) {
+    delete m;
+    m = nullptr;
+  }
+  return m;
+}
+
 // The main test class for SENSORS HIDL HAL.
 class SensorsHidlTest : public ::testing::Test {
  public:
@@ -155,52 +315,66 @@
   }
 
   virtual void TearDown() override {
+    // stop all sensors
+    for (auto s : mSensorHandles) {
+      S()->activate(s, false);
+    }
+    mSensorHandles.clear();
+
+    // stop all direct report and channels
+    for (auto c : mDirectChannelHandles) {
+      // disable all reports
+      S()->configDirectReport(-1, c, RateLevel::STOP, [] (auto, auto){});
+      S()->unregisterDirectChannel(c);
+    }
+    mDirectChannelHandles.clear();
   }
 
  protected:
+  SensorInfo defaultSensorByType(SensorType type);
+  std::vector<Event> collectEvents(useconds_t timeLimitUs, size_t nEventLimit,
+        bool clearBeforeStart = true, bool changeCollection = true);
+
+  // implementation wrapper
+  Return<void> getSensorsList(ISensors::getSensorsList_cb _hidl_cb) {
+    return S()->getSensorsList(_hidl_cb);
+  }
+
+  Return<Result> activate(
+          int32_t sensorHandle, bool enabled);
+
+  Return<Result> batch(
+          int32_t sensorHandle,
+          int64_t samplingPeriodNs,
+          int64_t maxReportLatencyNs) {
+    return S()->batch(sensorHandle, samplingPeriodNs, maxReportLatencyNs);
+  }
+
+  Return<Result> flush(int32_t sensorHandle) {
+    return S()->flush(sensorHandle);
+  }
+
+  Return<Result> injectSensorData(const Event& event) {
+    return S()->injectSensorData(event);
+  }
+
+  Return<void> registerDirectChannel(
+          const SharedMemInfo& mem, ISensors::registerDirectChannel_cb _hidl_cb);
+
+  Return<Result> unregisterDirectChannel(int32_t channelHandle) {
+    return S()->unregisterDirectChannel(channelHandle);
+  }
+
+  Return<void> configDirectReport(
+          int32_t sensorHandle, int32_t channelHandle, RateLevel rate,
+          ISensors::configDirectReport_cb _hidl_cb) {
+    return S()->configDirectReport(sensorHandle, channelHandle, rate, _hidl_cb);
+  }
+
   inline sp<ISensors>& S() {
     return SensorsHidlEnvironment::Instance()->sensors;
   }
 
-  std::vector<Event> collectEvents(useconds_t timeLimitUs, size_t nEventLimit,
-                                   bool clearBeforeStart = true,
-                                   bool changeCollection = true) {
-    std::vector<Event> events;
-    constexpr useconds_t SLEEP_GRANULARITY = 100*1000; //gradularity 100 ms
-
-    ALOGI("collect max of %zu events for %d us, clearBeforeStart %d",
-          nEventLimit, timeLimitUs, clearBeforeStart);
-
-    if (changeCollection) {
-      SensorsHidlEnvironment::Instance()->setCollection(true);
-    }
-    if (clearBeforeStart) {
-      SensorsHidlEnvironment::Instance()->catEvents(nullptr);
-    }
-
-    while (timeLimitUs > 0) {
-      useconds_t duration = std::min(SLEEP_GRANULARITY, timeLimitUs);
-      usleep(duration);
-      timeLimitUs -= duration;
-
-      SensorsHidlEnvironment::Instance()->catEvents(&events);
-      if (events.size() >= nEventLimit) {
-        break;
-      }
-      ALOGV("time to go = %d, events to go = %d",
-            (int)timeLimitUs, (int)(nEventLimit - events.size()));
-    }
-
-    if (changeCollection) {
-      SensorsHidlEnvironment::Instance()->setCollection(false);
-    }
-    return events;
-  }
-
-  static bool typeMatchStringType(SensorType type, const hidl_string& stringType);
-  static bool typeMatchReportMode(SensorType type, SensorFlagBits reportMode);
-  static bool delayMatchReportMode(int32_t minDelay, int32_t maxDelay, SensorFlagBits reportMode);
-
   inline static SensorFlagBits extractReportMode(uint64_t flag) {
     return (SensorFlagBits) (flag
         & ((uint64_t) SensorFlagBits::CONTINUOUS_MODE
@@ -219,10 +393,77 @@
     return (int32_t) type > 0;
   }
 
+  static bool typeMatchStringType(SensorType type, const hidl_string& stringType);
+  static bool typeMatchReportMode(SensorType type, SensorFlagBits reportMode);
+  static bool delayMatchReportMode(int32_t minDelay, int32_t maxDelay, SensorFlagBits reportMode);
   static SensorFlagBits expectedReportModeForType(SensorType type);
-  SensorInfo defaultSensorByType(SensorType type);
+
+  // all sensors and direct channnels used
+  std::unordered_set<int32_t> mSensorHandles;
+  std::unordered_set<int32_t> mDirectChannelHandles;
 };
 
+
+Return<Result> SensorsHidlTest::activate(int32_t sensorHandle, bool enabled) {
+  // If activating a sensor, add the handle in a set so that when test fails it can be turned off.
+  // The handle is not removed when it is deactivating on purpose so that it is not necessary to
+  // check the return value of deactivation. Deactivating a sensor more than once does not have
+  // negative effect.
+  if (enabled) {
+    mSensorHandles.insert(sensorHandle);
+  }
+  return S()->activate(sensorHandle, enabled);
+}
+
+Return<void> SensorsHidlTest::registerDirectChannel(
+    const SharedMemInfo& mem, ISensors::registerDirectChannel_cb cb) {
+  // If registeration of a channel succeeds, add the handle of channel to a set so that it can be
+  // unregistered when test fails. Unregister a channel does not remove the handle on purpose.
+  // Unregistering a channel more than once should not have negative effect.
+  S()->registerDirectChannel(mem,
+      [&] (auto result, auto channelHandle) {
+        if (result == Result::OK) {
+          mDirectChannelHandles.insert(channelHandle);
+        }
+        cb(result, channelHandle);
+      });
+  return Void();
+}
+
+std::vector<Event> SensorsHidlTest::collectEvents(useconds_t timeLimitUs, size_t nEventLimit,
+      bool clearBeforeStart, bool changeCollection) {
+  std::vector<Event> events;
+  constexpr useconds_t SLEEP_GRANULARITY = 100*1000; //gradularity 100 ms
+
+  ALOGI("collect max of %zu events for %d us, clearBeforeStart %d",
+        nEventLimit, timeLimitUs, clearBeforeStart);
+
+  if (changeCollection) {
+    SensorsHidlEnvironment::Instance()->setCollection(true);
+  }
+  if (clearBeforeStart) {
+    SensorsHidlEnvironment::Instance()->catEvents(nullptr);
+  }
+
+  while (timeLimitUs > 0) {
+    useconds_t duration = std::min(SLEEP_GRANULARITY, timeLimitUs);
+    usleep(duration);
+    timeLimitUs -= duration;
+
+    SensorsHidlEnvironment::Instance()->catEvents(&events);
+    if (events.size() >= nEventLimit) {
+      break;
+    }
+    ALOGV("time to go = %d, events to go = %d",
+          (int)timeLimitUs, (int)(nEventLimit - events.size()));
+  }
+
+  if (changeCollection) {
+    SensorsHidlEnvironment::Instance()->setCollection(false);
+  }
+  return events;
+}
+
 bool SensorsHidlTest::typeMatchStringType(SensorType type, const hidl_string& stringType) {
 
   if (type >= SensorType::DEVICE_PRIVATE_BASE) {
@@ -303,6 +544,7 @@
       break;
     case SensorFlagBits::SPECIAL_REPORTING_MODE:
       res = (minDelay == 0) && (maxDelay == 0);
+      break;
     default:
       res = false;
   }
@@ -439,10 +681,10 @@
 
   int32_t handle = sensor.sensorHandle;
 
-  S()->batch(handle, samplingPeriodInNs, batchingPeriodInNs);
-  S()->activate(handle, 1);
+  ASSERT_EQ(batch(handle, samplingPeriodInNs, batchingPeriodInNs), Result::OK);
+  ASSERT_EQ(activate(handle, 1), Result::OK);
   events = collectEvents(minTimeUs, minNEvent, true /*clearBeforeStart*/);
-  S()->activate(handle, 0);
+  ASSERT_EQ(activate(handle, 0), Result::OK);
 
   ALOGI("Collected %zu samples", events.size());
 
@@ -475,7 +717,6 @@
 
 // Test if sensor hal can do gyroscope streaming properly
 TEST_F(SensorsHidlTest, NormalGyroscopeStreamingOperation) {
-
   std::vector<Event> events;
 
   constexpr int64_t samplingPeriodInNs = 10ull*1000*1000; // 10ms
@@ -493,10 +734,10 @@
 
   int32_t handle = sensor.sensorHandle;
 
-  S()->batch(handle, samplingPeriodInNs, batchingPeriodInNs);
-  S()->activate(handle, 1);
+  ASSERT_EQ(batch(handle, samplingPeriodInNs, batchingPeriodInNs), Result::OK);
+  ASSERT_EQ(activate(handle, 1), Result::OK);
   events = collectEvents(minTimeUs, minNEvent, true /*clearBeforeStart*/);
-  S()->activate(handle, 0);
+  ASSERT_EQ(activate(handle, 0), Result::OK);
 
   ALOGI("Collected %zu samples", events.size());
 
@@ -529,7 +770,6 @@
 
 // Test if sensor hal can do accelerometer sampling rate switch properly when sensor is active
 TEST_F(SensorsHidlTest, AccelerometerSamplingPeriodHotSwitchOperation) {
-
   std::vector<Event> events1, events2;
 
   constexpr int64_t batchingPeriodInNs = 0; // no batching
@@ -553,18 +793,18 @@
     return;
   }
 
-  S()->batch(handle, minSamplingPeriodInNs, batchingPeriodInNs);
-  S()->activate(handle, 1);
+  ASSERT_EQ(batch(handle, minSamplingPeriodInNs, batchingPeriodInNs), Result::OK);
+  ASSERT_EQ(activate(handle, 1), Result::OK);
 
   usleep(500000); // sleep 0.5 sec to wait for change rate to happen
   events1 = collectEvents(sensor.minDelay * minNEvent, minNEvent, true /*clearBeforeStart*/);
 
-  S()->batch(handle, maxSamplingPeriodInNs, batchingPeriodInNs);
+  ASSERT_EQ(batch(handle, maxSamplingPeriodInNs, batchingPeriodInNs), Result::OK);
 
   usleep(500000); // sleep 0.5 sec to wait for change rate to happen
   events2 = collectEvents(sensor.maxDelay * minNEvent, minNEvent, true /*clearBeforeStart*/);
 
-  S()->activate(handle, 0);
+  ASSERT_EQ(activate(handle, 0), Result::OK);
 
   ALOGI("Collected %zu fast samples and %zu slow samples", events1.size(), events2.size());
 
@@ -616,7 +856,6 @@
 
 // Test if sensor hal can do normal accelerometer batching properly
 TEST_F(SensorsHidlTest, AccelerometerBatchingOperation) {
-
   std::vector<Event> events;
 
   constexpr int64_t oneSecondInNs = 1ull * 1000 * 1000 * 1000;
@@ -649,18 +888,17 @@
   int64_t allowedBatchDeliverTimeNs =
       std::max(oneSecondInNs, batchingPeriodInNs / 10);
 
-  S()->batch(handle, minSamplingPeriodInNs, INT64_MAX);
-  S()->activate(handle, 1);
+  ASSERT_EQ(batch(handle, minSamplingPeriodInNs, INT64_MAX), Result::OK);
+  ASSERT_EQ(activate(handle, 1), Result::OK);
 
   usleep(500000); // sleep 0.5 sec to wait for initialization
-  S()->flush(handle);
+  ASSERT_EQ(flush(handle), Result::OK);
 
   // wait for 80% of the reserved batching period
   // there should not be any significant amount of events
   // since collection is not enabled all events will go down the drain
   usleep(batchingPeriodInNs / 1000 * 8 / 10);
 
-
   SensorsHidlEnvironment::Instance()->setCollection(true);
   // 0.8 + 0.3 times the batching period
   // plus some time for the event to deliver
@@ -668,13 +906,13 @@
       batchingPeriodInNs / 1000 * 3 / 10,
         minFifoCount, true /*clearBeforeStart*/, false /*change collection*/);
 
-  S()->flush(handle);
+  ASSERT_EQ(flush(handle), Result::OK);
 
   events = collectEvents(allowedBatchDeliverTimeNs / 1000,
         minFifoCount, true /*clearBeforeStart*/, false /*change collection*/);
 
   SensorsHidlEnvironment::Instance()->setCollection(false);
-  S()->activate(handle, 0);
+  ASSERT_EQ(activate(handle, 0), Result::OK);
 
   size_t nEvent = 0;
   for (auto & e : events) {
@@ -687,6 +925,79 @@
   ASSERT_GT(nEvent, (size_t)(batchingPeriodInNs / minSamplingPeriodInNs * 9 / 10));
 }
 
+// Test sensor event direct report with ashmem for gyro sensor
+TEST_F(SensorsHidlTest, GyroscopeAshmemDirectReport) {
+
+  constexpr SensorType type = SensorType::GYROSCOPE;
+  constexpr size_t kEventSize = 104;
+  constexpr size_t kNEvent = 500;
+  constexpr size_t kMemSize = kEventSize * kNEvent;
+
+  SensorInfo sensor = defaultSensorByType(type);
+
+  if (!(sensor.flags | SensorFlagBits::MASK_DIRECT_REPORT)
+      || !(sensor.flags | SensorFlagBits::DIRECT_CHANNEL_ASHMEM)) {
+    // does not declare support
+    return;
+  }
+
+  std::unique_ptr<SensorsTestSharedMemory>
+      mem(SensorsTestSharedMemory::create(SharedMemType::ASHMEM, kMemSize));
+  ASSERT_NE(mem, nullptr);
+
+  char* buffer = mem->getBuffer();
+  // fill memory with data
+  for (size_t i = 0; i < kMemSize; ++i) {
+    buffer[i] = '\xcc';
+  }
+
+  int32_t channelHandle;
+  registerDirectChannel(mem->getSharedMemInfo(),
+      [&channelHandle] (auto result, auto channelHandle_) {
+          ASSERT_EQ(result, Result::OK);
+          channelHandle = channelHandle_;
+      });
+
+  // check memory is zeroed
+  for (size_t i = 0; i < kMemSize; ++i) {
+    ASSERT_EQ(buffer[i], '\0');
+  }
+
+  int32_t eventToken;
+  configDirectReport(sensor.sensorHandle, channelHandle, RateLevel::NORMAL,
+      [&eventToken] (auto result, auto token) {
+          ASSERT_EQ(result, Result::OK);
+          eventToken = token;
+      });
+
+  usleep(1500000); // sleep 1 sec for data, plus 0.5 sec for initialization
+  auto events = mem->parseEvents();
+
+  // allowed to be 55% of nominal freq (50Hz)
+  ASSERT_GT(events.size(), 50 / 2);
+  ASSERT_LT(events.size(), static_cast<size_t>(110*1.5));
+
+  int64_t lastTimestamp = 0;
+  for (auto &e : events) {
+    ASSERT_EQ(e.sensorType, type);
+    ASSERT_EQ(e.sensorHandle, eventToken);
+    ASSERT_GT(e.timestamp, lastTimestamp);
+
+    Vec3 gyro = e.u.vec3;
+    double gyroNorm = std::sqrt(gyro.x * gyro.x + gyro.y * gyro.y + gyro.z * gyro.z);
+    // assert not drifting
+    ASSERT_TRUE(gyroNorm < 0.1);  // < ~5 degree/sa
+
+    lastTimestamp = e.timestamp;
+  }
+
+  // stop sensor and unregister channel
+  configDirectReport(sensor.sensorHandle, channelHandle, RateLevel::STOP,
+        [&eventToken] (auto result, auto) {
+            ASSERT_EQ(result, Result::OK);
+        });
+  ASSERT_EQ(unregisterDirectChannel(channelHandle), Result::OK);
+}
 
 int main(int argc, char **argv) {
   ::testing::AddGlobalTestEnvironment(SensorsHidlEnvironment::Instance());
@@ -695,4 +1006,4 @@
   ALOGI("Test result = %d", status);
   return status;
 }
-
+// vim: set ts=2 sw=2
diff --git a/sensors/1.0/vts/types.vts b/sensors/1.0/vts/types.vts
index 2980507..1b48916 100644
--- a/sensors/1.0/vts/types.vts
+++ b/sensors/1.0/vts/types.vts
@@ -374,10 +374,7 @@
     struct_value: {
         name: "flags"
         type: TYPE_MASK
-        enum_value: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::sensors::V1_0::SensorFlagBits"
-        }
+        predefined_type: "::android::hardware::sensors::V1_0::SensorFlagBits"
     }
 }
 
@@ -615,6 +612,26 @@
         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
@@ -817,6 +834,47 @@
 }
 
 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: {
diff --git a/sensors/Android.mk b/sensors/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/sensors/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index 91e7ad1..5b50f39 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -64,3 +64,159 @@
         "android.hidl.base@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.soundtrigger.vts.driver@2.0_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.soundtrigger@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    srcs: [
+        "types.hal",
+        "ISoundTriggerHw.hal",
+        "ISoundTriggerHwCallback.hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.0/types.vts.cpp",
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.cpp",
+        "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.soundtrigger.vts.driver@2.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.soundtrigger@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    srcs: [
+        "types.hal",
+        "ISoundTriggerHw.hal",
+        "ISoundTriggerHwCallback.hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.0/types.vts.h",
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.h",
+        "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.soundtrigger.vts.driver@2.0",
+    generated_sources: ["android.hardware.soundtrigger.vts.driver@2.0_genc++"],
+    generated_headers: ["android.hardware.soundtrigger.vts.driver@2.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.soundtrigger.vts.driver@2.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.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
+        "android.hardware.soundtrigger@2.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
+    ],
+}
+
+genrule {
+    name: "android.hardware.soundtrigger@2.0-ISoundTriggerHw-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.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    srcs: [
+        "ISoundTriggerHw.hal",
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.cpp",
+        "android/hardware/soundtrigger/2.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.soundtrigger@2.0-ISoundTriggerHw-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.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    srcs: [
+        "ISoundTriggerHw.hal",
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHw.vts.h",
+        "android/hardware/soundtrigger/2.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.soundtrigger@2.0-ISoundTriggerHw-vts.profiler",
+    generated_sources: ["android.hardware.soundtrigger@2.0-ISoundTriggerHw-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.soundtrigger@2.0-ISoundTriggerHw-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.soundtrigger@2.0-ISoundTriggerHw-vts.profiler_genc++_headers"],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libvts_profiling",
+        "libvts_multidevice_proto",
+        "libprotobuf-cpp-full",
+        "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
+        "android.hardware.soundtrigger@2.0",
+    ],
+}
+
+genrule {
+    name: "android.hardware.soundtrigger@2.0-ISoundTriggerHwCallback-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.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    srcs: [
+        "ISoundTriggerHwCallback.hal",
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.cpp",
+        "android/hardware/soundtrigger/2.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.soundtrigger@2.0-ISoundTriggerHwCallback-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.soundtrigger@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/soundtrigger/2.0/ $(genDir)/android/hardware/soundtrigger/2.0/",
+    srcs: [
+        "ISoundTriggerHwCallback.hal",
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/soundtrigger/2.0/SoundTriggerHwCallback.vts.h",
+        "android/hardware/soundtrigger/2.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.soundtrigger@2.0-ISoundTriggerHwCallback-vts.profiler",
+    generated_sources: ["android.hardware.soundtrigger@2.0-ISoundTriggerHwCallback-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.soundtrigger@2.0-ISoundTriggerHwCallback-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.soundtrigger@2.0-ISoundTriggerHwCallback-vts.profiler_genc++_headers"],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libvts_profiling",
+        "libvts_multidevice_proto",
+        "libprotobuf-cpp-full",
+        "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
+        "android.hardware.soundtrigger@2.0",
+    ],
+}
diff --git a/boot/Android.mk b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target_profiling/Android.mk
similarity index 75%
copy from boot/Android.mk
copy to soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target_profiling/Android.mk
index f9e3276..fc0f9c4 100644
--- a/boot/Android.mk
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target_profiling/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalSoundTriggerHidlTargetBasicProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/soundtrigger/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target_profiling/AndroidTest.xml b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..e95a406
--- /dev/null
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS sound trigger HIDL HAL's basic target-side, profiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="HalSoundTriggerHidlTargetBasicTest" />
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/soundtrigger_hidl_hal_test/soundtrigger_hidl_hal_test,
+            _64bit::DATA/nativetest64/soundtrigger_hidl_hal_test/soundtrigger_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/soundtrigger/Android.mk b/soundtrigger/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/soundtrigger/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/thermal/1.0/IThermal.hal b/thermal/1.0/IThermal.hal
index 076b697..e5f70cb 100644
--- a/thermal/1.0/IThermal.hal
+++ b/thermal/1.0/IThermal.hal
@@ -75,19 +75,4 @@
     getCoolingDevices()
         generates (ThermalStatus status, vec<CoolingDevice> devices);
 
-    /* Retrieves an undefined temperature value.
-     *
-     * @return status Status of the operation. If status code is FAILURE,
-     *         the status.debugMessage must be populated with the human-readable
-     *         error message.
-     * @return undefinedTemperature returns an undefined temperature value if
-     *         status code is SUCCESS. Undefined temperature value is an
-     *         unreachable constant device temperature value for HAL.
-     *
-     */
-    @callflow(next={"*"})
-    @entry
-    @exit
-    getUndefinedTemperature()
-        generates (ThermalStatus status, float undefinedTemperature);
 };
diff --git a/thermal/1.0/default/Thermal.cpp b/thermal/1.0/default/Thermal.cpp
index 5bc313d..2dd0090 100644
--- a/thermal/1.0/default/Thermal.cpp
+++ b/thermal/1.0/default/Thermal.cpp
@@ -17,6 +17,7 @@
 #define LOG_TAG "android.hardware.thermal@1.0-impl"
 
 #include <errno.h>
+#include <math.h>
 
 #include <vector>
 
@@ -33,6 +34,14 @@
 namespace V1_0 {
 namespace implementation {
 
+namespace {
+
+float finalizeTemperature(float temperature) {
+    return temperature == UNKNOWN_TEMPERATURE ? NAN : temperature;
+}
+
+}
+
 Thermal::Thermal(thermal_module_t* module) : mModule(module) {}
 
 // Methods from ::android::hardware::thermal::V1_0::IThermal follow.
@@ -76,10 +85,11 @@
             ;
         }
         temperatures[i].name = list[i].name;
-        temperatures[i].currentValue = list[i].current_value;
-        temperatures[i].throttlingThreshold = list[i].throttling_threshold;
-        temperatures[i].shutdownThreshold = list[i].shutdown_threshold;
-        temperatures[i].vrThrottlingThreshold = list[i].vr_throttling_threshold;
+        temperatures[i].currentValue = finalizeTemperature(list[i].current_value);
+        temperatures[i].throttlingThreshold = finalizeTemperature(list[i].throttling_threshold);
+        temperatures[i].shutdownThreshold = finalizeTemperature(list[i].shutdown_threshold);
+        temperatures[i].vrThrottlingThreshold =
+                finalizeTemperature(list[i].vr_throttling_threshold);
       }
     }
   }
@@ -169,13 +179,6 @@
   return Void();
 }
 
-Return<void> Thermal::getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) {
-  ThermalStatus status;
-  status.code = ThermalStatusCode::SUCCESS;
-  _hidl_cb(status, UNKNOWN_TEMPERATURE);
-  return Void();
-}
-
 IThermal* HIDL_FETCH_IThermal(const char* /* name */) {
   thermal_module_t* module;
   status_t err = hw_get_module(THERMAL_HARDWARE_MODULE_ID,
diff --git a/thermal/1.0/default/Thermal.h b/thermal/1.0/default/Thermal.h
index eec0ff5..2e06289 100644
--- a/thermal/1.0/default/Thermal.h
+++ b/thermal/1.0/default/Thermal.h
@@ -45,7 +45,6 @@
     Return<void> getTemperatures(getTemperatures_cb _hidl_cb)  override;
     Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb)  override;
     Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb)  override;
-    Return<void> getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) override;
     private:
         thermal_module_t* mModule;
 };
diff --git a/thermal/1.0/types.hal b/thermal/1.0/types.hal
index 30cfdd9..eb5d7c7 100644
--- a/thermal/1.0/types.hal
+++ b/thermal/1.0/types.hal
@@ -45,28 +45,27 @@
     string name;
 
     /**
-     * Current temperature in Celsius. If not available set by HAL to
-     * undefined temperature value.
+     * Current temperature in Celsius. If not available set by HAL to NAN.
      * Current temperature can be in any units if type=UNKNOWN.
      */
     float currentValue;
 
     /**
      * Throttling temperature constant for this temperature.
-     * If not available, set by HAL to undefined temperature value.
+     * If not available, set by HAL to NAN.
      */
     float throttlingThreshold;
 
     /**
      * Shutdown temperature constant for this temperature.
-     * If not available, set by HAL to undefined temperature value.
+     * If not available, set by HAL to NAN.
      */
     float shutdownThreshold;
 
     /**
      * Threshold temperature above which the VR mode clockrate minimums cannot
      * be maintained for this device.
-     * If not available, set by HAL to undefined temperature value.
+     * If not available, set by HAL to NAN.
      */
     float vrThrottlingThreshold;
 
diff --git a/thermal/1.0/vts/Thermal.vts b/thermal/1.0/vts/Thermal.vts
index d8cc670..e76d943 100644
--- a/thermal/1.0/vts/Thermal.vts
+++ b/thermal/1.0/vts/Thermal.vts
@@ -79,25 +79,4 @@
         }
     }
 
-    api: {
-        name: "getUndefinedTemperature"
-        return_type_hidl: {
-            type: TYPE_STRUCT
-            predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
-        }
-        return_type_hidl: {
-            type: TYPE_SCALAR
-            scalar_type: "float_t"
-        }
-        callflow: {
-            next: "*"
-        }
-        callflow: {
-            entry: true
-        }
-        callflow: {
-            exit: true
-        }
-    }
-
 }
diff --git a/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp b/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
index 6eb6269..d922169 100644
--- a/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
+++ b/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
@@ -54,17 +54,6 @@
     ASSERT_NE(thermal_, nullptr);
     baseSize_ = 0;
     names_.clear();
-
-    {
-      float undefined_temperature;
-      thermal_->getUndefinedTemperature(
-          [&undefined_temperature](ThermalStatus status, float temperature) {
-            EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
-            EXPECT_LT(MAX_DEVICE_TEMPERATURE, std::abs(undefined_temperature));
-            undefined_temperature = temperature;
-          });
-      undefined_temperature_ = undefined_temperature;
-    }
   }
 
   virtual void TearDown() override {}
@@ -136,20 +125,18 @@
     // .currentValue of known type is in Celsius and must be reasonable.
     EXPECT_TRUE(temperature.type == TemperatureType::UNKNOWN ||
                 std::abs(temperature.currentValue) < MAX_DEVICE_TEMPERATURE ||
-                temperature.currentValue == undefined_temperature_);
+                isnan(temperature.currentValue));
 
     // .name must not be empty.
     EXPECT_LT(0u, temperature.name.size());
 
     // .currentValue must not exceed .shutdwonThreshold if defined.
     EXPECT_TRUE(temperature.currentValue < temperature.shutdownThreshold ||
-                temperature.currentValue == undefined_temperature_ ||
-                temperature.shutdownThreshold == undefined_temperature_);
+                isnan(temperature.currentValue) || isnan(temperature.shutdownThreshold));
 
     // .throttlingThreshold must not exceed .shutdownThreshold if defined.
     EXPECT_TRUE(temperature.throttlingThreshold < temperature.shutdownThreshold ||
-                temperature.throttlingThreshold == undefined_temperature_ ||
-                temperature.shutdownThreshold == undefined_temperature_);
+                isnan(temperature.throttlingThreshold) || isnan(temperature.shutdownThreshold));
   }
 
   // Check validity of CPU usage returned by Thermal HAL.
@@ -172,7 +159,6 @@
 
   size_t baseSize_;
   std::vector<hidl_string> names_;
-  float undefined_temperature_;
 };
 
 // Sanity test for Thermal::getTemperatures().
diff --git a/thermal/Android.mk b/thermal/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/thermal/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/tv/Android.mk b/tv/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/tv/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/boot/Android.mk b/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/Android.mk
similarity index 71%
copy from boot/Android.mk
copy to tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/Android.mk
index f9e3276..40536a5 100644
--- a/boot/Android.mk
+++ b/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/Android.mk
@@ -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.
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := TvCecHidlProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/tv_cec/hidl/host_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/AndroidTest.xml b/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/AndroidTest.xml
new file mode 100644
index 0000000..ffd857e
--- /dev/null
+++ b/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS Tv Input HIDL HAL's host-side test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push" value="spec/hardware/interfaces/tv/cec/1.0/vts/HdmiCec.vts->/data/local/tmp/spec/HdmiCec.vts" />
+        <option name="push" value="spec/hardware/interfaces/tv/cec/1.0/vts/HdmiCecCallback.vts->/data/local/tmp/spec/HdmiCecCallback.vts" />
+        <option name="push" value="spec/hardware/interfaces/tv/cec/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+        <option name="cleanup" value="true" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer">
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="TvCecHidlProfilingTest" />
+        <option name="test-case-path" value="vts/testcases/hal/tv_cec/hidl/host/TvCecHidlTest" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
\ No newline at end of file
diff --git a/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/__init__.py b/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/hidl/host_profiling/__init__.py
diff --git a/tv/input/1.0/default/TvInput.cpp b/tv/input/1.0/default/TvInput.cpp
index 6181ffb..4cd1d40 100644
--- a/tv/input/1.0/default/TvInput.cpp
+++ b/tv/input/1.0/default/TvInput.cpp
@@ -196,7 +196,7 @@
     return type != TV_STREAM_TYPE_BUFFER_PRODUCER;
 }
 
-ITvInput* HIDL_FETCH_ITvInput(const char* name) {
+ITvInput* HIDL_FETCH_ITvInput(const char* /* name */) {
     int ret = 0;
     const hw_module_t* hw_module = nullptr;
     tv_input_device_t* input_device;
@@ -213,7 +213,8 @@
         }
     }
     else {
-        LOG(ERROR) << "hw_get_module " << name << " failed: " << ret;
+        LOG(ERROR) << "hw_get_module " << TV_INPUT_HARDWARE_MODULE_ID
+                   << " failed: " << ret;
         return nullptr;
     }
 }
diff --git a/tv/input/1.0/default/service.cpp b/tv/input/1.0/default/service.cpp
index d59c848..d904d0b 100644
--- a/tv/input/1.0/default/service.cpp
+++ b/tv/input/1.0/default/service.cpp
@@ -27,5 +27,5 @@
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-    return defaultPassthroughServiceImplementation<ITvInput>("tv.input");
+    return defaultPassthroughServiceImplementation<ITvInput>();
 }
diff --git a/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host/TvInputHidlTest.py b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host/TvInputHidlTest.py
index 9b49078..b5becd6 100644
--- a/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host/TvInputHidlTest.py
+++ b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host/TvInputHidlTest.py
@@ -39,7 +39,6 @@
                                  target_version=1.0,
                                  target_package="android.hardware.tv.input",
                                  target_component_name="ITvInput",
-                                 hw_binder_service_name="tv-input-1-0",
                                  bits=64 if self.dut.is64Bit else 32)
 
         self.dut.shell.InvokeTerminal("one")
diff --git a/boot/Android.mk b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/Android.mk
similarity index 71%
copy from boot/Android.mk
copy to tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/Android.mk
index f9e3276..514df20 100644
--- a/boot/Android.mk
+++ b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/Android.mk
@@ -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.
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := TvInputHidlProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/tv_input/hidl/host_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/AndroidTest.xml b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/AndroidTest.xml
new file mode 100644
index 0000000..5b8e6f9
--- /dev/null
+++ b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS Tv Input HIDL HAL's host-side test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+        <option name="push" value="spec/hardware/interfaces/tv/input/1.0/vts/TvInput.vts->/data/local/tmp/spec/TvInput.vts" />
+        <option name="push" value="spec/hardware/interfaces/tv/input/1.0/vts/TvInputCallback.vts->/data/local/tmp/spec/TvInputCallback.vts" />
+        <option name="push" value="spec/hardware/interfaces/tv/input/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+        <option name="cleanup" value="true" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer">
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="TvInputHidlProfilingTest" />
+        <option name="test-case-path" value="vts/testcases/hal/tv_input/hidl/host/TvInputHidlTest" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/__init__.py b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tv/input/1.0/vts/functional/vts/testcases/hal/tv_input/hidl/host_profiling/__init__.py
diff --git a/update-base-files.sh b/update-base-files.sh
index e2331f5..1eb6b51 100755
--- a/update-base-files.sh
+++ b/update-base-files.sh
@@ -25,6 +25,9 @@
 hidl-gen $options \
          -o hardware/libhardware/include/hardware/nfc-base.h \
          android.hardware.nfc@1.0
+hidl-gen $options \
+         -o hardware/libhardware/include/hardware/gnss-base.h \
+         android.hardware.gnss@1.0
 
 # system/core
 hidl-gen $options \
diff --git a/vehicle/2.0/default/tests/VehicleHalManager_test.cpp b/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
index dffcfbb..4a20ea5 100644
--- a/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
+++ b/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
@@ -353,7 +353,7 @@
 TEST_F(VehicleHalManagerTest, get_NegativeCases) {
     // Write-only property must fail.
     invokeGet(VehicleProperty::HVAC_SEAT_TEMPERATURE, 0);
-    ASSERT_EQ(StatusCode::INVALID_ARG, actualStatusCode);
+    ASSERT_EQ(StatusCode::ACCESS_DENIED, actualStatusCode);
 
     // Unknown property must fail.
     invokeGet(VehicleProperty::MIRROR_Z_MOVE, 0);
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp
index b4eb484..5d2e6fe 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp
@@ -87,7 +87,7 @@
     }
 
     if (!checkReadPermission(*config, getCaller())) {
-        _hidl_cb(StatusCode::INVALID_ARG, kEmptyValue);
+        _hidl_cb(StatusCode::ACCESS_DENIED, kEmptyValue);
         return Void();
     }
 
@@ -108,7 +108,7 @@
     }
 
     if (!checkWritePermission(*config, getCaller())) {
-        return StatusCode::INVALID_ARG;
+        return StatusCode::ACCESS_DENIED;
     }
 
     handlePropertySetEvent(value);
@@ -122,6 +122,7 @@
         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++) {
         SubscribeOptions& ops = verifiedOptions[i];
         VehicleProperty prop = ops.propId;
@@ -133,6 +134,10 @@
             return StatusCode::INVALID_ARG;
         }
 
+        if (!checkAcl(caller.uid, config->prop, VehiclePropertyAccess::READ)) {
+            return StatusCode::ACCESS_DENIED;
+        }
+
         if (!isSubscribable(*config, ops.flags)) {
             ALOGE("Failed to subscribe: property 0x%x is not subscribable",
                   prop);
@@ -304,15 +309,13 @@
     return true;
 }
 
-bool checkAcl(const PropertyAclMap& aclMap,
-              uid_t callerUid,
-              VehicleProperty propertyId,
-              VehiclePropertyAccess requiredAccess) {
+bool VehicleHalManager::checkAcl(uid_t callerUid, VehicleProperty propertyId,
+                                 VehiclePropertyAccess requiredAccess) const {
     if (callerUid == AID_SYSTEM && isSystemProperty(propertyId)) {
         return true;
     }
 
-    auto range = aclMap.equal_range(propertyId);
+    auto range = mPropertyAclMap.equal_range(propertyId);
     for (auto it = range.first; it != range.second; ++it) {
         auto& acl = it->second;
         if (acl.uid == callerUid && (acl.access & requiredAccess)) {
@@ -328,8 +331,7 @@
         ALOGW("Property 0%x has no write access", config.prop);
         return false;
     }
-    return checkAcl(mPropertyAclMap, caller.uid, config.prop,
-                    VehiclePropertyAccess::WRITE);
+    return checkAcl(caller.uid, config.prop, VehiclePropertyAccess::WRITE);
 }
 
 bool VehicleHalManager::checkReadPermission(const VehiclePropConfig &config,
@@ -339,8 +341,7 @@
         return false;
     }
 
-    return checkAcl(mPropertyAclMap, caller.uid, config.prop,
-                    VehiclePropertyAccess::READ);
+    return checkAcl(caller.uid, config.prop, VehiclePropertyAccess::READ);
 }
 
 void VehicleHalManager::handlePropertySetEvent(const VehiclePropValue& value) {
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h
index 519b09b..6768741 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h
@@ -100,6 +100,9 @@
                               const Caller& callee) const;
     bool checkReadPermission(const VehiclePropConfig &config,
                              const Caller& caller) const;
+    bool checkAcl(uid_t callerUid,
+                  VehicleProperty propertyId,
+                  VehiclePropertyAccess requiredAccess) const;
 
     static bool isSubscribable(const VehiclePropConfig& config,
                                SubscribeFlags flags);
diff --git a/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py b/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py
index 5faf78a..cd52abf 100644
--- a/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py
+++ b/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py
@@ -20,6 +20,7 @@
 
 from vts.runners.host import asserts
 from vts.runners.host import base_test_with_webdb
+from vts.runners.host import const
 from vts.runners.host import test_runner
 from vts.utils.python.controllers import android_device
 from vts.utils.python.profiling import profiling_utils
@@ -35,6 +36,10 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
 
+        results = self.dut.shell.one.Execute("id -u system")
+        system_uid = results[const.STDOUT][0].strip()
+        logging.info("system_uid: %s", system_uid)
+
         self.dut.hal.InitHidlHal(
             target_type="vehicle",
             target_basepaths=self.dut.libPaths,
@@ -45,6 +50,7 @@
             bits=64 if self.dut.is64Bit else 32)
 
         self.vehicle = self.dut.hal.vehicle  # shortcut
+        self.vehicle.SetCallerUid(system_uid)
         self.vtypes = self.dut.hal.vehicle.GetHidlTypeInterface("types")
         logging.info("vehicle types: %s", self.vtypes)
 
diff --git a/vehicle/Android.mk b/vehicle/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/vehicle/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/vibrator/1.0/default/Vibrator.cpp b/vibrator/1.0/default/Vibrator.cpp
index e86e681..8c82bcd 100644
--- a/vibrator/1.0/default/Vibrator.cpp
+++ b/vibrator/1.0/default/Vibrator.cpp
@@ -50,18 +50,18 @@
     return Status::OK;
 }
 
-IVibrator* HIDL_FETCH_IVibrator(const char *hal) {
+IVibrator* HIDL_FETCH_IVibrator(const char * /*hal*/) {
     vibrator_device_t *vib_device;
     const hw_module_t *hw_module = nullptr;
 
-    int ret = hw_get_module(hal, &hw_module);
+    int ret = hw_get_module(VIBRATOR_HARDWARE_MODULE_ID, &hw_module);
     if (ret == 0) {
         ret = vibrator_open(hw_module, &vib_device);
         if (ret != 0) {
-            ALOGE("vibrator_open %s failed: %d", hal, ret);
+            ALOGE("vibrator_open failed: %d", ret);
         }
     } else {
-        ALOGE("hw_get_module %s failed: %d", hal, ret);
+        ALOGE("hw_get_module %s failed: %d", VIBRATOR_HARDWARE_MODULE_ID, ret);
     }
 
     if (ret == 0) {
diff --git a/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp b/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp
index ec8db3a..782a763 100644
--- a/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp
+++ b/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp
@@ -28,13 +28,11 @@
 using ::android::hardware::Void;
 using ::android::sp;
 
-#define VIBRATOR_SERVICE_NAME "vibrator"
-
 // The main test class for VIBRATOR HIDL HAL.
 class VibratorHidlTest : public ::testing::Test {
  public:
   virtual void SetUp() override {
-    vibrator = IVibrator::getService(VIBRATOR_SERVICE_NAME, false);
+    vibrator = IVibrator::getService(false);
     ASSERT_NE(vibrator, nullptr);
   }
 
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
index 498ea06..84f2907 100644
--- a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
@@ -45,7 +45,6 @@
             target_version=1.0,
             target_package="android.hardware.vibrator",
             target_component_name="IVibrator",
-            hw_binder_service_name="vibrator",
             bits=64 if self.dut.is64Bit else 32)
 
     def tearDownClass(self):
diff --git a/vibrator/Android.mk b/vibrator/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/vibrator/Android.mk
+++ /dev/null
@@ -1,19 +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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/boot/Android.mk b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target_profiling/Android.mk
similarity index 77%
copy from boot/Android.mk
copy to vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target_profiling/Android.mk
index f9e3276..6f60af3 100644
--- a/boot/Android.mk
+++ b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target_profiling/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := VrHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/vr/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target_profiling/AndroidTest.xml b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..3bc711a
--- /dev/null
+++ b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS VR HIDL HAL's target-side, profiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VrHidlTargetTest" />
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/vr_hidl_hal_test/vr_hidl_hal_test,
+            _64bit::DATA/nativetest64/vr_hidl_hal_test/vr_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
+
diff --git a/wifi/1.0/IWifiChip.hal b/wifi/1.0/IWifiChip.hal
index d790404..b0598a4 100644
--- a/wifi/1.0/IWifiChip.hal
+++ b/wifi/1.0/IWifiChip.hal
@@ -205,7 +205,8 @@
    *         |WifiStatusCode.ERROR_UNKNOWN|
    * @return capabilities Bitset of |ChipCapabilityMask| values.
    */
-  getCapabilities() generates (WifiStatus status, uint32_t capabilities);
+  getCapabilities()
+      generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities);
 
   /**
    * Get the set of operation modes that the chip supports.
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 7dad8af..6a738a9 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -120,7 +120,9 @@
    *         |WifiStatusCode.ERROR_UNKNOWN|
    * @return capabilities Bitset of |StaIfaceCapabilityMask| values.
    */
-  getCapabilities() generates (WifiStatus status, uint32_t capabilities);
+  getCapabilities()
+      generates (WifiStatus status,
+                 bitfield<StaIfaceCapabilityMask> capabilities);
 
   /**
    * Used to query additional information about the chip's APF capabilities.
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index bbb9346..37fcfea 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -887,7 +887,7 @@
   if (!legacy_request) {
     return false;
   }
-  memset(&legacy_request, 0, sizeof(legacy_hal::NanPublishRequest));
+  memset(legacy_request, 0, sizeof(legacy_hal::NanPublishRequest));
 
   legacy_request->publish_id = hidl_request.baseConfigs.sessionId;
   legacy_request->ttl = hidl_request.baseConfigs.ttlSec;
@@ -959,7 +959,7 @@
   if (!legacy_request) {
     return false;
   }
-  memset(&legacy_request, 0, sizeof(legacy_hal::NanSubscribeRequest));
+  memset(legacy_request, 0, sizeof(legacy_hal::NanSubscribeRequest));
 
   legacy_request->subscribe_id = hidl_request.baseConfigs.sessionId;
   legacy_request->ttl = hidl_request.baseConfigs.ttlSec;
@@ -1044,7 +1044,7 @@
   if (!legacy_request) {
     return false;
   }
-  memset(&legacy_request, 0, sizeof(legacy_hal::NanTransmitFollowupRequest));
+  memset(legacy_request, 0, sizeof(legacy_hal::NanTransmitFollowupRequest));
 
   legacy_request->publish_subscribe_id = hidl_request.discoverySessionId;
   legacy_request->requestor_instance_id = hidl_request.peerId;
@@ -1071,7 +1071,7 @@
   if (!legacy_request) {
     return false;
   }
-  memset(&legacy_request, 0, sizeof(legacy_hal::NanConfigRequest));
+  memset(legacy_request, 0, sizeof(legacy_hal::NanConfigRequest));
 
   // TODO: b/34059183 tracks missing configurations in legacy HAL or uknown defaults
   legacy_request->master_pref = hidl_request.masterPref;
@@ -1161,7 +1161,7 @@
   if (!legacy_request) {
     return false;
   }
-  memset(&legacy_request, 0, sizeof(legacy_hal::NanBeaconSdfPayloadRequest));
+  memset(legacy_request, 0, sizeof(legacy_hal::NanBeaconSdfPayloadRequest));
 
   legacy_request->vsa.payload_transmit_flag = hidl_request.transmitInNext16dws ? 1 : 0;
   legacy_request->vsa.tx_in_discovery_beacon = hidl_request.transmitInDiscoveryBeacon;
@@ -1183,7 +1183,7 @@
   if (!legacy_request) {
     return false;
   }
-  memset(&legacy_request, 0, sizeof(legacy_hal::NanDataPathInitiatorRequest));
+  memset(legacy_request, 0, sizeof(legacy_hal::NanDataPathInitiatorRequest));
 
   legacy_request->requestor_instance_id = hidl_request.peerId;
   memcpy(legacy_request->peer_disc_mac_addr, hidl_request.peerDiscMacAddr.data(), 6);
@@ -1215,7 +1215,7 @@
   if (!legacy_request) {
     return false;
   }
-  memset(&legacy_request, 0, sizeof(legacy_hal::NanDataPathIndicationResponse));
+  memset(legacy_request, 0, sizeof(legacy_hal::NanDataPathIndicationResponse));
 
   legacy_request->rsp_code = hidl_request.acceptRequest ?
         legacy_hal::NAN_DP_REQUEST_ACCEPT : legacy_hal::NAN_DP_REQUEST_REJECT;
diff --git a/wifi/1.0/default/service.cpp b/wifi/1.0/default/service.cpp
index 40e8b12..96d5c6f 100644
--- a/wifi/1.0/default/service.cpp
+++ b/wifi/1.0/default/service.cpp
@@ -34,7 +34,7 @@
   // Setup hwbinder service
   android::sp<android::hardware::wifi::V1_0::IWifi> service =
       new android::hardware::wifi::V1_0::implementation::Wifi();
-  CHECK_EQ(service->registerAsService("wifi"), android::NO_ERROR)
+  CHECK_EQ(service->registerAsService(), android::NO_ERROR)
       << "Failed to register wifi HAL";
 
   joinRpcThreadpool();
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index 1e86be4..edf306d 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -254,7 +254,7 @@
  * Bands that can be specified in Background scan requests.
  */
 enum StaBackgroundScanBand : uint32_t {
-  BAND_UNSPECIFIED,
+  BAND_UNSPECIFIED = 0,
   /**
    * 2.4 GHz.
    */
@@ -325,10 +325,10 @@
    */
   uint32_t periodInMs;
   /**
-   * Bitset of |BackgroundScanBucketEventReportSchemeMask| values controlling
+   * Bitset of |StaBackgroundScanBucketEventReportSchemeMask| values controlling
    * when events for this bucket must be reported.
    */
-  uint32_t eventReportScheme;
+  bitfield<StaBackgroundScanBucketEventReportSchemeMask> eventReportScheme;
   /**
    * For exponential back off. If |exponentialMaxPeriodInMs| is non zero or
    * different than period, then this bucket is an exponential backoff bucket
@@ -503,7 +503,7 @@
   /**
    * Bitset containing |ScanDataFlagMask| values.
    */
-  uint32_t flags;
+  bitfield<StaScanDataFlagMask> flags;
   /**
    * Bitset where each bit indicates if the bucket with that index was
    * scanned.
@@ -843,6 +843,23 @@
 };
 
 /**
+ * Cipher suite flags - to be used as a bitmask.
+ */
+enum NanCipherSuiteType : uint32_t {
+  SHARED_KEY_128_MASK = 1 << 0,
+  SHARED_KEY_256_MASK = 1 << 1
+};
+
+/**
+ * Ranging in the context of discovery sessions indication controls - to be used as a bitmask.
+ */
+enum NanRangingIndication : uint32_t {
+  CONTINUOUS_INDICATION_MASK = 1 << 0,
+  INGRESS_MET_MASK = 1 << 1,
+  EGRESS_MET_MASK = 1 << 2
+};
+
+/**
  * Configurations of NAN discovery sessions: common to publish and subscribe discovery.
  */
 struct NanDiscoveryCommonConfig {
@@ -921,7 +938,7 @@
    * Cipher types supported in data-paths constructed in the context of this discovery session. The
    * |NanCipherSuiteType| bit fields are used to set this value.
    */
-  uint32_t supportedCipherTypes;
+  bitfield<NanCipherSuiteType> supportedCipherTypes;
   /**
    * Optional PMK for data-paths constructed in the context of this discovery session. A PMK could
    * also be provided during the actual construction of the data-path (which allows unique PMKs for
@@ -949,7 +966,7 @@
    * The type of ranging indication feedback to be provided by discovery session matches. Use
    * bit-fields from |NanRangingIndication|.
    */
-   uint32_t configRangingIndications;
+   bitfield<NanRangingIndication> configRangingIndications;
    /**
     * The ingress and egress distance in cm. If ranging is eanbled (|rangingEnabled| is true) then
     * \configRangingIndications\ is used to determine whether ingress and/or egress (or neither)
@@ -960,23 +977,6 @@
 };
 
 /**
- * Cipher suite flags - to be used as a bitmask.
- */
-enum NanCipherSuiteType : uint32_t {
-  SHARED_KEY_128_MASK = 1 << 0,
-  SHARED_KEY_256_MASK = 1 << 1
-};
-
-/**
- * Ranging in the context of discovery sessions indication controls - to be used as a bitmask.
- */
-enum NanRangingIndication : uint32_t {
-  CONTINUOUS_INDICATION_MASK = 1 << 0,
-  INGRESS_MET_MASK = 1 << 1,
-  EGRESS_MET_MASK = 1 << 2
-};
-
-/**
  * Publish request: specifies a publish discovery operation.
  */
 struct NanPublishRequest {
@@ -1111,7 +1111,7 @@
    * Cipher types supported in data-paths constructed in the context of this discovery session. The
    * |NanCipherSuiteType| bit fields are used to set this value.
    */
-  uint32_t supportedCipherTypes;
+  bitfield<NanCipherSuiteType> supportedCipherTypes;
   /**
    * PMK of the data-path being requested (if |securityRequired| is true).
    * Max length: 32
@@ -1150,7 +1150,7 @@
    * Cipher types supported in data-paths constructed in the context of this discovery session. The
    * |NanCipherSuiteType| bit fields are used to set this value.
    */
-  uint32_t supportedCipherTypes;
+  bitfield<NanCipherSuiteType> supportedCipherTypes;
   /**
    * PMK of the data-path being requested (if |securityRequired| is true).
    * Max length: 32
@@ -1243,7 +1243,7 @@
   /**
    * The set of supported Cipher suites. The |NanCipherSuiteType| bit fields are used.
    */
-  uint32_t supportedCipherSuites;
+  bitfield<NanCipherSuiteType> supportedCipherSuites;
 };
 
 /**
@@ -1294,7 +1294,7 @@
    * Cipher types supported by the peer for data-paths constructed in the context of this discovery
    * session. The |NanCipherSuiteType| bit fields are used to set this value.
    */
-  uint32_t peerSupportedCipherTypes;
+  bitfield<NanCipherSuiteType> peerSupportedCipherTypes;
   /**
    * Indicates whether or not the peer requires security enabled in any data-path (NDP) constructed
    * in the context of this discovery session.
@@ -1327,7 +1327,7 @@
    * The ranging event(s) which triggered the ranging. Uses bit-fields from |NanRangingIndication|.
    * E.g. can indicate that continuous ranging is required, or else that an ingress event occurred.
    */
-   uint32_t rangingIndicationType;
+   bitfield<NanRangingIndication> rangingIndicationType;
 };
 
 /**
@@ -1421,7 +1421,7 @@
    * Frames on which this vendor specific attribute was received.
    * Mask |NanVsaRxFrameMask| defined above.
    */
-  uint8_t vsaReceivedOnFrames;
+  bitfield<NanVsaRxFrameMask> vsaReceivedOnFrames;
   /**
    * Organizationally Unique Identifier (OUI) of the vendor-specific attribute.
    */
@@ -1811,12 +1811,12 @@
    * Bit mask indicates what preamble is supported by initiator.
    * Combination of |RttPreamble| values.
    */
-  uint8_t preambleSupport;
+  bitfield<RttPreamble> preambleSupport;
   /**
    * Bit mask indicates what BW is supported by initiator.
    * Combination of |RttBw| values.
    */
-  uint8_t bwSupport;
+  bitfield<RttBw> bwSupport;
   /**
    * Draft 11mc spec version supported by chip.
    * For instance, version 4.0 must be 40 and version 4.3 must be 43 etc.
diff --git a/tests/Android.mk b/wifi/1.0/vts/Android.mk
similarity index 79%
rename from tests/Android.mk
rename to wifi/1.0/vts/Android.mk
index f9e3276..d347136 100644
--- a/tests/Android.mk
+++ b/wifi/1.0/vts/Android.mk
@@ -5,7 +5,7 @@
 # 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
+#       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,
@@ -16,4 +16,5 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+# include hidl test makefiles
+include $(LOCAL_PATH)/functional/vts/testcases/hal/wifi/hidl/Android.mk
diff --git a/wifi/1.0/vts/Wifi.vts b/wifi/1.0/vts/Wifi.vts
new file mode 100644
index 0000000..608e012
--- /dev/null
+++ b/wifi/1.0/vts/Wifi.vts
@@ -0,0 +1,110 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifi"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@1.0::IWifiChip"
+import: "android.hardware.wifi@1.0::IWifiEventCallback"
+import: "android.hardware.wifi@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: "IWifiEventCallback"
+            is_callback: true
+        }
+        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: "IWifiChip"
+            is_callback: false
+        }
+        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
new file mode 100644
index 0000000..c4f3640
--- /dev/null
+++ b/wifi/1.0/vts/WifiApIface.vts
@@ -0,0 +1,33 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiApIface"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@1.0::IWifiIface"
+
+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/WifiChip.vts b/wifi/1.0/vts/WifiChip.vts
new file mode 100644
index 0000000..4b278c1
--- /dev/null
+++ b/wifi/1.0/vts/WifiChip.vts
@@ -0,0 +1,545 @@
+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::IWifiP2pIface"
+import: "android.hardware.wifi@1.0::IWifiRttController"
+import: "android.hardware.wifi@1.0::IWifiStaIface"
+import: "android.hardware.wifi@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: "IWifiChipEventCallback"
+            is_callback: true
+        }
+    }
+
+    api: {
+        name: "getCapabilities"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
+        }
+        return_type_hidl: {
+            type: TYPE_MASK
+            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: "IWifiApIface"
+            is_callback: false
+        }
+    }
+
+    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: "IWifiApIface"
+            is_callback: false
+        }
+        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: "IWifiNanIface"
+            is_callback: false
+        }
+    }
+
+    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: "IWifiNanIface"
+            is_callback: false
+        }
+        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: "IWifiP2pIface"
+            is_callback: false
+        }
+    }
+
+    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: "IWifiP2pIface"
+            is_callback: false
+        }
+        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: "IWifiStaIface"
+            is_callback: false
+        }
+    }
+
+    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: "IWifiStaIface"
+            is_callback: false
+        }
+        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: "IWifiRttController"
+            is_callback: false
+        }
+        arg: {
+            type: TYPE_HIDL_INTERFACE
+            predefined_type: "IWifiIface"
+            is_callback: false
+        }
+    }
+
+    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
new file mode 100644
index 0000000..c755162
--- /dev/null
+++ b/wifi/1.0/vts/WifiChipEventCallback.vts
@@ -0,0 +1,78 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiChipEventCallback"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@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
new file mode 100644
index 0000000..a0cf667
--- /dev/null
+++ b/wifi/1.0/vts/WifiEventCallback.vts
@@ -0,0 +1,26 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiEventCallback"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@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
new file mode 100644
index 0000000..1434a3e
--- /dev/null
+++ b/wifi/1.0/vts/WifiIface.vts
@@ -0,0 +1,33 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiIface"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@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
new file mode 100644
index 0000000..663b526
--- /dev/null
+++ b/wifi/1.0/vts/WifiNanIface.vts
@@ -0,0 +1,278 @@
+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"
+
+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: "IWifiNanIfaceEventCallback"
+            is_callback: true
+        }
+    }
+
+    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: "uint16_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: "uint16_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"
+        }
+    }
+
+    api: {
+        name: "beaconSdfPayloadRequest"
+        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::NanBeaconSdfPayloadRequest"
+        }
+    }
+
+}
diff --git a/wifi/1.0/vts/WifiNanIfaceEventCallback.vts b/wifi/1.0/vts/WifiNanIfaceEventCallback.vts
new file mode 100644
index 0000000..30ca88a
--- /dev/null
+++ b/wifi/1.0/vts/WifiNanIfaceEventCallback.vts
@@ -0,0 +1,318 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiNanIfaceEventCallback"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@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: "uint16_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: "uint16_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"
+        }
+    }
+
+    api: {
+        name: "notifyRespondToDataPathIndicationResponse"
+        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: "notifyTerminateDataPathResponse"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint16_t"
+        }
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
+        }
+    }
+
+    api: {
+        name: "notifyBeaconSdfPayloadResponse"
+        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: "uint16_t"
+        }
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
+        }
+    }
+
+    api: {
+        name: "eventSubscribeTerminated"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint16_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: "uint16_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"
+        }
+    }
+
+    api: {
+        name: "eventBeaconSdfPayload"
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::NanBeaconSdfPayloadInd"
+        }
+    }
+
+}
diff --git a/wifi/1.0/vts/WifiP2pIface.vts b/wifi/1.0/vts/WifiP2pIface.vts
new file mode 100644
index 0000000..b40c81e
--- /dev/null
+++ b/wifi/1.0/vts/WifiP2pIface.vts
@@ -0,0 +1,33 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiP2pIface"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@1.0::IWifiIface"
+
+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
new file mode 100644
index 0000000..0fd3626
--- /dev/null
+++ b/wifi/1.0/vts/WifiRttController.vts
@@ -0,0 +1,172 @@
+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"
+
+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: "IWifiIface"
+            is_callback: false
+        }
+    }
+
+    api: {
+        name: "registerEventCallback"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
+        }
+        arg: {
+            type: TYPE_HIDL_CALLBACK
+            predefined_type: "IWifiRttControllerEventCallback"
+            is_callback: true
+        }
+    }
+
+    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_value: {
+                    vector_size: 6
+                    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
new file mode 100644
index 0000000..028fd03
--- /dev/null
+++ b/wifi/1.0/vts/WifiRttControllerEventCallback.vts
@@ -0,0 +1,25 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiRttControllerEventCallback"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@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
new file mode 100644
index 0000000..0cff792
--- /dev/null
+++ b/wifi/1.0/vts/WifiStaIface.vts
@@ -0,0 +1,432 @@
+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"
+
+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: "IWifiStaIfaceEventCallback"
+            is_callback: true
+        }
+    }
+
+    api: {
+        name: "getCapabilities"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
+        }
+        return_type_hidl: {
+            type: TYPE_MASK
+            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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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: "startDebugPacketFateMonitoring"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
+        }
+    }
+
+    api: {
+        name: "stopDebugPacketFateMonitoring"
+        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
new file mode 100644
index 0000000..b04ad26
--- /dev/null
+++ b/wifi/1.0/vts/WifiStaIfaceEventCallback.vts
@@ -0,0 +1,65 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IWifiStaIfaceEventCallback"
+
+package: "android.hardware.wifi"
+
+import: "android.hardware.wifi@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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+    }
+
+}
diff --git a/wifi/1.0/vts/functional/vts/testcases/hal/wifi/__init__.py b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/__init__.py
diff --git a/audio/Android.mk b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/Android.mk
similarity index 100%
copy from audio/Android.mk
copy to wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/Android.mk
diff --git a/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/__init__.py b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/__init__.py
diff --git a/boot/Android.mk b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/target/Android.mk
similarity index 78%
copy from boot/Android.mk
copy to wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/target/Android.mk
index f9e3276..40f154e 100644
--- a/boot/Android.mk
+++ b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/target/Android.mk
@@ -16,4 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(call all-subdir-makefiles)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalWifiHidlTargetTest
+VTS_CONFIG_SRC_DIR := testcases/hal/wifi/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/target/AndroidTest.xml b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..1099a5a
--- /dev/null
+++ b/wifi/1.0/vts/functional/vts/testcases/hal/wifi/hidl/target/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS WiFi HIDL HAL's basic target-side test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="HalWifiHidlTargetTest" />
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/wifi_hidl_test/wifi_hidl_test,
+            _64bit::DATA/nativetest64/wifi_hidl_test/wifi_hidl_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="10m" />
+    </test>
+</configuration>
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 f88b866..050bba3 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
@@ -34,8 +34,6 @@
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
 
-const char kWifiServiceName[] = "wifi";
-
 void stopFramework() {
     ASSERT_EQ(std::system("svc wifi disable"), 0);
     sleep(5);
@@ -44,7 +42,7 @@
 void startFramework() { ASSERT_EQ(std::system("svc wifi enable"), 0); }
 
 sp<IWifi> getWifi() {
-    sp<IWifi> wifi = IWifi::getService(kWifiServiceName);
+    sp<IWifi> wifi = IWifi::getService();
     return wifi;
 }
 
diff --git a/wifi/1.0/vts/types.vts b/wifi/1.0/vts/types.vts
new file mode 100644
index 0000000..fd60d4e
--- /dev/null
+++ b/wifi/1.0/vts/types.vts
@@ -0,0 +1,2846 @@
+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
+        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_value: {
+            vector_size: 6
+            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
+        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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+    struct_value: {
+        name: "ssidWhitelist"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 32
+                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: "ENABLED"
+        scalar_value: {
+            uint8_t: 0
+        }
+        enumerator: "DISABLED"
+        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: "rssiProximity"
+        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: "clusterIdLowVal"
+        type: TYPE_SCALAR
+        scalar_type: "uint16_t"
+    }
+    struct_value: {
+        name: "clusterIdHighVal"
+        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_value: {
+            vector_size: 6
+            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_VECTOR
+        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_VECTOR
+        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_VECTOR
+        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: "includeServiceIdsInBeacon"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "numberOfServiceIdsInBeacon"
+        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_VECTOR
+        vector_value: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::NanBandSpecificConfig"
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::wifi::V1_0::NanEnableRequest"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "operateInBand"
+        type: TYPE_VECTOR
+        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: "uint16_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_STRING
+    }
+    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: "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
+        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
+        predefined_type: "::android::hardware::wifi::V1_0::NanRangingIndication"
+    }
+    struct_value: {
+        name: "distanceIngressCm"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "distanceEgressCm"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_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_value: {
+                vector_size: 6
+                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: "uint16_t"
+    }
+    struct_value: {
+        name: "peerId"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "addr"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 6
+            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: "message"
+        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_value: {
+            vector_size: 6
+            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
+        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
+        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::NanBeaconSdfPayloadRequest"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "transmitInNext16dws"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "transmitInDiscoveryBeacon"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "transmitInSyncBeacon"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "transmitInServiceDiscoveryFrame"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "vendorOui"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "vsa"
+        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: "maxVsaDataLen"
+        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
+        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: "uint16_t"
+    }
+    struct_value: {
+        name: "peerId"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "addr"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 6
+            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: "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
+        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
+        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: "uint16_t"
+    }
+    struct_value: {
+        name: "peerId"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "addr"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 6
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+    struct_value: {
+        name: "receivedInFaw"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "message"
+        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_value: {
+            vector_size: 6
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::wifi::V1_0::NanVsaRxFrameMask"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "uint32_t"
+
+        enumerator: "DISCOVERY_BEACON_MASK"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "SYNC_BEACON_MASK"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "SERVICE_DISCOVERY_MASK"
+        scalar_value: {
+            uint32_t: 4
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::wifi::V1_0::NanBeaconSdfPayloadInd"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "addr"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 6
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+    struct_value: {
+        name: "isVsaReceived"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "vsaReceivedOnFrames"
+        type: TYPE_MASK
+        predefined_type: "::android::hardware::wifi::V1_0::NanVsaRxFrameMask"
+    }
+    struct_value: {
+        name: "vsaVendorOui"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "vsa"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+    struct_value: {
+        name: "isBeaconSdfPayloadReceived"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "beaconSdfPayloadData"
+        type: TYPE_VECTOR
+        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: "uint16_t"
+    }
+    struct_value: {
+        name: "peerDiscMacAddr"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 6
+            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_value: {
+            vector_size: 6
+            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_value: {
+            vector_size: 6
+            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_value: {
+            vector_size: 6
+            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
+        predefined_type: "::android::hardware::wifi::V1_0::RttPreamble"
+    }
+    struct_value: {
+        name: "bwSupport"
+        type: TYPE_MASK
+        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_value: {
+            vector_size: 2
+            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/Android.mk b/wifi/supplicant/1.0/Android.mk
index 02a62b6..ad49b0a 100644
--- a/wifi/supplicant/1.0/Android.mk
+++ b/wifi/supplicant/1.0/Android.mk
@@ -36,6 +36,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (P2pGroupCapabilityMask)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/P2pGroupCapabilityMask.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.supplicant@1.0::types.P2pGroupCapabilityMask
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (SupplicantStatus)
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/SupplicantStatus.java
@@ -74,6 +93,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (WpsConfigMethods)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/WpsConfigMethods.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.supplicant@1.0::types.WpsConfigMethods
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build ISupplicant.hal
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/ISupplicant.java
@@ -377,6 +415,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (P2pGroupCapabilityMask)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/P2pGroupCapabilityMask.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.supplicant@1.0::types.P2pGroupCapabilityMask
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (SupplicantStatus)
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/SupplicantStatus.java
@@ -415,6 +472,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (WpsConfigMethods)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/WpsConfigMethods.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.supplicant@1.0::types.WpsConfigMethods
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build ISupplicant.hal
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/ISupplicant.java
diff --git a/wifi/supplicant/1.0/ISupplicantCallback.hal b/wifi/supplicant/1.0/ISupplicantCallback.hal
index a5a0da5..3674cfb 100644
--- a/wifi/supplicant/1.0/ISupplicantCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantCallback.hal
@@ -37,4 +37,9 @@
    * @param ifName Name of the network interface, e.g., wlan0
    */
   oneway onInterfaceRemoved(string ifName);
+
+  /**
+   * Used to indicate that the supplicant daemon is terminating.
+   */
+  oneway onTerminating();
 };
diff --git a/wifi/supplicant/1.0/ISupplicantIface.hal b/wifi/supplicant/1.0/ISupplicantIface.hal
index 600df30..c0058a0 100644
--- a/wifi/supplicant/1.0/ISupplicantIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantIface.hal
@@ -24,6 +24,17 @@
  */
 interface ISupplicantIface {
   /**
+   * Size limits for some of the params used in this interface.
+   */
+  enum ParamSizeLimits : uint32_t {
+      WPS_DEVICE_NAME_MAX_LEN = 32,
+      WPS_MANUFACTURER_MAX_LEN = 64,
+      WPS_MODEL_NAME_MAX_LEN = 32,
+      WPS_MODEL_NUMBER_MAX_LEN = 32,
+      WPS_SERIAL_NUMBER_MAX_LEN = 32
+  };
+
+  /**
    * Retrieves the name of the network interface.
    *
    * @return status Status of the operation.
@@ -105,9 +116,92 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|
    * @return networkIds List of all network Id's controlled by the supplicant.
    */
   listNetworks()
       generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds);
+
+  /**
+   * Set the device name for WPS operations.
+   * User-friendly description of device (up to |WPS_DEVICE_NAME_MAX_LEN|
+   * octets encoded in UTF-8).
+   *
+   * @parm name Name to be set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   */
+  setWpsDeviceName(string name) generates (SupplicantStatus status);
+
+  /**
+   * Set the manufacturer for WPS operations.
+   * The manufacturer of the device (up to |WPS_MANUFACTURER_MAX_LEN| ASCII
+   * characters).
+   *
+   * @parm manufacturer Manufacture to be set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   */
+  setWpsManufacturer(string manufacturer) generates (SupplicantStatus status);
+
+  /**
+   * Set the model name for WPS operations.
+   * Model of the device (up to |WPS_MODEL_NAME_MAX_LEN| ASCII characters).
+   *
+   * @parm modelName Model name to be set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   */
+  setWpsModelName(string modelName) generates (SupplicantStatus status);
+
+  /**
+   * Set the model number for WPS operations.
+   * Additional device description (up to |WPS_MODEL_NUMBER_MAX_LEN| ASCII
+   * characters).
+   *
+   * @parm modelNumber Model number to be set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   */
+  setWpsModelNumber(string modelNumber) generates (SupplicantStatus status);
+
+  /**
+   * Set the serial number for WPS operations.
+   * Serial number of the device (up to |WPS_SERIAL_NUMBER_MAX_LEN| characters)
+   *
+   * @parm serialNumber Serial number to be set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   */
+  setWpsSerialNumber(string serialNumber) generates (SupplicantStatus status);
+
+  /**
+   * Set the list of supported config methods for WPS operations.
+   *
+   * @param configMethods Mask of WPS configuration methods supported by the
+   *        device.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   */
+  setWpsConfigMethods(bitfield<WpsConfigMethods> configMethods)
+      generates (SupplicantStatus status);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIface.hal b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
index ddf05cc..45e90f3 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
@@ -40,16 +40,6 @@
     KEYPAD
   };
 
-  enum GroupCapabilityMask : uint32_t {
-    GROUP_OWNER = 1 << 0,
-    PERSISTENT_GROUP = 1 << 1,
-    GROUP_LIMIT = 1 << 2,
-    INTRA_BSS_DIST = 1 << 3,
-    CROSS_CONN = 1 << 4,
-    PERSISTENT_RECONN = 1 << 5,
-    GROUP_FORMATION = 1 << 6
-  };
-
   /**
    * Use to specify a range of frequencies.
    * For example: 2412-2432,2462,5000-6000, etc.
@@ -420,10 +410,11 @@
    *         |SupplicantStatusCode.SUCCESS|,
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   * @return capabilityMask Combination of |GroupCapabilityMask| values.
+   * @return capabilityMask Combination of |P2pGroupCapabilityMask| values.
    */
   getGroupCapability(MacAddress peerAddress)
-      generates (SupplicantStatus status, uint32_t capabilities);
+      generates (SupplicantStatus status,
+                 bitfield<P2pGroupCapabilityMask> capabilities);
 
   /**
    * This command can be used to add a bonjour service.
@@ -533,7 +524,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   setMiracastMode(MiracastMode mode)
       generates (SupplicantStatus status);
@@ -548,7 +540,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   startWpsPbc(string groupIfName, Bssid bssid)
       generates (SupplicantStatus status);
@@ -561,7 +554,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   startWpsPinKeypad(string groupIfName, string pin)
       generates (SupplicantStatus status);
@@ -574,7 +568,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    * @return generatedPin 8 digit pin generated.
    */
   startWpsPinDisplay(string groupIfName, Bssid bssid)
@@ -587,7 +582,34 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+
    */
   cancelWps(string groupIfName) generates (SupplicantStatus status);
+
+  /**
+   * Enable/Disable Wifi Display.
+   *
+   * @param enable true to enable, false to disable.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  enableWfd(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Set Wifi Display device info.
+   *
+   * @param info WFD device info as described in section 5.1.2 of WFD technical
+   *        specification v1.0.0.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  setWfdDeviceInfo(uint8_t[8] info) generates (SupplicantStatus status);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
index 9ac8b36..ad4290b 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
@@ -26,6 +26,50 @@
  */
 interface ISupplicantP2pIfaceCallback {
   /**
+   * WPS Device Password ID
+   */
+  enum WpsDevPasswordId : uint16_t {
+    DEFAULT = 0x0000,
+    USER_SPECIFIED = 0x0001,
+    MACHINE_SPECIFIED = 0x0002,
+    REKEY = 0x0003,
+    PUSHBUTTON = 0x0004,
+    REGISTRAR_SPECIFIED = 0x0005,
+    NFC_CONNECTION_HANDOVER = 0x0007,
+    P2PS_DEFAULT = 0x0008
+  };
+
+  /**
+   * Status codes for P2P operations.
+   */
+  enum P2pStatusCode : uint32_t {
+    SUCCESS = 0,
+    FAIL_INFO_CURRENTLY_UNAVAILABLE = 1,
+    FAIL_INCOMPATIBLE_PARAMS = 2,
+    FAIL_LIMIT_REACHED = 3,
+    FAIL_INVALID_PARAMS = 4,
+    FAIL_UNABLE_TO_ACCOMMODATE = 5,
+    FAIL_PREV_PROTOCOL_ERROR = 6,
+    FAIL_NO_COMMON_CHANNELS = 7,
+    FAIL_UNKNOWN_GROUP = 8,
+    FAIL_BOTH_GO_INTENT_15 = 9,
+    FAIL_INCOMPATIBLE_PROV_METHOD = 10,
+    FAIL_REJECTED_BY_USER = 11,
+    SUCCESS_DEFERRED = 12,
+  };
+
+  /**
+   * Status codes for P2P discovery.
+   */
+  enum P2pProvDiscStatusCode : uint8_t {
+    SUCCESS = 0,
+    TIMEOUT = 1,
+    REJECTED = 2,
+    TIMEOUT_JOIN = 3,
+    INFO_UNAVAILABLE = 4
+  };
+
+  /**
    * Used to indicate that a new network has been added.
    *
    * @param id Network ID allocated to the corresponding network.
@@ -38,4 +82,192 @@
    * @param id Network ID allocated to the corresponding network.
    */
   oneway onNetworkRemoved(SupplicantNetworkId id);
+
+  /**
+   * Used to indicate that a P2P device has been found.
+   *
+   * @param srcAddress MAC address of the device found. This must either
+   *        be the P2P device address or the P2P interface address.
+   * @param p2pDeviceAddress P2P device address.
+   * @param primaryDeviceType Type of device. Refer to section B.1 of Wifi P2P
+   *        Technical specification v1.2.
+   * @param deviceName Name of the device.
+   * @param configMethods Mask of WPS configuration methods supported by the
+   *        device.
+   * @param deviceCapabilities Refer to section 4.1.4 of Wifi P2P Technical
+   *        specification v1.2.
+   * @param groupCapabilites Refer to section 4.1.4 of Wifi P2P Technical
+   *        specification v1.2.
+   * @param wfdDeviceInfo WFD device info as described in section 5.1.2 of WFD
+   *        technical specification v1.0.0.
+   */
+  oneway onDeviceFound(
+      MacAddress srcAddress, MacAddress p2pDeviceAddress,
+      uint8_t[8] primaryDeviceType, string deviceName,
+      bitfield<WpsConfigMethods> configMethods, uint8_t deviceCapabilities,
+      bitfield<P2pGroupCapabilityMask> groupCapabilities, uint8_t[8] wfdDeviceInfo);
+
+  /**
+   * Used to indicate that a P2P device has been lost.
+   *
+   * @param p2pDeviceAddress P2P device address.
+   */
+  oneway onDeviceLost(MacAddress p2pDeviceAddress);
+
+  /**
+   * Used to indicate the termination of P2P find operation.
+   */
+  oneway onFindStopped();
+
+  /**
+   * Used to indicate the reception of a P2P Group Owner negotiation request.
+   *
+   * @param srcAddress MAC address of the device that initiated the GO
+   *        negotiation request.
+   * @param passwordId Type of password.
+   */
+  oneway onGoNegotiationRequest(
+      MacAddress srcAddress, WpsDevPasswordId passwordId);
+
+  /**
+   * Used to indicate the completion of a P2P Group Owner negotiation request.
+   *
+   * @param status Status of the GO negotiation.
+   */
+  oneway onGoNegotiationCompleted(P2pStatusCode status);
+
+  /**
+   * Used to indicate a successful formation of a P2P group.
+   */
+  oneway onGroupFormationSuccess();
+
+  /**
+   * Used to indicate a failure to form a P2P group.
+   *
+   * @param failureReason Failure reason string for debug purposes.
+   */
+  oneway onGroupFormationFailure(string failureReason);
+
+  /**
+   * Used to indicate the start of a P2P group.
+   *
+   * @param groupIfName Interface name of the group. (For ex: p2p-p2p0-1)
+   * @param isGo Whether this device is owner of the group.
+   * @param ssid SSID of the group.
+   * @param frequency Frequency on which this group is created.
+   * @param psk PSK used to secure the group.
+   * @param passphrase PSK passphrase used to secure the group.
+   * @param goDeviceAddress MAC Address of the owner of this group.
+   * @param isPersistent Whether this group is persisted or not.
+   */
+  oneway onGroupStarted(
+      string groupIfname, bool isGo, Ssid ssid, uint32_t frequency,
+      uint8_t[32] psk, string passphrase, MacAddress goDeviceAddress,
+      bool isPersistent);
+
+  /**
+   * Used to indicate the removal of a P2P group.
+   *
+   * @param groupIfName Interface name of the group. (For ex: p2p-p2p0-1)
+   * @param isGo Whether this device is owner of the group.
+   */
+  oneway onGroupRemoved(string groupIfname, bool isGo);
+
+  /**
+   * Used to indicate the reception of a P2P invitation.
+   *
+   * @param srcAddress MAC address of the device that sent the invitation.
+   * @param goDeviceAddress MAC Address of the owner of this group.
+   * @param Bssid Bssid of the group.
+   * @param persistentNetworkId Persistent network Id of the group.
+   * @param operatingFrequency Frequency on which the invitation was received.
+   */
+  oneway onInvitationReceived(
+      MacAddress srcAddress, MacAddress goDeviceAddress, Bssid bssid,
+      SupplicantNetworkId persistentNetworkId, uint32_t operatingFrequency);
+
+  /**
+   * Used to indicate the result of the P2P invitation request.
+   *
+   * @param Bssid Bssid of the group.
+   * @param status Status of the invitation.
+   */
+  oneway onInvitationResult(Bssid bssid, P2pStatusCode status);
+
+  /**
+   * Used to indicate a push-button request generated during provision discovery.
+   *
+   * @param p2pDeviceAddress P2P device address.
+   */
+  oneway onProvisionDiscoveryPbcRequest(MacAddress p2pDeviceAddress);
+
+  /**
+   * Used to indicate a push-button response generated during provision discovery.
+   *
+   * @param p2pDeviceAddress P2P device address.
+   */
+  oneway onProvisionDiscoveryPbcResponse(MacAddress p2pDeviceAddress);
+
+  /**
+   * Used to indicate the pin generated during provision discovery.
+   *
+   * @param p2pDeviceAddress P2P device address.
+   * @param generatedPin 8 digit pin generated.
+   */
+  oneway onProvisionDiscoveryShowPin(
+      MacAddress p2pDeviceAddress, string generatedPin);
+
+  /**
+   * Used to indicate that a pin needs to be entered during provision discovery.
+   *
+   * @param p2pDeviceAddress P2P device address.
+   */
+  oneway onProvisionDiscoveryEnterPin(MacAddress p2pDeviceAddress);
+
+  /**
+   * Used to indicate a provision discovery failure.
+   *
+   * @param p2pDeviceAddress P2P device address.
+   */
+  oneway onProvisionDiscoveryFailure(MacAddress p2pDeviceAddress);
+
+  /**
+   * Used to indicate the completion of a P2P provision discovery request.
+   *
+   * @param p2pDeviceAddress P2P device address.
+   * @param isRequest Whether we received or sent the provision discovery.
+   * @param status Status of the provision discovery.
+   * @param configMethods Mask of WPS configuration methods supported.
+   * @param generatedPin 8 digit pin generated.
+   */
+  oneway onProvisionDiscoveryCompleted(
+      MacAddress p2pDeviceAddress, bool isRequest, P2pProvDiscStatusCode status,
+      bitfield<WpsConfigMethods> configMethods, string generatedPin);
+
+  /**
+   * Used to indicate the reception of a P2P service discovery response.
+   *
+   * @param srcAddress MAC address of the device that sent the service discovery.
+   * @param updateIndicator Service update indicator. Refer to section 3.1.3 of
+   *        Wifi P2P Technical specification v1.2.
+   * @parm tlvs Refer to section 3.1.3.1 of Wifi P2P Technical specification v1.2.
+   */
+  oneway onServiceDiscoveryResponse(
+      MacAddress srcAddress, uint16_t updateIndicator, vec<uint8_t> tlvs);
+
+  /**
+   * Used to indicate when a STA device is connected to this device.
+   *
+   * @param srcAddress MAC address of the device that was authorized.
+   * @param p2pDeviceAddress P2P device address.
+   */
+  oneway onStaAuthorized(MacAddress srcAddress, MacAddress p2pDeviceAddress);
+
+  /**
+   * Used to indicate when a STA device is disconnected from this device.
+   *
+   * @param srcAddress MAC address of the device that was deauthorized.
+   * @param p2pDeviceAddress P2P device address.
+   */
+  oneway onStaDeauthorized(MacAddress srcAddress, MacAddress p2pDeviceAddress);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal b/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal
index 34727c4..d32b47e 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal
@@ -42,4 +42,62 @@
    */
   registerCallback(ISupplicantP2pNetworkCallback callback)
       generates (SupplicantStatus status);
+
+  /**
+   * Getters for the various network params.
+   */
+  /**
+   * Get SSID for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return ssid value set.
+   */
+  getSsid() generates (SupplicantStatus status, Ssid ssid);
+
+  /**
+   * Get the BSSID set for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return bssid value set.
+   */
+  getBssid() generates (SupplicantStatus status, Bssid bssid);
+
+  /**
+   * Check if the network is currently active one.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return isCurrent true if current, false otherwise.
+   */
+  isCurrent() generates (SupplicantStatus status, bool isCurrent);
+
+  /**
+   * Check if the network is marked persistent.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return isPersistent true if persistent, false otherwise.
+   */
+  isPersistent() generates (SupplicantStatus status, bool isPersistent);
+
+  /**
+   * Check if the device is the group owner of the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return isGo true if group owner, false otherwise.
+   */
+  isGo() generates (SupplicantStatus status, bool isGo);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantStaIface.hal b/wifi/supplicant/1.0/ISupplicantStaIface.hal
index 0f0d41b..c9d9ee6 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIface.hal
@@ -219,7 +219,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    * @return macAddr MAC address of the device.
    */
   getMacAddress()
@@ -231,7 +232,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   startRxFilter() generates (SupplicantStatus status);
 
@@ -241,7 +243,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   stopRxFilter() generates (SupplicantStatus status);
 
@@ -252,7 +255,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   addRxFilter(RxFilterType type)
       generates (SupplicantStatus status);
@@ -264,7 +268,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   removeRxFilter(RxFilterType type)
       generates (SupplicantStatus status);
@@ -276,7 +281,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   setBtCoexistenceMode(BtCoexistenceMode mode)
       generates (SupplicantStatus status);
@@ -291,7 +297,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   setBtCoexistenceScanModeEnabled(bool enable)
       generates (SupplicantStatus status);
@@ -303,7 +310,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   setSuspendModeEnabled(bool enable)
       generates (SupplicantStatus status);
@@ -315,7 +323,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   setCountryCode(int8_t[2] code)
       generates (SupplicantStatus status);
@@ -328,7 +337,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   startWpsRegistrar(Bssid bssid, string pin)
       generates (SupplicantStatus status);
@@ -342,7 +352,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   startWpsPbc(Bssid bssid) generates (SupplicantStatus status);
 
@@ -353,7 +364,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   startWpsPinKeypad(string pin) generates (SupplicantStatus status);
 
@@ -364,7 +376,8 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    * @return generatedPin 8 digit pin generated.
    */
   startWpsPinDisplay(Bssid bssid)
@@ -376,7 +389,20 @@
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
    */
   cancelWps() generates (SupplicantStatus status);
+
+  /**
+   * Use external processing for SIM/USIM operations
+   *
+   * @param useExternalSim true to use external, false otherwise.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  setExternalSim(bool useExternalSim) generates (SupplicantStatus status);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
index 55ff9a8..4b201d4 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
@@ -257,8 +257,15 @@
                                     string url);
 
   /**
-   * Used to indicate a disconnect from the currently connected
-   * network on this iface,.
+   * Used to indicate the connection to a new network on this iface.
+   *
+   * @param bssid BSSID of the AP to which we connected.
+   */
+  oneway onConnected(Bssid bssid);
+
+  /**
+   * Used to indicate the disconnection from the currently connected
+   * network on this iface.
    *
    * @param bssid BSSID of the AP from which we disconnected.
    * @param locallyGenerated If the disconnect was triggered by
@@ -270,6 +277,13 @@
           Bssid bssid, bool locallyGenerated, uint32_t reasonCode);
 
   /**
+   * Used to indicate the completion of association to an AP.
+   *
+   * @param bssid BSSID of the corresponding AP.
+   */
+  oneway onAssociationCompleted(Bssid bssid);
+
+  /**
    * Used to indicate an association rejection recieved from the AP
    * to which the connection is being attempted.
    *
@@ -281,6 +295,18 @@
   oneway onAssociationRejected(Bssid bssid, uint32_t statusCode);
 
   /**
+   * Used to indicate the timeout of authentication to an AP.
+   *
+   * @param bssid BSSID of the corresponding AP.
+   */
+  oneway onAuthenticationTimeout(Bssid bssid);
+
+  /**
+   * Used to indicate an EAP authentication failure.
+   */
+  oneway onEapFailure();
+
+  /**
    * Used to indicate the success of a WPS connection attempt.
    */
   oneway onWpsEventSuccess();
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
index 479ba94..b347c1d 100644
--- a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -51,7 +51,10 @@
     WPA_EAP = 1 << 0,
     WPA_PSK = 1 << 1,
     NONE = 1 << 2,
-    IEEE8021X = 1 << 3
+    IEEE8021X = 1 << 3,
+    FT_EAP = 1 << 5,
+    FT_PSK = 1 << 6,
+    OSEN = 1 << 15
   };
 
   /** Possble mask of values for Proto param. */
@@ -74,7 +77,8 @@
     WEP40 = 1 << 1,
     WEP104 = 1 << 2,
     TKIP = 1 << 3,
-    CCMP = 1 << 4
+    CCMP = 1 << 4,
+    GTK_NOT_USED = 1 << 14
   };
 
   /** Possble mask of values for PairwiseCipher param. */
@@ -193,7 +197,7 @@
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
    */
-  setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
+  setKeyMgmt(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
 
   /**
    * Set proto mask for the network.
@@ -207,7 +211,7 @@
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
    */
-  setProto(uint32_t protoMask) generates (SupplicantStatus status);
+  setProto(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
 
   /**
    * Set auth alg mask for the network.
@@ -221,7 +225,7 @@
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
    */
-  setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status);
+  setAuthAlg(bitfield<AuthAlgMask> authAlgMask) generates (SupplicantStatus status);
 
   /**
    * Set group cipher mask for the network.
@@ -235,7 +239,7 @@
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
    */
-  setGroupCipher(uint32_t groupCipherMask)
+  setGroupCipher(bitfield<GroupCipherMask> groupCipherMask)
       generates (SupplicantStatus status);
 
   /**
@@ -250,7 +254,7 @@
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
    */
-  setPairwiseCipher(uint32_t pairwiseCipherMask)
+  setPairwiseCipher(bitfield<PairwiseCipherMask> pairwiseCipherMask)
       generates (SupplicantStatus status);
 
   /**
@@ -504,6 +508,19 @@
    */
   setEapDomainSuffixMatch(string match)
       generates (SupplicantStatus status);
+  /**
+   * Get ID string set for this network.
+   * Network identifier string for external scripts.
+   *
+   * @return idStr ID string value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setIdStr(string idStr) generates (SupplicantStatus status);
 
   /**
    * Getters for the various network params.
@@ -551,7 +568,7 @@
    * @return keyMgmtMask Combination of |KeyMgmtMask| values.
    */
   getKeyMgmt()
-      generates (SupplicantStatus status, uint32_t keyMgmtMask);
+      generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
 
   /**
    * Get the proto mask set for the network.
@@ -562,7 +579,7 @@
    *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
    * @return protoMask Combination of |ProtoMask| values.
    */
-  getProto() generates (SupplicantStatus status, uint32_t protoMask);
+  getProto() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
 
   /**
    * Get the auth alg mask set for the network.
@@ -574,7 +591,7 @@
    * @return authAlgMask Combination of |AuthAlgMask| values.
    */
   getAuthAlg()
-      generates (SupplicantStatus status, uint32_t authAlgMask);
+      generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
 
   /**
    * Get the group cipher mask set for the network.
@@ -586,7 +603,8 @@
    * @return groupCipherMask Combination of |GroupCipherMask| values.
    */
   getGroupCipher()
-      generates (SupplicantStatus status, uint32_t groupCipherMask);
+      generates (SupplicantStatus status,
+                 bitfield<GroupCipherMask> groupCipherMask);
 
   /**
    * Get the pairwise cipher mask set for the network.
@@ -598,7 +616,8 @@
    * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
    */
   getPairwiseCipher()
-      generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
+      generates (SupplicantStatus status,
+                 bitfield<PairwiseCipherMask> pairwiseCipherMask);
 
   /**
    * Get passphrase for WPA_PSK network.
@@ -827,6 +846,20 @@
       generates (SupplicantStatus status, string match);
 
   /**
+   * Get ID string set for this network.
+   * Network identifier string for external scripts.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return idStr ID string set.
+   */
+  getIdStr() generates (SupplicantStatus status, string idStr);
+
+  /**
    * Enable the network for connection purposes.
    *
    * This must trigger a connection to the network if:
diff --git a/wifi/supplicant/1.0/types.hal b/wifi/supplicant/1.0/types.hal
index 16a8d15..10cf483 100644
--- a/wifi/supplicant/1.0/types.hal
+++ b/wifi/supplicant/1.0/types.hal
@@ -73,3 +73,38 @@
   STA,
   P2P
 };
+
+/**
+ * P2P group capability.
+ */
+enum P2pGroupCapabilityMask : uint32_t {
+  GROUP_OWNER = 1 << 0,
+  PERSISTENT_GROUP = 1 << 1,
+  GROUP_LIMIT = 1 << 2,
+  INTRA_BSS_DIST = 1 << 3,
+  CROSS_CONN = 1 << 4,
+  PERSISTENT_RECONN = 1 << 5,
+  GROUP_FORMATION = 1 << 6
+};
+
+/**
+ * WPS config methods.
+ * Refer to section 3 of IBSS with Wi-Fi Protected Setup
+ * Technical Specification Version 1.0.0.
+ */
+enum WpsConfigMethods : uint16_t {
+  USBA = 0x0001,
+  ETHERNET = 0x0002,
+  LABEL = 0x0004,
+  DISPLAY = 0x0008,
+  EXT_NFC_TOKEN = 0x0010,
+  INT_NFC_TOKEN = 0x0020,
+  NFC_INTERFACE = 0x0040,
+  PUSHBUTTON = 0x0080,
+  KEYPAD = 0x0100,
+  VIRT_PUSHBUTTON = 0x0280,
+  PHY_PUSHBUTTON = 0x0480,
+  P2PS = 0x1000,
+  VIRT_DISPLAY = 0x2008,
+  PHY_DISPLAY = 0x4008
+};
diff --git a/wifi/supplicant/1.0/vts/Supplicant.vts b/wifi/supplicant/1.0/vts/Supplicant.vts
new file mode 100644
index 0000000..69fe209
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/Supplicant.vts
@@ -0,0 +1,160 @@
+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::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: "ISupplicantIface"
+            is_callback: false
+        }
+        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: "ISupplicantCallback"
+            is_callback: true
+        }
+    }
+
+    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
new file mode 100644
index 0000000..e439bd6
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantCallback.vts
@@ -0,0 +1,27 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "ISupplicantCallback"
+
+package: "android.hardware.wifi.supplicant"
+
+
+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
new file mode 100644
index 0000000..41c77f8
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantIface.vts
@@ -0,0 +1,187 @@
+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"
+
+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: "ISupplicantNetwork"
+            is_callback: false
+        }
+    }
+
+    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: "ISupplicantNetwork"
+            is_callback: false
+        }
+        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: "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
+            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
new file mode 100644
index 0000000..edcabce
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantNetwork.vts
@@ -0,0 +1,45 @@
+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"
+
+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
new file mode 100644
index 0000000..afa9a8c
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts
@@ -0,0 +1,813 @@
+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::ISupplicantP2pIfaceCallback"
+import: "android.hardware.wifi.supplicant@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
+            }
+        }
+    }
+
+    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: "ISupplicantNetwork"
+            is_callback: false
+        }
+    }
+
+    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: "ISupplicantNetwork"
+            is_callback: false
+        }
+        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: "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
+            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: "ISupplicantP2pIfaceCallback"
+            is_callback: true
+        }
+    }
+
+    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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::P2pGroupCapabilityMask"
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 8
+                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
new file mode 100644
index 0000000..09fd779
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts
@@ -0,0 +1,520 @@
+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"
+
+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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 8
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_STRING
+        }
+        arg: {
+            type: TYPE_MASK
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+        arg: {
+            type: TYPE_MASK
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::P2pGroupCapabilityMask"
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 8
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onDeviceLost"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onFindStopped"
+    }
+
+    api: {
+        name: "onGoNegotiationRequest"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 32
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_STRING
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onProvisionDiscoveryPbcResponse"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onProvisionDiscoveryShowPin"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_STRING
+        }
+    }
+
+    api: {
+        name: "onProvisionDiscoveryEnterPin"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onProvisionDiscoveryFailure"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onProvisionDiscoveryCompleted"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
+        }
+        arg: {
+            type: TYPE_STRING
+        }
+    }
+
+    api: {
+        name: "onServiceDiscoveryResponse"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onStaDeauthorized"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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
new file mode 100644
index 0000000..fddcca3
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts
@@ -0,0 +1,127 @@
+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"
+
+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: "ISupplicantP2pNetworkCallback"
+            is_callback: true
+        }
+    }
+
+    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_value: {
+                vector_size: 6
+                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
new file mode 100644
index 0000000..0e9ccde
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts
@@ -0,0 +1,9 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "ISupplicantP2pNetworkCallback"
+
+package: "android.hardware.wifi.supplicant"
+
+
+interface: {
+}
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaIface.vts b/wifi/supplicant/1.0/vts/SupplicantStaIface.vts
new file mode 100644
index 0000000..ceadb6c
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantStaIface.vts
@@ -0,0 +1,623 @@
+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::ISupplicantStaIfaceCallback"
+import: "android.hardware.wifi.supplicant@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
+            }
+        }
+    }
+
+    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
+            }
+        }
+    }
+
+    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: "ISupplicantNetwork"
+            is_callback: false
+        }
+    }
+
+    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: "ISupplicantNetwork"
+            is_callback: false
+        }
+        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: "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
+            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: "ISupplicantStaIfaceCallback"
+            is_callback: true
+        }
+    }
+
+    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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 2
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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"
+        }
+    }
+
+}
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts b/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts
new file mode 100644
index 0000000..88b1c3b
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts
@@ -0,0 +1,499 @@
+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"
+
+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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onDisconnected"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onAssociationRejected"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+    }
+
+    api: {
+        name: "onAuthenticationTimeout"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "onEapFailure"
+    }
+
+    api: {
+        name: "onWpsEventSuccess"
+    }
+
+    api: {
+        name: "onWpsEventFail"
+        arg: {
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 6
+                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"
+    }
+
+}
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts b/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts
new file mode 100644
index 0000000..f493b3e
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts
@@ -0,0 +1,1087 @@
+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"
+
+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_value: {
+                vector_size: 8
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        struct_value: {
+            name: "sres"
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 4
+                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_value: {
+                vector_size: 16
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        struct_value: {
+            name: "ck"
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 16
+                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: "ISupplicantStaNetworkCallback"
+            is_callback: true
+        }
+    }
+
+    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_value: {
+                vector_size: 6
+                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
+            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
+            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
+            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
+            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
+            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: "setIdStr"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_STRING
+        }
+    }
+
+    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_value: {
+                vector_size: 6
+                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
+            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
+            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
+            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
+            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
+            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_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::NetworkResponseEapSimGsmAuthParams"
+        }
+    }
+
+    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: "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
new file mode 100644
index 0000000..3fe2da7
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts
@@ -0,0 +1,69 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "ISupplicantStaNetworkCallback"
+
+package: "android.hardware.wifi.supplicant"
+
+
+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_value: {
+                    vector_size: 16
+                    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_value: {
+                vector_size: 16
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+        struct_value: {
+            name: "autn"
+            type: TYPE_ARRAY
+            vector_value: {
+                vector_size: 16
+                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
new file mode 100644
index 0000000..8fa649f
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/Android.mk
@@ -0,0 +1,43 @@
+#
+# 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.
+#
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := supplicant_hidl_test
+LOCAL_CPPFLAGS := -Wall -Werror -Wextra
+LOCAL_SRC_FILES := \
+    main.cpp \
+    supplicant_hidl_test.cpp \
+    supplicant_hidl_test_utils.cpp \
+    supplicant_p2p_iface_hidl_test.cpp \
+    supplicant_sta_iface_hidl_test.cpp \
+    supplicant_sta_network_hidl_test.cpp
+LOCAL_SHARED_LIBRARIES := \
+    android.hardware.wifi.supplicant@1.0 \
+    libbase \
+    libcutils \
+    libhidlbase \
+    libhidltransport \
+    libhwbinder \
+    liblog \
+    libutils \
+    libwifi-hal \
+    libwifi-system
+LOCAL_STATIC_LIBRARIES := \
+    libgmock \
+    libgtest
+include $(BUILD_NATIVE_TEST)
+
diff --git a/wifi/supplicant/1.0/vts/functional/main.cpp b/wifi/supplicant/1.0/vts/functional/main.cpp
new file mode 100644
index 0000000..81a2947
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/main.cpp
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#include <android-base/logging.h>
+
+#include <gtest/gtest.h>
+
+#include "supplicant_hidl_test_utils.h"
+
+class SupplicantHidlEnvironment : public ::testing::Environment {
+   public:
+    virtual void SetUp() override {
+        stopWifiFramework();
+        stopSupplicant();
+    }
+    virtual void TearDown() override {
+        startWifiFramework();
+        // Framework will start wpa_supplicant.
+    }
+};
+
+int main(int argc, char** argv) {
+    ::testing::AddGlobalTestEnvironment(new SupplicantHidlEnvironment);
+    ::testing::InitGoogleTest(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    LOG(INFO) << "Test result = " << status;
+    return status;
+}
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
new file mode 100644
index 0000000..9922447
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#include <android-base/logging.h>
+
+#include <gtest/gtest.h>
+
+#include "supplicant_hidl_test_utils.h"
+
+/*
+ * Create:
+ * Ensures that an instance of the ISupplicant proxy object is
+ * successfully created.
+ */
+TEST(SupplicantHidlTestNoFixture, Create) {
+    startSupplicantAndWaitForHidlService();
+    EXPECT_NE(nullptr, getSupplicant().get());
+    stopSupplicant();
+}
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
new file mode 100644
index 0000000..2f3405d
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
@@ -0,0 +1,267 @@
+/*
+ * 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.
+ */
+
+#include <android-base/logging.h>
+#include <gtest/gtest.h>
+
+#include <hidl/HidlTransportSupport.h>
+#include <android/hidl/manager/1.0/IServiceManager.h>
+#include <android/hidl/manager/1.0/IServiceNotification.h>
+
+#include <wifi_hal/driver_tool.h>
+#include <wifi_system/interface_tool.h>
+#include <wifi_system/supplicant_manager.h>
+
+#include "supplicant_hidl_test_utils.h"
+
+using ::android::sp;
+using ::android::hardware::configureRpcThreadpool;
+using ::android::hardware::joinRpcThreadpool;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::wifi::supplicant::V1_0::ISupplicant;
+using ::android::hardware::wifi::supplicant::V1_0::ISupplicantIface;
+using ::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork;
+using ::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface;
+using ::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork;
+using ::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface;
+using ::android::hardware::wifi::supplicant::V1_0::IfaceType;
+using ::android::hardware::wifi::supplicant::V1_0::SupplicantStatus;
+using ::android::hardware::wifi::supplicant::V1_0::SupplicantStatusCode;
+using ::android::hidl::manager::V1_0::IServiceNotification;
+using ::android::wifi_hal::DriverTool;
+using ::android::wifi_system::InterfaceTool;
+using ::android::wifi_system::SupplicantManager;
+
+namespace {
+const char kSupplicantServiceName[] = "default";
+
+// Helper function to initialize the driver and firmware to STA mode.
+void initilializeDriverAndFirmware() {
+    DriverTool driver_tool;
+    InterfaceTool iface_tool;
+    EXPECT_TRUE(driver_tool.LoadDriver());
+    EXPECT_TRUE(driver_tool.ChangeFirmwareMode(DriverTool::kFirmwareModeSta));
+    EXPECT_TRUE(iface_tool.SetWifiUpState(true));
+}
+
+// Helper function to find any iface of the desired type exposed.
+bool findIfaceOfType(sp<ISupplicant> supplicant, IfaceType desired_type,
+                     ISupplicant::IfaceInfo* out_info) {
+    bool operation_failed = false;
+    std::vector<ISupplicant::IfaceInfo> iface_infos;
+    supplicant->listInterfaces([&](const SupplicantStatus& status,
+                                   hidl_vec<ISupplicant::IfaceInfo> infos) {
+        if (status.code != SupplicantStatusCode::SUCCESS) {
+            operation_failed = true;
+            return;
+        }
+        iface_infos = infos;
+    });
+    if (operation_failed) {
+        return false;
+    }
+    for (const auto& info : iface_infos) {
+        if (info.type == desired_type) {
+            *out_info = info;
+            return true;
+        }
+    }
+    return false;
+}
+}  // namespace
+
+// Utility class to wait for wpa_supplicant's HIDL service registration.
+class ServiceNotificationListener : public IServiceNotification {
+   public:
+    Return<void> onRegistration(const hidl_string& fully_qualified_name,
+                                const hidl_string& instance_name,
+                                bool pre_existing) override {
+        if (pre_existing) {
+            return Void();
+        }
+        std::unique_lock<std::mutex> lock(mutex_);
+        registered_.push_back(std::string(fully_qualified_name.c_str()) + "/" +
+                              instance_name.c_str());
+        lock.unlock();
+        condition_.notify_one();
+        return Void();
+    }
+
+    bool registerForHidlServiceNotifications(const std::string& instance_name) {
+        if (!ISupplicant::registerForNotifications(instance_name, this)) {
+            return false;
+        }
+        configureRpcThreadpool(2, false);
+        return true;
+    }
+
+    bool waitForHidlService(uint32_t timeout_in_millis,
+                            const std::string& instance_name) {
+        std::unique_lock<std::mutex> lock(mutex_);
+        condition_.wait_for(lock, std::chrono::milliseconds(timeout_in_millis),
+                            [&]() { return registered_.size() >= 1; });
+        if (registered_.size() != 1) {
+            return false;
+        }
+        std::string exptected_registered =
+            std::string(ISupplicant::descriptor) + "/" + instance_name;
+        if (registered_[0] != exptected_registered) {
+            LOG(ERROR) << "Expected: " << exptected_registered
+                       << ", Got: " << registered_[0];
+            return false;
+        }
+        return true;
+    }
+
+   private:
+    std::vector<std::string> registered_{};
+    std::mutex mutex_;
+    std::condition_variable condition_;
+};
+
+void stopWifiFramework() {
+    ASSERT_EQ(std::system("svc wifi disable"), 0);
+    // TODO: Use some other mechanism to wait for the framework to
+    // finish disabling.
+    sleep(5);
+}
+
+void startWifiFramework() {
+    ASSERT_EQ(std::system("svc wifi enable"), 0);
+    // These tests don't care whether the framework
+    // finished enabling or not.
+}
+
+void stopSupplicant() {
+    DriverTool driver_tool;
+    SupplicantManager supplicant_manager;
+
+    ASSERT_TRUE(supplicant_manager.StopSupplicant());
+    ASSERT_TRUE(driver_tool.UnloadDriver());
+    ASSERT_FALSE(supplicant_manager.IsSupplicantRunning());
+}
+
+void startSupplicantAndWaitForHidlService() {
+    initilializeDriverAndFirmware();
+
+    android::sp<ServiceNotificationListener> notification_listener =
+        new ServiceNotificationListener();
+    ASSERT_TRUE(notification_listener->registerForHidlServiceNotifications(
+        kSupplicantServiceName));
+
+    SupplicantManager supplicant_manager;
+    ASSERT_TRUE(supplicant_manager.StartSupplicant());
+    ASSERT_TRUE(supplicant_manager.IsSupplicantRunning());
+
+    ASSERT_TRUE(
+        notification_listener->waitForHidlService(200, kSupplicantServiceName));
+}
+
+sp<ISupplicant> getSupplicant() {
+    return ISupplicant::getService(kSupplicantServiceName);
+}
+
+sp<ISupplicantStaIface> getSupplicantStaIface() {
+    sp<ISupplicant> supplicant = getSupplicant();
+    if (!supplicant.get()) {
+        return nullptr;
+    }
+    ISupplicant::IfaceInfo info;
+    if (!findIfaceOfType(supplicant, IfaceType::STA, &info)) {
+        return nullptr;
+    }
+    bool operation_failed = false;
+    sp<ISupplicantStaIface> sta_iface;
+    supplicant->getInterface(info, [&](const SupplicantStatus& status,
+                                       const sp<ISupplicantIface>& iface) {
+        if (status.code != SupplicantStatusCode::SUCCESS) {
+            operation_failed = true;
+            return;
+        }
+        sta_iface = ISupplicantStaIface::castFrom(iface);
+    });
+    if (operation_failed) {
+        return nullptr;
+    }
+    return sta_iface;
+}
+
+sp<ISupplicantStaNetwork> createSupplicantStaNetwork() {
+    sp<ISupplicantStaIface> sta_iface = getSupplicantStaIface();
+    if (!sta_iface.get()) {
+        return nullptr;
+    }
+    bool operation_failed = false;
+    sp<ISupplicantStaNetwork> sta_network;
+    sta_iface->addNetwork([&](const SupplicantStatus& status,
+                              const sp<ISupplicantNetwork>& network) {
+        if (status.code != SupplicantStatusCode::SUCCESS) {
+            operation_failed = true;
+            return;
+        }
+        sta_network = ISupplicantStaNetwork::castFrom(network);
+    });
+    if (operation_failed) {
+        return nullptr;
+    }
+    return sta_network;
+}
+
+sp<ISupplicantP2pIface> getSupplicantP2pIface() {
+    sp<ISupplicant> supplicant = getSupplicant();
+    if (!supplicant.get()) {
+        return nullptr;
+    }
+    ISupplicant::IfaceInfo info;
+    if (!findIfaceOfType(supplicant, IfaceType::P2P, &info)) {
+        return nullptr;
+    }
+    bool operation_failed = false;
+    sp<ISupplicantP2pIface> p2p_iface;
+    supplicant->getInterface(info, [&](const SupplicantStatus& status,
+                                       const sp<ISupplicantIface>& iface) {
+        if (status.code != SupplicantStatusCode::SUCCESS) {
+            operation_failed = true;
+            return;
+        }
+        p2p_iface = ISupplicantP2pIface::castFrom(iface);
+    });
+    if (operation_failed) {
+        return nullptr;
+    }
+    return p2p_iface;
+}
+
+bool turnOnExcessiveLogging() {
+    sp<ISupplicant> supplicant = getSupplicant();
+    if (!supplicant.get()) {
+        return false;
+    }
+    bool operation_failed = false;
+    supplicant->setDebugParams(
+        ISupplicant::DebugLevel::EXCESSIVE,
+        true,  // show timestamps
+        true,  // show keys
+        [&](const SupplicantStatus& status) {
+            if (status.code != SupplicantStatusCode::SUCCESS) {
+                operation_failed = true;
+            }
+        });
+    return !operation_failed;
+}
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.h b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.h
new file mode 100644
index 0000000..38143e4
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.h
@@ -0,0 +1,48 @@
+/*
+ * 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 SUPPLICANT_HIDL_TEST_UTILS_H
+#define SUPPLICANT_HIDL_TEST_UTILS_H
+
+#include <android/hardware/wifi/supplicant/1.0/ISupplicant.h>
+#include <android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.h>
+#include <android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.h>
+#include <android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h>
+
+// Used to stop the android wifi framework before every test.
+void stopWifiFramework();
+void startWifiFramework();
+void stopSupplicant();
+// Used to configure the chip, driver and start wpa_supplicant before every
+// test.
+void startSupplicantAndWaitForHidlService();
+
+// Helper functions to obtain references to the various HIDL interface objects.
+// Note: We only have a single instance of each of these objects currently.
+// These helper functions should be modified to return vectors if we support
+// multiple instances.
+android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicant>
+getSupplicant();
+android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface>
+getSupplicantStaIface();
+android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork>
+createSupplicantStaNetwork();
+android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface>
+getSupplicantP2pIface();
+
+bool turnOnExcessiveLogging();
+
+#endif /* SUPPLICANT_HIDL_TEST_UTILS_H */
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
new file mode 100644
index 0000000..968d4c9
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#include <android-base/logging.h>
+
+#include <gtest/gtest.h>
+
+#include "supplicant_hidl_test_utils.h"
+
+/*
+ * Create:
+ * Ensures that an instance of the ISupplicantP2pIface proxy object is
+ * successfully created.
+ */
+TEST(SupplicantP2pIfaceHidlTestNoFixture, Create) {
+    startSupplicantAndWaitForHidlService();
+    EXPECT_NE(nullptr, getSupplicantP2pIface().get());
+    stopSupplicant();
+}
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
new file mode 100644
index 0000000..45cc6bc
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#include <android-base/logging.h>
+
+#include <gtest/gtest.h>
+
+#include "supplicant_hidl_test_utils.h"
+
+/*
+ * Create:
+ * Ensures that an instance of the ISupplicantStaIface proxy object is
+ * successfully created.
+ */
+TEST(SupplicantStaIfaceHidlTestNoFixture, Create) {
+    startSupplicantAndWaitForHidlService();
+    EXPECT_NE(nullptr, getSupplicantStaIface().get());
+    stopSupplicant();
+}
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
new file mode 100644
index 0000000..8c42a22
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#include <android-base/logging.h>
+
+#include <gtest/gtest.h>
+
+#include "supplicant_hidl_test_utils.h"
+
+/*
+ * Create:
+ * Ensures that an instance of the ISupplicantStaNetwork proxy object is
+ * successfully created.
+ */
+TEST(SupplicantStaNetworkHidlTestNoFixture, Create) {
+    startSupplicantAndWaitForHidlService();
+    EXPECT_NE(nullptr, createSupplicantStaNetwork().get());
+    stopSupplicant();
+}
diff --git a/wifi/supplicant/1.0/vts/types.vts b/wifi/supplicant/1.0/vts/types.vts
new file mode 100644
index 0000000..b8b29b3
--- /dev/null
+++ b/wifi/supplicant/1.0/vts/types.vts
@@ -0,0 +1,189 @@
+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
+        }
+    }
+}
+