diff --git a/audio/2.0/IDevice.hal b/audio/2.0/IDevice.hal
index 2b5329b..62c2081 100644
--- a/audio/2.0/IDevice.hal
+++ b/audio/2.0/IDevice.hal
@@ -23,14 +23,14 @@
 interface IDevice {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Returns whether the audio hardware interface has been initialized.
      *
      * @return retval OK on success, NOT_INITIALIZED on failure.
      */
     initCheck() generates (Result retval);
 
-    /*
+    /**
      * Sets the audio volume for all audio activities other than voice call. If
      * NOT_SUPPORTED is returned, the software mixer will emulate this
      * capability.
@@ -40,7 +40,7 @@
      */
     setMasterVolume(float volume) generates (Result retval);
 
-    /*
+    /**
      * Get the current master volume value for the HAL, if the HAL supports
      * master volume control. For example, AudioFlinger will query this value
      * from the primary audio HAL when the service starts and use the value for
@@ -52,7 +52,7 @@
      */
     getMasterVolume() generates (Result retval, float volume);
 
-    /*
+    /**
      * Sets microphone muting state.
      *
      * @param mute whether microphone is muted.
@@ -60,7 +60,7 @@
      */
     setMicMute(bool mute) generates (Result retval);
 
-    /*
+    /**
      * Gets whether microphone is muted.
      *
      * @return retval operation completion status.
@@ -68,7 +68,7 @@
      */
     getMicMute() generates (Result retval, bool mute);
 
-    /*
+    /**
      * Set the audio mute status for all audio activities. If the return value
      * is NOT_SUPPORTED, the software mixer will emulate this capability.
      *
@@ -89,7 +89,7 @@
      */
     getMasterMute() generates (Result retval, bool mute);
 
-    /*
+    /**
      * Returns audio input buffer size according to parameters passed or
      * INVALID_ARGUMENTS if one of the parameters is not supported.
      *
@@ -100,7 +100,7 @@
     getInputBufferSize(AudioConfig config)
             generates (Result retval, uint64_t bufferSize);
 
-    /*
+    /**
      * This method creates and opens the audio hardware output stream.
      * If the stream can not be opened with the proposed audio config,
      * HAL must provide suggested values for the audio config.
@@ -122,7 +122,7 @@
                     IStreamOut outStream,
                     AudioConfig suggestedConfig);
 
-    /*
+    /**
      * This method creates and opens the audio hardware input stream.
      * If the stream can not be opened with the proposed audio config,
      * HAL must provide suggested values for the audio config.
@@ -146,14 +146,14 @@
                     IStreamIn inStream,
                     AudioConfig suggestedConfig);
 
-    /*
+    /**
      * Returns whether HAL supports audio patches.
      *
      * @return supports true if audio patches are supported.
      */
     supportsAudioPatches() generates (bool supports);
 
-    /*
+    /**
      * Creates an audio patch between several source and sink ports.  The handle
      * is allocated by the HAL and must be unique for this audio HAL module.
      *
@@ -165,7 +165,7 @@
     createAudioPatch(vec<AudioPortConfig> sources, vec<AudioPortConfig> sinks)
             generates (Result retval, AudioPatchHandle patch);
 
-    /*
+    /**
      * Release an audio patch.
      *
      * @param patch patch handle.
@@ -173,7 +173,7 @@
      */
     releaseAudioPatch(AudioPatchHandle patch) generates (Result retval);
 
-    /*
+    /**
      * Returns the list of supported attributes for a given audio port.
      *
      * As input, 'port' contains the information (type, role, address etc...)
@@ -189,7 +189,7 @@
     getAudioPort(AudioPort port)
             generates (Result retval, AudioPort resultPort);
 
-    /*
+    /**
      * Set audio port configuration.
      *
      * @param config audio port configuration.
@@ -197,7 +197,7 @@
      */
     setAudioPortConfig(AudioPortConfig config) generates (Result retval);
 
-    /*
+    /**
      * Gets the HW synchronization source of the device. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_HW_AV_SYNC on the legacy HAL.
      *
@@ -205,7 +205,7 @@
      */
     getHwAvSync() generates (AudioHwSync hwAvSync);
 
-    /*
+    /**
      * Sets whether the screen is on. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_KEY_SCREEN_STATE on the legacy HAL.
      *
@@ -214,7 +214,7 @@
      */
     setScreenState(bool turnedOn) generates (Result retval);
 
-    /*
+    /**
      * Generic method for retrieving vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -226,7 +226,7 @@
     getParameters(vec<string> keys)
             generates (Result retval, vec<ParameterValue> parameters);
 
-    /*
+    /**
      * Generic method for setting vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -236,7 +236,7 @@
      */
     setParameters(vec<ParameterValue> parameters) generates (Result retval);
 
-    /*
+    /**
      * Dumps information about the stream into the provided file descriptor.
      * This is used for the dumpsys facility.
      *
diff --git a/audio/2.0/IDevicesFactory.hal b/audio/2.0/IDevicesFactory.hal
index 0ef6bc5..6bbe7a1 100644
--- a/audio/2.0/IDevicesFactory.hal
+++ b/audio/2.0/IDevicesFactory.hal
@@ -30,7 +30,7 @@
         STUB
     };
 
-    /*
+    /**
      * Opens an audio device. To close the device, it is necessary to release
      * references to the returned device object.
      *
diff --git a/audio/2.0/IPrimaryDevice.hal b/audio/2.0/IPrimaryDevice.hal
index f1dd56e..adeb366 100644
--- a/audio/2.0/IPrimaryDevice.hal
+++ b/audio/2.0/IPrimaryDevice.hal
@@ -22,7 +22,7 @@
 interface IPrimaryDevice extends IDevice {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Sets the audio volume of a voice call.
      *
      * @param volume 1.0f means unity, 0.0f is zero.
@@ -30,7 +30,7 @@
      */
     setVoiceVolume(float volume) generates (Result retval);
 
-    /*
+    /**
      * This method is used to notify the HAL about audio mode changes.
      *
      * @param mode new mode.
@@ -38,7 +38,7 @@
      */
     setMode(AudioMode mode) generates (Result retval);
 
-    /*
+    /**
      * Gets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
      * Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_BT_NREC
      * on the legacy HAL.
@@ -48,7 +48,7 @@
      */
     getBtScoNrecEnabled() generates (Result retval, bool enabled);
 
-    /*
+    /**
      * Sets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
      * Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_BT_NREC
      * on the legacy HAL.
@@ -58,7 +58,7 @@
      */
     setBtScoNrecEnabled(bool enabled) generates (Result retval);
 
-    /*
+    /**
      * Gets whether BT SCO Wideband mode is enabled. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
      *
@@ -67,7 +67,7 @@
      */
     getBtScoWidebandEnabled() generates (Result retval, bool enabled);
 
-    /*
+    /**
      * Sets whether BT SCO Wideband mode is enabled. Calling this method is
      * equivalent to setting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
      *
@@ -83,7 +83,7 @@
         FULL
     };
 
-    /*
+    /**
      * Gets current TTY mode selection. Calling this method is equivalent to
      * getting AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
      *
@@ -92,7 +92,7 @@
      */
     getTtyMode() generates (Result retval, TtyMode mode);
 
-    /*
+    /**
      * Sets current TTY mode. Calling this method is equivalent to setting
      * AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
      *
@@ -101,7 +101,7 @@
      */
     setTtyMode(TtyMode mode) generates (Result retval);
 
-    /*
+    /**
      * Gets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
      * enabled. Calling this method is equivalent to getting
      * AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
@@ -111,7 +111,7 @@
      */
     getHacEnabled() generates (Result retval, bool enabled);
 
-    /*
+    /**
      * Sets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
      * enabled. Calling this method is equivalent to setting
      * AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
diff --git a/audio/2.0/IStream.hal b/audio/2.0/IStream.hal
index 8de7851..2b9cc06 100644
--- a/audio/2.0/IStream.hal
+++ b/audio/2.0/IStream.hal
@@ -22,14 +22,14 @@
 interface IStream {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Return the frame size (number of bytes per sample).
      *
      * @return frameSize frame size in bytes.
      */
     getFrameSize() generates (uint64_t frameSize);
 
-    /*
+    /**
      * Return the frame count of the buffer. Calling this method is equivalent
      * to getting AUDIO_PARAMETER_STREAM_FRAME_COUNT on the legacy HAL.
      *
@@ -37,7 +37,7 @@
      */
     getFrameCount() generates (uint64_t count);
 
-    /*
+    /**
      * Return the size of input/output buffer in bytes for this stream.
      * It must be a multiple of the frame size.
      *
@@ -45,14 +45,14 @@
      */
     getBufferSize() generates (uint64_t bufferSize);
 
-    /*
+    /**
      * Return the sampling rate in Hz.
      *
      * @return sampleRateHz sample rate in Hz.
      */
     getSampleRate() generates (uint32_t sampleRateHz);
 
-    /*
+    /**
      * Return supported sampling rates of the stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_SUP_SAMPLING_RATES on the
      * legacy HAL.
@@ -61,7 +61,7 @@
      */
     getSupportedSampleRates() generates (vec<uint32_t> sampleRates);
 
-    /*
+    /**
      * Sets the sampling rate of the stream. Calling this method is equivalent
      * to setting AUDIO_PARAMETER_STREAM_SAMPLING_RATE on the legacy HAL.
      *
@@ -70,14 +70,14 @@
      */
     setSampleRate(uint32_t sampleRateHz) generates (Result retval);
 
-    /*
+    /**
      * Return the channel mask of the stream.
      *
      * @return mask channel mask.
      */
     getChannelMask() generates (AudioChannelMask mask);
 
-    /*
+    /**
      * Return supported channel masks of the stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_SUP_CHANNELS on the legacy
      * HAL.
@@ -86,7 +86,7 @@
      */
     getSupportedChannelMasks() generates (vec<AudioChannelMask> masks);
 
-    /*
+    /**
      * Sets the channel mask of the stream. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_STREAM_CHANNELS on the legacy HAL.
      *
@@ -95,14 +95,14 @@
      */
     setChannelMask(AudioChannelMask mask) generates (Result retval);
 
-    /*
+    /**
      * Return the audio format of the stream.
      *
      * @return format audio format.
      */
     getFormat() generates (AudioFormat format);
 
-    /*
+    /**
      * Return supported audio formats of the stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_SUP_FORMATS on the legacy
      * HAL.
@@ -111,7 +111,7 @@
      */
     getSupportedFormats() generates (vec<AudioFormat> formats);
 
-    /*
+    /**
      * Sets the audio format of the stream. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_STREAM_FORMAT on the legacy HAL.
      *
@@ -120,7 +120,7 @@
      */
     setFormat(AudioFormat format) generates (Result retval);
 
-    /*
+    /**
      * Convenience method for retrieving several stream parameters in
      * one transaction.
      *
@@ -131,7 +131,7 @@
     getAudioProperties() generates (
             uint32_t sampleRateHz, AudioChannelMask mask, AudioFormat format);
 
-    /*
+    /**
      * Applies audio effect to the stream.
      *
      * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
@@ -140,7 +140,7 @@
      */
     addEffect(uint64_t effectId) generates (Result retval);
 
-    /*
+    /**
      * Stops application of the effect to the stream.
      *
      * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
@@ -149,7 +149,7 @@
      */
     removeEffect(uint64_t effectId) generates (Result retval);
 
-    /*
+    /**
      * Put the audio hardware input/output into standby mode.
      * Driver must exit from standby mode at the next I/O operation.
      *
@@ -157,14 +157,14 @@
      */
     standby() generates (Result retval);
 
-    /*
+    /**
      * Return the set of device(s) which this stream is connected to.
      *
      * @return device set of device(s) which this stream is connected to.
      */
     getDevice() generates (AudioDevice device);
 
-    /*
+    /**
      * Connects the stream to the device.
      *
      * This method must only be used for HALs that do not support
@@ -177,7 +177,7 @@
      */
     setDevice(DeviceAddress address) generates (Result retval);
 
-    /*
+    /**
      * Notifies the stream about device connection state. Calling this method is
      * equivalent to setting AUDIO_PARAMETER_DEVICE_[DIS]CONNECT on the legacy
      * HAL.
@@ -189,7 +189,7 @@
     setConnectedState(DeviceAddress address, bool connected)
             generates (Result retval);
 
-    /*
+    /**
      * Sets the HW synchronization source. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_STREAM_HW_AV_SYNC on the legacy HAL.
      *
@@ -198,7 +198,7 @@
      */
     setHwAvSync(AudioHwSync hwAvSync) generates (Result retval);
 
-    /*
+    /**
      * Generic method for retrieving vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -210,7 +210,7 @@
     getParameters(vec<string> keys)
             generates (Result retval, vec<ParameterValue> parameters);
 
-    /*
+    /**
      * Generic method for setting vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -220,7 +220,7 @@
      */
     setParameters(vec<ParameterValue> parameters) generates (Result retval);
 
-    /*
+    /**
      * Dumps information about the stream into the provided file descriptor.
      * This is used for the dumpsys facility.
      *
@@ -228,7 +228,7 @@
      */
     debugDump(handle fd);
 
-    /*
+    /**
      * Called by the framework to start a stream operating in mmap mode.
      * createMmapBuffer() must be called before calling start().
      * Function only implemented by streams operating in mmap mode.
@@ -249,7 +249,7 @@
      */
     stop() generates (Result retval) ;
 
-    /*
+    /**
      * Called by the framework to retrieve information on the mmap buffer used for audio
      * samples transfer.
      * Function only implemented by streams operating in mmap mode.
@@ -266,7 +266,7 @@
     createMmapBuffer(int32_t minSizeFrames)
             generates (Result retval, MmapBufferInfo info);
 
-    /*
+    /**
      * Called by the framework to read current read/write position in the mmap buffer
      * with associated time stamp.
      * Function only implemented by streams operating in mmap mode.
@@ -280,7 +280,7 @@
     getMmapPosition()
             generates (Result retval, MmapPosition position);
 
-    /*
+    /**
      * Called by the framework to deinitialize the stream and free up
      * all the currently allocated resources. It is recommended to close
      * the stream on the client side as soon as it is becomes unused.
diff --git a/audio/2.0/IStreamIn.hal b/audio/2.0/IStreamIn.hal
index 6f1f9df..6b79f48 100644
--- a/audio/2.0/IStreamIn.hal
+++ b/audio/2.0/IStreamIn.hal
@@ -22,7 +22,7 @@
 interface IStreamIn extends IStream {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Returns the source descriptor of the input stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_INPUT_SOURCE on the legacy
      * HAL.
@@ -32,7 +32,7 @@
      */
     getAudioSource() generates (Result retval, AudioSource source);
 
-    /*
+    /**
      * Set the input gain for the audio driver.
      *
      * @param gain 1.0f is unity, 0.0f is zero.
@@ -40,7 +40,7 @@
      */
     setGain(float gain) generates (Result retval);
 
-    /*
+    /**
      * Commands that can be executed on the driver reader thread.
      */
     enum ReadCommand : int32_t {
@@ -48,7 +48,7 @@
         GET_CAPTURE_POSITION
     };
 
-    /*
+    /**
      * Data structure passed to the driver for executing commands
      * on the driver reader thread.
      */
@@ -60,7 +60,7 @@
         } params;
     };
 
-    /*
+    /**
      * Data structure passed back to the client via status message queue
      * of 'read' operation.
      *
@@ -81,7 +81,7 @@
         } reply;
     };
 
-    /*
+    /**
      * Set up required transports for receiving audio buffers from the driver.
      *
      * The transport consists of three message queues:
@@ -119,7 +119,7 @@
             fmq_sync<ReadStatus> statusMQ,
             ThreadInfo threadInfo);
 
-    /*
+    /**
      * Return the amount of input frames lost in the audio driver since the last
      * call of this function.
      *
diff --git a/audio/2.0/IStreamOut.hal b/audio/2.0/IStreamOut.hal
index 9ee32c5..84b7447 100644
--- a/audio/2.0/IStreamOut.hal
+++ b/audio/2.0/IStreamOut.hal
@@ -23,14 +23,14 @@
 interface IStreamOut extends IStream {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Return the audio hardware driver estimated latency in milliseconds.
      *
      * @return latencyMs latency in milliseconds.
      */
     getLatency() generates (uint32_t latencyMs);
 
-    /*
+    /**
      * This method is used in situations where audio mixing is done in the
      * hardware. This method serves as a direct interface with hardware,
      * allowing to directly set the volume as apposed to via the framework.
@@ -43,7 +43,7 @@
      */
     setVolume(float left, float right) generates (Result retval);
 
-    /*
+    /**
      * Commands that can be executed on the driver writer thread.
      */
     enum WriteCommand : int32_t {
@@ -52,7 +52,7 @@
         GET_LATENCY
     };
 
-    /*
+    /**
      * Data structure passed back to the client via status message queue
      * of 'write' operation.
      *
@@ -75,7 +75,7 @@
         } reply;
     };
 
-    /*
+    /**
      * Set up required transports for passing audio buffers to the driver.
      *
      * The transport consists of three message queues:
@@ -112,7 +112,7 @@
             fmq_sync<WriteStatus> statusMQ,
             ThreadInfo threadInfo);
 
-    /*
+    /**
      * Return the number of audio frames written by the audio DSP to DAC since
      * the output has exited standby.
      *
@@ -121,7 +121,7 @@
      */
     getRenderPosition() generates (Result retval, uint32_t dspFrames);
 
-    /*
+    /**
      * Get the local time at which the next write to the audio driver will be
      * presented. The units are microseconds, where the epoch is decided by the
      * local audio HAL.
@@ -131,7 +131,7 @@
      */
     getNextWriteTimestamp() generates (Result retval, int64_t timestampUs);
 
-    /*
+    /**
      * Set the callback interface for notifying completion of non-blocking
      * write and drain.
      *
@@ -146,7 +146,7 @@
      */
     setCallback(IStreamOutCallback callback) generates (Result retval);
 
-    /*
+    /**
      * Clears the callback previously set via 'setCallback' method.
      *
      * Warning: failure to call this method results in callback implementation
@@ -156,7 +156,7 @@
      */
     clearCallback() generates (Result retval);
 
-    /*
+    /**
      * Returns whether HAL supports pausing and resuming of streams.
      *
      * @return supportsPause true if pausing is supported.
@@ -179,7 +179,7 @@
      */
     pause() generates (Result retval);
 
-    /*
+    /**
      * Notifies to the audio driver to resume playback following a pause.
      * Returns error INVALID_STATE if called without matching pause.
      *
@@ -189,7 +189,7 @@
      */
     resume() generates (Result retval);
 
-    /*
+    /**
      * Returns whether HAL supports draining of streams.
      *
      * @return supports true if draining is supported.
@@ -220,7 +220,7 @@
      */
     drain(AudioDrain type) generates (Result retval);
 
-    /*
+    /**
      * Notifies to the audio driver to flush the queued data. Stream must
      * already be paused before calling 'flush'.
      *
@@ -230,7 +230,7 @@
      */
     flush() generates (Result retval);
 
-    /*
+    /**
      * Return a recent count of the number of audio frames presented to an
      * external observer. This excludes frames which have been written but are
      * still in the pipeline. The count is not reset to zero when output enters
diff --git a/audio/2.0/IStreamOutCallback.hal b/audio/2.0/IStreamOutCallback.hal
index cdb38de..01e123c 100644
--- a/audio/2.0/IStreamOutCallback.hal
+++ b/audio/2.0/IStreamOutCallback.hal
@@ -16,21 +16,21 @@
 
 package android.hardware.audio@2.0;
 
-/*
+/**
  * Asynchronous write callback interface.
  */
 interface IStreamOutCallback {
-    /*
+    /**
      * Non blocking write completed.
      */
     oneway onWriteReady();
 
-    /*
+    /**
      * Drain completed.
      */
     oneway onDrainReady();
 
-    /*
+    /**
      * Stream hit an error.
      */
     oneway onError();
diff --git a/audio/2.0/default/Device.cpp b/audio/2.0/default/Device.cpp
index 8a51cd7..5ced0bc 100644
--- a/audio/2.0/default/Device.cpp
+++ b/audio/2.0/default/Device.cpp
@@ -59,6 +59,14 @@
     }
 }
 
+void Device::closeInputStream(audio_stream_in_t* stream) {
+    mDevice->close_input_stream(mDevice, stream);
+}
+
+void Device::closeOutputStream(audio_stream_out_t* stream) {
+    mDevice->close_output_stream(mDevice, stream);
+}
+
 char* Device::halGetParameters(const char* keys) {
     return mDevice->get_parameters(mDevice, keys);
 }
@@ -160,7 +168,7 @@
     ALOGV("open_output_stream status %d stream %p", status, halStream);
     sp<IStreamOut> streamOut;
     if (status == OK) {
-        streamOut = new StreamOut(mDevice, halStream);
+        streamOut = new StreamOut(this, halStream);
     }
     AudioConfig suggestedConfig;
     HidlUtils::audioConfigFromHal(halConfig, &suggestedConfig);
@@ -196,7 +204,7 @@
     ALOGV("open_input_stream status %d stream %p", status, halStream);
     sp<IStreamIn> streamIn;
     if (status == OK) {
-        streamIn = new StreamIn(mDevice, halStream);
+        streamIn = new StreamIn(this, halStream);
     }
     AudioConfig suggestedConfig;
     HidlUtils::audioConfigFromHal(halConfig, &suggestedConfig);
diff --git a/audio/2.0/default/Device.h b/audio/2.0/default/Device.h
index 46177fc..7738361 100644
--- a/audio/2.0/default/Device.h
+++ b/audio/2.0/default/Device.h
@@ -98,6 +98,8 @@
 
     // Utility methods for extending interfaces.
     Result analyzeStatus(const char* funcName, int status);
+    void closeInputStream(audio_stream_in_t* stream);
+    void closeOutputStream(audio_stream_out_t* stream);
     audio_hw_device_t* device() const { return mDevice; }
 
   private:
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index b641e82..2745607 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -135,7 +135,7 @@
 
 }  // namespace
 
-StreamIn::StreamIn(audio_hw_device_t* device, audio_stream_in_t* stream)
+StreamIn::StreamIn(const sp<Device>& device, audio_stream_in_t* stream)
         : mIsClosed(false), mDevice(device), mStream(stream),
           mStreamCommon(new Stream(&stream->common)),
           mStreamMmap(new StreamMmap<audio_stream_in_t>(stream)),
@@ -154,9 +154,8 @@
         status_t status = EventFlag::deleteEventFlag(&mEfGroup);
         ALOGE_IF(status, "read MQ event flag deletion error: %s", strerror(-status));
     }
-    mDevice->close_input_stream(mDevice, mStream);
+    mDevice->closeInputStream(mStream);
     mStream = nullptr;
-    mDevice = nullptr;
 }
 
 // Methods from ::android::hardware::audio::V2_0::IStream follow.
diff --git a/audio/2.0/default/StreamIn.h b/audio/2.0/default/StreamIn.h
index b867387..950d68f 100644
--- a/audio/2.0/default/StreamIn.h
+++ b/audio/2.0/default/StreamIn.h
@@ -27,6 +27,7 @@
 #include <hidl/Status.h>
 #include <utils/Thread.h>
 
+#include "Device.h"
 #include "Stream.h"
 
 namespace android {
@@ -55,7 +56,7 @@
     typedef MessageQueue<uint8_t, kSynchronizedReadWrite> DataMQ;
     typedef MessageQueue<ReadStatus, kSynchronizedReadWrite> StatusMQ;
 
-    StreamIn(audio_hw_device_t* device, audio_stream_in_t* stream);
+    StreamIn(const sp<Device>& device, audio_stream_in_t* stream);
 
     // Methods from ::android::hardware::audio::V2_0::IStream follow.
     Return<uint64_t> getFrameSize()  override;
@@ -101,10 +102,10 @@
 
   private:
     bool mIsClosed;
-    audio_hw_device_t *mDevice;
+    const sp<Device> mDevice;
     audio_stream_in_t *mStream;
-    sp<Stream> mStreamCommon;
-    sp<StreamMmap<audio_stream_in_t>> mStreamMmap;
+    const sp<Stream> mStreamCommon;
+    const sp<StreamMmap<audio_stream_in_t>> mStreamMmap;
     std::unique_ptr<CommandMQ> mCommandMQ;
     std::unique_ptr<DataMQ> mDataMQ;
     std::unique_ptr<StatusMQ> mStatusMQ;
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index d820f3c..88045a0 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -135,7 +135,7 @@
 
 }  // namespace
 
-StreamOut::StreamOut(audio_hw_device_t* device, audio_stream_out_t* stream)
+StreamOut::StreamOut(const sp<Device>& device, audio_stream_out_t* stream)
         : mIsClosed(false), mDevice(device), mStream(stream),
           mStreamCommon(new Stream(&stream->common)),
           mStreamMmap(new StreamMmap<audio_stream_out_t>(stream)),
@@ -155,9 +155,8 @@
         ALOGE_IF(status, "write MQ event flag deletion error: %s", strerror(-status));
     }
     mCallback.clear();
-    mDevice->close_output_stream(mDevice, mStream);
+    mDevice->closeOutputStream(mStream);
     mStream = nullptr;
-    mDevice = nullptr;
 }
 
 // Methods from ::android::hardware::audio::V2_0::IStream follow.
diff --git a/audio/2.0/default/StreamOut.h b/audio/2.0/default/StreamOut.h
index bbe64a1..99352bc 100644
--- a/audio/2.0/default/StreamOut.h
+++ b/audio/2.0/default/StreamOut.h
@@ -27,6 +27,7 @@
 #include <fmq/MessageQueue.h>
 #include <utils/Thread.h>
 
+#include "Device.h"
 #include "Stream.h"
 
 namespace android {
@@ -57,7 +58,7 @@
     typedef MessageQueue<uint8_t, kSynchronizedReadWrite> DataMQ;
     typedef MessageQueue<WriteStatus, kSynchronizedReadWrite> StatusMQ;
 
-    StreamOut(audio_hw_device_t* device, audio_stream_out_t* stream);
+    StreamOut(const sp<Device>& device, audio_stream_out_t* stream);
 
     // Methods from ::android::hardware::audio::V2_0::IStream follow.
     Return<uint64_t> getFrameSize()  override;
@@ -112,10 +113,10 @@
 
   private:
     bool mIsClosed;
-    audio_hw_device_t *mDevice;
+    const sp<Device> mDevice;
     audio_stream_out_t *mStream;
-    sp<Stream> mStreamCommon;
-    sp<StreamMmap<audio_stream_out_t>> mStreamMmap;
+    const sp<Stream> mStreamCommon;
+    const sp<StreamMmap<audio_stream_out_t>> mStreamMmap;
     sp<IStreamOutCallback> mCallback;
     std::unique_ptr<CommandMQ> mCommandMQ;
     std::unique_ptr<DataMQ> mDataMQ;
diff --git a/audio/2.0/types.hal b/audio/2.0/types.hal
index 8e9ff14..93118c2 100644
--- a/audio/2.0/types.hal
+++ b/audio/2.0/types.hal
@@ -28,14 +28,16 @@
 
 @export(name="audio_drain_type_t", value_prefix="AUDIO_DRAIN_")
 enum AudioDrain : int32_t {
-    /* drain() returns when all data has been played. */
+    /** drain() returns when all data has been played. */
     ALL,
-    /* drain() returns a short time before all data from the current track has
-       been played to give time for gapless track switch. */
+    /**
+     * drain() returns a short time before all data from the current track has
+     * been played to give time for gapless track switch.
+     */
     EARLY_NOTIFY
 };
 
-/*
+/**
  * A substitute for POSIX timespec.
  */
 struct TimeSpec {
@@ -43,7 +45,7 @@
     uint64_t tvNSec;  // nanoseconds
 };
 
-/*
+/**
  * IEEE 802 MAC address.
  */
 typedef uint8_t[6] MacAddress;
@@ -53,7 +55,7 @@
     string value;
 };
 
-/*
+/**
  * Specifies a device in case when several devices of the same type
  * can be connected (e.g. BT A2DP, USB).
  */
@@ -71,7 +73,7 @@
     string rSubmixAddress;  // used for REMOTE_SUBMIX
 };
 
-/*
+/**
  * Mmap buffer descriptor returned by IStream.createMmapBuffer().
  * Used by streams opened in mmap mode.
  */
@@ -81,7 +83,7 @@
     int32_t burstSizeFrames;      // transfer size granularity in frames
 };
 
-/*
+/**
  * Mmap buffer read/write position returned by IStream.getMmapPosition().
  * Used by streams opened in mmap mode.
  */
@@ -90,7 +92,7 @@
     int32_t  positionFrames;  // increasing 32 bit frame count reset when IStream.stop() is called
 };
 
-/*
+/**
  * The message queue flags used to synchronize reads and writes from
  * message queues used by StreamIn and StreamOut.
  */
diff --git a/audio/common/2.0/types.hal b/audio/common/2.0/types.hal
index dd7281d..7c49795 100644
--- a/audio/common/2.0/types.hal
+++ b/audio/common/2.0/types.hal
@@ -16,28 +16,28 @@
 
 package android.hardware.audio.common@2.0;
 
-/*
+/**
  *
  *  IDs and Handles
  *
  */
 
-/*
+/**
  * Handle type for identifying audio sources and sinks.
  */
 typedef int32_t AudioIoHandle;
 
-/*
+/**
  * Audio hw module handle functions or structures referencing a module.
  */
 typedef int32_t AudioModuleHandle;
 
-/*
+/**
  * Each port has a unique ID or handle allocated by policy manager.
  */
 typedef int32_t AudioPortHandle;
 
-/*
+/**
  * Each patch is identified by a handle at the interface used to create that
  * patch. For instance, when a patch is created by the audio HAL, the HAL
  * allocates and returns a handle.  This handle is unique to a given audio HAL
@@ -47,12 +47,12 @@
  */
 typedef int32_t AudioPatchHandle;
 
-/*
+/**
  * A HW synchronization source returned by the audio HAL.
  */
 typedef uint32_t AudioHwSync;
 
-/*
+/**
  * Each port has a unique ID or handle allocated by policy manager.
  */
 @export(name="")
@@ -63,7 +63,7 @@
     AUDIO_PATCH_HANDLE_NONE = 0,
 };
 
-/*
+/**
  * Commonly used structure for passing unique identifieds (UUID).
  * For the definition of UUID, refer to ITU-T X.667 spec.
  */
@@ -76,13 +76,13 @@
 };
 
 
-/*
+/**
  *
  *  Audio streams
  *
  */
 
-/*
+/**
  * Audio stream type describing the intented use case of a stream.
  */
 @export(name="audio_stream_type_t", value_prefix="AUDIO_STREAM_")
@@ -126,13 +126,13 @@
     CAMCORDER           = 5,
     VOICE_RECOGNITION   = 6,
     VOICE_COMMUNICATION = 7,
-    /*
+    /**
      * Source for the mix to be presented remotely. An example of remote
      * presentation is Wifi Display where a dongle attached to a TV can be used
      * to play the mix captured by this audio source.
      */
     REMOTE_SUBMIX       = 8,
-    /*
+    /**
      * Source for unprocessed sound. Usage examples include level measurement
      * and raw signal analysis.
      */
@@ -141,7 +141,7 @@
     CNT,
     MAX                 = CNT - 1,
     FM_TUNER            = 1998,
-    /*
+    /**
      * A low-priority, preemptible audio source for for background software
      * hotword detection. Same tuning as VOICE_RECOGNITION.  Used only
      * internally by the framework.
@@ -150,30 +150,30 @@
 };
 
 typedef int32_t AudioSession;
-/*
+/**
  * Special audio session values.
  */
 @export(name="audio_session_t", value_prefix="AUDIO_SESSION_")
 enum AudioSessionConsts : int32_t {
-    /*
+    /**
      * Session for effects attached to a particular output stream
      * (value must be less than 0)
      */
     OUTPUT_STAGE = -1,
-    /*
+    /**
      * Session for effects applied to output mix. These effects can
      * be moved by audio policy manager to another output stream
      * (value must be 0)
      */
     OUTPUT_MIX = 0,
-    /*
+    /**
      * Application does not specify an explicit session ID to be used, and
      * requests a new session ID to be allocated. Corresponds to
      * AudioManager.AUDIO_SESSION_ID_GENERATE and
      * AudioSystem.AUDIO_SESSION_ALLOCATE.
      */
     ALLOCATE = 0,
-    /*
+    /**
      * For use with AudioRecord::start(), this indicates no trigger session.
      * It is also used with output tracks and patch tracks, which never have a
      * session.
@@ -181,7 +181,7 @@
     NONE = 0
 };
 
-/*
+/**
  * Audio format  is a 32-bit word that consists of:
  *   main format field (upper 8 bits)
  *   sub format field (lower 24 bits).
@@ -196,13 +196,13 @@
 enum AudioFormat : uint32_t {
     INVALID             = 0xFFFFFFFFUL,
     DEFAULT             = 0,
-    PCM                 = 0x00000000UL, /* DO NOT CHANGE */
+    PCM                 = 0x00000000UL, /** DO NOT CHANGE */
     MP3                 = 0x01000000UL,
     AMR_NB              = 0x02000000UL,
     AMR_WB              = 0x03000000UL,
     AAC                 = 0x04000000UL,
-    HE_AAC_V1           = 0x05000000UL, /* Deprecated, Use AAC_HE_V1*/
-    HE_AAC_V2           = 0x06000000UL, /* Deprecated, Use AAC_HE_V2*/
+    HE_AAC_V1           = 0x05000000UL, /** Deprecated, Use AAC_HE_V1 */
+    HE_AAC_V2           = 0x06000000UL, /** Deprecated, Use AAC_HE_V2 */
     VORBIS              = 0x07000000UL,
     OPUS                = 0x08000000UL,
     AC3                 = 0x09000000UL,
@@ -232,10 +232,10 @@
     APTX_HD             = 0x21000000UL,
     AC4                 = 0x22000000UL,
     LDAC                = 0x23000000UL,
-    MAIN_MASK           = 0xFF000000UL, /* Deprecated */
+    MAIN_MASK           = 0xFF000000UL, /** Deprecated */
     SUB_MASK            = 0x00FFFFFFUL,
 
-    /* Subformats */
+    /** Subformats */
     PCM_SUB_16_BIT        = 0x1, // PCM signed 16 bits
     PCM_SUB_8_BIT         = 0x2, // PCM unsigned 8 bits
     PCM_SUB_32_BIT        = 0x3, // PCM signed .31 fixed point
@@ -260,10 +260,10 @@
 
     VORBIS_SUB_NONE       = 0x0,
 
-    /* Aliases */
-    /* note != AudioFormat.ENCODING_PCM_16BIT */
+    /** Aliases */
+    /** note != AudioFormat.ENCODING_PCM_16BIT */
     PCM_16_BIT          = (PCM | PCM_SUB_16_BIT),
-    /* note != AudioFormat.ENCODING_PCM_8BIT */
+    /** note != AudioFormat.ENCODING_PCM_8BIT */
     PCM_8_BIT           = (PCM | PCM_SUB_8_BIT),
     PCM_32_BIT          = (PCM | PCM_SUB_32_BIT),
     PCM_8_24_BIT        = (PCM | PCM_SUB_8_24_BIT),
@@ -291,7 +291,7 @@
     AAC_ADTS_ELD        = (AAC_ADTS | AAC_SUB_ELD)
 };
 
-/*
+/**
  * Usage of these values highlights places in the code that use 2- or 8- channel
  * assumptions.
  */
@@ -301,7 +301,7 @@
     FCC_8 = 8  // This is typically due to audio mixer and resampler limitations
 };
 
-/*
+/**
  * A channel mask per se only defines the presence or absence of a channel, not
  * the order.  See AUDIO_INTERLEAVE_* for the platform convention of order.
  *
@@ -335,21 +335,21 @@
  */
 @export(name="", value_prefix="AUDIO_CHANNEL_")
 enum AudioChannelMask : uint32_t {
-    REPRESENTATION_POSITION = 0, /* must be 0 for compatibility */
-    /* 1 is reserved for future use */
+    REPRESENTATION_POSITION = 0, /** must be 0 for compatibility */
+    /** 1 is reserved for future use */
     REPRESENTATION_INDEX    = 2,
-    /* 3 is reserved for future use */
+    /** 3 is reserved for future use */
 
-    /* These can be a complete value of AudioChannelMask */
+    /** These can be a complete value of AudioChannelMask */
     NONE                      = 0x0,
     INVALID                   = 0xC0000000,
 
-   /*
+   /**
     * These can be the bits portion of an AudioChannelMask
     * with representation REPRESENTATION_POSITION.
     */
 
-    /* output channels */
+    /** output channels */
     OUT_FRONT_LEFT            = 0x1,
     OUT_FRONT_RIGHT           = 0x2,
     OUT_FRONT_CENTER          = 0x4,
@@ -375,7 +375,7 @@
     OUT_QUAD     = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
             OUT_BACK_LEFT | OUT_BACK_RIGHT),
     OUT_QUAD_BACK = OUT_QUAD,
-    /* like OUT_QUAD_BACK with *_SIDE_* instead of *_BACK_* */
+    /** like OUT_QUAD_BACK with *_SIDE_* instead of *_BACK_* */
     OUT_QUAD_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
             OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
     OUT_SURROUND = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
@@ -385,7 +385,7 @@
             OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
             OUT_BACK_LEFT | OUT_BACK_RIGHT),
     OUT_5POINT1_BACK = OUT_5POINT1,
-    /* like OUT_5POINT1_BACK with *_SIDE_* instead of *_BACK_* */
+    /** like OUT_5POINT1_BACK with *_SIDE_* instead of *_BACK_* */
     OUT_5POINT1_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
             OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
             OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
@@ -393,7 +393,7 @@
             OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
             OUT_BACK_LEFT | OUT_BACK_RIGHT |
             OUT_BACK_CENTER),
-    /* matches the correct AudioFormat.CHANNEL_OUT_7POINT1_SURROUND */
+    /** matches the correct AudioFormat.CHANNEL_OUT_7POINT1_SURROUND */
     OUT_7POINT1  = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
             OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
             OUT_BACK_LEFT | OUT_BACK_RIGHT |
@@ -408,9 +408,9 @@
             OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_CENTER | OUT_TOP_FRONT_RIGHT |
             OUT_TOP_BACK_LEFT | OUT_TOP_BACK_CENTER | OUT_TOP_BACK_RIGHT),
 
-    /* These are bits only, not complete values */
+    /** These are bits only, not complete values */
 
-    /* input channels */
+    /** input channels */
     IN_LEFT            = 0x4,
     IN_RIGHT           = 0x8,
     IN_FRONT           = 0x10,
@@ -456,7 +456,7 @@
 };
 
 
-/*
+/**
  * Expresses the convention when stereo audio samples are stored interleaved
  * in an array.  This should improve readability by allowing code to use
  * symbolic indices instead of hard-coded [0] and [1].
@@ -472,7 +472,7 @@
     RIGHT  = 1,
 };
 
-/*
+/**
  * Major modes for a mobile device. The current mode setting affects audio
  * routing.
  */
@@ -492,10 +492,10 @@
 @export(name="", value_prefix="AUDIO_DEVICE_")
 enum AudioDevice : uint32_t {
     NONE                          = 0x0,
-    /* reserved bits */
+    /** reserved bits */
     BIT_IN                        = 0x80000000,
     BIT_DEFAULT                   = 0x40000000,
-    /* output devices */
+    /** output devices */
     OUT_EARPIECE                  = 0x1,
     OUT_SPEAKER                   = 0x2,
     OUT_WIRED_HEADSET             = 0x4,
@@ -508,30 +508,30 @@
     OUT_BLUETOOTH_A2DP_SPEAKER    = 0x200,
     OUT_AUX_DIGITAL               = 0x400,
     OUT_HDMI                      = OUT_AUX_DIGITAL,
-    /* uses an analog connection (multiplexed over the USB pins for instance) */
+    /** uses an analog connection (multiplexed over the USB pins for instance) */
     OUT_ANLG_DOCK_HEADSET         = 0x800,
     OUT_DGTL_DOCK_HEADSET         = 0x1000,
-    /* USB accessory mode: Android device is USB device and dock is USB host */
+    /** USB accessory mode: Android device is USB device and dock is USB host */
     OUT_USB_ACCESSORY             = 0x2000,
-    /* USB host mode: Android device is USB host and dock is USB device */
+    /** USB host mode: Android device is USB host and dock is USB device */
     OUT_USB_DEVICE                = 0x4000,
     OUT_REMOTE_SUBMIX             = 0x8000,
-    /* Telephony voice TX path */
+    /** Telephony voice TX path */
     OUT_TELEPHONY_TX              = 0x10000,
-    /* Analog jack with line impedance detected */
+    /** Analog jack with line impedance detected */
     OUT_LINE                      = 0x20000,
-    /* HDMI Audio Return Channel */
+    /** HDMI Audio Return Channel */
     OUT_HDMI_ARC                  = 0x40000,
-    /* S/PDIF out */
+    /** S/PDIF out */
     OUT_SPDIF                     = 0x80000,
-    /* FM transmitter out */
+    /** FM transmitter out */
     OUT_FM                        = 0x100000,
-    /* Line out for av devices */
+    /** Line out for av devices */
     OUT_AUX_LINE                  = 0x200000,
-    /* limited-output speaker device for acoustic safety */
+    /** limited-output speaker device for acoustic safety */
     OUT_SPEAKER_SAFE              = 0x400000,
     OUT_IP                        = 0x800000,
-    /* audio bus implemented by the audio system (e.g an MOST stereo channel) */
+    /** audio bus implemented by the audio system (e.g an MOST stereo channel) */
     OUT_BUS                       = 0x1000000,
     OUT_PROXY                     = 0x2000000,
     OUT_USB_HEADSET               = 0x4000000,
@@ -571,7 +571,7 @@
             OUT_BLUETOOTH_SCO_HEADSET |
             OUT_BLUETOOTH_SCO_CARKIT),
     OUT_ALL_USB  = (OUT_USB_ACCESSORY | OUT_USB_DEVICE | OUT_USB_HEADSET),
-    /* input devices */
+    /** input devices */
     IN_COMMUNICATION         = BIT_IN | 0x1,
     IN_AMBIENT               = BIT_IN | 0x2,
     IN_BUILTIN_MIC           = BIT_IN | 0x4,
@@ -579,7 +579,7 @@
     IN_WIRED_HEADSET         = BIT_IN | 0x10,
     IN_AUX_DIGITAL           = BIT_IN | 0x20,
     IN_HDMI                  = IN_AUX_DIGITAL,
-    /* Telephony voice RX path */
+    /** Telephony voice RX path */
     IN_VOICE_CALL            = BIT_IN | 0x40,
     IN_TELEPHONY_RX          = IN_VOICE_CALL,
     IN_BACK_MIC              = BIT_IN | 0x80,
@@ -588,18 +588,18 @@
     IN_DGTL_DOCK_HEADSET     = BIT_IN | 0x400,
     IN_USB_ACCESSORY         = BIT_IN | 0x800,
     IN_USB_DEVICE            = BIT_IN | 0x1000,
-    /* FM tuner input */
+    /** FM tuner input */
     IN_FM_TUNER              = BIT_IN | 0x2000,
-    /* TV tuner input */
+    /** TV tuner input */
     IN_TV_TUNER              = BIT_IN | 0x4000,
-    /* Analog jack with line impedance detected */
+    /** Analog jack with line impedance detected */
     IN_LINE                  = BIT_IN | 0x8000,
-    /* S/PDIF in */
+    /** S/PDIF in */
     IN_SPDIF                 = BIT_IN | 0x10000,
     IN_BLUETOOTH_A2DP        = BIT_IN | 0x20000,
     IN_LOOPBACK              = BIT_IN | 0x40000,
     IN_IP                    = BIT_IN | 0x80000,
-    /* audio bus implemented by the audio system (e.g an MOST stereo channel) */
+    /** audio bus implemented by the audio system (e.g an MOST stereo channel) */
     IN_BUS                   = BIT_IN | 0x100000,
     IN_PROXY                 = BIT_IN | 0x1000000,
     IN_USB_HEADSET           = BIT_IN | 0x2000000,
@@ -633,7 +633,7 @@
     IN_ALL_USB  = (IN_USB_ACCESSORY | IN_USB_DEVICE | IN_USB_HEADSET),
 };
 
-/*
+/**
  * The audio output flags serve two purposes:
  *
  *  - when an AudioTrack is created they indicate a "wish" to be connected to an
@@ -674,7 +674,7 @@
     VOIP_RX = 0x8000,    // preferred output for VoIP calls.
 };
 
-/*
+/**
  * The audio input flags are analogous to audio output flags.
  * Currently they are used only when an AudioRecord is created,
  * to indicate a preference to be connected to an input stream with
@@ -717,7 +717,7 @@
     MAX                                = CNT - 1,
 };
 
-/*
+/**
  * Additional information about the stream passed to hardware decoders.
  */
 struct AudioOffloadInfo {
@@ -734,7 +734,7 @@
     AudioUsage usage;
 };
 
-/*
+/**
  * Commonly used audio stream configuration parameters.
  */
 struct AudioConfig {
@@ -746,13 +746,13 @@
 };
 
 
-/*
+/**
  *
  *  Volume control
  *
  */
 
-/*
+/**
  * Type of gain control exposed by an audio port.
  */
 @export(name="", value_prefix="AUDIO_GAIN_MODE_")
@@ -762,7 +762,7 @@
     RAMP = 0x4      // supports gain ramps
 };
 
-/*
+/**
  * An audio_gain struct is a representation of a gain stage.
  * A gain stage is always attached to an audio port.
  */
@@ -777,7 +777,7 @@
     uint32_t maxRampMs;   // maximum ramp duration in ms
 };
 
-/*
+/**
  * The gain configuration structure is used to get or set the gain values of a
  * given port.
  */
@@ -785,7 +785,7 @@
     int32_t index;  // index of the corresponding AudioGain in AudioPort.gains
     AudioGainMode mode;
     AudioChannelMask channelMask;  // channels which gain value follows
-    /*
+    /**
      * 4 = sizeof(AudioChannelMask),
      * 8 is not "FCC_8", so it won't need to be changed for > 8 channels.
      * Gain values in millibels for each channel ordered from LSb to MSb in
@@ -797,13 +797,13 @@
 };
 
 
-/*
+/**
  *
  *  Routing control
  *
  */
 
-/*
+/**
  * Types defined here are used to describe an audio source or sink at internal
  * framework interfaces (audio policy, patch panel) or at the audio HAL.
  * Sink and sources are grouped in a concept of “audio port” representing an
@@ -811,7 +811,7 @@
  * the interface.
  */
 
-/* Audio port role: either source or sink */
+/** Audio port role: either source or sink */
 @export(name="audio_port_role_t", value_prefix="AUDIO_PORT_ROLE_")
 enum AudioPortRole : int32_t {
     NONE,
@@ -819,7 +819,7 @@
     SINK,
 };
 
-/*
+/**
  * Audio port type indicates if it is a session (e.g AudioTrack), a mix (e.g
  * PlaybackThread output) or a physical device (e.g OUT_SPEAKER)
  */
@@ -831,7 +831,7 @@
     SESSION,
 };
 
-/*
+/**
  * Extension for audio port configuration structure when the audio port is a
  * hardware device.
  */
@@ -841,7 +841,7 @@
     uint8_t[32] address;         // device address. "" if N/A
 };
 
-/*
+/**
  * Extension for audio port configuration structure when the audio port is an
  * audio session.
  */
@@ -849,7 +849,7 @@
     AudioSession session;
 };
 
-/*
+/**
  * Flags indicating which fields are to be considered in AudioPortConfig.
  */
 @export(name="", value_prefix="AUDIO_PORT_CONFIG_")
@@ -861,7 +861,7 @@
     ALL = SAMPLE_RATE | CHANNEL_MASK | FORMAT | GAIN
 };
 
-/*
+/**
  * Audio port configuration structure used to specify a particular configuration
  * of an audio port.
  */
@@ -888,7 +888,7 @@
     } ext;
 };
 
-/*
+/**
  * Extension for audio port structure when the audio port is a hardware device.
  */
 struct AudioPortDeviceExt {
@@ -897,7 +897,7 @@
     uint8_t[32] address;
 };
 
-/*
+/**
  * Latency class of the audio mix.
  */
 @export(name="audio_mix_latency_class_t", value_prefix="AUDIO_LATENCY_")
@@ -912,7 +912,7 @@
     AudioMixLatencyClass latencyClass;
 };
 
-/*
+/**
  * Extension for audio port structure when the audio port is an audio session.
  */
 struct AudioPortSessionExt {
diff --git a/audio/effect/2.0/IAcousticEchoCancelerEffect.hal b/audio/effect/2.0/IAcousticEchoCancelerEffect.hal
index 9e2e0c3..b5f94a5 100644
--- a/audio/effect/2.0/IAcousticEchoCancelerEffect.hal
+++ b/audio/effect/2.0/IAcousticEchoCancelerEffect.hal
@@ -20,12 +20,12 @@
 import IEffect;
 
 interface IAcousticEchoCancelerEffect extends IEffect {
-    /*
+    /**
      * Sets echo delay value in milliseconds.
      */
     setEchoDelay(uint32_t echoDelayMs) generates (Result retval);
 
-    /*
+    /**
      * Gets echo delay value in milliseconds.
      */
     getEchoDelay() generates (Result retval, uint32_t echoDelayMs);
diff --git a/audio/effect/2.0/IAutomaticGainControlEffect.hal b/audio/effect/2.0/IAutomaticGainControlEffect.hal
index a02002d..b8ca7e3 100644
--- a/audio/effect/2.0/IAutomaticGainControlEffect.hal
+++ b/audio/effect/2.0/IAutomaticGainControlEffect.hal
@@ -20,32 +20,32 @@
 import IEffect;
 
 interface IAutomaticGainControlEffect extends IEffect {
-    /*
+    /**
      * Sets target level in millibels.
      */
     setTargetLevel(int16_t targetLevelMb) generates (Result retval);
 
-    /*
+    /**
      * Gets target level.
      */
     getTargetLevel() generates (Result retval, int16_t targetLevelMb);
 
-    /*
+    /**
      * Sets gain in the compression range in millibels.
      */
     setCompGain(int16_t compGainMb) generates (Result retval);
 
-    /*
+    /**
      * Gets gain in the compression range.
      */
     getCompGain() generates (Result retval, int16_t compGainMb);
 
-    /*
+    /**
      * Enables or disables limiter.
      */
     setLimiterEnabled(bool enabled) generates (Result retval);
 
-    /*
+    /**
      * Returns whether limiter is enabled.
      */
     isLimiterEnabled() generates (Result retval, bool enabled);
@@ -56,12 +56,12 @@
         bool limiterEnabled;
     };
 
-    /*
+    /**
      * Sets all properties at once.
      */
     setAllProperties(AllProperties properties) generates (Result retval);
 
-    /*
+    /**
      * Gets all properties at once.
      */
     getAllProperties() generates (Result retval, AllProperties properties);
diff --git a/audio/effect/2.0/IBassBoostEffect.hal b/audio/effect/2.0/IBassBoostEffect.hal
index bcf7b7d..db6a297 100644
--- a/audio/effect/2.0/IBassBoostEffect.hal
+++ b/audio/effect/2.0/IBassBoostEffect.hal
@@ -20,7 +20,7 @@
 import IEffect;
 
 interface IBassBoostEffect extends IEffect {
-    /*
+    /**
      * Returns whether setting bass boost strength is supported.
      */
     isStrengthSupported() generates (Result retval, bool strengthSupported);
@@ -30,7 +30,7 @@
         MAX = 1000
     };
 
-    /*
+    /**
      * Sets bass boost strength.
      *
      * @param strength strength of the effect. The valid range for strength
@@ -41,7 +41,7 @@
      */
     setStrength(uint16_t strength) generates (Result retval);
 
-    /*
+    /**
      * Gets virtualization strength.
      */
     getStrength() generates (Result retval, uint16_t strength);
diff --git a/audio/effect/2.0/IEffect.hal b/audio/effect/2.0/IEffect.hal
index d254e8c..332e2df 100644
--- a/audio/effect/2.0/IEffect.hal
+++ b/audio/effect/2.0/IEffect.hal
@@ -20,7 +20,7 @@
 import IEffectBufferProviderCallback;
 
 interface IEffect {
-    /*
+    /**
      * Initialize effect engine--all configurations return to default.
      *
      * @return retval operation completion status.
@@ -29,7 +29,7 @@
     @callflow(next={"*"})
     init() generates (Result retval);
 
-    /*
+    /**
      * Apply new audio parameters configurations for input and output buffers.
      * The provider callbacks may be empty, but in this case the buffer
      * must be provided in the EffectConfig structure.
@@ -45,7 +45,7 @@
             IEffectBufferProviderCallback outputBufferProvider)
             generates (Result retval);
 
-    /*
+    /**
      * Reset the effect engine. Keep configuration but resets state and buffer
      * content.
      *
@@ -54,7 +54,7 @@
     @callflow(next={"*"})
     reset() generates (Result retval);
 
-    /*
+    /**
      * Enable processing.
      *
      * @return retval operation completion status.
@@ -62,7 +62,7 @@
     @callflow(next={"prepareForProcessing"})
     enable() generates (Result retval);
 
-    /*
+    /**
      * Disable processing.
      *
      * @return retval operation completion status.
@@ -70,7 +70,7 @@
     @callflow(next={"close"})
     disable() generates (Result retval);
 
-    /*
+    /**
      * Set the rendering device the audio output path is connected to.  The
      * effect implementation must set EFFECT_FLAG_DEVICE_IND flag in its
      * descriptor to receive this command when the device changes.
@@ -84,7 +84,7 @@
     @callflow(next={"*"})
     setDevice(AudioDevice device) generates (Result retval);
 
-    /*
+    /**
      * Set and get volume. Used by audio framework to delegate volume control to
      * effect engine. The effect implementation must set EFFECT_FLAG_VOLUME_CTRL
      * flag in its descriptor to receive this command. The effect engine must
@@ -103,7 +103,7 @@
     setAndGetVolume(vec<uint32_t> volumes)
             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.
@@ -116,7 +116,7 @@
     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.
@@ -127,7 +127,7 @@
     @callflow(next={"*"})
     setAudioMode(AudioMode mode) generates (Result retval);
 
-    /*
+    /**
      * Apply new audio parameters configurations for input and output buffers of
      * reverse stream.  An example of reverse stream is the echo reference
      * supplied to an Acoustic Echo Canceler.
@@ -143,7 +143,7 @@
             IEffectBufferProviderCallback outputBufferProvider)
             generates (Result retval);
 
-    /*
+    /**
      * Set the capture device the audio input path is connected to. The effect
      * implementation must set EFFECT_FLAG_DEVICE_IND flag in its descriptor to
      * receive this command when the device changes.
@@ -157,7 +157,7 @@
     @callflow(next={"*"})
     setInputDevice(AudioDevice device) generates (Result retval);
 
-    /*
+    /**
      * Read audio parameters configurations for input and output buffers.
      *
      * @return retval operation completion status.
@@ -166,7 +166,7 @@
     @callflow(next={"*"})
     getConfig() generates (Result retval, EffectConfig config);
 
-    /*
+    /**
      * Read audio parameters configurations for input and output buffers of
      * reverse stream.
      *
@@ -176,7 +176,7 @@
     @callflow(next={"*"})
     getConfigReverse() generates (Result retval, EffectConfig config);
 
-    /*
+    /**
      * Queries for supported combinations of main and auxiliary channels
      * (e.g. for a multi-microphone noise suppressor).
      *
@@ -190,7 +190,7 @@
     getSupportedAuxChannelsConfigs(uint32_t maxConfigs)
             generates (Result retval, vec<EffectAuxChannelsConfig> result);
 
-    /*
+    /**
      * Retrieves the current configuration of main and auxiliary channels.
      *
      * @return retval absence of the feature support is indicated using
@@ -201,7 +201,7 @@
     getAuxChannelsConfig()
             generates (Result retval, EffectAuxChannelsConfig result);
 
-    /*
+    /**
      * Sets the current configuration of main and auxiliary channels.
      *
      * @return retval operation completion status; absence of the feature
@@ -211,7 +211,7 @@
     setAuxChannelsConfig(EffectAuxChannelsConfig config)
             generates (Result retval);
 
-    /*
+    /**
      * Set the audio source the capture path is configured for (Camcorder, voice
      * recognition...).
      *
@@ -224,7 +224,7 @@
     @callflow(next={"*"})
     setAudioSource(AudioSource source) generates (Result retval);
 
-    /*
+    /**
      * This command indicates if the playback thread the effect is attached to
      * is offloaded or not, and updates the I/O handle of the playback thread
      * the effect is attached to.
@@ -235,7 +235,7 @@
     @callflow(next={"*"})
     offload(EffectOffloadParameter param) generates (Result retval);
 
-    /*
+    /**
      * Returns the effect descriptor.
      *
      * @return retval operation completion status.
@@ -244,7 +244,7 @@
     @callflow(next={"*"})
     getDescriptor() generates (Result retval, EffectDescriptor descriptor);
 
-    /*
+    /**
      * Set up required transports for passing audio buffers to the effect.
      *
      * The transport consists of shared memory and a message queue for reporting
@@ -270,7 +270,7 @@
     @callflow(next={"setProcessBuffers"})
     prepareForProcessing() generates (Result retval, fmq_sync<Result> statusMQ);
 
-    /*
+    /**
      * Set up input and output buffers for processing audio data. The effect
      * may modify both the input and the output buffer during the operation.
      * Buffers may be set multiple times during effect lifetime.
@@ -289,7 +289,7 @@
     setProcessBuffers(AudioBuffer inBuffer, AudioBuffer outBuffer) generates (
             Result retval);
 
-    /*
+    /**
      * Execute a vendor specific command on the effect. The command code
      * and data, as well as result data are not interpreted by Android
      * Framework and are passed as-is between the application and the effect.
@@ -310,7 +310,7 @@
     command(uint32_t commandId, vec<uint8_t> data, uint32_t resultMaxSize)
             generates (int32_t status, vec<uint8_t> result);
 
-    /*
+    /**
      * Set a vendor-specific parameter and apply it immediately. The parameter
      * code and data are not interpreted by Android Framework and are passed
      * as-is between the application and the effect.
@@ -331,7 +331,7 @@
     setParameter(vec<uint8_t> parameter, vec<uint8_t> value)
             generates (Result retval);
 
-    /*
+    /**
      * Get a vendor-specific parameter value. The parameter code and returned
      * data are not interpreted by Android Framework and are passed as-is
      * between the application and the effect.
@@ -353,7 +353,7 @@
     getParameter(vec<uint8_t> parameter, uint32_t valueMaxSize)
             generates (Result retval, vec<uint8_t> value);
 
-    /*
+    /**
      * Get supported configs for a vendor-specific feature. The configs returned
      * are not interpreted by Android Framework and are passed as-is between the
      * application and the effect.
@@ -384,7 +384,7 @@
                     uint32_t configsCount,
                     vec<uint8_t> configsData);
 
-    /*
+    /**
      * Get the current config for a vendor-specific feature. The config returned
      * is not interpreted by Android Framework and is passed as-is between the
      * application and the effect.
@@ -406,7 +406,7 @@
     getCurrentConfigForFeature(uint32_t featureId, uint32_t configSize)
             generates (Result retval, vec<uint8_t> configData);
 
-    /*
+    /**
      * Set the current config for a vendor-specific feature. The config data
      * is not interpreted by Android Framework and is passed as-is between the
      * application and the effect.
@@ -426,7 +426,7 @@
     setCurrentConfigForFeature(uint32_t featureId, vec<uint8_t> configData)
             generates (Result retval);
 
-    /*
+    /**
      * Called by the framework to deinitialize the effect and free up
      * all the currently allocated resources. It is recommended to close
      * the effect on the client side as soon as it is becomes unused.
diff --git a/audio/effect/2.0/IEffectBufferProviderCallback.hal b/audio/effect/2.0/IEffectBufferProviderCallback.hal
index 53f4d6e..6ab33c3 100644
--- a/audio/effect/2.0/IEffectBufferProviderCallback.hal
+++ b/audio/effect/2.0/IEffectBufferProviderCallback.hal
@@ -16,12 +16,12 @@
 
 package android.hardware.audio.effect@2.0;
 
-/*
+/**
  * This callback interface contains functions that can be used by the effect
  * engine 'process' function to exchange input and output audio buffers.
  */
 interface IEffectBufferProviderCallback {
-    /*
+    /**
      * Called to retrieve a buffer where data should read from by 'process'
      * function.
      *
@@ -29,7 +29,7 @@
      */
     getBuffer() generates (AudioBuffer buffer);
 
-    /*
+    /**
      * Called to provide a buffer with the data written by 'process' function.
      *
      * @param buffer audio buffer for processing
diff --git a/audio/effect/2.0/IEffectsFactory.hal b/audio/effect/2.0/IEffectsFactory.hal
index c82b4a2..3d300ec 100644
--- a/audio/effect/2.0/IEffectsFactory.hal
+++ b/audio/effect/2.0/IEffectsFactory.hal
@@ -20,7 +20,7 @@
 import IEffect;
 
 interface IEffectsFactory {
-    /*
+    /**
      * Returns descriptors of different effects in all loaded libraries.
      *
      * @return retval operation completion status.
@@ -28,7 +28,7 @@
      */
     getAllDescriptors() generates(Result retval, vec<EffectDescriptor> result);
 
-    /*
+    /**
      * Returns a descriptor of a particular effect.
      *
      * @return retval operation completion status.
@@ -36,7 +36,7 @@
      */
     getDescriptor(Uuid uid) generates(Result retval, EffectDescriptor result);
 
-    /*
+    /**
      * Creates an effect engine of the specified type.  To release the effect
      * engine, it is necessary to release references to the returned effect
      * object.
@@ -56,7 +56,7 @@
     createEffect(Uuid uid, AudioSession session, AudioIoHandle ioHandle)
         generates (Result retval, IEffect result, uint64_t effectId);
 
-    /*
+    /**
      * Dumps information about effects into the provided file descriptor.
      * This is used for the dumpsys facility.
      *
diff --git a/audio/effect/2.0/IEnvironmentalReverbEffect.hal b/audio/effect/2.0/IEnvironmentalReverbEffect.hal
index d9b1ee6..dca89f9 100644
--- a/audio/effect/2.0/IEnvironmentalReverbEffect.hal
+++ b/audio/effect/2.0/IEnvironmentalReverbEffect.hal
@@ -20,12 +20,12 @@
 import IEffect;
 
 interface IEnvironmentalReverbEffect extends IEffect {
-    /*
+    /**
      * Sets whether the effect should be bypassed.
      */
     setBypass(bool bypass) generates (Result retval);
 
-    /*
+    /**
      * Gets whether the effect should be bypassed.
      */
     getBypass() generates (Result retval, bool bypass);
@@ -53,102 +53,102 @@
         DENSITY_MAX = 1000
     };
 
-    /*
+    /**
      * Sets the room level.
      */
     setRoomLevel(int16_t roomLevel) generates (Result retval);
 
-    /*
+    /**
      * Gets the room level.
      */
     getRoomLevel() generates (Result retval, int16_t roomLevel);
 
-    /*
+    /**
      * Sets the room high frequences level.
      */
     setRoomHfLevel(int16_t roomHfLevel) generates (Result retval);
 
-    /*
+    /**
      * Gets the room high frequences level.
      */
     getRoomHfLevel() generates (Result retval, int16_t roomHfLevel);
 
-    /*
+    /**
      * Sets the room decay time.
      */
     setDecayTime(uint32_t decayTime) generates (Result retval);
 
-    /*
+    /**
      * Gets the room decay time.
      */
     getDecayTime() generates (Result retval, uint32_t decayTime);
 
-    /*
+    /**
      * Sets the ratio of high frequences decay.
      */
     setDecayHfRatio(int16_t decayHfRatio) generates (Result retval);
 
-    /*
+    /**
      * Gets the ratio of high frequences decay.
      */
     getDecayHfRatio() generates (Result retval, int16_t decayHfRatio);
 
-    /*
+    /**
      * Sets the level of reflections in the room.
      */
     setReflectionsLevel(int16_t reflectionsLevel) generates (Result retval);
 
-    /*
+    /**
      * Gets the level of reflections in the room.
      */
     getReflectionsLevel() generates (Result retval, int16_t reflectionsLevel);
 
-    /*
+    /**
      * Sets the reflections delay in the room.
      */
     setReflectionsDelay(uint32_t reflectionsDelay) generates (Result retval);
 
-    /*
+    /**
      * Gets the reflections delay in the room.
      */
     getReflectionsDelay() generates (Result retval, uint32_t reflectionsDelay);
 
-    /*
+    /**
      * Sets the reverb level of the room.
      */
     setReverbLevel(int16_t reverbLevel) generates (Result retval);
 
-    /*
+    /**
      * Gets the reverb level of the room.
      */
     getReverbLevel() generates (Result retval, int16_t reverbLevel);
 
-    /*
+    /**
      * Sets the reverb delay of the room.
      */
     setReverbDelay(uint32_t reverDelay) generates (Result retval);
 
-    /*
+    /**
      * Gets the reverb delay of the room.
      */
     getReverbDelay() generates (Result retval, uint32_t reverbDelay);
 
-    /*
+    /**
      * Sets room diffusion.
      */
     setDiffusion(int16_t diffusion) generates (Result retval);
 
-    /*
+    /**
      * Gets room diffusion.
      */
     getDiffusion() generates (Result retval, int16_t diffusion);
 
-    /*
+    /**
      * Sets room wall density.
      */
     setDensity(int16_t density) generates (Result retval);
 
-    /*
+    /**
      * Gets room wall density.
      */
     getDensity() generates (Result retval, int16_t density);
@@ -166,12 +166,12 @@
         int16_t  density;           // in permilles,    range 0 to 1000
     };
 
-    /*
+    /**
      * Sets all properties at once.
      */
     setAllProperties(AllProperties properties) generates (Result retval);
 
-    /*
+    /**
      * Gets all properties at once.
      */
     getAllProperties() generates (Result retval, AllProperties properties);
diff --git a/audio/effect/2.0/IEqualizerEffect.hal b/audio/effect/2.0/IEqualizerEffect.hal
index b8fa177..1528e0d 100644
--- a/audio/effect/2.0/IEqualizerEffect.hal
+++ b/audio/effect/2.0/IEqualizerEffect.hal
@@ -20,58 +20,58 @@
 import IEffect;
 
 interface IEqualizerEffect extends IEffect {
-    /*
+    /**
      * Gets the number of frequency bands that the equalizer supports.
      */
     getNumBands() generates (Result retval, uint16_t numBands);
 
-    /*
+    /**
      * Returns the minimum and maximum band levels supported.
      */
     getLevelRange()
             generates (Result retval, int16_t minLevel, int16_t maxLevel);
 
-    /*
+    /**
      * Sets the gain for the given equalizer band.
      */
     setBandLevel(uint16_t band, int16_t level) generates (Result retval);
 
-    /*
+    /**
      * Gets the gain for the given equalizer band.
      */
     getBandLevel(uint16_t band) generates (Result retval, int16_t level);
 
-    /*
+    /**
      * Gets the center frequency of the given band, in milliHertz.
      */
     getBandCenterFrequency(uint16_t band)
             generates (Result retval, uint32_t centerFreqmHz);
 
-    /*
+    /**
      * Gets the frequency range of the given frequency band, in milliHertz.
      */
     getBandFrequencyRange(uint16_t band)
             generates (Result retval, uint32_t minFreqmHz, uint32_t maxFreqmHz);
 
-    /*
+    /**
      * Gets the band that has the most effect on the given frequency
      * in milliHertz.
      */
     getBandForFrequency(uint32_t freqmHz)
             generates (Result retval, uint16_t band);
 
-    /*
+    /**
      * Gets the names of all presets the equalizer supports.
      */
     getPresetNames() generates (Result retval, vec<string> names);
 
-    /*
+    /**
      * Sets the current preset using the index of the preset in the names
      * vector returned via 'getPresetNames'.
      */
     setCurrentPreset(uint16_t preset) generates (Result retval);
 
-    /*
+    /**
      * Gets the current preset.
      */
     getCurrentPreset() generates (Result retval, uint16_t preset);
@@ -81,12 +81,12 @@
         vec<int16_t> bandLevels;
     };
 
-    /*
+    /**
      * Sets all properties at once.
      */
     setAllProperties(AllProperties properties) generates (Result retval);
 
-    /*
+    /**
      * Gets all properties at once.
      */
     getAllProperties() generates (Result retval, AllProperties properties);
diff --git a/audio/effect/2.0/ILoudnessEnhancerEffect.hal b/audio/effect/2.0/ILoudnessEnhancerEffect.hal
index 3e1ee4e..adeb1c8 100644
--- a/audio/effect/2.0/ILoudnessEnhancerEffect.hal
+++ b/audio/effect/2.0/ILoudnessEnhancerEffect.hal
@@ -20,12 +20,12 @@
 import IEffect;
 
 interface ILoudnessEnhancerEffect extends IEffect {
-    /*
+    /**
      * Sets target gain expressed in millibels.
      */
     setTargetGain(int32_t targetGainMb) generates (Result retval);
 
-    /*
+    /**
      * Gets target gain expressed in millibels.
      */
     getTargetGain() generates (Result retval, int32_t targetGainMb);
diff --git a/audio/effect/2.0/INoiseSuppressionEffect.hal b/audio/effect/2.0/INoiseSuppressionEffect.hal
index ae2bfb5..6617a1e 100644
--- a/audio/effect/2.0/INoiseSuppressionEffect.hal
+++ b/audio/effect/2.0/INoiseSuppressionEffect.hal
@@ -26,12 +26,12 @@
         HIGH
     };
 
-    /*
+    /**
      * Sets suppression level.
      */
     setSuppressionLevel(Level level) generates (Result retval);
 
-    /*
+    /**
      * Gets suppression level.
      */
     getSuppressionLevel() generates (Result retval, Level level);
@@ -41,12 +41,12 @@
         MULTI_CHANNEL
     };
 
-    /*
+    /**
      * Set suppression type.
      */
     setSuppressionType(Type type) generates (Result retval);
 
-    /*
+    /**
      * Get suppression type.
      */
     getSuppressionType() generates (Result retval, Type type);
@@ -56,12 +56,12 @@
         Type type;
     };
 
-    /*
+    /**
      * Sets all properties at once.
      */
     setAllProperties(AllProperties properties) generates (Result retval);
 
-    /*
+    /**
      * Gets all properties at once.
      */
     getAllProperties() generates (Result retval, AllProperties properties);
diff --git a/audio/effect/2.0/IVirtualizerEffect.hal b/audio/effect/2.0/IVirtualizerEffect.hal
index 2b7116c..49b49a0 100644
--- a/audio/effect/2.0/IVirtualizerEffect.hal
+++ b/audio/effect/2.0/IVirtualizerEffect.hal
@@ -20,7 +20,7 @@
 import IEffect;
 
 interface IVirtualizerEffect extends IEffect {
-    /*
+    /**
      * Returns whether setting virtualization strength is supported.
      */
     isStrengthSupported() generates (bool strengthSupported);
@@ -30,7 +30,7 @@
         MAX = 1000
     };
 
-    /*
+    /**
      * Sets virtualization strength.
      *
      * @param strength strength of the effect. The valid range for strength
@@ -41,7 +41,7 @@
      */
     setStrength(uint16_t strength) generates (Result retval);
 
-    /*
+    /**
      * Gets virtualization strength.
      */
     getStrength() generates (Result retval, uint16_t strength);
@@ -56,19 +56,19 @@
         int16_t elevation; // 0 is the horizontal plane
                            // +90 is above the listener, -90 is below
     };
-    /*
+    /**
      * Retrieves virtual speaker angles for the given channel mask on the
      * specified device.
      */
     getVirtualSpeakerAngles(AudioChannelMask mask, AudioDevice device)
             generates (Result retval, vec<SpeakerAngle> speakerAngles);
 
-    /*
+    /**
      * Forces the virtualizer effect for the given output device.
      */
     forceVirtualizationMode(AudioDevice device) generates (Result retval);
 
-    /*
+    /**
      * Returns audio device reflecting the current virtualization mode,
      * AUDIO_DEVICE_NONE when not virtualizing.
      */
diff --git a/audio/effect/2.0/IVisualizerEffect.hal b/audio/effect/2.0/IVisualizerEffect.hal
index 79dc9ee..fd3edbd 100644
--- a/audio/effect/2.0/IVisualizerEffect.hal
+++ b/audio/effect/2.0/IVisualizerEffect.hal
@@ -25,12 +25,12 @@
         MIN = 128    // minimum capture size in samples
     };
 
-    /*
+    /**
      * Sets the number PCM samples in the capture.
      */
     setCaptureSize(uint16_t captureSize) generates (Result retval);
 
-    /*
+    /**
      * Gets the number PCM samples in the capture.
      */
     getCaptureSize() generates (Result retval, uint16_t captureSize);
@@ -42,22 +42,22 @@
         AS_PLAYED = 1
     };
 
-    /*
+    /**
      * Specifies the way the captured data is scaled.
      */
     setScalingMode(ScalingMode scalingMode) generates (Result retval);
 
-    /*
+    /**
      * Retrieves the way the captured data is scaled.
      */
     getScalingMode() generates (Result retval, ScalingMode scalingMode);
 
-    /*
+    /**
      * Informs the visualizer about the downstream latency.
      */
     setLatency(uint32_t latencyMs) generates (Result retval);
 
-    /*
+    /**
      * Gets the downstream latency.
      */
     getLatency() generates (Result retval, uint32_t latencyMs);
@@ -69,19 +69,19 @@
         PEAK_RMS = 0x1
     };
 
-    /*
+    /**
      * Specifies which measurements are to be made.
      */
     setMeasurementMode(MeasurementMode measurementMode)
             generates (Result retval);
 
-    /*
+    /**
      * Retrieves which measurements are to be made.
      */
     getMeasurementMode() generates (
             Result retval, MeasurementMode measurementMode);
 
-    /*
+    /**
      * Retrieves the latest PCM snapshot captured by the visualizer engine.  The
      * number of samples to capture is specified by 'setCaptureSize' parameter.
      *
@@ -99,7 +99,7 @@
             } peakAndRms;
         } value;
     };
-    /*
+    /**
      * Retrieves the lastest measurements. The measurements to be made
      * are specified by 'setMeasurementMode' parameter.
      *
diff --git a/audio/effect/2.0/types.hal b/audio/effect/2.0/types.hal
index 0626ec5..2c5e4ef 100644
--- a/audio/effect/2.0/types.hal
+++ b/audio/effect/2.0/types.hal
@@ -27,7 +27,7 @@
     RESULT_TOO_BIG
 };
 
-/*
+/**
  * Effect engine capabilities/requirements flags.
  *
  * Definitions for flags field of effect descriptor.
@@ -195,7 +195,7 @@
     NO_PROCESS = 1 << NO_PROCESS_SHIFT
 };
 
-/*
+/**
  * The effect descriptor contains necessary information to facilitate the
  * enumeration of the effect engines present in a library.
  */
@@ -212,7 +212,7 @@
     uint8_t[64] implementor;  // human readable effect implementor name
 };
 
-/*
+/**
  * A buffer is a chunk of audio data for processing.  Multi-channel audio is
  * always interleaved. The channel order is from LSB to MSB with regard to the
  * channel mask definition in audio.h, audio_channel_mask_t, e.g.:
@@ -235,7 +235,7 @@
     ACCESS_ACCUMULATE
 };
 
-/*
+/**
  * Determines what fields of EffectBufferConfig need to be considered.
  */
 @export(name="", value_prefix="EFFECT_CONFIG_")
@@ -248,7 +248,7 @@
     ALL = BUFFER | SMP_RATE | CHANNELS | FORMAT | ACC_MODE
 };
 
-/*
+/**
  * The buffer config structure specifies the input or output audio format
  * to be used by the effect engine.
  */
@@ -285,7 +285,7 @@
                              // the effect is attached to
 };
 
-/*
+/**
  * The message queue flags used to synchronize reads and writes from
  * the status message queue used by effects.
  */
diff --git a/automotive/evs/1.0/types.hal b/automotive/evs/1.0/types.hal
index 661c2a9..0ce39d1 100644
--- a/automotive/evs/1.0/types.hal
+++ b/automotive/evs/1.0/types.hal
@@ -17,7 +17,7 @@
 package android.hardware.automotive.evs@1.0;
 
 
-/*
+/**
  * Bit flags indicating suggested uses for a given EVS camera
  *
  * The values in the UsageHint bit field provide a generic expression of how a
@@ -35,7 +35,7 @@
 };
 
 
-/*
+/**
  * Structure describing the basic properties of an EVS camera
  *
  * The HAL is responsible for filling out this structure for each
@@ -55,7 +55,7 @@
 };
 
 
-/*
+/**
  * Structure describing the basic properties of an EVS display
  *
  * The HAL is responsible for filling out this structure to describe
@@ -71,7 +71,7 @@
 };
 
 
-/*
+/**
  * Structure representing an image buffer through our APIs
  *
  * In addition to the handle to the graphics memory, we need to retain
@@ -94,7 +94,7 @@
 };
 
 
-/*
+/**
  * States for control of the EVS display
  *
  * The DisplayInfo structure describes the basic properties of an EVS display. Any EVS
@@ -112,11 +112,11 @@
 };
 
 
-/* Error codes used in EVS HAL interface. */
+/** Error codes used in EVS HAL interface. */
 enum EvsResult : uint32_t {
     OK = 0,
     INVALID_ARG,
     STREAM_ALREADY_RUNNING,
     BUFFER_NOT_AVAILABLE,
     UNDERLYING_SERVICE_ERROR,
-};
\ No newline at end of file
+};
diff --git a/automotive/vehicle/2.0/IVehicle.hal b/automotive/vehicle/2.0/IVehicle.hal
index 5de416f..d962de0 100644
--- a/automotive/vehicle/2.0/IVehicle.hal
+++ b/automotive/vehicle/2.0/IVehicle.hal
@@ -25,7 +25,7 @@
    */
   getAllPropConfigs() generates (vec<VehiclePropConfig> propConfigs);
 
-  /*
+  /**
    * Returns a list of property configurations for given properties.
    *
    * If requested VehicleProperty wasn't found it must return
diff --git a/automotive/vehicle/2.0/IVehicleCallback.hal b/automotive/vehicle/2.0/IVehicleCallback.hal
index 167e5e1..7060418 100644
--- a/automotive/vehicle/2.0/IVehicleCallback.hal
+++ b/automotive/vehicle/2.0/IVehicleCallback.hal
@@ -18,7 +18,7 @@
 
 interface IVehicleCallback {
 
-    /*
+    /**
      * Event callback happens whenever a variable that the API user has
      * subscribed to needs to be reported. This may be based purely on
      * threshold and frequency (a regular subscription, see subscribe call's
@@ -31,7 +31,7 @@
      */
     oneway onPropertyEvent(vec<VehiclePropValue> propValues);
 
-    /*
+    /**
      * This method gets called if the client was subscribed to a property using
      * SubscribeFlags::SET_CALL flag and IVehicle#set(...) method was called.
      *
@@ -42,7 +42,7 @@
      */
     oneway onPropertySet(VehiclePropValue propValue);
 
-    /*
+    /**
      * Set property value is usually asynchronous operation. Thus even if
      * client received StatusCode::OK from the IVehicle::set(...) this
      * doesn't guarantee that the value was successfully propagated to the
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index a998d33..f1fb6bf 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.automotive.vehicle@2.0;
 
-/*
+/**
  * Enumerates supported data types for VehicleProperty.
  *
  * This is a bitwise flag that supposed to be used in VehicleProperty enum.
@@ -31,7 +31,7 @@
     FLOAT_VEC      = 0x00610000,
     BYTES          = 0x00700000,
 
-    /*
+    /**
      * Any combination of scalar or vector types. The exact format must be
      * provided in the description of the property.
      */
@@ -40,7 +40,7 @@
     MASK           = 0x00ff0000
 };
 
-/*
+/**
  * Some properties may be associated with particular vehicle areas. For
  * example, VehicleProperty:DOOR_LOCK property must be associated with
  * particular door, thus this property must be marked with
@@ -62,18 +62,18 @@
       MASK         = 0x0f000000,
 };
 
-/*
+/**
  * Enumerates property groups.
  *
  * This is a bitwise flag that supposed to be used in VehicleProperty enum.
  */
 enum VehiclePropertyGroup : int32_t {
-    /*
+    /**
      * Properties declared in AOSP must have this flag.
      */
     SYSTEM         = 0x10000000,
 
-    /*
+    /**
      * Properties declared by vendors must have this flag.
      */
     VENDOR         = 0x20000000,
@@ -81,7 +81,7 @@
     MASK           = 0xf0000000,
 };
 
-/*
+/**
  * Declares all vehicle properties. VehicleProperty has a bitwise structure.
  * Each property must have:
  *   - an unique id from range 0x0100 - 0xffff
@@ -95,10 +95,10 @@
  */
 enum VehicleProperty: int32_t {
 
-    /* Undefined property. */
+    /** Undefined property. */
     INVALID = 0x00000000,
 
-    /*
+    /**
      * VIN of vehicle
      *
      * @change_mode VehiclePropertyChangeMode:STATIC
@@ -110,7 +110,7 @@
         | VehiclePropertyType:STRING
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Maker name of vehicle
      *
      * @change_mode VehiclePropertyChangeMode:STATIC
@@ -122,7 +122,7 @@
         | VehiclePropertyType:STRING
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Model of vehicle
      *
      * @change_mode VehiclePropertyChangeMode:STATIC
@@ -134,7 +134,7 @@
         | VehiclePropertyType:STRING
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Model year of vehicle.
      *
      * @change_mode VehiclePropertyChangeMode:STATIC
@@ -147,7 +147,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Fuel capacity of the vehicle
      *
      * @change_mode VehiclePropertyChangeMode:STATIC
@@ -160,7 +160,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Current odometer value of the vehicle
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE | VehiclePropertyChangeMode:CONTINUOUS
@@ -173,7 +173,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Speed of the vehicle
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS
@@ -186,7 +186,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Temperature of engine coolant
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS
@@ -199,7 +199,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Temperature of engine oil
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS
@@ -212,7 +212,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Engine rpm
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS
@@ -225,7 +225,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Currently selected gear
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -238,7 +238,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Current gear. In non-manual case, selected gear does not necessarily
      * match the current gear.
      *
@@ -252,7 +252,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Parking brake state.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -264,7 +264,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Driving status policy.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -277,7 +277,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Warning for fuel low level.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -289,7 +289,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Night mode or not.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -301,7 +301,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * State of the vehicles turn signals
      *
      * Values from VehicleTurnSignal
@@ -315,7 +315,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Represents ignition state
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -327,7 +327,7 @@
             | VehiclePropertyType:INT32
             | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Fan speed setting
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -343,7 +343,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * Fan direction setting
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -360,7 +360,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * HVAC current temperature.
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -376,7 +376,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * HVAC, target temperature set.
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -392,7 +392,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * On/off defrost
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -408,7 +408,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:WINDOW),
 
-    /*
+    /**
      * On/off AC
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -425,7 +425,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * On/off max AC
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -441,7 +441,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * On/off max defrost
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -457,7 +457,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * On/off re-circulation
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -473,7 +473,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * On/off dual. This must be defined per each row.
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -489,7 +489,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * On/off automatic mode
      *
      * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -505,7 +505,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * Seat temperature
      *
      * Negative values indicate cooling.
@@ -622,7 +622,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * Represents power state for HVAC. Some HVAC properties must require
      * matching power to be turned on to get out of OFF state. For non-zoned
      * HVAC properties, VEHICLE_ALL_ZONE corresponds to global power state.
@@ -640,7 +640,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:ZONE),
 
-    /*
+    /**
      * Outside temperature
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS
@@ -653,7 +653,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Cabin temperature
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE|VehiclePropertyChangeMode:CONTINUOUS
@@ -666,7 +666,7 @@
         | VehiclePropertyType:FLOAT
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Radio presets stored on the Car radio module. The data type used is int32
      * array with the following fields:
      * <ul>
@@ -690,7 +690,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Represents audio focus state of Android side. Note that car's audio
      * module must own audio focus and grant audio focus to Android side when
      * requested by Android side. The focus has both per stream characteristics
@@ -776,7 +776,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * A property to allow external component to control audio focus. Depending on
      * H/W architecture, audio HAL may need to control audio focus while vehicle
      * HAL is still interacting with upper layer. In such case, audio HAL may set
@@ -793,7 +793,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to control audio volume of each audio context.
      *
      * VehiclePropConfig
@@ -830,7 +830,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to allow audio volume sync from external components like audio HAL.
      * Some vehicle HAL implementation may get volume control from audio HAL and in such
      * case, setting AUDIO_VOLUME_EXT_SYNC property may trigger event in AUDIO_VOLUME property.
@@ -846,7 +846,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property for handling volume limit set by user. This limits maximum
      * volume that can be set per each context or physical stream.
      *
@@ -880,7 +880,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to share audio routing policy of android side. This property is
      * set at the beginning to pass audio policy in android side down to
      * vehicle HAL and car audio module.
@@ -908,7 +908,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to return audio H/W variant type used in this car. This allows
      * android side to support different audio policy based on H/W variant used.
      * Note that other components like CarService may need overlay update to
@@ -926,7 +926,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to pass hint on external audio routing. When android side
      * request focus with VehicleAudioExtFocusflag, this
      * property must be set before setting AUDIO_FOCUS property as a hint for
@@ -1028,7 +1028,7 @@
         | VehiclePropertyType:STRING
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to control power state of application processor
      *
      * It is assumed that AP's power state is controller by separate power
@@ -1054,7 +1054,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to represent brightness of the display. Some cars have single
      * control for the brightness of all displays and this property is to share
      * change in that control.
@@ -1073,7 +1073,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to report bootup reason for the current power on. This is a
      * static property that will not change for the whole duration until power
      * off. For example, even if user presses power on button after automatic
@@ -1091,7 +1091,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to feed H/W input events to android
      *
      * int32Values[0] : action defined by VehicleHwKeyInputAction
@@ -1109,7 +1109,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Property to define instrument cluster information.
      * For VehicleInstrumentClusterType:EXTERNAL_DISPLAY:
      *  READ:
@@ -1143,7 +1143,7 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Current date and time, encoded as Unix time.
      * This value denotes the number of seconds that have elapsed since
      * 1/1/1970.
@@ -1158,7 +1158,7 @@
         | VehiclePropertyType:INT64
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Current time only.
      * Some vehicles may not keep track of date.  This property only affects
      * the current time, in seconds during the day.  Thus, the max value for
@@ -1174,7 +1174,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Door position
      *
      * This is an integer in case a door may be set to a particular position.
@@ -1192,7 +1192,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:DOOR),
 
-    /*
+    /**
      * Door move
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -1204,7 +1204,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:DOOR),
 
-    /*
+    /**
      * Door lock
      *
      * 'true' indicates door is locked
@@ -1218,7 +1218,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:DOOR),
 
-    /*
+    /**
      * Mirror Z Position
      *
      * Positive value indicates tilt upwards, negative value is downwards
@@ -1232,7 +1232,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:MIRROR),
 
-    /*
+    /**
      * Mirror Z Move
      *
      * Positive value indicates tilt upwards, negative value is downwards
@@ -1246,7 +1246,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:MIRROR),
 
-    /*
+    /**
      * Mirror Y Position
      *
      * Positive value indicate tilt right, negative value is left
@@ -1260,7 +1260,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:MIRROR),
 
-    /*
+    /**
      * Mirror Y Move
      *
      * Positive value indicate tilt right, negative value is left
@@ -1274,7 +1274,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:MIRROR),
 
-    /*
+    /**
      * Mirror Lock
      *
      * True indicates mirror positions are locked and not changeable
@@ -1288,7 +1288,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Mirror Fold
      *
      * True indicates mirrors are folded
@@ -1302,7 +1302,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Seat memory select
      *
      * This parameter selects the memory preset to use to select the seat
@@ -1322,7 +1322,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat memory set
      *
      * This setting allows the user to save the current seat position settings
@@ -1338,7 +1338,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seatbelt buckled
      *
      * True indicates belt is buckled.
@@ -1355,7 +1355,7 @@
         | VehiclePropertyType:BOOLEAN
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seatbelt height position
      *
      * Adjusts the shoulder belt anchor point.
@@ -1371,7 +1371,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seatbelt height move
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -1383,7 +1383,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat fore/aft position
      *
      * Sets the seat position forward (closer to steering wheel) and backwards.
@@ -1399,7 +1399,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat fore/aft move
      *
      * Moves the seat position forward and aft.
@@ -1413,7 +1413,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat backrest angle 1 position
      *
      * Backrest angle 1 is the actuator closest to the bottom of the seat.
@@ -1429,7 +1429,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat backrest angle 1 move
      *
      * Moves the backrest forward or recline.
@@ -1443,7 +1443,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat backrest angle 2 position
      *
      * Backrest angle 2 is the next actuator up from the bottom of the seat.
@@ -1459,7 +1459,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat backrest angle 2 move
      *
      * Moves the backrest forward or recline.
@@ -1473,7 +1473,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat height position
      *
      * Sets the seat height.
@@ -1489,7 +1489,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat height move
      *
      * Moves the seat height.
@@ -1503,7 +1503,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat depth position
      *
      * Sets the seat depth, distance from back rest to front edge of seat.
@@ -1519,7 +1519,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat depth move
      *
      * Adjusts the seat depth.
@@ -1533,7 +1533,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat tilt position
      *
      * Sets the seat tilt.
@@ -1549,7 +1549,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Seat tilt move
      *
      * Tilts the seat.
@@ -1563,7 +1563,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Lumber fore/aft position
      *
      * Pushes the lumbar support forward and backwards
@@ -1579,7 +1579,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Lumbar fore/aft move
      *
      * Adjusts the lumbar support.
@@ -1593,7 +1593,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Lumbar side support position
      *
      * Sets the amount of lateral lumbar support.
@@ -1609,7 +1609,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Lumbar side support move
      *
      * Adjusts the amount of lateral lumbar support.
@@ -1623,7 +1623,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Headrest height position
      *
      * Sets the headrest height.
@@ -1639,7 +1639,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Headrest height move
      *
      * Moves the headrest up and down.
@@ -1653,7 +1653,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Headrest angle position
      *
      * Sets the angle of the headrest.
@@ -1669,7 +1669,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Headrest angle move
      *
      * Adjusts the angle of the headrest
@@ -1683,7 +1683,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Headrest fore/aft position
      *
      * Adjusts the headrest forwards and backwards.
@@ -1699,7 +1699,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Headrest fore/aft move
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -1711,7 +1711,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:SEAT),
 
-    /*
+    /**
      * Window Position
      *
      * Max = window up / closed
@@ -1726,7 +1726,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Window Move
      *
      * Max = window up / closed
@@ -1743,7 +1743,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Window Vent Position
      *
      * This feature is used to control the vent feature on a sunroof.
@@ -1760,7 +1760,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Window Vent Move
      *
      * This feature is used to control the vent feature on a sunroof.
@@ -1777,7 +1777,7 @@
         | VehiclePropertyType:INT32
         | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Window Lock
      *
      * True indicates windows are locked and can't be moved.
@@ -1792,7 +1792,7 @@
         | VehicleArea:GLOBAL),
 };
 
-/*
+/**
  * Bit flags for fan direction
  */
 enum VehicleHvacFanDirection : int32_t {
@@ -1803,11 +1803,11 @@
   DEFROST_AND_FLOOR = 0x5,
 };
 
-/*
+/**
  * Constants relevant to radio.
  */
 enum VehicleRadioConstants : int32_t {
-  /* Minimum value for the radio preset */
+  /** Minimum value for the radio preset */
   VEHICLE_RADIO_PRESET_MIN_VALUE = 1,
 };
 
@@ -1815,7 +1815,7 @@
   REQUEST_GAIN = 0x1,
   REQUEST_GAIN_TRANSIENT = 0x2,
   REQUEST_GAIN_TRANSIENT_MAY_DUCK = 0x3,
-  /*
+  /**
    * This is for the case where android side plays sound like UI feedback
    * and car side does not need to duck existing playback as long as
    * requested stream is available.
@@ -1826,34 +1826,34 @@
 };
 
 enum VehicleAudioFocusState : int32_t {
-  /*
+  /**
    * Android side has permanent focus and can play allowed streams.
    */
   STATE_GAIN = 0x1,
 
-  /*
+  /**
    * Android side has transient focus and can play allowed streams.
    */
   STATE_GAIN_TRANSIENT = 0x2,
 
-  /*
+  /**
    * Car audio module is playing guidance kind of sound outside Android.
    * Android side can still play through allowed streams with ducking.
    */
   STATE_LOSS_TRANSIENT_CAN_DUCK = 0x3,
 
-  /*
+  /**
    * Car audio module is playing transient sound outside Android. Android side
    * must stop playing any sounds.
    */
   STATE_LOSS_TRANSIENT = 0x4,
 
-  /*
+  /**
    * Android side has lost focus and cannot play any sound.
    */
   STATE_LOSS = 0x5,
 
-  /*
+  /**
    * car audio module is playing safety critical sound, and Android side cannot
    * request focus until the current state is finished. car audio module
    * restore it to the previous state when it can allow Android to play.
@@ -1862,7 +1862,7 @@
 
 };
 
-/*
+/**
  * Flags to represent multiple streams by combining these.
  */
 enum VehicleAudioStreamFlag : int32_t {
@@ -1871,7 +1871,7 @@
   STREAM2_FLAG = (0x1 << 2),
 };
 
-/*
+/**
  * Represents stream number (always 0 to N -1 where N is max number of streams).
  * Can be used for audio related property expecting one stream.
  */
@@ -1880,27 +1880,27 @@
   STREAM1 = 1,
 };
 
-/*
+/**
  * Flag to represent external focus state (outside Android).
  */
 enum VehicleAudioExtFocusFlag : int32_t {
-  /*
+  /**
    * No external focus holder.
    */
   NONE_FLAG = 0x0,
 
-  /*
+  /**
    * Car side (outside Android) has component holding GAIN kind of focus state.
    */
   PERMANENT_FLAG = 0x1,
 
-  /*
+  /**
    * Car side (outside Android) has component holding GAIN_TRANSIENT kind of
    * focus state.
    */
   TRANSIENT_FLAG = 0x2,
 
-  /*
+  /**
    * Car side is expected to play something while focus is held by Android side.
    * One example can be radio attached in car side. But Android's radio app
    * still must have focus, and Android side must be in GAIN state, but
@@ -1909,14 +1909,14 @@
    */
   PLAY_ONLY_FLAG = 0x4,
 
-  /*
+  /**
    * Car side must mute any media including radio. This can be used with any
    * focus request including GAIN* and RELEASE.
    */
   MUTE_MEDIA_FLAG = 0x8,
 };
 
-/*
+/**
  * Index in int32Values for VehicleProperty#AUDIO_FOCUS property.
  */
 enum VehicleAudioFocusIndex : int32_t {
@@ -1926,65 +1926,65 @@
   AUDIO_CONTEXTS = 3,
 };
 
-/*
+/**
  * Flags to tell the current audio context.
  */
 enum VehicleAudioContextFlag : int32_t {
-  /* Music playback is currently active. */
+  /** Music playback is currently active. */
   MUSIC_FLAG = 0x1,
 
-  /* Navigation is currently running. */
+  /** Navigation is currently running. */
   NAVIGATION_FLAG = 0x2,
 
-  /* Voice command session is currently running. */
+  /** Voice command session is currently running. */
   VOICE_COMMAND_FLAG = 0x4,
 
-  /* Voice call is currently active. */
+  /** Voice call is currently active. */
   CALL_FLAG = 0x8,
 
-  /*
+  /**
    * Alarm is active.
    * This must be only used in VehicleProperty#AUDIO_ROUTING_POLICY.
    */
   ALARM_FLAG = 0x10,
 
-  /*
+  /**
    * Notification sound is active.
    * This must be only used in VehicleProperty#AUDIO_ROUTING_POLICY.
    */
   NOTIFICATION_FLAG = 0x20,
 
-  /*
+  /**
    * Context unknown. Only used for VehicleProperty#AUDIO_ROUTING_POLICY to
    * represent default stream for unknown contents.
    */
   UNKNOWN_FLAG = 0x40,
 
-  /* Safety alert / warning is played. */
+  /** Safety alert / warning is played. */
   SAFETY_ALERT_FLAG = 0x80,
 
-  /* CD / DVD kind of audio is played */
+  /** CD / DVD kind of audio is played */
   CD_ROM_FLAG = 0x100,
 
-  /* Aux audio input is played */
+  /** Aux audio input is played */
   AUX_AUDIO_FLAG = 0x200,
 
-  /* system sound like UI feedback */
+  /** system sound like UI feedback */
   SYSTEM_SOUND_FLAG = 0x400,
 
-  /* Radio is played */
+  /** Radio is played */
   RADIO_FLAG = 0x800,
 
-  /* Ext source is played. This is for tagging generic ext sources. */
+  /** Ext source is played. This is for tagging generic ext sources. */
   EXT_SOURCE_FLAG = 0x1000,
 };
 
-/*
+/**
  * flags to represent capability of audio volume property.
  * used in configArray[1] of VehiclePropConfig.
  */
 enum VehicleAudioVolumeCapabilityFlag : int32_t {
-  /*
+  /**
    * External audio module or vehicle hal has persistent storage
    * to keep the volume level. This must be set only when per context
    * volume level is supported. When this is set, audio volume level per
@@ -1998,7 +1998,7 @@
    */
   PERSISTENT_STORAGE = 0x1,
 
-  /*
+  /**
    * When this flag is set, the H/W can support only single master volume for
    * all streams.
    * There is no way to set volume level differently per each stream or context.
@@ -2006,13 +2006,13 @@
   MASTER_VOLUME_ONLY = 0x2,
 };
 
-/*
+/**
  * enum to represent audio volume state.
  */
 enum VehicleAudioVolumeState : int32_t {
   STATE_OK = 0,
 
-  /*
+  /**
    * Audio volume has reached volume limit set in
    * VehicleProperty#AUDIO_VOLUME_LIMIT and user's request to increase volume
    * further is not allowed.
@@ -2020,7 +2020,7 @@
   LIMIT_REACHED = 1,
 };
 
-/*
+/**
  * Index in int32Values for VehicleProperty#AUDIO_VOLUME property.
  */
 enum VehicleAudioVolumeIndex : int32_t {
@@ -2029,7 +2029,7 @@
   INDEX_STATE = 2,
 };
 
-/*
+/**
  * Index in int32Values for VehicleProperty#AUDIO_VOLUME_LIMIT property.
  */
 enum VehicleAudioVolumeLimitIndex : int32_t {
@@ -2037,7 +2037,7 @@
   MAX_VOLUME = 1,
 };
 
-/*
+/**
  * Index in int32Values for VehicleProperty#AUDIO_ROUTING_POLICY property.
  */
 enum VehicleAudioRoutingPolicyIndex : int32_t {
@@ -2045,12 +2045,12 @@
   CONTEXTS = 1,
 };
 
-/*
+/**
  * Flag to be used in VehiclePropConfig#configFlags for
  * VehicleProperty#AUDIO_HW_VARIANT.
  */
 enum VehicleAudioHwVariantConfigFlag : int32_t {
-  /*
+  /**
    * Flag to tell that radio is internal to android and radio must
    * be treated like other android stream like media.
    * When this flag is not set or AUDIO_HW_VARIANT does not exist,
@@ -2061,13 +2061,13 @@
 };
 
 enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ {
-  /*
+  /**
    * AP can enter deep sleep state. If not set, AP will always shutdown from
    * VehicleApPowerState#SHUTDOWN_PREPARE power state.
    */
   ENABLE_DEEP_SLEEP_FLAG = 0x1,
 
-  /*
+  /**
    * The power controller can power on AP from off state after timeout
    * specified in VehicleApPowerSet VEHICLE_AP_POWER_SET_SHUTDOWN_READY message.
    */
@@ -2075,19 +2075,19 @@
 };
 
 enum VehicleApPowerState : int32_t /* NOTE: type is guessed */ {
-  /* vehicle HAL will never publish this state to AP */
+  /** vehicle HAL will never publish this state to AP */
   OFF = 0,
 
-  /* vehicle HAL will never publish this state to AP */
+  /** vehicle HAL will never publish this state to AP */
   DEEP_SLEEP = 1,
 
-  /* AP is on but display must be off. */
+  /** AP is on but display must be off. */
   ON_DISP_OFF = 2,
 
-  /* AP is on with display on. This state allows full user interaction. */
+  /** AP is on with display on. This state allows full user interaction. */
   ON_FULL = 3,
 
-  /*
+  /**
    * The power controller has requested AP to shutdown. AP can either enter
    * sleep state or start full shutdown. AP can also request postponing
    * shutdown by sending VehicleApPowerSetState#SHUTDOWN_POSTPONE message. The
@@ -2100,30 +2100,30 @@
 };
 
 enum VehicleApPowerStateShutdownParam : int32_t {
-  /* AP must shutdown immediately. Postponing is not allowed. */
+  /** AP must shutdown immediately. Postponing is not allowed. */
   SHUTDOWN_IMMEDIATELY = 1,
 
-  /* AP can enter deep sleep instead of shutting down completely. */
+  /** AP can enter deep sleep instead of shutting down completely. */
   CAN_SLEEP = 2,
 
-  /* AP can only shutdown with postponing allowed. */
+  /** AP can only shutdown with postponing allowed. */
   SHUTDOWN_ONLY = 3,
 };
 
 enum VehicleApPowerSetState : int32_t /* NOTE: type is guessed */ {
-  /*
+  /**
    * AP has finished boot up, and can start shutdown if requested by power
    * controller.
    */
   BOOT_COMPLETE = 0x1,
 
-  /*
+  /**
    * AP is entering deep sleep state. How this state is implemented may vary
    * depending on each H/W, but AP's power must be kept in this state.
    */
   DEEP_SLEEP_ENTRY = 0x2,
 
-  /*
+  /**
    * AP is exiting from deep sleep state, and is in
    * VehicleApPowerState#SHUTDOWN_PREPARE state.
    * The power controller may change state to other ON states based on the
@@ -2131,7 +2131,7 @@
    */
   DEEP_SLEEP_EXIT = 0x3,
 
-  /*
+  /**
    * int32Values[1]: Time to postpone shutdown in ms. Maximum value can be
    *                 5000 ms.
    *                 If AP needs more time, it will send another POSTPONE
@@ -2139,7 +2139,7 @@
    */
   SHUTDOWN_POSTPONE = 0x4,
 
-  /*
+  /**
    * AP is starting shutting down. When system completes shutdown, everything
    * will stop in AP as kernel will stop all other contexts. It is
    * responsibility of vehicle HAL or lower level to synchronize that state
@@ -2158,7 +2158,7 @@
    */
   SHUTDOWN_START = 0x5,
 
-  /*
+  /**
    * User has requested to turn off headunit's display, which is detected in
    * android side.
    * The power controller may change the power state to
@@ -2166,7 +2166,7 @@
    */
   DISPLAY_OFF = 0x6,
 
-  /*
+  /**
    * User has requested to turn on headunit's display, most probably from power
    * key input which is attached to headunit. The power controller may change
    * the power state to VehicleApPowerState#ON_FULL.
@@ -2174,7 +2174,7 @@
   DISPLAY_ON = 0x7,
 };
 
-/*
+/**
  * Index in int32Values for VehicleProperty#AP_POWER_STATE property.
  */
 enum VehicleApPowerStateIndex : int32_t {
@@ -2182,23 +2182,23 @@
   ADDITIONAL = 1,
 };
 
-/*
+/**
  * Enum to represent bootup reason.
  */
 enum VehicleApPowerBootupReason : int32_t {
-  /*
+  /**
    * Power on due to user's pressing of power key or rotating of ignition
    * switch.
    */
   USER_POWER_ON = 0,
 
-  /*
+  /**
    * Automatic power on triggered by door unlock or any other kind of automatic
    * user detection.
    */
   USER_UNLOCK = 1,
 
-  /*
+  /**
    * Automatic power on triggered by timer. This only happens when AP has asked
    * wake-up after
    * certain time through time specified in
@@ -2208,40 +2208,40 @@
 };
 
 enum VehicleHwKeyInputAction : int32_t {
-  /* Key down */
+  /** Key down */
   ACTION_DOWN = 0,
 
-  /* Key up */
+  /** Key up */
   ACTION_UP = 1,
 };
 
 enum VehicleDisplay : int32_t {
-  /* center console */
+  /** center console */
   MAIN = 0,
 
   INSTRUMENT_CLUSTER = 1,
 };
 
-/*
+/**
  * Represents instrument cluster type available in system
  */
 enum VehicleInstrumentClusterType : int32_t {
-  /* Android has no access to instument cluster */
+  /** Android has no access to instument cluster */
   NONE = 0,
 
-  /*
+  /**
    * Instrument cluster can communicate through vehicle hal with additional
    * properties to exchange meta-data
    */
   HAL_INTERFACE = 1,
 
-  /*
+  /**
    * Instrument cluster is external display where android can render contents
    */
   EXTERNAL_DISPLAY = 2,
 };
 
-/*
+/**
  * Units used for int or float type with no attached enum types.
  */
 enum VehicleUnit : int32_t {
@@ -2263,17 +2263,17 @@
     YEAR           = 0x59,
 };
 
-  /*
+  /**
    * This describes how value of property can change.
    */
 enum VehiclePropertyChangeMode : int32_t {
-  /*
+  /**
    * Property of this type must never be changed. Subscription is not supported
    * for these properties.
    */
   STATIC = 0x00,
 
-  /*
+  /**
    * Property of this type must be reported when there is a change.
    * IVehicle#get call must return the current value.
    * Set operation for this property is assumed to be asynchronous. When the
@@ -2284,18 +2284,18 @@
    */
   ON_CHANGE = 0x01,
 
-  /*
+  /**
    * Property of this type change continuously and requires fixed rate of
    * sampling to retrieve the data.
    */
   CONTINUOUS = 0x02,
 
-  /*
+  /**
    * Property of this type may be polled to get the current value.
    */
   POLL = 0x03,
 
-  /*
+  /**
    * This is for property where change event must be sent only when the
    * value is set from external component. Normal value change must not trigger
    * event. For example, clock property can send change event only when it is
@@ -2305,7 +2305,7 @@
   ON_SET = 0x04,
 };
 
-/*
+/**
  * Property config defines the capabilities of it. User of the API
  * must first get the property config to understand the output from get()
  * commands and also to ensure that set() or events commands are in sync with
@@ -2319,7 +2319,7 @@
   READ_WRITE = 0x03,
 };
 
-/*
+/**
  * Car states.
  *
  * The driving states determine what features of the UI will be accessible.
@@ -2333,7 +2333,7 @@
   LIMIT_MESSAGE_LEN = 0x10,
 };
 
-/*
+/**
  * Various gears which can be selected by user and chosen in system.
  */
 enum VehicleGear: int32_t {
@@ -2353,7 +2353,7 @@
   GEAR_9 = 0x1000,
 };
 
-/*
+/**
  * Various zones in the car.
  *
  * Zones are used for Air Conditioning purposes and divide the car into physical
@@ -2379,7 +2379,7 @@
   WHOLE_CABIN = 0x80000000,
 };
 
-/*
+/**
  * Various Seats in the car.
  */
 enum VehicleAreaSeat : int32_t {
@@ -2394,7 +2394,7 @@
     ROW_3_RIGHT  = 0x0400
 };
 
-/*
+/**
  * Various windshields/windows in the car.
  */
 enum VehicleAreaWindow : int32_t {
@@ -2434,7 +2434,7 @@
 };
 
 struct VehicleAreaConfig {
-    /*
+    /**
      * Area id is ignored for VehiclePropertyGroup:GLOBAL properties.
      */
     int32_t areaId;
@@ -2450,32 +2450,32 @@
 };
 
 struct VehiclePropConfig {
-    /* Property identifier */
+    /** Property identifier */
     int32_t prop;
 
-    /*
+    /**
      * Defines if the property is read or write or both.
      */
     VehiclePropertyAccess access;
 
-    /*
+    /**
      * Defines the change mode of the property.
      */
     VehiclePropertyChangeMode changeMode;
 
-    /*
+    /**
      * Some of the properties may have associated areas (for example, some hvac
      * properties are associated with VehicleAreaZone), in these
      * cases the config may contain an ORed value for the associated areas.
      */
     int32_t supportedAreas;
 
-    /*
+    /**
      * Contains per-area configuration.
      */
     vec<VehicleAreaConfig> areaConfigs;
 
-    /*
+    /**
      * Configuration flags for this property.
      *
      * For example, it may store the number of presets that are stored by the
@@ -2483,70 +2483,70 @@
      */
     int32_t configFlags;
 
-    /* Contains additional configuration parameters */
+    /** Contains additional configuration parameters */
     vec<int32_t> configArray;
 
-    /*
+    /**
      * Some properties may require additional information passed over this
      * string. Most properties do not need to set this.
      */
     string configString;
 
-    /*
+    /**
      * Min sample rate in Hz.
      * Must be defined for VehiclePropertyChangeMode::CONTINUOUS
      */
     float minSampleRate;
 
-    /*
+    /**
      * Must be defined for VehiclePropertyChangeMode::CONTINUOUS
      * Max sample rate in Hz.
      */
     float maxSampleRate;
 };
 
-/*
+/**
  * Encapsulates the property name and the associated value. It
  * is used across various API calls to set values, get values or to register for
  * events.
  */
 struct VehiclePropValue {
-    /* Property identifier */
+    /** Property identifier */
     int32_t prop;
 
-    /* Time is elapsed nanoseconds since boot */
+    /** Time is elapsed nanoseconds since boot */
     int64_t timestamp;
 
-    /*
+    /**
      * Area type(s) for non-global property it must be one of the value from
      * VehicleArea* enums or 0 for global properties.
      */
     int32_t areaId;
 
-    /*
+    /**
      * Contains value for a single property. Depending on property data type of
      * this property (VehiclePropetyType) one field of this structure must be filled in.
      */
     struct RawValue {
-        /*
+        /**
          * This is used for properties of types VehiclePropertyType#INT
          * and VehiclePropertyType#INT_VEC
          */
         vec<int32_t> int32Values;
 
-        /*
+        /**
          * This is used for properties of types VehiclePropertyType#FLOAT
          * and VehiclePropertyType#FLOAT_VEC
          */
         vec<float> floatValues;
 
-        /* This is used for properties of type VehiclePropertyType#INT64 */
+        /** This is used for properties of type VehiclePropertyType#INT64 */
         vec<int64_t> int64Values;
 
-        /* This is used for properties of type VehiclePropertyType#BYTES */
+        /** This is used for properties of type VehiclePropertyType#BYTES */
         vec<uint8_t> bytes;
 
-        /* This is used for properties of type VehiclePropertyType#STRING */
+        /** This is used for properties of type VehiclePropertyType#STRING */
         string stringValue;
     };
 
@@ -2556,53 +2556,53 @@
 enum VehicleIgnitionState : int32_t {
     UNDEFINED = 0,
 
-    /* Steering wheel is locked */
+    /** Steering wheel is locked */
     LOCK = 1,
 
-     /*
+     /**
       * Steering wheel is not locked, engine and all accessories are OFF. If
       * car can be in LOCK and OFF state at the same time than HAL must report
       * LOCK state.
       */
     OFF,
 
-    /*
+    /**
      * Typically in this state accessories become available (e.g. radio).
      * Instrument cluster and engine are turned off
      */
     ACC,
 
-    /*
+    /**
      * Ignition is in state ON. Accessories and instrument cluster available,
      * engine might be running or ready to be started.
      */
     ON,
 
-    /* Typically in this state engine is starting (cranking). */
+    /** Typically in this state engine is starting (cranking). */
     START
 };
 
 
-/*
+/**
  * Represent the operation where the current error has happened.
  */
 enum VehiclePropertyOperation : int32_t {
-    /*
+    /**
      * Generic error to this property which is not tied to any operation.
      */
     GENERIC = 0,
 
-    /*
+    /**
      * Error happened while handling property set.
      */
     SET = 1,
 
-    /*
+    /**
      * Error happened while handling property get.
      */
     GET = 2,
 
-    /*
+    /**
      * Error happened while handling property subscription.
      */
     SUBSCRIBE = 3,
@@ -2612,13 +2612,13 @@
 enum SubscribeFlags : int32_t {
   UNDEFINED = 0x0,
 
-  /*
+  /**
    * Subscribe to event that was originated in vehicle HAL
    * (most likely this event came from the vehicle itself).
    */
   HAL_EVENT = 0x1,
 
-  /*
+  /**
    * Use this flag to subscribe on events when IVehicle#set(...) was called by
    * vehicle HAL's client (e.g. Car Service).
    */
@@ -2627,20 +2627,20 @@
   DEFAULT = HAL_EVENT,
 };
 
-/*
+/**
  * Encapsulates information about subscription to vehicle property events.
  */
 struct SubscribeOptions {
-  /* Property to subscribe */
+  /** Property to subscribe */
   int32_t propId;
 
-  /*
+  /**
    * Area ids - this must be a bit mask of areas to subscribe or 0 to subscribe
    * to all areas.
    */
   int32_t vehicleAreas;
 
-  /*
+  /**
    * Sample rate in Hz.
    *
    * Must be provided for properties with
@@ -2651,31 +2651,31 @@
    */
   float sampleRate;
 
-  /* Flags that indicate what kind of events listen to. */
+  /** Flags that indicate what kind of events listen to. */
   SubscribeFlags flags;
 };
 
-/* Error codes used in vehicle HAL interface. */
+/** Error codes used in vehicle HAL interface. */
 enum StatusCode : int32_t {
   OK = 0,
 
-  /* Try again. */
+  /** Try again. */
   TRY_AGAIN = 1,
 
-  /* Invalid argument provided. */
+  /** Invalid argument provided. */
   INVALID_ARG = 2,
 
-  /*
+  /**
    * This code must be returned when device that associated with the vehicle
    * property is not available. For example, when client tries to set HVAC
    * temperature when the whole HVAC unit is turned OFF.
    */
   NOT_AVAILABLE = 3,
 
-  /* Access denied */
+  /** Access denied */
   ACCESS_DENIED = 4,
 
-  /* Something unexpected has happened in Vehicle HAL */
+  /** Something unexpected has happened in Vehicle HAL */
   INTERNAL_ERROR = 5,
 };
 
diff --git a/automotive/vehicle/2.1/IVehicle.hal b/automotive/vehicle/2.1/IVehicle.hal
index 5b6a23f..a22d1e6 100644
--- a/automotive/vehicle/2.1/IVehicle.hal
+++ b/automotive/vehicle/2.1/IVehicle.hal
@@ -18,7 +18,7 @@
 
 import android.hardware.automotive.vehicle@2.0;
 
-/*
+/**
  * New revision of IVehicle interface that supports properties defined in
  * VehicleProperty enum version 2.1.
  *
diff --git a/automotive/vehicle/2.1/types.hal b/automotive/vehicle/2.1/types.hal
index 9b219b2..08dc144 100644
--- a/automotive/vehicle/2.1/types.hal
+++ b/automotive/vehicle/2.1/types.hal
@@ -18,11 +18,11 @@
 
 import android.hardware.automotive.vehicle@2.0;
 
-/*
+/**
  * Extension of VehicleProperty enum declared in Vehicle HAL 2.0
  */
 enum VehicleProperty: @2.0::VehicleProperty {
-    /*
+    /**
      * Reports wheel rotational distance in meters since last wheel tick
      * event
      *
@@ -44,7 +44,7 @@
       | VehiclePropertyType:FLOAT_VEC
       | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * OBD2 Live Sensor Data
      *
      * This property uses COMPLEX data to send a snapshot of the current (live)
@@ -84,7 +84,7 @@
       | VehiclePropertyType:COMPLEX
       | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * OBD2 Freeze Frame Sensor Data
      *
      * This property uses COMPLEX data to send a snapshot of the values of the
@@ -132,7 +132,7 @@
       | VehiclePropertyType:COMPLEX
       | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * OBD2 Freeze Frame Information
      *
      * This property describes the current freeze frames stored in vehicle
@@ -153,7 +153,7 @@
       | VehiclePropertyType:COMPLEX
       | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * OBD2 Freeze Frame Clear
      *
      * This property allows deletion of any of the freeze frames stored in
@@ -175,7 +175,7 @@
       | VehiclePropertyType:COMPLEX
       | VehicleArea:GLOBAL),
 
-    /*
+    /**
      * Vehicle Maps Service (VMS) message
      *
      * This property uses COMPLEX data to communicate vms messages.
@@ -196,7 +196,7 @@
         | VehicleArea:GLOBAL),
 };
 
-/* The status of a fuel system as described by the OBD2 specification. */
+/** The status of a fuel system as described by the OBD2 specification. */
 enum FuelSystemStatus : int32_t {
   OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
 
@@ -209,14 +209,14 @@
   CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
 };
 
-/* Defines which ignition monitors are available to be read. */
+/** Defines which ignition monitors are available to be read. */
 enum IgnitionMonitorKind : int32_t {
   SPARK = 0,
 
   COMPRESSION = 1,
 };
 
-/* These ignition monitors are common to both SPARK and COMPRESSION. */
+/** These ignition monitors are common to both SPARK and COMPRESSION. */
 enum CommonIgnitionMonitors : int32_t {
   COMPONENTS_AVAILABLE = 0x1 << 0,
   COMPONENTS_INCOMPLETE = 0x1 << 1,
@@ -228,7 +228,7 @@
   MISFIRE_INCOMPLETE = 0x1 << 5,
 };
 
-/* Ignition monitors available for SPARK vehicles. */
+/** Ignition monitors available for SPARK vehicles. */
 enum SparkIgnitionMonitors : CommonIgnitionMonitors {
   EGR_AVAILABLE = 0x1 << 6,
   EGR_INCOMPLETE = 0x1 << 7,
@@ -255,7 +255,7 @@
   CATALYST_INCOMPLETE = 0x1 << 21,
 };
 
-/* Ignition monitors only available for COMPRESSION vehicles. */
+/** Ignition monitors only available for COMPRESSION vehicles. */
 enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
   EGR_OR_VVT_AVAILABLE = 0x1 << 6,
   EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
@@ -336,7 +336,7 @@
   BIFUEL_RUNNING_DIESEL = 23,
 };
 
-/*
+/**
  * This enum provides the canonical mapping for sensor properties that have an integer value.
  * The ordering of the values is taken from the OBD2 specification.
  * Some of the properties are represented as an integer mapping to another enum. In those cases
@@ -344,15 +344,15 @@
  * Any value greater than the last reserved index is available to vendors to map their extensions.
  */
 enum Obd2IntegerSensorIndex : int32_t {
-  /* refer to FuelSystemStatus for a description of this value. */
+  /** refer to FuelSystemStatus for a description of this value. */
   FUEL_SYSTEM_STATUS = 0,
 
   MALFUNCTION_INDICATOR_LIGHT_ON = 1,
 
-  /* refer to IgnitionMonitorKind for a description of this value. */
+  /** refer to IgnitionMonitorKind for a description of this value. */
   IGNITION_MONITORS_SUPPORTED = 2,
 
-  /*
+  /**
    * The value of this sensor is a bitmask that specifies whether ignition-specific
    * tests are available and whether they are complete. The semantics of the individual
    * bits in this value are given by, respectively, SparkIgnitionMonitors and
@@ -362,7 +362,7 @@
 
   INTAKE_AIR_TEMPERATURE = 4,
 
-  /* refer to SecondaryAirStatus for a description of this value. */
+  /** refer to SecondaryAirStatus for a description of this value. */
   COMMANDED_SECONDARY_AIR_STATUS = 5,
 
   NUM_OXYGEN_SENSORS_PRESENT = 6,
@@ -395,7 +395,7 @@
 
   MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
 
-  /* refer to FuelType for a description of this value. */
+  /** refer to FuelType for a description of this value. */
   FUEL_TYPE = 21,
 
   FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
@@ -421,7 +421,7 @@
   LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
 };
 
-/*
+/**
  * This enum provides the canonical mapping for sensor properties that have a floating-point value.
  * The ordering of the values is taken from the OBD2 specification.
  * Any value greater than the last reserved index is available to vendors to map their extensions.
@@ -572,34 +572,34 @@
   LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
 };
 
-/*
+/**
  * This enum lists the types of supported VMS messages.
  */
 enum VmsMessageType : int32_t {
-  /* A client subscribes to a layer. */
+  /** A client subscribes to a layer. */
   SUBSCRIBE = 1,
 
-  /* A client unsubscribes from a layer. */
+  /** A client unsubscribes from a layer. */
   UNSUBSCRIBE = 2,
 
-  /* A client publishes a data packet. */
+  /** A client publishes a data packet. */
   DATA = 3,
 };
 
-/*
+/**
  * This enum provides the canonical mapping for VMS properties that have an
  * integer value.
  */
 enum VmsMessageIntegerValuesIndex : int32_t {
-  /* The message type as enumerated by VmsMessageType enum. */
+  /** The message type as enumerated by VmsMessageType enum. */
   VMS_MESSAGE_TYPE = 0,
 
-  /* The layer ID as defined in the vms protocol. */
+  /** The layer ID as defined in the vms protocol. */
   VMS_LAYER_ID = 1,
 
-  /* The version of the VMS layer. */
+  /** The version of the VMS layer. */
   VMS_LAYER_VERSION = 2,
 
-  /* The number of bytes in the payload */
+  /** The number of bytes in the payload */
   VMS_PAYLOAD_SIZE_BYTES = 3,
 };
diff --git a/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal b/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal
index 0b92848..14f3005 100644
--- a/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal
+++ b/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal
@@ -19,7 +19,7 @@
 import IBiometricsFingerprintClientCallback;
 
 interface IBiometricsFingerprint {
-  /*
+  /**
    * Set notification callback:
    * Registers a user function that must receive notifications from the HAL
    * This call must block if the HAL state machine is in busy state until HAL
@@ -32,7 +32,7 @@
   setNotify(IBiometricsFingerprintClientCallback clientCallback)
       generates (uint64_t deviceId);
 
-  /*
+  /**
    * Fingerprint pre-enroll enroll request:
    * Generates a unique token to upper layers to indicate the start of
    * an enrollment transaction. pre-enroll and post-enroll specify
@@ -47,7 +47,7 @@
   @callflow(next={"enroll", "postEnroll"})
   preEnroll() generates (uint64_t authChallenge);
 
-  /*
+  /**
    * Fingerprint enroll request:
    * Switches the HAL state machine to collect and store a new fingerprint
    * template. Switches back as soon as enroll is complete, signalled by
@@ -69,7 +69,7 @@
   enroll(uint8_t[69] hat, uint32_t gid, uint32_t timeoutSec)
       generates (RequestStatus debugErrno);
 
-  /*
+  /**
    * Finishes the enroll operation and invalidates the preEnroll() generated
    * challenge. This must be called at the end of a multi-finger enrollment
    * session to indicate that no more fingers may be added.
@@ -79,7 +79,7 @@
   @callflow(next={"authenticate", "setActiveGroup", "enumerate", "remove"})
   postEnroll() generates (RequestStatus debugErrno);
 
-  /*
+  /**
    * getAuthenticatorId:
    * Returns a token associated with the current fingerprint set. This value
    * must change whenever a new fingerprint is enrolled, thus creating a new
@@ -91,7 +91,7 @@
   @callflow(next={"authenticate"})
   getAuthenticatorId() generates (uint64_t AuthenticatorId);
 
-  /*
+  /**
    * Cancel pending enroll or authenticate, sending FINGERPRINT_ERROR_CANCELED
    * to all running clients. Switches the HAL state machine back to the idle
    * state. Unlike enrollDone() doesn't invalidate the preEnroll() challenge.
@@ -102,7 +102,7 @@
     "setActiveGroup"})
   cancel() generates (RequestStatus debugErrno);
 
-  /*
+  /**
    * Enumerate all the fingerprint templates found in the directory set by
    * setActiveGroup():
    * For each template found a notify() must be called with:
@@ -116,7 +116,7 @@
   @callflow(next={"remove", "enroll", "authenticate", "setActiveGroup"})
   enumerate() generates (RequestStatus debugErrno);
 
-  /*
+  /**
    * Fingerprint remove request:
    * Deletes fingerprint template(s).
    * Works only within the path set by setActiveGroup().
@@ -136,7 +136,7 @@
     "setActiveGroup"})
   remove(uint32_t gid, uint32_t fid) generates (RequestStatus debugErrno);
 
-  /*
+  /**
    * Restricts the HAL operation to a set of fingerprints belonging to a group
    * provided. The caller must provide a path to a storage location within the
    * user's data directory.
@@ -150,7 +150,7 @@
   setActiveGroup(uint32_t gid, string storePath)
       generates (RequestStatus debugErrno);
 
-  /*
+  /**
    * Authenticates an operation identified by operationId
    *
    * @param operationId operation id.
diff --git a/biometrics/fingerprint/2.1/types.hal b/biometrics/fingerprint/2.1/types.hal
index e389773..7402085 100644
--- a/biometrics/fingerprint/2.1/types.hal
+++ b/biometrics/fingerprint/2.1/types.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.biometrics.fingerprint@2.1;
 
-/*
+/**
  * Request status indicates whether the request is accepted by the vendor
  * implementation or not. These values are taken from the errno set,
  * except for the SYS_UNKNOWN
@@ -37,7 +37,7 @@
   SYS_ETIMEDOUT = -110,
 };
 
-/*
+/**
  * Fingerprint errors are meant to tell the framework to terminate the current
  * operation and ask for the user to correct the situation. These will almost
  * always result in messaging and user interaction to correct the problem.
@@ -49,27 +49,27 @@
  * followed by ERROR_CANCELED.
  */
 enum FingerprintError : int32_t {
-  /* Used for testing, no error returned */
+  /** Used for testing, no error returned */
   ERROR_NO_ERROR = 0,
-  /* The hardware has an error that can't be resolved. */
+  /** The hardware has an error that can't be resolved. */
   ERROR_HW_UNAVAILABLE = 1,
-  /* Bad data; operation can't continue */
+  /** Bad data; operation can't continue */
   ERROR_UNABLE_TO_PROCESS = 2,
-  /* The operation has timed out waiting for user input. */
+  /** The operation has timed out waiting for user input. */
   ERROR_TIMEOUT = 3,
-  /* No space available to store a template */
+  /** No space available to store a template */
   ERROR_NO_SPACE = 4,
-  /* The current operation has been canceled */
+  /** The current operation has been canceled */
   ERROR_CANCELED = 5,
-  /* Unable to remove a template */
+  /** Unable to remove a template */
   ERROR_UNABLE_TO_REMOVE = 6,
-  /* The hardware is in lockout due to too many attempts */
+  /** The hardware is in lockout due to too many attempts */
   ERROR_LOCKOUT = 7,
-  /* Vendor-specific error message */
+  /** Vendor-specific error message */
   ERROR_VENDOR = 8
 };
 
-/*
+/**
  * Fingerprint acquisition info is meant as feedback for the current operation.
  * Anything but ACQUIRED_GOOD must be shown to the user as feedback on how to
  * take action on the current operation. For example, ACQUIRED_IMAGER_DIRTY may
@@ -80,41 +80,43 @@
  */
 enum FingerprintAcquiredInfo : int32_t {
   ACQUIRED_GOOD = 0,
-  /* sensor needs more data, i.e. longer swipe. */
+  /** sensor needs more data, i.e. longer swipe. */
   ACQUIRED_PARTIAL = 1,
-  /* image doesn't contain enough detail for recognition*/
+  /**
+   * image doesn't contain enough detail for recognition*/
   ACQUIRED_INSUFFICIENT = 2,
-  /* sensor needs to be cleaned */
+  /** sensor needs to be cleaned */
   ACQUIRED_IMAGER_DIRTY = 3,
-  /* mostly swipe-type sensors; not enough data collected */
+  /** mostly swipe-type sensors; not enough data collected */
   ACQUIRED_TOO_SLOW = 4,
-  /* vendor-specific acquisition messages start here */
+  /** vendor-specific acquisition messages start here */
   ACQUIRED_TOO_FAST = 5,
-  /* vendor-specific acquisition messages */
+  /** vendor-specific acquisition messages */
   ACQUIRED_VENDOR = 6
 };
 
 struct FingerprintFingerId {
-  /* Group ID */
+  /** Group ID */
   uint32_t gid;
-  /* Fingerprint template ID */
+  /** Fingerprint template ID */
   uint32_t fid;
 };
 
 struct FingerprintEnroll {
-  /* Template ID */
+  /** Template ID */
   FingerprintFingerId finger;
-  /* samplesRemaining goes from N (no data collected, but N scans needed)
+  /**
+   * samplesRemaining goes from N (no data collected, but N scans needed)
    * to 0 (no more data is needed to build a template). */
   uint32_t samplesRemaining;
-  /* Vendor specific message. Used for user guidance */
+  /** Vendor specific message. Used for user guidance */
   uint64_t msg;
 };
 
 struct FingerprintIterator {
-  /* Template ID */
+  /** Template ID */
   FingerprintFingerId finger;
-  /* How many templates remain to iterate through */
+  /** How many templates remain to iterate through */
   uint32_t remainingTemplates;
 };
 
@@ -122,18 +124,18 @@
 typedef FingerprintIterator FingerprintRemoved;
 
 struct FingerprintAcquired {
-  /* information about the image */
+  /** information about the image */
   FingerprintAcquiredInfo acquiredInfo;
 };
 
 struct FingerprintAuthenticated {
-  /* Matched template ID */
+  /** Matched template ID */
   FingerprintFingerId finger;
-  /* Authentication result from the keymaster */
+  /** Authentication result from the keymaster */
   uint8_t[69] hat;
 };
 
-/* Run time type identification for the notify() call payload. */
+/** Run time type identification for the notify() call payload. */
 enum FingerprintMsgType : int32_t {
   ERROR = -1,
   ACQUIRED = 1,
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index 9a4efae..6156553 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -23,9 +23,8 @@
 #include <hardware/bluetooth.h>
 #include <utils/Log.h>
 
+#include <VtsHalHidlTargetCallbackBase.h>
 #include <VtsHalHidlTargetTestBase.h>
-#include <condition_variable>
-#include <mutex>
 #include <queue>
 
 using ::android::hardware::bluetooth::V1_0::IBluetoothHci;
@@ -92,6 +91,11 @@
 #define ACL_BROADCAST_ACTIVE_SLAVE (0x1 << 4)
 #define ACL_PACKET_BOUNDARY_COMPLETE (0x3 << 6)
 
+constexpr char kCallbackNameAclEventReceived[] = "aclDataReceived";
+constexpr char kCallbackNameHciEventReceived[] = "hciEventReceived";
+constexpr char kCallbackNameInitializationComplete[] = "initializationComplete";
+constexpr char kCallbackNameScoEventReceived[] = "scoDataReceived";
+
 class ThroughputLogger {
  public:
   ThroughputLogger(std::string task)
@@ -121,7 +125,8 @@
  public:
   virtual void SetUp() override {
     // currently test passthrough mode only
-    bluetooth = ::testing::VtsHalHidlTargetTestBase::getService<IBluetoothHci>();
+    bluetooth =
+        ::testing::VtsHalHidlTargetTestBase::getService<IBluetoothHci>();
     ASSERT_NE(bluetooth, nullptr);
     ALOGI("%s: getService() for bluetooth is %s", __func__,
           bluetooth->isRemote() ? "remote" : "local");
@@ -135,10 +140,6 @@
     max_sco_data_packets = 0;
 
     initialized = false;
-    initialized_count = 0;
-    event_count = 0;
-    acl_count = 0;
-    sco_count = 0;
     event_cb_count = 0;
     acl_cb_count = 0;
     sco_cb_count = 0;
@@ -146,7 +147,18 @@
     ASSERT_EQ(initialized, false);
     bluetooth->initialize(bluetooth_cb);
 
-    wait_for_init_callback();
+    bluetooth_cb->SetWaitTimeout(kCallbackNameInitializationComplete,
+                                 WAIT_FOR_INIT_TIMEOUT);
+    bluetooth_cb->SetWaitTimeout(kCallbackNameHciEventReceived,
+                                 WAIT_FOR_HCI_EVENT_TIMEOUT);
+    bluetooth_cb->SetWaitTimeout(kCallbackNameAclEventReceived,
+                                 WAIT_FOR_ACL_DATA_TIMEOUT);
+    bluetooth_cb->SetWaitTimeout(kCallbackNameScoEventReceived,
+                                 WAIT_FOR_SCO_DATA_TIMEOUT);
+
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameInitializationComplete)
+            .first);
 
     ASSERT_EQ(initialized, true);
   }
@@ -171,82 +183,10 @@
   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);
-    event_count++;
-    event_condition.notify_one();
-  }
-
-  // Test code calls this function to wait for an event callback
-  inline void wait_for_event() {
-    std::unique_lock<std::mutex> lock(event_mutex);
-
-    auto start_time = std::chrono::steady_clock::now();
-    while (event_count == 0)
-      if (event_condition.wait_until(lock,
-                                     start_time + WAIT_FOR_HCI_EVENT_TIMEOUT) ==
-          std::cv_status::timeout)
-        return;
-    event_count--;
-  }
-
-  // Inform the test about an acl data callback
-  inline void notify_acl_data_received() {
-    std::unique_lock<std::mutex> lock(acl_mutex);
-    acl_count++;
-    acl_condition.notify_one();
-  }
-
-  // Test code calls this function to wait for an acl data callback
-  inline void wait_for_acl() {
-    std::unique_lock<std::mutex> lock(acl_mutex);
-
-    while (acl_count == 0)
-      acl_condition.wait_until(
-          lock, std::chrono::steady_clock::now() + WAIT_FOR_ACL_DATA_TIMEOUT);
-    acl_count--;
-  }
-
-  // Inform the test about a sco data callback
-  inline void notify_sco_data_received() {
-    std::unique_lock<std::mutex> lock(sco_mutex);
-    sco_count++;
-    sco_condition.notify_one();
-  }
-
-  // Test code calls this function to wait for a sco data callback
-  inline void wait_for_sco() {
-    std::unique_lock<std::mutex> lock(sco_mutex);
-
-    while (sco_count == 0)
-      sco_condition.wait_until(
-          lock, std::chrono::steady_clock::now() + WAIT_FOR_SCO_DATA_TIMEOUT);
-    sco_count--;
-  }
-
   // A simple test implementation of BluetoothHciCallbacks.
-  class BluetoothHciCallbacks : public IBluetoothHciCallbacks {
+  class BluetoothHciCallbacks
+      : public ::testing::VtsHalHidlTargetCallbackBase<BluetoothHidlTest>,
+        public IBluetoothHciCallbacks {
     BluetoothHidlTest& parent_;
 
    public:
@@ -256,7 +196,7 @@
 
     Return<void> initializationComplete(Status status) override {
       parent_.initialized = (status == Status::SUCCESS);
-      parent_.notify_initialized();
+      NotifyFromCallback(kCallbackNameInitializationComplete);
       ALOGV("%s (status = %d)", __func__, static_cast<int>(status));
       return Void();
     };
@@ -265,7 +205,7 @@
         const ::android::hardware::hidl_vec<uint8_t>& event) override {
       parent_.event_cb_count++;
       parent_.event_queue.push(event);
-      parent_.notify_event_received();
+      NotifyFromCallback(kCallbackNameHciEventReceived);
       ALOGV("Event received (length = %d)", static_cast<int>(event.size()));
       return Void();
     };
@@ -274,7 +214,7 @@
         const ::android::hardware::hidl_vec<uint8_t>& data) override {
       parent_.acl_cb_count++;
       parent_.acl_queue.push(data);
-      parent_.notify_acl_data_received();
+      NotifyFromCallback(kCallbackNameAclEventReceived);
       return Void();
     };
 
@@ -282,13 +222,13 @@
         const ::android::hardware::hidl_vec<uint8_t>& data) override {
       parent_.sco_cb_count++;
       parent_.sco_queue.push(data);
-      parent_.notify_sco_data_received();
+      NotifyFromCallback(kCallbackNameScoEventReceived);
       return Void();
     };
   };
 
   sp<IBluetoothHci> bluetooth;
-  sp<IBluetoothHciCallbacks> bluetooth_cb;
+  sp<BluetoothHciCallbacks> bluetooth_cb;
   std::queue<hidl_vec<uint8_t>> event_queue;
   std::queue<hidl_vec<uint8_t>> acl_queue;
   std::queue<hidl_vec<uint8_t>> sco_queue;
@@ -303,20 +243,6 @@
   int max_sco_data_packet_length;
   int max_acl_data_packets;
   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;
 };
 
 // A class for test environment setup (kept since this file is a template).
@@ -334,7 +260,8 @@
   int status_event_count = 0;
   hidl_vec<uint8_t> event;
   do {
-    wait_for_event();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
     EXPECT_LT(static_cast<size_t>(0), event_queue.size());
     if (event_queue.size() == 0) {
       event.resize(0);
@@ -366,7 +293,8 @@
   hidl_vec<uint8_t> cmd = COMMAND_HCI_READ_BUFFER_SIZE;
   bluetooth->sendHciCommand(cmd);
 
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
 
   EXPECT_LT(static_cast<size_t>(0), event_queue.size());
   if (event_queue.size() == 0) return;
@@ -420,7 +348,8 @@
     bluetooth->sendHciCommand(cmd);
 
     // Check the loopback of the HCI packet
-    wait_for_event();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
     hidl_vec<uint8_t> event = event_queue.front();
     event_queue.pop();
     size_t compare_length =
@@ -456,7 +385,8 @@
     bluetooth->sendScoData(sco_vector);
 
     // Check the loopback of the SCO packet
-    wait_for_sco();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameScoEventReceived).first);
     hidl_vec<uint8_t> sco_loopback = sco_queue.front();
     sco_queue.pop();
 
@@ -501,7 +431,8 @@
     bluetooth->sendAclData(acl_vector);
 
     // Check the loopback of the ACL packet
-    wait_for_acl();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameAclEventReceived).first);
     hidl_vec<uint8_t> acl_loopback = acl_queue.front();
     acl_queue.pop();
 
@@ -527,7 +458,8 @@
 
 // Return the number of completed packets reported by the controller.
 int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) {
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
   int packets_processed = 0;
   while (event_queue.size() > 0) {
     hidl_vec<uint8_t> event = event_queue.front();
@@ -554,7 +486,8 @@
   int connection_event_count = 0;
   hidl_vec<uint8_t> event;
   do {
-    wait_for_event();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
     event = event_queue.front();
     event_queue.pop();
     EXPECT_GT(event.size(),
@@ -592,7 +525,7 @@
 }
 
 // Empty test: Initialize()/Close() are called in SetUp()/TearDown().
-TEST_F(BluetoothHidlTest, InitializeAndClose) { }
+TEST_F(BluetoothHidlTest, InitializeAndClose) {}
 
 // Send an HCI Reset with sendHciCommand and wait for a command complete event.
 TEST_F(BluetoothHidlTest, HciReset) {
@@ -607,7 +540,8 @@
   hidl_vec<uint8_t> cmd = COMMAND_HCI_READ_LOCAL_VERSION_INFORMATION;
   bluetooth->sendHciCommand(cmd);
 
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
 
   hidl_vec<uint8_t> event = event_queue.front();
   event_queue.pop();
@@ -627,7 +561,8 @@
   hidl_vec<uint8_t> cmd = COMMAND_HCI_SHOULD_BE_UNKNOWN;
   bluetooth->sendHciCommand(cmd);
 
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
 
   hidl_vec<uint8_t> event = event_queue.front();
   event_queue.pop();
diff --git a/broadcastradio/1.0/IBroadcastRadio.hal b/broadcastradio/1.0/IBroadcastRadio.hal
index c7fe62d..f599b10 100644
--- a/broadcastradio/1.0/IBroadcastRadio.hal
+++ b/broadcastradio/1.0/IBroadcastRadio.hal
@@ -21,7 +21,7 @@
 
 interface IBroadcastRadio {
 
-    /*
+    /**
      * Retrieve implementation properties.
      * @return result Operation completion status: OK in case of success,
      *                NOT_INITIALIZED in case of initialization error.
@@ -30,7 +30,7 @@
      */
     getProperties() generates (Result result, Properties properties);
 
-    /*
+    /**
      * Open a tuner interface for the requested configuration.
      * If no other tuner is opened, this will power on the radio hardware.
      * The hardware must be powered down when all tuner interface are released.
diff --git a/broadcastradio/1.0/IBroadcastRadioFactory.hal b/broadcastradio/1.0/IBroadcastRadioFactory.hal
index 82a97c4..ae82b07 100644
--- a/broadcastradio/1.0/IBroadcastRadioFactory.hal
+++ b/broadcastradio/1.0/IBroadcastRadioFactory.hal
@@ -20,7 +20,7 @@
 
 interface IBroadcastRadioFactory {
 
-    /*
+    /**
      * Connects to a broadcast radio HAL module for a given class
      * (AM/FM, Satellite, DAB).
      *
diff --git a/broadcastradio/1.0/ITuner.hal b/broadcastradio/1.0/ITuner.hal
index ae4b284..abbbd7a 100644
--- a/broadcastradio/1.0/ITuner.hal
+++ b/broadcastradio/1.0/ITuner.hal
@@ -20,7 +20,7 @@
 
 interface ITuner {
 
-    /*
+    /**
      * Apply current radio band configuration (band, range, channel spacing...).
      * Automatically cancels pending scan, step or tune.
      * ITunerCallback.configChange() method MUST be called once the
@@ -33,7 +33,7 @@
      */
     setConfiguration(BandConfig config) generates(Result result);
 
-    /*
+    /**
      * Retrieve current radio band configuration.
      * @return result OK if valid configuration is returned,
      *                NOT_INITIALIZED in case of initialization error.
@@ -41,7 +41,7 @@
      */
     getConfiguration() generates(Result result, BandConfig config);
 
-    /*
+    /**
      * Start scanning up to next valid station.
      * Shall be called only when a valid configuration has been applied.
      * Automatically cancels pending scan, step or tune.
@@ -57,7 +57,7 @@
      */
     scan(Direction direction, bool skipSubChannel) generates(Result result);
 
-    /*
+    /**
      * Move one channel spacing up or down.
      * Must be called when a valid configuration has been applied.
      * Automatically cancels pending scan, step or tune.
@@ -73,7 +73,7 @@
      */
     step(Direction direction, bool skipSubChannel) generates(Result result);
 
-    /*
+    /**
      * Tune to specified channel.
      * Must be called when a valid configuration has been applied.
      * Automatically cancels pending scan, step or tune.
@@ -91,7 +91,7 @@
      */
     tune(uint32_t channel, uint32_t subChannel) generates(Result result);
 
-    /*
+    /**
      * Cancel a scan, step or tune operation.
      * Shall be called only while a scan, step or tune operation is pending.
      * ITunerCallback.tuneComplete() MUST NOT be sent by the HAL.
@@ -101,7 +101,7 @@
      */
     cancel() generates(Result result);
 
-    /*
+    /**
      * Retrieve current station information.
      * @return result OK if scan successfully started
      *                NOT_INITIALIZED if another error occurs
diff --git a/broadcastradio/1.0/ITunerCallback.hal b/broadcastradio/1.0/ITunerCallback.hal
index a7e1260..0966ff4 100644
--- a/broadcastradio/1.0/ITunerCallback.hal
+++ b/broadcastradio/1.0/ITunerCallback.hal
@@ -19,13 +19,13 @@
 
 interface ITunerCallback {
 
-    /*
+    /**
      * Method called by the HAL when a HW failure occurs.
      * The framework MUST close the ITuner interface and open a new one.
      */
     oneway hardwareFailure();
 
-    /*
+    /**
      * Method called by the HAL when a new configuration is applied
      * in response to IDevice.openTuner() or ITuner.setConfiguration().
      * @param result OK if the configuration has been applied,
@@ -35,7 +35,7 @@
      */
     oneway configChange(Result result, BandConfig config);
 
-    /*
+    /**
      * Method called by the HAL when a tuning operation completes
      * following a step(), scan() or tune() command.
      * @param result OK if tune succeeded or TIMEOUT in case of time out.
@@ -43,33 +43,33 @@
      */
     oneway tuneComplete(Result result, ProgramInfo info);
 
-    /*
+    /**
      * Method called by the HAL when a frequency switch occurs.
      * @param info A ProgramInfo structure describing the new tuned station.
      */
     oneway afSwitch(ProgramInfo info);
 
-    /*
+    /**
      * Method called by the HAL when the antenna connection state changes.
      * @param connected True if the antenna is connected, false otherwise.
      */
     oneway antennaStateChange(bool connected);
 
-    /*
+    /**
      * Method called by the HAL when a traffic announcement starts or
      * stops.
      * @param active True if the announcement starts, false if it stops.
      */
     oneway trafficAnnouncement(bool active);
 
-    /*
+    /**
      * Method called by the HAL when an emergency announcement starts
      * or stops.
      * @param active True if the announcement starts, false if it stops.
      */
     oneway emergencyAnnouncement(bool active);
 
-    /*
+    /**
      * Method called by the HAL when metadata for current station
      * are updated.
      * @param channel The channel the metadata is associated with.
@@ -77,4 +77,4 @@
      * @param metadata A list of all updated metada.
      */
     oneway newMetadata(uint32_t channel, uint32_t subChannel, vec<MetaData>  metadata);
-};
\ No newline at end of file
+};
diff --git a/broadcastradio/1.0/types.hal b/broadcastradio/1.0/types.hal
index d8b2da3..045231d 100644
--- a/broadcastradio/1.0/types.hal
+++ b/broadcastradio/1.0/types.hal
@@ -24,33 +24,33 @@
     TIMEOUT,
 };
 
-/*
+/**
  * Radio hardware module class. A given radio hardware module HAL is of one
  * class only. The platform can not have more than one hardware module of
  * each class. Current version of the framework only supports RADIO_CLASS_AM_FM.
  */
 enum Class : uint32_t {
-    /* FM (including HD radio) and AM */
+    /** FM (including HD radio) and AM */
     AM_FM = 0,
-    /* Satellite Radio */
+    /** Satellite Radio */
     SAT   = 1,
-    /* Digital Radio (DAB) */
+    /** Digital Radio (DAB) */
     DT    = 2,
 };
 
-/* value for field "type" of radio band described in struct radio_hal_band_config */
+/** value for field "type" of radio band described in struct radio_hal_band_config */
 enum Band : uint32_t {
-    /* Amplitude Modulation band: LW, MW, SW */
+    /** Amplitude Modulation band: LW, MW, SW */
     AM     = 0,
-    /* Frequency Modulation band: FM */
+    /** Frequency Modulation band: FM */
     FM     = 1,
-    /* FM HD Radio / DRM (IBOC) */
+    /** FM HD Radio / DRM (IBOC) */
     FM_HD  = 2,
-    /* AM HD Radio / DRM (IBOC) */
+    /** AM HD Radio / DRM (IBOC) */
     AM_HD  = 3,
 };
 
-/* RDS variant implemented. A struct FmBandConfig can list none or several. */
+/** RDS variant implemented. A struct FmBandConfig can list none or several. */
 enum Rds : uint32_t {
     NONE   = 0,
     WORLD  = (1<<0),
@@ -65,35 +65,35 @@
     D75   = (1<<1),
 };
 
-/* Scanning direction for scan() and step() tuner APIs */
+/** Scanning direction for scan() and step() tuner APIs */
 enum Direction : uint32_t {
     UP,
     DOWN
 };
 
-/* Unique handle allocated to a radio module */
+/** Unique handle allocated to a radio module */
 typedef uint32_t Handle;
 
 
-/* Additional attributes for an FM band configuration */
+/** Additional attributes for an FM band configuration */
 struct FmBandConfig {
-    /* deemphasis variant */
+    /** deemphasis variant */
     Deemphasis deemphasis;
-    /* stereo supported */
+    /** stereo supported */
     bool       stereo;
-    /* RDS variants supported */
+    /** RDS variants supported */
     Rds        rds;
-    /* Traffic Announcement supported */
+    /** Traffic Announcement supported */
     bool       ta;
-    /* Alternate Frequency supported */
+    /** Alternate Frequency supported */
     bool       af;
-    /* Emergency announcements supported */
+    /** Emergency announcements supported */
     bool       ea;
 };
 
-/* Additional attributes for an AM band configuration */
+/** Additional attributes for an AM band configuration */
 struct AmBandConfig {
-    /* Stereo supported */
+    /** Stereo supported */
     bool       stereo;
 };
 
@@ -120,83 +120,84 @@
  * If more than one tuner is supported (num_tuners > 1), only one can be
  * connected to the audio source. */
 struct Properties {
-    /* Class of this module. E.g AM_FM */
+    /** Class of this module. E.g AM_FM */
     Class           classId;
-    /* implementor name */
+    /** implementor name */
     string          implementor;
-    /* product name */
+    /** product name */
     string          product;
-    /* product version */
+    /** product version */
     string          version;
-    /* serial number (for subscription services) */
+    /** serial number (for subscription services) */
     string          serial;
-    /* number of tuners controllable independently */
+    /** number of tuners controllable independently */
     uint32_t        numTuners;
-    /* number of audio sources driven simultaneously */
+    /** number of audio sources driven simultaneously */
     uint32_t        numAudioSources;
-    /* the hardware supports capture of audio source from audio HAL */
+    /** the hardware supports capture of audio source from audio HAL */
     bool            supportsCapture;
-    vec<BandConfig> bands; /* band descriptors */
+    vec<BandConfig> bands; /** band descriptors */
 };
 
 enum MetadataType : int32_t {
     INVALID    = -1,
-    /* Signed 32 bit integer  */
+    /** Signed 32 bit integer  */
     INT        = 0,
-    /* String */
+    /** String */
     TEXT       = 1,
-    /* Raw binary data (icon or art)
+    /**
+     * Raw binary data (icon or art)
        This data must be transparent to the android framework */
     RAW        = 2,
-    /* clock data, see MetaDataClock */
+    /** clock data, see MetaDataClock */
     CLOCK      = 3,
 };
 
 enum MetadataKey : int32_t {
     INVALID      = -1,
-    /* RDS PI                 - string  */
+    /** RDS PI                 - string  */
     RDS_PI       = 0,
-    /* RDS PS                 - string */
+    /** RDS PS                 - string */
     RDS_PS       = 1,
-    /* RDS PTY                - int32_t  */
+    /** RDS PTY                - int32_t  */
     RDS_PTY      = 2,
-    /* RBDS PTY               - int32_t  */
+    /** RBDS PTY               - int32_t  */
     RBDS_PTY     = 3,
-    /* RDS RT                 - string  */
+    /** RDS RT                 - string  */
     RDS_RT       = 4,
-    /* Song title             - string  */
+    /** Song title             - string  */
     TITLE        = 5,
-    /* Artist name            - string  */
+    /** Artist name            - string  */
     ARTIST       = 6,
-    /* Album name             - string  */
+    /** Album name             - string  */
     ALBUM        = 7,
-    /* Musical genre          - string  */
+    /** Musical genre          - string  */
     GENRE        = 8,
-    /* Station icon           - raw  */
+    /** Station icon           - raw  */
     ICON         = 9,
-    /* Album art              - raw  */
+    /** Album art              - raw  */
     ART          = 10,
-    /* Clock                  - MetaDataClock */
+    /** Clock                  - MetaDataClock */
     CLOCK        = 11,
 };
 
 struct MetaDataClock {
-     /* Seconds since epoch at GMT + 0. */
+     /** Seconds since epoch at GMT + 0. */
     uint64_t utcSecondsSinceEpoch;
-    /* Minutes offset from the GMT. */
+    /** Minutes offset from the GMT. */
     int32_t timezoneOffsetInMinutes;
 };
 
 struct MetaData {
     MetadataType type;
     MetadataKey key;
-    /* Value used for type MetadataType.INT */
+    /** Value used for type MetadataType.INT */
     int32_t intValue;
-    /* Value used for type MetadataType.CLOCK */
+    /** Value used for type MetadataType.CLOCK */
     MetaDataClock  clockValue;
-    /* Value used for type MetadataType.TEXT */
+    /** Value used for type MetadataType.TEXT */
     string  stringValue;
-    /* Value used for type MetadataType.RAW */
+    /** Value used for type MetadataType.RAW */
     vec<uint8_t> rawValue;
 };
 
@@ -205,12 +206,12 @@
  * Contains information on currently tuned channel.
  */
 struct ProgramInfo {
-    uint32_t     channel;   /* current channel. (e.g kHz for band type AM_FM) */
-    uint32_t     subChannel; /* current sub channel. (FM_HD) */
-    bool         tuned;     /* tuned to a program or not */
-    bool         stereo;    /* program is stereo or not */
-    bool         digital;   /* digital program or not (e.g HD Radio program) */
-    uint32_t     signalStrength; /* signal strength from 0 to 100 */
-    vec<MetaData> metadata; /* non empty if meta data are present (e.g PTY, song title ...) */
+    uint32_t     channel;   /** current channel. (e.g kHz for band type AM_FM) */
+    uint32_t     subChannel; /** current sub channel. (FM_HD) */
+    bool         tuned;     /** tuned to a program or not */
+    bool         stereo;    /** program is stereo or not */
+    bool         digital;   /** digital program or not (e.g HD Radio program) */
+    uint32_t     signalStrength; /** signal strength from 0 to 100 */
+    vec<MetaData> metadata; /** non empty if meta data are present (e.g PTY, song title ...) */
 };
 
diff --git a/broadcastradio/1.1/IBroadcastRadio.hal b/broadcastradio/1.1/IBroadcastRadio.hal
index a6347c7..dd37d49 100644
--- a/broadcastradio/1.1/IBroadcastRadio.hal
+++ b/broadcastradio/1.1/IBroadcastRadio.hal
@@ -20,7 +20,7 @@
 
 interface IBroadcastRadio extends @1.0::IBroadcastRadio {
 
-    /*
+    /**
      * Retrieve implementation properties.
      * @return properties A Properties structure containing implementation
      *                    description and capabilities.
diff --git a/broadcastradio/1.1/ITunerCallback.hal b/broadcastradio/1.1/ITunerCallback.hal
index 178568a..158e217 100644
--- a/broadcastradio/1.1/ITunerCallback.hal
+++ b/broadcastradio/1.1/ITunerCallback.hal
@@ -25,7 +25,7 @@
  * ones, to avoid receiving a callback twice.
  */
 interface ITunerCallback extends @1.0::ITunerCallback {
-    /*
+    /**
      * Method called by the HAL when a tuning operation completes
      * following a step(), scan() or tune() command.
      * @param result OK if tune succeeded or TIMEOUT in case of time out.
@@ -33,7 +33,7 @@
      */
     oneway tuneComplete_1_1(Result result, ProgramInfo info);
 
-    /*
+    /**
      * Method called by the HAL when a frequency switch occurs.
      * @param info A ProgramInfo structure describing the new tuned station.
      */
diff --git a/camera/device/1.0/types.hal b/camera/device/1.0/types.hal
index b32c938..bf632d1 100644
--- a/camera/device/1.0/types.hal
+++ b/camera/device/1.0/types.hal
@@ -249,7 +249,7 @@
     vec<CameraFace> faces;
 };
 
-/*
+/**
  * A simple integer handle to use to reference a particular memory buffer
  * between the HAL and the framework.
  */
diff --git a/camera/device/3.2/types.hal b/camera/device/3.2/types.hal
index ba5bbe0..fd75528 100644
--- a/camera/device/3.2/types.hal
+++ b/camera/device/3.2/types.hal
@@ -68,16 +68,16 @@
  * The required counterclockwise rotation of camera stream.
  */
 enum StreamRotation : uint32_t  {
-    /* No rotation */
+    /** No rotation */
     ROTATION_0 = 0,
 
-    /* Rotate by 90 degree counterclockwise */
+    /** Rotate by 90 degree counterclockwise */
     ROTATION_90 = 1,
 
-    /* Rotate by 180 degree counterclockwise */
+    /** Rotate by 180 degree counterclockwise */
     ROTATION_180 = 2,
 
-    /* Rotate by 270 degree counterclockwise */
+    /** Rotate by 270 degree counterclockwise */
     ROTATION_270 = 3
 
 };
diff --git a/configstore/1.0/ISurfaceFlingerConfigs.hal b/configstore/1.0/ISurfaceFlingerConfigs.hal
index 3b5c1b0..dcc9bbb 100644
--- a/configstore/1.0/ISurfaceFlingerConfigs.hal
+++ b/configstore/1.0/ISurfaceFlingerConfigs.hal
@@ -16,7 +16,7 @@
 package android.hardware.configstore@1.0;
 
 interface ISurfaceFlingerConfigs {
-    /*
+    /**
      * The following two methods define (respectively):
      *
      * - The phase offset between hardware vsync and when apps are woken up by the
@@ -40,13 +40,13 @@
     vsyncEventPhaseOffsetNs() generates (OptionalInt64 value);
     vsyncSfEventPhaseOffsetNs() generates (OptionalInt64 value);
 
-    /*
+    /**
      * Instruct the Render Engine to use EGL_IMG_context_priority hint if
      * availabe.
      */
     useContextPriority() generates(OptionalBool value);
 
-    /*
+    /**
      * hasWideColorDisplay indicates that the device has
      * or can support a wide-color display, e.g. color space
      * greater than sRGB. Typical display may have same
@@ -60,7 +60,7 @@
      */
     hasWideColorDisplay() generates (OptionalBool value);
 
-    /*
+    /**
      * hwHdrDisplay indicates that the device has
      * or can support an HDR (High Dynamic Range) display.
      * Typically an HDR display is also wide-color.
@@ -69,13 +69,13 @@
      */
     hasHDRDisplay() generates (OptionalBool value);
 
-    /*
+    /**
      * Specify the offset in nanoseconds to add to vsync time when timestamping
      * present fences.
      */
     presentTimeOffsetFromVSyncNs() generates(OptionalInt64 value);
 
-    /*
+    /**
      * Some hardware can do RGB->YUV conversion more efficiently in hardware
      * controlled by HWC than in hardware controlled by the video encoder.
      * This instruct VirtualDisplaySurface to use HWC for such conversion on
@@ -83,19 +83,19 @@
      */
     useHwcForRGBtoYUV() generates(OptionalBool value);
 
-    /*
+    /**
      *  Maximum dimension supported by HWC for virtual display.
      *  Must be equals to min(max_width, max_height).
      */
     maxVirtualDisplaySize() generates (OptionalUInt64 value);
 
-    /*
+    /**
      * Indicates if Sync framework is available. Sync framework provides fence
      * mechanism which significantly reduces buffer processing latency.
      */
     hasSyncFramework() generates(OptionalBool value);
 
-    /*
+    /**
      * Return true if surface flinger should use vr flinger for compatible vr
      * apps, false otherwise. Devices that will never be running vr apps should
      * return false to avoid extra resource usage. Daydream ready devices must
@@ -103,7 +103,7 @@
      */
     useVrFlinger() generates (OptionalBool value);
 
-    /*
+    /**
      * Controls the number of buffers SurfaceFlinger will allocate for use in
      * FramebufferSurface.
      */
diff --git a/contexthub/1.0/IContexthub.hal b/contexthub/1.0/IContexthub.hal
index c0928d5..8dccd67 100644
--- a/contexthub/1.0/IContexthub.hal
+++ b/contexthub/1.0/IContexthub.hal
@@ -18,7 +18,7 @@
 
 import IContexthubCallback;
 
-/*
+/**
  * The Context Hub HAL provides an interface to a separate low-power processing
  * domain that has direct access to contextual information, such as sensors.
  * Native applications that run within a context hub are known as nanoapps, and
@@ -26,14 +26,14 @@
  * standardized via the CHRE API, defined elsewhere.
  */
 interface IContexthub {
-    /*
+    /**
      * Enumerate all available context hubs on the system.
      *
      * @return hubs list of hubs on this system.
      */
     getHubs() generates (vec<ContextHub> hubs);
 
-    /*
+    /**
      * Register a callback for the HAL implementation to send asynchronous
      * messages to the service from a context hub. There can be a maximum of
      * one callback registered with the HAL. A call to this function when a
diff --git a/contexthub/1.0/IContexthubCallback.hal b/contexthub/1.0/IContexthubCallback.hal
index 9a6db4c..264f84c 100644
--- a/contexthub/1.0/IContexthubCallback.hal
+++ b/contexthub/1.0/IContexthubCallback.hal
@@ -17,7 +17,7 @@
 package android.hardware.contexthub@1.0;
 
 interface IContexthubCallback {
-    /*
+    /**
      * This callback is passed by the Contexthub service to the HAL
      * implementation to allow the HAL to send asynchronous messages back
      * to the service and registered clients of the ContextHub service.
@@ -27,7 +27,7 @@
      */
      handleClientMsg(ContextHubMsg msg);
 
-    /*
+    /**
      * This callback is passed by the Contexthub service to the HAL
      * implementation to allow the HAL to send the response for a
      * transaction.
@@ -39,7 +39,7 @@
      */
      handleTxnResult(uint32_t txnId, TransactionResult result);
 
-    /*
+    /**
      * This callback is passed by the Contexthub service to the HAL
      * implementation to allow the HAL to send an asynchronous event
      * to the ContextHub service.
@@ -49,7 +49,7 @@
      */
      handleHubEvent(AsyncEventType evt);
 
-    /*
+    /**
      * This callback is passed by the Contexthub service to the HAL
      * implementation to allow the HAL to send a notification to the service
      * that a nanp-app has aborted.
@@ -63,7 +63,7 @@
      */
      handleAppAbort(uint64_t appId, uint32_t abortCode);
 
-     /*
+     /**
       * This callback is passed by the Contexthub service to the HAL
       * implementation to allow the HAL to send information about the
       * currently loaded and active nanoapps on the hub.
diff --git a/dumpstate/1.0/IDumpstateDevice.hal b/dumpstate/1.0/IDumpstateDevice.hal
index fec3eb4..206c139 100644
--- a/dumpstate/1.0/IDumpstateDevice.hal
+++ b/dumpstate/1.0/IDumpstateDevice.hal
@@ -17,7 +17,7 @@
 package android.hardware.dumpstate@1.0;
 
 interface IDumpstateDevice {
-    /*
+    /**
      * Dumps device-specific state into the given file descriptor.
      */
     dumpstateBoard(handle h);
diff --git a/gatekeeper/1.0/IGatekeeper.hal b/gatekeeper/1.0/IGatekeeper.hal
index c193477..59dd7d1 100644
--- a/gatekeeper/1.0/IGatekeeper.hal
+++ b/gatekeeper/1.0/IGatekeeper.hal
@@ -91,7 +91,7 @@
        vec<uint8_t> providedPassword)
     generates (GatekeeperResponse response);
 
-/*
+/**
  * Deletes the enrolledPasswordHandle associated with the uid. Once deleted
  * the user cannot be verified anymore.
  * This is an optional method.
@@ -107,7 +107,7 @@
  */
 deleteUser(uint32_t uid) generates (GatekeeperResponse response);
 
-/*
+/**
  * Deletes all the enrolled_password_handles for all uid's. Once called,
  * no users must be enrolled on the device.
  * This is an optional method.
diff --git a/gatekeeper/1.0/types.hal b/gatekeeper/1.0/types.hal
index 59076e0..f243675 100644
--- a/gatekeeper/1.0/types.hal
+++ b/gatekeeper/1.0/types.hal
@@ -31,12 +31,13 @@
  * Gatekeeper response to any/all requests has this structure as mandatory part
  */
 struct GatekeeperResponse {
-    /* request completion status */
+    /** request completion status */
     GatekeeperStatusCode code;
-    /* retry timeout in ms, if code == ERROR_RETRY_TIMEOUT
+    /**
+     * retry timeout in ms, if code == ERROR_RETRY_TIMEOUT
      * otherwise unused (0)
      */
     uint32_t timeout;
-    /* optional crypto blob. Opaque to Android system. */
+    /** optional crypto blob. Opaque to Android system. */
     vec<uint8_t> data;
 };
diff --git a/gnss/1.0/IAGnss.hal b/gnss/1.0/IAGnss.hal
index b8f5746..fb0f606 100644
--- a/gnss/1.0/IAGnss.hal
+++ b/gnss/1.0/IAGnss.hal
@@ -18,7 +18,7 @@
 
 import IAGnssCallback;
 
-/*
+/**
  * Extended interface for AGNSS support.
  */
 interface IAGnss {
@@ -30,7 +30,7 @@
         IPV4V6   = 3
     };
 
-    /*
+    /**
      * Opens the AGNSS interface and provides the callback routines to the
      * implementation of this interface.
      *
@@ -38,21 +38,21 @@
      */
     setCallback(IAGnssCallback callback);
 
-    /*
+    /**
      * Notifies that the AGNSS data connection has been closed.
      *
      * @return success True if the operation is successful.
      */
     dataConnClosed() generates (bool success);
 
-    /*
+    /**
      * Notifies that a data connection is not available for AGNSS.
      *
      * @return success True if the operation is successful.
      */
     dataConnFailed() generates (bool success);
 
-    /*
+    /**
      * Sets the hostname and port for the AGNSS server.
      *
      * @param type Specifies if SUPL or C2K.
@@ -64,7 +64,7 @@
     setServer(AGnssType type, string hostname, int32_t port)
         generates (bool success);
 
-    /*
+    /**
      * Notifies that a data connection is available and sets the name of the
      * APN, and its IP type, to be used for SUPL connections.
      *
diff --git a/gnss/1.0/IAGnssCallback.hal b/gnss/1.0/IAGnssCallback.hal
index fe2e101..81f1689 100644
--- a/gnss/1.0/IAGnssCallback.hal
+++ b/gnss/1.0/IAGnssCallback.hal
@@ -39,39 +39,39 @@
         AGNSS_DATA_CONN_FAILED   = 5
     };
 
-    /*
+    /**
      * Represents the status of AGNSS augmented to support IPv4.
      */
     @export(name="", value_prefix="GPS_")
     struct AGnssStatusIpV4 {
         AGnssType type;
         AGnssStatusValue status;
-        /*
+        /**
          * 32-bit IPv4 address.
          */
         uint32_t ipV4Addr;
     };
 
-    /*
+    /**
      * Represents the status of AGNSS augmented to support IPv6.
      */
     struct AGnssStatusIpV6 {
         AGnssType type;
         AGnssStatusValue status;
-        /*
+        /**
          * 128-bit IPv6 address.
          */
         uint8_t[16] ipV6Addr;
     };
 
-    /*
+    /**
      * Callback with AGNSS(IpV4) status information.
      *
      * @param status Will be of type AGnssStatusIpV4.
      */
     agnssStatusIpV4Cb(AGnssStatusIpV4 status);
 
-    /*
+    /**
      * Callback with AGNSS(IpV6) status information.
      *
      * @param status Will be of type AGnssStatusIpV6.
diff --git a/gnss/1.0/IAGnssRil.hal b/gnss/1.0/IAGnssRil.hal
index 6292273..6f91f7f 100644
--- a/gnss/1.0/IAGnssRil.hal
+++ b/gnss/1.0/IAGnssRil.hal
@@ -18,7 +18,7 @@
 
 import IAGnssRilCallback;
 
-/*
+/**
  * Extended interface for AGNSS RIL support. An Assisted GNSS Radio Interface
  * Layer interface allows the GNSS chipset to request radio interface layer
  * information from Android platform. Examples of such information are reference
@@ -50,41 +50,42 @@
         LTE_CELLID   = 4,
     };
 
-    /* CellID for 2G, 3G and LTE, used in AGNSS. */
+    /** CellID for 2G, 3G and LTE, used in AGNSS. */
     struct AGnssRefLocationCellID {
         AGnssRefLocationType type;
 
-        /* Mobile Country Code. */
+        /** Mobile Country Code. */
         uint16_t mcc;
 
-        /* Mobile Network Code .*/
+        /**
+         * Mobile Network Code .*/
         uint16_t mnc;
 
-        /*
+        /**
          * Location Area Code in 2G, 3G and LTE. In 3G lac is discarded. In LTE,
          * lac is populated with tac, to ensure that we don't break old clients that
          * might rely in the old (wrong) behavior.
          */
         uint16_t lac;
 
-        /* Cell id in 2G. Utran Cell id in 3G. Cell Global Id EUTRA in LTE. */
+        /** Cell id in 2G. Utran Cell id in 3G. Cell Global Id EUTRA in LTE. */
         uint32_t cid;
 
-        /* Tracking Area Code in LTE. */
+        /** Tracking Area Code in LTE. */
         uint16_t tac;
 
-        /* Physical Cell id in LTE (not used in 2G and 3G) */
+        /** Physical Cell id in LTE (not used in 2G and 3G) */
         uint16_t pcid;
     };
 
-    /* Represents ref locations */
+    /** Represents ref locations */
     struct AGnssRefLocation {
         AGnssRefLocationType type;
 
         AGnssRefLocationCellID cellID;
     };
 
-    /*
+    /**
      * Opens the AGNSS interface and provides the callback routines
      * to the implementation of this interface.
      *
@@ -92,14 +93,14 @@
      */
     setCallback(IAGnssRilCallback callback);
 
-    /*
+    /**
      * Sets the reference location.
      *
      * @param agnssReflocation AGNSS reference location CellID.
      */
     setRefLocation(AGnssRefLocation agnssReflocation);
 
-    /*
+    /**
      * Sets the SET ID.
      *
      * @param type Must be populated with either IMSI or MSISDN or NONE.
@@ -114,7 +115,7 @@
      */
     setSetId(SetIDType type, string setid) generates (bool success);
 
-    /*
+    /**
      * Notify GNSS of network status changes.
      *
      * @param connected Indicates whether network connectivity exists and
@@ -129,7 +130,7 @@
     updateNetworkState(bool connected, NetworkType type, bool roaming)
         generates (bool success);
 
-    /*
+    /**
      * Notify GNSS of network status changes.
      *
      * @param available Indicates whether network connectivity is available.
diff --git a/gnss/1.0/IAGnssRilCallback.hal b/gnss/1.0/IAGnssRilCallback.hal
index 2d64e54..d2a1a3f 100644
--- a/gnss/1.0/IAGnssRilCallback.hal
+++ b/gnss/1.0/IAGnssRilCallback.hal
@@ -16,26 +16,26 @@
 
 package android.hardware.gnss@1.0;
 
-/*
+/**
  * Callback for IAGnssRil interface. Used to request SET ID and
  * Reference Location.
  */
 interface IAGnssRilCallback {
-    /* Kinds of SET ID that can be requested */
+    /** 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,
     };
 
-    /*
+    /**
      * The Hal uses this API to request a SET ID.
      *
      * @param setIdflag Specifies the kind of SET ID that is required by the HAL.
      */
     requestSetIdCb(bitfield<ID> setIdflag);
 
-    /*
+    /**
      * The Hal uses this API to request a reference location.
      *
      */
diff --git a/gnss/1.0/IGnss.hal b/gnss/1.0/IGnss.hal
index 5cde79e..602c615 100644
--- a/gnss/1.0/IGnss.hal
+++ b/gnss/1.0/IGnss.hal
@@ -28,23 +28,23 @@
 import IGnssNi;
 import IGnssXtra;
 
-/* Represents the standard GNSS (Global Navigation Satellite System) interface. */
+/** Represents the standard GNSS (Global Navigation Satellite System) interface. */
 interface IGnss {
-    /* Requested operational mode for GNSS operation. */
+    /** 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,
         /** AGNSS MS-Based mode. */
         MS_BASED    = 1,
-        /*
+        /**
          * AGNSS MS-Assisted mode. This mode is not maintained by the platform anymore.
          * It is strongly recommended to use MS_BASED instead.
          */
         MS_ASSISTED = 2,
     };
 
-    /* Requested recurrence mode for GNSS operation. */
+    /** 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. */
@@ -53,7 +53,7 @@
         RECURRENCE_SINGLE    = 1
     };
 
-    /*
+    /**
      * Flags used to specify which aiding data to delete when calling
      * deleteAidingData().
      */
@@ -74,7 +74,7 @@
         DELETE_ALL          = 0xFFFF
     };
 
-    /*
+    /**
      * Opens the interface and provides the callback routines
      * to the implementation of this interface.
      *
@@ -84,7 +84,7 @@
      */
     setCallback(IGnssCallback callback) generates (bool success);
 
-    /*
+    /**
      * Starts a location output stream using the IGnssCallback
      * gnssLocationCb(), following the settings from the most recent call to
      * setPositionMode().
@@ -96,19 +96,19 @@
      */
     start() generates (bool success);
 
-    /*
+    /**
      * Stops the location output stream.
      *
      * @return success Returns true on success.
      */
     stop() generates (bool success);
 
-    /*
+    /**
      * Closes the interface.
      */
     cleanup();
 
-    /*
+    /**
      * Injects the current time.
      *
      * @param timeMs This is the UTC time received from the NTP server, its value
@@ -124,7 +124,7 @@
     injectTime(GnssUtcTime timeMs, int64_t timeReferenceMs, int32_t uncertaintyMs)
         generates (bool success);
 
-    /*
+    /**
      * Injects current location from another location provider (typically cell
      * ID).
      *
@@ -137,7 +137,7 @@
     injectLocation(double latitudeDegrees, double longitudeDegrees, float accuracyMeters)
         generates (bool success);
 
-    /*
+    /**
      * Specifies that the next call to start will not use the
      * information defined in the flags. GnssAidingData value of DELETE_ALL is
      * passed for a cold start.
@@ -146,7 +146,7 @@
      */
     deleteAidingData(GnssAidingData aidingDataFlags);
 
-    /*
+    /**
      * Sets the GnssPositionMode parameter,its associated recurrence value,
      * the time between fixes,requested fix accuracy and time to first fix.
      *
@@ -165,70 +165,70 @@
                     uint32_t preferredTimeMs)
         generates (bool success);
 
-    /*
+    /**
      * This method returns the IAGnssRil Interface.
      *
      * @return aGnssRilIface Handle to the IAGnssRil interface.
      */
     getExtensionAGnssRil() generates (IAGnssRil aGnssRilIface);
 
-    /*
+    /**
      * This method returns the IGnssGeofencing Interface.
      *
      * @return gnssGeofencingIface Handle to the IGnssGeofencing interface.
      */
     getExtensionGnssGeofencing() generates(IGnssGeofencing gnssGeofencingIface);
 
-    /*
+    /**
      * This method returns the IAGnss Interface.
      *
      * @return aGnssIface Handle to the IAGnss interface.
      */
     getExtensionAGnss() generates (IAGnss aGnssIface);
 
-    /*
+    /**
      * This method returns the IGnssNi interface.
      *
      * @return gnssNiIface Handle to the IGnssNi interface.
      */
     getExtensionGnssNi() generates (IGnssNi gnssNiIface);
 
-    /*
+    /**
      * This method returns the IGnssMeasurement interface.
      *
      * @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
      */
     getExtensionGnssMeasurement() generates (IGnssMeasurement gnssMeasurementIface);
 
-    /*
+    /**
      * This method returns the IGnssNavigationMessage interface.
      *
      * @return gnssNavigationIface gnssNavigationIface to the IGnssNavigationMessage interface.
      */
     getExtensionGnssNavigationMessage() generates (IGnssNavigationMessage gnssNavigationIface);
 
-    /*
+    /**
      * This method returns the IGnssXtra interface.
      *
      * @return xtraIface Handle to the IGnssXtra interface.
      */
     getExtensionXtra() generates (IGnssXtra xtraIface);
 
-    /*
+    /**
      * This method returns the IGnssConfiguration interface.
      *
      * @return gnssConfigIface Handle to the IGnssConfiguration interface.
      */
     getExtensionGnssConfiguration() generates (IGnssConfiguration gnssConfigIface);
 
-    /*
+    /**
      * This method returns the IGnssDebug interface.
      *
      * @return debugIface Handle to the IGnssDebug interface.
      */
     getExtensionGnssDebug() generates (IGnssDebug debugIface);
 
-    /*
+    /**
      * This method returns the IGnssBatching interface.
      *
      * @return batchingIface Handle to the IGnssBatching interface.
diff --git a/gnss/1.0/IGnssBatching.hal b/gnss/1.0/IGnssBatching.hal
index 6f2dde6..a5e01e3 100644
--- a/gnss/1.0/IGnssBatching.hal
+++ b/gnss/1.0/IGnssBatching.hal
@@ -18,7 +18,7 @@
 
 import IGnssBatchingCallback;
 
-/*
+/**
  * Extended interface for GNSS Batching support.
  *
  * If this interface is supported, this batching request must be able to run in
@@ -39,12 +39,12 @@
  */
 
 interface IGnssBatching {
-    /*
+    /**
      * 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
          * must wake up the application processor when the FIFO is full, and
          * call IGnssBatchingCallback to return the locations.
@@ -56,19 +56,19 @@
     };
 
     struct Options {
-        /*
+        /**
          * Time interval between samples in the location batch, in nano
          * seconds.
          */
         int64_t periodNanos;
 
-        /*
+        /**
          * Flags controlling how batching should behave.
          */
         bitfield<Flag> flags;
     };
 
-    /*
+    /**
      * Opens the interface and provides the callback routines
      * to the implementation of this interface.
      *
@@ -78,7 +78,7 @@
      */
     init(IGnssBatchingCallback callback) generates (bool success);
 
-    /*
+    /**
      * Return the batch size (in number of GnssLocation objects)
      * available in this hardware implementation.
      *
@@ -93,7 +93,7 @@
      */
     getBatchSize() generates (uint16_t batchSize);
 
-    /*
+    /**
      * Start batching locations. This API is primarily used when the AP is
      * asleep and the device can batch locations in the hardware.
      *
diff --git a/gnss/1.0/IGnssBatchingCallback.hal b/gnss/1.0/IGnssBatchingCallback.hal
index a8f4b88..5697cc4 100644
--- a/gnss/1.0/IGnssBatchingCallback.hal
+++ b/gnss/1.0/IGnssBatchingCallback.hal
@@ -16,9 +16,9 @@
 
 package android.hardware.gnss@1.0;
 
-/* The callback interface to report measurements from the HAL. */
+/** The callback interface to report measurements from the HAL. */
 interface IGnssBatchingCallback {
-    /*
+    /**
      * Called when a batch of locations is output, by various means, including
      * a flush request, as well as the buffer becoming full (if appropriate option
      * is set.)
diff --git a/gnss/1.0/IGnssCallback.hal b/gnss/1.0/IGnssCallback.hal
index 0c3b9f0..89e5e0e 100644
--- a/gnss/1.0/IGnssCallback.hal
+++ b/gnss/1.0/IGnssCallback.hal
@@ -16,16 +16,16 @@
 
 package android.hardware.gnss@1.0;
 
-/*
+/**
  * The interface is required for the HAL to communicate certain information
  * like status and location info back to the platform, the platform implements
  * the interfaces and passes a handle to the HAL.
  */
 interface IGnssCallback {
-    /* Flags for the gnssSetCapabilities callback. */
+    /** Flags for the gnssSetCapabilities callback. */
     @export(name="", value_prefix="GPS_CAPABILITY_")
     enum Capabilities : uint32_t {
-        /*
+        /**
          * GNSS HAL schedules fixes for RECURRENCE_PERIODIC mode.
          * If this is not set, then the framework will use 1000ms for
          * minInterval and will call start() and stop() to schedule the GNSS.
@@ -47,7 +47,7 @@
         NAV_MESSAGES                    = 1 << 7
     };
 
-    /* GNSS status event values. */
+    /** GNSS status event values. */
     @export(name="", value_prefix="GPS_STATUS_")
     enum GnssStatusValue : uint8_t {
         /** GNSS status unknown. */
@@ -62,7 +62,7 @@
         ENGINE_OFF     = 4
     };
 
-    /*
+    /**
      * Flags that indicate information about the satellite
      */
     @export(name="", value_prefix="GNSS_SV_FLAGS_")
@@ -75,7 +75,7 @@
     };
 
     struct GnssSvInfo {
-        /*
+        /**
          * Pseudo-random number for the SV, or FCN/OSN number for Glonass. The
          * distinction is made by looking at constellation field. Values must be
          * in the range of:
@@ -93,12 +93,12 @@
          */
         int16_t svid;
 
-        /*
+        /**
          * Defines the constellation of the given SV.
          */
         GnssConstellationType constellation;
 
-        /*
+        /**
          * Carrier-to-noise density in dB-Hz, typically in the range [0, 63].
          * It contains the measured C/N0 value for the signal at the antenna port.
          *
@@ -112,7 +112,7 @@
         /** Azimuth of SV in degrees. */
         float azimuthDegrees;
 
-        /*
+        /**
          * Carrier frequency of the signal tracked, for example it can be the
          * 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
@@ -130,22 +130,22 @@
          */
         float carrierFrequencyHz;
 
-        /*
+        /**
          * Contains additional data about the given SV.
          */
         bitfield<GnssSvFlags> svFlag;
     };
 
-    /*
+    /**
      * Represents SV status.
      */
     struct GnssSvStatus {
-        /*
+        /**
          * Number of GNSS SVs currently visible, refers to the SVs stored in sv_list
          */
         uint32_t numSvs;
 
-        /*
+        /**
          * Pointer to an array of SVs information for all GNSS constellations,
          * except GNSS, which is reported using svList
          */
@@ -153,26 +153,26 @@
 
     };
 
-    /*
+    /**
      * Called when a GNSS location is available.
      *
      * @param location Location information from HAL.
      */
     gnssLocationCb(GnssLocation location);
 
-    /*
+    /**
      * Called to communicate the status of the GNSS engine.
      *
      * @param status Status information from HAL.
      */
     gnssStatusCb(GnssStatusValue status);
 
-    /*
+    /**
      * @param svInfo SV status information from HAL.
      */
     gnssSvStatusCb(GnssSvStatus svInfo);
 
-    /*
+    /**
      * Called when NMEA data is available.
      * Callback for reporting NMEA sentences.
      *
@@ -195,7 +195,7 @@
      */
     gnssNmeaCb(GnssUtcTime timestamp, string nmea);
 
-    /*
+    /**
      * Callback to inform framework of the GNSS engine's capabilities.
      *
      * @param capabilities Capability parameter is a bit field of
@@ -203,7 +203,7 @@
      */
     gnssSetCapabilitesCb(bitfield<Capabilities> capabilities);
 
-    /*
+    /**
      * Callback utility for acquiring the GNSS wakelock. This can be used to prevent
      * the CPU from suspending while handling GNSS events.
      */
@@ -215,7 +215,7 @@
     /** Callback for requesting NTP time */
     gnssRequestTimeCb();
 
-    /*
+    /**
      * Provides information about how new the underlying GPS/GNSS hardware and
      * software is.
      *
@@ -228,14 +228,14 @@
      * GnssMeasurement support will be verified.
      */
     struct GnssSystemInfo{
-        /*
+        /**
          * year in which the last update was made to the underlying hardware/firmware
          * used to capture GNSS signals, e.g. 2016
          */
         uint16_t yearOfHw;
     };
 
-    /*
+    /**
      * Callback to inform framework of the engine's hardware version information.
      *
      * @param info GnssSystemInfo about the GPS/GNSS hardware.
diff --git a/gnss/1.0/IGnssConfiguration.hal b/gnss/1.0/IGnssConfiguration.hal
index 2fb6e4e..e315286 100644
--- a/gnss/1.0/IGnssConfiguration.hal
+++ b/gnss/1.0/IGnssConfiguration.hal
@@ -16,68 +16,68 @@
 
 package android.hardware.gnss@1.0;
 
-/*
+/**
  * Interface for passing GNSS configuration info from platform to HAL.
  */
 interface IGnssConfiguration {
-    /*
+    /**
      * Enum which holds the bit masks for SUPL_MODE configuration parameter.
      */
     enum SuplMode : uint8_t {
-        /* Mobile Station Based */
+        /** Mobile Station Based */
         MSB = 0x01,
 
-        /* Mobile Station Assisted */
+        /** Mobile Station Assisted */
         MSA = 0x02
     };
 
-    /*
+    /**
      * Enum which holds the bit masks for GPS_LOCK configuration parameter.
      */
     enum GpsLock : uint8_t {
-        /* Lock Mobile Originated GPS functionalitues. */
+        /** Lock Mobile Originated GPS functionalitues. */
         MO    =  0x01,
 
-        /* Lock Network initiated GPS functionalities. */
+        /** Lock Network initiated GPS functionalities. */
         NI    =  0x02
     };
 
-    /*
+    /**
      * Enum that hold the bit masks for various LTE Positioning Profile settings (LPP_PROFILE
      * configuration parameter). If none of the bits in the enum are set, the default setting is
      * Radio Resource Location Protocol(RRLP).
      */
     enum LppProfile : uint8_t {
-        /* Enable LTE Positioning Protocol user plane */
+        /** Enable LTE Positioning Protocol user plane */
         USER_PLANE          = 0x01,
 
-        /* Enable LTE Positioning Protocol Control plane */
+        /** Enable LTE Positioning Protocol Control plane */
         CONTROL_PLANE       = 0x02
     };
 
-    /*
+    /**
      * Enum which holds the bit masks for A_GLONASS_POS_PROTOCOL_SELECT
      * configuration parameter.
      */
     enum GlonassPosProtocol : uint8_t {
-        /* Radio Resource Control(RRC) control-plane. */
+        /** Radio Resource Control(RRC) control-plane. */
         RRC_CPLANE                  = 0x01,
 
-        /* Radio Resource Location user-plane. */
+        /** Radio Resource Location user-plane. */
         RRLP_CPLANE                 = 0x02,
 
-        /* LTE Positioning Protocol User plane */
+        /** LTE Positioning Protocol User plane */
         LPP_UPLANE                  = 0x04
     };
 
-    /*
+    /**
      * IMPORTANT: GNSS HAL must expect the below methods to be called multiple
      * times. They can be called even when GnssLocationProvider is already
      * constructed and enabled. GNSS HAL must maintain the existing requests
      * for various callbacks regardless the change in configuration data.
      */
 
-     /*
+     /**
       * This method enables or disables emergency SUPL.
       *
       * @param enabled True if emergency SUPL is to be enabled.
@@ -86,7 +86,7 @@
       */
      setSuplEs(bool enabled) generates (bool success);
 
-     /*
+     /**
       * This method sets the SUPL version requested by Carrier. The GNSS HAL
       * must use this version of the SUPL protocol if supported.
       *
@@ -99,7 +99,7 @@
       */
      setSuplVersion(uint32_t version) generates (bool success);
 
-     /*
+     /**
       * This method sets the SUPL mode.
       *
       * @param mode Bit mask that specifies the SUPL mode which is set with the SuplMode enum.
@@ -108,7 +108,7 @@
       */
      setSuplMode(bitfield<SuplMode> mode) generates (bool success);
 
-     /*
+     /**
       * This setting configures how GPS functionalities should be locked when
       * user turns off GPS On setting.
       *
@@ -119,7 +119,7 @@
       */
      setGpsLock(bitfield<GpsLock> lock) generates (bool success);
 
-     /*
+     /**
       * This method sets the LTE Positioning Profile configuration.
       *
       * @param lppProfile Bitmask that specifies the LTE Positioning Profile
@@ -129,7 +129,7 @@
       */
      setLppProfile(bitfield<LppProfile> lppProfile) generates (bool success);
 
-     /*
+     /**
       * This method selects positioning protocol on A-Glonass system.
       *
       * @param protocol Bitmask that specifies the positioning protocol to be
@@ -139,7 +139,7 @@
       */
      setGlonassPositioningProtocol(bitfield<GlonassPosProtocol> protocol) generates (bool success);
 
-     /*
+     /**
       * This method configures which PDN to use.
       *
       * @param enable Use emergency PDN if true and regular PDN if false.
diff --git a/gnss/1.0/IGnssDebug.hal b/gnss/1.0/IGnssDebug.hal
index 8784d1a..9c1038f 100644
--- a/gnss/1.0/IGnssDebug.hal
+++ b/gnss/1.0/IGnssDebug.hal
@@ -1,107 +1,107 @@
 package android.hardware.gnss@1.0;
 
-/* Extended interface for DEBUG support. */
+/** Extended interface for DEBUG support. */
 interface IGnssDebug {
     enum SatelliteEphemerisType : uint8_t {
-        /* no information is known to the gnss hardware, about this satellite */
+        /** no information is known to the gnss hardware, about this satellite */
         UNKNOWN,
-        /*  this satellite is known to exist */
+        /**  this satellite is known to exist */
         KNOWN,
-        /*  this satellite is not known to exist */
+        /**  this satellite is not known to exist */
         NONEXISTENT,
-        /* Only Almanac (approximate) location known for this satellite */
+        /** Only Almanac (approximate) location known for this satellite */
         ALMANAC_ONLY,
-        /* Ephemeris is known from demodulating the signal on device */
+        /** Ephemeris is known from demodulating the signal on device */
         DEMODULATED,
-        /* Ephemeris has been provided by SUPL */
+        /** Ephemeris has been provided by SUPL */
         SUPL_PROVIDED,
-        /* Ephemeris has been provided by another server */
+        /** Ephemeris has been provided by another server */
         OTHER_SERVER_PROVIDED,
-        /*
+        /**
          * Predicted ephemeris has been provided by a server
          * (e.g. Xtra, Extended Ephemeris, etc...)
          */
         SERVER_PREDICTED,
-        /*
+        /**
          * Predicted ephemeris in use, generated locally on the device (e.g. from prior
          * ephemeris)
          */
         LOCALLY_PREDICTED
     };
 
-    /*
+    /**
      * Provides the current best known position from any
      * source (GNSS or injected assistance).
      */
     struct PositionDebug {
-        /*
+        /**
          * Validity of the data in this struct. False only if no
          * latitude/longitude information is known.
          */
         bool valid;
-        /* Latitude expressed in degrees */
+        /** Latitude expressed in degrees */
         double latitudeDegrees;
-        /* Longitude expressed in degrees */
+        /** Longitude expressed in degrees */
         double longitudeDegrees;
-        /* Altitude above ellipsoid expressed in meters */
+        /** Altitude above ellipsoid expressed in meters */
         float altitudeMeters;
-        /* Represents speed in meters per second. */
+        /** Represents speed in meters per second. */
         float speedMetersPerSec;
-        /* Represents heading in degrees. */
+        /** Represents heading in degrees. */
         float bearingDegrees;
-        /*
+        /**
          * estimated horizontal accuracy of position expressed in meters, radial,
          * 68% confidence.
          */
         double horizontalAccuracyMeters;
-        /*
+        /**
          * estimated vertical accuracy of position expressed in meters, with
          * 68% confidence.
          */
         double verticalAccuracyMeters;
-        /*
+        /**
          * estimated speed accuracy in meters per second with 68% confidence.
          */
         double speedAccuracyMetersPerSecond;
-        /*
+        /**
          * estimated bearing accuracy degrees with 68% confidence.
          */
         double bearingAccuracyDegrees;
-        /*
+        /**
          * Time duration before this report that this position information was
          * valid.
          */
         float ageSeconds;
     };
 
-    /*
+    /**
      * Provides the current best known UTC time estimate.
      */
     struct TimeDebug {
-        /*
+        /**
          * Validity of the data in the struct.
          * False if current time is unknown.
          */
         bool valid;
-        /*
+        /**
          * UTC time estimate.
          */
         GnssUtcTime timeEstimate;
-        /* 68% error estimate in time. */
+        /** 68% error estimate in time. */
         float timeUncertaintyNs;
     };
 
-    /*
+    /**
      * Provides a single satellite info that has decoded navigation data.
      */
     struct SatelliteData {
-        /* Satellite vehicle ID number */
+        /** Satellite vehicle ID number */
         int16_t svid;
-        /* Defines the constellation type of the given SV. */
+        /** Defines the constellation type of the given SV. */
         GnssConstellationType constellation;
-        /* Defines the ephemeris type of the satellite. */
+        /** Defines the ephemeris type of the satellite. */
         SatelliteEphemerisType ephemerisType;
-        /*
+        /**
          * Time duration before this report, that the ephemeris source was last
          * updated, e.g. latest demodulation, or latest server download.
          * Set to 0 when ephemerisType is UNKNOWN.
@@ -109,16 +109,16 @@
         float ephemerisAgeSeconds;
     };
 
-    /*
+    /**
      * Provides a set of debug information that is filled by the GNSS chipset
      * when the method getDebugData() is invoked.
      */
     struct DebugData {
-        /* Current best known position. */
+        /** Current best known position. */
         PositionDebug position;
-        /* Current best know time estimate */
+        /** Current best know time estimate */
         TimeDebug time;
-        /*
+        /**
          * Provides a list of the decoded satellite ephemeris.
          * Must provide a complete list for all constellations device can track,
          * including GnssConstellationType UNKNOWN.
@@ -127,7 +127,7 @@
 
     };
 
-    /*
+    /**
      * This methods requests position, time and satellite ephemeris debug information
      * from the HAL.
      *
diff --git a/gnss/1.0/IGnssGeofenceCallback.hal b/gnss/1.0/IGnssGeofenceCallback.hal
index 722317e..a73790a 100644
--- a/gnss/1.0/IGnssGeofenceCallback.hal
+++ b/gnss/1.0/IGnssGeofenceCallback.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.gnss@1.0;
 
-/*
+/**
  * GNSS Geofence.
  * There are 3 states associated with a Geofence: Inside, Outside, Unknown.
  * There are 3 transitions: ENTERED, EXITED, UNCERTAIN.
@@ -114,7 +114,7 @@
         ERROR_GENERIC            = -149
     };
 
-    /*
+    /**
      * The callback associated with the geofence transition.
      * The callback must only be called when the caller is interested in that
      * particular transition. For instance, if the caller is interested only in
@@ -134,7 +134,7 @@
     gnssGeofenceTransitionCb(int32_t geofenceId, GnssLocation location,
         GeofenceTransition transition, GnssUtcTime timestamp);
 
-    /*
+    /**
      * The callback associated with the availability of the GNSS system for
      * geofencing monitoring. If the GNSS system determines that it cannot monitor
      * geofences because of lack of reliability or unavailability of the GNSS
@@ -145,7 +145,7 @@
      */
     gnssGeofenceStatusCb(GeofenceAvailability status, GnssLocation lastLocation);
 
-    /*
+    /**
      * The callback associated with the addGeofence call.
      *
      * @param geofenceId Id of the geofence.
@@ -159,7 +159,7 @@
      */
     gnssGeofenceAddCb(int32_t geofenceId, GeofenceStatus status);
 
-    /*
+    /**
      * The callback associated with the removeGeofence call.
      *
      * @param geofenceId Id of the geofence.
@@ -169,7 +169,7 @@
      */
     gnssGeofenceRemoveCb(int32_t geofenceId, GeofenceStatus status);
 
-    /*
+    /**
      * The callback associated with the pauseGeofence call.
      *
      * @param geofenceId Id of the geofence.
@@ -180,7 +180,7 @@
      */
     gnssGeofencePauseCb(int32_t geofenceId, GeofenceStatus status);
 
-    /*
+    /**
      * The callback associated with the resumeGeofence call.
      *
      * @param geofenceId - Id of the geofence.
diff --git a/gnss/1.0/IGnssGeofencing.hal b/gnss/1.0/IGnssGeofencing.hal
index b8348b3..562355a 100644
--- a/gnss/1.0/IGnssGeofencing.hal
+++ b/gnss/1.0/IGnssGeofencing.hal
@@ -18,9 +18,9 @@
 
 import IGnssGeofenceCallback;
 
-/* Extended interface for GNSS Geofencing support */
+/** Extended interface for GNSS Geofencing support */
 interface IGnssGeofencing {
-    /*
+    /**
      * Opens the geofence interface and provides the callback routines
      * to the HAL.
      *
@@ -28,7 +28,7 @@
      */
     setCallback(IGnssGeofenceCallback callback);
 
-    /*
+    /**
      * Add a geofence area. This api currently supports circular geofences.
      *
      * @param geofenceId The id for the geofence. If a geofence with this id
@@ -59,14 +59,14 @@
             uint32_t notificationResponsivenessMs,
             uint32_t unknownTimerMs);
 
-    /*
+    /**
      * Pause monitoring a particular geofence.
      *
      * @param geofenceId The id for the geofence.
      */
     pauseGeofence(int32_t geofenceId);
 
-    /*
+    /**
      * Resume monitoring a particular geofence.
      *
      * @param geofenceId - The id for the geofence.
@@ -78,7 +78,7 @@
     resumeGeofence(int32_t geofenceId,
             bitfield<IGnssGeofenceCallback.GeofenceTransition> monitorTransitions);
 
-    /*
+    /**
      * Remove a geofence area. After the function returns, no notifications
      * must be sent.
      *
diff --git a/gnss/1.0/IGnssMeasurement.hal b/gnss/1.0/IGnssMeasurement.hal
index 8329442..fad83d2 100644
--- a/gnss/1.0/IGnssMeasurement.hal
+++ b/gnss/1.0/IGnssMeasurement.hal
@@ -18,7 +18,7 @@
 
 import IGnssMeasurementCallback;
 
-/*
+/**
  * Extended interface for GNSS Measurements support.
  */
 interface IGnssMeasurement {
@@ -29,7 +29,7 @@
         ERROR_GENERIC = -101
     };
 
-    /*
+    /**
      * Initializes the interface and registers the callback routines with the HAL.
      * After a successful call to 'setCallback' the HAL must begin to provide updates at
      * an average output rate of 1Hz (occasional
@@ -46,7 +46,7 @@
      */
     setCallback(IGnssMeasurementCallback callback) generates (GnssMeasurementStatus initRet);
 
-    /*
+    /**
      * Stops updates from the HAL, and unregisters the callback routines.
      * After a call to close(), the previously registered callbacks must be
      * considered invalid by the HAL.
diff --git a/gnss/1.0/IGnssMeasurementCallback.hal b/gnss/1.0/IGnssMeasurementCallback.hal
index 5789621..467bf19 100644
--- a/gnss/1.0/IGnssMeasurementCallback.hal
+++ b/gnss/1.0/IGnssMeasurementCallback.hal
@@ -16,9 +16,9 @@
 
 package android.hardware.gnss@1.0;
 
-/* The callback interface to report measurements from the HAL. */
+/** The callback interface to report measurements from the HAL. */
 interface IGnssMeasurementCallback {
-    /*
+    /**
      * Flags to indicate what fields in GnssClock are valid.
      */
     @export(name="", value_prefix="GNSS_CLOCK_")
@@ -39,7 +39,7 @@
         HAS_DRIFT_UNCERTAINTY  = 1 << 6
     };
 
-    /*
+    /**
      * Flags to indicate what fields in GnssMeasurement are valid.
      */
     @export(name="", value_prefix="GNSS_MEASUREMENT_")
@@ -58,7 +58,7 @@
         HAS_AUTOMATIC_GAIN_CONTROL     = 1 << 13
     };
 
-    /*
+    /**
      * Enumeration of available values for the GNSS Measurement's multipath
      * indicator.
      */
@@ -72,7 +72,7 @@
         INDICATIOR_NOT_PRESENT = 2
     };
 
-    /*
+    /**
      * Flags indicating the GNSS measurement state.
      *
      * The expected behavior here is for GNSS HAL to set all the flags that applies.
@@ -106,7 +106,7 @@
         STATE_GLO_TOD_KNOWN          = 1 << 15,
     };
 
-    /*
+    /**
      * Flags indicating the Accumulated Delta Range's states.
      */
     @export(name="", value_prefix="GNSS_")
@@ -117,17 +117,17 @@
         ADR_STATE_CYCLE_SLIP = 1 << 2,
     };
 
-    /*
+    /**
      * Represents an estimate of the GNSS clock time.
      */
     struct GnssClock {
-        /*
+        /**
          * A set of flags indicating the validity of the fields in this data
          * structure.
          */
         bitfield<GnssClockFlags> gnssClockFlags;
 
-        /*
+        /**
          * Leap second data.
          * The sign of the value is defined by the following equation:
          *      utcTimeNs = timeNs - (fullBiasNs + biasNs) - leapSecond *
@@ -138,7 +138,7 @@
          */
         int16_t leapSecond;
 
-        /*
+        /**
          * The GNSS receiver internal clock value. This is the local hardware clock
          * value.
          *
@@ -159,7 +159,7 @@
          */
         int64_t timeNs;
 
-        /*
+        /**
          * 1-Sigma uncertainty associated with the clock's time in nanoseconds.
          * The uncertainty is represented as an absolute (single sided) value.
          *
@@ -170,7 +170,7 @@
          */
         double timeUncertaintyNs;
 
-        /*
+        /**
          * The difference between hardware clock ('time' field) inside GNSS receiver
          * and the true GNSS time since 0000Z, January 6, 1980, in nanoseconds.
          *
@@ -187,7 +187,7 @@
          */
         int64_t fullBiasNs;
 
-        /*
+        /**
          * Sub-nanosecond bias.
          * The error estimate for the sum of this and the fullBiasNs is the
          * biasUncertaintyNs.
@@ -198,7 +198,7 @@
          */
         double biasNs;
 
-        /*
+        /**
          * 1-Sigma uncertainty associated with the local estimate of GNSS time (clock
          * bias) in nanoseconds. The uncertainty is represented as an absolute
          * (single sided) value.
@@ -209,7 +209,7 @@
          */
         double biasUncertaintyNs;
 
-        /*
+        /**
          * The clock's drift in nanoseconds (per second).
          *
          * A positive value means that the frequency is higher than the nominal
@@ -223,7 +223,7 @@
          */
         double driftNsps;
 
-        /*
+        /**
          * 1-Sigma uncertainty associated with the clock's drift in nanoseconds (per
          * second).
          * The uncertainty is represented as an absolute (single sided) value.
@@ -234,7 +234,7 @@
          */
         double driftUncertaintyNsps;
 
-        /*
+        /**
          * When there are any discontinuities in the HW clock, this field is
          * mandatory.
          *
@@ -267,7 +267,7 @@
 
     };
 
-    /*
+    /**
      * Represents a GNSS Measurement, it contains raw and computed information.
      *
      * All signal measurement information (e.g. svTime,
@@ -277,24 +277,24 @@
      * position, velocity, or time.
      */
     struct GnssMeasurement{
-        /*
+        /**
          * A set of flags indicating the validity of the fields in this data
          * structure.
          */
         bitfield<GnssMeasurementFlags> flags;
 
-        /*
+        /**
          * Satellite vehicle ID number, as defined in GnssSvInfo::svid
          * This is a mandatory value.
          */
         int16_t svid;
 
-        /*
+        /**
          * Defines the constellation of the given SV.
          */
         GnssConstellationType constellation;
 
-        /*
+        /**
          * Time offset at which the measurement was taken in nanoseconds.
          * The reference receiver's time is specified by GnssData::clock::timeNs.
          *
@@ -307,7 +307,7 @@
          */
         double timeOffsetNs;
 
-        /*
+        /**
          * Per satellite sync state. It represents the current sync state for the
          * associated satellite.
          * Based on the sync state, the 'received GNSS tow' field must be interpreted
@@ -317,7 +317,7 @@
          */
         bitfield<GnssMeasurementState> state;
 
-        /*
+        /**
          * The received GNSS Time-of-Week at the measurement time, in nanoseconds.
          * For GNSS & QZSS, this is the received GNSS Time-of-Week at the
          * measurement time, in nanoseconds. The value is relative to the
@@ -402,14 +402,14 @@
          */
         int64_t receivedSvTimeInNs;
 
-        /*
+        /**
          * 1-Sigma uncertainty of the Received GNSS Time-of-Week in nanoseconds.
          *
          * This value must be populated if 'state' != STATE_UNKNOWN.
          */
         int64_t receivedSvTimeUncertaintyInNs;
 
-        /*
+        /**
          * Carrier-to-noise density in dB-Hz, typically in the range [0, 63].
          * It contains the measured C/N0 value for the signal at the antenna port.
          *
@@ -417,7 +417,7 @@
          */
         double cN0DbHz;
 
-        /*
+        /**
          * Pseudorange rate at the timestamp in m/s. The correction of a given
          * Pseudorange Rate value includes corrections for receiver and satellite
          * clock frequency errors. Ensure that this field is independent (see
@@ -445,7 +445,7 @@
          */
         double pseudorangeRateMps;
 
-        /*
+        /**
          * 1-Sigma uncertainty of the pseudorangeRateMps.
          * The uncertainty is represented as an absolute (single sided) value.
          *
@@ -453,7 +453,7 @@
          */
         double pseudorangeRateUncertaintyMps;
 
-        /*
+        /**
          * Accumulated delta range's state. It indicates whether ADR is reset or
          * there is a cycle slip(indicating loss of lock).
          *
@@ -461,7 +461,7 @@
          */
         bitfield<GnssAccumulatedDeltaRangeState> accumulatedDeltaRangeState;
 
-        /*
+        /**
          * Accumulated delta range since the last channel reset in meters.
          * A positive value indicates that the SV is moving away from the receiver.
          *
@@ -476,14 +476,14 @@
          */
         double accumulatedDeltaRangeM;
 
-        /*
+        /**
          * 1-Sigma uncertainty of the accumulated delta range in meters.
          * This value must be populated if 'accumulated delta range state' !=
          * ADR_STATE_UNKNOWN.
          */
         double accumulatedDeltaRangeUncertaintyM;
 
-        /*
+        /**
          * Carrier frequency of the signal tracked, for example it can be the
          * 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
@@ -501,7 +501,7 @@
          */
         float carrierFrequencyHz;
 
-        /*
+        /**
          * The number of full carrier cycles between the satellite and the
          * receiver. The reference frequency is given by the field
          * 'carrierFrequencyHz'. Indications of possible cycle slips and
@@ -513,7 +513,7 @@
          */
         int64_t carrierCycles;
 
-        /*
+        /**
          * The RF phase detected by the receiver, in the range [0.0, 1.0].
          * This is usually the fractional part of the complete carrier phase
          * measurement.
@@ -526,14 +526,14 @@
          */
         double carrierPhase;
 
-        /*
+        /**
          * 1-Sigma uncertainty of the carrier-phase.
          * If the data is available, gnssClockFlags must contain
          * HAS_CARRIER_PHASE_UNCERTAINTY.
          */
         double carrierPhaseUncertainty;
 
-        /*
+        /**
          * An enumeration that indicates the 'multipath' state of the event.
          *
          * The multipath Indicator is intended to report the presence of overlapping
@@ -554,7 +554,7 @@
          */
         GnssMultipathIndicator multipathIndicator;
 
-        /*
+        /**
          * Signal-to-noise ratio at correlator output in dB.
          * If the data is available, gnssClockFlags must contain MEASUREMENT_HAS_SNR.
          * This is the power ratio of the "correlation peak height above the
@@ -562,7 +562,7 @@
          */
         double snrDb;
 
-        /*
+        /**
          * Automatic gain control (AGC) level. AGC acts as a variable gain
          * amplifier adjusting the power of the incoming signal. The AGC level
          * may be used to indicate potential interference. When AGC is at a
@@ -581,7 +581,7 @@
         double agcLevelDb;
     };
 
-    /*
+    /**
      * Represents a reading of GNSS measurements. For devices where GnssSystemInfo's
      * yearOfHw is set to 2016+, it is mandatory that these be provided, on
      * request, when the GNSS receiver is searching/tracking signals.
@@ -590,17 +590,17 @@
      * - Reporting of all tracked constellations are encouraged.
      */
     struct GnssData {
-        /* Number of GnssMeasurement elements. */
+        /** Number of GnssMeasurement elements. */
         uint32_t measurementCount;
 
-        /* The array of measurements. */
+        /** The array of measurements. */
         GnssMeasurement[GnssMax:SVS_COUNT] measurements;
 
         /** The GNSS clock time reading. */
         GnssClock clock;
     };
 
-    /*
+    /**
      * Callback for the hal to pass a GnssData structure back to the client.
      *
      * @param data Contains a reading of GNSS measurements.
diff --git a/gnss/1.0/IGnssNavigationMessage.hal b/gnss/1.0/IGnssNavigationMessage.hal
index ddd9169..db46d11 100644
--- a/gnss/1.0/IGnssNavigationMessage.hal
+++ b/gnss/1.0/IGnssNavigationMessage.hal
@@ -18,7 +18,7 @@
 
 import IGnssNavigationMessageCallback;
 
-/*
+/**
  * Extended interface for GNSS navigation message reporting support.
  */
 interface IGnssNavigationMessage {
@@ -29,7 +29,7 @@
         ERROR_GENERIC = -101
     };
 
-    /*
+    /**
      * Initializes the interface and registers the callback routines with the HAL.
      * After a successful call to 'setCallback' the HAL must begin to provide updates as
      * they become available.
@@ -45,7 +45,7 @@
      */
      setCallback(IGnssNavigationMessageCallback callback) generates (GnssNavigationMessageStatus initRet);
 
-    /*
+    /**
      * Stops updates from the HAL, and unregisters the callback routines.
      * After a call to close(), the previously registered callbacks must be
      * considered invalid by the HAL.
diff --git a/gnss/1.0/IGnssNavigationMessageCallback.hal b/gnss/1.0/IGnssNavigationMessageCallback.hal
index 2e6b853..714351b 100644
--- a/gnss/1.0/IGnssNavigationMessageCallback.hal
+++ b/gnss/1.0/IGnssNavigationMessageCallback.hal
@@ -18,7 +18,7 @@
 
 /** Represents a GNSS navigation message (or a fragment of it). */
 interface IGnssNavigationMessageCallback {
-    /*
+    /**
      * Enumeration of available values to indicate the GNSS Navigation message
      * types.
      *
@@ -48,7 +48,7 @@
         GAL_F           = 0x0602
     };
 
-    /*
+    /**
      * Status of Navigation Message
      * When a message is received properly without any parity error in its
      * navigation words, the status must be set to PARITY_PASSED. But if a message is
@@ -65,26 +65,26 @@
     };
 
     struct GnssNavigationMessage {
-        /*
+        /**
          * Satellite vehicle ID number, as defined in GnssSvInfo::svid
          * This is a mandatory value.
          */
         int16_t svid;
 
-        /*
+        /**
          * The type of message contained in the structure.
          * This is a mandatory value.
          */
         GnssNavigationMessageType type;
 
-        /*
+        /**
          * The status of the received navigation message.
          * No need to send any navigation message that contains words with parity
          * error and cannot be corrected.
          */
         bitfield<NavigationMessageStatus> status;
 
-        /*
+        /**
          * Message identifier. It provides an index so the complete Navigation
          * Message can be assembled.
          *
@@ -106,7 +106,7 @@
          */
         int16_t messageId;
 
-        /*
+        /**
          * Sub-message identifier. If required by the message 'type', this value
          * contains a sub-index within the current message (or frame) that is being
          * transmitted.
@@ -123,7 +123,7 @@
          */
         int16_t submessageId;
 
-        /*
+        /**
          * The data of the reported GNSS message. The bytes (or words) are specified
          * using big endian format (MSB first). The data is stored and decoded
          * in a server for research purposes.
@@ -158,7 +158,7 @@
         vec<uint8_t> data;
     };
 
-    /*
+    /**
      * The callback to report an available fragment of a GNSS navigation messages
      * from the HAL.
      *
diff --git a/gnss/1.0/IGnssNi.hal b/gnss/1.0/IGnssNi.hal
index c823bf0..fa98ab0 100644
--- a/gnss/1.0/IGnssNi.hal
+++ b/gnss/1.0/IGnssNi.hal
@@ -17,19 +17,19 @@
 package android.hardware.gnss@1.0;
 import IGnssNiCallback;
 
-/*
+/**
  * Extended interface for Network-initiated (NI) support. This interface is used
  * to respond to NI notifications originating from the HAL.
  */
 interface IGnssNi {
-    /*
+    /**
      * Registers the callbacks for HAL to use.
      *
      * @param callback handle to IGnssNiCallback interface.
      */
     setCallback(IGnssNiCallback callback);
 
-    /*
+    /**
      * Sends a response to HAL.
      *
      * @param notifId An ID generated by HAL to associate NI notifications and
diff --git a/gnss/1.0/IGnssNiCallback.hal b/gnss/1.0/IGnssNiCallback.hal
index c5fb223..163ba25 100644
--- a/gnss/1.0/IGnssNiCallback.hal
+++ b/gnss/1.0/IGnssNiCallback.hal
@@ -16,9 +16,9 @@
 
 package android.hardware.gnss@1.0;
 
-/* GNSS Network Initiated callback interface. */
+/** GNSS Network Initiated callback interface. */
 interface IGnssNiCallback {
-    /*
+    /**
      * GnssNiType constants
      */
     @export(name="", value_prefix="GPS_NI_TYPE_")
@@ -28,7 +28,7 @@
         UMTS_CTRL_PLANE = 3
     };
 
-    /*
+    /**
      * GnssNiNotifyFlags constants
      */
     @export(name="", value_prefix="GPS_NI_")
@@ -41,7 +41,7 @@
         PRIVACY_OVERRIDE = 0x0004,
     };
 
-    /*
+    /**
      * GNSS NI responses, used to define the response in
      * NI structures
      */
@@ -52,7 +52,7 @@
         RESPONSE_NORESP  = 3,
     };
 
-    /*
+    /**
      * NI data encoding scheme
      */
     @export(name="", value_prefix="GPS_")
@@ -66,59 +66,59 @@
 
     /** Represents an NI request */
     struct GnssNiNotification{
-        /*
+        /**
          * An ID generated by HAL to associate NI notifications and UI
          * responses.
          */
         int32_t notificationId;
 
-        /*
+        /**
          * A type used to distinguish different categories of NI
          * events, such as VOICE, UMTS_SUPL etc.
          */
         GnssNiType niType;
 
-        /*
+        /**
          * Notification/verification options, combinations of GnssNiNotifyFlags
          * constants.
          */
         bitfield<GnssNiNotifyFlags> notifyFlags;
 
-        /*
+        /**
          * Timeout period to wait for user response.
          * Set to 0 for no timeout limit. Specified in seconds.
          */
         uint32_t timeoutSec;
 
-        /*
+        /**
          * Default response when timeout.
          */
         GnssUserResponseType defaultResponse;
 
-        /*
+        /**
          * String representing the requester of the network inititated location
          * request.
          */
         string requestorId;
 
-        /*
+        /**
          * Notification message. String representing the service(for eg. SUPL-service)
          * who sent the network initiated location request.
          */
         string notificationMessage;
 
-        /*
+        /**
          * requestorId decoding scheme.
          */
         GnssNiEncodingType requestorIdEncoding;
 
-        /*
+        /**
          * notificationId decoding scheme
          */
         GnssNiEncodingType notificationIdEncoding;
     };
 
-    /*
+    /**
      * Callback with a network initiated request.
      *
      * @param notification network initiated request.
diff --git a/gnss/1.0/IGnssXtra.hal b/gnss/1.0/IGnssXtra.hal
index 5222fde..a2c8f39 100644
--- a/gnss/1.0/IGnssXtra.hal
+++ b/gnss/1.0/IGnssXtra.hal
@@ -1,12 +1,12 @@
 package android.hardware.gnss@1.0;
 import IGnssXtraCallback;
 
-/*
+/**
  * This interface is used by the GNSS HAL to request the framework
  * to download XTRA data.
  */
 interface IGnssXtra {
-    /*
+    /**
      * Opens the XTRA interface and provides the callback routines
      * to the implementation of this interface.
      *
@@ -16,7 +16,7 @@
      */
     setCallback(IGnssXtraCallback callback) generates (bool success);
 
-    /*
+    /**
      * Inject the downloaded XTRA data into the GNSS receiver.
      *
      * @param xtraData GNSS XTRA data.
diff --git a/gnss/1.0/IGnssXtraCallback.hal b/gnss/1.0/IGnssXtraCallback.hal
index 42df082..838f1ad 100644
--- a/gnss/1.0/IGnssXtraCallback.hal
+++ b/gnss/1.0/IGnssXtraCallback.hal
@@ -1,10 +1,10 @@
 package android.hardware.gnss@1.0;
 
-/*
+/**
  * This interface is used by the GNSS HAL to request download of XTRA data.
  */
 interface IGnssXtraCallback {
-   /*
+   /**
     * Callback to request the client to download XTRA data. The client should
     * download XTRA data and inject it by calling injectXtraData().
     */
diff --git a/gnss/1.0/types.hal b/gnss/1.0/types.hal
index d5e0e9b..ea2c756 100644
--- a/gnss/1.0/types.hal
+++ b/gnss/1.0/types.hal
@@ -22,10 +22,10 @@
     SVS_COUNT = 64,
 };
 
-/* Milliseconds since January 1, 1970 */
+/** Milliseconds since January 1, 1970 */
 typedef int64_t GnssUtcTime;
 
-/*
+/**
  * Constellation type of GnssSvInfo
  */
 
@@ -61,52 +61,52 @@
     HAS_BEARING_ACCURACY      = 0x0080
 };
 
-/* Represents a location. */
+/** Represents a location. */
 struct GnssLocation {
-    /* Contains GnssLocationFlags bits. */
+    /** Contains GnssLocationFlags bits. */
     bitfield<GnssLocationFlags> gnssLocationFlags;
 
-    /* Represents latitude in degrees. */
+    /** Represents latitude in degrees. */
     double latitudeDegrees;
 
-    /* Represents longitude in degrees. */
+    /** Represents longitude in degrees. */
     double longitudeDegrees;
 
-    /*
+    /**
      * Represents altitude in meters above the WGS 84 reference ellipsoid.
      */
     double altitudeMeters;
 
-    /* Represents speed in meters per second. */
+    /** Represents speed in meters per second. */
     float speedMetersPerSec;
 
-    /* Represents heading in degrees. */
+    /** Represents heading in degrees. */
     float bearingDegrees;
 
-    /*
+    /**
     * Represents expected horizontal position accuracy, radial, in meters
     * (68% confidence).
     */
     float horizontalAccuracyMeters;
 
-    /*
+    /**
     * Represents expected vertical position accuracy in meters
     * (68% confidence).
     */
     float verticalAccuracyMeters;
 
-    /*
+    /**
     * Represents expected speed accuracy in meter per seconds
     * (68% confidence).
     */
     float speedAccuracyMetersPerSecond;
 
-    /*
+    /**
     * Represents expected bearing accuracy in degrees
     * (68% confidence).
     */
     float bearingAccuracyDegrees;
 
-    /* Timestamp for the location fix. */
+    /** Timestamp for the location fix. */
     GnssUtcTime timestamp;
 };
diff --git a/graphics/allocator/2.0/IAllocator.hal b/graphics/allocator/2.0/IAllocator.hal
index 00d07d5..bf0e141 100644
--- a/graphics/allocator/2.0/IAllocator.hal
+++ b/graphics/allocator/2.0/IAllocator.hal
@@ -20,23 +20,23 @@
 
 interface IAllocator {
     enum Capability : int32_t {
-        /* reserved */
+        /** reserved */
         INVALID = 0,
 
-        /*
+        /**
          * IAllocatorClient::testAllocate must always return UNDEFINED unless
          * this capability is supported.
          */
         TEST_ALLOCATE = 1,
 
-        /*
+        /**
          * IAllocatorClient::BufferDescriptorInfo::layerCount must be 1 unless
          * this capability is supported.
          */
         LAYERED_BUFFERS = 2,
     };
 
-    /*
+    /**
      * Provides a list of supported capabilities (as described in the
      * definition of Capability above). This list must not change after
      * initialization.
@@ -48,7 +48,7 @@
     @callflow(next="*")
     getCapabilities() generates (vec<Capability> capabilities);
 
-    /*
+    /**
      * Retrieves implementation-defined debug information, which will be
      * displayed during, for example, `dumpsys SurfaceFlinger`.
      *
@@ -59,7 +59,7 @@
     @callflow(next="*")
     dumpDebugInfo() generates (string debugInfo);
 
-    /*
+    /**
      * Creates a client of the allocator. All resources created by the client
      * are owned by the client and are only visible to the client, unless they
      * are exported by exportHandle.
diff --git a/graphics/allocator/2.0/IAllocatorClient.hal b/graphics/allocator/2.0/IAllocatorClient.hal
index 080e3ea..8ca568f 100644
--- a/graphics/allocator/2.0/IAllocatorClient.hal
+++ b/graphics/allocator/2.0/IAllocatorClient.hal
@@ -20,7 +20,7 @@
 
 interface IAllocatorClient {
     struct BufferDescriptorInfo {
-        /*
+        /**
          * The width specifies how many columns of pixels must be in the
          * allocated buffer, but does not necessarily represent the offset in
          * columns between the same column in adjacent rows. The rows may be
@@ -28,34 +28,34 @@
          */
         uint32_t width;
 
-       /*
+       /**
         * The height specifies how many rows of pixels must be in the
         * allocated buffer.
         */
         uint32_t height;
 
-       /*
+       /**
         * The number of image layers that must be in the allocated buffer.
         */
         uint32_t layerCount;
 
-        /* Buffer pixel format. */
+        /** Buffer pixel format. */
         PixelFormat format;
 
-        /*
+        /**
          * Buffer producer usage mask; valid flags can be found in the
          * definition of ProducerUsage.
          */
         uint64_t producerUsageMask;
 
-        /*
+        /**
          * Buffer consumer usage mask; valid flags can be found in the
          * definition of ConsumerUsage.
          */
         uint64_t consumerUsageMask;
     };
 
-    /*
+    /**
      * Creates a new, opaque buffer descriptor.
      *
      * @param descriptorInfo specifies the attributes of the buffer
@@ -71,7 +71,7 @@
           generates (Error error,
                      BufferDescriptor descriptor);
 
-    /*
+    /**
      * Destroys an existing buffer descriptor.
      *
      * @param descriptor is the descriptor to destroy.
@@ -81,7 +81,7 @@
     @callflow(next="*")
     destroyDescriptor(BufferDescriptor descriptor) generates (Error error);
 
-    /*
+    /**
      * Tests whether a buffer allocation can succeed, ignoring potential
      * resource contention which might lead to a NO_RESOURCES error.
      *
@@ -98,7 +98,7 @@
     @callflow(next="allocate")
     testAllocate(vec<BufferDescriptor> descriptors) generates (Error error);
 
-    /*
+    /**
      * Attempts to allocate a list of buffers sharing a backing store.
      *
      * Each buffer must correspond to one of the descriptors passed into the
@@ -124,7 +124,7 @@
         generates (Error error,
                    vec<Buffer> buffers);
 
-    /*
+    /**
      * Frees a buffer.
      *
      * @param buffer is the buffer to be freed.
@@ -135,7 +135,7 @@
     @callflow(next="*")
     free(Buffer buffer) generates (Error error);
 
-    /*
+    /**
      * Exports a buffer for use in other client libraries or for cross-process
      * sharing.
      *
diff --git a/graphics/allocator/2.0/types.hal b/graphics/allocator/2.0/types.hal
index f9d1e1b..d9b184b 100644
--- a/graphics/allocator/2.0/types.hal
+++ b/graphics/allocator/2.0/types.hal
@@ -17,130 +17,131 @@
 package android.hardware.graphics.allocator@2.0;
 
 enum Error : int32_t {
-    NONE            = 0, /* no error */
-    BAD_DESCRIPTOR  = 1, /* invalid BufferDescriptor */
-    BAD_BUFFER      = 2, /* invalid Buffer */
-    BAD_VALUE       = 3, /* invalid width, height, etc. */
-    NOT_SHARED      = 4, /* buffers not sharing backing store */
-    NO_RESOURCES    = 5, /* temporary failure due to resource contention */
-    UNDEFINED       = 6, /* an operation has no defined meaning */
-    UNSUPPORTED     = 7, /* permanent failure */
+    NONE            = 0, /** no error */
+    BAD_DESCRIPTOR  = 1, /** invalid BufferDescriptor */
+    BAD_BUFFER      = 2, /** invalid Buffer */
+    BAD_VALUE       = 3, /** invalid width, height, etc. */
+    NOT_SHARED      = 4, /** buffers not sharing backing store */
+    NO_RESOURCES    = 5, /** temporary failure due to resource contention */
+    UNDEFINED       = 6, /** an operation has no defined meaning */
+    UNSUPPORTED     = 7, /** permanent failure */
 };
 
 enum ProducerUsage : uint64_t {
-    /* bit 0 is reserved */
+    /** bit 0 is reserved */
 
-    /* buffer is read by CPU occasionally */
+    /** buffer is read by CPU occasionally */
     CPU_READ        = 1ULL << 1,
-    /* buffer is read by CPU frequently */
+    /** buffer is read by CPU frequently */
     CPU_READ_OFTEN  = 1ULL << 2,
 
-    /* bit 3 is reserved */
-    /* bit 4 is reserved */
+    /** bit 3 is reserved */
+    /** bit 4 is reserved */
 
-    /* buffer is written by CPU occasionally */
+    /** buffer is written by CPU occasionally */
     CPU_WRITE       = 1ULL << 5,
-    /* buffer is written by CPU frequently */
+    /** buffer is written by CPU frequently */
     CPU_WRITE_OFTEN = 1ULL << 6,
 
-    /* bit 7 is reserved */
-    /* bit 8 is reserved */
+    /** bit 7 is reserved */
+    /** bit 8 is reserved */
 
-    /* buffer is used as a GPU render target */
+    /** buffer is used as a GPU render target */
     GPU_RENDER_TARGET = 1ULL << 9,
 
-    /* bit 10 is reserved */
-    /* bit 11 is reserved */
-    /* bit 12 is reserved */
-    /* bit 13 is reserved */
+    /** bit 10 is reserved */
+    /** bit 11 is reserved */
+    /** bit 12 is reserved */
+    /** bit 13 is reserved */
 
-    /*
+    /**
      * Buffer is allocated with hardware-level protection against copying the
      * contents (or information derived from the contents) into unprotected
      * memory.
      */
     PROTECTED         = 1ULL << 14,
 
-    /* bit 15 is reserved */
-    /* bit 16 is reserved */
+    /** bit 15 is reserved */
+    /** bit 16 is reserved */
 
-    /* buffer is used as a camera HAL output */
+    /** buffer is used as a camera HAL output */
     CAMERA            = 1ULL << 17,
 
-    /* bit 18 is reserved */
-    /* bit 19 is reserved */
-    /* bit 20 is reserved */
-    /* bit 21 is reserved */
+    /** bit 18 is reserved */
+    /** bit 19 is reserved */
+    /** bit 20 is reserved */
+    /** bit 21 is reserved */
 
-    /* buffer is used as a video decoder output */
+    /** buffer is used as a video decoder output */
     VIDEO_DECODER     = 1ULL << 22,
 
-    /* buffer is used as a sensor direct report output */
+    /** buffer is used as a sensor direct report output */
     SENSOR_DIRECT_DATA = 1ULL << 23,
 
-    /* bits 24-27 are reserved for future versions */
-    /* bits 28-31 are reserved for vendor extensions */
+    /** bits 24-27 are reserved for future versions */
+    /** bits 28-31 are reserved for vendor extensions */
 
-    /* bits 32-47 are reserved for future versions */
-    /* bits 48-63 are reserved for vendor extensions */
+    /** bits 32-47 are reserved for future versions */
+    /** bits 48-63 are reserved for vendor extensions */
 };
 
 enum ConsumerUsage : uint64_t {
-    /* bit 0 is reserved */
+    /** bit 0 is reserved */
 
-    /* buffer is read by CPU occasionally */
+    /** buffer is read by CPU occasionally */
     CPU_READ          = 1ULL << 1,
-    /* buffer is read by CPU frequently */
+    /** buffer is read by CPU frequently */
     CPU_READ_OFTEN    = 1ULL << 2,
 
-    /* bit 3 is reserved */
-    /* bit 4 is reserved */
-    /* bit 5 is reserved */
-    /* bit 6 is reserved */
-    /* bit 7 is reserved */
+    /** bit 3 is reserved */
+    /** bit 4 is reserved */
+    /** bit 5 is reserved */
+    /** bit 6 is reserved */
+    /** bit 7 is reserved */
 
-    /* buffer is used as a GPU texture */
+    /** buffer is used as a GPU texture */
     GPU_TEXTURE       = 1ULL << 8,
 
-    /* bit 9 is reserved */
-    /* bit 10 is reserved */
+    /** bit 9 is reserved */
+    /** bit 10 is reserved */
 
-    /* buffer is used by hwcomposer HAL */
+    /** buffer is used by hwcomposer HAL */
     HWCOMPOSER        = 1ULL << 11,
-    /* buffer is a hwcomposer HAL client target */
+    /** buffer is a hwcomposer HAL client target */
     CLIENT_TARGET     = 1ULL << 12,
 
-    /* bit 13 is reserved */
-    /* bit 14 is reserved */
+    /** bit 13 is reserved */
+    /** bit 14 is reserved */
 
-    /* buffer is used as a hwcomposer HAL cursor */
+    /** buffer is used as a hwcomposer HAL cursor */
     CURSOR            = 1ULL << 15,
 
-    /* buffer is used as a video encoder input */
+    /** buffer is used as a video encoder input */
     VIDEO_ENCODER     = 1ULL << 16,
 
-    /* bit 17 is reserved */
+    /** bit 17 is reserved */
 
-    /* buffer is used as a camera HAL input */
+    /** buffer is used as a camera HAL input */
     CAMERA            = 1ULL << 18,
 
-    /* bit 19 is reserved */
+    /** bit 19 is reserved */
 
-    /* buffer is used as a renderscript allocation */
+    /** buffer is used as a renderscript allocation */
     RENDERSCRIPT      = 1ULL << 20,
 
-    /* bit 21 is reserved */
-    /* bit 22 is reserved */
+    /** bit 21 is reserved */
+    /** bit 22 is reserved */
 
-    /* buffer is used as as an OpenGL shader storage or uniform
+    /**
+     * buffer is used as as an OpenGL shader storage or uniform
        buffer object */
     GPU_DATA_BUFFER    = 1ULL << 23,
 
-    /* bits 24-27 are reserved for future versions */
-    /* bits 28-31 are reserved for vendor extensions */
+    /** bits 24-27 are reserved for future versions */
+    /** bits 28-31 are reserved for vendor extensions */
 
-    /* bits 32-47 are reserved for future versions */
-    /* bits 48-63 are reserved for vendor extensions */
+    /** bits 32-47 are reserved for future versions */
+    /** bits 48-63 are reserved for vendor extensions */
 };
 
 typedef uint64_t BufferDescriptor;
diff --git a/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal b/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
index c59a16c..87bb814 100644
--- a/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
+++ b/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
@@ -546,7 +546,7 @@
      */
     disconnect(
             int32_t api,
-            DisconnectMode mode /* = DisconnectMode::API */
+            DisconnectMode mode /** = DisconnectMode::API */
         ) generates (
             Status status
         );
diff --git a/graphics/common/1.0/types.hal b/graphics/common/1.0/types.hal
index 70cb8ec..8aa0779 100644
--- a/graphics/common/1.0/types.hal
+++ b/graphics/common/1.0/types.hal
@@ -21,7 +21,7 @@
  */
 @export(name="android_pixel_format_t", value_prefix="HAL_PIXEL_FORMAT_")
 enum PixelFormat : int32_t {
-    /*
+    /**
      * "linear" color pixel formats:
      *
      * When used with ANativeWindow, the dataSpace field describes the color
@@ -37,7 +37,7 @@
     RGB_565            = 4,
     BGRA_8888          = 5,
 
-    /*
+    /**
      * The following formats use 10bit integers for R, G, and B and
      * 2 bits for alpha. This is used to improve color precision on
      * wide-color devices, e.g. Display-P3 or scRGB.
@@ -47,7 +47,7 @@
      */
     RGBA_1010102       = 0x2B,
 
-    /*
+    /**
      * The following formats use a 16bit float per color component.
      *
      * When used with ANativeWindow, the dataSpace field describes the color
@@ -55,7 +55,7 @@
      */
     RGBA_FP16          = 0x16,
 
-    /*
+    /**
      * 0x101 - 0x1FF
      *
      * This range is reserved for pixel formats that are specific to the HAL
@@ -66,7 +66,7 @@
      * GL_OES_EGL_image_external OpenGL ES extension.
      */
 
-    /*
+    /**
      * Android YUV format:
      *
      * This format is exposed outside of the HAL to software decoders and
@@ -95,7 +95,7 @@
     YV12   = 0x32315659, // YCrCb 4:2:0 Planar
 
 
-    /*
+    /**
      * Android Y8 format:
      *
      * This format is exposed outside of the HAL to the framework.
@@ -120,7 +120,7 @@
      */
     Y8     = 0x20203859,
 
-    /*
+    /**
      * Android Y16 format:
      *
      * This format is exposed outside of the HAL to the framework.
@@ -149,7 +149,7 @@
      */
     Y16    = 0x20363159,
 
-    /*
+    /**
      * Android RAW sensor format:
      *
      * This format is exposed outside of the camera HAL to applications.
@@ -195,7 +195,7 @@
      */
     RAW16 = 0x20,
 
-    /*
+    /**
      * Android RAW10 format:
      *
      * This format is exposed outside of the camera HAL to applications.
@@ -249,7 +249,7 @@
      */
     RAW10 = 0x25,
 
-    /*
+    /**
      * Android RAW12 format:
      *
      * This format is exposed outside of camera HAL to applications.
@@ -299,7 +299,7 @@
      */
     RAW12 = 0x26,
 
-    /*
+    /**
      * Android opaque RAW format:
      *
      * This format is exposed outside of the camera HAL to applications.
@@ -320,7 +320,7 @@
      */
     RAW_OPAQUE = 0x24,
 
-    /*
+    /**
      * Android binary blob graphics buffer format:
      *
      * This format is used to carry task-specific data which does not have a
@@ -346,7 +346,7 @@
      */
     BLOB = 0x21,
 
-    /*
+    /**
      * Android format indicating that the choice of format is entirely up to the
      * device-specific Gralloc implementation.
      *
@@ -364,7 +364,7 @@
      */
     IMPLEMENTATION_DEFINED = 0x22,
 
-    /*
+    /**
      * Android flexible YCbCr 4:2:0 formats
      *
      * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:0
@@ -386,7 +386,7 @@
      */
     YCBCR_420_888 = 0x23,
 
-    /*
+    /**
      * Android flexible YCbCr 4:2:2 formats
      *
      * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:2
@@ -400,7 +400,7 @@
      */
     YCBCR_422_888 = 0x27,
 
-    /*
+    /**
      * Android flexible YCbCr 4:4:4 formats
      *
      * This format allows platforms to use an efficient YCbCr/YCrCb 4:4:4
@@ -414,7 +414,7 @@
      */
     YCBCR_444_888 = 0x28,
 
-    /*
+    /**
      * Android flexible RGB 888 formats
      *
      * This format allows platforms to use an efficient RGB/BGR/RGBX/BGRX
@@ -428,7 +428,7 @@
      */
     FLEX_RGB_888 = 0x29,
 
-    /*
+    /**
      * Android flexible RGBA 8888 formats
      *
      * This format allows platforms to use an efficient RGBA/BGRA/ARGB/ABGR
@@ -442,7 +442,7 @@
      */
     FLEX_RGBA_8888 = 0x2A,
 
-    /* Legacy formats (deprecated), used by ImageFormat.java */
+    /** Legacy formats (deprecated), used by ImageFormat.java */
     YCBCR_422_SP       = 0x10,  // NV16
     YCRCB_420_SP       = 0x11,  // NV21
     YCBCR_422_I        = 0x14,  // YUY2
@@ -458,18 +458,19 @@
  */
 @export(name="android_transform_t", value_prefix="HAL_TRANSFORM_")
 enum Transform : int32_t {
-    /* flip source image horizontally (around the vertical axis) */
+    /** flip source image horizontally (around the vertical axis) */
     FLIP_H    = 0x01,
-    /* flip source image vertically (around the horizontal axis)*/
+    /**
+     * flip source image vertically (around the horizontal axis)*/
     FLIP_V    = 0x02,
-    /* rotate source image 90 degrees clockwise */
+    /** rotate source image 90 degrees clockwise */
     ROT_90    = 0x04,
-    /* rotate source image 180 degrees */
+    /** rotate source image 180 degrees */
     ROT_180   = 0x03,
-    /* rotate source image 270 degrees clockwise */
+    /** rotate source image 270 degrees clockwise */
     ROT_270   = 0x07,
 
-    /* 0x08 is reserved */
+    /** 0x08 is reserved */
 };
 
 /**
@@ -517,7 +518,7 @@
  */
 @export(name="android_dataspace_t", value_prefix="HAL_DATASPACE_")
 enum Dataspace : int32_t {
-    /*
+    /**
      * Default-assumption data space, when not explicitly specified.
      *
      * It is safest to assume the buffer is an image with sRGB primaries and
@@ -528,7 +529,7 @@
      */
     UNKNOWN = 0x0,
 
-    /*
+    /**
      * Arbitrary dataspace with manually defined characteristics.  Definition
      * for colorspaces or other meaning must be communicated separately.
      *
@@ -541,7 +542,7 @@
      */
     ARBITRARY = 0x1,
 
-    /*
+    /**
      * Color-description aspects
      *
      * The following aspects define various characteristics of the color
@@ -551,7 +552,7 @@
 
     STANDARD_SHIFT = 16,
 
-    /*
+    /**
      * Standard aspect
      *
      * Defines the chromaticity coordinates of the source primaries in terms of
@@ -559,7 +560,7 @@
      */
     STANDARD_MASK = 63 << STANDARD_SHIFT,  // 0x3F
 
-    /*
+    /**
      * Chromacity coordinates are unknown or are determined by the application.
      * Implementations shall use the following suggested standards:
      *
@@ -574,7 +575,7 @@
      */
     STANDARD_UNSPECIFIED = 0 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.300   0.600
      *  blue            0.150   0.060
@@ -586,7 +587,7 @@
      */
     STANDARD_BT709 = 1 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.290   0.600
      *  blue            0.150   0.060
@@ -600,7 +601,7 @@
      */
     STANDARD_BT601_625 = 2 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.290   0.600
      *  blue            0.150   0.060
@@ -612,7 +613,7 @@
      */
     STANDARD_BT601_625_UNADJUSTED = 3 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.310   0.595
      *  blue            0.155   0.070
@@ -626,7 +627,7 @@
      */
     STANDARD_BT601_525 = 4 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.310   0.595
      *  blue            0.155   0.070
@@ -638,7 +639,7 @@
      */
     STANDARD_BT601_525_UNADJUSTED = 5 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.170   0.797
      *  blue            0.131   0.046
@@ -650,7 +651,7 @@
      */
     STANDARD_BT2020 = 6 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.170   0.797
      *  blue            0.131   0.046
@@ -662,7 +663,7 @@
      */
     STANDARD_BT2020_CONSTANT_LUMINANCE = 7 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x      y
      *  green           0.21   0.71
      *  blue            0.14   0.08
@@ -674,7 +675,7 @@
      */
     STANDARD_BT470M = 8 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Primaries:       x       y
      *  green           0.243   0.692
      *  blue            0.145   0.049
@@ -686,7 +687,7 @@
      */
     STANDARD_FILM = 9 << STANDARD_SHIFT,
 
-    /*
+    /**
      * SMPTE EG 432-1 and SMPTE RP 431-2. (DCI-P3)
      * Primaries:       x       y
      *  green           0.265   0.690
@@ -696,7 +697,7 @@
      */
     STANDARD_DCI_P3 = 10 << STANDARD_SHIFT,
 
-    /*
+    /**
      * Adobe RGB
      * Primaries:       x       y
      *  green           0.210   0.710
@@ -710,7 +711,7 @@
 
     TRANSFER_SHIFT = 22,
 
-    /*
+    /**
      * Transfer aspect
      *
      * Transfer characteristics are the opto-electronic transfer characteristic
@@ -726,7 +727,7 @@
 
     TRANSFER_MASK = 31 << TRANSFER_SHIFT,  // 0x1F
 
-    /*
+    /**
      * Transfer characteristics are unknown or are determined by the
      * application.
      *
@@ -740,7 +741,7 @@
      */
     TRANSFER_UNSPECIFIED = 0 << TRANSFER_SHIFT,
 
-    /*
+    /**
      * Transfer characteristic curve:
      *  E = L
      *      L - luminance of image 0 <= L <= 1 for conventional colorimetry
@@ -748,7 +749,7 @@
      */
     TRANSFER_LINEAR = 1 << TRANSFER_SHIFT,
 
-    /*
+    /**
      * Transfer characteristic curve:
      *
      * E = 1.055 * L^(1/2.4) - 0.055  for 0.0031308 <= L <= 1
@@ -758,7 +759,7 @@
      */
     TRANSFER_SRGB = 2 << TRANSFER_SHIFT,
 
-    /*
+    /**
      * BT.601 525, BT.601 625, BT.709, BT.2020
      *
      * Transfer characteristic curve:
@@ -769,7 +770,7 @@
      */
     TRANSFER_SMPTE_170M = 3 << TRANSFER_SHIFT,
 
-    /*
+    /**
      * Assumed display gamma 2.2.
      *
      * Transfer characteristic curve:
@@ -779,7 +780,7 @@
      */
     TRANSFER_GAMMA2_2 = 4 << TRANSFER_SHIFT,
 
-    /*
+    /**
      *  display gamma 2.6.
      *
      * Transfer characteristic curve:
@@ -789,7 +790,7 @@
      */
     TRANSFER_GAMMA2_6 = 5 << TRANSFER_SHIFT,
 
-    /*
+    /**
      *  display gamma 2.8.
      *
      * Transfer characteristic curve:
@@ -799,7 +800,7 @@
      */
     TRANSFER_GAMMA2_8 = 6 << TRANSFER_SHIFT,
 
-    /*
+    /**
      * SMPTE ST 2084 (Dolby Perceptual Quantizer)
      *
      * Transfer characteristic curve:
@@ -815,7 +816,7 @@
      */
     TRANSFER_ST2084 = 7 << TRANSFER_SHIFT,
 
-    /*
+    /**
      * ARIB STD-B67 Hybrid Log Gamma
      *
      * Transfer characteristic curve:
@@ -833,7 +834,7 @@
 
     RANGE_SHIFT = 27,
 
-    /*
+    /**
      * Range aspect
      *
      * Defines the range of values corresponding to the unit range of 0-1.
@@ -841,7 +842,7 @@
      */
     RANGE_MASK = 7 << RANGE_SHIFT,  // 0x7
 
-    /*
+    /**
      * Range is unknown or are determined by the application.  Implementations
      * shall use the following suggested ranges:
      *
@@ -854,13 +855,13 @@
      */
     RANGE_UNSPECIFIED = 0 << RANGE_SHIFT,
 
-    /*
+    /**
      * Full range uses all values for Y, Cb and Cr from
      * 0 to 2^b-1, where b is the bit depth of the color format.
      */
     RANGE_FULL = 1 << RANGE_SHIFT,
 
-    /*
+    /**
      * Limited range uses values 16/256*2^b to 235/256*2^b for Y, and
      * 1/16*2^b to 15/16*2^b for Cb, Cr, R, G and B, where b is the bit depth of
      * the color format.
@@ -875,7 +876,7 @@
      */
     RANGE_LIMITED = 2 << RANGE_SHIFT,
 
-    /*
+    /**
      * Extended range is used for scRGB. Intended for use with
      * floating point pixel formats. [0.0 - 1.0] is the standard
      * sRGB space. Values outside the range 0.0 - 1.0 can encode
@@ -884,11 +885,11 @@
      */
     RANGE_EXTENDED = 3 << RANGE_SHIFT,
 
-    /*
+    /**
      * Legacy dataspaces
      */
 
-    /*
+    /**
      * sRGB linear encoding:
      *
      * The red, green, and blue components are stored in sRGB space, but
@@ -903,7 +904,7 @@
     V0_SRGB_LINEAR = STANDARD_BT709 | TRANSFER_LINEAR | RANGE_FULL,
 
 
-    /*
+    /**
      * scRGB linear encoding:
      *
      * The red, green, and blue components are stored in extended sRGB space,
@@ -918,7 +919,7 @@
     V0_SCRGB_LINEAR = STANDARD_BT709 | TRANSFER_LINEAR | RANGE_EXTENDED,
 
 
-    /*
+    /**
      * sRGB gamma encoding:
      *
      * The red, green and blue components are stored in sRGB space, and
@@ -936,7 +937,7 @@
     V0_SRGB = STANDARD_BT709 | TRANSFER_SRGB | RANGE_FULL,
 
 
-    /*
+    /**
      * scRGB:
      *
      * The red, green, and blue components are stored in extended sRGB space,
@@ -950,7 +951,7 @@
      */
     V0_SCRGB = STANDARD_BT709 | TRANSFER_SRGB | RANGE_EXTENDED,
 
-    /*
+    /**
      * YCbCr Colorspaces
      * -----------------
      *
@@ -961,7 +962,7 @@
      * at the source as a function of linear optical intensity (luminance).
      */
 
-    /*
+    /**
      * JPEG File Interchange Format (JFIF)
      *
      * Same model as BT.601-625, but all values (Y, Cb, Cr) range from 0 to 255
@@ -972,7 +973,7 @@
 
     V0_JFIF = STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_FULL,
 
-    /*
+    /**
      * ITU-R Recommendation 601 (BT.601) - 625-line
      *
      * Standard-definition television, 625 Lines (PAL)
@@ -984,7 +985,7 @@
     V0_BT601_625 = STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
 
 
-    /*
+    /**
      * ITU-R Recommendation 601 (BT.601) - 525-line
      *
      * Standard-definition television, 525 Lines (NTSC)
@@ -995,7 +996,7 @@
 
     V0_BT601_525 = STANDARD_BT601_525 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
 
-    /*
+    /**
      * ITU-R Recommendation 709 (BT.709)
      *
      * High-definition television
@@ -1007,7 +1008,7 @@
     V0_BT709 = STANDARD_BT709 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
 
 
-    /*
+    /**
      * SMPTE EG 432-1 and SMPTE RP 431-2.
      *
      * Digital Cinema DCI-P3
@@ -1017,7 +1018,7 @@
     DCI_P3_LINEAR = STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL,
 
 
-    /*
+    /**
      * SMPTE EG 432-1 and SMPTE RP 431-2.
      *
      * Digital Cinema DCI-P3
@@ -1029,7 +1030,7 @@
     DCI_P3 = STANDARD_DCI_P3 | TRANSFER_GAMMA2_6 | RANGE_FULL,
 
 
-    /*
+    /**
      * Display P3
      *
      * Display P3 uses same primaries and white-point as DCI-P3
@@ -1038,7 +1039,7 @@
     DISPLAY_P3_LINEAR = STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL,
 
 
-    /*
+    /**
      * Display P3
      *
      * Use same primaries and white-point as DCI-P3
@@ -1047,7 +1048,7 @@
     DISPLAY_P3 = STANDARD_DCI_P3 | TRANSFER_SRGB | RANGE_FULL,
 
 
-    /*
+    /**
      * Adobe RGB
      *
      * Use full range, gamma 2.2 transfer and Adobe RGB primaries
@@ -1057,7 +1058,7 @@
     ADOBE_RGB = STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2 | RANGE_FULL,
 
 
-    /*
+    /**
      * ITU-R Recommendation 2020 (BT.2020)
      *
      * Ultra High-definition television
@@ -1067,7 +1068,7 @@
     BT2020_LINEAR = STANDARD_BT2020 | TRANSFER_LINEAR | RANGE_FULL,
 
 
-    /*
+    /**
      * ITU-R Recommendation 2020 (BT.2020)
      *
      * Ultra High-definition television
@@ -1076,7 +1077,7 @@
      */
     BT2020 = STANDARD_BT2020 | TRANSFER_SMPTE_170M | RANGE_FULL,
 
-    /*
+    /**
      * ITU-R Recommendation 2020 (BT.2020)
      *
      * Ultra High-definition television
@@ -1086,11 +1087,11 @@
     BT2020_PQ = STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL,
 
 
-    /*
+    /**
      * Data spaces for non-color formats
      */
 
-    /*
+    /**
      * The buffer contains depth ranging measurements from a depth camera.
      * This value is valid with formats:
      *    HAL_PIXEL_FORMAT_Y16: 16-bit samples, consisting of a depth measurement
@@ -1111,7 +1112,7 @@
     DEPTH = 0x1000,
 
 
-    /*
+    /**
      * The buffer contains sensor events from sensor direct report.
      * This value is valid with formats:
      *    HAL_PIXEL_FORMAT_BLOB: an array of sensor event structure that forms
@@ -1121,7 +1122,7 @@
     SENSOR = 0x1001
 };
 
-/*
+/**
  * Color modes that may be supported by a display.
  *
  * Definitions:
@@ -1167,7 +1168,7 @@
  */
 @export(name="android_color_mode_t", value_prefix="HAL_COLOR_MODE_")
 enum ColorMode : int32_t {
-  /*
+  /**
    * DEFAULT is the "native" gamut of the display.
    * White Point: Vendor/OEM defined
    * Panel Gamma: Vendor/OEM defined (typically 2.2)
@@ -1175,7 +1176,7 @@
    */
   NATIVE = 0,
 
-  /*
+  /**
    * STANDARD_BT601_625 corresponds with display
    * settings that implement the ITU-R Recommendation BT.601
    * or Rec 601. Using 625 line version
@@ -1201,7 +1202,7 @@
    */
   STANDARD_BT601_625 = 1,
 
-  /*
+  /**
    * Primaries:
    *                  x       y
    *  green           0.290   0.600
@@ -1221,7 +1222,7 @@
    */
   STANDARD_BT601_625_UNADJUSTED = 2,
 
-  /*
+  /**
    * Primaries:
    *                  x       y
    *  green           0.310   0.595
@@ -1243,7 +1244,7 @@
    */
   STANDARD_BT601_525 = 3,
 
-  /*
+  /**
    * Primaries:
    *                  x       y
    *  green           0.310   0.595
@@ -1263,7 +1264,7 @@
    */
   STANDARD_BT601_525_UNADJUSTED = 4,
 
-  /*
+  /**
    * REC709 corresponds with display settings that implement
    * the ITU-R Recommendation BT.709 / Rec. 709 for high-definition television.
    * Rendering Intent: Colorimetric
@@ -1291,7 +1292,7 @@
    */
   STANDARD_BT709 = 5,
 
-  /*
+  /**
    * DCI_P3 corresponds with display settings that implement
    * SMPTE EG 432-1 and SMPTE RP 431-2
    * Rendering Intent: Colorimetric
@@ -1306,7 +1307,7 @@
    */
   DCI_P3 = 6,
 
-  /*
+  /**
    * SRGB corresponds with display settings that implement
    * the sRGB color space. Uses the same primaries as ITU-R Recommendation
    * BT.709
@@ -1334,7 +1335,7 @@
    */
   SRGB = 7,
 
-  /*
+  /**
    * ADOBE_RGB corresponds with the RGB color space developed
    * by Adobe Systems, Inc. in 1998.
    * Rendering Intent: Colorimetric
@@ -1349,7 +1350,7 @@
    */
   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
@@ -1372,46 +1373,47 @@
   DISPLAY_P3 = 9
 };
 
-/*
+/**
  * Color transforms that may be applied by hardware composer to the whole
  * display.
  */
 @export(name="android_color_transform_t", value_prefix="HAL_COLOR_TRANSFORM_")
 enum ColorTransform : int32_t {
-    /* Applies no transform to the output color */
+    /** Applies no transform to the output color */
     IDENTITY = 0,
 
-    /* Applies an arbitrary transform defined by a 4x4 affine matrix */
+    /** Applies an arbitrary transform defined by a 4x4 affine matrix */
     ARBITRARY_MATRIX = 1,
 
-    /* Applies a transform that inverts the value or luminance of the color, but
+    /**
+     * Applies a transform that inverts the value or luminance of the color, but
      * does not modify hue or saturation */
     VALUE_INVERSE = 2,
 
-    /* Applies a transform that maps all colors to shades of gray */
+    /** Applies a transform that maps all colors to shades of gray */
     GRAYSCALE = 3,
 
-    /* Applies a transform which corrects for protanopic color blindness */
+    /** Applies a transform which corrects for protanopic color blindness */
     CORRECT_PROTANOPIA = 4,
 
-    /* Applies a transform which corrects for deuteranopic color blindness */
+    /** Applies a transform which corrects for deuteranopic color blindness */
     CORRECT_DEUTERANOPIA = 5,
 
-    /* Applies a transform which corrects for tritanopic color blindness */
+    /** Applies a transform which corrects for tritanopic color blindness */
     CORRECT_TRITANOPIA = 6
 };
 
-/*
+/**
  * Supported HDR formats. Must be kept in sync with equivalents in Display.java.
  */
 @export(name="android_hdr_t", value_prefix="HAL_HDR_")
 enum Hdr : int32_t {
-    /* Device supports Dolby Vision HDR */
+    /** Device supports Dolby Vision HDR */
     DOLBY_VISION = 1,
 
-    /* Device supports HDR10 */
+    /** Device supports HDR10 */
     HDR10 = 2,
 
-    /* Device supports hybrid log-gamma HDR */
+    /** Device supports hybrid log-gamma HDR */
     HLG = 3
 };
diff --git a/graphics/composer/2.1/IComposer.hal b/graphics/composer/2.1/IComposer.hal
index 553a537..b3ac761 100644
--- a/graphics/composer/2.1/IComposer.hal
+++ b/graphics/composer/2.1/IComposer.hal
@@ -19,7 +19,7 @@
 import IComposerClient;
 
 interface IComposer {
-    /*
+    /**
      * Optional capabilities which may be supported by some devices. The
      * particular set of supported capabilities for a given device may be
      * retrieved using getCapabilities.
@@ -27,7 +27,7 @@
     enum Capability : int32_t {
         INVALID = 0,
 
-        /*
+        /**
          * Specifies that the device supports sideband stream layers, for
          * which buffer content updates and other synchronization will not be
          * provided through the usual validate/present cycle and must be
@@ -37,7 +37,7 @@
          */
         SIDEBAND_STREAM = 1,
 
-        /*
+        /**
          * Specifies that the device will apply a color transform even when
          * either the client or the device has chosen that all layers should
          * be composed by the client. This will prevent the client from
@@ -46,7 +46,7 @@
         SKIP_CLIENT_COLOR_TRANSFORM = 2,
     };
 
-    /*
+    /**
      * Provides a list of supported capabilities (as described in the
      * definition of Capability above). This list must not change after
      * initialization.
@@ -58,7 +58,7 @@
     @callflow(next="*")
     getCapabilities() generates (vec<Capability> capabilities);
 
-    /*
+    /**
      * Retrieves implementation-defined debug information, which will be
      * displayed during, for example, `dumpsys SurfaceFlinger`.
      *
@@ -69,7 +69,7 @@
     @callflow(next="*")
     dumpDebugInfo() generates (string debugInfo);
 
-    /*
+    /**
      * Creates a client of the composer. All resources created by the client
      * are owned by the client and are only visible to the client.
      *
diff --git a/graphics/composer/2.1/IComposerCallback.hal b/graphics/composer/2.1/IComposerCallback.hal
index 541d7eb..ab74c30 100644
--- a/graphics/composer/2.1/IComposerCallback.hal
+++ b/graphics/composer/2.1/IComposerCallback.hal
@@ -20,13 +20,13 @@
     enum Connection : int32_t {
         INVALID = 0,
 
-        /* The display has been connected */
+        /** The display has been connected */
         CONNECTED = 1,
-        /* The display has been disconnected */
+        /** The display has been disconnected */
         DISCONNECTED = 2,
     };
 
-    /*
+    /**
      * Notifies the client that the given display has either been connected or
      * disconnected. Every active display (even a built-in physical display)
      * must trigger at least one hotplug notification, even if it only occurs
@@ -47,7 +47,7 @@
     @callflow(next="*")
     onHotplug(Display display, Connection connected);
 
-    /*
+    /**
      * Notifies the client to trigger a screen refresh. This forces all layer
      * state for this display to be resent, and the display to be validated
      * and presented, even if there have been no changes.
@@ -61,7 +61,7 @@
     @callflow(next="*")
     oneway onRefresh(Display display);
 
-    /*
+    /**
      * Notifies the client that a vsync event has occurred. This callback must
      * only be triggered when vsync is enabled for this display (through
      * setVsyncEnabled).
diff --git a/graphics/composer/2.1/IComposerClient.hal b/graphics/composer/2.1/IComposerClient.hal
index 107ac5e..85572d4 100644
--- a/graphics/composer/2.1/IComposerClient.hal
+++ b/graphics/composer/2.1/IComposerClient.hal
@@ -20,18 +20,18 @@
 import IComposerCallback;
 
 interface IComposerClient {
-    /* Display attributes queryable through getDisplayAttribute. */
+    /** Display attributes queryable through getDisplayAttribute. */
     enum Attribute : int32_t {
         INVALID = 0,
 
-        /* Dimensions in pixels */
+        /** Dimensions in pixels */
         WIDTH = 1,
         HEIGHT = 2,
 
-        /* Vsync period in nanoseconds */
+        /** Vsync period in nanoseconds */
         VSYNC_PERIOD = 3,
 
-        /*
+        /**
          * Dots per thousand inches (DPI * 1000). Scaling by 1000 allows these
          * numbers to be stored in an int32_t without losing too much
          * precision. If the DPI for a configuration is unavailable or is
@@ -41,15 +41,15 @@
         DPI_Y = 5,
     };
 
-    /* Display requests returned by getDisplayRequests. */
+    /** Display requests returned by getDisplayRequests. */
     enum DisplayRequest : uint32_t {
-        /*
+        /**
          * Instructs the client to provide a new client target buffer, even if
          * no layers are marked for client composition.
          */
         FLIP_CLIENT_TARGET = 1 << 0,
 
-        /*
+        /**
          * Instructs the client to write the result of client composition
          * directly into the virtual display output buffer. If any of the
          * layers are not marked as Composition::CLIENT or the given display
@@ -58,9 +58,9 @@
         WRITE_CLIENT_TARGET_TO_OUTPUT = 1 << 1,
     };
 
-    /* Layer requests returned from getDisplayRequests. */
+    /** Layer requests returned from getDisplayRequests. */
     enum LayerRequest : uint32_t {
-        /*
+        /**
          * The client must clear its target with transparent pixels where
          * this layer would be. The client may ignore this request if the
          * layer must be blended.
@@ -68,24 +68,24 @@
         CLEAR_CLIENT_TARGET = 1 << 0,
     };
 
-    /* Power modes for use with setPowerMode. */
+    /** Power modes for use with setPowerMode. */
     enum PowerMode : int32_t {
-        /* The display is fully off (blanked). */
+        /** The display is fully off (blanked). */
         OFF = 0,
 
-        /*
+        /**
          * These are optional low power modes. getDozeSupport may be called to
          * determine whether a given display supports these modes.
          */
 
-        /*
+        /**
          * The display is turned on and configured in a low power state that
          * is suitable for presenting ambient information to the user,
          * possibly with lower fidelity than ON, but with greater efficiency.
          */
         DOZE = 1,
 
-        /*
+        /**
          * The display is configured as in DOZE but may stop applying display
          * updates from the client. This is effectively a hint to the device
          * that drawing to the display has been suspended and that the the
@@ -100,40 +100,40 @@
          */
         DOZE_SUSPEND = 3,
 
-        /* The display is fully on. */
+        /** The display is fully on. */
         ON = 2,
     };
 
-    /* Vsync values passed to setVsyncEnabled. */
+    /** Vsync values passed to setVsyncEnabled. */
     enum Vsync : int32_t {
         INVALID = 0,
 
-        /* Enable vsync. */
+        /** Enable vsync. */
         ENABLE = 1,
 
-        /* Disable vsync. */
+        /** Disable vsync. */
         DISABLE = 2,
     };
 
-    /* Blend modes, settable per layer. */
+    /** Blend modes, settable per layer. */
     enum BlendMode : int32_t {
         INVALID = 0,
 
-        /* colorOut = colorSrc */
+        /** colorOut = colorSrc */
         NONE = 1,
 
-        /* colorOut = colorSrc + colorDst * (1 - alphaSrc) */
+        /** colorOut = colorSrc + colorDst * (1 - alphaSrc) */
         PREMULTIPLIED = 2,
 
-        /* colorOut = colorSrc * alphaSrc + colorDst * (1 - alphaSrc) */
+        /** colorOut = colorSrc * alphaSrc + colorDst * (1 - alphaSrc) */
         COVERAGE = 3,
     };
 
-    /* Possible composition types for a given layer. */
+    /** Possible composition types for a given layer. */
     enum Composition : int32_t {
         INVALID = 0,
 
-        /*
+        /**
          * The client must composite this layer into the client target buffer
          * (provided to the device through setClientTarget).
          *
@@ -142,7 +142,7 @@
          */
         CLIENT = 1,
 
-        /*
+        /**
          * The device must handle the composition of this layer through a
          * hardware overlay or other similar means.
          *
@@ -151,7 +151,7 @@
          */
         DEVICE = 2,
 
-        /*
+        /**
          * The device must render this layer using the color set through
          * setLayerColor. If this functionality is not supported on a layer
          * that the client sets to SOLID_COLOR, the device must request that
@@ -163,7 +163,7 @@
          */
         SOLID_COLOR = 3,
 
-        /*
+        /**
          * Similar to DEVICE, but the position of this layer may also be set
          * asynchronously through setCursorPosition. If this functionality is
          * not supported on a layer that the client sets to CURSOR, the device
@@ -177,7 +177,7 @@
          */
         CURSOR = 4,
 
-        /*
+        /**
          * The device must handle the composition of this layer, as well as
          * its buffer updates and content synchronization. Only supported on
          * devices which provide Capability::SIDEBAND_STREAM.
@@ -189,26 +189,26 @@
         SIDEBAND = 5,
     };
 
-    /* Display types returned by getDisplayType. */
+    /** Display types returned by getDisplayType. */
     enum DisplayType : int32_t {
         INVALID = 0,
 
-        /*
+        /**
          * All physical displays, including both internal displays and
          * hotpluggable external displays.
          */
         PHYSICAL = 1,
 
-        /* Virtual displays created by createVirtualDisplay. */
+        /** Virtual displays created by createVirtualDisplay. */
         VIRTUAL = 2,
     };
 
-    /* Special index values (always negative) for command queue commands. */
+    /** Special index values (always negative) for command queue commands. */
     enum HandleIndex : int32_t {
-        /* No handle */
+        /** No handle */
         EMPTY = -1,
 
-        /* Use cached handle */
+        /** Use cached handle */
         CACHED = -2,
     };
 
@@ -233,7 +233,7 @@
         uint8_t a;
     };
 
-    /*
+    /**
      * Provides a IComposerCallback object for the device to call.
      *
      * This function must be called only once.
@@ -244,7 +244,7 @@
     @callflow(next="*")
     registerCallback(IComposerCallback callback);
 
-    /*
+    /**
      * Returns the maximum number of virtual displays supported by this device
      * (which may be 0). The client must not attempt to create more than this
      * many virtual displays on this device. This number must not change for
@@ -255,7 +255,7 @@
     @callflow(next="*")
     getMaxVirtualDisplayCount() generates (uint32_t count);
 
-    /*
+    /**
      * Creates a new virtual display with the given width and height. The
      * format passed into this function is the default format requested by the
      * consumer of the virtual display output buffers.
@@ -286,7 +286,7 @@
                          Display display,
                          PixelFormat format);
 
-    /*
+    /**
      * Destroys a virtual display. After this call all resources consumed by
      * this display may be freed by the device and any operations performed on
      * this display must fail.
@@ -300,7 +300,7 @@
     @callflow(next="*")
     destroyVirtualDisplay(Display display) generates (Error error);
 
-    /*
+    /**
      * Creates a new layer on the given display.
      *
      * @param display is the display on which to create the layer.
@@ -317,7 +317,7 @@
      generates (Error error,
                 Layer layer);
 
-    /*
+    /**
      * Destroys the given layer.
      *
      * @param display is the display on which the layer was created.
@@ -329,7 +329,7 @@
     @callflow(next="*")
     destroyLayer(Display display, Layer layer) generates (Error error);
 
-    /*
+    /**
      * Retrieves which display configuration is currently active.
      *
      * If no display configuration is currently active, this function must
@@ -346,7 +346,7 @@
     @callflow(next="*")
     getActiveConfig(Display display) generates (Error error, Config config);
 
-    /*
+    /**
      * Returns whether a client target with the given properties can be
      * handled by the device.
      *
@@ -373,7 +373,7 @@
                            Dataspace dataspace)
                 generates (Error error);
 
-    /*
+    /**
      * Returns the color modes supported on this display.
      *
      * All devices must support at least ColorMode::NATIVE.
@@ -388,7 +388,7 @@
        generates (Error error,
                   vec<ColorMode> modes);
 
-    /*
+    /**
      * Returns a display attribute value for a particular display
      * configuration.
      *
@@ -410,7 +410,7 @@
              generates (Error error,
                         int32_t value);
 
-    /*
+    /**
      * Returns handles for all of the valid display configurations on this
      * display.
      *
@@ -424,7 +424,7 @@
            generates (Error error,
                       vec<Config> configs);
 
-    /*
+    /**
      * Returns a human-readable version of the display's name.
      *
      * @return error is NONE upon success. Otherwise,
@@ -434,7 +434,7 @@
     @callflow(next="*")
     getDisplayName(Display display) generates (Error error, string name);
 
-    /*
+    /**
      * Returns whether the given display is a physical or virtual display.
      *
      * @param display is the display to query.
@@ -445,7 +445,7 @@
     @callflow(next="*")
     getDisplayType(Display display) generates (Error error, DisplayType type);
 
-    /*
+    /**
      * Returns whether the given display supports PowerMode::DOZE and
      * PowerMode::DOZE_SUSPEND. DOZE_SUSPEND may not provide any benefit over
      * DOZE (see the definition of PowerMode for more information), but if
@@ -460,7 +460,7 @@
     @callflow(next="*")
     getDozeSupport(Display display) generates (Error error, bool support);
 
-    /*
+    /**
      * Returns the high dynamic range (HDR) capabilities of the given display,
      * which are invariant with regard to the active configuration.
      *
@@ -486,7 +486,7 @@
                        float maxAverageLuminance,
                        float minLuminance);
 
-    /*
+    /**
      * Set the number of client target slots to be reserved.
      *
      * @param display is the display to which the slots are reserved.
@@ -500,7 +500,7 @@
                              uint32_t clientTargetSlotCount)
                   generates (Error error);
 
-    /*
+    /**
      * Sets the active configuration for this display. Upon returning, the
      * given display configuration must be active and remain so until either
      * this function is called again or the display is disconnected.
@@ -515,7 +515,7 @@
     @callflow(next="*")
     setActiveConfig(Display display, Config config) generates (Error error);
 
-    /*
+    /**
      * Sets the color mode of the given display.
      *
      * Upon returning from this function, the color mode change must have
@@ -534,7 +534,7 @@
     @callflow(next="*")
     setColorMode(Display display, ColorMode mode) generates (Error error);
 
-    /*
+    /**
      * Sets the power mode of the given display. The transition must be
      * complete when this function returns. It is valid to call this function
      * multiple times with the same power mode.
@@ -553,7 +553,7 @@
     @callflow(next="*")
     setPowerMode(Display display, PowerMode mode) generates (Error error);
 
-    /*
+    /**
      * Enables or disables the vsync signal for the given display. Virtual
      * displays never generate vsync callbacks, and any attempt to enable
      * vsync for a virtual display though this function must succeed and have
@@ -568,7 +568,7 @@
     @callflow(next="*")
     setVsyncEnabled(Display display, Vsync enabled) generates (Error error);
 
-    /*
+    /**
      * Sets the input command message queue.
      *
      * @param descriptor is the descriptor of the input command message queue.
@@ -579,7 +579,7 @@
     setInputCommandQueue(fmq_sync<uint32_t> descriptor)
               generates (Error error);
 
-    /*
+    /**
      * Gets the output command message queue.
      *
      * This function must only be called inside executeCommands closure.
@@ -593,7 +593,7 @@
               generates (Error error,
                          fmq_sync<uint32_t> descriptor);
 
-    /*
+    /**
      * Executes commands from the input command message queue. Return values
      * generated by the input commands are written to the output command
      * message queue in the form of value commands.
@@ -620,7 +620,7 @@
                     uint32_t outLength,
                     vec<handle> outHandles);
 
-    /*
+    /**
      * SELECT_DISPLAY has this pseudo prototype
      *
      *   selectDisplay(Display display);
@@ -1099,18 +1099,18 @@
         OPCODE_SHIFT                       = 16,
         OPCODE_MASK                        = 0xffff << OPCODE_SHIFT,
 
-        /* special commands */
+        /** special commands */
         SELECT_DISPLAY                     = 0x000 << OPCODE_SHIFT,
         SELECT_LAYER                       = 0x001 << OPCODE_SHIFT,
 
-        /* value commands (for return values) */
+        /** value commands (for return values) */
         SET_ERROR                          = 0x100 << OPCODE_SHIFT,
         SET_CHANGED_COMPOSITION_TYPES      = 0x101 << OPCODE_SHIFT,
         SET_DISPLAY_REQUESTS               = 0x102 << OPCODE_SHIFT,
         SET_PRESENT_FENCE                  = 0x103 << OPCODE_SHIFT,
         SET_RELEASE_FENCES                 = 0x104 << OPCODE_SHIFT,
 
-        /* display commands */
+        /** display commands */
         SET_COLOR_TRANSFORM                = 0x200 << OPCODE_SHIFT,
         SET_CLIENT_TARGET                  = 0x201 << OPCODE_SHIFT,
         SET_OUTPUT_BUFFER                  = 0x202 << OPCODE_SHIFT,
@@ -1118,12 +1118,12 @@
         ACCEPT_DISPLAY_CHANGES             = 0x204 << OPCODE_SHIFT,
         PRESENT_DISPLAY                    = 0x205 << OPCODE_SHIFT,
 
-        /* layer commands (VALIDATE_DISPLAY not required) */
+        /** layer commands (VALIDATE_DISPLAY not required) */
         SET_LAYER_CURSOR_POSITION          = 0x300 << OPCODE_SHIFT,
         SET_LAYER_BUFFER                   = 0x301 << OPCODE_SHIFT,
         SET_LAYER_SURFACE_DAMAGE           = 0x302 << OPCODE_SHIFT,
 
-        /* layer state commands (VALIDATE_DISPLAY required) */
+        /** layer state commands (VALIDATE_DISPLAY required) */
         SET_LAYER_BLEND_MODE               = 0x400 << OPCODE_SHIFT,
         SET_LAYER_COLOR                    = 0x401 << OPCODE_SHIFT,
         SET_LAYER_COMPOSITION_TYPE         = 0x402 << OPCODE_SHIFT,
@@ -1136,7 +1136,7 @@
         SET_LAYER_VISIBLE_REGION           = 0x409 << OPCODE_SHIFT,
         SET_LAYER_Z_ORDER                  = 0x40a << OPCODE_SHIFT,
 
-        /* 0x800 - 0xfff are reserved for vendor extensions */
-        /* 0x1000 - 0xffff are reserved */
+        /** 0x800 - 0xfff are reserved for vendor extensions */
+        /** 0x1000 - 0xffff are reserved */
     };
 };
diff --git a/graphics/composer/2.1/types.hal b/graphics/composer/2.1/types.hal
index e54031e..9f0dd8b 100644
--- a/graphics/composer/2.1/types.hal
+++ b/graphics/composer/2.1/types.hal
@@ -16,17 +16,17 @@
 
 package android.hardware.graphics.composer@2.1;
 
-/* Return codes from all functions. */
+/** Return codes from all functions. */
 enum Error : int32_t {
-    NONE            = 0, /* no error */
-    BAD_CONFIG      = 1, /* invalid Config */
-    BAD_DISPLAY     = 2, /* invalid Display */
-    BAD_LAYER       = 3, /* invalid Layer */
-    BAD_PARAMETER   = 4, /* invalid width, height, etc. */
-    /* 5 is reserved */
-    NO_RESOURCES    = 6, /* temporary failure due to resource contention */
-    NOT_VALIDATED   = 7, /* validateDisplay has not been called */
-    UNSUPPORTED     = 8, /* permanent failure */
+    NONE            = 0, /** no error */
+    BAD_CONFIG      = 1, /** invalid Config */
+    BAD_DISPLAY     = 2, /** invalid Display */
+    BAD_LAYER       = 3, /** invalid Layer */
+    BAD_PARAMETER   = 4, /** invalid width, height, etc. */
+    /** 5 is reserved */
+    NO_RESOURCES    = 6, /** temporary failure due to resource contention */
+    NOT_VALIDATED   = 7, /** validateDisplay has not been called */
+    UNSUPPORTED     = 8, /** permanent failure */
 };
 
 typedef uint32_t Config;
diff --git a/graphics/mapper/2.0/IMapper.hal b/graphics/mapper/2.0/IMapper.hal
index 21a6dfa..573dcd0 100644
--- a/graphics/mapper/2.0/IMapper.hal
+++ b/graphics/mapper/2.0/IMapper.hal
@@ -27,7 +27,7 @@
         int32_t height;
     };
 
-    /*
+    /**
      * Adds a reference to the given buffer handle.
      *
      * A buffer handle received from a remote process or exported by
@@ -49,7 +49,7 @@
     @callflow(next="*")
     retain(handle bufferHandle) generates (Error error);
 
-    /*
+    /**
      * Removes a reference from the given buffer buffer.
      *
      * If no references remain, the buffer handle must be freed with
@@ -65,7 +65,7 @@
     @exit
     release(handle bufferHandle) generates (Error error);
 
-    /*
+    /**
      * Gets the width and height of the buffer in pixels.
      *
      * See IAllocator::BufferDescriptorInfo for more information.
@@ -82,7 +82,7 @@
                   uint32_t width,
                   uint32_t height);
 
-    /*
+    /**
      * Gets the format of the buffer.
      *
      * See IAllocator::BufferDescriptorInfo for more information.
@@ -97,7 +97,7 @@
         generates (Error error,
                    PixelFormat format);
 
-    /*
+    /**
      * Gets the number of layers of the buffer.
      *
      * See IAllocator::BufferDescriptorInfo for more information.
@@ -112,7 +112,7 @@
        generates (Error error,
                   uint32_t layerCount);
 
-    /*
+    /**
      * Gets the producer usage flags which were used to allocate this buffer.
      *
      * See IAllocator::BufferDescriptorInfo for more information.
@@ -128,7 +128,7 @@
               generates (Error error,
                          uint64_t usageMask);
 
-    /*
+    /**
      * Gets the consumer usage flags which were used to allocate this buffer.
      *
      * See IAllocator::BufferDescriptorInfo for more information.
@@ -144,7 +144,7 @@
               generates (Error error,
                          uint64_t usageMask);
 
-    /*
+    /**
      * Gets a value that uniquely identifies the backing store of the given
      * buffer.
      *
@@ -165,7 +165,7 @@
          generates (Error error,
                     BackingStore store);
 
-    /*
+    /**
      * Gets the stride of the buffer in pixels.
      *
      * The stride is the offset in pixel-sized elements between the same
@@ -185,7 +185,7 @@
         generates (Error error,
                    uint32_t stride);
 
-    /*
+    /**
      * Locks the given buffer for the specified CPU usage.
      *
      * Exactly one of producerUsageMask and consumerUsageMask must be 0. The
@@ -247,7 +247,7 @@
         generates (Error error,
                    pointer data);
 
-    /*
+    /**
      * This is largely the same as lock(), except that instead of returning a
      * pointer directly to the buffer data, it returns an FlexLayout struct
      * describing how to access the data planes.
@@ -296,7 +296,7 @@
         generates (Error error,
                    FlexLayout layout);
 
-    /*
+    /**
      * This function indicates to the device that the client will be done with
      * the buffer when releaseFence signals.
      *
diff --git a/graphics/mapper/2.0/types.hal b/graphics/mapper/2.0/types.hal
index aa33141..2946e85 100644
--- a/graphics/mapper/2.0/types.hal
+++ b/graphics/mapper/2.0/types.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.graphics.mapper@2.0;
 
-/*
+/**
  * Structures for describing flexible YUVA/RGBA formats for consumption by
  * applications. Such flexible formats contain a plane for each component (e.g.
  * red, green, blue), where each plane is laid out in a grid-like pattern
@@ -49,19 +49,19 @@
  */
 
 enum FlexComponent : int32_t {
-    Y  = 1 << 0, /* luma */
-    CB = 1 << 1, /* chroma blue */
-    CR = 1 << 2, /* chroma red */
+    Y  = 1 << 0, /** luma */
+    CB = 1 << 1, /** chroma blue */
+    CR = 1 << 2, /** chroma red */
 
-    R  = 1 << 10, /* red */
-    G  = 1 << 11, /* green */
-    B  = 1 << 12, /* blue */
+    R  = 1 << 10, /** red */
+    G  = 1 << 11, /** green */
+    B  = 1 << 12, /** blue */
 
-    A  = 1 << 30, /* alpha */
+    A  = 1 << 30, /** alpha */
 };
 
 enum FlexFormat : int32_t {
-    /* not a flexible format */
+    /** not a flexible format */
     INVALID = 0x0,
 
     Y       = FlexComponent:Y,
@@ -73,38 +73,38 @@
 };
 
 struct FlexPlane {
-    /* Pointer to the first byte of the top-left pixel of the plane. */
+    /** Pointer to the first byte of the top-left pixel of the plane. */
     pointer topLeft;
 
     FlexComponent component;
 
-    /*
+    /**
      * Bits allocated for the component in each pixel. Must be a positive
      * multiple of 8.
      */
     int32_t bitsPerComponent;
 
-    /*
+    /**
      * Number of the most significant bits used in the format for this
      * component. Must be between 1 and bitsPerComponent, inclusive.
      */
     int32_t bitsUsed;
 
-    /* Horizontal increment. */
+    /** Horizontal increment. */
     int32_t hIncrement;
-    /* Vertical increment. */
+    /** Vertical increment. */
     int32_t vIncrement;
-    /* Horizontal subsampling. Must be a positive power of 2. */
+    /** Horizontal subsampling. Must be a positive power of 2. */
     int32_t hSubsampling;
-    /* Vertical subsampling. Must be a positive power of 2. */
+    /** Vertical subsampling. Must be a positive power of 2. */
     int32_t vSubsampling;
 };
 
 struct FlexLayout {
-    /* The kind of flexible format. */
+    /** The kind of flexible format. */
     FlexFormat format;
 
-    /*
+    /**
      * A plane for each component; ordered in increasing component value
      * order. E.g. FlexFormat::RGBA maps 0 -> R, 1 -> G, etc.  Can have size 0
      * for FlexFormat::INVALID.
@@ -112,5 +112,5 @@
     vec<FlexPlane> planes;
 };
 
-/* Backing store ID of a buffer. See IMapper::getBackingStore. */
+/** Backing store ID of a buffer. See IMapper::getBackingStore. */
 typedef uint64_t BackingStore;
diff --git a/health/1.0/types.hal b/health/1.0/types.hal
index c5b5cc1..377d1bd 100644
--- a/health/1.0/types.hal
+++ b/health/1.0/types.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.health@1.0;
 
-/*
+/**
  * Possible return values for optional HAL method(s) like
  * IHealth::energyCounter()
  */
@@ -26,7 +26,7 @@
     UNKNOWN,
 };
 
-/*
+/**
  * Possible values for Battery Status.
  * Note: These are currently in sync with BatteryManager and must not
  * be extended / altered.
@@ -36,7 +36,7 @@
     UNKNOWN = 1,
     CHARGING = 2,
     DISCHARGING = 3,
-    /*
+    /**
      * Battery is *not* charging - special case when charger is present
      * but battery isn't charging
      */
@@ -44,7 +44,7 @@
     FULL = 5,
 };
 
-/*
+/**
  * Possible values for Battery Health.
  * Note: These are currently in sync with BatteryManager and must not
  * be extended / altered.
@@ -56,7 +56,7 @@
     OVERHEAT = 3,
     DEAD = 4,
     OVER_VOLTAGE = 5,
-    /*
+    /**
      * Battery experienced an unknown/unspecifid failure.
      */
     UNSPECIFIED_FAILURE = 6,
@@ -65,149 +65,149 @@
 
 struct HealthConfig {
 
-    /*
+    /**
      * periodicChoresIntervalFast is used while the device is not in
      * suspend, or in suspend and connected to a charger (to watch for battery
      * overheat due to charging)
      */
     int32_t periodicChoresIntervalFast;
 
-    /*
+    /**
      * periodicChoresIntervalSlow is used when the device is in suspend and
      * not connected to a charger (to watch for a battery drained to zero
      * remaining capacity).
      */
     int32_t periodicChoresIntervalSlow;
 
-    /*
+    /**
      * power_supply sysfs attribute file paths. Set these to specific paths
      * to use for the associated battery parameters. Clients must search
      * for appropriate power_supply attribute files to use, for any paths
      * left empty after the HAL is initialized.
      */
 
-    /*
+    /**
      * batteryStatusPath - file path to read battery charging status.
      * (POWER_SUPPLY_PROP_STATUS)
      */
     string batteryStatusPath;
 
 
-    /*
+    /**
      * batteryHealthPath - file path to read battery health.
      * (POWER_SUPPLY_PROP_HEALTH)
      */
     string batteryHealthPath;
 
-    /*
+    /**
      * batteryPresentPath - file path to read battery present status.
      * (POWER_SUPPLY_PROP_PRESENT)
      */
     string batteryPresentPath;
 
 
-    /*
+    /**
      * batteryCapacityPath - file path to read remaining battery capacity.
      * (POWER_SUPPLY_PROP_CAPACITY)
      */
     string batteryCapacityPath;
 
-    /*
+    /**
      * batteryVoltagePath - file path to read battery voltage.
      * (POWER_SUPPLY_PROP_VOLTAGE_NOW)
      */
     string batteryVoltagePath;
 
-    /*
+    /**
      * batteryTemperaturePath - file path to read battery temperature in tenths
      * of degree celcius. (POWER_SUPPLY_PROP_TEMP)
      */
     string batteryTemperaturePath;
 
-    /*
+    /**
      * batteryTechnologyPath - file path to read battery technology.
      * (POWER_SUPPLY_PROP_TECHNOLOGY)
      */
     string batteryTechnologyPath;
 
-    /*
+    /**
      * batteryCurrentNowPath - file path to read battery instantaneous current.
      * (POWER_SUPPLY_PROP_CURRENT_NOW)
      */
     string batteryCurrentNowPath;
 
-    /*
+    /**
      * batteryCurrentAvgPath - file path to read battery average current.
      * (POWER_SUPPLY_PROP_CURRENT_AVG)
      */
     string batteryCurrentAvgPath;
 
-    /*
+    /**
      * batteryChargeCounterPath - file path to read battery accumulated charge.
      * (POWER_SUPPLY_PROP_CHARGE_COUNTER)
      */
     string batteryChargeCounterPath;
 
-    /*
+    /**
      * batteryFullChargerPath - file path to read battery charge value when it
      * is considered to be full. (POWER_SUPPLY_PROP_CHARGE_FULL)
      */
     string batteryFullChargePath;
 
-    /*
+    /**
      * batteryCycleCountPath - file path to read battery charge cycle count.
      * (POWER_SUPPLY_PROP_CYCLE_COUNT)
      */
     string batteryCycleCountPath;
 };
 
-/*
+/**
  * The parameter to healthd mainloop update calls
  */
 struct HealthInfo {
-    /* AC charger state - 'true' if online */
+    /** AC charger state - 'true' if online */
     bool chargerAcOnline;
 
-    /* USB charger state - 'true' if online */
+    /** USB charger state - 'true' if online */
     bool chargerUsbOnline;
 
-    /* Wireless charger state - 'true' if online */
+    /** Wireless charger state - 'true' if online */
     bool chargerWirelessOnline;
 
-    /* Maximum charging current supported by charger in uA */
+    /** Maximum charging current supported by charger in uA */
     int32_t maxChargingCurrent;
 
-    /* Maximum charging voltage supported by charger in uV */
+    /** Maximum charging voltage supported by charger in uV */
     int32_t maxChargingVoltage;
 
     BatteryStatus batteryStatus;
 
     BatteryHealth batteryHealth;
 
-    /* 'true' if battery is present */
+    /** 'true' if battery is present */
     bool batteryPresent;
 
-    /* Remaining battery capacity in percent */
+    /** Remaining battery capacity in percent */
     int32_t batteryLevel;
 
-    /* Instantaneous battery voltage in uV */
+    /** Instantaneous battery voltage in uV */
     int32_t batteryVoltage;
 
-    /* Instantaneous battery temperature in tenths of degree celcius */
+    /** Instantaneous battery temperature in tenths of degree celcius */
     int32_t batteryTemperature;
 
-    /* Instantaneous battery current in uA */
+    /** Instantaneous battery current in uA */
     int32_t batteryCurrent;
 
-    /* Battery charge cycle count */
+    /** Battery charge cycle count */
     int32_t batteryCycleCount;
 
-    /* Battery charge value when it is considered to be "full" in uA-h */
+    /** Battery charge value when it is considered to be "full" in uA-h */
     int32_t batteryFullCharge;
 
-    /* Instantaneous battery capacity in uA-h */
+    /** Instantaneous battery capacity in uA-h */
     int32_t batteryChargeCounter;
 
-    /* Battery technology, e.g. "Li-ion, Li-Poly" etc. */
+    /** Battery technology, e.g. "Li-ion, Li-Poly" etc. */
     string batteryTechnology;
 };
diff --git a/keymaster/3.0/default/KeymasterDevice.cpp b/keymaster/3.0/default/KeymasterDevice.cpp
index 720b946..6b4524b 100644
--- a/keymaster/3.0/default/KeymasterDevice.cpp
+++ b/keymaster/3.0/default/KeymasterDevice.cpp
@@ -698,14 +698,21 @@
     return legacy_enum_conversion(keymaster_device_->abort(keymaster_device_, operationHandle));
 }
 
-IKeymasterDevice* HIDL_FETCH_IKeymasterDevice(const char* /* name */) {
+IKeymasterDevice* HIDL_FETCH_IKeymasterDevice(const char* name) {
     keymaster2_device_t* dev = nullptr;
 
-    uint32_t version;
-    bool supports_ec;
-    bool supports_all_digests;
-    auto rc = keymaster_device_initialize(&dev, &version, &supports_ec, &supports_all_digests);
-    if (rc) return nullptr;
+    ALOGI("Fetching keymaster device name %s", name);
+
+    uint32_t version = -1;
+    bool supports_ec = false;
+    bool supports_all_digests = false;
+
+    if (name && strcmp(name, "softwareonly") == 0) {
+        dev = (new SoftKeymasterDevice(new SoftwareOnlyHidlKeymasterContext))->keymaster2_device();
+    } else if (name && strcmp(name, "default") == 0) {
+        auto rc = keymaster_device_initialize(&dev, &version, &supports_ec, &supports_all_digests);
+        if (rc) return nullptr;
+    }
 
     auto kmrc = ::keymaster::ConfigureDevice(dev);
     if (kmrc != KM_ERROR_OK) {
diff --git a/keymaster/3.0/types.hal b/keymaster/3.0/types.hal
index 1f4a0cc..6dad23e 100644
--- a/keymaster/3.0/types.hal
+++ b/keymaster/3.0/types.hal
@@ -17,40 +17,40 @@
 package android.hardware.keymaster@3.0;
 
 enum TagType : uint32_t {
-    INVALID = 0 << 28, /* Invalid type, used to designate a tag as uninitialized */
+    INVALID = 0 << 28, /** Invalid type, used to designate a tag as uninitialized */
     ENUM = 1 << 28,
-    ENUM_REP = 2 << 28, /* Repeatable enumeration value. */
+    ENUM_REP = 2 << 28, /** Repeatable enumeration value. */
     UINT = 3 << 28,
-    UINT_REP = 4 << 28, /* Repeatable integer value */
+    UINT_REP = 4 << 28, /** Repeatable integer value */
     ULONG = 5 << 28,
     DATE = 6 << 28,
     BOOL = 7 << 28,
     BIGNUM = 8 << 28,
     BYTES = 9 << 28,
-    ULONG_REP = 10 << 28, /* Repeatable long value */
+    ULONG_REP = 10 << 28, /** Repeatable long value */
 };
 
 enum Tag : uint32_t {
     INVALID = TagType:INVALID | 0,
 
-    /*
+    /**
      * Tags that must be semantically enforced by hardware and software implementations.
      */
 
-    /* Crypto parameters */
-    PURPOSE = TagType:ENUM_REP | 1,    /* KeyPurpose. */
-    ALGORITHM = TagType:ENUM | 2,      /* Algorithm. */
-    KEY_SIZE = TagType:UINT | 3,       /* Key size in bits. */
-    BLOCK_MODE = TagType:ENUM_REP | 4, /* BlockMode. */
-    DIGEST = TagType:ENUM_REP | 5,     /* Digest. */
-    PADDING = TagType:ENUM_REP | 6,    /* PaddingMode. */
-    CALLER_NONCE = TagType:BOOL | 7,   /* Allow caller to specify nonce or IV. */
+    /** Crypto parameters */
+    PURPOSE = TagType:ENUM_REP | 1,    /** KeyPurpose. */
+    ALGORITHM = TagType:ENUM | 2,      /** Algorithm. */
+    KEY_SIZE = TagType:UINT | 3,       /** Key size in bits. */
+    BLOCK_MODE = TagType:ENUM_REP | 4, /** BlockMode. */
+    DIGEST = TagType:ENUM_REP | 5,     /** Digest. */
+    PADDING = TagType:ENUM_REP | 6,    /** PaddingMode. */
+    CALLER_NONCE = TagType:BOOL | 7,   /** Allow caller to specify nonce or IV. */
     MIN_MAC_LENGTH = TagType:UINT | 8, /* Minimum length of MAC or AEAD authentication tag in
                                         * bits. */
-    KDF = TagType:ENUM_REP | 9,        /* KeyDerivationFunction. */
-    EC_CURVE = TagType:ENUM | 10,      /* EcCurve. */
+    KDF = TagType:ENUM_REP | 9,        /** KeyDerivationFunction. */
+    EC_CURVE = TagType:ENUM | 10,      /** EcCurve. */
 
-    /* Algorithm-specific. */
+    /** Algorithm-specific. */
     RSA_PUBLIC_EXPONENT = TagType:ULONG | 200,
     ECIES_SINGLE_HASH_MODE = TagType:BOOL | 201, /* Whether the ephemeral public key is fed into the
                                                   * KDF. */
@@ -58,17 +58,17 @@
                                                   * will contain an application-scoped and
                                                   * time-bounded device-unique ID.*/
 
-    /* Other hardware-enforced. */
-    BLOB_USAGE_REQUIREMENTS = TagType:ENUM | 301, /* KeyBlobUsageRequirements. */
-    BOOTLOADER_ONLY = TagType:BOOL | 302,         /* Usable only by bootloader. */
+    /** Other hardware-enforced. */
+    BLOB_USAGE_REQUIREMENTS = TagType:ENUM | 301, /** KeyBlobUsageRequirements. */
+    BOOTLOADER_ONLY = TagType:BOOL | 302,         /** Usable only by bootloader. */
 
-    /*
+    /**
      * Tags that should be semantically enforced by hardware if possible and will otherwise be
      * enforced by software (keystore).
      */
 
-    /* Key validity period */
-    ACTIVE_DATETIME = TagType:DATE | 400,             /* Start of validity. */
+    /** Key validity period */
+    ACTIVE_DATETIME = TagType:DATE | 400,             /** Start of validity. */
     ORIGINATION_EXPIRE_DATETIME = TagType:DATE | 401, /* Date when new "messages" should no longer
                                                        * be created. */
     USAGE_EXPIRE_DATETIME = TagType:DATE | 402,       /* Date when existing "messages" should no
@@ -78,13 +78,13 @@
     MAX_USES_PER_BOOT = TagType:UINT | 404,           /* Number of times the key can be used per
                                                        * boot. */
 
-    /* User authentication */
-    ALL_USERS = TagType:BOOL | 500,           /* Reserved for future use -- ignore. */
-    USER_ID = TagType:UINT | 501,             /* Reserved for future use -- ignore. */
+    /** User authentication */
+    ALL_USERS = TagType:BOOL | 500,           /** Reserved for future use -- ignore. */
+    USER_ID = TagType:UINT | 501,             /** Reserved for future use -- ignore. */
     USER_SECURE_ID = TagType:ULONG_REP | 502, /* Secure ID of authorized user or authenticator(s).
                                                * Disallowed if ALL_USERS or NO_AUTH_REQUIRED is
                                                * present. */
-    NO_AUTH_REQUIRED = TagType:BOOL | 503,    /* If key is usable without authentication. */
+    NO_AUTH_REQUIRED = TagType:BOOL | 503,    /** If key is usable without authentication. */
     USER_AUTH_TYPE = TagType:ENUM | 504,      /* Bitmask of authenticator types allowed when
                                                * USER_SECURE_ID contains a secure user ID, rather
                                                * than a secure authenticator ID.  Defined in
@@ -99,27 +99,27 @@
                                                * if device is still on-body (requires secure on-body
                                                * sensor. */
 
-    /* Application access control */
+    /** Application access control */
     ALL_APPLICATIONS = TagType:BOOL | 600, /* Specified to indicate key is usable by all
                                             * applications. */
-    APPLICATION_ID = TagType:BYTES | 601,  /* Byte string identifying the authorized application. */
+    APPLICATION_ID = TagType:BYTES | 601,  /** Byte string identifying the authorized application. */
     EXPORTABLE = TagType:BOOL | 602,       /* If true, private/secret key can be exported, but only
                                             * if all access control requirements for use are
                                             * met. (keymaster2) */
 
-    /*
+    /**
      * Semantically unenforceable tags, either because they have no specific meaning or because
      * they're informational only.
      */
-    APPLICATION_DATA = TagType:BYTES | 700,      /* Data provided by authorized application. */
-    CREATION_DATETIME = TagType:DATE | 701,      /* Key creation time */
-    ORIGIN = TagType:ENUM | 702,                 /* keymaster_key_origin_t. */
-    ROLLBACK_RESISTANT = TagType:BOOL | 703,     /* Whether key is rollback-resistant. */
-    ROOT_OF_TRUST = TagType:BYTES | 704,         /* Root of trust ID. */
-    OS_VERSION = TagType:UINT | 705,             /* Version of system (keymaster2) */
-    OS_PATCHLEVEL = TagType:UINT | 706,          /* Patch level of system (keymaster2) */
-    UNIQUE_ID = TagType:BYTES | 707,             /* Used to provide unique ID in attestation */
-    ATTESTATION_CHALLENGE = TagType:BYTES | 708, /* Used to provide challenge in attestation */
+    APPLICATION_DATA = TagType:BYTES | 700,      /** Data provided by authorized application. */
+    CREATION_DATETIME = TagType:DATE | 701,      /** Key creation time */
+    ORIGIN = TagType:ENUM | 702,                 /** keymaster_key_origin_t. */
+    ROLLBACK_RESISTANT = TagType:BOOL | 703,     /** Whether key is rollback-resistant. */
+    ROOT_OF_TRUST = TagType:BYTES | 704,         /** Root of trust ID. */
+    OS_VERSION = TagType:UINT | 705,             /** Version of system (keymaster2) */
+    OS_PATCHLEVEL = TagType:UINT | 706,          /** Patch level of system (keymaster2) */
+    UNIQUE_ID = TagType:BYTES | 707,             /** Used to provide unique ID in attestation */
+    ATTESTATION_CHALLENGE = TagType:BYTES | 708, /** Used to provide challenge in attestation */
     ATTESTATION_APPLICATION_ID = TagType:BYTES | 709, /* Used to identify the set of possible
                                                        * applications of which one has initiated a
                                                        * key attestation */
@@ -140,13 +140,13 @@
     ATTESTATION_ID_MODEL = TagType:BYTES | 717,  /* Used to provide the device's model name to be
                                                     included in attestation */
 
-    /* Tags used only to provide data to or receive data from operations */
-    ASSOCIATED_DATA = TagType:BYTES | 1000, /* Used to provide associated data for AEAD modes. */
-    NONCE = TagType:BYTES | 1001,           /* Nonce or Initialization Vector */
+    /** Tags used only to provide data to or receive data from operations */
+    ASSOCIATED_DATA = TagType:BYTES | 1000, /** Used to provide associated data for AEAD modes. */
+    NONCE = TagType:BYTES | 1001,           /** Nonce or Initialization Vector */
     AUTH_TOKEN = TagType:BYTES | 1002,      /* Authentication token that proves secure user
                                              * authentication has been performed.  Structure defined
                                              * in hw_auth_token_t in hw_auth_token.h. */
-    MAC_LENGTH = TagType:UINT | 1003,       /* MAC or AEAD authentication tag length in bits. */
+    MAC_LENGTH = TagType:UINT | 1003,       /** MAC or AEAD authentication tag length in bits. */
 
     RESET_SINCE_ID_ROTATION = TagType:BOOL | 1004, /* Whether the device has beeen factory reset
                                                     * since the last unique ID rotation.  Used for
@@ -154,15 +154,15 @@
 };
 
 enum Algorithm : uint32_t {
-    /* Asymmetric algorithms. */
+    /** Asymmetric algorithms. */
     RSA = 1,
     // DSA = 2, -- Removed, do not re-use value 2.
     EC = 3,
 
-    /* Block ciphers algorithms */
+    /** Block ciphers algorithms */
     AES = 32,
 
-    /* MAC algorithms */
+    /** MAC algorithms */
     HMAC = 128,
 };
 
@@ -170,13 +170,15 @@
  * Symmetric block cipher modes provided by keymaster implementations.
  */
 enum BlockMode : uint32_t {
-    /* Unauthenticated modes, usable only for encryption/decryption and not generally recommended
+    /**
+     * Unauthenticated modes, usable only for encryption/decryption and not generally recommended
      * except for compatibility with existing other protocols. */
     ECB = 1,
     CBC = 2,
     CTR = 3,
 
-    /* Authenticated modes, usable for encryption/decryption and signing/verification.  Recommended
+    /**
+     * Authenticated modes, usable for encryption/decryption and signing/verification.  Recommended
      * over unauthenticated modes for all purposes. */
     GCM = 32,
 };
@@ -188,7 +190,7 @@
  * cryptographically-appropriate pairs.
  */
 enum PaddingMode : uint32_t {
-    NONE = 1, /* deprecated */
+    NONE = 1, /** deprecated */
     RSA_OAEP = 2,
     RSA_PSS = 3,
     RSA_PKCS1_1_5_ENCRYPT = 4,
@@ -227,9 +229,9 @@
  * guaranteed never to have existed outide the secure hardware.
  */
 enum KeyOrigin : uint32_t {
-    GENERATED = 0, /* Generated in keymaster.  Should not exist outside the TEE. */
-    DERIVED = 1,   /* Derived inside keymaster.  Likely exists off-device. */
-    IMPORTED = 2,  /* Imported into keymaster.  Existed as cleartext in Android. */
+    GENERATED = 0, /** Generated in keymaster.  Should not exist outside the TEE. */
+    DERIVED = 1,   /** Derived inside keymaster.  Likely exists off-device. */
+    IMPORTED = 2,  /** Imported into keymaster.  Existed as cleartext in Android. */
     UNKNOWN = 3,   /* Keymaster did not record origin.  This value can only be seen on keys in a
                     * keymaster0 implementation.  The keymaster0 adapter uses this value to document
                     * the fact that it is unkown whether the key was generated inside or imported
@@ -252,12 +254,12 @@
  * Possible purposes of a key (or pair).
  */
 enum KeyPurpose : uint32_t {
-    ENCRYPT = 0,    /* Usable with RSA, EC and AES keys. */
-    DECRYPT = 1,    /* Usable with RSA, EC and AES keys. */
-    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. */
+    ENCRYPT = 0,    /** Usable with RSA, EC and AES keys. */
+    DECRYPT = 1,    /** Usable with RSA, EC and AES keys. */
+    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. */
 };
 
 /**
@@ -283,8 +285,8 @@
     INVALID_AUTHORIZATION_TIMEOUT = -16,
     UNSUPPORTED_KEY_FORMAT = -17,
     INCOMPATIBLE_KEY_FORMAT = -18,
-    UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = -19,   /* For PKCS8 & PKCS12 */
-    UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = -20, /* For PKCS8 & PKCS12 */
+    UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = -19,   /** For PKCS8 & PKCS12 */
+    UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = -20, /** For PKCS8 & PKCS12 */
     INVALID_INPUT_LENGTH = -21,
     KEY_EXPORT_OPTIONS_INVALID = -22,
     DELEGATION_NOT_ALLOWED = -23,
@@ -340,17 +342,17 @@
  * Key derivation functions, mostly used in ECIES.
  */
 enum KeyDerivationFunction : uint32_t {
-    /* Do not apply a key derivation function; use the raw agreed key */
+    /** Do not apply a key derivation function; use the raw agreed key */
     NONE = 0,
-    /* HKDF defined in RFC 5869 with SHA256 */
+    /** HKDF defined in RFC 5869 with SHA256 */
     RFC5869_SHA256 = 1,
-    /* KDF1 defined in ISO 18033-2 with SHA1 */
+    /** KDF1 defined in ISO 18033-2 with SHA1 */
     ISO18033_2_KDF1_SHA1 = 2,
-    /* KDF1 defined in ISO 18033-2 with SHA256 */
+    /** KDF1 defined in ISO 18033-2 with SHA256 */
     ISO18033_2_KDF1_SHA256 = 3,
-    /* KDF2 defined in ISO 18033-2 with SHA1 */
+    /** KDF2 defined in ISO 18033-2 with SHA1 */
     ISO18033_2_KDF2_SHA1 = 4,
-    /* KDF2 defined in ISO 18033-2 with SHA256 */
+    /** KDF2 defined in ISO 18033-2 with SHA256 */
     ISO18033_2_KDF2_SHA256 = 5,
 };
 
@@ -368,11 +370,12 @@
 };
 
 struct KeyParameter {
-    /* Discriminates the uinon/blob field used.  The blob cannot be coincided with the union, but
+    /**
+     * Discriminates the uinon/blob field used.  The blob cannot be coincided with the union, but
      * only one of "f" and "blob" is ever used at a time. */
     Tag tag;
     union IntegerParams {
-        /* Enum types */
+        /** Enum types */
         Algorithm algorithm;
         BlockMode blockMode;
         PaddingMode paddingMode;
@@ -384,7 +387,7 @@
         KeyDerivationFunction keyDerivationFunction;
         HardwareAuthenticatorType hardwareAuthenticatorType;
 
-        /* Other types */
+        /** Other types */
         bool boolValue;  // Always true, if a boolean tag is present.
         uint32_t integer;
         uint64_t longInteger;
@@ -424,8 +427,8 @@
  * Formats for key import and export.
  */
 enum KeyFormat : uint32_t {
-    X509 = 0,  /* for public key export */
-    PKCS8 = 1, /* for asymmetric key pair import */
+    X509 = 0,  /** for public key export */
+    PKCS8 = 1, /** for asymmetric key pair import */
     RAW = 3,   /* for symmetric key import and export*/
 };
 
diff --git a/keymaster/3.0/vts/functional/Android.mk b/keymaster/3.0/vts/functional/Android.mk
new file mode 100644
index 0000000..4265b9f
--- /dev/null
+++ b/keymaster/3.0/vts/functional/Android.mk
@@ -0,0 +1,39 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := keymaster_hidl_hal_test
+LOCAL_SRC_FILES := \
+        authorization_set.cpp \
+        attestation_record.cpp \
+        key_param_output.cpp \
+        keymaster_hidl_hal_test.cpp \
+        keystore_tags_utils.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+        android.hardware.keymaster@3.0 \
+        libcrypto \
+        libhidlbase \
+        liblog \
+        libsoftkeymasterdevice \
+        libutils \
+
+LOCAL_STATIC_LIBRARIES := \
+        VtsHalHidlTargetTestBase \
+
+LOCAL_CFLAGS := -Wall -Werror
+
+include $(BUILD_NATIVE_TEST)
diff --git a/keymaster/3.0/vts/functional/attestation_record.cpp b/keymaster/3.0/vts/functional/attestation_record.cpp
new file mode 100644
index 0000000..6cdd44c
--- /dev/null
+++ b/keymaster/3.0/vts/functional/attestation_record.cpp
@@ -0,0 +1,289 @@
+/*
+ * 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.
+ */
+
+#include "attestation_record.h"
+
+#include <assert.h>
+
+#include <openssl/asn1t.h>
+#include <openssl/bn.h>
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+
+#include "openssl_utils.h"
+
+namespace android {
+namespace hardware {
+namespace keymaster {
+namespace V3_0 {
+
+struct stack_st_ASN1_TYPE_Delete {
+    void operator()(stack_st_ASN1_TYPE* p) { sk_ASN1_TYPE_free(p); }
+};
+
+struct ASN1_STRING_Delete {
+    void operator()(ASN1_STRING* p) { ASN1_STRING_free(p); }
+};
+
+struct ASN1_TYPE_Delete {
+    void operator()(ASN1_TYPE* p) { ASN1_TYPE_free(p); }
+};
+
+#define ASN1_INTEGER_SET STACK_OF(ASN1_INTEGER)
+
+typedef struct km_root_of_trust {
+    ASN1_OCTET_STRING* verified_boot_key;
+    ASN1_BOOLEAN* device_locked;
+    ASN1_ENUMERATED* verified_boot_state;
+} KM_ROOT_OF_TRUST;
+
+ASN1_SEQUENCE(KM_ROOT_OF_TRUST) = {
+    ASN1_SIMPLE(KM_ROOT_OF_TRUST, verified_boot_key, ASN1_OCTET_STRING),
+    ASN1_SIMPLE(KM_ROOT_OF_TRUST, device_locked, ASN1_BOOLEAN),
+    ASN1_SIMPLE(KM_ROOT_OF_TRUST, verified_boot_state, ASN1_ENUMERATED),
+} ASN1_SEQUENCE_END(KM_ROOT_OF_TRUST);
+IMPLEMENT_ASN1_FUNCTIONS(KM_ROOT_OF_TRUST);
+
+typedef struct km_auth_list {
+    ASN1_INTEGER_SET* purpose;
+    ASN1_INTEGER* algorithm;
+    ASN1_INTEGER* key_size;
+    ASN1_INTEGER_SET* digest;
+    ASN1_INTEGER_SET* padding;
+    ASN1_INTEGER_SET* kdf;
+    ASN1_INTEGER* ec_curve;
+    ASN1_INTEGER* rsa_public_exponent;
+    ASN1_INTEGER* active_date_time;
+    ASN1_INTEGER* origination_expire_date_time;
+    ASN1_INTEGER* usage_expire_date_time;
+    ASN1_NULL* no_auth_required;
+    ASN1_INTEGER* user_auth_type;
+    ASN1_INTEGER* auth_timeout;
+    ASN1_NULL* allow_while_on_body;
+    ASN1_NULL* all_applications;
+    ASN1_OCTET_STRING* application_id;
+    ASN1_INTEGER* creation_date_time;
+    ASN1_INTEGER* origin;
+    ASN1_NULL* rollback_resistant;
+    KM_ROOT_OF_TRUST* root_of_trust;
+    ASN1_INTEGER* os_version;
+    ASN1_INTEGER* os_patchlevel;
+    ASN1_OCTET_STRING* attestation_application_id;
+} KM_AUTH_LIST;
+
+ASN1_SEQUENCE(KM_AUTH_LIST) = {
+    ASN1_EXP_SET_OF_OPT(KM_AUTH_LIST, purpose, ASN1_INTEGER, TAG_PURPOSE.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, algorithm, ASN1_INTEGER, TAG_ALGORITHM.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, key_size, ASN1_INTEGER, TAG_KEY_SIZE.maskedTag()),
+    ASN1_EXP_SET_OF_OPT(KM_AUTH_LIST, digest, ASN1_INTEGER, TAG_DIGEST.maskedTag()),
+    ASN1_EXP_SET_OF_OPT(KM_AUTH_LIST, padding, ASN1_INTEGER, TAG_PADDING.maskedTag()),
+    ASN1_EXP_SET_OF_OPT(KM_AUTH_LIST, kdf, ASN1_INTEGER, TAG_KDF.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, ec_curve, ASN1_INTEGER, TAG_EC_CURVE.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, rsa_public_exponent, ASN1_INTEGER,
+                 TAG_RSA_PUBLIC_EXPONENT.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, active_date_time, ASN1_INTEGER, TAG_ACTIVE_DATETIME.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, origination_expire_date_time, ASN1_INTEGER,
+                 TAG_ORIGINATION_EXPIRE_DATETIME.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, usage_expire_date_time, ASN1_INTEGER,
+                 TAG_USAGE_EXPIRE_DATETIME.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, no_auth_required, ASN1_NULL, TAG_NO_AUTH_REQUIRED.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, user_auth_type, ASN1_INTEGER, TAG_USER_AUTH_TYPE.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, auth_timeout, ASN1_INTEGER, TAG_AUTH_TIMEOUT.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, allow_while_on_body, ASN1_NULL, TAG_ALLOW_WHILE_ON_BODY.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, all_applications, ASN1_NULL, TAG_ALL_APPLICATIONS.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, application_id, ASN1_OCTET_STRING, TAG_APPLICATION_ID.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, creation_date_time, ASN1_INTEGER, TAG_CREATION_DATETIME.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, origin, ASN1_INTEGER, TAG_ORIGIN.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, rollback_resistant, ASN1_NULL, TAG_ROLLBACK_RESISTANT.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, root_of_trust, KM_ROOT_OF_TRUST, TAG_ROOT_OF_TRUST.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, os_version, ASN1_INTEGER, TAG_OS_VERSION.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, os_patchlevel, ASN1_INTEGER, TAG_OS_PATCHLEVEL.maskedTag()),
+    ASN1_EXP_OPT(KM_AUTH_LIST, attestation_application_id, ASN1_OCTET_STRING,
+                 TAG_ATTESTATION_APPLICATION_ID.maskedTag()),
+} ASN1_SEQUENCE_END(KM_AUTH_LIST);
+IMPLEMENT_ASN1_FUNCTIONS(KM_AUTH_LIST);
+
+typedef struct km_key_description {
+    ASN1_INTEGER* attestation_version;
+    ASN1_ENUMERATED* attestation_security_level;
+    ASN1_INTEGER* keymaster_version;
+    ASN1_ENUMERATED* keymaster_security_level;
+    ASN1_OCTET_STRING* attestation_challenge;
+    KM_AUTH_LIST* software_enforced;
+    KM_AUTH_LIST* tee_enforced;
+    ASN1_INTEGER* unique_id;
+} KM_KEY_DESCRIPTION;
+
+ASN1_SEQUENCE(KM_KEY_DESCRIPTION) = {
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, attestation_version, ASN1_INTEGER),
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, attestation_security_level, ASN1_ENUMERATED),
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, keymaster_version, ASN1_INTEGER),
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, keymaster_security_level, ASN1_ENUMERATED),
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, attestation_challenge, ASN1_OCTET_STRING),
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, unique_id, ASN1_OCTET_STRING),
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, software_enforced, KM_AUTH_LIST),
+    ASN1_SIMPLE(KM_KEY_DESCRIPTION, tee_enforced, KM_AUTH_LIST),
+} ASN1_SEQUENCE_END(KM_KEY_DESCRIPTION);
+IMPLEMENT_ASN1_FUNCTIONS(KM_KEY_DESCRIPTION);
+
+template <Tag tag>
+void copyAuthTag(const stack_st_ASN1_INTEGER* stack, TypedTag<TagType::ENUM_REP, tag> ttag,
+                 AuthorizationSet* auth_list) {
+    typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT;
+    for (size_t i = 0; i < sk_ASN1_INTEGER_num(stack); ++i) {
+        auth_list->push_back(
+            ttag, static_cast<ValueT>(ASN1_INTEGER_get(sk_ASN1_INTEGER_value(stack, i))));
+    }
+}
+
+template <Tag tag>
+void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ENUM, tag> ttag,
+                 AuthorizationSet* auth_list) {
+    typedef typename TypedTag2ValueType<decltype(ttag)>::type ValueT;
+    if (!asn1_int) return;
+    auth_list->push_back(ttag, static_cast<ValueT>(ASN1_INTEGER_get(asn1_int)));
+}
+
+template <Tag tag>
+void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::UINT, tag> ttag,
+                 AuthorizationSet* auth_list) {
+    if (!asn1_int) return;
+    auth_list->push_back(ttag, ASN1_INTEGER_get(asn1_int));
+}
+
+BIGNUM* construct_uint_max() {
+    BIGNUM* value = BN_new();
+    BIGNUM_Ptr one(BN_new());
+    BN_one(one.get());
+    BN_lshift(value, one.get(), 32);
+    return value;
+}
+
+uint64_t BignumToUint64(BIGNUM* num) {
+    static_assert((sizeof(BN_ULONG) == sizeof(uint32_t)) || (sizeof(BN_ULONG) == sizeof(uint64_t)),
+                  "This implementation only supports 32 and 64-bit BN_ULONG");
+    if (sizeof(BN_ULONG) == sizeof(uint32_t)) {
+        BIGNUM_Ptr uint_max(construct_uint_max());
+        BIGNUM_Ptr hi(BN_new()), lo(BN_new());
+        BN_CTX_Ptr ctx(BN_CTX_new());
+        BN_div(hi.get(), lo.get(), num, uint_max.get(), ctx.get());
+        return static_cast<uint64_t>(BN_get_word(hi.get())) << 32 | BN_get_word(lo.get());
+    } else if (sizeof(BN_ULONG) == sizeof(uint64_t)) {
+        return BN_get_word(num);
+    } else {
+        return 0;
+    }
+}
+
+template <Tag tag>
+void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::ULONG, tag> ttag,
+                 AuthorizationSet* auth_list) {
+    if (!asn1_int) return;
+    BIGNUM_Ptr num(ASN1_INTEGER_to_BN(asn1_int, nullptr));
+    auth_list->push_back(ttag, BignumToUint64(num.get()));
+}
+
+template <Tag tag>
+void copyAuthTag(const ASN1_INTEGER* asn1_int, TypedTag<TagType::DATE, tag> ttag,
+                 AuthorizationSet* auth_list) {
+    if (!asn1_int) return;
+    BIGNUM_Ptr num(ASN1_INTEGER_to_BN(asn1_int, nullptr));
+    auth_list->push_back(ttag, BignumToUint64(num.get()));
+}
+
+template <Tag tag>
+void copyAuthTag(const ASN1_NULL* asn1_null, TypedTag<TagType::BOOL, tag> ttag,
+                 AuthorizationSet* auth_list) {
+    if (!asn1_null) return;
+    auth_list->push_back(ttag);
+}
+
+template <Tag tag>
+void copyAuthTag(const ASN1_OCTET_STRING* asn1_string, TypedTag<TagType::BYTES, tag> ttag,
+                 AuthorizationSet* auth_list) {
+    if (!asn1_string) return;
+    hidl_vec<uint8_t> buf;
+    buf.setToExternal(asn1_string->data, asn1_string->length);
+    auth_list->push_back(ttag, buf);
+}
+
+// Extract the values from the specified ASN.1 record and place them in auth_list.
+static ErrorCode extract_auth_list(const KM_AUTH_LIST* record, AuthorizationSet* auth_list) {
+    if (!record) return ErrorCode::OK;
+
+    copyAuthTag(record->active_date_time, TAG_ACTIVE_DATETIME, auth_list);
+    copyAuthTag(record->algorithm, TAG_ALGORITHM, auth_list);
+    copyAuthTag(record->all_applications, TAG_ALL_APPLICATIONS, auth_list);
+    copyAuthTag(record->application_id, TAG_APPLICATION_ID, auth_list);
+    copyAuthTag(record->auth_timeout, TAG_AUTH_TIMEOUT, auth_list);
+    copyAuthTag(record->creation_date_time, TAG_CREATION_DATETIME, auth_list);
+    copyAuthTag(record->digest, TAG_DIGEST, auth_list);
+    copyAuthTag(record->ec_curve, TAG_EC_CURVE, auth_list);
+    copyAuthTag(record->key_size, TAG_KEY_SIZE, auth_list);
+    copyAuthTag(record->no_auth_required, TAG_NO_AUTH_REQUIRED, auth_list);
+    copyAuthTag(record->origin, TAG_ORIGIN, auth_list);
+    copyAuthTag(record->origination_expire_date_time, TAG_ORIGINATION_EXPIRE_DATETIME, auth_list);
+    copyAuthTag(record->os_patchlevel, TAG_OS_PATCHLEVEL, auth_list);
+    copyAuthTag(record->os_version, TAG_OS_VERSION, auth_list);
+    copyAuthTag(record->padding, TAG_PADDING, auth_list);
+    copyAuthTag(record->purpose, TAG_PURPOSE, auth_list);
+    copyAuthTag(record->rollback_resistant, TAG_ROLLBACK_RESISTANT, auth_list);
+    copyAuthTag(record->rsa_public_exponent, TAG_RSA_PUBLIC_EXPONENT, auth_list);
+    copyAuthTag(record->usage_expire_date_time, TAG_USAGE_EXPIRE_DATETIME, auth_list);
+    copyAuthTag(record->user_auth_type, TAG_USER_AUTH_TYPE, auth_list);
+
+    return ErrorCode::OK;
+}
+
+MAKE_OPENSSL_PTR_TYPE(KM_KEY_DESCRIPTION)
+
+// Parse the DER-encoded attestation record, placing the results in keymaster_version,
+// attestation_challenge, software_enforced, tee_enforced and unique_id.
+ErrorCode parse_attestation_record(const uint8_t* asn1_key_desc, size_t asn1_key_desc_len,
+                                   uint32_t* attestation_version,  //
+                                   SecurityLevel* attestation_security_level,
+                                   uint32_t* keymaster_version,
+                                   SecurityLevel* keymaster_security_level,
+                                   hidl_vec<uint8_t>* attestation_challenge,
+                                   AuthorizationSet* software_enforced,
+                                   AuthorizationSet* tee_enforced,  //
+                                   hidl_vec<uint8_t>* unique_id) {
+    const uint8_t* p = asn1_key_desc;
+    KM_KEY_DESCRIPTION_Ptr record(d2i_KM_KEY_DESCRIPTION(nullptr, &p, asn1_key_desc_len));
+    if (!record.get()) return ErrorCode::UNKNOWN_ERROR;
+
+    *attestation_version = ASN1_INTEGER_get(record->attestation_version);
+    *attestation_security_level =
+        static_cast<SecurityLevel>(ASN1_ENUMERATED_get(record->attestation_security_level));
+    *keymaster_version = ASN1_INTEGER_get(record->keymaster_version);
+    *keymaster_security_level =
+        static_cast<SecurityLevel>(ASN1_ENUMERATED_get(record->keymaster_security_level));
+
+    attestation_challenge->setToExternal(record->attestation_challenge->data,
+                                         record->attestation_challenge->length);
+
+    unique_id->setToExternal(record->unique_id->data, record->unique_id->length);
+
+    ErrorCode error = extract_auth_list(record->software_enforced, software_enforced);
+    if (error != ErrorCode::OK) return error;
+
+    return extract_auth_list(record->tee_enforced, tee_enforced);
+}
+
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
diff --git a/keymaster/3.0/vts/functional/attestation_record.h b/keymaster/3.0/vts/functional/attestation_record.h
new file mode 100644
index 0000000..a042055
--- /dev/null
+++ b/keymaster/3.0/vts/functional/attestation_record.h
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+#ifndef HARDWARE_INTERFACES_KEYMASTER_30_VTS_FUNCTIONAL_ATTESTATION_RECORD_H_
+#define HARDWARE_INTERFACES_KEYMASTER_30_VTS_FUNCTIONAL_ATTESTATION_RECORD_H_
+
+#include "authorization_set.h"
+
+namespace android {
+namespace hardware {
+namespace keymaster {
+namespace V3_0 {
+
+/**
+ * The OID for Android attestation records.  For the curious, it breaks down as follows:
+ *
+ * 1 = ISO
+ * 3 = org
+ * 6 = DoD (Huh? OIDs are weird.)
+ * 1 = IANA
+ * 4 = Private
+ * 1 = Enterprises
+ * 11129 = Google
+ * 2 = Google security
+ * 1 = certificate extension
+ * 17 = Android attestation extension.
+ */
+static const char kAttestionRecordOid[] = "1.3.6.1.4.1.11129.2.1.17";
+
+ErrorCode parse_attestation_record(const uint8_t* asn1_key_desc, size_t asn1_key_desc_len,
+                                   uint32_t* attestation_version,  //
+                                   SecurityLevel* attestation_security_level,
+                                   uint32_t* keymaster_version,
+                                   SecurityLevel* keymaster_security_level,
+                                   hidl_vec<uint8_t>* attestation_challenge,
+                                   AuthorizationSet* software_enforced,
+                                   AuthorizationSet* tee_enforced,  //
+                                   hidl_vec<uint8_t>* unique_id);
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
+
+#endif  // HARDWARE_INTERFACES_KEYMASTER_30_VTS_FUNCTIONAL_ATTESTATION_RECORD_H_
diff --git a/keymaster/3.0/vts/functional/authorization_set.cpp b/keymaster/3.0/vts/functional/authorization_set.cpp
new file mode 100644
index 0000000..303f7e7
--- /dev/null
+++ b/keymaster/3.0/vts/functional/authorization_set.cpp
@@ -0,0 +1,422 @@
+/*
+ * Copyright (C) 2014 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 "authorization_set.h"
+
+#include <assert.h>
+#include <istream>
+#include <limits>
+#include <ostream>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <new>
+
+namespace android {
+namespace hardware {
+namespace keymaster {
+namespace V3_0 {
+
+inline bool keyParamLess(const KeyParameter& a, const KeyParameter& b) {
+    if (a.tag != b.tag) return a.tag < b.tag;
+    int retval;
+    switch (typeFromTag(a.tag)) {
+    case TagType::INVALID:
+    case TagType::BOOL:
+        return false;
+    case TagType::ENUM:
+    case TagType::ENUM_REP:
+    case TagType::UINT:
+    case TagType::UINT_REP:
+        return a.f.integer < b.f.integer;
+    case TagType::ULONG:
+    case TagType::ULONG_REP:
+        return a.f.longInteger < b.f.longInteger;
+    case TagType::DATE:
+        return a.f.dateTime < b.f.dateTime;
+    case TagType::BIGNUM:
+    case TagType::BYTES:
+        // Handle the empty cases.
+        if (a.blob.size() == 0) return b.blob.size() != 0;
+        if (b.blob.size() == 0) return false;
+
+        retval = memcmp(&a.blob[0], &b.blob[0], std::min(a.blob.size(), b.blob.size()));
+        if (retval == 0) {
+            // One is the prefix of the other, so the longer wins
+            return a.blob.size() < b.blob.size();
+        } else {
+            return retval < 0;
+        }
+    }
+    return false;
+}
+
+inline bool keyParamEqual(const KeyParameter& a, const KeyParameter& b) {
+    if (a.tag != b.tag) return false;
+
+    switch (typeFromTag(a.tag)) {
+    case TagType::INVALID:
+    case TagType::BOOL:
+        return true;
+    case TagType::ENUM:
+    case TagType::ENUM_REP:
+    case TagType::UINT:
+    case TagType::UINT_REP:
+        return a.f.integer == b.f.integer;
+    case TagType::ULONG:
+    case TagType::ULONG_REP:
+        return a.f.longInteger == b.f.longInteger;
+    case TagType::DATE:
+        return a.f.dateTime == b.f.dateTime;
+    case TagType::BIGNUM:
+    case TagType::BYTES:
+        if (a.blob.size() != b.blob.size()) return false;
+        return a.blob.size() == 0 || memcmp(&a.blob[0], &b.blob[0], a.blob.size()) == 0;
+    }
+    return false;
+}
+
+void AuthorizationSet::Sort() {
+    std::sort(data_.begin(), data_.end(), keyParamLess);
+}
+
+void AuthorizationSet::Deduplicate() {
+    if (data_.empty()) return;
+
+    Sort();
+    std::vector<KeyParameter> result;
+
+    auto curr = data_.begin();
+    auto prev = curr++;
+    for (; curr != data_.end(); ++prev, ++curr) {
+        if (prev->tag == Tag::INVALID) continue;
+
+        if (!keyParamEqual(*prev, *curr)) {
+            result.emplace_back(std::move(*prev));
+        }
+    }
+    result.emplace_back(std::move(*prev));
+
+    std::swap(data_, result);
+}
+
+void AuthorizationSet::Union(const AuthorizationSet& other) {
+    data_.insert(data_.end(), other.data_.begin(), other.data_.end());
+    Deduplicate();
+}
+
+void AuthorizationSet::Subtract(const AuthorizationSet& other) {
+    Deduplicate();
+
+    auto i = other.begin();
+    while (i != other.end()) {
+        int pos = -1;
+        do {
+            pos = find(i->tag, pos);
+            if (pos != -1 && keyParamEqual(*i, data_[pos])) {
+                data_.erase(data_.begin() + pos);
+                break;
+            }
+        } while (pos != -1);
+        ++i;
+    }
+}
+
+int AuthorizationSet::find(Tag tag, int begin) const {
+    auto iter = data_.begin() + (1 + begin);
+
+    while (iter != data_.end() && iter->tag != tag)
+        ++iter;
+
+    if (iter != data_.end()) return iter - data_.begin();
+    return -1;
+}
+
+bool AuthorizationSet::erase(int index) {
+    auto pos = data_.begin() + index;
+    if (pos != data_.end()) {
+        data_.erase(pos);
+        return true;
+    }
+    return false;
+}
+
+KeyParameter& AuthorizationSet::operator[](int at) {
+    return data_[at];
+}
+
+const KeyParameter& AuthorizationSet::operator[](int at) const {
+    return data_[at];
+}
+
+void AuthorizationSet::Clear() {
+    data_.clear();
+}
+
+size_t AuthorizationSet::GetTagCount(Tag tag) const {
+    size_t count = 0;
+    for (int pos = -1; (pos = find(tag, pos)) != -1;)
+        ++count;
+    return count;
+}
+
+NullOr<const KeyParameter&> AuthorizationSet::GetEntry(Tag tag) const {
+    int pos = find(tag);
+    if (pos == -1) return {};
+    return data_[pos];
+}
+
+/**
+ * Persistent format is:
+ * | 32 bit indirect_size         |
+ * --------------------------------
+ * | indirect_size bytes of data  | this is where the blob data is stored
+ * --------------------------------
+ * | 32 bit element_count         | number of entries
+ * | 32 bit elements_size         | total bytes used by entries (entries have variable length)
+ * --------------------------------
+ * | elementes_size bytes of data | where the elements are stored
+ */
+
+/**
+ * Persistent format of blobs and bignums:
+ * | 32 bit tag             |
+ * | 32 bit blob_length     |
+ * | 32 bit indirect_offset |
+ */
+
+struct OutStreams {
+    std::ostream& indirect;
+    std::ostream& elements;
+};
+
+OutStreams& serializeParamValue(OutStreams& out, const hidl_vec<uint8_t>& blob) {
+    uint32_t buffer;
+
+    // write blob_length
+    auto blob_length = blob.size();
+    if (blob_length > std::numeric_limits<uint32_t>::max()) {
+        out.elements.setstate(std::ios_base::badbit);
+        return out;
+    }
+    buffer = blob_length;
+    out.elements.write(reinterpret_cast<const char*>(&buffer), sizeof(uint32_t));
+
+    // write indirect_offset
+    auto offset = out.indirect.tellp();
+    if (offset < 0 || offset > std::numeric_limits<uint32_t>::max() ||
+        static_cast<uint32_t>((std::numeric_limits<uint32_t>::max() - offset)) <
+            blob_length) {  // overflow check
+        out.elements.setstate(std::ios_base::badbit);
+        return out;
+    }
+    buffer = offset;
+    out.elements.write(reinterpret_cast<const char*>(&buffer), sizeof(uint32_t));
+
+    // write blob to indirect stream
+    if (blob_length) out.indirect.write(reinterpret_cast<const char*>(&blob[0]), blob_length);
+
+    return out;
+}
+
+template <typename T> OutStreams& serializeParamValue(OutStreams& out, const T& value) {
+    out.elements.write(reinterpret_cast<const char*>(&value), sizeof(T));
+    return out;
+}
+
+OutStreams& serialize(TAG_INVALID_t&&, OutStreams& out, const KeyParameter&) {
+    // skip invalid entries.
+    return out;
+}
+template <typename T> OutStreams& serialize(T ttag, OutStreams& out, const KeyParameter& param) {
+    out.elements.write(reinterpret_cast<const char*>(&param.tag), sizeof(int32_t));
+    return serializeParamValue(out, accessTagValue(ttag, param));
+}
+
+template <typename... T> struct choose_serializer;
+template <typename... Tags> struct choose_serializer<MetaList<Tags...>> {
+    static OutStreams& serialize(OutStreams& out, const KeyParameter& param) {
+        return choose_serializer<Tags...>::serialize(out, param);
+    }
+};
+template <> struct choose_serializer<> {
+    static OutStreams& serialize(OutStreams& out, const KeyParameter&) { return out; }
+};
+template <TagType tag_type, Tag tag, typename... Tail>
+struct choose_serializer<TypedTag<tag_type, tag>, Tail...> {
+    static OutStreams& serialize(OutStreams& out, const KeyParameter& param) {
+        if (param.tag == tag) {
+            return V3_0::serialize(TypedTag<tag_type, tag>(), out, param);
+        } else {
+            return choose_serializer<Tail...>::serialize(out, param);
+        }
+    }
+};
+
+OutStreams& serialize(OutStreams& out, const KeyParameter& param) {
+    return choose_serializer<all_tags_t>::serialize(out, param);
+}
+
+std::ostream& serialize(std::ostream& out, const std::vector<KeyParameter>& params) {
+    std::stringstream indirect;
+    std::stringstream elements;
+    OutStreams streams = {indirect, elements};
+    for (const auto& param : params) {
+        serialize(streams, param);
+    }
+    if (indirect.bad() || elements.bad()) {
+        out.setstate(std::ios_base::badbit);
+        return out;
+    }
+    auto pos = indirect.tellp();
+    if (pos < 0 || pos > std::numeric_limits<uint32_t>::max()) {
+        out.setstate(std::ios_base::badbit);
+        return out;
+    }
+    uint32_t indirect_size = pos;
+    pos = elements.tellp();
+    if (pos < 0 || pos > std::numeric_limits<uint32_t>::max()) {
+        out.setstate(std::ios_base::badbit);
+        return out;
+    }
+    uint32_t elements_size = pos;
+    uint32_t element_count = params.size();
+
+    out.write(reinterpret_cast<const char*>(&indirect_size), sizeof(uint32_t));
+
+    pos = out.tellp();
+    if (indirect_size) out << indirect.rdbuf();
+    assert(out.tellp() - pos == indirect_size);
+
+    out.write(reinterpret_cast<const char*>(&element_count), sizeof(uint32_t));
+    out.write(reinterpret_cast<const char*>(&elements_size), sizeof(uint32_t));
+
+    pos = out.tellp();
+    if (elements_size) out << elements.rdbuf();
+    assert(out.tellp() - pos == elements_size);
+
+    return out;
+}
+
+struct InStreams {
+    std::istream& indirect;
+    std::istream& elements;
+};
+
+InStreams& deserializeParamValue(InStreams& in, hidl_vec<uint8_t>* blob) {
+    uint32_t blob_length = 0;
+    uint32_t offset = 0;
+    in.elements.read(reinterpret_cast<char*>(&blob_length), sizeof(uint32_t));
+    blob->resize(blob_length);
+    in.elements.read(reinterpret_cast<char*>(&offset), sizeof(uint32_t));
+    in.indirect.seekg(offset);
+    in.indirect.read(reinterpret_cast<char*>(&(*blob)[0]), blob->size());
+    return in;
+}
+
+template <typename T> InStreams& deserializeParamValue(InStreams& in, T* value) {
+    in.elements.read(reinterpret_cast<char*>(value), sizeof(T));
+    return in;
+}
+
+InStreams& deserialize(TAG_INVALID_t&&, InStreams& in, KeyParameter*) {
+    // there should be no invalid KeyParamaters but if handle them as zero sized.
+    return in;
+}
+
+template <typename T> InStreams& deserialize(T&& ttag, InStreams& in, KeyParameter* param) {
+    return deserializeParamValue(in, &accessTagValue(ttag, *param));
+}
+
+template <typename... T> struct choose_deserializer;
+template <typename... Tags> struct choose_deserializer<MetaList<Tags...>> {
+    static InStreams& deserialize(InStreams& in, KeyParameter* param) {
+        return choose_deserializer<Tags...>::deserialize(in, param);
+    }
+};
+template <> struct choose_deserializer<> {
+    static InStreams& deserialize(InStreams& in, KeyParameter*) {
+        // encountered an unknown tag -> fail parsing
+        in.elements.setstate(std::ios_base::badbit);
+        return in;
+    }
+};
+template <TagType tag_type, Tag tag, typename... Tail>
+struct choose_deserializer<TypedTag<tag_type, tag>, Tail...> {
+    static InStreams& deserialize(InStreams& in, KeyParameter* param) {
+        if (param->tag == tag) {
+            return V3_0::deserialize(TypedTag<tag_type, tag>(), in, param);
+        } else {
+            return choose_deserializer<Tail...>::deserialize(in, param);
+        }
+    }
+};
+
+InStreams& deserialize(InStreams& in, KeyParameter* param) {
+    in.elements.read(reinterpret_cast<char*>(&param->tag), sizeof(Tag));
+    return choose_deserializer<all_tags_t>::deserialize(in, param);
+}
+
+std::istream& deserialize(std::istream& in, std::vector<KeyParameter>* params) {
+    uint32_t indirect_size = 0;
+    in.read(reinterpret_cast<char*>(&indirect_size), sizeof(uint32_t));
+    std::string indirect_buffer(indirect_size, '\0');
+    if (indirect_buffer.size() != indirect_size) {
+        in.setstate(std::ios_base::badbit);
+        return in;
+    }
+    in.read(&indirect_buffer[0], indirect_buffer.size());
+
+    uint32_t element_count = 0;
+    in.read(reinterpret_cast<char*>(&element_count), sizeof(uint32_t));
+    uint32_t elements_size = 0;
+    in.read(reinterpret_cast<char*>(&elements_size), sizeof(uint32_t));
+
+    std::string elements_buffer(elements_size, '\0');
+    if (elements_buffer.size() != elements_size) {
+        in.setstate(std::ios_base::badbit);
+        return in;
+    }
+    in.read(&elements_buffer[0], elements_buffer.size());
+
+    if (in.bad()) return in;
+
+    // TODO write one-shot stream buffer to avoid copying here
+    std::stringstream indirect(indirect_buffer);
+    std::stringstream elements(elements_buffer);
+    InStreams streams = {indirect, elements};
+
+    params->resize(element_count);
+
+    for (uint32_t i = 0; i < element_count; ++i) {
+        deserialize(streams, &(*params)[i]);
+    }
+    return in;
+}
+
+void AuthorizationSet::Serialize(std::ostream* out) const {
+    serialize(*out, data_);
+}
+
+void AuthorizationSet::Deserialize(std::istream* in) {
+    deserialize(*in, &data_);
+}
+
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
diff --git a/keymaster/3.0/vts/functional/authorization_set.h b/keymaster/3.0/vts/functional/authorization_set.h
new file mode 100644
index 0000000..5f92d81
--- /dev/null
+++ b/keymaster/3.0/vts/functional/authorization_set.h
@@ -0,0 +1,420 @@
+/*
+ * 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.
+ */
+
+#ifndef HARDWARE_INTERFACES_KEYMASTER_30_VTS_FUNCTIONAL_AUTHORIZATION_SET_H_
+#define HARDWARE_INTERFACES_KEYMASTER_30_VTS_FUNCTIONAL_AUTHORIZATION_SET_H_
+
+#include "keymaster_tags.h"
+
+#include <utility>
+#include <vector>
+
+namespace android {
+namespace hardware {
+namespace keymaster {
+namespace V3_0 {
+
+class AuthorizationSetBuilder;
+
+/**
+ * An ordered collection of KeyParameters. It provides memory ownership and some convenient
+ * functionality for sorting, deduplicating, joining, and subtracting sets of KeyParameters.
+ * For serialization, wrap the backing store of this structure in a hidl_vec<KeyParameter>.
+ */
+class AuthorizationSet {
+  public:
+    typedef KeyParameter value_type;
+
+    /**
+     * Construct an empty, dynamically-allocated, growable AuthorizationSet.
+     */
+    AuthorizationSet(){};
+
+    // Copy constructor.
+    AuthorizationSet(const AuthorizationSet& other) : data_(other.data_) {}
+
+    // Move constructor.
+    AuthorizationSet(AuthorizationSet&& other) : data_(std::move(other.data_)) {}
+
+    // Constructor from hidl_vec<KeyParameter>
+    AuthorizationSet(const hidl_vec<KeyParameter>& other) { *this = other; }
+
+    // Copy assignment.
+    AuthorizationSet& operator=(const AuthorizationSet& other) {
+        data_ = other.data_;
+        return *this;
+    }
+
+    // Move assignment.
+    AuthorizationSet& operator=(AuthorizationSet&& other) {
+        data_ = std::move(other.data_);
+        return *this;
+    }
+
+    AuthorizationSet& operator=(const hidl_vec<KeyParameter>& other) {
+        if (other.size() > 0) {
+            data_.resize(other.size());
+            for (size_t i = 0; i < data_.size(); ++i) {
+                /* This makes a deep copy even of embedded blobs.
+                 * See assignment operator/copy constructor of hidl_vec.*/
+                data_[i] = other[i];
+            }
+        }
+        return *this;
+    }
+
+    /**
+     * Clear existing authorization set data
+     */
+    void Clear();
+
+    ~AuthorizationSet() = default;
+
+    /**
+     * Returns the size of the set.
+     */
+    size_t size() const { return data_.size(); }
+
+    /**
+     * Returns true if the set is empty.
+     */
+    bool empty() const { return size() == 0; }
+
+    /**
+     * Returns the data in the set, directly. Be careful with this.
+     */
+    const KeyParameter* data() const { return data_.data(); }
+
+    /**
+     * Sorts the set
+     */
+    void Sort();
+
+    /**
+     * Sorts the set and removes duplicates (inadvertently duplicating tags is easy to do with the
+     * AuthorizationSetBuilder).
+     */
+    void Deduplicate();
+
+    /**
+     * Adds all elements from \p set that are not already present in this AuthorizationSet.  As a
+     * side-effect, if \p set is not null this AuthorizationSet will end up sorted.
+     */
+    void Union(const AuthorizationSet& set);
+
+    /**
+     * Removes all elements in \p set from this AuthorizationSet.
+     */
+    void Subtract(const AuthorizationSet& set);
+
+    /**
+     * Returns the offset of the next entry that matches \p tag, starting from the element after \p
+     * begin.  If not found, returns -1.
+     */
+    int find(Tag tag, int begin = -1) const;
+
+    /**
+     * Removes the entry at the specified index. Returns true if successful, false if the index was
+     * out of bounds.
+     */
+    bool erase(int index);
+
+    /**
+     * Returns iterator (pointer) to beginning of elems array, to enable STL-style iteration
+     */
+    std::vector<KeyParameter>::const_iterator begin() const { return data_.begin(); }
+
+    /**
+     * Returns iterator (pointer) one past end of elems array, to enable STL-style iteration
+     */
+    std::vector<KeyParameter>::const_iterator end() const { return data_.end(); }
+
+    /**
+     * Returns the nth element of the set.
+     * Like for std::vector::operator[] there is no range check performed. Use of out of range
+     * indices is undefined.
+     */
+    KeyParameter& operator[](int n);
+
+    /**
+     * Returns the nth element of the set.
+     * Like for std::vector::operator[] there is no range check performed. Use of out of range
+     * indices is undefined.
+     */
+    const KeyParameter& operator[](int n) const;
+
+    /**
+     * Returns true if the set contains at least one instance of \p tag
+     */
+    bool Contains(Tag tag) const { return find(tag) != -1; }
+
+    template <typename T> bool Contains(T tag) const { return find(tag) != -1; }
+
+    template <TagType tag_type, Tag tag, typename ValueT>
+    bool Contains(TypedTag<tag_type, tag> ttag, const ValueT& value) const {
+        for (const auto& param : data_) {
+            auto entry = authorizationValue(ttag, param);
+            if (entry.isOk() && static_cast<ValueT>(entry.value()) == value) return true;
+        }
+        return false;
+    }
+    /**
+     * Returns the number of \p tag entries.
+     */
+    size_t GetTagCount(Tag tag) const;
+
+    template <typename T>
+    inline NullOr<const typename TypedTag2ValueType<T>::type&> GetTagValue(T tag) const {
+        auto entry = GetEntry(tag);
+        if (entry.isOk()) return authorizationValue(tag, entry.value());
+        return {};
+    }
+
+    void push_back(const KeyParameter& param) { data_.push_back(param); }
+    void push_back(KeyParameter&& param) { data_.push_back(std::move(param)); }
+
+    void push_back(const AuthorizationSet& set) {
+        for (auto& entry : set) {
+            push_back(entry);
+        }
+    }
+
+    void push_back(AuthorizationSet&& set) {
+        move(set.begin(), set.end());
+        set.Clear();
+    }
+
+    template <Tag tag>
+    void push_back(TypedTag<TagType::BYTES, tag> ttag, const uint8_t* data, size_t data_length) {
+        hidl_vec<uint8_t> new_blob;
+        new_blob.setToExternal(const_cast<uint8_t*>(data), data_length);
+        push_back(ttag, std::move(new_blob));
+    }
+
+    /**
+     * Append the tag and enumerated value to the set.
+     * "val" may be exactly one parameter unless a boolean parameter is added.
+     * In this case "val" is omitted. This condition is checked at compile time by Authorization()
+     */
+    template <typename TypedTagT, typename... Value> void push_back(TypedTagT tag, Value&&... val) {
+        push_back(Authorization(tag, std::forward<Value>(val)...));
+    }
+
+    template <typename Iterator> void push_back(Iterator begin, Iterator end) {
+        while (begin != end) {
+            push_back(*begin);
+            ++begin;
+        }
+    }
+
+    template <typename Iterator> void move(Iterator begin, Iterator end) {
+        std::move(begin, end, std::back_inserter(data_));
+    }
+
+    hidl_vec<KeyParameter> hidl_data() const {
+        hidl_vec<KeyParameter> result;
+        result.setToExternal(const_cast<KeyParameter*>(data()), size());
+        return result;
+    }
+
+    void Serialize(std::ostream* out) const;
+    void Deserialize(std::istream* in);
+
+  private:
+    NullOr<const KeyParameter&> GetEntry(Tag tag) const;
+
+    std::vector<KeyParameter> data_;
+};
+
+class AuthorizationSetBuilder : public AuthorizationSet {
+  public:
+    template <typename TagType, typename... ValueType>
+    AuthorizationSetBuilder& Authorization(TagType ttag, ValueType&&... value) {
+        push_back(ttag, std::forward<ValueType>(value)...);
+        return *this;
+    }
+
+    template <Tag tag>
+    AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const uint8_t* data,
+                                           size_t data_length) {
+        hidl_vec<uint8_t> new_blob;
+        new_blob.setToExternal(const_cast<uint8_t*>(data), data_length);
+        push_back(ttag, std::move(new_blob));
+        return *this;
+    }
+
+    template <Tag tag>
+    AuthorizationSetBuilder& Authorization(TypedTag<TagType::BYTES, tag> ttag, const char* data,
+                                           size_t data_length) {
+        return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length);
+    }
+
+    AuthorizationSetBuilder& Authorizations(AuthorizationSet&& set);
+    AuthorizationSetBuilder& Authorizations(const AuthorizationSet& set);
+
+    AuthorizationSetBuilder& RsaKey(uint32_t key_size, uint64_t public_exponent);
+    AuthorizationSetBuilder& EcdsaKey(uint32_t key_size);
+    AuthorizationSetBuilder& EcdsaKey(EcCurve curve);
+    AuthorizationSetBuilder& AesKey(uint32_t key_size);
+    AuthorizationSetBuilder& HmacKey(uint32_t key_size);
+
+    AuthorizationSetBuilder& RsaSigningKey(uint32_t key_size, uint64_t public_exponent);
+    AuthorizationSetBuilder& RsaEncryptionKey(uint32_t key_size, uint64_t public_exponent);
+    AuthorizationSetBuilder& EcdsaSigningKey(uint32_t key_size);
+    AuthorizationSetBuilder& EcdsaSigningKey(EcCurve curve);
+    AuthorizationSetBuilder& AesEncryptionKey(uint32_t key_size);
+
+    AuthorizationSetBuilder& SigningKey();
+    AuthorizationSetBuilder& EncryptionKey();
+    AuthorizationSetBuilder& NoDigestOrPadding();
+    AuthorizationSetBuilder& EcbMode();
+
+    AuthorizationSetBuilder& BlockMode(std::initializer_list<BlockMode> block_modes);
+    AuthorizationSetBuilder& Digest(std::initializer_list<Digest> digests);
+    AuthorizationSetBuilder& Padding(std::initializer_list<PaddingMode> padding_modes);
+
+    // The following forwarding templates enable BlockMode,Digest and Padding to be called with a
+    // variable number of arguments; no need to wrap them in braces to make them an initalizer_list.
+    template <typename... T> AuthorizationSetBuilder& BlockMode(T&&... a) {
+        return BlockMode({std::forward<T>(a)...});
+    }
+    template <typename... T> AuthorizationSetBuilder& Digest(T&&... a) {
+        return Digest({std::forward<T>(a)...});
+    }
+    template <typename... T> AuthorizationSetBuilder& Padding(T&&... a) {
+        return Padding({std::forward<T>(a)...});
+    }
+};
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::Authorizations(AuthorizationSet&& set) {
+    move(set.begin(), set.end());
+    set.Clear();
+    return *this;
+}
+
+inline AuthorizationSetBuilder&
+AuthorizationSetBuilder::Authorizations(const AuthorizationSet& set) {
+    push_back(set.begin(), set.end());
+    return *this;
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::RsaKey(uint32_t key_size,
+                                                                uint64_t public_exponent) {
+    Authorization(TAG_ALGORITHM, Algorithm::RSA);
+    Authorization(TAG_KEY_SIZE, key_size);
+    Authorization(TAG_RSA_PUBLIC_EXPONENT, public_exponent);
+    return *this;
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::EcdsaKey(uint32_t key_size) {
+    Authorization(TAG_ALGORITHM, Algorithm::EC);
+    Authorization(TAG_KEY_SIZE, key_size);
+    return *this;
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::EcdsaKey(EcCurve curve) {
+    Authorization(TAG_ALGORITHM, Algorithm::EC);
+    Authorization(TAG_EC_CURVE, curve);
+    return *this;
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::AesKey(uint32_t key_size) {
+    Authorization(TAG_ALGORITHM, Algorithm::AES);
+    return Authorization(TAG_KEY_SIZE, key_size);
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::HmacKey(uint32_t key_size) {
+    Authorization(TAG_ALGORITHM, Algorithm::HMAC);
+    Authorization(TAG_KEY_SIZE, key_size);
+    return SigningKey();
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::RsaSigningKey(uint32_t key_size,
+                                                                       uint64_t public_exponent) {
+    RsaKey(key_size, public_exponent);
+    return SigningKey();
+}
+
+inline AuthorizationSetBuilder&
+AuthorizationSetBuilder::RsaEncryptionKey(uint32_t key_size, uint64_t public_exponent) {
+    RsaKey(key_size, public_exponent);
+    return EncryptionKey();
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::EcdsaSigningKey(uint32_t key_size) {
+    EcdsaKey(key_size);
+    return SigningKey();
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::EcdsaSigningKey(EcCurve curve) {
+    EcdsaKey(curve);
+    return SigningKey();
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::AesEncryptionKey(uint32_t key_size) {
+    AesKey(key_size);
+    return EncryptionKey();
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::SigningKey() {
+    Authorization(TAG_PURPOSE, KeyPurpose::SIGN);
+    return Authorization(TAG_PURPOSE, KeyPurpose::VERIFY);
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::EncryptionKey() {
+    Authorization(TAG_PURPOSE, KeyPurpose::ENCRYPT);
+    return Authorization(TAG_PURPOSE, KeyPurpose::DECRYPT);
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::NoDigestOrPadding() {
+    Authorization(TAG_DIGEST, Digest::NONE);
+    return Authorization(TAG_PADDING, PaddingMode::NONE);
+}
+
+inline AuthorizationSetBuilder& AuthorizationSetBuilder::EcbMode() {
+    return BlockMode(BlockMode::ECB);
+}
+
+inline AuthorizationSetBuilder&
+AuthorizationSetBuilder::BlockMode(std::initializer_list<V3_0::BlockMode> block_modes) {
+    for (auto block_mode : block_modes) {
+        Authorization(TAG_BLOCK_MODE, block_mode);
+    }
+    return *this;
+}
+
+inline AuthorizationSetBuilder&
+AuthorizationSetBuilder::Digest(std::initializer_list<V3_0::Digest> digests) {
+    for (auto digest : digests) {
+        Authorization(TAG_DIGEST, digest);
+    }
+    return *this;
+}
+
+inline AuthorizationSetBuilder&
+AuthorizationSetBuilder::Padding(std::initializer_list<V3_0::PaddingMode> padding_modes) {
+    for (auto padding : padding_modes) {
+        Authorization(TAG_PADDING, padding);
+    }
+    return *this;
+}
+
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
+
+#endif  // HARDWARE_INTERFACES_KEYMASTER_30_VTS_FUNCTIONAL_AUTHORIZATION_SET_H_
diff --git a/keymaster/3.0/vts/functional/key_param_output.cpp b/keymaster/3.0/vts/functional/key_param_output.cpp
new file mode 100644
index 0000000..fc9f685
--- /dev/null
+++ b/keymaster/3.0/vts/functional/key_param_output.cpp
@@ -0,0 +1,131 @@
+/*
+ * 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 "key_param_output.h"
+
+#include <iomanip>
+
+namespace android {
+namespace hardware {
+
+namespace keymaster {
+namespace V3_0 {
+
+::std::ostream& operator<<(::std::ostream& os, const hidl_vec<KeyParameter>& set) {
+    if (set.size() == 0) {
+        os << "(Empty)" << ::std::endl;
+    } else {
+        os << "\n";
+        for (size_t i = 0; i < set.size(); ++i)
+            os << set[i] << ::std::endl;
+    }
+    return os;
+}
+
+::std::ostream& operator<<(::std::ostream& os, ErrorCode value) {
+    return os << (int)value;
+}
+
+::std::ostream& operator<<(::std::ostream& os, Digest value) {
+    return os << stringify(value);
+}
+
+::std::ostream& operator<<(::std::ostream& os, Algorithm value) {
+    return os << stringify(value);
+}
+
+::std::ostream& operator<<(::std::ostream& os, BlockMode value) {
+    return os << stringify(value);
+}
+
+::std::ostream& operator<<(::std::ostream& os, PaddingMode value) {
+    return os << stringify(value);
+}
+
+::std::ostream& operator<<(::std::ostream& os, KeyOrigin value) {
+    return os << stringify(value);
+}
+
+::std::ostream& operator<<(::std::ostream& os, KeyPurpose value) {
+    return os << stringify(value);
+}
+
+::std::ostream& operator<<(::std::ostream& os, EcCurve value) {
+    return os << stringify(value);
+}
+
+::std::ostream& operator<<(::std::ostream& os, const KeyParameter& param) {
+    os << stringifyTag(param.tag) << ": ";
+    switch (typeFromTag(param.tag)) {
+    case TagType::INVALID:
+        return os << " Invalid";
+    case TagType::UINT_REP:
+    case TagType::UINT:
+        return os << param.f.integer;
+    case TagType::ENUM_REP:
+    case TagType::ENUM:
+        switch (param.tag) {
+        case Tag::ALGORITHM:
+            return os << param.f.algorithm;
+        case Tag::BLOCK_MODE:
+            return os << param.f.blockMode;
+        case Tag::PADDING:
+            return os << param.f.paddingMode;
+        case Tag::DIGEST:
+            return os << param.f.digest;
+        case Tag::EC_CURVE:
+            return os << (int)param.f.ecCurve;
+        case Tag::ORIGIN:
+            return os << param.f.origin;
+        case Tag::BLOB_USAGE_REQUIREMENTS:
+            return os << (int)param.f.keyBlobUsageRequirements;
+        case Tag::PURPOSE:
+            return os << param.f.purpose;
+        default:
+            return os << " UNKNOWN ENUM " << param.f.integer;
+        }
+    case TagType::ULONG_REP:
+    case TagType::ULONG:
+        return os << param.f.longInteger;
+    case TagType::DATE:
+        return os << param.f.dateTime;
+    case TagType::BOOL:
+        return os << "true";
+    case TagType::BIGNUM:
+        os << " Bignum: ";
+        for (size_t i = 0; i < param.blob.size(); ++i) {
+            os << ::std::hex << ::std::setw(2) << static_cast<int>(param.blob[i]) << ::std::dec;
+        }
+        return os;
+    case TagType::BYTES:
+        os << " Bytes: ";
+        for (size_t i = 0; i < param.blob.size(); ++i) {
+            os << ::std::hex << ::std::setw(2) << static_cast<int>(param.blob[i]) << ::std::dec;
+        }
+        return os;
+    }
+    return os << "UNKNOWN TAG TYPE!";
+}
+
+::std::ostream& operator<<(::std::ostream& os, const KeyCharacteristics& chars) {
+    return os << "SW: " << chars.softwareEnforced << ::std::endl
+              << "TEE: " << chars.teeEnforced << ::std::endl;
+}
+
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
diff --git a/keymaster/3.0/vts/functional/key_param_output.h b/keymaster/3.0/vts/functional/key_param_output.h
new file mode 100644
index 0000000..5edec2d
--- /dev/null
+++ b/keymaster/3.0/vts/functional/key_param_output.h
@@ -0,0 +1,50 @@
+/*
+ * 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 <iostream>
+
+#include <android/hardware/keymaster/3.0/types.h>
+
+#include "keymaster_tags.h"
+
+namespace android {
+namespace hardware {
+namespace keymaster {
+namespace V3_0 {
+
+template <typename ValueT>
+::std::ostream& operator<<(::std::ostream& os, const NullOr<ValueT>& value) {
+    if (!value.isOk()) {
+        os << "(value not present)";
+    } else {
+        os << value.value();
+    }
+    return os;
+}
+
+::std::ostream& operator<<(::std::ostream& os, const hidl_vec<KeyParameter>& set);
+::std::ostream& operator<<(::std::ostream& os, BlockMode value);
+::std::ostream& operator<<(::std::ostream& os, Digest value);
+::std::ostream& operator<<(::std::ostream& os, EcCurve value);
+::std::ostream& operator<<(::std::ostream& os, ErrorCode value);
+::std::ostream& operator<<(::std::ostream& os, PaddingMode value);
+::std::ostream& operator<<(::std::ostream& os, const KeyCharacteristics& value);
+::std::ostream& operator<<(::std::ostream& os, const KeyParameter& value);
+
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
diff --git a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
new file mode 100644
index 0000000..2382f0b
--- /dev/null
+++ b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
@@ -0,0 +1,3911 @@
+/*
+ * 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 "keymaster_hidl_hal_test"
+#include <cutils/log.h>
+
+#include <iostream>
+
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+
+#include <android/hardware/keymaster/3.0/IKeymasterDevice.h>
+#include <android/hardware/keymaster/3.0/types.h>
+
+#include <cutils/properties.h>
+
+#include <keymaster/keymaster_configuration.h>
+
+#include "authorization_set.h"
+#include "key_param_output.h"
+
+#include <VtsHalHidlTargetTestBase.h>
+
+#include "attestation_record.h"
+#include "openssl_utils.h"
+
+using ::android::sp;
+
+using ::std::string;
+
+// This service_name will be passed to getService when retrieving the keymaster service to test.  To
+// change it from "default" specify the selected service name on the command line.  The first
+// non-gtest argument will be used as the service name.
+string service_name = "default";
+
+namespace android {
+namespace hardware {
+
+template <typename T> bool operator==(const hidl_vec<T>& a, const hidl_vec<T>& b) {
+    if (a.size() != b.size()) {
+        return false;
+    }
+    for (size_t i = 0; i < a.size(); ++i) {
+        if (a[i] != b[i]) {
+            return false;
+        }
+    }
+    return true;
+}
+
+namespace keymaster {
+namespace V3_0 {
+
+bool operator==(const KeyParameter& a, const KeyParameter& b) {
+    if (a.tag != b.tag) {
+        return false;
+    }
+
+    switch (a.tag) {
+
+    /* Boolean tags */
+    case Tag::INVALID:
+    case Tag::CALLER_NONCE:
+    case Tag::INCLUDE_UNIQUE_ID:
+    case Tag::ECIES_SINGLE_HASH_MODE:
+    case Tag::BOOTLOADER_ONLY:
+    case Tag::NO_AUTH_REQUIRED:
+    case Tag::ALLOW_WHILE_ON_BODY:
+    case Tag::EXPORTABLE:
+    case Tag::ALL_APPLICATIONS:
+    case Tag::ROLLBACK_RESISTANT:
+    case Tag::RESET_SINCE_ID_ROTATION:
+        return true;
+
+    /* Integer tags */
+    case Tag::KEY_SIZE:
+    case Tag::MIN_MAC_LENGTH:
+    case Tag::MIN_SECONDS_BETWEEN_OPS:
+    case Tag::MAX_USES_PER_BOOT:
+    case Tag::ALL_USERS:
+    case Tag::USER_ID:
+    case Tag::OS_VERSION:
+    case Tag::OS_PATCHLEVEL:
+    case Tag::MAC_LENGTH:
+    case Tag::AUTH_TIMEOUT:
+        return a.f.integer == b.f.integer;
+
+    /* Long integer tags */
+    case Tag::RSA_PUBLIC_EXPONENT:
+    case Tag::USER_SECURE_ID:
+        return a.f.longInteger == b.f.longInteger;
+
+    /* Date-time tags */
+    case Tag::ACTIVE_DATETIME:
+    case Tag::ORIGINATION_EXPIRE_DATETIME:
+    case Tag::USAGE_EXPIRE_DATETIME:
+    case Tag::CREATION_DATETIME:
+        return a.f.dateTime == b.f.dateTime;
+
+    /* Bytes tags */
+    case Tag::APPLICATION_ID:
+    case Tag::APPLICATION_DATA:
+    case Tag::ROOT_OF_TRUST:
+    case Tag::UNIQUE_ID:
+    case Tag::ATTESTATION_CHALLENGE:
+    case Tag::ATTESTATION_APPLICATION_ID:
+    case Tag::ATTESTATION_ID_BRAND:
+    case Tag::ATTESTATION_ID_DEVICE:
+    case Tag::ATTESTATION_ID_PRODUCT:
+    case Tag::ATTESTATION_ID_SERIAL:
+    case Tag::ATTESTATION_ID_IMEI:
+    case Tag::ATTESTATION_ID_MEID:
+    case Tag::ATTESTATION_ID_MANUFACTURER:
+    case Tag::ATTESTATION_ID_MODEL:
+    case Tag::ASSOCIATED_DATA:
+    case Tag::NONCE:
+    case Tag::AUTH_TOKEN:
+        return a.blob == b.blob;
+
+    /* Enum tags */
+    case Tag::PURPOSE:
+        return a.f.purpose == b.f.purpose;
+    case Tag::ALGORITHM:
+        return a.f.algorithm == b.f.algorithm;
+    case Tag::BLOCK_MODE:
+        return a.f.blockMode == b.f.blockMode;
+    case Tag::DIGEST:
+        return a.f.digest == b.f.digest;
+    case Tag::PADDING:
+        return a.f.paddingMode == b.f.paddingMode;
+    case Tag::EC_CURVE:
+        return a.f.ecCurve == b.f.ecCurve;
+    case Tag::BLOB_USAGE_REQUIREMENTS:
+        return a.f.keyBlobUsageRequirements == b.f.keyBlobUsageRequirements;
+    case Tag::USER_AUTH_TYPE:
+        return a.f.integer == b.f.integer;
+    case Tag::ORIGIN:
+        return a.f.origin == b.f.origin;
+
+    /* Unsupported tags */
+    case Tag::KDF:
+        return false;
+    }
+}
+
+bool operator==(const AuthorizationSet& a, const AuthorizationSet& b) {
+    return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());
+}
+
+bool operator==(const KeyCharacteristics& a, const KeyCharacteristics& b) {
+    // This isn't very efficient. Oh, well.
+    AuthorizationSet a_sw(a.softwareEnforced);
+    AuthorizationSet b_sw(b.softwareEnforced);
+    AuthorizationSet a_tee(b.teeEnforced);
+    AuthorizationSet b_tee(b.teeEnforced);
+
+    a_sw.Sort();
+    b_sw.Sort();
+    a_tee.Sort();
+    b_tee.Sort();
+
+    return a_sw == b_sw && a_tee == b_sw;
+}
+
+::std::ostream& operator<<(::std::ostream& os, const AuthorizationSet& set) {
+    if (set.size() == 0)
+        os << "(Empty)" << ::std::endl;
+    else {
+        os << "\n";
+        for (size_t i = 0; i < set.size(); ++i)
+            os << set[i] << ::std::endl;
+    }
+    return os;
+}
+
+namespace test {
+namespace {
+
+template <TagType tag_type, Tag tag, typename ValueT>
+bool contains(hidl_vec<KeyParameter>& set, TypedTag<tag_type, tag> ttag, ValueT expected_value) {
+    size_t count = std::count_if(set.begin(), set.end(), [&](const KeyParameter& param) {
+        return param.tag == tag && accessTagValue(ttag, param) == expected_value;
+    });
+    return count == 1;
+}
+
+template <TagType tag_type, Tag tag>
+bool contains(hidl_vec<KeyParameter>& set, TypedTag<tag_type, tag>) {
+    size_t count = std::count_if(set.begin(), set.end(),
+                                 [&](const KeyParameter& param) { return param.tag == tag; });
+    return count > 0;
+}
+
+constexpr char hex_value[256] = {0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 1,  2,  3,  4,  5,  6,  7, 8, 9, 0, 0, 0, 0, 0, 0,  // '0'..'9'
+                                 0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 'A'..'F'
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 'a'..'f'
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0,  //
+                                 0, 0,  0,  0,  0,  0,  0,  0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+string hex2str(string a) {
+    string b;
+    size_t num = a.size() / 2;
+    b.resize(num);
+    for (size_t i = 0; i < num; i++) {
+        b[i] = (hex_value[a[i * 2] & 0xFF] << 4) + (hex_value[a[i * 2 + 1] & 0xFF]);
+    }
+    return b;
+}
+
+string rsa_key = hex2str("30820275020100300d06092a864886f70d01010105000482025f3082025b"
+                         "02010002818100c6095409047d8634812d5a218176e45c41d60a75b13901"
+                         "f234226cffe776521c5a77b9e389417b71c0b6a44d13afe4e4a2805d46c9"
+                         "da2935adb1ff0c1f24ea06e62b20d776430a4d435157233c6f916783c30e"
+                         "310fcbd89b85c2d56771169785ac12bca244abda72bfb19fc44d27c81e1d"
+                         "92de284f4061edfd99280745ea6d2502030100010281801be0f04d9cae37"
+                         "18691f035338308e91564b55899ffb5084d2460e6630257e05b3ceab0297"
+                         "2dfabcd6ce5f6ee2589eb67911ed0fac16e43a444b8c861e544a05933657"
+                         "72f8baf6b22fc9e3c5f1024b063ac080a7b2234cf8aee8f6c47bbf4fd3ac"
+                         "e7240290bef16c0b3f7f3cdd64ce3ab5912cf6e32f39ab188358afcccd80"
+                         "81024100e4b49ef50f765d3b24dde01aceaaf130f2c76670a91a61ae08af"
+                         "497b4a82be6dee8fcdd5e3f7ba1cfb1f0c926b88f88c92bfab137fba2285"
+                         "227b83c342ff7c55024100ddabb5839c4c7f6bf3d4183231f005b31aa58a"
+                         "ffdda5c79e4cce217f6bc930dbe563d480706c24e9ebfcab28a6cdefd324"
+                         "b77e1bf7251b709092c24ff501fd91024023d4340eda3445d8cd26c14411"
+                         "da6fdca63c1ccd4b80a98ad52b78cc8ad8beb2842c1d280405bc2f6c1bea"
+                         "214a1d742ab996b35b63a82a5e470fa88dbf823cdd02401b7b57449ad30d"
+                         "1518249a5f56bb98294d4b6ac12ffc86940497a5a5837a6cf946262b4945"
+                         "26d328c11e1126380fde04c24f916dec250892db09a6d77cdba351024077"
+                         "62cd8f4d050da56bd591adb515d24d7ccd32cca0d05f866d583514bd7324"
+                         "d5f33645e8ed8b4a1cb3cc4a1d67987399f2a09f5b3fb68c88d5e5d90ac3"
+                         "3492d6");
+
+string ec_key = hex2str("308187020100301306072a8648ce3d020106082a8648ce3d030107046d30"
+                        "6b0201010420737c2ecd7b8d1940bf2930aa9b4ed3ff941eed09366bc032"
+                        "99986481f3a4d859a14403420004bf85d7720d07c25461683bc648b4778a"
+                        "9a14dd8a024e3bdd8c7ddd9ab2b528bbc7aa1b51f14ebbbb0bd0ce21bcc4"
+                        "1c6eb00083cf3376d11fd44949e0b2183bfe");
+
+struct RSA_Delete {
+    void operator()(RSA* p) { RSA_free(p); }
+};
+
+X509* parse_cert_blob(const hidl_vec<uint8_t>& blob) {
+    const uint8_t* p = blob.data();
+    return d2i_X509(nullptr, &p, blob.size());
+}
+
+bool verify_chain(const hidl_vec<hidl_vec<uint8_t>>& chain) {
+    for (size_t i = 0; i < chain.size() - 1; ++i) {
+        auto& key_cert_blob = chain[i];
+        auto& signing_cert_blob = chain[i + 1];
+
+        X509_Ptr key_cert(parse_cert_blob(key_cert_blob));
+        X509_Ptr signing_cert(parse_cert_blob(signing_cert_blob));
+        EXPECT_TRUE(!!key_cert.get() && !!signing_cert.get());
+        if (!key_cert.get() || !signing_cert.get()) return false;
+
+        EVP_PKEY_Ptr signing_pubkey(X509_get_pubkey(signing_cert.get()));
+        EXPECT_TRUE(!!signing_pubkey.get());
+        if (!signing_pubkey.get()) return false;
+
+        EXPECT_EQ(1, X509_verify(key_cert.get(), signing_pubkey.get()))
+            << "Verification of certificate " << i << " failed";
+    }
+
+    return true;
+}
+
+// Extract attestation record from cert. Returned object is still part of cert; don't free it
+// separately.
+ASN1_OCTET_STRING* get_attestation_record(X509* certificate) {
+    ASN1_OBJECT_Ptr oid(OBJ_txt2obj(kAttestionRecordOid, 1 /* dotted string format */));
+    EXPECT_TRUE(!!oid.get());
+    if (!oid.get()) return nullptr;
+
+    int location = X509_get_ext_by_OBJ(certificate, oid.get(), -1 /* search from beginning */);
+    EXPECT_NE(-1, location);
+    if (location == -1) return nullptr;
+
+    X509_EXTENSION* attest_rec_ext = X509_get_ext(certificate, location);
+    EXPECT_TRUE(!!attest_rec_ext);
+    if (!attest_rec_ext) return nullptr;
+
+    ASN1_OCTET_STRING* attest_rec = X509_EXTENSION_get_data(attest_rec_ext);
+    EXPECT_TRUE(!!attest_rec);
+    return attest_rec;
+}
+
+bool tag_in_list(const KeyParameter& entry) {
+    // Attestations don't contain everything in key authorization lists, so we need to filter
+    // the key lists to produce the lists that we expect to match the attestations.
+    auto tag_list = {
+        Tag::USER_ID, Tag::INCLUDE_UNIQUE_ID, Tag::BLOB_USAGE_REQUIREMENTS,
+        Tag::EC_CURVE /* Tag::EC_CURVE will be included by KM2 implementations */,
+    };
+    return std::find(tag_list.begin(), tag_list.end(), entry.tag) != tag_list.end();
+}
+
+AuthorizationSet filter_tags(const AuthorizationSet& set) {
+    AuthorizationSet filtered;
+    std::remove_copy_if(set.begin(), set.end(), std::back_inserter(filtered), tag_in_list);
+    return filtered;
+}
+
+std::string make_string(const uint8_t* data, size_t length) {
+    return std::string(reinterpret_cast<const char*>(data), length);
+}
+
+template <size_t N> std::string make_string(const uint8_t (&a)[N]) {
+    return make_string(a, N);
+}
+
+class HidlBuf : public hidl_vec<uint8_t> {
+    typedef hidl_vec<uint8_t> super;
+
+  public:
+    HidlBuf() {}
+    HidlBuf(const super& other) : super(other) {}
+    HidlBuf(super&& other) : super(std::move(other)) {}
+    explicit HidlBuf(const std::string& other) : HidlBuf() { *this = other; }
+
+    HidlBuf& operator=(const super& other) {
+        super::operator=(other);
+        return *this;
+    }
+
+    HidlBuf& operator=(super&& other) {
+        super::operator=(std::move(other));
+        return *this;
+    }
+
+    HidlBuf& operator=(const string& other) {
+        resize(other.size());
+        for (size_t i = 0; i < other.size(); ++i) {
+            (*this)[i] = static_cast<uint8_t>(other[i]);
+        }
+        return *this;
+    }
+
+    string to_string() const { return string(reinterpret_cast<const char*>(data()), size()); }
+};
+
+constexpr uint64_t kOpHandleSentinel = 0xFFFFFFFFFFFFFFFF;
+
+}  // namespace
+
+class KeymasterHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+  public:
+    void TearDown() override {
+        if (key_blob_.size()) {
+            EXPECT_EQ(ErrorCode::OK, DeleteKey());
+        }
+        AbortIfNeeded();
+    }
+
+    // SetUpTestCase runs only once per test case, not once per test.
+    static void SetUpTestCase() {
+        keymaster_ = IKeymasterDevice::getService(service_name);
+        ASSERT_NE(keymaster_, nullptr);
+
+        ASSERT_TRUE(
+            keymaster_
+                ->getHardwareFeatures([&](bool isSecure, bool supportsEc, bool supportsSymmetric,
+                                          bool supportsAttestation, bool supportsAllDigests,
+                                          const hidl_string& name, const hidl_string& author) {
+                    is_secure_ = isSecure;
+                    supports_ec_ = supportsEc;
+                    supports_symmetric_ = supportsSymmetric;
+                    supports_attestation_ = supportsAttestation;
+                    supports_all_digests_ = supportsAllDigests;
+                    name_ = name;
+                    author_ = author;
+                })
+                .isOk());
+
+        os_version_ = ::keymaster::GetOsVersion();
+        os_patch_level_ = ::keymaster::GetOsPatchlevel();
+    }
+
+    static void TearDownTestCase() { keymaster_.clear(); }
+
+    static IKeymasterDevice& keymaster() { return *keymaster_; }
+    static uint32_t os_version() { return os_version_; }
+    static uint32_t os_patch_level() { return os_patch_level_; }
+
+    AuthorizationSet UserAuths() { return AuthorizationSetBuilder().Authorization(TAG_USER_ID, 7); }
+
+    ErrorCode GenerateKey(const AuthorizationSet& key_desc, HidlBuf* key_blob,
+                          KeyCharacteristics* key_characteristics) {
+        EXPECT_NE(key_blob, nullptr);
+        EXPECT_NE(key_characteristics, nullptr);
+        EXPECT_EQ(0U, key_blob->size());
+
+        ErrorCode error;
+        EXPECT_TRUE(keymaster_
+                        ->generateKey(key_desc.hidl_data(),
+                                      [&](ErrorCode hidl_error, const HidlBuf& hidl_key_blob,
+                                          const KeyCharacteristics& hidl_key_characteristics) {
+                                          error = hidl_error;
+                                          *key_blob = hidl_key_blob;
+                                          *key_characteristics = hidl_key_characteristics;
+                                      })
+                        .isOk());
+        // On error, blob & characteristics should be empty.
+        if (error != ErrorCode::OK) {
+            EXPECT_EQ(0U, key_blob->size());
+            EXPECT_EQ(0U, (key_characteristics->softwareEnforced.size() +
+                           key_characteristics->teeEnforced.size()));
+        }
+        return error;
+    }
+
+    ErrorCode GenerateKey(const AuthorizationSet& key_desc) {
+        return GenerateKey(key_desc, &key_blob_, &key_characteristics_);
+    }
+
+    ErrorCode ImportKey(const AuthorizationSet& key_desc, KeyFormat format,
+                        const string& key_material, HidlBuf* key_blob,
+                        KeyCharacteristics* key_characteristics) {
+        ErrorCode error;
+        EXPECT_TRUE(keymaster_
+                        ->importKey(key_desc.hidl_data(), format, HidlBuf(key_material),
+                                    [&](ErrorCode hidl_error, const HidlBuf& hidl_key_blob,
+                                        const KeyCharacteristics& hidl_key_characteristics) {
+                                        error = hidl_error;
+                                        *key_blob = hidl_key_blob;
+                                        *key_characteristics = hidl_key_characteristics;
+                                    })
+                        .isOk());
+        // On error, blob & characteristics should be empty.
+        if (error != ErrorCode::OK) {
+            EXPECT_EQ(0U, key_blob->size());
+            EXPECT_EQ(0U, (key_characteristics->softwareEnforced.size() +
+                           key_characteristics->teeEnforced.size()));
+        }
+        return error;
+    }
+
+    ErrorCode ImportKey(const AuthorizationSet& key_desc, KeyFormat format,
+                        const string& key_material) {
+        return ImportKey(key_desc, format, key_material, &key_blob_, &key_characteristics_);
+    }
+
+    ErrorCode ExportKey(KeyFormat format, const HidlBuf& key_blob, const HidlBuf& client_id,
+                        const HidlBuf& app_data, HidlBuf* key_material) {
+        ErrorCode error;
+        EXPECT_TRUE(
+            keymaster_
+                ->exportKey(format, key_blob, client_id, app_data,
+                            [&](ErrorCode hidl_error_code, const HidlBuf& hidl_key_material) {
+                                error = hidl_error_code;
+                                *key_material = hidl_key_material;
+                            })
+                .isOk());
+        // On error, blob should be empty.
+        if (error != ErrorCode::OK) {
+            EXPECT_EQ(0U, key_material->size());
+        }
+        return error;
+    }
+
+    ErrorCode ExportKey(KeyFormat format, HidlBuf* key_material) {
+        HidlBuf client_id, app_data;
+        return ExportKey(format, key_blob_, client_id, app_data, key_material);
+    }
+
+    ErrorCode DeleteKey(HidlBuf* key_blob) {
+        ErrorCode error = keymaster_->deleteKey(*key_blob);
+        *key_blob = HidlBuf();
+        return error;
+    }
+
+    ErrorCode DeleteKey() { return DeleteKey(&key_blob_); }
+
+    ErrorCode GetCharacteristics(const HidlBuf& key_blob, const HidlBuf& client_id,
+                                 const HidlBuf& app_data, KeyCharacteristics* key_characteristics) {
+        ErrorCode error;
+        keymaster_->getKeyCharacteristics(
+            key_blob, client_id, app_data,
+            [&](ErrorCode hidl_error, const KeyCharacteristics& hidl_key_characteristics) {
+                error = hidl_error, *key_characteristics = hidl_key_characteristics;
+            });
+        return error;
+    }
+
+    ErrorCode GetCharacteristics(const HidlBuf& key_blob, KeyCharacteristics* key_characteristics) {
+        HidlBuf client_id, app_data;
+        return GetCharacteristics(key_blob, client_id, app_data, key_characteristics);
+    }
+
+    ErrorCode Begin(KeyPurpose purpose, const HidlBuf& key_blob, const AuthorizationSet& in_params,
+                    AuthorizationSet* out_params, OperationHandle* op_handle) {
+        SCOPED_TRACE("Begin");
+        ErrorCode error;
+        OperationHandle saved_handle = *op_handle;
+        EXPECT_TRUE(
+            keymaster_
+                ->begin(purpose, key_blob, in_params.hidl_data(),
+                        [&](ErrorCode hidl_error, const hidl_vec<KeyParameter>& hidl_out_params,
+                            uint64_t hidl_op_handle) {
+                            error = hidl_error;
+                            *out_params = hidl_out_params;
+                            *op_handle = hidl_op_handle;
+                        })
+                .isOk());
+        if (error != ErrorCode::OK) {
+            // Some implementations may modify *op_handle on error.
+            *op_handle = saved_handle;
+        }
+        return error;
+    }
+
+    ErrorCode Begin(KeyPurpose purpose, const AuthorizationSet& in_params,
+                    AuthorizationSet* out_params) {
+        SCOPED_TRACE("Begin");
+        EXPECT_EQ(kOpHandleSentinel, op_handle_);
+        return Begin(purpose, key_blob_, in_params, out_params, &op_handle_);
+    }
+
+    ErrorCode Begin(KeyPurpose purpose, const AuthorizationSet& in_params) {
+        SCOPED_TRACE("Begin");
+        AuthorizationSet out_params;
+        ErrorCode error = Begin(purpose, in_params, &out_params);
+        EXPECT_TRUE(out_params.empty());
+        return error;
+    }
+
+    ErrorCode Update(OperationHandle op_handle, const AuthorizationSet& in_params,
+                     const string& input, AuthorizationSet* out_params, string* output,
+                     size_t* input_consumed) {
+        SCOPED_TRACE("Update");
+        ErrorCode error;
+        EXPECT_TRUE(keymaster_
+                        ->update(op_handle, in_params.hidl_data(), HidlBuf(input),
+                                 [&](ErrorCode hidl_error, uint32_t hidl_input_consumed,
+                                     const hidl_vec<KeyParameter>& hidl_out_params,
+                                     const HidlBuf& hidl_output) {
+                                     error = hidl_error;
+                                     out_params->push_back(AuthorizationSet(hidl_out_params));
+                                     output->append(hidl_output.to_string());
+                                     *input_consumed = hidl_input_consumed;
+                                 })
+                        .isOk());
+        return error;
+    }
+
+    ErrorCode Update(const string& input, string* out, size_t* input_consumed) {
+        SCOPED_TRACE("Update");
+        AuthorizationSet out_params;
+        ErrorCode error = Update(op_handle_, AuthorizationSet() /* in_params */, input, &out_params,
+                                 out, input_consumed);
+        EXPECT_TRUE(out_params.empty());
+        return error;
+    }
+
+    ErrorCode Finish(OperationHandle op_handle, const AuthorizationSet& in_params,
+                     const string& input, const string& signature, AuthorizationSet* out_params,
+                     string* output) {
+        SCOPED_TRACE("Finish");
+        ErrorCode error;
+        EXPECT_TRUE(
+            keymaster_
+                ->finish(op_handle, in_params.hidl_data(), HidlBuf(input), HidlBuf(signature),
+                         [&](ErrorCode hidl_error, const hidl_vec<KeyParameter>& hidl_out_params,
+                             const HidlBuf& hidl_output) {
+                             error = hidl_error;
+                             *out_params = hidl_out_params;
+                             output->append(hidl_output.to_string());
+                         })
+                .isOk());
+        op_handle_ = kOpHandleSentinel;  // So dtor doesn't Abort().
+        return error;
+    }
+
+    ErrorCode Finish(const string& message, string* output) {
+        SCOPED_TRACE("Finish");
+        AuthorizationSet out_params;
+        string finish_output;
+        ErrorCode error = Finish(op_handle_, AuthorizationSet() /* in_params */, message,
+                                 "" /* signature */, &out_params, output);
+        if (error != ErrorCode::OK) {
+            return error;
+        }
+        EXPECT_EQ(0U, out_params.size());
+        return error;
+    }
+
+    ErrorCode Finish(const string& message, const string& signature, string* output) {
+        SCOPED_TRACE("Finish");
+        AuthorizationSet out_params;
+        ErrorCode error = Finish(op_handle_, AuthorizationSet() /* in_params */, message, signature,
+                                 &out_params, output);
+        op_handle_ = kOpHandleSentinel;  // So dtor doesn't Abort().
+        if (error != ErrorCode::OK) {
+            return error;
+        }
+        EXPECT_EQ(0U, out_params.size());
+        return error;
+    }
+
+    ErrorCode Abort(OperationHandle op_handle) {
+        SCOPED_TRACE("Abort");
+        auto retval = keymaster_->abort(op_handle);
+        EXPECT_TRUE(retval.isOk());
+        return retval;
+    }
+
+    void AbortIfNeeded() {
+        SCOPED_TRACE("AbortIfNeeded");
+        if (op_handle_ != kOpHandleSentinel) {
+            EXPECT_EQ(ErrorCode::OK, Abort(op_handle_));
+            op_handle_ = kOpHandleSentinel;
+        }
+    }
+
+    ErrorCode AttestKey(const HidlBuf& key_blob, const AuthorizationSet& attest_params,
+                        hidl_vec<hidl_vec<uint8_t>>* cert_chain) {
+        SCOPED_TRACE("AttestKey");
+        ErrorCode error;
+        keymaster_->attestKey(
+            key_blob, attest_params.hidl_data(),
+            [&](ErrorCode hidl_error, const hidl_vec<hidl_vec<uint8_t>>& hidl_cert_chain) {
+                error = hidl_error;
+                *cert_chain = hidl_cert_chain;
+            });
+        return error;
+    }
+
+    ErrorCode AttestKey(const AuthorizationSet& attest_params,
+                        hidl_vec<hidl_vec<uint8_t>>* cert_chain) {
+        SCOPED_TRACE("AttestKey");
+        return AttestKey(key_blob_, attest_params, cert_chain);
+    }
+
+    string ProcessMessage(const HidlBuf& key_blob, KeyPurpose operation, const string& message,
+                          const AuthorizationSet& in_params, AuthorizationSet* out_params) {
+        SCOPED_TRACE("ProcessMessage");
+        AuthorizationSet begin_out_params;
+        EXPECT_EQ(ErrorCode::OK,
+                  Begin(operation, key_blob, in_params, &begin_out_params, &op_handle_));
+
+        string unused;
+        AuthorizationSet finish_params;
+        AuthorizationSet finish_out_params;
+        string output;
+        EXPECT_EQ(ErrorCode::OK,
+                  Finish(op_handle_, finish_params, message, unused, &finish_out_params, &output));
+        op_handle_ = kOpHandleSentinel;
+
+        out_params->push_back(begin_out_params);
+        out_params->push_back(finish_out_params);
+        return output;
+    }
+
+    string SignMessage(const HidlBuf& key_blob, const string& message,
+                       const AuthorizationSet& params) {
+        SCOPED_TRACE("SignMessage");
+        AuthorizationSet out_params;
+        string signature = ProcessMessage(key_blob, KeyPurpose::SIGN, message, params, &out_params);
+        EXPECT_TRUE(out_params.empty());
+        return signature;
+    }
+
+    string SignMessage(const string& message, const AuthorizationSet& params) {
+        SCOPED_TRACE("SignMessage");
+        return SignMessage(key_blob_, message, params);
+    }
+
+    string MacMessage(const string& message, Digest digest, size_t mac_length) {
+        SCOPED_TRACE("MacMessage");
+        return SignMessage(
+            key_blob_, message,
+            AuthorizationSetBuilder().Digest(digest).Authorization(TAG_MAC_LENGTH, mac_length));
+    }
+
+    void CheckHmacTestVector(const string& key, const string& message, Digest digest,
+                             const string& expected_mac) {
+        SCOPED_TRACE("CheckHmacTestVector");
+        ASSERT_EQ(ErrorCode::OK,
+                  ImportKey(AuthorizationSetBuilder()
+                                .Authorization(TAG_NO_AUTH_REQUIRED)
+                                .HmacKey(key.size() * 8)
+                                .Authorization(TAG_MIN_MAC_LENGTH, expected_mac.size() * 8)
+                                .Digest(digest),
+                            KeyFormat::RAW, key));
+        string signature = MacMessage(message, digest, expected_mac.size() * 8);
+        EXPECT_EQ(expected_mac, signature) << "Test vector didn't match for digest " << (int)digest;
+        DeleteKey();
+    }
+
+    void CheckAesCtrTestVector(const string& key, const string& nonce, const string& message,
+                               const string& expected_ciphertext) {
+        SCOPED_TRACE("CheckAesCtrTestVector");
+        ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
+                                               .Authorization(TAG_NO_AUTH_REQUIRED)
+                                               .AesEncryptionKey(key.size() * 8)
+                                               .BlockMode(BlockMode::CTR)
+                                               .Authorization(TAG_CALLER_NONCE)
+                                               .Padding(PaddingMode::NONE),
+                                           KeyFormat::RAW, key));
+
+        auto params = AuthorizationSetBuilder()
+                          .Authorization(TAG_NONCE, nonce.data(), nonce.size())
+                          .BlockMode(BlockMode::CTR)
+                          .Padding(PaddingMode::NONE);
+        AuthorizationSet out_params;
+        string ciphertext = EncryptMessage(key_blob_, message, params, &out_params);
+        EXPECT_EQ(expected_ciphertext, ciphertext);
+    }
+
+    void VerifyMessage(const HidlBuf& key_blob, const string& message, const string& signature,
+                       const AuthorizationSet& params) {
+        SCOPED_TRACE("VerifyMessage");
+        AuthorizationSet begin_out_params;
+        ASSERT_EQ(ErrorCode::OK,
+                  Begin(KeyPurpose::VERIFY, key_blob, params, &begin_out_params, &op_handle_));
+
+        string unused;
+        AuthorizationSet finish_params;
+        AuthorizationSet finish_out_params;
+        string output;
+        EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, finish_params, message, signature,
+                                        &finish_out_params, &output));
+        op_handle_ = kOpHandleSentinel;
+        EXPECT_TRUE(output.empty());
+    }
+
+    void VerifyMessage(const string& message, const string& signature,
+                       const AuthorizationSet& params) {
+        SCOPED_TRACE("VerifyMessage");
+        VerifyMessage(key_blob_, message, signature, params);
+    }
+
+    string EncryptMessage(const HidlBuf& key_blob, const string& message,
+                          const AuthorizationSet& in_params, AuthorizationSet* out_params) {
+        SCOPED_TRACE("EncryptMessage");
+        return ProcessMessage(key_blob, KeyPurpose::ENCRYPT, message, in_params, out_params);
+    }
+
+    string EncryptMessage(const string& message, const AuthorizationSet& params,
+                          AuthorizationSet* out_params) {
+        SCOPED_TRACE("EncryptMessage");
+        return EncryptMessage(key_blob_, message, params, out_params);
+    }
+
+    string EncryptMessage(const string& message, const AuthorizationSet& params) {
+        SCOPED_TRACE("EncryptMessage");
+        AuthorizationSet out_params;
+        string ciphertext = EncryptMessage(message, params, &out_params);
+        EXPECT_TRUE(out_params.empty())
+            << "Output params should be empty. Contained: " << out_params;
+        return ciphertext;
+    }
+
+    string DecryptMessage(const HidlBuf& key_blob, const string& ciphertext,
+                          const AuthorizationSet& params) {
+        SCOPED_TRACE("DecryptMessage");
+        AuthorizationSet out_params;
+        string plaintext =
+            ProcessMessage(key_blob, KeyPurpose::DECRYPT, ciphertext, params, &out_params);
+        EXPECT_TRUE(out_params.empty());
+        return plaintext;
+    }
+
+    string DecryptMessage(const string& ciphertext, const AuthorizationSet& params) {
+        SCOPED_TRACE("DecryptMessage");
+        return DecryptMessage(key_blob_, ciphertext, params);
+    }
+
+    template <TagType tag_type, Tag tag, typename ValueT>
+    void CheckKm0CryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) {
+        SCOPED_TRACE("CheckKm0CryptoParam");
+        if (is_secure_) {
+            EXPECT_TRUE(contains(key_characteristics_.teeEnforced, ttag, expected));
+            EXPECT_FALSE(contains(key_characteristics_.softwareEnforced, ttag));
+        } else {
+            EXPECT_TRUE(contains(key_characteristics_.softwareEnforced, ttag, expected));
+            EXPECT_FALSE(contains(key_characteristics_.teeEnforced, ttag));
+        }
+    }
+
+    template <TagType tag_type, Tag tag, typename ValueT>
+    void CheckKm1CryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) {
+        SCOPED_TRACE("CheckKm1CryptoParam");
+        if (is_secure_ && supports_symmetric_) {
+            EXPECT_TRUE(contains(key_characteristics_.teeEnforced, ttag, expected));
+            EXPECT_FALSE(contains(key_characteristics_.softwareEnforced, ttag));
+        } else {
+            EXPECT_TRUE(contains(key_characteristics_.softwareEnforced, ttag, expected));
+            EXPECT_FALSE(contains(key_characteristics_.teeEnforced, ttag));
+        }
+    }
+
+    template <TagType tag_type, Tag tag, typename ValueT>
+    void CheckKm2CryptoParam(TypedTag<tag_type, tag> ttag, ValueT expected) {
+        SCOPED_TRACE("CheckKm2CryptoParam");
+        if (supports_attestation_) {
+            EXPECT_TRUE(contains(key_characteristics_.teeEnforced, ttag, expected));
+            EXPECT_FALSE(contains(key_characteristics_.softwareEnforced, ttag));
+        } else if (!supports_symmetric_ /* KM version < 1 or SW */) {
+            EXPECT_TRUE(contains(key_characteristics_.softwareEnforced, ttag, expected));
+            EXPECT_FALSE(contains(key_characteristics_.teeEnforced, ttag));
+        }
+    }
+
+    void CheckOrigin() {
+        SCOPED_TRACE("CheckOrigin");
+        if (is_secure_ && supports_symmetric_) {
+            EXPECT_TRUE(
+                contains(key_characteristics_.teeEnforced, TAG_ORIGIN, KeyOrigin::IMPORTED));
+        } else if (is_secure_) {
+            EXPECT_TRUE(contains(key_characteristics_.teeEnforced, TAG_ORIGIN, KeyOrigin::UNKNOWN));
+        } else {
+            EXPECT_TRUE(
+                contains(key_characteristics_.softwareEnforced, TAG_ORIGIN, KeyOrigin::IMPORTED));
+        }
+    }
+
+    static bool IsSecure() { return is_secure_; }
+    static bool SupportsEc() { return supports_ec_; }
+    static bool SupportsSymmetric() { return supports_symmetric_; }
+    static bool SupportsAllDigests() { return supports_all_digests_; }
+    static bool SupportsAttestation() { return supports_attestation_; }
+
+    static bool Km2Profile() {
+        return SupportsAttestation() && SupportsAllDigests() && SupportsSymmetric() &&
+               SupportsEc() && IsSecure();
+    }
+
+    static bool Km1Profile() {
+        return !SupportsAttestation() && SupportsSymmetric() && SupportsEc() && IsSecure();
+    }
+
+    static bool Km0Profile() {
+        return !SupportsAttestation() && !SupportsAllDigests() && !SupportsSymmetric() &&
+               IsSecure();
+    }
+
+    static bool SwOnlyProfile() {
+        return !SupportsAttestation() && !SupportsAllDigests() && !SupportsSymmetric() &&
+               !SupportsEc() && !IsSecure();
+    }
+
+    HidlBuf key_blob_;
+    KeyCharacteristics key_characteristics_;
+    OperationHandle op_handle_ = kOpHandleSentinel;
+
+  private:
+    static sp<IKeymasterDevice> keymaster_;
+    static uint32_t os_version_;
+    static uint32_t os_patch_level_;
+
+    static bool is_secure_;
+    static bool supports_ec_;
+    static bool supports_symmetric_;
+    static bool supports_attestation_;
+    static bool supports_all_digests_;
+    static hidl_string name_;
+    static hidl_string author_;
+};
+
+uint32_t expected_keymaster_version() {
+    if (!KeymasterHidlTest::IsSecure()) return 2;  // SW is KM2
+
+    uint32_t keymaster_version = 0;
+    if (KeymasterHidlTest::SupportsSymmetric()) keymaster_version = 1;
+    if (KeymasterHidlTest::SupportsAttestation()) keymaster_version = 2;
+    return keymaster_version;
+}
+
+bool verify_attestation_record(const string& challenge, AuthorizationSet expected_sw_enforced,
+                               AuthorizationSet expected_tee_enforced,
+                               const hidl_vec<uint8_t>& attestation_cert) {
+
+    X509_Ptr cert(parse_cert_blob(attestation_cert));
+    EXPECT_TRUE(!!cert.get());
+    if (!cert.get()) return false;
+
+    ASN1_OCTET_STRING* attest_rec = get_attestation_record(cert.get());
+    EXPECT_TRUE(!!attest_rec);
+    if (!attest_rec) return false;
+
+    AuthorizationSet att_sw_enforced;
+    AuthorizationSet att_tee_enforced;
+    uint32_t att_attestation_version;
+    uint32_t att_keymaster_version;
+    SecurityLevel att_attestation_security_level;
+    SecurityLevel att_keymaster_security_level;
+    HidlBuf att_challenge;
+    HidlBuf att_unique_id;
+    EXPECT_EQ(ErrorCode::OK,
+              parse_attestation_record(attest_rec->data,                 //
+                                       attest_rec->length,               //
+                                       &att_attestation_version,         //
+                                       &att_attestation_security_level,  //
+                                       &att_keymaster_version,           //
+                                       &att_keymaster_security_level,    //
+                                       &att_challenge,                   //
+                                       &att_sw_enforced,                 //
+                                       &att_tee_enforced,                //
+                                       &att_unique_id));
+
+    EXPECT_EQ(1U, att_attestation_version);
+    EXPECT_EQ(expected_keymaster_version(), att_keymaster_version);
+    EXPECT_EQ(KeymasterHidlTest::IsSecure() ? SecurityLevel::TRUSTED_ENVIRONMENT
+                                            : SecurityLevel::SOFTWARE,
+              att_keymaster_security_level);
+    EXPECT_EQ(KeymasterHidlTest::SupportsAttestation() ? SecurityLevel::TRUSTED_ENVIRONMENT
+                                                       : SecurityLevel::SOFTWARE,
+              att_attestation_security_level);
+
+    EXPECT_EQ(challenge.length(), att_challenge.size());
+    EXPECT_EQ(0, memcmp(challenge.data(), att_challenge.data(), challenge.length()));
+
+    att_sw_enforced.Sort();
+    expected_sw_enforced.Sort();
+    EXPECT_EQ(filter_tags(expected_sw_enforced), filter_tags(att_sw_enforced));
+
+    att_tee_enforced.Sort();
+    expected_tee_enforced.Sort();
+    EXPECT_EQ(filter_tags(expected_tee_enforced), filter_tags(att_tee_enforced));
+
+    return true;
+}
+
+sp<IKeymasterDevice> KeymasterHidlTest::keymaster_;
+uint32_t KeymasterHidlTest::os_version_;
+uint32_t KeymasterHidlTest::os_patch_level_;
+bool KeymasterHidlTest::is_secure_;
+bool KeymasterHidlTest::supports_ec_;
+bool KeymasterHidlTest::supports_symmetric_;
+bool KeymasterHidlTest::supports_all_digests_;
+bool KeymasterHidlTest::supports_attestation_;
+hidl_string KeymasterHidlTest::name_;
+hidl_string KeymasterHidlTest::author_;
+
+typedef KeymasterHidlTest KeymasterVersionTest;
+
+/*
+ * KeymasterVersionTest.SensibleFeatures:
+ *
+ * Queries keymaster to find the set of features it supports. Fails if the combination doesn't
+ * correspond to any well-defined keymaster version.
+ */
+TEST_F(KeymasterVersionTest, SensibleFeatures) {
+    EXPECT_TRUE(Km2Profile() || Km1Profile() || Km0Profile() || SwOnlyProfile())
+        << "Keymaster feature set doesn't fit any reasonable profile.  Reported features:"
+        << "SupportsAttestation [" << SupportsAttestation() << "], "
+        << "SupportsSymmetric [" << SupportsSymmetric() << "], "
+        << "SupportsAllDigests [" << SupportsAllDigests() << "], "
+        << "SupportsEc [" << SupportsEc() << "], "
+        << "IsSecure [" << IsSecure() << "]";
+}
+
+class NewKeyGenerationTest : public KeymasterHidlTest {
+  protected:
+    void CheckBaseParams(const KeyCharacteristics& keyCharacteristics) {
+        // TODO(swillden): Distinguish which params should be in which auth list.
+
+        AuthorizationSet auths(keyCharacteristics.teeEnforced);
+        auths.push_back(AuthorizationSet(keyCharacteristics.softwareEnforced));
+
+        EXPECT_TRUE(auths.Contains(TAG_ORIGIN, KeyOrigin::GENERATED));
+
+        EXPECT_TRUE(auths.Contains(TAG_PURPOSE, KeyPurpose::SIGN));
+        EXPECT_TRUE(auths.Contains(TAG_PURPOSE, KeyPurpose::VERIFY));
+        EXPECT_TRUE(auths.Contains(TAG_USER_ID, 7))
+            << "User ID should be 7, was " << auths.GetTagValue(TAG_USER_ID);
+
+        // Verify that App ID, App data and ROT are NOT included.
+        EXPECT_FALSE(auths.Contains(TAG_ROOT_OF_TRUST));
+        EXPECT_FALSE(auths.Contains(TAG_APPLICATION_ID));
+        EXPECT_FALSE(auths.Contains(TAG_APPLICATION_DATA));
+
+        // Check that some unexpected tags/values are NOT present.
+        EXPECT_FALSE(auths.Contains(TAG_PURPOSE, KeyPurpose::ENCRYPT));
+        EXPECT_FALSE(auths.Contains(TAG_PURPOSE, KeyPurpose::DECRYPT));
+        EXPECT_FALSE(auths.Contains(TAG_AUTH_TIMEOUT, 301));
+
+        // Now check that unspecified, defaulted tags are correct.
+        EXPECT_TRUE(auths.Contains(TAG_CREATION_DATETIME));
+
+        if (SupportsAttestation()) {
+            EXPECT_TRUE(auths.Contains(TAG_OS_VERSION, os_version()))
+                << "OS version is " << os_version() << " key reported "
+                << auths.GetTagValue(TAG_OS_VERSION);
+            EXPECT_TRUE(auths.Contains(TAG_OS_PATCHLEVEL, os_patch_level()))
+                << "OS patch level is " << os_patch_level() << " key reported "
+                << auths.GetTagValue(TAG_OS_PATCHLEVEL);
+        }
+    }
+};
+
+/*
+ * NewKeyGenerationTest.Rsa
+ *
+ * Verifies that keymaster can generate all required RSA key sizes, and that the resulting keys have
+ * correct characteristics.
+ */
+TEST_F(NewKeyGenerationTest, Rsa) {
+    for (auto key_size : {1024, 2048, 3072, 4096}) {
+        HidlBuf key_blob;
+        KeyCharacteristics key_characteristics;
+        ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                                 .RsaSigningKey(key_size, 3)
+                                                 .Digest(Digest::NONE)
+                                                 .Padding(PaddingMode::NONE)
+                                                 .Authorizations(UserAuths()),
+                                             &key_blob, &key_characteristics));
+
+        ASSERT_GT(key_blob.size(), 0U);
+        CheckBaseParams(key_characteristics);
+
+        AuthorizationSet crypto_params;
+        if (IsSecure()) {
+            crypto_params = key_characteristics.teeEnforced;
+        } else {
+            crypto_params = key_characteristics.softwareEnforced;
+        }
+
+        EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, KM_ALGORITHM_RSA));
+        EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size));
+        EXPECT_TRUE(crypto_params.Contains(TAG_RSA_PUBLIC_EXPONENT, 3));
+
+        EXPECT_EQ(ErrorCode::OK, DeleteKey(&key_blob));
+    }
+}
+
+/*
+ * NewKeyGenerationTest.RsaNoDefaultSize
+ *
+ * Verifies that failing to specify a key size for RSA key generation returns UNSUPPORTED_KEY_SIZE.
+ */
+TEST_F(NewKeyGenerationTest, RsaNoDefaultSize) {
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_KEY_SIZE,
+              GenerateKey(AuthorizationSetBuilder()
+                              .Authorization(TAG_ALGORITHM, Algorithm::RSA)
+                              .Authorization(TAG_RSA_PUBLIC_EXPONENT, 3)
+                              .SigningKey()));
+}
+
+/*
+ * NewKeyGenerationTest.Ecdsa
+ *
+ * Verifies that keymaster can generate all required EC key sizes, and that the resulting keys have
+ * correct characteristics.
+ */
+TEST_F(NewKeyGenerationTest, Ecdsa) {
+    for (auto key_size : {224, 256, 384, 521}) {
+        HidlBuf key_blob;
+        KeyCharacteristics key_characteristics;
+        ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                                 .EcdsaSigningKey(key_size)
+                                                 .Digest(Digest::NONE)
+                                                 .Authorizations(UserAuths()),
+                                             &key_blob, &key_characteristics));
+        ASSERT_GT(key_blob.size(), 0U);
+        CheckBaseParams(key_characteristics);
+
+        AuthorizationSet crypto_params;
+        if (IsSecure()) {
+            crypto_params = key_characteristics.teeEnforced;
+        } else {
+            crypto_params = key_characteristics.softwareEnforced;
+        }
+
+        EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::EC));
+        EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size));
+
+        EXPECT_EQ(ErrorCode::OK, DeleteKey(&key_blob));
+    }
+}
+
+/*
+ * NewKeyGenerationTest.EcdsaDefaultSize
+ *
+ * Verifies that failing to specify a key size for EC key generation returns UNSUPPORTED_KEY_SIZE.
+ */
+TEST_F(NewKeyGenerationTest, EcdsaDefaultSize) {
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_KEY_SIZE,
+              GenerateKey(AuthorizationSetBuilder()
+                              .Authorization(TAG_ALGORITHM, Algorithm::EC)
+                              .SigningKey()
+                              .Digest(Digest::NONE)));
+}
+
+/*
+ * NewKeyGenerationTest.EcdsaInvalidSize
+ *
+ * Verifies that failing to specify an invalid key size for EC key generation returns
+ * UNSUPPORTED_KEY_SIZE.
+ */
+TEST_F(NewKeyGenerationTest, EcdsaInvalidSize) {
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_KEY_SIZE,
+              GenerateKey(AuthorizationSetBuilder().EcdsaSigningKey(190).Digest(Digest::NONE)));
+}
+
+/*
+ * NewKeyGenerationTest.EcdsaMismatchKeySize
+ *
+ * Verifies that specifying mismatched key size and curve for EC key generation returns
+ * INVALID_ARGUMENT.
+ */
+TEST_F(NewKeyGenerationTest, EcdsaMismatchKeySize) {
+    ASSERT_EQ(ErrorCode::INVALID_ARGUMENT,
+              GenerateKey(AuthorizationSetBuilder()
+                              .EcdsaSigningKey(224)
+                              .Authorization(TAG_EC_CURVE, EcCurve::P_256)
+                              .Digest(Digest::NONE)))
+        << "(Possibly b/36233343)";
+}
+
+TEST_F(NewKeyGenerationTest, EcdsaAllValidSizes) {
+    size_t valid_sizes[] = {224, 256, 384, 521};
+    for (size_t size : valid_sizes) {
+        EXPECT_EQ(ErrorCode::OK,
+                  GenerateKey(AuthorizationSetBuilder().EcdsaSigningKey(size).Digest(Digest::NONE)))
+            << "Failed to generate size: " << size;
+        DeleteKey();
+    }
+}
+
+/*
+ * NewKeyGenerationTest.EcdsaAllValidCurves
+ *
+ * Verifies that keymaster supports all required EC curves.
+ */
+TEST_F(NewKeyGenerationTest, EcdsaAllValidCurves) {
+    EcCurve curves[] = {EcCurve::P_224, EcCurve::P_256, EcCurve::P_384, EcCurve::P_521};
+    for (auto curve : curves) {
+        EXPECT_EQ(
+            ErrorCode::OK,
+            GenerateKey(AuthorizationSetBuilder().EcdsaSigningKey(curve).Digest(Digest::SHA_2_512)))
+            << "Failed to generate key on curve: " << curve;
+        DeleteKey();
+    }
+}
+
+/*
+ * NewKeyGenerationTest.Hmac
+ *
+ * Verifies that keymaster supports all required digests, and that the resulting keys have correct
+ * characteristics.
+ */
+TEST_F(NewKeyGenerationTest, Hmac) {
+    for (auto digest : {Digest::MD5, Digest::SHA1, Digest::SHA_2_224, Digest::SHA_2_256,
+                        Digest::SHA_2_384, Digest::SHA_2_512}) {
+        HidlBuf key_blob;
+        KeyCharacteristics key_characteristics;
+        constexpr size_t key_size = 128;
+        ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                                 .HmacKey(key_size)
+                                                 .Digest(digest)
+                                                 .Authorization(TAG_MIN_MAC_LENGTH, 128)
+                                                 .Authorizations(UserAuths()),
+                                             &key_blob, &key_characteristics));
+
+        ASSERT_GT(key_blob.size(), 0U);
+        CheckBaseParams(key_characteristics);
+
+        AuthorizationSet teeEnforced = key_characteristics.teeEnforced;
+        AuthorizationSet softwareEnforced = key_characteristics.softwareEnforced;
+        if (SupportsAttestation() || SupportsAllDigests()) {
+            // Either KM2, which must support all, or KM1 that claims full support
+            EXPECT_TRUE(teeEnforced.Contains(TAG_ALGORITHM, Algorithm::HMAC));
+            EXPECT_TRUE(teeEnforced.Contains(TAG_KEY_SIZE, key_size));
+        } else if (SupportsSymmetric()) {
+            if (digest == Digest::SHA1 || digest == Digest::SHA_2_256) {
+                // KM1 must support SHA1 and SHA256 in hardware
+                EXPECT_TRUE(teeEnforced.Contains(TAG_ALGORITHM, Algorithm::HMAC));
+                EXPECT_TRUE(teeEnforced.Contains(TAG_KEY_SIZE, key_size));
+            } else {
+                // Othere digests may or may not be supported
+                EXPECT_TRUE(teeEnforced.Contains(TAG_ALGORITHM, Algorithm::HMAC) ||
+                            softwareEnforced.Contains(TAG_ALGORITHM, Algorithm::HMAC));
+                EXPECT_TRUE(teeEnforced.Contains(TAG_KEY_SIZE, key_size) ||
+                            softwareEnforced.Contains(TAG_KEY_SIZE, key_size));
+            }
+        } else {
+            // KM0 and SW KM do all digests in SW.
+            EXPECT_TRUE(softwareEnforced.Contains(TAG_ALGORITHM, Algorithm::HMAC));
+            EXPECT_TRUE(softwareEnforced.Contains(TAG_KEY_SIZE, key_size));
+        }
+
+        EXPECT_EQ(ErrorCode::OK, DeleteKey(&key_blob));
+    }
+}
+
+/*
+ * NewKeyGenerationTest.HmacCheckKeySizes
+ *
+ * Verifies that keymaster supports all key sizes, and rejects all invalid key sizes.
+ */
+TEST_F(NewKeyGenerationTest, HmacCheckKeySizes) {
+    for (size_t key_size = 0; key_size <= 512; ++key_size) {
+        if (key_size < 64 || key_size % 8 != 0) {
+            // To keep this test from being very slow, we only test a random fraction of non-byte
+            // key sizes.  We test only ~10% of such cases. Since there are 392 of them, we expect
+            // to run ~40 of them in each run.
+            if (key_size % 8 == 0 || random() % 10 == 0) {
+                EXPECT_EQ(ErrorCode::UNSUPPORTED_KEY_SIZE,
+                          GenerateKey(AuthorizationSetBuilder()
+                                          .HmacKey(key_size)
+                                          .Digest(Digest::SHA_2_256)
+                                          .Authorization(TAG_MIN_MAC_LENGTH, 256)))
+                    << "HMAC key size " << key_size << " invalid (Possibly b/33462346)";
+            }
+        } else {
+            EXPECT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                                     .HmacKey(key_size)
+                                                     .Digest(Digest::SHA_2_256)
+                                                     .Authorization(TAG_MIN_MAC_LENGTH, 256)));
+            DeleteKey();
+        }
+    }
+}
+
+/*
+ * NewKeyGenerationTest.HmacCheckMinMacLengths
+ *
+ * Verifies that keymaster supports all required MAC lengths and rejects all invalid lengths.  This
+ * test is probabilistic in order to keep the runtime down, but any failure prints out the specific
+ * MAC length that failed, so reproducing a failed run will be easy.
+ */
+TEST_F(NewKeyGenerationTest, HmacCheckMinMacLengths) {
+    for (size_t min_mac_length = 0; min_mac_length <= 256; ++min_mac_length) {
+        if (min_mac_length < 64 || min_mac_length % 8 != 0) {
+            // To keep this test from being very long, we only test a random fraction of non-byte
+            // lengths.  We test only ~10% of such cases. Since there are 172 of them, we expect to
+            // run ~17 of them in each run.
+            if (min_mac_length % 8 == 0 || random() % 10 == 0) {
+                EXPECT_EQ(ErrorCode::UNSUPPORTED_MIN_MAC_LENGTH,
+                          GenerateKey(AuthorizationSetBuilder()
+                                          .HmacKey(128)
+                                          .Digest(Digest::SHA_2_256)
+                                          .Authorization(TAG_MIN_MAC_LENGTH, min_mac_length)))
+                    << "HMAC min mac length " << min_mac_length << " invalid.";
+            }
+        } else {
+            EXPECT_EQ(ErrorCode::OK,
+                      GenerateKey(AuthorizationSetBuilder()
+                                      .HmacKey(128)
+                                      .Digest(Digest::SHA_2_256)
+                                      .Authorization(TAG_MIN_MAC_LENGTH, min_mac_length)));
+            DeleteKey();
+        }
+    }
+}
+
+/*
+ * NewKeyGenerationTest.HmacMultipleDigests
+ *
+ * Verifies that keymaster rejects HMAC key generation with multiple specified digest algorithms.
+ */
+TEST_F(NewKeyGenerationTest, HmacMultipleDigests) {
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_DIGEST,
+              GenerateKey(AuthorizationSetBuilder()
+                              .HmacKey(128)
+                              .Digest(Digest::SHA1)
+                              .Digest(Digest::SHA_2_256)
+                              .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+}
+
+/*
+ * NewKeyGenerationTest.HmacDigestNone
+ *
+ * Verifies that keymaster rejects HMAC key generation with no digest or Digest::NONE
+ */
+TEST_F(NewKeyGenerationTest, HmacDigestNone) {
+    ASSERT_EQ(
+        ErrorCode::UNSUPPORTED_DIGEST,
+        GenerateKey(AuthorizationSetBuilder().HmacKey(128).Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_DIGEST,
+              GenerateKey(AuthorizationSetBuilder()
+                              .HmacKey(128)
+                              .Digest(Digest::NONE)
+                              .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+}
+
+typedef KeymasterHidlTest GetKeyCharacteristicsTest;
+
+/*
+ * GetKeyCharacteristicsTest.HmacDigestNone
+ *
+ * Verifies that getKeyCharacteristics functions, and that generated and retrieved key
+ * characteristics match.
+ */
+TEST_F(GetKeyCharacteristicsTest, SimpleRsa) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(256, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)));
+
+    KeyCharacteristics retrieved_chars;
+    ASSERT_EQ(ErrorCode::OK, GetCharacteristics(key_blob_, &retrieved_chars));
+
+    AuthorizationSet gen_sw = key_characteristics_.softwareEnforced;
+    AuthorizationSet gen_tee = key_characteristics_.teeEnforced;
+    AuthorizationSet retrieved_sw = retrieved_chars.softwareEnforced;
+    AuthorizationSet retrieved_tee = retrieved_chars.teeEnforced;
+
+    EXPECT_EQ(gen_sw, retrieved_sw);
+    EXPECT_EQ(gen_tee, retrieved_tee);
+}
+
+typedef KeymasterHidlTest SigningOperationsTest;
+
+/*
+ * SigningOperationsTest.RsaSuccess
+ *
+ * Verifies that raw RSA signature operations succeed.
+ */
+TEST_F(SigningOperationsTest, RsaSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)));
+    string message = "12345678901234567890123456789012";
+    string signature = SignMessage(
+        message, AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::NONE));
+}
+
+/*
+ * SigningOperationsTest.RsaPssSha256Success
+ *
+ * Verifies that RSA-PSS signature operations succeed.
+ */
+TEST_F(SigningOperationsTest, RsaPssSha256Success) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::SHA_2_256)
+                                             .Padding(PaddingMode::RSA_PSS)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)));
+    // Use large message, which won't work without digesting.
+    string message(1024, 'a');
+    string signature = SignMessage(
+        message, AuthorizationSetBuilder().Digest(Digest::SHA_2_256).Padding(PaddingMode::RSA_PSS));
+}
+
+/*
+ * SigningOperationsTest.RsaPaddingNoneDoesNotAllowOther
+ *
+ * Verifies that keymaster rejects signature operations that specify a padding mode when the key
+ * supports only unpadded operations.
+ */
+TEST_F(SigningOperationsTest, RsaPaddingNoneDoesNotAllowOther) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Padding(PaddingMode::NONE)));
+    string message = "12345678901234567890123456789012";
+    string signature;
+
+    EXPECT_EQ(ErrorCode::INCOMPATIBLE_PADDING_MODE,
+              Begin(KeyPurpose::SIGN, AuthorizationSetBuilder()
+                                          .Digest(Digest::NONE)
+                                          .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+}
+
+/*
+ * SigningOperationsTest.RsaPkcs1Sha256Success
+ *
+ * Verifies that digested RSA-PKCS1 signature operations succeed.
+ */
+TEST_F(SigningOperationsTest, RsaPkcs1Sha256Success) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::SHA_2_256)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+    string message(1024, 'a');
+    string signature = SignMessage(message, AuthorizationSetBuilder()
+                                                .Digest(Digest::SHA_2_256)
+                                                .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN));
+}
+
+/*
+ * SigningOperationsTest.RsaPkcs1NoDigestSuccess
+ *
+ * Verifies that undigested RSA-PKCS1 signature operations succeed.
+ */
+TEST_F(SigningOperationsTest, RsaPkcs1NoDigestSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+    string message(53, 'a');
+    string signature = SignMessage(
+        message,
+        AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::RSA_PKCS1_1_5_SIGN));
+}
+
+/*
+ * SigningOperationsTest.RsaPkcs1NoDigestTooLarge
+ *
+ * Verifies that undigested RSA-PKCS1 signature operations fail with the correct error code when
+ * given a too-long message.
+ */
+TEST_F(SigningOperationsTest, RsaPkcs1NoDigestTooLong) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+    string message(129, 'a');
+
+    EXPECT_EQ(ErrorCode::OK,
+              Begin(KeyPurpose::SIGN, AuthorizationSetBuilder()
+                                          .Digest(Digest::NONE)
+                                          .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+    string signature;
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &signature));
+}
+
+/*
+ * SigningOperationsTest.RsaPssSha512TooSmallKey
+ *
+ * Verifies that undigested RSA-PSS signature operations fail with the correct error code when
+ * used with a key that is too small for the message.
+ *
+ * A PSS-padded message is of length salt_size + digest_size + 16 (sizes in bits), and the keymaster
+ * specification requires that salt_size == digest_size, so the message will be digest_size * 2 +
+ * 16. Such a message can only be signed by a given key if the key is at least that size. This test
+ * uses SHA512, which has a digest_size == 512, so the message size is 1040 bits, too large for a
+ * 1024-bit key.
+ */
+TEST_F(SigningOperationsTest, RsaPssSha512TooSmallKey) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::SHA_2_512)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Padding(PaddingMode::RSA_PSS)));
+    EXPECT_EQ(
+        ErrorCode::INCOMPATIBLE_DIGEST,
+        Begin(KeyPurpose::SIGN,
+              AuthorizationSetBuilder().Digest(Digest::SHA_2_512).Padding(PaddingMode::RSA_PSS)))
+        << "(Possibly b/33346750)";
+}
+
+/*
+ * SigningOperationsTest.RsaNoPaddingTooLong
+ *
+ * Verifies that raw RSA signature operations fail with the correct error code when
+ * given a too-long message.
+ */
+TEST_F(SigningOperationsTest, RsaNoPaddingTooLong) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+    // One byte too long
+    string message(1024 / 8 + 1, 'a');
+    ASSERT_EQ(ErrorCode::OK,
+              Begin(KeyPurpose::SIGN, AuthorizationSetBuilder()
+                                          .Digest(Digest::NONE)
+                                          .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+    string result;
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &result));
+
+    // Very large message that should exceed the transfer buffer size of any reasonable TEE.
+    message = string(128 * 1024, 'a');
+    ASSERT_EQ(ErrorCode::OK,
+              Begin(KeyPurpose::SIGN, AuthorizationSetBuilder()
+                                          .Digest(Digest::NONE)
+                                          .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &result));
+}
+
+/*
+ * SigningOperationsTest.RsaAbort
+ *
+ * Verifies that operations can be aborted correctly.  Uses an RSA signing operation for the test,
+ * but the behavior should be algorithm and purpose-independent.
+ */
+TEST_F(SigningOperationsTest, RsaAbort) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Padding(PaddingMode::NONE)));
+
+    ASSERT_EQ(ErrorCode::OK,
+              Begin(KeyPurpose::SIGN,
+                    AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::NONE)));
+    EXPECT_EQ(ErrorCode::OK, Abort(op_handle_));
+
+    // Another abort should fail
+    EXPECT_EQ(ErrorCode::INVALID_OPERATION_HANDLE, Abort(op_handle_));
+
+    // Set to sentinel, so TearDown() doesn't try to abort again.
+    op_handle_ = kOpHandleSentinel;
+}
+
+/*
+ * SigningOperationsTest.RsaUnsupportedPadding
+ *
+ * Verifies that RSA operations fail with the correct error (but key gen succeeds) when used with a
+ * padding mode inappropriate for RSA.
+ */
+TEST_F(SigningOperationsTest, RsaUnsupportedPadding) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Digest(Digest::SHA_2_256 /* supported digest */)
+                                             .Padding(PaddingMode::PKCS7)));
+    ASSERT_EQ(
+        ErrorCode::UNSUPPORTED_PADDING_MODE,
+        Begin(KeyPurpose::SIGN,
+              AuthorizationSetBuilder().Digest(Digest::SHA_2_256).Padding(PaddingMode::PKCS7)));
+}
+
+/*
+ * SigningOperationsTest.RsaPssNoDigest
+ *
+ * Verifies that RSA PSS operations fail when no digest is used.  PSS requires a digest.
+ */
+TEST_F(SigningOperationsTest, RsaNoDigest) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(1024, 3)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::RSA_PSS)));
+    ASSERT_EQ(ErrorCode::INCOMPATIBLE_DIGEST,
+              Begin(KeyPurpose::SIGN,
+                    AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::RSA_PSS)));
+
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_DIGEST,
+              Begin(KeyPurpose::SIGN, AuthorizationSetBuilder().Padding(PaddingMode::RSA_PSS)));
+}
+
+/*
+ * SigningOperationsTest.RsaPssNoDigest
+ *
+ * Verifies that RSA operations fail when no padding mode is specified.  PaddingMode::NONE is
+ * supported in some cases (as validated in other tests), but a mode must be specified.
+ */
+TEST_F(SigningOperationsTest, RsaNoPadding) {
+    // Padding must be specified
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaKey(1024, 3)
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .SigningKey()
+                                             .Digest(Digest::NONE)));
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_PADDING_MODE,
+              Begin(KeyPurpose::SIGN, AuthorizationSetBuilder().Digest(Digest::NONE)));
+}
+
+/*
+ * SigningOperationsTest.RsaShortMessage
+ *
+ * Verifies that raw RSA signatures succeed with a message shorter than the key size.
+ */
+TEST_F(SigningOperationsTest, RsaTooShortMessage) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)));
+
+    // Barely shorter
+    string message(1024 / 8 - 1, 'a');
+    SignMessage(message, AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::NONE));
+
+    // Much shorter
+    message = "a";
+    SignMessage(message, AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::NONE));
+}
+
+/*
+ * SigningOperationsTest.RsaSignWithEncryptionKey
+ *
+ * Verifies that RSA encryption keys cannot be used to sign.
+ */
+TEST_F(SigningOperationsTest, RsaSignWithEncryptionKey) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)));
+    ASSERT_EQ(ErrorCode::INCOMPATIBLE_PURPOSE,
+              Begin(KeyPurpose::SIGN,
+                    AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::NONE)));
+}
+
+/*
+ * SigningOperationsTest.RsaSignTooLargeMessage
+ *
+ * Verifies that attempting a raw signature of a message which is the same length as the key, but
+ * numerically larger than the public modulus, fails with the correct error.
+ */
+TEST_F(SigningOperationsTest, RsaSignTooLargeMessage) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)));
+
+    // Largest possible message will always be larger than the public modulus.
+    string message(1024 / 8, static_cast<char>(0xff));
+    ASSERT_EQ(ErrorCode::OK, Begin(KeyPurpose::SIGN, AuthorizationSetBuilder()
+                                                         .Authorization(TAG_NO_AUTH_REQUIRED)
+                                                         .Digest(Digest::NONE)
+                                                         .Padding(PaddingMode::NONE)));
+    string signature;
+    ASSERT_EQ(ErrorCode::INVALID_ARGUMENT, Finish(message, &signature));
+}
+
+/*
+ * SigningOperationsTest.EcdsaAllSizesAndHashes
+ *
+ * Verifies that ECDSA operations succeed with all possible key sizes and hashes.
+ */
+TEST_F(SigningOperationsTest, EcdsaAllSizesAndHashes) {
+    for (auto key_size : {224, 256, 384, 521}) {
+        for (auto digest : {
+                 Digest::SHA1, Digest::SHA_2_224, Digest::SHA_2_256, Digest::SHA_2_384,
+                 Digest::SHA_2_512,
+             }) {
+            ErrorCode error = GenerateKey(AuthorizationSetBuilder()
+                                              .Authorization(TAG_NO_AUTH_REQUIRED)
+                                              .EcdsaSigningKey(key_size)
+                                              .Digest(digest));
+            EXPECT_EQ(ErrorCode::OK, error) << "Failed to generate ECDSA key with size " << key_size
+                                            << " and digest " << digest;
+            if (error != ErrorCode::OK) continue;
+
+            string message(1024, 'a');
+            if (digest == Digest::NONE) message.resize(key_size / 8);
+            SignMessage(message, AuthorizationSetBuilder().Digest(digest));
+            DeleteKey();
+        }
+    }
+}
+
+/*
+ * SigningOperationsTest.EcdsaAllCurves
+ *
+ * Verifies that ECDSA operations succeed with all possible curves.
+ */
+TEST_F(SigningOperationsTest, EcdsaAllCurves) {
+    for (auto curve : {EcCurve::P_224, EcCurve::P_256, EcCurve::P_384, EcCurve::P_521}) {
+        ErrorCode error = GenerateKey(AuthorizationSetBuilder()
+                                          .Authorization(TAG_NO_AUTH_REQUIRED)
+                                          .EcdsaSigningKey(curve)
+                                          .Digest(Digest::SHA_2_256));
+        EXPECT_EQ(ErrorCode::OK, error) << "Failed to generate ECDSA key with curve " << curve;
+        if (error != ErrorCode::OK) continue;
+
+        string message(1024, 'a');
+        SignMessage(message, AuthorizationSetBuilder().Digest(Digest::SHA_2_256));
+        DeleteKey();
+    }
+}
+
+/*
+ * SigningOperationsTest.EcdsaNoDigestHugeData
+ *
+ * Verifies that ECDSA operations support very large messages, even without digesting.  This should
+ * work because ECDSA actually only signs the leftmost L_n bits of the message, however large it may
+ * be.  Not using digesting is a bad idea, but in some cases digesting is done by the framework.
+ */
+TEST_F(SigningOperationsTest, EcdsaNoDigestHugeData) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .EcdsaSigningKey(224)
+                                             .Digest(Digest::NONE)));
+    string message(64 * 1024, 'a');
+    SignMessage(message, AuthorizationSetBuilder().Digest(Digest::NONE));
+}
+
+/*
+ * SigningOperationsTest.AesEcbSign
+ *
+ * Verifies that attempts to use AES keys to sign fail in the correct way.
+ */
+TEST_F(SigningOperationsTest, AesEcbSign) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .SigningKey()
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::ECB)))
+        << "(Possibly b/36252957)";
+
+    AuthorizationSet out_params;
+    EXPECT_EQ(ErrorCode::UNSUPPORTED_PURPOSE,
+              Begin(KeyPurpose::SIGN, AuthorizationSet() /* in_params */, &out_params))
+        << "(Possibly b/36233187)";
+
+    EXPECT_EQ(ErrorCode::UNSUPPORTED_PURPOSE,
+              Begin(KeyPurpose::VERIFY, AuthorizationSet() /* in_params */, &out_params))
+        << "(Possibly b/36233187)";
+}
+
+/*
+ * SigningOperationsTest.HmacAllDigests
+ *
+ * Verifies that HMAC works with all digests.
+ */
+TEST_F(SigningOperationsTest, HmacAllDigests) {
+    for (auto digest : {Digest::SHA1, Digest::SHA_2_224, Digest::SHA_2_256, Digest::SHA_2_384,
+                        Digest::SHA_2_512}) {
+        ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                                 .Authorization(TAG_NO_AUTH_REQUIRED)
+                                                 .HmacKey(128)
+                                                 .Digest(digest)
+                                                 .Authorization(TAG_MIN_MAC_LENGTH, 160)))
+            << "Failed to create HMAC key with digest " << digest;
+        string message = "12345678901234567890123456789012";
+        string signature = MacMessage(message, digest, 160);
+        EXPECT_EQ(160U / 8U, signature.size())
+            << "Failed to sign with HMAC key with digest " << digest;
+        DeleteKey();
+    }
+}
+
+/*
+ * SigningOperationsTest.HmacSha256TooLargeMacLength
+ *
+ * Verifies that HMAC fails in the correct way when asked to generate a MAC larger than the digest
+ * size.
+ */
+TEST_F(SigningOperationsTest, HmacSha256TooLargeMacLength) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .HmacKey(128)
+                                             .Digest(Digest::SHA_2_256)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 256)));
+    AuthorizationSet output_params;
+    EXPECT_EQ(
+        ErrorCode::UNSUPPORTED_MAC_LENGTH,
+        Begin(
+            KeyPurpose::SIGN, key_blob_,
+            AuthorizationSetBuilder().Digest(Digest::SHA_2_256).Authorization(TAG_MAC_LENGTH, 264),
+            &output_params, &op_handle_));
+}
+
+/*
+ * SigningOperationsTest.HmacSha256TooSmallMacLength
+ *
+ * Verifies that HMAC fails in the correct way when asked to generate a MAC smaller than the
+ * specified minimum MAC length.
+ */
+TEST_F(SigningOperationsTest, HmacSha256TooSmallMacLength) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .HmacKey(128)
+                                             .Digest(Digest::SHA_2_256)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+    AuthorizationSet output_params;
+    EXPECT_EQ(
+        ErrorCode::INVALID_MAC_LENGTH,
+        Begin(
+            KeyPurpose::SIGN, key_blob_,
+            AuthorizationSetBuilder().Digest(Digest::SHA_2_256).Authorization(TAG_MAC_LENGTH, 120),
+            &output_params, &op_handle_));
+}
+
+/*
+ * SigningOperationsTest.HmacRfc4231TestCase3
+ *
+ * Validates against the test vectors from RFC 4231 test case 3.
+ */
+TEST_F(SigningOperationsTest, HmacRfc4231TestCase3) {
+    string key(20, 0xaa);
+    string message(50, 0xdd);
+    uint8_t sha_224_expected[] = {
+        0x7f, 0xb3, 0xcb, 0x35, 0x88, 0xc6, 0xc1, 0xf6, 0xff, 0xa9, 0x69, 0x4d, 0x7d, 0x6a,
+        0xd2, 0x64, 0x93, 0x65, 0xb0, 0xc1, 0xf6, 0x5d, 0x69, 0xd1, 0xec, 0x83, 0x33, 0xea,
+    };
+    uint8_t sha_256_expected[] = {
+        0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46, 0x85, 0x4d, 0xb8,
+        0xeb, 0xd0, 0x91, 0x81, 0xa7, 0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8,
+        0xc1, 0x22, 0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe,
+    };
+    uint8_t sha_384_expected[] = {
+        0x88, 0x06, 0x26, 0x08, 0xd3, 0xe6, 0xad, 0x8a, 0x0a, 0xa2, 0xac, 0xe0,
+        0x14, 0xc8, 0xa8, 0x6f, 0x0a, 0xa6, 0x35, 0xd9, 0x47, 0xac, 0x9f, 0xeb,
+        0xe8, 0x3e, 0xf4, 0xe5, 0x59, 0x66, 0x14, 0x4b, 0x2a, 0x5a, 0xb3, 0x9d,
+        0xc1, 0x38, 0x14, 0xb9, 0x4e, 0x3a, 0xb6, 0xe1, 0x01, 0xa3, 0x4f, 0x27,
+    };
+    uint8_t sha_512_expected[] = {
+        0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84, 0xef, 0xb0, 0xf0, 0x75, 0x6c,
+        0x89, 0x0b, 0xe9, 0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36, 0x55, 0xf8,
+        0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39, 0xbf, 0x3e, 0x84, 0x82, 0x79, 0xa7, 0x22,
+        0xc8, 0x06, 0xb4, 0x85, 0xa4, 0x7e, 0x67, 0xc8, 0x07, 0xb9, 0x46, 0xa3, 0x37,
+        0xbe, 0xe8, 0x94, 0x26, 0x74, 0x27, 0x88, 0x59, 0xe1, 0x32, 0x92, 0xfb,
+    };
+
+    CheckHmacTestVector(key, message, Digest::SHA_2_224, make_string(sha_224_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_256, make_string(sha_256_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_384, make_string(sha_384_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_512, make_string(sha_512_expected));
+}
+
+/*
+ * SigningOperationsTest.HmacRfc4231TestCase5
+ *
+ * Validates against the test vectors from RFC 4231 test case 5.
+ */
+TEST_F(SigningOperationsTest, HmacRfc4231TestCase5) {
+    string key(20, 0x0c);
+    string message = "Test With Truncation";
+
+    uint8_t sha_224_expected[] = {
+        0x0e, 0x2a, 0xea, 0x68, 0xa9, 0x0c, 0x8d, 0x37,
+        0xc9, 0x88, 0xbc, 0xdb, 0x9f, 0xca, 0x6f, 0xa8,
+    };
+    uint8_t sha_256_expected[] = {
+        0xa3, 0xb6, 0x16, 0x74, 0x73, 0x10, 0x0e, 0xe0,
+        0x6e, 0x0c, 0x79, 0x6c, 0x29, 0x55, 0x55, 0x2b,
+    };
+    uint8_t sha_384_expected[] = {
+        0x3a, 0xbf, 0x34, 0xc3, 0x50, 0x3b, 0x2a, 0x23,
+        0xa4, 0x6e, 0xfc, 0x61, 0x9b, 0xae, 0xf8, 0x97,
+    };
+    uint8_t sha_512_expected[] = {
+        0x41, 0x5f, 0xad, 0x62, 0x71, 0x58, 0x0a, 0x53,
+        0x1d, 0x41, 0x79, 0xbc, 0x89, 0x1d, 0x87, 0xa6,
+    };
+
+    CheckHmacTestVector(key, message, Digest::SHA_2_224, make_string(sha_224_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_256, make_string(sha_256_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_384, make_string(sha_384_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_512, make_string(sha_512_expected));
+}
+
+/*
+ * SigningOperationsTest.HmacRfc4231TestCase6
+ *
+ * Validates against the test vectors from RFC 4231 test case 6.
+ */
+TEST_F(SigningOperationsTest, HmacRfc4231TestCase6) {
+    string key(131, 0xaa);
+    string message = "Test Using Larger Than Block-Size Key - Hash Key First";
+
+    uint8_t sha_224_expected[] = {
+        0x95, 0xe9, 0xa0, 0xdb, 0x96, 0x20, 0x95, 0xad, 0xae, 0xbe, 0x9b, 0x2d, 0x6f, 0x0d,
+        0xbc, 0xe2, 0xd4, 0x99, 0xf1, 0x12, 0xf2, 0xd2, 0xb7, 0x27, 0x3f, 0xa6, 0x87, 0x0e,
+    };
+    uint8_t sha_256_expected[] = {
+        0x60, 0xe4, 0x31, 0x59, 0x1e, 0xe0, 0xb6, 0x7f, 0x0d, 0x8a, 0x26,
+        0xaa, 0xcb, 0xf5, 0xb7, 0x7f, 0x8e, 0x0b, 0xc6, 0x21, 0x37, 0x28,
+        0xc5, 0x14, 0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54,
+    };
+    uint8_t sha_384_expected[] = {
+        0x4e, 0xce, 0x08, 0x44, 0x85, 0x81, 0x3e, 0x90, 0x88, 0xd2, 0xc6, 0x3a,
+        0x04, 0x1b, 0xc5, 0xb4, 0x4f, 0x9e, 0xf1, 0x01, 0x2a, 0x2b, 0x58, 0x8f,
+        0x3c, 0xd1, 0x1f, 0x05, 0x03, 0x3a, 0xc4, 0xc6, 0x0c, 0x2e, 0xf6, 0xab,
+        0x40, 0x30, 0xfe, 0x82, 0x96, 0x24, 0x8d, 0xf1, 0x63, 0xf4, 0x49, 0x52,
+    };
+    uint8_t sha_512_expected[] = {
+        0x80, 0xb2, 0x42, 0x63, 0xc7, 0xc1, 0xa3, 0xeb, 0xb7, 0x14, 0x93, 0xc1, 0xdd,
+        0x7b, 0xe8, 0xb4, 0x9b, 0x46, 0xd1, 0xf4, 0x1b, 0x4a, 0xee, 0xc1, 0x12, 0x1b,
+        0x01, 0x37, 0x83, 0xf8, 0xf3, 0x52, 0x6b, 0x56, 0xd0, 0x37, 0xe0, 0x5f, 0x25,
+        0x98, 0xbd, 0x0f, 0xd2, 0x21, 0x5d, 0x6a, 0x1e, 0x52, 0x95, 0xe6, 0x4f, 0x73,
+        0xf6, 0x3f, 0x0a, 0xec, 0x8b, 0x91, 0x5a, 0x98, 0x5d, 0x78, 0x65, 0x98,
+    };
+
+    CheckHmacTestVector(key, message, Digest::SHA_2_224, make_string(sha_224_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_256, make_string(sha_256_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_384, make_string(sha_384_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_512, make_string(sha_512_expected));
+}
+
+/*
+ * SigningOperationsTest.HmacRfc4231TestCase7
+ *
+ * Validates against the test vectors from RFC 4231 test case 7.
+ */
+TEST_F(SigningOperationsTest, HmacRfc4231TestCase7) {
+    string key(131, 0xaa);
+    string message = "This is a test using a larger than block-size key and a larger than "
+                     "block-size data. The key needs to be hashed before being used by the HMAC "
+                     "algorithm.";
+
+    uint8_t sha_224_expected[] = {
+        0x3a, 0x85, 0x41, 0x66, 0xac, 0x5d, 0x9f, 0x02, 0x3f, 0x54, 0xd5, 0x17, 0xd0, 0xb3,
+        0x9d, 0xbd, 0x94, 0x67, 0x70, 0xdb, 0x9c, 0x2b, 0x95, 0xc9, 0xf6, 0xf5, 0x65, 0xd1,
+    };
+    uint8_t sha_256_expected[] = {
+        0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, 0x27, 0x63, 0x5f,
+        0xbc, 0xd5, 0xb0, 0xe9, 0x44, 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07,
+        0x13, 0x93, 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2,
+    };
+    uint8_t sha_384_expected[] = {
+        0x66, 0x17, 0x17, 0x8e, 0x94, 0x1f, 0x02, 0x0d, 0x35, 0x1e, 0x2f, 0x25,
+        0x4e, 0x8f, 0xd3, 0x2c, 0x60, 0x24, 0x20, 0xfe, 0xb0, 0xb8, 0xfb, 0x9a,
+        0xdc, 0xce, 0xbb, 0x82, 0x46, 0x1e, 0x99, 0xc5, 0xa6, 0x78, 0xcc, 0x31,
+        0xe7, 0x99, 0x17, 0x6d, 0x38, 0x60, 0xe6, 0x11, 0x0c, 0x46, 0x52, 0x3e,
+    };
+    uint8_t sha_512_expected[] = {
+        0xe3, 0x7b, 0x6a, 0x77, 0x5d, 0xc8, 0x7d, 0xba, 0xa4, 0xdf, 0xa9, 0xf9, 0x6e,
+        0x5e, 0x3f, 0xfd, 0xde, 0xbd, 0x71, 0xf8, 0x86, 0x72, 0x89, 0x86, 0x5d, 0xf5,
+        0xa3, 0x2d, 0x20, 0xcd, 0xc9, 0x44, 0xb6, 0x02, 0x2c, 0xac, 0x3c, 0x49, 0x82,
+        0xb1, 0x0d, 0x5e, 0xeb, 0x55, 0xc3, 0xe4, 0xde, 0x15, 0x13, 0x46, 0x76, 0xfb,
+        0x6d, 0xe0, 0x44, 0x60, 0x65, 0xc9, 0x74, 0x40, 0xfa, 0x8c, 0x6a, 0x58,
+    };
+
+    CheckHmacTestVector(key, message, Digest::SHA_2_224, make_string(sha_224_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_256, make_string(sha_256_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_384, make_string(sha_384_expected));
+    CheckHmacTestVector(key, message, Digest::SHA_2_512, make_string(sha_512_expected));
+}
+
+typedef KeymasterHidlTest VerificationOperationsTest;
+
+/*
+ * VerificationOperationsTest.RsaSuccess
+ *
+ * Verifies that a simple RSA signature/verification sequence succeeds.
+ */
+TEST_F(VerificationOperationsTest, RsaSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)));
+    string message = "12345678901234567890123456789012";
+    string signature = SignMessage(
+        message, AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::NONE));
+    VerifyMessage(message, signature,
+                  AuthorizationSetBuilder().Digest(Digest::NONE).Padding(PaddingMode::NONE));
+}
+
+/*
+ * VerificationOperationsTest.RsaSuccess
+ *
+ * Verifies RSA signature/verification for all padding modes and digests.
+ */
+TEST_F(VerificationOperationsTest, RsaAllPaddingsAndDigests) {
+    ASSERT_EQ(ErrorCode::OK,
+              GenerateKey(AuthorizationSetBuilder()
+                              .Authorization(TAG_NO_AUTH_REQUIRED)
+                              .RsaSigningKey(2048, 3)
+                              .Digest(Digest::NONE, Digest::MD5, Digest::SHA1, Digest::SHA_2_224,
+                                      Digest::SHA_2_256, Digest::SHA_2_384, Digest::SHA_2_512)
+                              .Padding(PaddingMode::NONE)
+                              .Padding(PaddingMode::RSA_PSS)
+                              .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
+
+    string message(128, 'a');
+    string corrupt_message(message);
+    ++corrupt_message[corrupt_message.size() / 2];
+
+    for (auto padding :
+         {PaddingMode::NONE, PaddingMode::RSA_PSS, PaddingMode::RSA_PKCS1_1_5_SIGN}) {
+
+        for (auto digest : {Digest::NONE, Digest::MD5, Digest::SHA1, Digest::SHA_2_224,
+                            Digest::SHA_2_256, Digest::SHA_2_384, Digest::SHA_2_512}) {
+            if (padding == PaddingMode::NONE && digest != Digest::NONE) {
+                // Digesting only makes sense with padding.
+                continue;
+            }
+
+            if (padding == PaddingMode::RSA_PSS && digest == Digest::NONE) {
+                // PSS requires digesting.
+                continue;
+            }
+
+            string signature =
+                SignMessage(message, AuthorizationSetBuilder().Digest(digest).Padding(padding));
+            VerifyMessage(message, signature,
+                          AuthorizationSetBuilder().Digest(digest).Padding(padding));
+
+            if (digest != Digest::NONE) {
+                // Verify with OpenSSL.
+                HidlBuf pubkey;
+                ASSERT_EQ(ErrorCode::OK, ExportKey(KeyFormat::X509, &pubkey));
+
+                const uint8_t* p = pubkey.data();
+                EVP_PKEY_Ptr pkey(d2i_PUBKEY(nullptr /* alloc new */, &p, pubkey.size()));
+                ASSERT_TRUE(pkey.get());
+
+                EVP_MD_CTX digest_ctx;
+                EVP_MD_CTX_init(&digest_ctx);
+                EVP_PKEY_CTX* pkey_ctx;
+                const EVP_MD* md = openssl_digest(digest);
+                ASSERT_NE(md, nullptr);
+                EXPECT_EQ(1, EVP_DigestVerifyInit(&digest_ctx, &pkey_ctx, md, nullptr /* engine */,
+                                                  pkey.get()));
+
+                switch (padding) {
+                case PaddingMode::RSA_PSS:
+                    EXPECT_GT(EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PSS_PADDING), 0);
+                    EXPECT_GT(EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, EVP_MD_size(md)), 0);
+                    break;
+                case PaddingMode::RSA_PKCS1_1_5_SIGN:
+                    // PKCS1 is the default; don't need to set anything.
+                    break;
+                default:
+                    FAIL();
+                    break;
+                }
+
+                EXPECT_EQ(1, EVP_DigestVerifyUpdate(&digest_ctx, message.data(), message.size()));
+                EXPECT_EQ(1, EVP_DigestVerifyFinal(
+                                 &digest_ctx, reinterpret_cast<const uint8_t*>(signature.data()),
+                                 signature.size()));
+                EVP_MD_CTX_cleanup(&digest_ctx);
+            }
+
+            // Corrupt signature shouldn't verify.
+            string corrupt_signature(signature);
+            ++corrupt_signature[corrupt_signature.size() / 2];
+
+            EXPECT_EQ(ErrorCode::OK,
+                      Begin(KeyPurpose::VERIFY,
+                            AuthorizationSetBuilder().Digest(digest).Padding(padding)));
+            string result;
+            EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(message, corrupt_signature, &result));
+
+            // Corrupt message shouldn't verify
+            EXPECT_EQ(ErrorCode::OK,
+                      Begin(KeyPurpose::VERIFY,
+                            AuthorizationSetBuilder().Digest(digest).Padding(padding)));
+            EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(corrupt_message, signature, &result));
+        }
+    }
+}
+
+/*
+ * VerificationOperationsTest.RsaSuccess
+ *
+ * Verifies ECDSA signature/verification for all digests and curves.
+ */
+TEST_F(VerificationOperationsTest, EcdsaAllDigestsAndCurves) {
+    auto digests = {
+        Digest::NONE,      Digest::SHA1,      Digest::SHA_2_224,
+        Digest::SHA_2_256, Digest::SHA_2_384, Digest::SHA_2_512,
+    };
+
+    string message = "1234567890";
+    string corrupt_message = "2234567890";
+    for (auto curve : {EcCurve::P_224, EcCurve::P_256, EcCurve::P_384, EcCurve::P_521}) {
+        ErrorCode error = GenerateKey(AuthorizationSetBuilder()
+                                          .Authorization(TAG_NO_AUTH_REQUIRED)
+                                          .EcdsaSigningKey(curve)
+                                          .Digest(digests));
+        EXPECT_EQ(ErrorCode::OK, error) << "Failed to generate key for EC curve " << curve;
+        if (error != ErrorCode::OK) {
+            continue;
+        }
+
+        for (auto digest : digests) {
+            string signature = SignMessage(message, AuthorizationSetBuilder().Digest(digest));
+            VerifyMessage(message, signature, AuthorizationSetBuilder().Digest(digest));
+
+            // Verify with OpenSSL
+            if (digest != Digest::NONE) {
+                HidlBuf pubkey;
+                ASSERT_EQ(ErrorCode::OK, ExportKey(KeyFormat::X509, &pubkey))
+                    << curve << ' ' << digest;
+
+                const uint8_t* p = pubkey.data();
+                EVP_PKEY_Ptr pkey(d2i_PUBKEY(nullptr /* alloc new */, &p, pubkey.size()));
+                ASSERT_TRUE(pkey.get());
+
+                EVP_MD_CTX digest_ctx;
+                EVP_MD_CTX_init(&digest_ctx);
+                EVP_PKEY_CTX* pkey_ctx;
+                const EVP_MD* md = openssl_digest(digest);
+
+                EXPECT_EQ(1, EVP_DigestVerifyInit(&digest_ctx, &pkey_ctx, md, nullptr /* engine */,
+                                                  pkey.get()))
+                    << curve << ' ' << digest;
+
+                EXPECT_EQ(1, EVP_DigestVerifyUpdate(&digest_ctx, message.data(), message.size()))
+                    << curve << ' ' << digest;
+
+                EXPECT_EQ(1, EVP_DigestVerifyFinal(
+                                 &digest_ctx, reinterpret_cast<const uint8_t*>(signature.data()),
+                                 signature.size()))
+                    << curve << ' ' << digest;
+
+                EVP_MD_CTX_cleanup(&digest_ctx);
+            }
+
+            // Corrupt signature shouldn't verify.
+            string corrupt_signature(signature);
+            ++corrupt_signature[corrupt_signature.size() / 2];
+
+            EXPECT_EQ(ErrorCode::OK,
+                      Begin(KeyPurpose::VERIFY, AuthorizationSetBuilder().Digest(digest)))
+                << curve << ' ' << digest;
+
+            string result;
+            EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(message, corrupt_signature, &result))
+                << curve << ' ' << digest;
+
+            // Corrupt message shouldn't verify
+            EXPECT_EQ(ErrorCode::OK,
+                      Begin(KeyPurpose::VERIFY, AuthorizationSetBuilder().Digest(digest)))
+                << curve << ' ' << digest;
+
+            EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(corrupt_message, signature, &result))
+                << curve << ' ' << digest;
+        }
+
+        ASSERT_EQ(ErrorCode::OK, DeleteKey());
+    }
+}
+
+/*
+ * VerificationOperationsTest.HmacSigningKeyCannotVerify
+ *
+ * Verifies HMAC signing and verification, but that a signing key cannot be used to verify.
+ */
+TEST_F(VerificationOperationsTest, HmacSigningKeyCannotVerify) {
+    string key_material = "HelloThisIsAKey";
+
+    HidlBuf signing_key, verification_key;
+    KeyCharacteristics signing_key_chars, verification_key_chars;
+    EXPECT_EQ(ErrorCode::OK,
+              ImportKey(AuthorizationSetBuilder()
+                            .Authorization(TAG_NO_AUTH_REQUIRED)
+                            .Authorization(TAG_ALGORITHM, Algorithm::HMAC)
+                            .Authorization(TAG_PURPOSE, KeyPurpose::SIGN)
+                            .Digest(Digest::SHA1)
+                            .Authorization(TAG_MIN_MAC_LENGTH, 160),
+                        KeyFormat::RAW, key_material, &signing_key, &signing_key_chars));
+    EXPECT_EQ(ErrorCode::OK,
+              ImportKey(AuthorizationSetBuilder()
+                            .Authorization(TAG_NO_AUTH_REQUIRED)
+                            .Authorization(TAG_ALGORITHM, Algorithm::HMAC)
+                            .Authorization(TAG_PURPOSE, KeyPurpose::VERIFY)
+                            .Digest(Digest::SHA1)
+                            .Authorization(TAG_MIN_MAC_LENGTH, 160),
+                        KeyFormat::RAW, key_material, &verification_key, &verification_key_chars));
+
+    string message = "This is a message.";
+    string signature = SignMessage(
+        signing_key, message,
+        AuthorizationSetBuilder().Digest(Digest::SHA1).Authorization(TAG_MAC_LENGTH, 160));
+
+    // Signing key should not work.
+    AuthorizationSet out_params;
+    EXPECT_EQ(ErrorCode::INCOMPATIBLE_PURPOSE,
+              Begin(KeyPurpose::VERIFY, signing_key, AuthorizationSetBuilder().Digest(Digest::SHA1),
+                    &out_params, &op_handle_));
+
+    // Verification key should work.
+    VerifyMessage(verification_key, message, signature,
+                  AuthorizationSetBuilder().Digest(Digest::SHA1));
+
+    EXPECT_EQ(ErrorCode::OK, DeleteKey(&signing_key));
+    EXPECT_EQ(ErrorCode::OK, DeleteKey(&verification_key));
+}
+
+typedef KeymasterHidlTest ExportKeyTest;
+
+/*
+ * ExportKeyTest.RsaUnsupportedKeyFormat
+ *
+ * Verifies that attempting to export RSA keys in PKCS#8 format fails with the correct error.
+ */
+TEST_F(ExportKeyTest, RsaUnsupportedKeyFormat) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .RsaSigningKey(256, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)));
+    HidlBuf export_data;
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_KEY_FORMAT, ExportKey(KeyFormat::PKCS8, &export_data));
+}
+
+/*
+ * ExportKeyTest.RsaCorruptedKeyBlob
+ *
+ * Verifies that attempting to export RSA keys from corrupted key blobs fails.  This is essentially
+ * a poor-man's key blob fuzzer.
+ */
+// Disabled due to b/33385206
+TEST_F(ExportKeyTest, DISABLED_RsaCorruptedKeyBlob) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaSigningKey(256, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)));
+    for (size_t i = 0; i < key_blob_.size(); ++i) {
+        HidlBuf corrupted(key_blob_);
+        ++corrupted[i];
+
+        HidlBuf export_data;
+        EXPECT_EQ(ErrorCode::INVALID_KEY_BLOB,
+                  ExportKey(KeyFormat::X509, corrupted, HidlBuf(), HidlBuf(), &export_data))
+            << "Blob corrupted at offset " << i << " erroneously accepted as valid";
+    }
+}
+
+/*
+ * ExportKeyTest.RsaCorruptedKeyBlob
+ *
+ * Verifies that attempting to export ECDSA keys from corrupted key blobs fails.  This is
+ * essentially a poor-man's key blob fuzzer.
+ */
+// Disabled due to b/33385206
+TEST_F(ExportKeyTest, DISABLED_EcCorruptedKeyBlob) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .EcdsaSigningKey(EcCurve::P_256)
+                                             .Digest(Digest::NONE)));
+    for (size_t i = 0; i < key_blob_.size(); ++i) {
+        HidlBuf corrupted(key_blob_);
+        ++corrupted[i];
+
+        HidlBuf export_data;
+        EXPECT_EQ(ErrorCode::INVALID_KEY_BLOB,
+                  ExportKey(KeyFormat::X509, corrupted, HidlBuf(), HidlBuf(), &export_data))
+            << "Blob corrupted at offset " << i << " erroneously accepted as valid";
+    }
+}
+
+/*
+ * ExportKeyTest.AesKeyUnexportable
+ *
+ * Verifies that attempting to export AES keys fails in the expected way.
+ */
+TEST_F(ExportKeyTest, AesKeyUnexportable) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .EcbMode()
+                                             .Padding(PaddingMode::NONE)));
+
+    HidlBuf export_data;
+    EXPECT_EQ(ErrorCode::UNSUPPORTED_KEY_FORMAT, ExportKey(KeyFormat::X509, &export_data));
+    EXPECT_EQ(ErrorCode::UNSUPPORTED_KEY_FORMAT, ExportKey(KeyFormat::PKCS8, &export_data));
+    EXPECT_EQ(ErrorCode::UNSUPPORTED_KEY_FORMAT, ExportKey(KeyFormat::RAW, &export_data));
+}
+typedef KeymasterHidlTest ImportKeyTest;
+
+/*
+ * ImportKeyTest.RsaSuccess
+ *
+ * Verifies that importing and using an RSA key pair works correctly.
+ */
+TEST_F(ImportKeyTest, RsaSuccess) {
+    ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
+                                           .Authorization(TAG_NO_AUTH_REQUIRED)
+                                           .RsaSigningKey(1024, 65537)
+                                           .Digest(Digest::SHA_2_256)
+                                           .Padding(PaddingMode::RSA_PSS),
+                                       KeyFormat::PKCS8, rsa_key));
+
+    CheckKm0CryptoParam(TAG_ALGORITHM, Algorithm::RSA);
+    CheckKm0CryptoParam(TAG_KEY_SIZE, 1024U);
+    CheckKm0CryptoParam(TAG_RSA_PUBLIC_EXPONENT, 65537U);
+    CheckKm1CryptoParam(TAG_DIGEST, Digest::SHA_2_256);
+    CheckKm1CryptoParam(TAG_PADDING, PaddingMode::RSA_PSS);
+    CheckOrigin();
+
+    string message(1024 / 8, 'a');
+    auto params = AuthorizationSetBuilder().Digest(Digest::SHA_2_256).Padding(PaddingMode::RSA_PSS);
+    string signature = SignMessage(message, params);
+    VerifyMessage(message, signature, params);
+}
+
+/*
+ * ImportKeyTest.RsaKeySizeMismatch
+ *
+ * Verifies that importing an RSA key pair with a size that doesn't match the key fails in the
+ * correct way.
+ */
+TEST_F(ImportKeyTest, RsaKeySizeMismatch) {
+    ASSERT_EQ(ErrorCode::IMPORT_PARAMETER_MISMATCH,
+              ImportKey(AuthorizationSetBuilder()
+                            .RsaSigningKey(2048 /* Doesn't match key */, 65537)
+                            .Digest(Digest::NONE)
+                            .Padding(PaddingMode::NONE),
+                        KeyFormat::PKCS8, rsa_key));
+}
+
+/*
+ * ImportKeyTest.RsaPublicExponentMismatch
+ *
+ * Verifies that importing an RSA key pair with a public exponent that doesn't match the key fails
+ * in the correct way.
+ */
+TEST_F(ImportKeyTest, RsaPublicExponentMismatch) {
+    ASSERT_EQ(ErrorCode::IMPORT_PARAMETER_MISMATCH,
+              ImportKey(AuthorizationSetBuilder()
+                            .RsaSigningKey(1024, 3 /* Doesn't match key */)
+                            .Digest(Digest::NONE)
+                            .Padding(PaddingMode::NONE),
+                        KeyFormat::PKCS8, rsa_key));
+}
+
+/*
+ * ImportKeyTest.EcdsaSuccess
+ *
+ * Verifies that importing and using an ECDSA key pair works correctly.
+ */
+TEST_F(ImportKeyTest, EcdsaSuccess) {
+    ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
+                                           .Authorization(TAG_NO_AUTH_REQUIRED)
+                                           .EcdsaSigningKey(256)
+                                           .Digest(Digest::SHA_2_256),
+                                       KeyFormat::PKCS8, ec_key))
+        << "(Possibly b/33945114)";
+
+    CheckKm0CryptoParam(TAG_ALGORITHM, Algorithm::EC);
+    CheckKm0CryptoParam(TAG_KEY_SIZE, 256U);
+    CheckKm1CryptoParam(TAG_DIGEST, Digest::SHA_2_256);
+    CheckKm2CryptoParam(TAG_EC_CURVE, EcCurve::P_256);
+
+    CheckOrigin();
+
+    string message(32, 'a');
+    auto params = AuthorizationSetBuilder().Digest(Digest::SHA_2_256);
+    string signature = SignMessage(message, params);
+    VerifyMessage(message, signature, params);
+}
+
+/*
+ * ImportKeyTest.EcdsaSizeMismatch
+ *
+ * Verifies that importing an ECDSA key pair with a size that doesn't match the key fails in the
+ * correct way.
+ */
+TEST_F(ImportKeyTest, EcdsaSizeMismatch) {
+    ASSERT_EQ(ErrorCode::IMPORT_PARAMETER_MISMATCH,
+              ImportKey(AuthorizationSetBuilder()
+                            .EcdsaSigningKey(224 /* Doesn't match key */)
+                            .Digest(Digest::NONE),
+                        KeyFormat::PKCS8, ec_key));
+}
+
+/*
+ * ImportKeyTest.EcdsaCurveMismatch
+ *
+ * Verifies that importing an ECDSA key pair with a curve that doesn't match the key fails in the
+ * correct way.
+ */
+TEST_F(ImportKeyTest, EcdsaCurveMismatch) {
+    if (SupportsSymmetric() && !SupportsAttestation()) {
+        // KM1 hardware doesn't know about curves
+        return;
+    }
+
+    ASSERT_EQ(ErrorCode::IMPORT_PARAMETER_MISMATCH,
+              ImportKey(AuthorizationSetBuilder()
+                            .EcdsaSigningKey(EcCurve::P_224 /* Doesn't match key */)
+                            .Digest(Digest::NONE),
+                        KeyFormat::PKCS8, ec_key))
+        << "(Possibly b/36233241)";
+}
+
+/*
+ * ImportKeyTest.AesSuccess
+ *
+ * Verifies that importing and using an AES key works.
+ */
+TEST_F(ImportKeyTest, AesSuccess) {
+    string key = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
+                                           .Authorization(TAG_NO_AUTH_REQUIRED)
+                                           .AesEncryptionKey(key.size() * 8)
+                                           .EcbMode()
+                                           .Padding(PaddingMode::PKCS7),
+                                       KeyFormat::RAW, key));
+
+    CheckKm1CryptoParam(TAG_ALGORITHM, Algorithm::AES);
+    CheckKm1CryptoParam(TAG_KEY_SIZE, 128U);
+    CheckKm1CryptoParam(TAG_PADDING, PaddingMode::PKCS7);
+    CheckKm1CryptoParam(TAG_BLOCK_MODE, BlockMode::ECB);
+    CheckOrigin();
+
+    string message = "Hello World!";
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+    string ciphertext = EncryptMessage(message, params);
+    string plaintext = DecryptMessage(ciphertext, params);
+    EXPECT_EQ(message, plaintext);
+}
+
+/*
+ * ImportKeyTest.AesSuccess
+ *
+ * Verifies that importing and using an HMAC key works.
+ */
+TEST_F(ImportKeyTest, HmacKeySuccess) {
+    string key = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+    ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
+                                           .Authorization(TAG_NO_AUTH_REQUIRED)
+                                           .HmacKey(key.size() * 8)
+                                           .Digest(Digest::SHA_2_256)
+                                           .Authorization(TAG_MIN_MAC_LENGTH, 256),
+                                       KeyFormat::RAW, key));
+
+    CheckKm1CryptoParam(TAG_ALGORITHM, Algorithm::HMAC);
+    CheckKm1CryptoParam(TAG_KEY_SIZE, 128U);
+    CheckKm1CryptoParam(TAG_DIGEST, Digest::SHA_2_256);
+    CheckOrigin();
+
+    string message = "Hello World!";
+    string signature = MacMessage(message, Digest::SHA_2_256, 256);
+    VerifyMessage(message, signature, AuthorizationSetBuilder().Digest(Digest::SHA_2_256));
+}
+
+typedef KeymasterHidlTest EncryptionOperationsTest;
+
+/*
+ * EncryptionOperationsTest.RsaNoPaddingSuccess
+ *
+ * Verifies that raw RSA encryption works.
+ */
+TEST_F(EncryptionOperationsTest, RsaNoPaddingSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::NONE)));
+
+    string message = string(1024 / 8, 'a');
+    auto params = AuthorizationSetBuilder().Padding(PaddingMode::NONE);
+    string ciphertext1 = EncryptMessage(message, params);
+    EXPECT_EQ(1024U / 8, ciphertext1.size());
+
+    string ciphertext2 = EncryptMessage(message, params);
+    EXPECT_EQ(1024U / 8, ciphertext2.size());
+
+    // Unpadded RSA is deterministic
+    EXPECT_EQ(ciphertext1, ciphertext2);
+}
+
+/*
+ * EncryptionOperationsTest.RsaNoPaddingShortMessage
+ *
+ * Verifies that raw RSA encryption of short messages works.
+ */
+TEST_F(EncryptionOperationsTest, RsaNoPaddingShortMessage) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::NONE)));
+
+    string message = "1";
+    auto params = AuthorizationSetBuilder().Padding(PaddingMode::NONE);
+
+    string ciphertext = EncryptMessage(message, params);
+    EXPECT_EQ(1024U / 8, ciphertext.size());
+
+    string expected_plaintext = string(1024 / 8 - 1, 0) + message;
+    string plaintext = DecryptMessage(ciphertext, params);
+
+    EXPECT_EQ(expected_plaintext, plaintext);
+
+    // Degenerate case, encrypting a numeric 1 yields 0x00..01 as the ciphertext.
+    message = static_cast<char>(1);
+    ciphertext = EncryptMessage(message, params);
+    EXPECT_EQ(1024U / 8, ciphertext.size());
+    EXPECT_EQ(ciphertext, string(1024 / 8 - 1, 0) + message);
+}
+
+/*
+ * EncryptionOperationsTest.RsaNoPaddingTooLong
+ *
+ * Verifies that raw RSA encryption of too-long messages fails in the expected way.
+ */
+TEST_F(EncryptionOperationsTest, RsaNoPaddingTooLong) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::NONE)));
+
+    string message(1024 / 8 + 1, 'a');
+
+    auto params = AuthorizationSetBuilder().Padding(PaddingMode::NONE);
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
+
+    string result;
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &result));
+}
+
+/*
+ * EncryptionOperationsTest.RsaNoPaddingTooLong
+ *
+ * Verifies that raw RSA encryption of too-large (numerically) messages fails in the expected way.
+ */
+TEST_F(EncryptionOperationsTest, RsaNoPaddingTooLarge) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::NONE)));
+
+    HidlBuf exported;
+    ASSERT_EQ(ErrorCode::OK, ExportKey(KeyFormat::X509, &exported));
+
+    const uint8_t* p = exported.data();
+    EVP_PKEY_Ptr pkey(d2i_PUBKEY(nullptr /* alloc new */, &p, exported.size()));
+    RSA_Ptr rsa(EVP_PKEY_get1_RSA(pkey.get()));
+
+    size_t modulus_len = BN_num_bytes(rsa->n);
+    ASSERT_EQ(1024U / 8, modulus_len);
+    std::unique_ptr<uint8_t[]> modulus_buf(new uint8_t[modulus_len]);
+    BN_bn2bin(rsa->n, modulus_buf.get());
+
+    // The modulus is too big to encrypt.
+    string message(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len);
+
+    auto params = AuthorizationSetBuilder().Padding(PaddingMode::NONE);
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
+
+    string result;
+    EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, Finish(message, &result));
+
+    // One smaller than the modulus is okay.
+    BN_sub(rsa->n, rsa->n, BN_value_one());
+    modulus_len = BN_num_bytes(rsa->n);
+    ASSERT_EQ(1024U / 8, modulus_len);
+    BN_bn2bin(rsa->n, modulus_buf.get());
+    message = string(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len);
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
+    EXPECT_EQ(ErrorCode::OK, Finish(message, &result));
+}
+
+/*
+ * EncryptionOperationsTest.RsaOaepSuccess
+ *
+ * Verifies that RSA-OAEP encryption operations work, with all digests.
+ */
+TEST_F(EncryptionOperationsTest, RsaOaepSuccess) {
+    auto digests = {Digest::MD5,       Digest::SHA1,      Digest::SHA_2_224,
+                    Digest::SHA_2_256, Digest::SHA_2_384, Digest::SHA_2_512};
+
+    size_t key_size = 2048;  // Need largish key for SHA-512 test.
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(key_size, 3)
+                                             .Padding(PaddingMode::RSA_OAEP)
+                                             .Digest(digests)));
+
+    string message = "Hello";
+
+    for (auto digest : digests) {
+        auto params = AuthorizationSetBuilder().Digest(digest).Padding(PaddingMode::RSA_OAEP);
+        string ciphertext1 = EncryptMessage(message, params);
+        if (HasNonfatalFailure()) std::cout << "-->" << digest << std::endl;
+        EXPECT_EQ(key_size / 8, ciphertext1.size());
+
+        string ciphertext2 = EncryptMessage(message, params);
+        EXPECT_EQ(key_size / 8, ciphertext2.size());
+
+        // OAEP randomizes padding so every result should be different (with astronomically high
+        // probability).
+        EXPECT_NE(ciphertext1, ciphertext2);
+
+        string plaintext1 = DecryptMessage(ciphertext1, params);
+        EXPECT_EQ(message, plaintext1) << "RSA-OAEP failed with digest " << digest;
+        string plaintext2 = DecryptMessage(ciphertext2, params);
+        EXPECT_EQ(message, plaintext2) << "RSA-OAEP failed with digest " << digest;
+
+        // Decrypting corrupted ciphertext should fail.
+        size_t offset_to_corrupt = random() % ciphertext1.size();
+        char corrupt_byte;
+        do {
+            corrupt_byte = static_cast<char>(random() % 256);
+        } while (corrupt_byte == ciphertext1[offset_to_corrupt]);
+        ciphertext1[offset_to_corrupt] = corrupt_byte;
+
+        EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
+        string result;
+        EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext1, &result));
+        EXPECT_EQ(0U, result.size());
+    }
+}
+
+/*
+ * EncryptionOperationsTest.RsaOaepInvalidDigest
+ *
+ * Verifies that RSA-OAEP encryption operations fail in the correct way when asked to operate
+ * without a digest.
+ */
+TEST_F(EncryptionOperationsTest, RsaOaepInvalidDigest) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::RSA_OAEP)
+                                             .Digest(Digest::NONE)));
+    string message = "Hello World!";
+
+    auto params = AuthorizationSetBuilder().Padding(PaddingMode::RSA_OAEP).Digest(Digest::NONE);
+    EXPECT_EQ(ErrorCode::INCOMPATIBLE_DIGEST, Begin(KeyPurpose::ENCRYPT, params));
+}
+
+/*
+ * EncryptionOperationsTest.RsaOaepInvalidDigest
+ *
+ * Verifies that RSA-OAEP encryption operations fail in the correct way when asked to decrypt with a
+ * different digest than was used to encrypt.
+ */
+TEST_F(EncryptionOperationsTest, RsaOaepDecryptWithWrongDigest) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::RSA_OAEP)
+                                             .Digest(Digest::SHA_2_256, Digest::SHA_2_224)));
+    string message = "Hello World!";
+    string ciphertext = EncryptMessage(
+        message,
+        AuthorizationSetBuilder().Digest(Digest::SHA_2_224).Padding(PaddingMode::RSA_OAEP));
+
+    EXPECT_EQ(
+        ErrorCode::OK,
+        Begin(KeyPurpose::DECRYPT,
+              AuthorizationSetBuilder().Digest(Digest::SHA_2_256).Padding(PaddingMode::RSA_OAEP)));
+    string result;
+    EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext, &result));
+    EXPECT_EQ(0U, result.size());
+}
+
+/*
+ * EncryptionOperationsTest.RsaOaepTooLarge
+ *
+ * Verifies that RSA-OAEP encryption operations fail in the correct way when asked to encrypt a
+ * too-large message.
+ */
+TEST_F(EncryptionOperationsTest, RsaOaepTooLarge) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::RSA_OAEP)
+                                             .Digest(Digest::SHA1)));
+    constexpr size_t digest_size = 160 /* SHA1 */ / 8;
+    constexpr size_t oaep_overhead = 2 * digest_size + 2;
+    string message(1024 / 8 - oaep_overhead + 1, 'a');
+    EXPECT_EQ(ErrorCode::OK,
+              Begin(KeyPurpose::ENCRYPT,
+                    AuthorizationSetBuilder().Padding(PaddingMode::RSA_OAEP).Digest(Digest::SHA1)));
+    string result;
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &result));
+    EXPECT_EQ(0U, result.size());
+}
+
+/*
+ * EncryptionOperationsTest.RsaPkcs1Success
+ *
+ * Verifies that RSA PKCS encryption/decrypts works.
+ */
+TEST_F(EncryptionOperationsTest, RsaPkcs1Success) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT)));
+
+    string message = "Hello World!";
+    auto params = AuthorizationSetBuilder().Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT);
+    string ciphertext1 = EncryptMessage(message, params);
+    EXPECT_EQ(1024U / 8, ciphertext1.size());
+
+    string ciphertext2 = EncryptMessage(message, params);
+    EXPECT_EQ(1024U / 8, ciphertext2.size());
+
+    // PKCS1 v1.5 randomizes padding so every result should be different.
+    EXPECT_NE(ciphertext1, ciphertext2);
+
+    string plaintext = DecryptMessage(ciphertext1, params);
+    EXPECT_EQ(message, plaintext);
+
+    // Decrypting corrupted ciphertext should fail.
+    size_t offset_to_corrupt = random() % ciphertext1.size();
+    char corrupt_byte;
+    do {
+        corrupt_byte = static_cast<char>(random() % 256);
+    } while (corrupt_byte == ciphertext1[offset_to_corrupt]);
+    ciphertext1[offset_to_corrupt] = corrupt_byte;
+
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
+    string result;
+    EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext1, &result));
+    EXPECT_EQ(0U, result.size());
+}
+
+/*
+ * EncryptionOperationsTest.RsaPkcs1TooLarge
+ *
+ * Verifies that RSA PKCS encryption fails in the correct way when the mssage is too large.
+ */
+TEST_F(EncryptionOperationsTest, RsaPkcs1TooLarge) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaEncryptionKey(1024, 3)
+                                             .Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT)));
+    string message(1024 / 8 - 10, 'a');
+
+    auto params = AuthorizationSetBuilder().Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT);
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
+    string result;
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &result));
+    EXPECT_EQ(0U, result.size());
+}
+
+/*
+ * EncryptionOperationsTest.EcdsaEncrypt
+ *
+ * Verifies that attempting to use ECDSA keys to encrypt fails in the correct way.
+ */
+TEST_F(EncryptionOperationsTest, EcdsaEncrypt) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .EcdsaSigningKey(224)
+                                             .Digest(Digest::NONE)));
+    auto params = AuthorizationSetBuilder().Digest(Digest::NONE);
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_PURPOSE, Begin(KeyPurpose::ENCRYPT, params))
+        << "(Possibly b/33543625)";
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_PURPOSE, Begin(KeyPurpose::DECRYPT, params))
+        << "(Possibly b/33543625)";
+}
+
+/*
+ * EncryptionOperationsTest.HmacEncrypt
+ *
+ * Verifies that attempting to use HMAC keys to encrypt fails in the correct way.
+ */
+TEST_F(EncryptionOperationsTest, HmacEncrypt) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .HmacKey(128)
+                                             .Digest(Digest::SHA_2_256)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+    auto params = AuthorizationSetBuilder()
+                      .Digest(Digest::SHA_2_256)
+                      .Padding(PaddingMode::NONE)
+                      .Authorization(TAG_MAC_LENGTH, 128);
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_PURPOSE, Begin(KeyPurpose::ENCRYPT, params))
+        << "(Possibly b/33543625)";
+    ASSERT_EQ(ErrorCode::UNSUPPORTED_PURPOSE, Begin(KeyPurpose::DECRYPT, params))
+        << "(Possibly b/33543625)";
+}
+
+/*
+ * EncryptionOperationsTest.AesEcbRoundTripSuccess
+ *
+ * Verifies that AES ECB mode works.
+ */
+TEST_F(EncryptionOperationsTest, AesEcbRoundTripSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::ECB)
+                                             .Padding(PaddingMode::NONE)));
+
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::NONE);
+
+    // Two-block message.
+    string message = "12345678901234567890123456789012";
+    string ciphertext1 = EncryptMessage(message, params);
+    EXPECT_EQ(message.size(), ciphertext1.size());
+
+    string ciphertext2 = EncryptMessage(string(message), params);
+    EXPECT_EQ(message.size(), ciphertext2.size());
+
+    // ECB is deterministic.
+    EXPECT_EQ(ciphertext1, ciphertext2);
+
+    string plaintext = DecryptMessage(ciphertext1, params);
+    EXPECT_EQ(message, plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesEcbRoundTripSuccess
+ *
+ * Verifies that AES encryption fails in the correct way when an unauthorized mode is specified.
+ */
+TEST_F(EncryptionOperationsTest, AesWrongMode) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::CBC)
+                                             .Padding(PaddingMode::NONE)));
+    // Two-block message.
+    string message = "12345678901234567890123456789012";
+    EXPECT_EQ(
+        ErrorCode::INCOMPATIBLE_BLOCK_MODE,
+        Begin(KeyPurpose::ENCRYPT,
+              AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::NONE)));
+}
+
+/*
+ * EncryptionOperationsTest.AesEcbNoPaddingWrongInputSize
+ *
+ * Verifies that AES encryption fails in the correct way when provided an input that is not a
+ * multiple of the block size and no padding is specified.
+ */
+TEST_F(EncryptionOperationsTest, AesEcbNoPaddingWrongInputSize) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::ECB)
+                                             .Padding(PaddingMode::NONE)));
+    // Message is slightly shorter than two blocks.
+    string message(16 * 2 - 1, 'a');
+
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::NONE);
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
+    string ciphertext;
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &ciphertext));
+    EXPECT_EQ(0U, ciphertext.size());
+}
+
+/*
+ * EncryptionOperationsTest.AesEcbPkcs7Padding
+ *
+ * Verifies that AES PKCS7 padding works for any message length.
+ */
+TEST_F(EncryptionOperationsTest, AesEcbPkcs7Padding) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::ECB)
+                                             .Padding(PaddingMode::PKCS7)));
+
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+
+    // Try various message lengths; all should work.
+    for (size_t i = 0; i < 32; ++i) {
+        string message(i, 'a');
+        string ciphertext = EncryptMessage(message, params);
+        EXPECT_EQ(i + 16 - (i % 16), ciphertext.size());
+        string plaintext = DecryptMessage(ciphertext, params);
+        EXPECT_EQ(message, plaintext);
+    }
+}
+
+/*
+ * EncryptionOperationsTest.AesEcbWrongPadding
+ *
+ * Verifies that AES enryption fails in the correct way when an unauthorized padding mode is
+ * specified.
+ */
+TEST_F(EncryptionOperationsTest, AesEcbWrongPadding) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::ECB)
+                                             .Padding(PaddingMode::NONE)));
+
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+
+    // Try various message lengths; all should fail
+    for (size_t i = 0; i < 32; ++i) {
+        string message(i, 'a');
+        EXPECT_EQ(ErrorCode::INCOMPATIBLE_PADDING_MODE, Begin(KeyPurpose::ENCRYPT, params));
+    }
+}
+
+/*
+ * EncryptionOperationsTest.AesEcbPkcs7PaddingCorrupted
+ *
+ * Verifies that AES decryption fails in the correct way when the padding is corrupted.
+ */
+TEST_F(EncryptionOperationsTest, AesEcbPkcs7PaddingCorrupted) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::ECB)
+                                             .Padding(PaddingMode::PKCS7)));
+
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+
+    string message = "a";
+    string ciphertext = EncryptMessage(message, params);
+    EXPECT_EQ(16U, ciphertext.size());
+    EXPECT_NE(ciphertext, message);
+    ++ciphertext[ciphertext.size() / 2];
+
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
+    string plaintext;
+    EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &plaintext));
+}
+
+HidlBuf CopyIv(const AuthorizationSet& set) {
+    auto iv = set.GetTagValue(TAG_NONCE);
+    EXPECT_TRUE(iv.isOk());
+    return iv.value();
+}
+
+/*
+ * EncryptionOperationsTest.AesCtrRoundTripSuccess
+ *
+ * Verifies that AES CTR mode works.
+ */
+TEST_F(EncryptionOperationsTest, AesCtrRoundTripSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::CTR)
+                                             .Padding(PaddingMode::NONE)));
+
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::CTR).Padding(PaddingMode::NONE);
+
+    string message = "123";
+    AuthorizationSet out_params;
+    string ciphertext1 = EncryptMessage(message, params, &out_params);
+    HidlBuf iv1 = CopyIv(out_params);
+    EXPECT_EQ(16U, iv1.size());
+
+    EXPECT_EQ(message.size(), ciphertext1.size());
+
+    out_params.Clear();
+    string ciphertext2 = EncryptMessage(message, params, &out_params);
+    HidlBuf iv2 = CopyIv(out_params);
+    EXPECT_EQ(16U, iv2.size());
+
+    // IVs should be random, so ciphertexts should differ.
+    EXPECT_NE(ciphertext1, ciphertext2);
+
+    auto params_iv1 =
+        AuthorizationSetBuilder().Authorizations(params).Authorization(TAG_NONCE, iv1);
+    auto params_iv2 =
+        AuthorizationSetBuilder().Authorizations(params).Authorization(TAG_NONCE, iv2);
+
+    string plaintext = DecryptMessage(ciphertext1, params_iv1);
+    EXPECT_EQ(message, plaintext);
+    plaintext = DecryptMessage(ciphertext2, params_iv2);
+    EXPECT_EQ(message, plaintext);
+
+    // Using the wrong IV will result in a "valid" decryption, but the data will be garbage.
+    plaintext = DecryptMessage(ciphertext1, params_iv2);
+    EXPECT_NE(message, plaintext);
+    plaintext = DecryptMessage(ciphertext2, params_iv1);
+    EXPECT_NE(message, plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesIncremental
+ *
+ * Verifies that AES works, all modes, when provided data in various size increments.
+ */
+TEST_F(EncryptionOperationsTest, AesIncremental) {
+    auto block_modes = {
+        BlockMode::ECB, BlockMode::CBC, BlockMode::CTR, BlockMode::GCM,
+    };
+
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(block_modes)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    for (int increment = 1; increment <= 240; ++increment) {
+        for (auto block_mode : block_modes) {
+            string message(240, 'a');
+            auto params = AuthorizationSetBuilder()
+                              .BlockMode(block_mode)
+                              .Padding(PaddingMode::NONE)
+                              .Authorization(TAG_MAC_LENGTH, 128) /* for GCM */;
+
+            AuthorizationSet output_params;
+            EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params, &output_params));
+
+            string ciphertext;
+            size_t input_consumed;
+            string to_send;
+            for (size_t i = 0; i < message.size(); i += increment) {
+                to_send.append(message.substr(i, increment));
+                EXPECT_EQ(ErrorCode::OK, Update(to_send, &ciphertext, &input_consumed));
+                to_send = to_send.substr(input_consumed);
+
+                switch (block_mode) {
+                case BlockMode::ECB:
+                case BlockMode::CBC:
+                    // Implementations must take as many blocks as possible, leaving less than
+                    // a block.
+                    EXPECT_LE(to_send.length(), 16U);
+                    break;
+                case BlockMode::GCM:
+                case BlockMode::CTR:
+                    // Implementations must always take all the data.
+                    EXPECT_EQ(0U, to_send.length());
+                    break;
+                }
+            }
+            EXPECT_EQ(ErrorCode::OK, Finish(to_send, &ciphertext)) << "Error sending " << to_send;
+
+            switch (block_mode) {
+            case BlockMode::GCM:
+                EXPECT_EQ(message.size() + 16, ciphertext.size());
+                break;
+            case BlockMode::CTR:
+                EXPECT_EQ(message.size(), ciphertext.size());
+                break;
+            case BlockMode::CBC:
+            case BlockMode::ECB:
+                EXPECT_EQ(message.size() + message.size() % 16, ciphertext.size());
+                break;
+            }
+
+            auto iv = output_params.GetTagValue(TAG_NONCE);
+            switch (block_mode) {
+            case BlockMode::CBC:
+            case BlockMode::GCM:
+            case BlockMode::CTR:
+                ASSERT_TRUE(iv.isOk()) << "No IV for block mode " << block_mode;
+                EXPECT_EQ(block_mode == BlockMode::GCM ? 12U : 16U, iv.value().size());
+                params.push_back(TAG_NONCE, iv.value());
+                break;
+
+            case BlockMode::ECB:
+                EXPECT_FALSE(iv.isOk()) << "ECB mode should not generate IV";
+                break;
+            }
+
+            EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params))
+                << "Decrypt begin() failed for block mode " << block_mode;
+
+            string plaintext;
+            for (size_t i = 0; i < ciphertext.size(); i += increment) {
+                to_send.append(ciphertext.substr(i, increment));
+                EXPECT_EQ(ErrorCode::OK, Update(to_send, &plaintext, &input_consumed));
+                to_send = to_send.substr(input_consumed);
+            }
+            ErrorCode error = Finish(to_send, &plaintext);
+            ASSERT_EQ(ErrorCode::OK, error)
+                << "Decryption failed for block mode " << block_mode << " and increment "
+                << increment << " (Possibly b/33584622)";
+            if (error == ErrorCode::OK) {
+                ASSERT_EQ(message, plaintext) << "Decryption didn't match for block mode "
+                                              << block_mode << " and increment " << increment;
+            }
+        }
+    }
+}
+
+struct AesCtrSp80038aTestVector {
+    const char* key;
+    const char* nonce;
+    const char* plaintext;
+    const char* ciphertext;
+};
+
+// These test vectors are taken from
+// http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, section F.5.
+static const AesCtrSp80038aTestVector kAesCtrSp80038aTestVectors[] = {
+    // AES-128
+    {
+        "2b7e151628aed2a6abf7158809cf4f3c", "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff",
+        "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e51"
+        "30c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710",
+        "874d6191b620e3261bef6864990db6ce9806f66b7970fdff8617187bb9fffdff"
+        "5ae4df3edbd5d35e5b4f09020db03eab1e031dda2fbe03d1792170a0f3009cee",
+    },
+    // AES-192
+    {
+        "8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b", "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff",
+        "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e51"
+        "30c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710",
+        "1abc932417521ca24f2b0459fe7e6e0b090339ec0aa6faefd5ccc2c6f4ce8e94"
+        "1e36b26bd1ebc670d1bd1d665620abf74f78a7f6d29809585a97daec58c6b050",
+    },
+    // AES-256
+    {
+        "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4",
+        "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff",
+        "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e51"
+        "30c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710",
+        "601ec313775789a5b7a7f504bbf3d228f443e3ca4d62b59aca84e990cacaf5c5"
+        "2b0930daa23de94ce87017ba2d84988ddfc9c58db67aada613c2dd08457941a6",
+    },
+};
+
+/*
+ * EncryptionOperationsTest.AesCtrSp80038aTestVector
+ *
+ * Verifies AES CTR implementation against SP800-38A test vectors.
+ */
+TEST_F(EncryptionOperationsTest, AesCtrSp80038aTestVector) {
+    for (size_t i = 0; i < 3; i++) {
+        const AesCtrSp80038aTestVector& test(kAesCtrSp80038aTestVectors[i]);
+        const string key = hex2str(test.key);
+        const string nonce = hex2str(test.nonce);
+        const string plaintext = hex2str(test.plaintext);
+        const string ciphertext = hex2str(test.ciphertext);
+        CheckAesCtrTestVector(key, nonce, plaintext, ciphertext);
+    }
+}
+
+/*
+ * EncryptionOperationsTest.AesCtrIncompatiblePaddingMode
+ *
+ * Verifies that keymaster rejects use of CTR mode with PKCS7 padding in the correct way.
+ */
+TEST_F(EncryptionOperationsTest, AesCtrIncompatiblePaddingMode) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::CTR)
+                                             .Padding(PaddingMode::PKCS7)));
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::CTR).Padding(PaddingMode::NONE);
+    EXPECT_EQ(ErrorCode::INCOMPATIBLE_PADDING_MODE, Begin(KeyPurpose::ENCRYPT, params));
+}
+
+/*
+ * EncryptionOperationsTest.AesCtrInvalidCallerNonce
+ *
+ * Verifies that keymaster fails correctly when the user supplies an incorrect-size nonce.
+ */
+TEST_F(EncryptionOperationsTest, AesCtrInvalidCallerNonce) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::CTR)
+                                             .Authorization(TAG_CALLER_NONCE)
+                                             .Padding(PaddingMode::NONE)));
+
+    auto params = AuthorizationSetBuilder()
+                      .BlockMode(BlockMode::CTR)
+                      .Padding(PaddingMode::NONE)
+                      .Authorization(TAG_NONCE, HidlBuf(string(1, 'a')));
+    EXPECT_EQ(ErrorCode::INVALID_NONCE, Begin(KeyPurpose::ENCRYPT, params));
+
+    params = AuthorizationSetBuilder()
+                 .BlockMode(BlockMode::CTR)
+                 .Padding(PaddingMode::NONE)
+                 .Authorization(TAG_NONCE, HidlBuf(string(15, 'a')));
+    EXPECT_EQ(ErrorCode::INVALID_NONCE, Begin(KeyPurpose::ENCRYPT, params));
+
+    params = AuthorizationSetBuilder()
+                 .BlockMode(BlockMode::CTR)
+                 .Padding(PaddingMode::NONE)
+                 .Authorization(TAG_NONCE, HidlBuf(string(17, 'a')));
+    EXPECT_EQ(ErrorCode::INVALID_NONCE, Begin(KeyPurpose::ENCRYPT, params));
+}
+
+/*
+ * EncryptionOperationsTest.AesCtrInvalidCallerNonce
+ *
+ * Verifies that keymaster fails correctly when the user supplies an incorrect-size nonce.
+ */
+TEST_F(EncryptionOperationsTest, AesCbcRoundTripSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::CBC)
+                                             .Padding(PaddingMode::NONE)));
+    // Two-block message.
+    string message = "12345678901234567890123456789012";
+    auto params = AuthorizationSetBuilder().BlockMode(BlockMode::CBC).Padding(PaddingMode::NONE);
+    AuthorizationSet out_params;
+    string ciphertext1 = EncryptMessage(message, params, &out_params);
+    HidlBuf iv1 = CopyIv(out_params);
+    EXPECT_EQ(message.size(), ciphertext1.size());
+
+    out_params.Clear();
+
+    string ciphertext2 = EncryptMessage(message, params, &out_params);
+    HidlBuf iv2 = CopyIv(out_params);
+    EXPECT_EQ(message.size(), ciphertext2.size());
+
+    // IVs should be random, so ciphertexts should differ.
+    EXPECT_NE(ciphertext1, ciphertext2);
+
+    params.push_back(TAG_NONCE, iv1);
+    string plaintext = DecryptMessage(ciphertext1, params);
+    EXPECT_EQ(message, plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesCallerNonce
+ *
+ * Verifies that AES caller-provided nonces work correctly.
+ */
+TEST_F(EncryptionOperationsTest, AesCallerNonce) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::CBC)
+                                             .Authorization(TAG_CALLER_NONCE)
+                                             .Padding(PaddingMode::NONE)));
+
+    string message = "12345678901234567890123456789012";
+
+    // Don't specify nonce, should get a random one.
+    AuthorizationSetBuilder params =
+        AuthorizationSetBuilder().BlockMode(BlockMode::CBC).Padding(PaddingMode::NONE);
+    AuthorizationSet out_params;
+    string ciphertext = EncryptMessage(message, params, &out_params);
+    EXPECT_EQ(message.size(), ciphertext.size());
+    EXPECT_EQ(16U, out_params.GetTagValue(TAG_NONCE).value().size());
+
+    params.push_back(TAG_NONCE, out_params.GetTagValue(TAG_NONCE).value());
+    string plaintext = DecryptMessage(ciphertext, params);
+    EXPECT_EQ(message, plaintext);
+
+    // Now specify a nonce, should also work.
+    params = AuthorizationSetBuilder()
+                 .BlockMode(BlockMode::CBC)
+                 .Padding(PaddingMode::NONE)
+                 .Authorization(TAG_NONCE, HidlBuf("abcdefghijklmnop"));
+    out_params.Clear();
+    ciphertext = EncryptMessage(message, params, &out_params);
+
+    // Decrypt with correct nonce.
+    plaintext = DecryptMessage(ciphertext, params);
+    EXPECT_EQ(message, plaintext);
+
+    // Try with wrong nonce.
+    params = AuthorizationSetBuilder()
+                 .BlockMode(BlockMode::CBC)
+                 .Padding(PaddingMode::NONE)
+                 .Authorization(TAG_NONCE, HidlBuf("aaaaaaaaaaaaaaaa"));
+    plaintext = DecryptMessage(ciphertext, params);
+    EXPECT_NE(message, plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesCallerNonceProhibited
+ *
+ * Verifies that caller-provided nonces are not permitted when not specified in the key
+ * authorizations.
+ */
+TEST_F(EncryptionOperationsTest, AesCallerNonceProhibited) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::CBC)
+                                             .Padding(PaddingMode::NONE)));
+
+    string message = "12345678901234567890123456789012";
+
+    // Don't specify nonce, should get a random one.
+    AuthorizationSetBuilder params =
+        AuthorizationSetBuilder().BlockMode(BlockMode::CBC).Padding(PaddingMode::NONE);
+    AuthorizationSet out_params;
+    string ciphertext = EncryptMessage(message, params, &out_params);
+    EXPECT_EQ(message.size(), ciphertext.size());
+    EXPECT_EQ(16U, out_params.GetTagValue(TAG_NONCE).value().size());
+
+    params.push_back(TAG_NONCE, out_params.GetTagValue(TAG_NONCE).value());
+    string plaintext = DecryptMessage(ciphertext, params);
+    EXPECT_EQ(message, plaintext);
+
+    // Now specify a nonce, should fail
+    params = AuthorizationSetBuilder()
+                 .BlockMode(BlockMode::CBC)
+                 .Padding(PaddingMode::NONE)
+                 .Authorization(TAG_NONCE, HidlBuf("abcdefghijklmnop"));
+    out_params.Clear();
+    EXPECT_EQ(ErrorCode::CALLER_NONCE_PROHIBITED, Begin(KeyPurpose::ENCRYPT, params, &out_params));
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmRoundTripSuccess
+ *
+ * Verifies that AES GCM mode works.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmRoundTripSuccess) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .Authorization(TAG_BLOCK_MODE, BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    string aad = "foobar";
+    string message = "123456789012345678901234567890123456";
+
+    auto begin_params = AuthorizationSetBuilder()
+                            .BlockMode(BlockMode::GCM)
+                            .Padding(PaddingMode::NONE)
+                            .Authorization(TAG_MAC_LENGTH, 128);
+
+    auto update_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, aad.data(), aad.size());
+
+    // Encrypt
+    AuthorizationSet begin_out_params;
+    ASSERT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, begin_params, &begin_out_params))
+        << "Begin encrypt";
+    string ciphertext;
+    AuthorizationSet update_out_params;
+    ASSERT_EQ(ErrorCode::OK,
+              Finish(op_handle_, update_params, message, "", &update_out_params, &ciphertext));
+
+    // Grab nonce
+    begin_params.push_back(begin_out_params);
+
+    // Decrypt.
+    ASSERT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, begin_params)) << "Begin decrypt";
+    string plaintext;
+    size_t input_consumed;
+    ASSERT_EQ(ErrorCode::OK, Update(op_handle_, update_params, ciphertext, &update_out_params,
+                                    &plaintext, &input_consumed));
+    EXPECT_EQ(ciphertext.size(), input_consumed);
+    EXPECT_EQ(ErrorCode::OK, Finish("", &plaintext));
+
+    EXPECT_EQ(message, plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmTooShortTag
+ *
+ * Verifies that AES GCM mode fails correctly when a too-short tag length is specified.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmTooShortTag) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+    string message = "123456789012345678901234567890123456";
+    auto params = AuthorizationSetBuilder()
+                      .BlockMode(BlockMode::GCM)
+                      .Padding(PaddingMode::NONE)
+                      .Authorization(TAG_MAC_LENGTH, 96);
+
+    EXPECT_EQ(ErrorCode::INVALID_MAC_LENGTH, Begin(KeyPurpose::ENCRYPT, params));
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmTooShortTagOnDecrypt
+ *
+ * Verifies that AES GCM mode fails correctly when a too-short tag is provided to decryption.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmTooShortTagOnDecrypt) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+    string aad = "foobar";
+    string message = "123456789012345678901234567890123456";
+    auto params = AuthorizationSetBuilder()
+                      .BlockMode(BlockMode::GCM)
+                      .Padding(PaddingMode::NONE)
+                      .Authorization(TAG_MAC_LENGTH, 128);
+
+    auto finish_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, aad.data(), aad.size());
+
+    // Encrypt
+    AuthorizationSet begin_out_params;
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params, &begin_out_params));
+    EXPECT_EQ(1U, begin_out_params.size());
+    ASSERT_TRUE(begin_out_params.GetTagValue(TAG_NONCE).isOk());
+
+    AuthorizationSet finish_out_params;
+    string ciphertext;
+    EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, finish_params, message, "" /* signature */,
+                                    &finish_out_params, &ciphertext));
+
+    params = AuthorizationSetBuilder()
+                 .Authorizations(begin_out_params)
+                 .BlockMode(BlockMode::GCM)
+                 .Padding(PaddingMode::NONE)
+                 .Authorization(TAG_MAC_LENGTH, 96);
+
+    // Decrypt.
+    EXPECT_EQ(ErrorCode::INVALID_MAC_LENGTH, Begin(KeyPurpose::DECRYPT, params));
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmCorruptKey
+ *
+ * Verifies that AES GCM mode fails correctly when the decryption key is incorrect.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmCorruptKey) {
+    const uint8_t nonce_bytes[] = {
+        0xb7, 0x94, 0x37, 0xae, 0x08, 0xff, 0x35, 0x5d, 0x7d, 0x8a, 0x4d, 0x0f,
+    };
+    string nonce = make_string(nonce_bytes);
+    const uint8_t ciphertext_bytes[] = {
+        0xb3, 0xf6, 0x79, 0x9e, 0x8f, 0x93, 0x26, 0xf2, 0xdf, 0x1e, 0x80, 0xfc, 0xd2, 0xcb, 0x16,
+        0xd7, 0x8c, 0x9d, 0xc7, 0xcc, 0x14, 0xbb, 0x67, 0x78, 0x62, 0xdc, 0x6c, 0x63, 0x9b, 0x3a,
+        0x63, 0x38, 0xd2, 0x4b, 0x31, 0x2d, 0x39, 0x89, 0xe5, 0x92, 0x0b, 0x5d, 0xbf, 0xc9, 0x76,
+        0x76, 0x5e, 0xfb, 0xfe, 0x57, 0xbb, 0x38, 0x59, 0x40, 0xa7, 0xa4, 0x3b, 0xdf, 0x05, 0xbd,
+        0xda, 0xe3, 0xc9, 0xd6, 0xa2, 0xfb, 0xbd, 0xfc, 0xc0, 0xcb, 0xa0,
+    };
+    string ciphertext = make_string(ciphertext_bytes);
+
+    auto params = AuthorizationSetBuilder()
+                      .BlockMode(BlockMode::GCM)
+                      .Padding(PaddingMode::NONE)
+                      .Authorization(TAG_MAC_LENGTH, 128)
+                      .Authorization(TAG_NONCE, nonce.data(), nonce.size());
+
+    auto import_params = AuthorizationSetBuilder()
+                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                             .AesEncryptionKey(128)
+                             .BlockMode(BlockMode::GCM)
+                             .Padding(PaddingMode::NONE)
+                             .Authorization(TAG_CALLER_NONCE)
+                             .Authorization(TAG_MIN_MAC_LENGTH, 128);
+
+    // Import correct key and decrypt
+    const uint8_t key_bytes[] = {
+        0xba, 0x76, 0x35, 0x4f, 0x0a, 0xed, 0x6e, 0x8d,
+        0x91, 0xf4, 0x5c, 0x4f, 0xf5, 0xa0, 0x62, 0xdb,
+    };
+    string key = make_string(key_bytes);
+    ASSERT_EQ(ErrorCode::OK, ImportKey(import_params, KeyFormat::RAW, key));
+    string plaintext = DecryptMessage(ciphertext, params);
+    EXPECT_EQ(ErrorCode::OK, DeleteKey());
+
+    // Corrupt key and attempt to decrypt
+    key[0] = 0;
+    ASSERT_EQ(ErrorCode::OK, ImportKey(import_params, KeyFormat::RAW, key));
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
+    EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(ciphertext, &plaintext));
+    EXPECT_EQ(ErrorCode::OK, DeleteKey());
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmAadNoData
+ *
+ * Verifies that AES GCM mode works when provided additional authenticated data, but no data to
+ * encrypt.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmAadNoData) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    string aad = "1234567890123456";
+    auto params = AuthorizationSetBuilder()
+                      .BlockMode(BlockMode::GCM)
+                      .Padding(PaddingMode::NONE)
+                      .Authorization(TAG_MAC_LENGTH, 128);
+
+    auto finish_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, aad.data(), aad.size());
+
+    // Encrypt
+    AuthorizationSet begin_out_params;
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params, &begin_out_params));
+    string ciphertext;
+    AuthorizationSet finish_out_params;
+    EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, finish_params, "" /* input */, "" /* signature */,
+                                    &finish_out_params, &ciphertext));
+    EXPECT_TRUE(finish_out_params.empty());
+
+    // Grab nonce
+    params.push_back(begin_out_params);
+
+    // Decrypt.
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
+    string plaintext;
+    EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, finish_params, ciphertext, "" /* signature */,
+                                    &finish_out_params, &plaintext))
+        << "(Possibly b/33615032)";
+
+    EXPECT_TRUE(finish_out_params.empty());
+
+    EXPECT_EQ("", plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmMultiPartAad
+ *
+ * Verifies that AES GCM mode works when provided additional authenticated data in multiple chunks.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmMultiPartAad) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    string message = "123456789012345678901234567890123456";
+    auto begin_params = AuthorizationSetBuilder()
+                            .BlockMode(BlockMode::GCM)
+                            .Padding(PaddingMode::NONE)
+                            .Authorization(TAG_MAC_LENGTH, 128);
+    AuthorizationSet begin_out_params;
+
+    auto update_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, "foo", (size_t)3);
+
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, begin_params, &begin_out_params));
+
+    // No data, AAD only.
+    string ciphertext;
+    size_t input_consumed;
+    AuthorizationSet update_out_params;
+    EXPECT_EQ(ErrorCode::OK, Update(op_handle_, update_params, "" /* input */, &update_out_params,
+                                    &ciphertext, &input_consumed));
+    EXPECT_EQ(0U, input_consumed);
+    EXPECT_EQ(0U, ciphertext.size());
+    EXPECT_TRUE(update_out_params.empty());
+
+    // AAD and data.
+    EXPECT_EQ(ErrorCode::OK, Update(op_handle_, update_params, message, &update_out_params,
+                                    &ciphertext, &input_consumed));
+    EXPECT_EQ(message.size(), input_consumed);
+    EXPECT_EQ(message.size(), ciphertext.size());
+    EXPECT_TRUE(update_out_params.empty());
+
+    EXPECT_EQ(ErrorCode::OK, Finish("" /* input */, &ciphertext));
+
+    // Grab nonce.
+    begin_params.push_back(begin_out_params);
+
+    // Decrypt
+    update_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, "foofoo", (size_t)6);
+
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, begin_params));
+    string plaintext;
+    EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, update_params, ciphertext, "" /* signature */,
+                                    &update_out_params, &plaintext));
+    EXPECT_TRUE(update_out_params.empty());
+    EXPECT_EQ(message, plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmAadOutOfOrder
+ *
+ * Verifies that AES GCM mode fails correctly when given AAD after data to encipher.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmAadOutOfOrder) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    string message = "123456789012345678901234567890123456";
+    auto begin_params = AuthorizationSetBuilder()
+                            .BlockMode(BlockMode::GCM)
+                            .Padding(PaddingMode::NONE)
+                            .Authorization(TAG_MAC_LENGTH, 128);
+    AuthorizationSet begin_out_params;
+
+    auto update_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, "foo", (size_t)3);
+
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, begin_params, &begin_out_params));
+
+    // No data, AAD only.
+    string ciphertext;
+    size_t input_consumed;
+    AuthorizationSet update_out_params;
+    EXPECT_EQ(ErrorCode::OK, Update(op_handle_, update_params, "" /* input */, &update_out_params,
+                                    &ciphertext, &input_consumed));
+    EXPECT_EQ(0U, input_consumed);
+    EXPECT_EQ(0U, ciphertext.size());
+    EXPECT_TRUE(update_out_params.empty());
+
+    // AAD and data.
+    EXPECT_EQ(ErrorCode::OK, Update(op_handle_, update_params, message, &update_out_params,
+                                    &ciphertext, &input_consumed));
+    EXPECT_EQ(message.size(), input_consumed);
+    EXPECT_EQ(message.size(), ciphertext.size());
+    EXPECT_TRUE(update_out_params.empty());
+
+    // More AAD
+    EXPECT_EQ(ErrorCode::INVALID_TAG, Update(op_handle_, update_params, "", &update_out_params,
+                                             &ciphertext, &input_consumed));
+
+    op_handle_ = kOpHandleSentinel;
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmBadAad
+ *
+ * Verifies that AES GCM decryption fails correctly when additional authenticated date is wrong.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmBadAad) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    string message = "12345678901234567890123456789012";
+    auto begin_params = AuthorizationSetBuilder()
+                            .BlockMode(BlockMode::GCM)
+                            .Padding(PaddingMode::NONE)
+                            .Authorization(TAG_MAC_LENGTH, 128);
+
+    auto finish_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, "foobar", (size_t)6);
+
+    // Encrypt
+    AuthorizationSet begin_out_params;
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, begin_params, &begin_out_params));
+    string ciphertext;
+    AuthorizationSet finish_out_params;
+    EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, finish_params, message, "" /* signature */,
+                                    &finish_out_params, &ciphertext));
+
+    // Grab nonce
+    begin_params.push_back(begin_out_params);
+
+    finish_params = AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA,
+                                                            "barfoo" /* Wrong AAD */, (size_t)6);
+
+    // Decrypt.
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, begin_params, &begin_out_params));
+    string plaintext;
+    EXPECT_EQ(ErrorCode::VERIFICATION_FAILED,
+              Finish(op_handle_, finish_params, ciphertext, "" /* signature */, &finish_out_params,
+                     &plaintext));
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmWrongNonce
+ *
+ * Verifies that AES GCM decryption fails correctly when the nonce is incorrect.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmWrongNonce) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    string message = "12345678901234567890123456789012";
+    auto begin_params = AuthorizationSetBuilder()
+                            .BlockMode(BlockMode::GCM)
+                            .Padding(PaddingMode::NONE)
+                            .Authorization(TAG_MAC_LENGTH, 128);
+
+    auto finish_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, "foobar", (size_t)6);
+
+    // Encrypt
+    AuthorizationSet begin_out_params;
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, begin_params, &begin_out_params));
+    string ciphertext;
+    AuthorizationSet finish_out_params;
+    EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, finish_params, message, "" /* signature */,
+                                    &finish_out_params, &ciphertext));
+
+    // Wrong nonce
+    begin_params.push_back(TAG_NONCE, HidlBuf("123456789012"));
+
+    // Decrypt.
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, begin_params, &begin_out_params));
+    string plaintext;
+    EXPECT_EQ(ErrorCode::VERIFICATION_FAILED,
+              Finish(op_handle_, finish_params, ciphertext, "" /* signature */, &finish_out_params,
+                     &plaintext));
+
+    // With wrong nonce, should have gotten garbage plaintext (or none).
+    EXPECT_NE(message, plaintext);
+}
+
+/*
+ * EncryptionOperationsTest.AesGcmCorruptTag
+ *
+ * Verifies that AES GCM decryption fails correctly when the tag is wrong.
+ */
+TEST_F(EncryptionOperationsTest, AesGcmCorruptTag) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .BlockMode(BlockMode::GCM)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    string aad = "1234567890123456";
+    string message = "123456789012345678901234567890123456";
+
+    auto params = AuthorizationSetBuilder()
+                      .BlockMode(BlockMode::GCM)
+                      .Padding(PaddingMode::NONE)
+                      .Authorization(TAG_MAC_LENGTH, 128);
+
+    auto finish_params =
+        AuthorizationSetBuilder().Authorization(TAG_ASSOCIATED_DATA, aad.data(), aad.size());
+
+    // Encrypt
+    AuthorizationSet begin_out_params;
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params, &begin_out_params));
+    string ciphertext;
+    AuthorizationSet finish_out_params;
+    EXPECT_EQ(ErrorCode::OK, Finish(op_handle_, finish_params, message, "" /* signature */,
+                                    &finish_out_params, &ciphertext));
+    EXPECT_TRUE(finish_out_params.empty());
+
+    // Corrupt tag
+    ++(*ciphertext.rbegin());
+
+    // Grab nonce
+    params.push_back(begin_out_params);
+
+    // Decrypt.
+    EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
+    string plaintext;
+    EXPECT_EQ(ErrorCode::VERIFICATION_FAILED,
+              Finish(op_handle_, finish_params, ciphertext, "" /* signature */, &finish_out_params,
+                     &plaintext));
+    EXPECT_TRUE(finish_out_params.empty());
+}
+
+typedef KeymasterHidlTest MaxOperationsTest;
+
+/*
+ * MaxOperationsTest.TestLimitAes
+ *
+ * Verifies that the max uses per boot tag works correctly with AES keys.
+ */
+TEST_F(MaxOperationsTest, TestLimitAes) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .EcbMode()
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_MAX_USES_PER_BOOT, 3)));
+
+    string message = "1234567890123456";
+
+    auto params = AuthorizationSetBuilder().EcbMode().Padding(PaddingMode::NONE);
+
+    EncryptMessage(message, params);
+    EncryptMessage(message, params);
+    EncryptMessage(message, params);
+
+    // Fourth time should fail.
+    EXPECT_EQ(ErrorCode::KEY_MAX_OPS_EXCEEDED, Begin(KeyPurpose::ENCRYPT, params));
+}
+
+/*
+ * MaxOperationsTest.TestLimitAes
+ *
+ * Verifies that the max uses per boot tag works correctly with RSA keys.
+ */
+TEST_F(MaxOperationsTest, TestLimitRsa) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaSigningKey(1024, 3)
+                                             .NoDigestOrPadding()
+                                             .Authorization(TAG_MAX_USES_PER_BOOT, 3)));
+
+    string message = "1234567890123456";
+
+    auto params = AuthorizationSetBuilder().NoDigestOrPadding();
+
+    SignMessage(message, params);
+    SignMessage(message, params);
+    SignMessage(message, params);
+
+    // Fourth time should fail.
+    EXPECT_EQ(ErrorCode::KEY_MAX_OPS_EXCEEDED, Begin(KeyPurpose::SIGN, params));
+}
+
+typedef KeymasterHidlTest AddEntropyTest;
+
+/*
+ * AddEntropyTest.AddEntropy
+ *
+ * Verifies that the addRngEntropy method doesn't blow up.  There's no way to test that entropy is
+ * actually added.
+ */
+TEST_F(AddEntropyTest, AddEntropy) {
+    EXPECT_EQ(ErrorCode::OK, keymaster().addRngEntropy(HidlBuf("foo")));
+}
+
+/*
+ * AddEntropyTest.AddEmptyEntropy
+ *
+ * Verifies that the addRngEntropy method doesn't blow up when given an empty buffer.
+ */
+TEST_F(AddEntropyTest, AddEmptyEntropy) {
+    EXPECT_EQ(ErrorCode::OK, keymaster().addRngEntropy(HidlBuf()));
+}
+
+/*
+ * AddEntropyTest.AddLargeEntropy
+ *
+ * Verifies that the addRngEntropy method doesn't blow up when given a largish amount of data.
+ */
+TEST_F(AddEntropyTest, AddLargeEntropy) {
+    EXPECT_EQ(ErrorCode::OK, keymaster().addRngEntropy(HidlBuf(string(16 * 1024, 'a'))));
+}
+
+typedef KeymasterHidlTest AttestationTest;
+
+/*
+ * AttestationTest.RsaAttestation
+ *
+ * Verifies that attesting to RSA keys works and generates the expected output.
+ */
+TEST_F(AttestationTest, RsaAttestation) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .RsaSigningKey(1024, 3)
+                                             .Digest(Digest::NONE)
+                                             .Padding(PaddingMode::NONE)
+                                             .Authorization(TAG_INCLUDE_UNIQUE_ID)));
+
+    hidl_vec<hidl_vec<uint8_t>> cert_chain;
+    EXPECT_EQ(ErrorCode::OK, AttestKey(AuthorizationSetBuilder().Authorization(
+                                           TAG_ATTESTATION_CHALLENGE, HidlBuf("challenge")),
+                                       &cert_chain));
+    EXPECT_GE(cert_chain.size(), 2U);
+    EXPECT_TRUE(verify_chain(cert_chain));
+    EXPECT_TRUE(verify_attestation_record("challenge",                            //
+                                          key_characteristics_.softwareEnforced,  //
+                                          key_characteristics_.teeEnforced,       //
+                                          cert_chain[0]));
+}
+
+/*
+ * AttestationTest.EcAttestation
+ *
+ * Verifies that attesting to EC keys works and generates the expected output.
+ */
+TEST_F(AttestationTest, EcAttestation) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .EcdsaSigningKey(EcCurve::P_256)
+                                             .Digest(Digest::SHA_2_256)
+                                             .Authorization(TAG_INCLUDE_UNIQUE_ID)));
+
+    hidl_vec<hidl_vec<uint8_t>> cert_chain;
+    EXPECT_EQ(ErrorCode::OK, AttestKey(AuthorizationSetBuilder().Authorization(
+                                           TAG_ATTESTATION_CHALLENGE, HidlBuf("challenge")),
+                                       &cert_chain));
+    EXPECT_GE(cert_chain.size(), 2U);
+    EXPECT_TRUE(verify_chain(cert_chain));
+
+    EXPECT_TRUE(verify_attestation_record("challenge",                            //
+                                          key_characteristics_.softwareEnforced,  //
+                                          key_characteristics_.teeEnforced,       //
+                                          cert_chain[0]));
+}
+
+/*
+ * AttestationTest.AesAttestation
+ *
+ * Verifies that attesting to AES keys fails in the expected way.
+ */
+TEST_F(AttestationTest, AesAttestation) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .AesEncryptionKey(128)
+                                             .EcbMode()
+                                             .Padding(PaddingMode::PKCS7)));
+
+    hidl_vec<hidl_vec<uint8_t>> cert_chain;
+    EXPECT_EQ(ErrorCode::INCOMPATIBLE_ALGORITHM,
+              AttestKey(AuthorizationSetBuilder().Authorization(TAG_ATTESTATION_CHALLENGE,
+                                                                HidlBuf("challenge")),
+                        &cert_chain));
+}
+
+/*
+ * AttestationTest.HmacAttestation
+ *
+ * Verifies that attesting to HMAC keys fails in the expected way.
+ */
+TEST_F(AttestationTest, HmacAttestation) {
+    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+                                             .Authorization(TAG_NO_AUTH_REQUIRED)
+                                             .HmacKey(128)
+                                             .EcbMode()
+                                             .Digest(Digest::SHA_2_256)
+                                             .Authorization(TAG_MIN_MAC_LENGTH, 128)));
+
+    hidl_vec<hidl_vec<uint8_t>> cert_chain;
+    EXPECT_EQ(ErrorCode::INCOMPATIBLE_ALGORITHM,
+              AttestKey(AuthorizationSetBuilder().Authorization(TAG_ATTESTATION_CHALLENGE,
+                                                                HidlBuf("challenge")),
+                        &cert_chain));
+}
+
+}  // namespace test
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
+
+int main(int argc, char** argv) {
+    ::testing::InitGoogleTest(&argc, argv);
+    if (argc == 2) {
+        ALOGI("Running keymaster VTS against service \"%s\"", argv[1]);
+        service_name = argv[1];
+    }
+    int status = RUN_ALL_TESTS();
+    ALOGI("Test result = %d", status);
+    return status;
+}
diff --git a/keymaster/3.0/vts/functional/keymaster_tags.h b/keymaster/3.0/vts/functional/keymaster_tags.h
new file mode 100644
index 0000000..f241ef1
--- /dev/null
+++ b/keymaster/3.0/vts/functional/keymaster_tags.h
@@ -0,0 +1,450 @@
+/*
+ * Copyright 2014 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 SYSTEM_SECURITY_KEYSTORE_KEYMASTER_TAGS_H_
+#define SYSTEM_SECURITY_KEYSTORE_KEYMASTER_TAGS_H_
+
+/**
+ * This header contains various definitions that make working with keymaster tags safer and easier.
+ *
+ * It makes use of a fair amount of template metaprogramming. The metaprogramming serves the purpose
+ * of making it impossible to make certain classes of mistakes when operating on keymaster
+ * authorizations.  For example, it's an error to create a KeyParameter with tag == Tag::PURPOSE
+ * and then to assign Algorithm::RSA to algorithm element of its union. But because the user
+ * must choose the union field, there could be a mismatch which the compiler has now way to
+ * diagnose.
+ *
+ * The machinery in this header solves these problems by describing which union field corresponds
+ * to which Tag. Central to this mechanism is the template TypedTag. It has zero size and binds a
+ * numeric Tag to a type that the compiler understands. By means of the macro DECLARE_TYPED_TAG,
+ * we declare types for each of the tags defined in hardware/interfaces/keymaster/2.0/types.hal.
+ *
+ * The macro DECLARE_TYPED_TAG(name) generates a typename TAG_name_t and a zero sized instance
+ * TAG_name. Once these typed tags have been declared we define metafunctions mapping the each tag
+ * to its value c++ type and the correct union element of KeyParameter. This is done by means of
+ * the macros MAKE_TAG_*VALUE_ACCESSOR, which generates TypedTag2ValueType, a metafunction mapping
+ * a typed tag to the corresponding c++ type, and access function, accessTagValue returning a
+ * reference to the correct element of KeyParameter.
+ * E.g.:
+ *      given "KeyParameter param;" then "accessTagValue(TAG_PURPOSE, param)"
+ *      yields a reference to param.f.purpose
+ * If used in an assignment the compiler can now check the compatibility of the assigned value.
+ *
+ * For convenience we also provide the constructor like function Authorization().
+ * Authorization takes a typed tag and a value and checks at compile time whether the value given
+ * is suitable for the given tag. At runtime it creates a new KeyParameter initialized with the
+ * given tag and value and returns it by value.
+ *
+ * The second convenience function, authorizationValue, allows access to the KeyParameter value in
+ * a safe way. It takes a typed tag and a KeyParameter and returns a reference to the value wrapped
+ * by NullOr. NullOr has out-of-band information about whether it is save to access the wrapped
+ * reference.
+ * E.g.:
+ *      auto param = Authorization(TAG_ALGORITM, Algorithm::RSA);
+ *      auto value1 = authorizationValue(TAG_PURPOSE, param);
+ *      auto value2 = authorizationValue(TAG_ALGORITM, param);
+ * value1.isOk() yields false, but value2.isOk() yields true, thus value2.value() is save to access.
+ */
+
+#include <android/hardware/keymaster/3.0/IHwKeymasterDevice.h>
+#include <hardware/hw_auth_token.h>
+#include <type_traits>
+
+namespace android {
+namespace hardware {
+namespace keymaster {
+namespace V3_0 {
+
+// The following create the numeric values that KM_TAG_PADDING and KM_TAG_DIGEST used to have.  We
+// need these old values to be able to support old keys that use them.
+static const int32_t KM_TAG_DIGEST_OLD = static_cast<int32_t>(TagType::ENUM) | 5;
+static const int32_t KM_TAG_PADDING_OLD = static_cast<int32_t>(TagType::ENUM) | 7;
+
+constexpr TagType typeFromTag(Tag tag) {
+    return static_cast<TagType>(static_cast<uint32_t>(tag) & static_cast<uint32_t>(0xf0000000));
+}
+
+/**
+ * TypedTag is a templatized version of Tag, which provides compile-time checking of keymaster tag
+ * types. Instances are convertible to Tag, so they can be used wherever Tag is expected, and
+ * because they encode the tag type it's possible to create function overloads that only operate on
+ * tags with a particular type.
+ */
+template <TagType tag_type, Tag tag> struct TypedTag {
+    inline TypedTag() {
+        // Ensure that it's impossible to create a TypedTag instance whose 'tag' doesn't have type
+        // 'tag_type'.  Attempting to instantiate a tag with the wrong type will result in a compile
+        // error (no match for template specialization StaticAssert<false>), with no run-time cost.
+        static_assert(typeFromTag(tag) == tag_type, "mismatch between tag and tag_type");
+    }
+    constexpr operator Tag() { return tag; }
+    constexpr long maskedTag() {
+        return static_cast<long>(static_cast<uint32_t>(tag) & static_cast<uint32_t>(0x0fffffff));
+    }
+};
+
+template <Tag tag> struct Tag2TypedTag { typedef TypedTag<typeFromTag(tag), tag> type; };
+
+template <Tag tag> struct Tag2String;
+
+#define _TAGS_STRINGIFY(x) #x
+#define TAGS_STRINGIFY(x) _TAGS_STRINGIFY(x)
+
+#define DECLARE_TYPED_TAG(name)                                                                    \
+    typedef typename Tag2TypedTag<Tag::name>::type TAG_##name##_t;                                 \
+    extern TAG_##name##_t TAG_##name;                                                              \
+    template <> struct Tag2String<Tag::name> {                                                     \
+        static const char* value() { return "Tag::" TAGS_STRINGIFY(name); }                        \
+    }
+
+DECLARE_TYPED_TAG(INVALID);
+DECLARE_TYPED_TAG(KEY_SIZE);
+DECLARE_TYPED_TAG(MAC_LENGTH);
+DECLARE_TYPED_TAG(CALLER_NONCE);
+DECLARE_TYPED_TAG(MIN_MAC_LENGTH);
+DECLARE_TYPED_TAG(RSA_PUBLIC_EXPONENT);
+DECLARE_TYPED_TAG(ECIES_SINGLE_HASH_MODE);
+DECLARE_TYPED_TAG(INCLUDE_UNIQUE_ID);
+DECLARE_TYPED_TAG(ACTIVE_DATETIME);
+DECLARE_TYPED_TAG(ORIGINATION_EXPIRE_DATETIME);
+DECLARE_TYPED_TAG(USAGE_EXPIRE_DATETIME);
+DECLARE_TYPED_TAG(MIN_SECONDS_BETWEEN_OPS);
+DECLARE_TYPED_TAG(MAX_USES_PER_BOOT);
+DECLARE_TYPED_TAG(ALL_USERS);
+DECLARE_TYPED_TAG(USER_ID);
+DECLARE_TYPED_TAG(USER_SECURE_ID);
+DECLARE_TYPED_TAG(NO_AUTH_REQUIRED);
+DECLARE_TYPED_TAG(AUTH_TIMEOUT);
+DECLARE_TYPED_TAG(ALLOW_WHILE_ON_BODY);
+DECLARE_TYPED_TAG(ALL_APPLICATIONS);
+DECLARE_TYPED_TAG(APPLICATION_ID);
+DECLARE_TYPED_TAG(APPLICATION_DATA);
+DECLARE_TYPED_TAG(CREATION_DATETIME);
+DECLARE_TYPED_TAG(ROLLBACK_RESISTANT);
+DECLARE_TYPED_TAG(ROOT_OF_TRUST);
+DECLARE_TYPED_TAG(ASSOCIATED_DATA);
+DECLARE_TYPED_TAG(NONCE);
+DECLARE_TYPED_TAG(AUTH_TOKEN);
+DECLARE_TYPED_TAG(BOOTLOADER_ONLY);
+DECLARE_TYPED_TAG(OS_VERSION);
+DECLARE_TYPED_TAG(OS_PATCHLEVEL);
+DECLARE_TYPED_TAG(UNIQUE_ID);
+DECLARE_TYPED_TAG(ATTESTATION_CHALLENGE);
+DECLARE_TYPED_TAG(ATTESTATION_APPLICATION_ID);
+DECLARE_TYPED_TAG(RESET_SINCE_ID_ROTATION);
+
+DECLARE_TYPED_TAG(PURPOSE);
+DECLARE_TYPED_TAG(ALGORITHM);
+DECLARE_TYPED_TAG(BLOCK_MODE);
+DECLARE_TYPED_TAG(DIGEST);
+DECLARE_TYPED_TAG(PADDING);
+DECLARE_TYPED_TAG(BLOB_USAGE_REQUIREMENTS);
+DECLARE_TYPED_TAG(ORIGIN);
+DECLARE_TYPED_TAG(USER_AUTH_TYPE);
+DECLARE_TYPED_TAG(KDF);
+DECLARE_TYPED_TAG(EC_CURVE);
+
+template <typename... Elems> struct MetaList {};
+
+using all_tags_t = MetaList<
+    TAG_INVALID_t, TAG_KEY_SIZE_t, TAG_MAC_LENGTH_t, TAG_CALLER_NONCE_t, TAG_MIN_MAC_LENGTH_t,
+    TAG_RSA_PUBLIC_EXPONENT_t, TAG_ECIES_SINGLE_HASH_MODE_t, TAG_INCLUDE_UNIQUE_ID_t,
+    TAG_ACTIVE_DATETIME_t, TAG_ORIGINATION_EXPIRE_DATETIME_t, TAG_USAGE_EXPIRE_DATETIME_t,
+    TAG_MIN_SECONDS_BETWEEN_OPS_t, TAG_MAX_USES_PER_BOOT_t, TAG_ALL_USERS_t, TAG_USER_ID_t,
+    TAG_USER_SECURE_ID_t, TAG_NO_AUTH_REQUIRED_t, TAG_AUTH_TIMEOUT_t, TAG_ALLOW_WHILE_ON_BODY_t,
+    TAG_ALL_APPLICATIONS_t, TAG_APPLICATION_ID_t, TAG_APPLICATION_DATA_t, TAG_CREATION_DATETIME_t,
+    TAG_ROLLBACK_RESISTANT_t, TAG_ROOT_OF_TRUST_t, TAG_ASSOCIATED_DATA_t, TAG_NONCE_t,
+    TAG_AUTH_TOKEN_t, TAG_BOOTLOADER_ONLY_t, TAG_OS_VERSION_t, TAG_OS_PATCHLEVEL_t, TAG_UNIQUE_ID_t,
+    TAG_ATTESTATION_CHALLENGE_t, TAG_ATTESTATION_APPLICATION_ID_t, TAG_RESET_SINCE_ID_ROTATION_t,
+    TAG_PURPOSE_t, TAG_ALGORITHM_t, TAG_BLOCK_MODE_t, TAG_DIGEST_t, TAG_PADDING_t,
+    TAG_BLOB_USAGE_REQUIREMENTS_t, TAG_ORIGIN_t, TAG_USER_AUTH_TYPE_t, TAG_KDF_t, TAG_EC_CURVE_t>;
+
+/* implementation in keystore_utils.cpp */
+extern const char* stringifyTag(Tag tag);
+
+template <typename TypedTagType> struct TypedTag2ValueType;
+
+#define MAKE_TAG_VALUE_ACCESSOR(tag_type, field_name)                                              \
+    template <Tag tag> struct TypedTag2ValueType<TypedTag<tag_type, tag>> {                        \
+        typedef decltype(static_cast<KeyParameter*>(nullptr)->field_name) type;                    \
+    };                                                                                             \
+    template <Tag tag>                                                                             \
+    inline auto accessTagValue(TypedTag<tag_type, tag>, const KeyParameter& param)                 \
+        ->const decltype(param.field_name)& {                                                      \
+        return param.field_name;                                                                   \
+    }                                                                                              \
+    template <Tag tag>                                                                             \
+    inline auto accessTagValue(TypedTag<tag_type, tag>, KeyParameter& param)                       \
+        ->decltype(param.field_name)& {                                                            \
+        return param.field_name;                                                                   \
+    }
+
+MAKE_TAG_VALUE_ACCESSOR(TagType::ULONG, f.longInteger)
+MAKE_TAG_VALUE_ACCESSOR(TagType::ULONG_REP, f.longInteger)
+MAKE_TAG_VALUE_ACCESSOR(TagType::DATE, f.dateTime)
+MAKE_TAG_VALUE_ACCESSOR(TagType::UINT, f.integer)
+MAKE_TAG_VALUE_ACCESSOR(TagType::UINT_REP, f.integer)
+MAKE_TAG_VALUE_ACCESSOR(TagType::BOOL, f.boolValue)
+MAKE_TAG_VALUE_ACCESSOR(TagType::BYTES, blob)
+MAKE_TAG_VALUE_ACCESSOR(TagType::BIGNUM, blob)
+
+#define MAKE_TAG_ENUM_VALUE_ACCESSOR(typed_tag, field_name)                                        \
+    template <> struct TypedTag2ValueType<decltype(typed_tag)> {                                   \
+        typedef decltype(static_cast<KeyParameter*>(nullptr)->field_name) type;                    \
+    };                                                                                             \
+    inline auto accessTagValue(decltype(typed_tag), const KeyParameter& param)                     \
+        ->const decltype(param.field_name)& {                                                      \
+        return param.field_name;                                                                   \
+    }                                                                                              \
+    inline auto accessTagValue(decltype(typed_tag), KeyParameter& param)                           \
+        ->decltype(param.field_name)& {                                                            \
+        return param.field_name;                                                                   \
+    }
+
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_ALGORITHM, f.algorithm)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_BLOB_USAGE_REQUIREMENTS, f.keyBlobUsageRequirements)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_BLOCK_MODE, f.blockMode)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_DIGEST, f.digest)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_EC_CURVE, f.ecCurve)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_KDF, f.keyDerivationFunction)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_ORIGIN, f.origin)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_PADDING, f.paddingMode)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_PURPOSE, f.purpose)
+MAKE_TAG_ENUM_VALUE_ACCESSOR(TAG_USER_AUTH_TYPE, f.hardwareAuthenticatorType)
+
+template <TagType tag_type, Tag tag, typename ValueT>
+inline KeyParameter makeKeyParameter(TypedTag<tag_type, tag> ttag, ValueT&& value) {
+    KeyParameter param;
+    param.tag = tag;
+    param.f.longInteger = 0;
+    accessTagValue(ttag, param) = std::forward<ValueT>(value);
+    return param;
+}
+
+// the boolean case
+template <Tag tag> inline KeyParameter makeKeyParameter(TypedTag<TagType::BOOL, tag>) {
+    KeyParameter param;
+    param.tag = tag;
+    param.f.boolValue = true;
+    return param;
+}
+
+template <typename... Pack> struct FirstOrNoneHelper;
+template <typename First> struct FirstOrNoneHelper<First> { typedef First type; };
+template <> struct FirstOrNoneHelper<> {
+    struct type {};
+};
+
+template <typename... Pack> using FirstOrNone = typename FirstOrNoneHelper<Pack...>::type;
+
+template <TagType tag_type, Tag tag, typename... Args>
+inline KeyParameter Authorization(TypedTag<tag_type, tag> ttag, Args&&... args) {
+    static_assert(tag_type != TagType::BOOL || (sizeof...(args) == 0),
+                  "TagType::BOOL Authorizations do not take parameters. Presence is truth.");
+    static_assert(tag_type == TagType::BOOL || (sizeof...(args) == 1),
+                  "Authorization other then TagType::BOOL take exactly one parameter.");
+    static_assert(
+        tag_type == TagType::BOOL ||
+            std::is_convertible<std::remove_cv_t<std::remove_reference_t<FirstOrNone<Args...>>>,
+                                typename TypedTag2ValueType<TypedTag<tag_type, tag>>::type>::value,
+        "Invalid argument type for given tag.");
+
+    return makeKeyParameter(ttag, std::forward<Args>(args)...);
+}
+
+/**
+ * This class wraps a (mostly return) value and stores whether or not the wrapped value is valid out
+ * of band. Note that if the wrapped value is a reference it is unsafe to access the value if
+ * !isOk(). If the wrapped type is a pointer or value and !isOk(), it is still safe to access the
+ * wrapped value. In this case the pointer will be NULL though, and the value will be default
+ * constructed.
+ */
+template <typename ValueT> class NullOr {
+    template <typename T> struct reference_initializer {
+        static T&& init() { return *static_cast<std::remove_reference_t<T>*>(nullptr); }
+    };
+    template <typename T> struct pointer_initializer {
+        static T init() { return nullptr; }
+    };
+    template <typename T> struct value_initializer {
+        static T init() { return T(); }
+    };
+    template <typename T>
+    using initializer_t =
+        std::conditional_t<std::is_lvalue_reference<T>::value, reference_initializer<T>,
+                           std::conditional_t<std::is_pointer<T>::value, pointer_initializer<T>,
+                                              value_initializer<T>>>;
+
+  public:
+    NullOr() : value_(initializer_t<ValueT>::init()), null_(true) {}
+    NullOr(ValueT&& value) : value_(std::forward<ValueT>(value)), null_(false) {}
+
+    bool isOk() const { return !null_; }
+
+    const ValueT& value() const & { return value_; }
+    ValueT& value() & { return value_; }
+    ValueT&& value() && { return std::move(value_); }
+
+  private:
+    ValueT value_;
+    bool null_;
+};
+
+template <typename T> std::remove_reference_t<T> NullOrOr(NullOr<T>&& v) {
+    if (v.isOk()) return v;
+    return {};
+}
+
+template <typename Head, typename... Tail>
+std::remove_reference_t<Head> NullOrOr(Head&& head, Tail&&... tail) {
+    if (head.isOk()) return head;
+    return NullOrOr(std::forward<Tail>(tail)...);
+}
+
+template <typename Default, typename Wrapped>
+std::remove_reference_t<Wrapped> defaultOr(NullOr<Wrapped>&& optional, Default&& def) {
+    static_assert(std::is_convertible<std::remove_reference_t<Default>,
+                                      std::remove_reference_t<Wrapped>>::value,
+                  "Type of default value must match the type wrapped by NullOr");
+    if (optional.isOk()) return optional.value();
+    return def;
+}
+
+template <TagType tag_type, Tag tag>
+inline NullOr<const typename TypedTag2ValueType<TypedTag<tag_type, tag>>::type&>
+authorizationValue(TypedTag<tag_type, tag> ttag, const KeyParameter& param) {
+    if (tag != param.tag) return {};
+    return accessTagValue(ttag, param);
+}
+
+inline const char* stringify(Digest digest) {
+    switch (digest) {
+    case Digest::NONE:
+        return "None";
+    case Digest::MD5:
+        return "Md5";
+    case Digest::SHA1:
+        return "Sha1";
+    case Digest::SHA_2_224:
+        return "Sha224";
+    case Digest::SHA_2_256:
+        return "Sha256";
+    case Digest::SHA_2_384:
+        return "Sha384";
+    case Digest::SHA_2_512:
+        return "Sha512";
+    }
+    return "UNKNOWN DIGEST!";
+}
+
+inline const char* stringify(Algorithm algorithm) {
+    switch (algorithm) {
+    case Algorithm::RSA:
+        return "Rsa";
+    case Algorithm::EC:
+        return "Ec";
+    case Algorithm::AES:
+        return "Aes";
+    case Algorithm::HMAC:
+        return "Hmac";
+    }
+    return "UNKNOWN ALGORITHM";
+}
+
+inline const char* stringify(BlockMode block_mode) {
+    switch (block_mode) {
+    case BlockMode::ECB:
+        return "Ecb";
+    case BlockMode::CBC:
+        return "Cbc";
+    case BlockMode::CTR:
+        return "Ctr";
+    case BlockMode::GCM:
+        return "Gcm";
+    }
+    return "UNKNOWN BLOCK MODE";
+}
+
+inline const char* stringify(PaddingMode padding) {
+    switch (padding) {
+    case PaddingMode::NONE:
+        return "None";
+    case PaddingMode::RSA_OAEP:
+        return "RsaOaep";
+    case PaddingMode::RSA_PSS:
+        return "RsaPss";
+    case PaddingMode::RSA_PKCS1_1_5_ENCRYPT:
+        return "RsaPkcs115Encrypt";
+    case PaddingMode::RSA_PKCS1_1_5_SIGN:
+        return "RsaPkcs115Sign";
+    case PaddingMode::PKCS7:
+        return "Pkcs7";
+    }
+    return "UNKNOWN PADDING MODE";
+}
+
+inline const char* stringify(KeyOrigin origin) {
+    switch (origin) {
+    case KeyOrigin::GENERATED:
+        return "Generated";
+    case KeyOrigin::DERIVED:
+        return "Derived";
+    case KeyOrigin::IMPORTED:
+        return "Imported";
+    case KeyOrigin::UNKNOWN:
+        return "UNKNOWN (keymaster0 didn't record it)";
+    }
+    return "UNKOWN KEY ORIGIN VALUE";
+}
+
+inline const char* stringify(KeyPurpose purpose) {
+    switch (purpose) {
+    case KeyPurpose::ENCRYPT:
+        return "Encrypt";
+    case KeyPurpose::DECRYPT:
+        return "Decrypt";
+    case KeyPurpose::SIGN:
+        return "Sign";
+    case KeyPurpose::VERIFY:
+        return "Verify";
+    case KeyPurpose::DERIVE_KEY:
+        return "DeriveKey";
+    case KeyPurpose::WRAP_KEY:
+        return "WrapKey";
+    };
+    return "UNKNOWN KEY PURPOSE";
+}
+
+inline const char* stringify(EcCurve curve) {
+    switch (curve) {
+    case EcCurve::P_224:
+        return "P_224";
+    case EcCurve::P_256:
+        return "P_256";
+    case EcCurve::P_384:
+        return "P_384";
+    case EcCurve::P_521:
+        return "P_521";
+    }
+    return "UNKNOWN EC CURVE";
+}
+
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
+
+#endif  // SYSTEM_SECURITY_KEYSTORE_KEYMASTER_TAGS_H_
diff --git a/keymaster/3.0/vts/functional/keystore_tags_utils.cpp b/keymaster/3.0/vts/functional/keystore_tags_utils.cpp
new file mode 100644
index 0000000..8dd99db
--- /dev/null
+++ b/keymaster/3.0/vts/functional/keystore_tags_utils.cpp
@@ -0,0 +1,50 @@
+/*
+**
+** 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.
+*/
+
+#include "keymaster_tags.h"
+
+namespace android {
+namespace hardware {
+namespace keymaster {
+namespace V3_0 {
+
+template <typename TagList> struct TagStringifier;
+
+template <typename... Tags> struct TagStringifier<MetaList<Tags...>> {
+    template <TagType tag_type, Tag tag>
+    static TypedTag<tag_type, tag> chooseString(TypedTag<tag_type, tag> ttag, Tag runtime_tag,
+                                                const char** result) {
+        if (tag == runtime_tag) {
+            *result = Tag2String<tag>::value();
+        }
+        return ttag;
+    }
+    static const char* stringify(Tag tag) {
+        const char* result = "unknown tag";
+        [](Tags&&...) {}(chooseString(Tags(), tag, &result)...);
+        return result;
+    }
+};
+
+const char* stringifyTag(Tag tag) {
+    return TagStringifier<all_tags_t>::stringify(tag);
+}
+
+}  // namespace V3_0
+}  // namespace keymaster
+}  // namespace hardware
+}  // namespace android
diff --git a/keymaster/3.0/vts/functional/openssl_utils.h b/keymaster/3.0/vts/functional/openssl_utils.h
new file mode 100644
index 0000000..2eba9ba
--- /dev/null
+++ b/keymaster/3.0/vts/functional/openssl_utils.h
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+template <typename T, void (*F)(T*)> struct UniquePtrDeleter {
+    void operator()(T* p) const { F(p); }
+};
+
+typedef UniquePtrDeleter<EVP_PKEY, EVP_PKEY_free> EVP_PKEY_Delete;
+
+#define MAKE_OPENSSL_PTR_TYPE(type)                                                                \
+    typedef std::unique_ptr<type, UniquePtrDeleter<type, type##_free>> type##_Ptr;
+
+MAKE_OPENSSL_PTR_TYPE(ASN1_OBJECT)
+MAKE_OPENSSL_PTR_TYPE(EVP_PKEY)
+MAKE_OPENSSL_PTR_TYPE(RSA)
+MAKE_OPENSSL_PTR_TYPE(X509)
+MAKE_OPENSSL_PTR_TYPE(BN_CTX)
+
+typedef std::unique_ptr<BIGNUM, UniquePtrDeleter<BIGNUM, BN_free>> BIGNUM_Ptr;
+
+inline const EVP_MD* openssl_digest(android::hardware::keymaster::V3_0::Digest digest) {
+    switch (digest) {
+    case android::hardware::keymaster::V3_0::Digest::NONE:
+        return nullptr;
+    case android::hardware::keymaster::V3_0::Digest::MD5:
+        return EVP_md5();
+    case android::hardware::keymaster::V3_0::Digest::SHA1:
+        return EVP_sha1();
+    case android::hardware::keymaster::V3_0::Digest::SHA_2_224:
+        return EVP_sha224();
+    case android::hardware::keymaster::V3_0::Digest::SHA_2_256:
+        return EVP_sha256();
+    case android::hardware::keymaster::V3_0::Digest::SHA_2_384:
+        return EVP_sha384();
+    case android::hardware::keymaster::V3_0::Digest::SHA_2_512:
+        return EVP_sha512();
+    }
+    return nullptr;
+}
diff --git a/light/2.0/types.hal b/light/2.0/types.hal
index cc2ec32..27b67e0 100644
--- a/light/2.0/types.hal
+++ b/light/2.0/types.hal
@@ -24,17 +24,17 @@
 };
 
 enum Flash : int32_t {
-    /*
+    /**
      * Keep the light steady on or off.
      */
     NONE,
 
-    /*
+    /**
      * Flash the light at specified rate.
      */
     TIMED,
 
-    /*
+    /**
      * Flash the light using hardware assist.
      */
     HARDWARE,
@@ -77,7 +77,7 @@
     LOW_PERSISTENCE,
 };
 
-/*
+/**
  * These light IDs correspond to logical lights, not physical.
  * So for example, if your INDICATOR light is in line with your
  * BUTTONS, it might make sense to also light the INDICATOR
diff --git a/memtrack/1.0/IMemtrack.hal b/memtrack/1.0/IMemtrack.hal
index ae9d960..a329032 100644
--- a/memtrack/1.0/IMemtrack.hal
+++ b/memtrack/1.0/IMemtrack.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.memtrack@1.0;
 
-/*
+/**
  * The Memory Tracker HAL is designed to return information about
  * device-specific memory usage.
  * The primary goal is to be able to track memory that is not
@@ -30,7 +30,7 @@
  * setup actions and is called once before any calls to getMemory().
  */
 interface IMemtrack {
-    /*
+    /**
      * getMemory() populates MemtrackRecord vector with the sizes of memory
      * plus associated flags for that memory.
      *
diff --git a/memtrack/1.0/types.hal b/memtrack/1.0/types.hal
index 3d702b3..189312a 100644
--- a/memtrack/1.0/types.hal
+++ b/memtrack/1.0/types.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.memtrack@1.0;
 
-/*
+/**
  * SMAPS_ACCOUNTED/SMAPS_UNACCOUNTED
  * Flags to differentiate memory that can already be accounted for in
  * /proc/<pid>/smaps,
@@ -56,7 +56,7 @@
     SECURE = 1 << 9,
 };
 
-/* Tags which define the usage of the memory buffers. */
+/** Tags which define the usage of the memory buffers. */
 enum MemtrackType : uint32_t {
     OTHER = 0,
     GL = 1,
@@ -79,7 +79,7 @@
  */
 struct MemtrackRecord {
     uint64_t sizeInBytes;
-    /*
+    /**
      * This is the bitfield for the MemtrackFlag indicating all the flags that
      * are valid for this record.
      */
diff --git a/power/1.0/IPower.hal b/power/1.0/IPower.hal
index 6cba42a..250f645 100644
--- a/power/1.0/IPower.hal
+++ b/power/1.0/IPower.hal
@@ -15,12 +15,12 @@
  */
 package android.hardware.power@1.0;
 
-/*
+/**
  * Constructor for the interface performs power management setup actions at
  * runtime startup, such as to set default cpufreq parameters.
  */
 interface IPower {
-    /*
+    /**
      * setInteractive() performs power management actions upon the
      * system entering interactive state (that is, the system is awake
      * and ready for interaction, often with UI devices such as
@@ -49,7 +49,7 @@
      */
     setInteractive(bool interactive);
 
-    /*
+    /**
      * powerHint() is called to pass hints on power requirements which
      * may result in adjustment of power/performance parameters of the
      * cpufreq governor and other controls.
@@ -62,7 +62,7 @@
      */
     powerHint(PowerHint hint, int32_t data);
 
-    /*
+    /**
      * setFeature() is called to turn on or off a particular feature
      * depending on the state parameter.
      *
@@ -71,7 +71,7 @@
      */
     setFeature(Feature feature, bool activate);
 
-    /*
+    /**
      * Platform-level sleep state stats:
      * Report cumulative info on the statistics on platform-level sleep states
      * since boot.
diff --git a/power/1.0/types.hal b/power/1.0/types.hal
index debdc35..f839283 100644
--- a/power/1.0/types.hal
+++ b/power/1.0/types.hal
@@ -15,9 +15,9 @@
  */
 package android.hardware.power@1.0;
 
-/* Power hint identifiers passed to powerHint() */
+/** Power hint identifiers passed to powerHint() */
 enum PowerHint : uint32_t {
-   /*
+   /**
     * Foreground app has started or stopped requesting a VSYNC pulse
     * from SurfaceFlinger. If the app has started requesting VSYNC
     * then CPU and GPU load is expected soon, and it may be appropriate
@@ -28,7 +28,7 @@
     VSYNC = 0x00000001,
 
 
-   /*
+   /**
     * User is interacting with the device, for example, touchscreen
     * events are incoming. CPU and GPU load may be expected soon,
     * and it may be appropriate to raise speeds of CPU, memory bus,
@@ -38,13 +38,14 @@
     INTERACTION = 0x00000002,
 
 
-    /* DO NOT USE VIDEO_ENCODE/_DECODE!  They will be removed in
+    /**
+     * DO NOT USE VIDEO_ENCODE/_DECODE!  They will be removed in
      * KLP.
      */
     VIDEO_ENCODE = 0x00000003,
     VIDEO_DECODE = 0x00000004,
 
-   /*
+   /**
     * Low power mode is activated or deactivated. Low power mode
     * is intended to save battery at the cost of performance. The data
     * parameter is non-zero when low power mode is activated, and zero
@@ -52,7 +53,7 @@
     */
     LOW_POWER = 0x00000005,
 
-   /*
+   /**
     * Sustained Performance mode is actived or deactivated. Sustained
     * performance mode is intended to provide a consistent level of
     * performance for a prolonged amount of time. The data parameter is
@@ -61,7 +62,7 @@
     */
     SUSTAINED_PERFORMANCE = 0x00000006,
 
-   /*
+   /**
     * VR Mode is activated or deactivated. VR mode is intended to
     * provide minimum guarantee for performance for the amount of time the
     * device can sustain it. The data parameter is non-zero when the mode
@@ -69,7 +70,7 @@
     */
     VR_MODE = 0x00000007,
 
-   /*
+   /**
     * This hint indicates that an application has been launched. Can be used
     * for device specific optimizations during application launch. The data
     * parameter is non-zero when the application starts to launch and zero when
@@ -79,7 +80,7 @@
 };
 
 enum Feature : uint32_t {
-    /*
+    /**
      * Enabling/Disabling this feature will allow/disallow the system
      * to wake up by tapping the screen twice.
      */
@@ -90,7 +91,7 @@
     SUCCESS = 0,
     FILESYSTEM_ERROR = 1
 };
-/*
+/**
  * Platform-level sleep state stats:
  * PowerStateVoter struct is useful for describing the individual voters
  * when a Platform-level sleep state is chosen by aggregation of votes from
@@ -100,24 +101,24 @@
  * entering the lowest Platform-level sleep state.
  */
 struct PowerStateVoter {
-    /*
+    /**
      * Name of the voter.
      */
      string name;
 
-    /*
+    /**
      * Total time in msec the voter voted for the platform sleep state since
      * boot.
      */
      uint64_t totalTimeInMsecVotedForSinceBoot;
 
-    /*
+    /**
      * Number of times the voter voted for the platform sleep state since boot.
      */
      uint64_t totalNumberOfTimesVotedSinceBoot;
 };
 
-/*
+/**
  * Platform-level sleep state stats:
  * PowerStatePlatformSleepState represents the Platform-level sleep state
  * the device is capable of getting into.
@@ -125,27 +126,27 @@
  * SoCs usually have more than one Platform-level sleep state.
  */
 struct PowerStatePlatformSleepState {
-    /*
+    /**
      * Platform-level Sleep state name.
      */
     string name;
 
-    /*
+    /**
      * Time spent in msec at this platform-level sleep state since boot.
      */
     uint64_t residencyInMsecSinceBoot;
 
-    /*
+    /**
      * Total number of times system entered this state.
      */
     uint64_t totalTransitions;
 
-    /*
+    /**
      * This platform-level sleep state can only be reached during system suspend
      */
     bool supportedOnlyInSuspend;
 
-    /*
+    /**
      * voters is useful if the Platform-level sleep state
      * is chosen by aggregation votes from multiple clients/system conditions.
      * All the voters have to say yes or all the system conditions need to be
diff --git a/renderscript/1.0/default/Context.cpp b/renderscript/1.0/default/Context.cpp
index ef17b463..389b6e7 100644
--- a/renderscript/1.0/default/Context.cpp
+++ b/renderscript/1.0/default/Context.cpp
@@ -63,7 +63,7 @@
 Return<void> Context::allocationAdapterOffset(Allocation alloc, const hidl_vec<uint32_t>& offsets) {
     RsAllocation _alloc = hidl_to_rs<RsAllocation>(alloc);
     const hidl_vec<uint32_t>& _offsets = offsets;
-    Device::getHal().AllocationAdapterOffset(mContext, _alloc, _offsets.data(), _offsets.size());
+    Device::getHal().AllocationAdapterOffset(mContext, _alloc, _offsets.data(), _offsets.size() * sizeof(uint32_t));
     return Void();
 }
 
@@ -552,7 +552,7 @@
     std::vector<RsScriptKernelID> _dstK    = hidl_to_rs<RsScriptKernelID>(dstK,    [](ScriptFieldID val) { return hidl_to_rs<RsScriptKernelID>(val); });
     std::vector<RsScriptFieldID>  _dstF    = hidl_to_rs<RsScriptFieldID>(dstF,     [](ScriptFieldID val) { return hidl_to_rs<RsScriptFieldID>(val); });
     std::vector<RsType>           _types   = hidl_to_rs<RsType>(types,             [](Type val) { return hidl_to_rs<RsType>(val); });
-    RsScriptGroup _scriptGroup = Device::getHal().ScriptGroupCreate(mContext, _kernels.data(), _kernels.size(), _srcK.data(), _srcK.size(), _dstK.data(), _dstK.size(), _dstF.data(), _dstF.size(), _types.data(), _types.size());
+    RsScriptGroup _scriptGroup = Device::getHal().ScriptGroupCreate(mContext, _kernels.data(), _kernels.size() * sizeof(RsScriptKernelID), _srcK.data(), _srcK.size() * sizeof(RsScriptKernelID), _dstK.data(), _dstK.size() * sizeof(RsScriptKernelID), _dstF.data(), _dstF.size() * sizeof(RsScriptFieldID), _types.data(), _types.size() * sizeof(RsType));
     return rs_to_hidl<ScriptGroup>(_scriptGroup);
 }
 
@@ -725,7 +725,7 @@
     size_t _len = data.size();
     RsElement _ve = hidl_to_rs<RsElement>(ve);
     const uint32_t* _dimsPtr = dims.data();
-    size_t _dimLen = dims.size();
+    size_t _dimLen = dims.size() * sizeof(uint32_t);
     Device::getHal().ScriptSetVarVE(mContext, _vs, _slot, _dataPtr, _len, _ve, _dimsPtr, _dimLen);
     return Void();
 }
diff --git a/renderscript/1.0/vts/functional/VtsCopyTests.cpp b/renderscript/1.0/vts/functional/VtsCopyTests.cpp
index 77217cb..168e681 100644
--- a/renderscript/1.0/vts/functional/VtsCopyTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsCopyTests.cpp
@@ -43,9 +43,7 @@
     context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
     context->allocation1DRead(allocation, 0, 0, (uint32_t)dataOut.size(), (Ptr)dataOut.data(),
                               (Size)dataOut.size()*sizeof(float));
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -76,9 +74,7 @@
                                _data, 0);
     context->allocation2DRead(allocation, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 128, 128,
                               (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(float), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -108,9 +104,7 @@
     context->allocation3DWrite(allocation, 0, 0, 0, 0, 32, 32, 32, _data, 0);
     context->allocation3DRead(allocation, 0, 0, 0, 0, 32, 32, 32, (Ptr)dataOut.data(),
                               (Size)dataOut.size()*sizeof(float), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -139,18 +133,14 @@
                                                                 AllocationMipmapControl::NONE,
                                                                 _data,
                                                                 (int)AllocationUsageType::SCRIPT);
-    EXPECT_NE(allocation, Allocation(0));
+    EXPECT_NE(Allocation(0), allocation);
 
     context->allocationCopyToBitmap(allocation, (Ptr)dataOut1.data(),
                                     (Size)dataOut1.size()*sizeof(float));
-    bool same1 = std::all_of(dataOut1.begin(), dataOut1.end(),
-                             [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same1);
+    EXPECT_EQ(dataIn, dataOut1);
 
     context->allocationRead(allocation, (Ptr)dataOut2.data(), (Size)dataOut2.size()*sizeof(float));
-    bool same2 = std::all_of(dataOut2.begin(), dataOut2.end(),
-                             [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same2);
+    EXPECT_EQ(dataIn, dataOut2);
 }
 
 /*
@@ -368,24 +358,20 @@
 /*
  * This test creates a complex element type (uint8_t, uint32_t) out of known
  * elements. It then verifies the element structure was created correctly.
- * Finally, the test creates a 128-wide, 1-dimension allocation of this type
- * and transfers memory to and from this structure.
+ * Finally, the test creates a 1-wide, 1-dimension allocation of this type
+ * and transfers memory to and from a single cell of this Allocation.
  *
  * Calls: elementCreate, elementComplexCreate, elementGetSubElements,
  * typeCreate, allocationCreateTyped, allocationElementWrite,
  * allocationElementRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, ComplexElementTest) {
     Element element1 = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
     Element element2 = context->elementCreate(DataType::UNSIGNED_32, DataKind::USER, false, 1);
 
     hidl_vec<Element> eins = {element1, element2};
     hidl_vec<hidl_string> names = {hidl_string("first"), hidl_string("second")};
-    hidl_vec<Size> arraySizesPtr = {sizeof(uint8_t), sizeof(uint32_t)};
+    hidl_vec<Size> arraySizesPtr = {1, 1};
     Element element3 = context->elementComplexCreate(eins, names, arraySizesPtr);
     EXPECT_NE(Element(0), element3);
 
@@ -400,28 +386,25 @@
                                                         namesOut.push_back(_names[1]);
                                                         arraySizesOut = _arraySizes;
                                                     });
-    EXPECT_NE(Element(0), ids[0]);
-    EXPECT_NE(Element(0), ids[1]);
+    EXPECT_EQ(element1, ids[0]);
+    EXPECT_EQ(element2, ids[1]);
     EXPECT_EQ("first", namesOut[0]);
     EXPECT_EQ("second", namesOut[1]);
-    EXPECT_EQ(sizeof(uint8_t), arraySizesOut[0]);
-    EXPECT_EQ(sizeof(uint32_t), arraySizesOut[1]);
+    EXPECT_EQ(Size(1), arraySizesOut[0]);
+    EXPECT_EQ(Size(1), arraySizesOut[1]);
 
-    // 128 x (uint8_t, uint32_t)
-    Type type = context->typeCreate(element3, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
-    // 128 x (uint8_t, uint32_t)
+    // 1 x (uint8_t, uint32_t)
+    Type type = context->typeCreate(element3, 1, 0, 0, false, false, YuvFormat::YUV_NONE);
+    // 1 x (uint8_t, uint32_t)
     Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
-    std::vector<uint32_t> dataIn(128), dataOut(128);
+    std::vector<uint32_t> dataIn(1), dataOut(1);
     std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
     context->allocationElementWrite(allocation, 0, 0, 0, 0, _data, 1);
     context->allocationElementRead(allocation, 0, 0, 0, 0, (Ptr)dataOut.data(),
                                    (Size)dataOut.size()*sizeof(uint32_t), 1);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](uint32_t x){ static uint32_t val = 0; return x == val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
-*/
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
index fc1b7e4..527fef0 100644
--- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
+++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
@@ -32,6 +32,7 @@
 using ::android::hardware::renderscript::V1_0::AllocationCubemapFace;
 using ::android::hardware::renderscript::V1_0::AllocationMipmapControl;
 using ::android::hardware::renderscript::V1_0::AllocationUsageType;
+using ::android::hardware::renderscript::V1_0::Closure;
 using ::android::hardware::renderscript::V1_0::IContext;
 using ::android::hardware::renderscript::V1_0::IDevice;
 using ::android::hardware::renderscript::V1_0::ContextType;
@@ -62,7 +63,26 @@
 using ::android::hardware::hidl_string;
 using ::android::sp;
 
-// bitcode variables
+// bitcode slots
+extern const int mExportVarIdx_var_int;
+extern const int mExportVarIdx_var_long;
+extern const int mExportVarIdx_var_float;
+extern const int mExportVarIdx_var_double;
+extern const int mExportVarIdx_var_allocation;
+extern const int mExportVarIdx_var_uint32_t;
+extern const int mExportVarIdx_var_point2;
+extern const int mExportVarIdx_var_int_ptr;
+// bitcode invoke slots
+//extern const int mExportForEachIdx_root;
+extern const int mExportForEachIdx_increment;
+// bitcode reduce slots
+extern const int mExportReduceIdx_summation;
+// bitcode invoke slots
+extern const int mExportFuncIdx_function;
+extern const int mExportFuncIdx_functionV;
+extern const int mExportFuncIdx_setBuffer;
+extern const int mExportFuncIdx_setAllocation;
+// bitcode
 typedef signed char int8_t;
 extern const int8_t bitCode[];
 extern const int bitCodeLength;
diff --git a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
index c2b3354..39d63ca 100644
--- a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "VtsHalRenderscriptV1_0TargetTest.h"
+#include <system/window.h>
 
 /*
  * ContextCreateAndDestroy:
@@ -81,7 +82,7 @@
                                           elementMetadata = _metadata; });
     EXPECT_EQ(DataType::FLOAT_32, (DataType)elementMetadata[0]);
     EXPECT_EQ(DataKind::USER, (DataKind)elementMetadata[1]);
-    EXPECT_EQ(false, ((uint32_t)elementMetadata[2] == 1) ? true : false);
+    EXPECT_EQ(false, elementMetadata[2]);
     EXPECT_EQ(1u, (uint32_t)elementMetadata[3]);
     EXPECT_EQ(0u, (uint32_t)elementMetadata[4]);
 
@@ -134,21 +135,17 @@
  * Calls: elementCreate, typeCreate, allocationCreateTyped, allocation2DWrite,
  * allocationGetNativeWindow, allocationSetNativeWindow, allocationIoSend,
  * allocationIoReceive, allocation2DRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, NativeWindowIoTest) {
     // uint8x4
     Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 4);
     // 512 x 512 x uint8x4
     Type type = context->typeCreate(element, 512, 512, 0, false, false, YuvFormat::YUV_NONE);
     std::vector<uint32_t> dataIn(512*512), dataOut(512*512);
-    std::generate(dataIn.begin(), dataIn.end(), [](){ static int val = 0; return (uint32_t)val++; });
+    std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
-    // 512 x 512 x float1
+    // 512 x 512 x uint8x4
     Allocation allocationRecv = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                                (int)(AllocationUsageType::SCRIPT
                                                                | AllocationUsageType::IO_INPUT),
@@ -157,21 +154,20 @@
                                                                (int)(AllocationUsageType::SCRIPT
                                                                | AllocationUsageType::IO_OUTPUT),
                                                                (Ptr)nullptr);
-    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
-                               _data, 0);
     NativeWindow nativeWindow = context->allocationGetNativeWindow(allocationRecv);
     EXPECT_NE(NativeWindow(0), nativeWindow);
 
+    ((ANativeWindow *)nativeWindow)->incStrong(nullptr);
+
     context->allocationSetNativeWindow(allocationSend, nativeWindow);
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
     context->allocationIoSend(allocationSend);
     context->allocationIoReceive(allocationRecv);
     context->allocation2DRead(allocationRecv, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
                               (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint32_t), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                             [](uint32_t x){ static int val = 0; return x == (uint32_t)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
-*/
 
 /*
  * Three allocations are created, two with IO_INPUT and one with IO_OUTPUT. The
@@ -180,21 +176,17 @@
  * Calls: elementCreate, typeCreate, allocationCreateTyped,
  * allocationCreateFromBitmap, allocationSetupBufferQueue,
  * allocationShareBufferQueue
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, BufferQueueTest) {
-    // float1
-    Element element = context->elementCreate(DataType::FLOAT_32, DataKind::USER, false, 1);
-    // 512 x 512 x float1
+    // uint8x4
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 4);
+    // 512 x 512 x uint8x4
     Type type = context->typeCreate(element, 512, 512, 0, false, false, YuvFormat::YUV_NONE);
-    std::vector<float> dataIn(512*512), dataOut1(512*512), dataOut2(512*512);
-    std::generate(dataIn.begin(), dataIn.end(), [](){ static int val = 0; return (float)val++; });
+    std::vector<uint32_t> dataIn(512*512), dataOut1(512*512), dataOut2(512*512);
+    std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
-    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(float));
-    // 512 x 512 x float1
+    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
+    // 512 x 512 x uint8x4
     Allocation allocationRecv1 = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                                 (int)(AllocationUsageType::SCRIPT
                                                                 | AllocationUsageType::IO_INPUT),
@@ -203,16 +195,37 @@
                                                                 (int)(AllocationUsageType::SCRIPT
                                                                 | AllocationUsageType::IO_INPUT),
                                                                 (Ptr)nullptr);
-    Allocation allocationSend = context->allocationCreateFromBitmap(type,
-                                                                    AllocationMipmapControl::NONE,
-                                                                    _data,
-                                                                   (int)(AllocationUsageType::SCRIPT
-                                                                 | AllocationUsageType::IO_OUTPUT));
+    Allocation allocationSend  = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                                (int)(AllocationUsageType::SCRIPT
+                                                                | AllocationUsageType::IO_INPUT),
+                                                                (Ptr)nullptr);
     context->allocationSetupBufferQueue(allocationRecv1, 2);
-    context->allocationShareBufferQueue(allocationRecv1, allocationRecv2);
-    // TODO: test the buffer queue
+    context->allocationShareBufferQueue(allocationRecv2, allocationRecv1);
+
+    NativeWindow nativeWindow1 = context->allocationGetNativeWindow(allocationRecv1);
+    EXPECT_NE(NativeWindow(0), nativeWindow1);
+    NativeWindow nativeWindow2 = context->allocationGetNativeWindow(allocationRecv2);
+    EXPECT_EQ(nativeWindow2, nativeWindow1);
+
+    ((ANativeWindow *)nativeWindow1)->incStrong(nullptr);
+
+    context->allocationSetNativeWindow(allocationSend, nativeWindow1);
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
+    context->allocationIoSend(allocationSend);
+    context->allocationIoReceive(allocationRecv1);
+    context->allocation2DRead(allocationRecv1, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                              (Ptr)dataOut1.data(), (Size)dataOut1.size()*sizeof(uint32_t), 0);
+    EXPECT_EQ(dataIn, dataOut1);
+
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
+    context->allocationIoSend(allocationSend);
+    context->allocationIoReceive(allocationRecv2);
+    context->allocation2DRead(allocationRecv2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                              (Ptr)dataOut2.data(), (Size)dataOut2.size()*sizeof(uint32_t), 0);
+    EXPECT_EQ(dataIn, dataOut2);
 }
-*/
 
 /*
  * This test sets up the message queue, sends a message, peeks at the message,
@@ -220,33 +233,29 @@
  *
  * Calls: contextInitToClient, contextSendMessage, contextPeekMessage,
  * contextGetMessage, contextDeinitToClient, contextLog
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, ContextMessageTest) {
     context->contextInitToClient();
 
-    std::string messageOut = "correct";
+    const char * message = "correct";
+    std::vector<char> messageSend(message, message + sizeof(message));
     hidl_vec<uint8_t> _data;
-    _data.setToExternal((uint8_t*)const_cast<char*>(messageOut.c_str()), messageOut.length());
+    _data.setToExternal((uint8_t*)messageSend.data(), messageSend.size());
     context->contextSendMessage(0, _data);
     MessageToClientType messageType;
     size_t size;
     uint32_t subID;
     context->contextPeekMessage([&](MessageToClientType _type, Size _size, uint32_t _subID){
                                 messageType = _type; size = (uint32_t)_size; subID = _subID; });
-    std::vector<char> messageIn(size, '\0');
-    context->contextGetMessage(messageIn.data(), messageIn.size(),
+    std::vector<char> messageRecv(size, '\0');
+    context->contextGetMessage(messageRecv.data(), messageRecv.size(),
                                [&](MessageToClientType _type, Size _size){
                                messageType = _type; size = (uint32_t)_size; });
-    EXPECT_EQ(messageOut, messageIn.data());
+    EXPECT_EQ(messageSend, messageRecv);
 
     context->contextDeinitToClient();
     context->contextLog();
 }
-*/
 
 /*
  * Call through a bunch of APIs and make sure they don’t crash. Assign the name
diff --git a/renderscript/1.0/vts/functional/VtsScriptTests.cpp b/renderscript/1.0/vts/functional/VtsScriptTests.cpp
index 9531e19..6bb375a 100644
--- a/renderscript/1.0/vts/functional/VtsScriptTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsScriptTests.cpp
@@ -46,27 +46,30 @@
     EXPECT_NE(Script(0), script);
 
     // arg tests
-    context->scriptSetVarI(script, 0, 100);
+    context->scriptSetVarI(script, mExportVarIdx_var_int, 100);
     int resultI = 0;
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               resultI = *((int*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){ resultI = *((int*)_data.data()); });
     EXPECT_EQ(100, resultI);
 
-    context->scriptSetVarJ(script, 1, 101l);
+    context->scriptSetVarJ(script, mExportVarIdx_var_long, 101l);
     int resultJ = 0;
-    context->scriptGetVarV(script, 1, sizeof(long), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultJ = *((long*)_data.data()); });
-    EXPECT_EQ(101, resultJ);
+    EXPECT_EQ(101l, resultJ);
 
-    context->scriptSetVarF(script, 2, 102.0f);
+    context->scriptSetVarF(script, mExportVarIdx_var_float, 102.0f);
     int resultF = 0.0f;
-    context->scriptGetVarV(script, 2, sizeof(float), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultF = *((float*)_data.data()); });
     EXPECT_EQ(102.0f, resultF);
 
-    context->scriptSetVarD(script, 3, 103.0);
+    context->scriptSetVarD(script, mExportVarIdx_var_double, 103.0);
     int resultD = 0.0;
-    context->scriptGetVarV(script, 3, sizeof(double), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultD = *((double*)_data.data()); });
     EXPECT_EQ(103.0, resultD);
 
@@ -79,23 +82,21 @@
                                                              (int)AllocationUsageType::SCRIPT,
                                                              (Ptr)nullptr);
     Allocation allocationOut = Allocation(0);
-    context->scriptSetVarObj(script, 4, (ObjectBase)allocationIn);
-    context->scriptGetVarV(script, 4, sizeof(ObjectBase), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptSetVarObj(script, mExportVarIdx_var_allocation, (ObjectBase)allocationIn);
+    context->scriptGetVarV(script, mExportVarIdx_var_allocation, sizeof(ObjectBase),
+                           [&](const hidl_vec<uint8_t>& _data){
                                allocationOut = (Allocation) *((ObjectBase*)_data.data()); });
     EXPECT_EQ(allocationOut, allocationIn);
 
-    std::vector<int> arrayIn = {500, 501, 502, 503};
-    std::vector<int> arrayOut(4);
-    hidl_vec<uint8_t> arrayData;
-    arrayData.setToExternal((uint8_t*)arrayIn.data(), arrayIn.size()*sizeof(int));
-    context->scriptSetVarV(script, 5, arrayData);
-    context->scriptGetVarV(script, 5, 4*sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               arrayOut = std::vector<int>((int*)_data.data(),
-                                                           (int*)_data.data() + 4); });
-    EXPECT_EQ(500, arrayOut[0]);
-    EXPECT_EQ(501, arrayOut[1]);
-    EXPECT_EQ(502, arrayOut[2]);
-    EXPECT_EQ(503, arrayOut[3]);
+    uint32_t valueV = 104u;
+    hidl_vec<uint8_t> _dataV;
+    _dataV.setToExternal((uint8_t*)&valueV, sizeof(uint32_t));
+    context->scriptSetVarV(script, mExportVarIdx_var_uint32_t, _dataV);
+    uint32_t resultV = 0u;
+    context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultV = *((uint32_t*)_data.data()); });
+    EXPECT_EQ(104u, resultV);
 
     std::vector<int> dataVE = {1000, 1001};
     std::vector<uint32_t> dimsVE = {1};
@@ -104,12 +105,13 @@
     hidl_vec<uint32_t> _dimsVE;
     _dataVE.setToExternal((uint8_t*)dataVE.data(), dataVE.size()*sizeof(int));
     _dimsVE.setToExternal((uint32_t*)dimsVE.data(), dimsVE.size());
-    // intx2
+    // intx2 to represent point2 which is {int, int}
     Element elementVE = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 2);
-    context->scriptSetVarVE(script, 6, _dataVE, elementVE, _dimsVE);
-    context->scriptGetVarV(script, 6, 2*sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               outVE = std::vector<int>((int*)_data.data(),
-                                                        (int*)_data.data() + 2); });
+    context->scriptSetVarVE(script, mExportVarIdx_var_point2, _dataVE, elementVE, _dimsVE);
+    context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               outVE = std::vector<int>(
+                                   (int*)_data.data(), (int*)_data.data() + 2); });
     EXPECT_EQ(1000, outVE[0]);
     EXPECT_EQ(1001, outVE[1]);
 }
@@ -127,19 +129,47 @@
     EXPECT_NE(Script(0), script);
 
     // invoke test
-    int function_res = 0;
-    context->scriptInvoke(script, 0);
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               function_res = *((int*)_data.data()); });
-    EXPECT_NE(100, function_res);
+    int resultI = 0;
+    long resultJ = 0l;
+    float resultF = 0.0f;
+    double resultD = 0.0;
+    uint32_t resultV = 0u;
+    std::vector<int> resultVE(2);
+    context->scriptInvoke(script, mExportFuncIdx_function);
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){ resultI = *((int*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultJ = *((long*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultF = *((float*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultD = *((double*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultV = *((uint32_t*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultVE = std::vector<int>(
+                                   (int*)_data.data(), (int*)_data.data() + 2); });
+    EXPECT_EQ(1, resultI);
+    EXPECT_EQ(2l, resultJ);
+    EXPECT_EQ(3.0f, resultF);
+    EXPECT_EQ(4.0, resultD);
+    EXPECT_EQ(5u, resultV);
+    EXPECT_EQ(6, resultVE[0]);
+    EXPECT_EQ(7, resultVE[1]);
 
     // invokeV test
     int functionV_arg = 5;
     int functionV_res = 0;
     hidl_vec<uint8_t> functionV_data;
     functionV_data.setToExternal((uint8_t*)&functionV_arg, sizeof(int));
-    context->scriptInvokeV(script, 1, functionV_data);
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptInvokeV(script, mExportFuncIdx_functionV, functionV_data);
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
                                functionV_res = *((int*)_data.data()); });
     EXPECT_EQ(5, functionV_res);
 }
@@ -161,8 +191,9 @@
     Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
     // 64 x uint8_t
     Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE);
-    std::vector<uint8_t> dataIn(64), dataOut(64);
+    std::vector<uint8_t> dataIn(64), dataOut(64), expected(64);
     std::generate(dataIn.begin(), dataIn.end(), [](){ static uint8_t val = 0; return val++; });
+    std::generate(expected.begin(), expected.end(), [](){ static uint8_t val = 1; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size());
     // 64 x float1
@@ -176,11 +207,9 @@
     hidl_vec<Allocation> vains;
     vains.setToExternal(&allocation, 1);
     hidl_vec<uint8_t> params;
-    context->scriptForEach(script, 1, vains, vout, params, nullptr);
+    context->scriptForEach(script, mExportForEachIdx_increment, vains, vout, params, nullptr);
     context->allocationRead(vout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](uint8_t x){ static uint8_t val = 1; return x == val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(expected, dataOut);
 }
 
 /*
@@ -215,7 +244,7 @@
     context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
     hidl_vec<Allocation> vains;
     vains.setToExternal(&allocation, 1);
-    context->scriptReduce(script, 0, vains, vaout, nullptr);
+    context->scriptReduce(script, mExportReduceIdx_summation, vains, vaout, nullptr);
     context->contextFinish();
     context->allocationRead(vaout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int));
     // sum of 0, 1, 2, ..., 62, 63
@@ -228,38 +257,34 @@
  * RenderScript script, represented in the bitcode.
  *
  * Calls: scriptCCreate, elementCreate, typeCreate, allocationCreateTyped,
- * allocationGetPointer, scriptBindAllocation
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
+ * scriptSetVarV, scriptBindAllocation, allocationRead
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptBindTest) {
     hidl_vec<uint8_t> bitcode;
     bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
     Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
     EXPECT_NE(Script(0), script);
 
-    // uint8_t
+    // in32
     Element element = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 1);
-    // 64 x uint8_t
+    // 64 x int32
     Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE);
-    // 64 x float1
+    // 64 x int32
     Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
-    Ptr dataPtr1, dataPtr2;
-    Size stride;
-    context->allocationGetPointer(allocation, 0, AllocationCubemapFace::POSITIVE_X, 0,
-                                  [&](Ptr _dataPtr, Size _stride){ dataPtr1 = _dataPtr;
-                                      stride = _stride; });
-    context->scriptBindAllocation(script, allocation, 7);
-    context->allocationGetPointer(allocation, 0, AllocationCubemapFace::POSITIVE_X, 0,
-                                  [&](Ptr _dataPtr, Size _stride){ dataPtr2 = _dataPtr;
-                                      stride = _stride; });
-    EXPECT_NE(dataPtr1, dataPtr2);
+    std::vector<int> dataIn(64), dataOut(64), expected(64, 5);
+    hidl_vec<uint8_t> _data;
+    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(int));
+    context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
+    context->scriptBindAllocation(script, allocation, mExportVarIdx_var_int_ptr);
+    int dim = 64;
+    hidl_vec<uint8_t> _dim;
+    _dim.setToExternal((uint8_t*)&dim, sizeof(int));
+    context->scriptInvokeV(script, mExportFuncIdx_setBuffer, _dim);
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int));
+    EXPECT_EQ(expected, dataOut);
 }
-*/
 
 /*
  * This test groups together two RenderScript intrinsic kernels to run one after
@@ -269,38 +294,25 @@
  * ScriptGroup.
  *
  * Calls: elementCreate, typeCreate, allocationCreateTyped, allocation2DWrite,
- * scriptIntrinsicCreate, scriptKernelIDCreate, scriptGroupCreate,
- * scriptGroupSetInput, scriptGroupSetOutput, scriptGroupExecute,
- * allocation2DRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
+ * scriptIntrinsicCreate, scriptKernelIDCreate, scriptFieldIDCreate,
+ * scriptGroupCreate, scriptGroupSetOutput, scriptGroupExecute, allocation2DRead
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptGroupTest) {
-    //std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*3, 0);
-    std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*4, 0);
+    std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*4, 0), zeros(256*256*4, 0);
     hidl_vec<uint8_t> _dataIn, _dataOut;
     _dataIn.setToExternal(dataIn.data(), dataIn.size());
-    _dataOut.setToExternal(dataOut.data(), dataIn.size());
+    _dataOut.setToExternal(dataOut.data(), dataOut.size());
 
     // 256 x 256 YUV pixels
     Element element1 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_YUV, true, 1);
-    //Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_420_888);
-    Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_NV21);
+    Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_420_888);
     Allocation allocation1 = context->allocationCreateTyped(type1, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
     context->allocation2DWrite(allocation1, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                                _dataIn, 0);
-    Script yuv2rgb = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_YUV_TO_RGB, element1);
-    EXPECT_NE(Script(0), yuv2rgb);
 
-    ScriptKernelID yuv2rgbKID = context->scriptKernelIDCreate(yuv2rgb, 0, 2);
-    EXPECT_NE(ScriptKernelID(0), yuv2rgbKID);
-
-    // 256 x 256 RGB pixels
-    //Element element2 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_RGB, true, 3);
+    // 256 x 256 RGBA pixels
     Element element2 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_RGBA, true, 4);
     Type type2 = context->typeCreate(element2, 256, 256, 0, false, false, YuvFormat::YUV_NONE);
     Allocation allocation2 = context->allocationCreateTyped(type2, AllocationMipmapControl::NONE,
@@ -308,83 +320,170 @@
                                                            (Ptr)nullptr);
     context->allocation2DWrite(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                                _dataOut, 0);
+
+    // create scripts
+    Script yuv2rgb = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_YUV_TO_RGB, element1);
+    EXPECT_NE(Script(0), yuv2rgb);
+
+    ScriptKernelID yuv2rgbKID = context->scriptKernelIDCreate(yuv2rgb, 0, 2);
+    EXPECT_NE(ScriptKernelID(0), yuv2rgbKID);
+
     Script blur = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_BLUR, element2);
     EXPECT_NE(Script(0), blur);
 
     ScriptKernelID blurKID = context->scriptKernelIDCreate(blur, 0, 2);
     EXPECT_NE(ScriptKernelID(0), blurKID);
+    ScriptFieldID blurFID = context->scriptFieldIDCreate(blur, 1);
+    EXPECT_NE(ScriptFieldID(0), blurFID);
 
     // ScriptGroup
     hidl_vec<ScriptKernelID> kernels = {yuv2rgbKID, blurKID};
     hidl_vec<ScriptKernelID> srcK = {yuv2rgbKID};
-    hidl_vec<ScriptKernelID> dstK = {blurKID};
-    hidl_vec<ScriptFieldID> dstF = {};
+    hidl_vec<ScriptKernelID> dstK = {ScriptKernelID(0)};
+    hidl_vec<ScriptFieldID> dstF = {blurFID};
     hidl_vec<Type> types = {type2};
     ScriptGroup scriptGroup = context->scriptGroupCreate(kernels, srcK, dstK, dstF, types);
     EXPECT_NE(ScriptGroup(0), scriptGroup);
 
-    context->scriptGroupSetInput(scriptGroup, yuv2rgbKID, allocation1);
+    context->scriptSetVarObj(yuv2rgb, 0, (ObjectBase)allocation1);
     context->scriptGroupSetOutput(scriptGroup, blurKID, allocation2);
     context->scriptGroupExecute(scriptGroup);
+    context->contextFinish();
 
     // verify contents were changed
     context->allocation2DRead(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                               (Ptr)dataOut.data(), (Size)dataOut.size(), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(), [](uint8_t x){ return x != 0; });
-    EXPECT_EQ(true, same);
+    EXPECT_NE(zeros, dataOut);
 }
-*/
 
 /*
  * Similar to the ScriptGroup test, this test verifies the execution flow of
  * RenderScript kernels and invokables.
  *
  * Calls: scriptFieldIDCreate, closureCreate, scriptInvokeIDCreate,
- * invokeClosureCreate, closureSetArg, closureSetGlobal, scriptGroup2Create,
- * scriptGroupExecute
- *
- * This test currently still a work in progress, and should be finished by 3/17.
- * TODO(butlermichael)
+ * invokeClosureCreate, closureSetGlobal, scriptGroup2Create, scriptGroupExecute
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptGroup2Test) {
+    hidl_vec<uint8_t> bitcode;
+    bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
+    Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
+    EXPECT_NE(Script(0), script);
 
-    ScriptFieldID fieldID = context->scriptFieldIDCreate(script, slot);
+    std::vector<uint8_t> dataIn(128, 128), dataOut(128, 0), expected(128, 7+1);
+    hidl_vec<uint8_t> _dataIn, _dataOut;
+    _dataIn.setToExternal(dataIn.data(), dataIn.size());
+
+    // 256 x 256 YUV pixels
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
+    Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
+    Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                           (int)AllocationUsageType::SCRIPT,
+                                                           (Ptr)nullptr);
+    context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn);
+
+    ScriptFieldID fieldID = context->scriptFieldIDCreate(script, mExportVarIdx_var_allocation);
     EXPECT_NE(ScriptFieldID(0), fieldID);
+    ASSERT_NE(ScriptFieldID(0), fieldID);
 
-    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, slot, sig);
-    EXPECT_NE(ScriptKernelID(0), kernelID);
-
-    Allocation returnValue = 0;
-    hidl_vec<ScriptFieldID> fieldIDS = {};
-    hidl_vec<int64_t> values = {};
-    hidl_vec<int32_t> sizes = {};
-    hidl_veC<Closure> depClosures = {};
-    hidl_vec<ScriptFieldID> depFieldIDS = {};
-    Closure closure1 = context->closureCreate(kernelID, returnValue, fieldIDS, values, sizes,
-                                             depClosures, depFieldIDS);
-    EXPECT_NE(Closure(0), closure1);
-
-    ScriptInvokeID invokeID = context->scriptInvokeIDCreate(script, slot);
+    // invoke
+    ScriptInvokeID invokeID = context->scriptInvokeIDCreate(script, mExportFuncIdx_setAllocation);
     EXPECT_NE(ScriptInvokeID(0), invokeID);
+    ASSERT_NE(ScriptInvokeID(0), invokeID);
 
-    hidl_vec<uint8_t> params = {};
-    hidl_vec<ScriptFieldID> fieldsIDS2 = {};
-    hidl_vec<int64_t> values2 = {};
-    hidl_vec<int32_t> sizes2 = {};
-    Closure closure2 = context->invokeClosureCreate(invokeID, params, fieldIDS2, values2, sizes2);
+    int dim = 128;
+    hidl_vec<uint8_t> params;
+    params.setToExternal((uint8_t*)&dim, sizeof(dim));
+    hidl_vec<ScriptFieldID> fieldIDS1 = {fieldID};
+    hidl_vec<int64_t> values1 = {int64_t(0)};
+    hidl_vec<int32_t> sizes1 = {int32_t(0)};
+    Closure closure1 = context->invokeClosureCreate(invokeID, params, fieldIDS1, values1, sizes1);
+    EXPECT_NE(Closure(0), closure1);
+    ASSERT_NE(Closure(0), closure1);
+
+    // kernel
+    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3);
+    EXPECT_NE(ScriptKernelID(0), kernelID);
+    ASSERT_NE(ScriptKernelID(0), kernelID);
+
+    hidl_vec<ScriptFieldID> fieldIDS2 = {ScriptFieldID(0)};
+    hidl_vec<int64_t> values2 = {(int64_t)(intptr_t)allocation};
+    hidl_vec<int32_t> sizes2 = {-1 /* allocation */};
+    hidl_vec<Closure> depClosures2 = {closure1};
+    hidl_vec<ScriptFieldID> depFieldIDS2 = {fieldID};
+    Closure closure2 = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS2,
+                                              values2, sizes2, depClosures2, depFieldIDS2);
     EXPECT_NE(Closure(0), closure2);
+    ASSERT_NE(Closure(0), closure2);
 
-    context->closureSetArg(closure, index, value, size);
-    context->closureSetGlobal(closure, fieldID, value, size);
+    // set argument
+    context->closureSetGlobal(closure1, fieldID, (int64_t)(intptr_t)allocation,
+                              -1 /* allocation */);
 
+    // execute
     hidl_string name = "script_group_2_test";
-    hidl_string cacheDir = "data/local/tmp/";
-    hidl_vec<Closures> closures;
+    hidl_string cacheDir = "/data/local/tmp";
+    hidl_vec<Closure> closures = {closure1, closure2};
     ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures);
     EXPECT_NE(ScriptGroup2(0), scriptGroup2);
+    ASSERT_NE(ScriptGroup2(0), scriptGroup2);
 
     context->scriptGroupExecute(scriptGroup2);
-    // verify script group launched...
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
+    EXPECT_EQ(expected, dataOut);
 }
-*/
+
+/*
+ * Similar to the ScriptGroup test, this test verifies a single kernel can be
+ * called by ScriptGroup with an unbound allocation specified before launch
+ *
+ * Calls: scriptFieldIDCreate, closureCreate, scriptInvokeIDCreate,
+ * invokeClosureCreate, closureSetArg, scriptGroup2Create, scriptGroupExecute
+ */
+TEST_F(RenderscriptHidlTest, ScriptGroup2KernelTest) {
+    hidl_vec<uint8_t> bitcode;
+    bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
+    Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
+    EXPECT_NE(Script(0), script);
+
+    std::vector<uint8_t> dataIn(128, 128), dataOut(128, 0), expected(128, 128 + 1);
+    hidl_vec<uint8_t> _dataIn, _dataOut;
+    _dataIn.setToExternal(dataIn.data(), dataIn.size());
+
+    // 256 x 256 YUV pixels
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
+    Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
+    Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                           (int)AllocationUsageType::SCRIPT,
+                                                           (Ptr)nullptr);
+    context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn);
+
+    // kernel
+    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3);
+    EXPECT_NE(ScriptKernelID(0), kernelID);
+    ASSERT_NE(ScriptKernelID(0), kernelID);
+
+    hidl_vec<ScriptFieldID> fieldIDS = {ScriptFieldID(0)};
+    hidl_vec<int64_t> values = {int64_t(0)};
+    hidl_vec<int32_t> sizes = {int32_t(0)};
+    hidl_vec<Closure> depClosures = {Closure(0)};
+    hidl_vec<ScriptFieldID> depFieldIDS = {ScriptFieldID(0)};
+    Closure closure = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS,
+                                              values, sizes, depClosures, depFieldIDS);
+    EXPECT_NE(Closure(0), closure);
+    ASSERT_NE(Closure(0), closure);
+
+    // set argument
+    context->closureSetArg(closure, 0 /* first argument */, (Ptr)allocation, -1);
+
+    // execute
+    hidl_string name = "script_group_2_test";
+    hidl_string cacheDir = "/data/local/tmp";
+    hidl_vec<Closure> closures = {closure};
+    ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures);
+    EXPECT_NE(ScriptGroup2(0), scriptGroup2);
+    ASSERT_NE(ScriptGroup2(0), scriptGroup2);
+
+    context->scriptGroupExecute(scriptGroup2);
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
+    EXPECT_EQ(expected, dataOut);
+}
diff --git a/renderscript/1.0/vts/functional/bitcode.cpp b/renderscript/1.0/vts/functional/bitcode.cpp
index 72143c9..8a7d542 100644
--- a/renderscript/1.0/vts/functional/bitcode.cpp
+++ b/renderscript/1.0/vts/functional/bitcode.cpp
@@ -15,169 +15,215 @@
  */
 
 /*
-#include "shared.rsh"
-
-// types
-typedef struct Point2 {
-    int x;
-    int y;
-} Point_2;
-
-// variables
-int var_int;
-long var_long;
-float var_float;
-double var_double;
-rs_allocation var_allocation;
-int var_array[4];
-Point_2 var_point2;
-Point_2 *var_point2_ptr;
-
-// invoke
-void function() {
-    var_int = 1;
-    var_long = 2;
-    var_float = 3.0f;
-    var_double = 4.0;
-
-    var_array[0] = 5;
-    var_array[1] = 6;
-    var_array[2] = 7;
-    var_array[3] = 8;
-
-    var_point2.x = 9;
-    var_point2.y = 10;
-}
-
-// invokeV
-void functionV(int arg) {
-    var_int = arg;
-}
-
-// forEach
-uchar RS_KERNEL increment(uchar in) {
-    return in+1;
-}
-
-// reduction
-#pragma rs reduce(summation) accumulator(sumAccumulator) combiner(sumCombiner)
-
-static void sumAccumulator(int* accum, int val) {
-    *accum += val;
-}
-
-static void sumCombiner(int* accum, const int *val) {
-    *accum += *val;
-}
-*/
+ * // This .rs code was used to generate the 32-bit and 64-bit versions of the
+ * // bitcode shown below. It is left in here for reference, as many of the
+ * // variables are used in the the script tests.
+ *
+ * #include "shared.rsh"
+ *
+ * // types
+ * typedef struct Point2 {
+ *     int x;
+ *     int y;
+ * } Point_2;
+ *
+ * // variables
+ * int var_int;
+ * long var_long;
+ * float var_float;
+ * double var_double;
+ * rs_allocation var_allocation;
+ * uint32_t var_uint32_t;
+ * Point_2 var_point2;
+ * int *var_int_ptr;
+ *
+ * // invoke
+ * void function() {
+ *     var_int = 1;
+ *     var_long = 2;
+ *     var_float = 3.0f;
+ *     var_double = 4.0;
+ *     var_uint32_t = 5;
+ *     var_point2.x = 6;
+ *     var_point2.y = 7;
+ * }
+ *
+ * // invokeV
+ * void functionV(int arg) {
+ *     var_int = arg;
+ * }
+ *
+ * // set bound buffer
+ * void setBuffer(int dim) {
+ *     int i;
+ *     for (i = 0; i < dim; ++i) {
+ *         var_int_ptr[i] = 5;
+ *     }
+ * }
+ *
+ * // set allocation
+ * void setAllocation(int dim) {
+ *     int x;
+ *     for (x = 0; x < dim; ++x) {
+ *         rsSetElementAt_uchar(var_allocation, 7, x);
+ *     }
+ * }
+ *
+ * // forEach
+ * uchar RS_KERNEL increment(uchar in) {
+ *     return in+1;
+ * }
+ *
+ * // reduction
+ * #pragma rs reduce(summation) accumulator(sumAccumulator) combiner(sumCombiner)
+ *
+ * static void sumAccumulator(int* accum, int val) {
+ *     *accum += val;
+ * }
+ *
+ * static void sumCombiner(int* accum, const int *val) {
+ *     *accum += *val;
+ * }
+ */
 
 #include "VtsHalRenderscriptV1_0TargetTest.h"
 
+// bitcode slots
+const int mExportVarIdx_var_int = 0;
+const int mExportVarIdx_var_long = 1;
+const int mExportVarIdx_var_float = 2;
+const int mExportVarIdx_var_double = 3;
+const int mExportVarIdx_var_allocation = 4;
+const int mExportVarIdx_var_uint32_t = 5;
+const int mExportVarIdx_var_point2 = 6;
+const int mExportVarIdx_var_int_ptr = 7;
+// bitcode invoke slots
+//const int mExportForEachIdx_root = 0;
+const int mExportForEachIdx_increment = 1;
+// bitcode reduce slots
+const int mExportReduceIdx_summation = 0;
+// bitcode invoke slots
+const int mExportFuncIdx_function = 0;
+const int mExportFuncIdx_functionV = 1;
+const int mExportFuncIdx_setBuffer = 2;
+const int mExportFuncIdx_setAllocation = 3;
+
+// bitcode
 #ifndef __LP64__
 
 const int8_t bitCode[] = {
-     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,  -84,   10,    0,    0,
+     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,   -8,   12,    0,    0,
        0,    0,    0,    0,   -1,   -1,   -1,   -1,    0,    0,    0,    0,    1,   64,    4,    0,
       96,    9,    0,    0,    2,   64,    4,    0,    3,    0,    0,    0,   66,   67,  -64,  -34,
-      33,   12,    0,    0,  -88,    2,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
+      33,   12,    0,    0,   59,    3,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
        7, -127,   35, -111,   65,  -56,    4,   73,    6,   16,   50,   57, -110,    1, -124,   12,
       37,    5,    8,   25,   30,    4, -117,   98, -128,   24,   69,    2,   66, -110,   11,   66,
      -60,   16,   50,   20,   56,    8,   24,   73,   10,   50,   68,   36,   72,   10, -112,   33,
       35,  -60,   82, -128,   12,   25,   33,  114,   36,    7,  -56, -120,   17,   98,  -88,  -96,
-     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   25,    0,    0,    0,
-      11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,    1,    4,   65,  -16,   -1,   -1,
-      -1,   -1,    3,   24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,   -1,   -1,
-     127,    0, -125,    5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,    8, -126,
-     -60,   -1,   -1,   -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,    1,   12,
-      22,    8,   -1,   -1,   -1,   -1,   63,    0,   11, -120,    0,    4,   65,   16,    4, -119,
-      -1,   -1,   -1,   -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,   15,
-      96,    0,    0,    0, -119,   32,    0,    0,   33,    0,    0,    0,   50,   34, -120,    9,
-      32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,
-      18,   76, -116, -116,   11, -124,  -60,   76,   16, -112,  -63,   28,    1,   24,   16,   48,
-      71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,   70,   18,    0, -124,   92,   35,
-      77,   17,   37,   76,  126,  -22,   32,  -51,  100,   35,    1,    0,   72,  -71,   75, -102,
-      34,   74, -104,   -4,   72,   -6, -127,  101,  113,    4,   96,   66, -100,  -58,  -65,  115,
-      20,    4,  -60,  -48,   50,   71, -128,  -48,   67,  -48,    8,   64,    9,   36, -102, -118,
-      32,    1,   84,   21,  -31,  121,  -24,   42, -125,   20,    0, -108, -107,   65,   10,    2,
-     -38, -118,   32,   53,  -44, -103,    0,  -96,  -81,    8,   18,   72,  -31,   64,    0,    0,
+     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   34,    0,    0,    0,
+      11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,  -16,   -1,   -1,   -1,   -1,    3,
+      24,   44,   32, -124,  -32,   -1,   -1,   -1,   -1,    7,   96, -127,    1,    4,   65,  -16,
+      -1,   -1,   -1,   -1,    3,   24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,
+      -1,   -1,  127,    0, -125,    5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,
+       8, -126,  -60,   -1,   -1,   -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,
+       1,   88,   64,    4,   32,    8, -126,   32,   72,   -4,   -1,   -1,   -1,   -1,    0, -122,
+     -62,    2,   34,    0,   65,   16,    4,   65,  -30,   -1,   -1,   -1,   -1,    7,   48,   20,
+      22,   16,   66,  -16,   -1,   -1,   -1,   -1,    3,   24,   44,   32,    2,  -32,   -1,   -1,
+      -1,   -1,    7,   48,    0,    0,    0,    0, -119,   32,    0,    0,   36,    0,    0,    0,
+      50,   34, -120,    9,   32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29,
+    -124,  -95, -112,   20,   18,   76, -116, -116,   11, -124,  -60,   76,   16, -100,  -63,   28,
+       1,   24,   16,   48,   71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,  -58,   53,
+     -46,   20,   81,  -62,  -28,  -89,   14,  -46,   76,   54,   18,    0, -128,   16,   10,  -18,
+    -110,  -90, -120,   18,   38,   63, -110,  126,   96,   89,   28,    1, -104,   16,  -89,  -15,
+     -17,   28,    5,    1,   45,  115,    4,    8,   53,  -28, -116,    0, -108,    0,  -94,  -88,
+       8,   16,   64,   83,    6,    0, -123, -128,  -86,    6,   32,  -85,    8,   77,   67,   88,
+      25,  -96,    0,   32,  -83,   12,   80,   16,   16,   87,    4, -120,   33,  -49,    4,    0,
+    -127,   69, -128,   66,   18,    7,    2,  -26,    8, -126,   41,    0,    0,    0,    0,    0,
       19,  -80,  112, -112, -121,  118,  -80, -121,   59,  104,    3,  119,  120,    7,  119,   40,
     -121,   54,   96, -121,  116,  112, -121,  122,  -64, -121,   54,   56,    7,  119,  -88, -121,
      114,    8,    7,  113,   72, -121,   13,  100,   80,   14,  109,    0,   15,  122,   48,    7,
      114,  -96,    7,  115,   32,    7,  109, -112,   14,  118,   64,    7,  122,   96,    7,  116,
      -48,    6,  -10,   16,    7,  114, -128,    7,  122,   96,    7,  116,  -96,    7,  113,   32,
        7,  120,  -48,    6,  -18,   48,    7,  114,  -48,    6,  -77,   96,    7,  116,  -96,  -13,
-      64, -118,    4,   50,   66,  100,    4,  -40,  -95,    4,  -64, -124,   12,    0,    0,    4,
-     -64,   14,  101,    0,   44, -124,    0,    0,   32,    0,  118,   40,    5,  112,   33,    3,
-       0,    0,    1,  -80,   67,   57,    0,   12,   33,    0,    0,    8, -128,   29,   74,    2,
-     100,  -56,    0,    0,   64,    0,  -20,   80,   22,   64,   67,    6,    0,    0,    2, -128,
-      13, -121,  -37,  -95,   56,  -64, -122,   12,    0,    0,    4,  -64,   14,   37,    2,   58,
-      96,    0,    0,   32,    0,  118,   40,   17,  -32,    1,    3,    0,    0,    1,   48,   68,
-     -95,    0,    0,    8,    0,    0,    0, -126,   33, -118,    5,    0,   64,    0,    0,    0,
-      16,   12,   81,   48,    0,    0,    4,    0,    0, -128,   96, -120,  -94,    1,  -64,   48,
-       0,    0,    0,    0,   67,   20,   14,    0,    6,    2,    0,    0,    0,   24,  -94,   80,
-       0,    0,   20,    0,    0,    0,  -63,   16,  -59,    3,    2,  -64,    0,    0,    0,    8,
-    -122,   40,   98,    0,    0,  -64,    1,    0,    0,   16,  100, -127,    0,    0,    0,    0,
-      13,    0,    0,    0,   50,   30, -104,   20,   25,   17,   76, -112, -116,    9,   38,   71,
-     -58,    4,   67,    2,   70,    0,   74,  -96,   16,   72,   24,    1,   32,   98,    4, -128,
-    -116,   17,    0,   66,   70,    0,   72,   25,    1,  -96,  101,    4, -128, -104,   17,    0,
-    -126,  108,  -75,    6,   91,  -50,    1,    0,  121,   24,    0,    0,  -30,    0,    0,    0,
-      26,    3,   76, -112,   70,    2,   19,   52,   68,    0,   38,   42,  119,   99,  104,   97,
-     114,   95,  115,  105,  122,  101,   67,    4, -128,   26,   98,    0,  -45,   24,    4,    0,
-     -59,  -90,   45,  -51,  -19,  -85,  -52,  -83,  -82,  -19,  107,   46,   77,  -81,  108, -120,
-       1,   76,   99,   64,    0,   20,   -7,   32,  -56, -115,   76,  -18,   45, -115,   12,  100,
-    -116,   45,  -52,  -19,   12,  -60,  -82,   76,  110,   46,  -19,  -51,   13,  100,  -58,    5,
-     -57,   69,  -26,  -90, -122,    6,    7,    6,    4,    4,   69,   44,  108,  -82, -116,   12,
-     -28,  -51,   13, -124, -119,  -55,  -86,    9,  100,  -58,    5,  -57,   69,  -26,  -90, -122,
-       6,    7,   38,  101, -120,   48,    6,    6,   15,  -69,   50,  -71,  -71,  -76,   55,   55,
-       6,   49,   67, -120,   49,   64,  -58,   32,   97,  -92,   22,  102,   23,  -10,    5,   23,
-      54,  -74,   22,  118,   86,  -10,  -27,   22,  -42,   86,  -58,  105,  -20,  -83,  -51,   37,
-     -52, -115,   76,  -18,   45, -115,  -52,   69,  110,  -50, -123,  -82,  108, -114,  110,    8,
-      49,    6,  -53,   24,   48,   60,  -20,  -62,  -28,  -66,  -46,  -36,  -24,   24,  -44,   12,
-      33,  -58,  -64,   25, -125, -121, -120,   93, -104,  -36,   23,  -37, -101,  -37,   25,    3,
-    -101,   33,  -60,   24,   68,   99,   32,   49,  -79,   11, -109,   -5,   50,   99,  123,   11,
-     -93,   27,   66, -116,    1,   53,    6,    9,   21,  -69,   48,  -71,   47,  -78,  -73,   58,
-      49,  -74,   50,    6,   50,   67, -120,   49,  -80,  -58,  -32,  -94,   99,   23,   38,   -9,
-      21,  -58,  -58,  -10,   54,   22,   70, -105,  -10,  -26,   70,   65,    6,  102,    8,   49,
-       6,  -39,   24,  104,   76,  -20,  -62,  -28,  -66,  -62,  -28,  -28,  -62,  -14,   -8,  -16,
-      12,  -67,  -71,  -51,  -47, -123,  -71,  -47,    5,  -55,  -55, -123,  -27,   -7,   12,   33,
-     -58, -128,   27, -125, -114, -118,   93, -104,  -36,   23,  -36,   91, -102,   27,  -99,   12,
-      13,  -88,  -73,   52,   55,   58, -103,   33,  -60,   24,  124,   99,    0,    6,  116,  -20,
-     -62,  -28,  -66,  -32,  -34,  -46,  -36,  -24,  100,  -66,  -32,  -24,  -28,  120,  -88,   64,
-     -67,  -91,  -71,  -47,  -55,   12,   33,  -58,   64,   12,  -58,   96,   12,   24,  -48,   12,
-      17,  -58,  -96,   12, -120, -104,  -43,  -71, -115,  -47,  -91,  -67,  -71,   13,   17,  -58,
-     -32,   12,   24,  -71,  -96, -107,  -79,  -63, -107,  -55,  125, -103,  -43,  -71, -115,  -47,
-     -91,  -67,  -71,   89,   13,   17,  -58,   32,   13,   72,  -56,  -67,  -67,  -47,   13,   17,
-     -58,   96,   13, -104,  -92,  -71, -115,  -55, -107,  -75, -107,  -71,  -47,   13,   17,  -58,
-     -96,   13,   24,  -64,   12,   17,  -58,  -32,   13,   40,  -52,  -44,   12,   17,  -58,   32,
-      14, -104,  -52,  -43,  -75,  -75, -123,  -47,  -91,  -67,  -71,  -47, -103,  -85,  107,   11,
-      26,   27,  -85,  107,  -85,   99,   11,  -93,  123, -109,   27,   66, -116,    1,   29, -116,
-      65,  -62,  101,  -82,  -82,  109,  -24,  -83,   77,   44,  -51,  -83,   76,  110, -120,   50,
-       6,  115,   48,    6,  101,   48,    6,  117,   32,    1,   99,   96,    7,   67, -124,   49,
-       0,    3,    6,  120,   28,  -46,  -36,  -24, -122,   16,   99, -112,    7,   99,  -96,    7,
-      12,  -14, -122,   16,   99,  -64,    7,   99,  -96,    7,  124,  -34,  -38,  -36,  -46,  -32,
-     -34,  -24,  -54,  -36,  -24,   64,  -58,  -48,  -62,  -28,   24,   77,  -91,  -75,  -63,  -79,
-    -107, -127,   12,  -67,   12,  -83,  -84, -128,   80,    9,    5,    5,   13,   17,  -58,  -32,
-      15, -122,    8,   66,   53,  -60,   24,    3,   63,   24,    3,   80,   16,  -86,   33,  -58,
-      24,  -24,  -63,   24, -120, -126,   80,   13,   49,  -58,   96,   20,  -58,   96,   20, -124,
-    -118,    4,  -37, -101,  -37,  -39,   16,   99,   12,   74,   97,   12,   68,   65,  -88, -122,
-      24,   99,   96,   10,   99,   96,   10,   66,  -59,  -62, -116,  -19,   45, -116,  110, -120,
-      49,    6,  -88,   48,    6,  -94,   32,   84,   67, -116,   49,   72, -123,   49,   72,    5,
-     -95,  -94,   65,  -10,   86,   39,  -58,   86,   54,  -60,   24, -125,   85,   24,    3,   81,
-      16,  -86,   33,  -58,   24,  -80,  -62,   24,  -80, -126,   80,   53,   98,   99,  -77,  107,
-     115,  105,  123,   35,  -85,   99,   43,  115,   49,   99,   11,   59, -101, -101,   34,   12,
-      69,   21,   54,   54,  -69,   54, -105,   52,  -78,   50,   55,  -70,   41,  -63,  -47,   99,
-       4,   78,   46,  -20,  -84,   45,  108, -118,  -96,   52,  117,   70,  -28,  -26,  -66,  -54,
-     -16,  -32,  -34,  -28,  -24,  -66,  -20,  -62,  -28,  -90,   32,  -48,   84,   97, -101,   23,
-       6,  100,   80,  104,   68,  110,  -18,  -21,   77,   76,  -83,  108, -116,  -18,  107, -114,
-     -19, -115,  110,  110,   74,   96,    6,  125,   70,  -28,  -26,  -66,  -54,  -16,  -32,  -34,
-     -28,  -24,  -66,  -52,  -22,  -36,  -58,  -90,    8,  104,  -96,    6,  -67,   70,  -28,  -26,
-     -66,  -54,  -16,  -32,  -34,  -28,  -24,  -66,  -52,  -34,  -28,  -54,  -62,  -58,  -48,  -66,
-     -36,  -62,  -38,  -54,  -90,    8,  108,  -32,    6, -107,   70,  -28,  -26,  -66,  -54,  -16,
-     -32,  -34,  -28,  -24,  -66,  -52,  -34,  -28,  -54,  -62,  -58,  -48,  -90,    8,  112,   32,
-       7, -115,   70,  -28,  -26,  -66,  -54,  -16,  -32,  -34,  -28,  -24,  -66,  -28,  -54,  -56,
-     -22,  -58,  -54,  -90,    4,  119,  -48,  103,   68,  110,  -18,  -85,   12,   15,  -18,   77,
-    -114,  -18, -117,   46,   15,  -82,  108,   74, -128,    7,   61,   74,  -96,  -34,  -46,  -36,
-     -24,  100,  -90,    8,  123,  -48,    7,    0,  121,   24,    0,    0,   92,    0,    0,    0,
+      64, -120,    4,   50,   66,  100,    4,  -40,  -95,    4,    0, -122,   12,    0,    0,    4,
+     -64,   14,  101,    0,   54, -124,    0,    0,   32,    0,  118,   40,    5,  -48,   33,    3,
+       0,    0,    1,  -80,   67,   57,    0,   15,   33,    0,    0,    8, -128,   29,   74,    0,
+      96,  -56,    0,    0,   64,    0,  -20,   80,   18,  -32,   67,    6,    0,    0,    2,   96,
+    -121,  -94,    0,   28,   50,    0,    0,   16,    0,  100,   96, -128,  -37,  -95,   60,   64,
+      24,    0,    3,    0,    0,    1,  -80,   67,  121,    0,   49,    0,    6,    0,    0,    2,
+      96, -120,   34,    1,    0,   16,    0,    0,    0,    4,   67,   20,   10,    0, -128,    0,
+       0,    0,   32,   24,  -94,   80,    0,    0,    4,    0,    0,    0,  -63,   16, -123,    2,
+       0,   64,    0,    0,    0,    8, -122,   40,   23,   16,    0,    3,    0,    0,   64,   48,
+      68,  -55,    0,    0,   32,    0,    0,    0, -126,   33,  -54,    6,    0,   67,    1,    0,
+       0,    0,   12,   81,   58,    0,   24,   12,    0,    0,    0,   96, -120,   34,    1,    0,
+      32,    0,    0,    0,    4,   67, -108,   15,    8, -128,    3,    0,    0,   32,   24,  -94,
+    -116,    1,    0,    0,    8,    0,    0,   64,   48,   68,   25,    3,    0,    0,   16,    0,
+       0, -128,   96, -120,   50,    6,    0,    0,   36,    0,    0,    0,   65,   22,    8,    0,
+      12,    0,    0,    0,   50,   30, -104,   24,   25,   17,   76, -112, -116,    9,   38,   71,
+     -58,    4,   67,    2,   70,    0,   74,  -96,   16,   72,   24,    1,  -96,   96,    4, -128,
+    -120,   17,    0,   50,   70,    0,    8,   25,    1,  -96,  101,    4, -128,   28,  -37,   13,
+     -62,  -74, -117,    0,  121,   24,    0,    0,  -13,    0,    0,    0,   26,    3,   76, -112,
+      70,    2,   19,   52,   68,    0,   48,   42,  119,   99,  104,   97,  114,   95,  115,  105,
+     122,  101,   67,    4,   32,   27,   98,    0,   24,   25,    4,   64,  -58,  -90,   45,  -51,
+     -19,  -85,  -52,  -83,  -82,  -19,  107,   46,   77,  -81,  108, -120,    1,   96,  100,   64,
+       0,   25,   -7,   32,  -56, -115,   76,  -18,   45, -115,   12,  100, -116,   45,  -52,  -19,
+      12,  -60,  -82,   76,  110,   46,  -19,  -51,   13,  100,  -58,    5,  -57,   69,  -26,  -90,
+    -122,    6,    7,    6,    4,    4,   69,   44,  108,  -82, -116,   12,  -28,  -51,   13, -124,
+    -119,  -55,  -86,    9,  100,  -58,    5,  -57,   69,  -26,  -90, -122,    6,    7,   38,  101,
+    -120,   64,    6,    6,   15,  -69,   50,  -71,  -71,  -76,   55,   55,    6,   49,   67,    8,
+      50,   64,  -56,   32,   97,  -92,   22,  102,   23,  -10,    5,   23,   54,  -74,   22,  118,
+      86,  -10,  -27,   22,  -42,   86,  -58,  105,  -20,  -83,  -51,   37,  -52, -115,   76,  -18,
+      45, -115,  -52,   69,  110,  -50, -123,  -82,  108, -114,  110,    8,   65,    6,   11,   25,
+      48,   60,  -20,  -62,  -28,  -66,  -46,  -36,  -24,   24,  -44,   12,   33,  -56,  -64,   33,
+    -125, -121, -120,   93, -104,  -36,   23,  -37, -101,  -37,   25,    3, -101,   33,    4,   25,
+      68,  100,   32,   49,  -79,   11, -109,   -5,   50,   99,  123,   11,  -93,   27,   66, -112,
+       1,   69,    6,    9,   21,  -69,   48,  -71,   47,  -78,  -73,   58,   49,  -74,   50,    6,
+      50,   67,    8,   50,  -80,  -56,  -32,  -94,   99,   23,   38,   -9,   21,  -58,  -58,  -10,
+      54,   22,   70, -105,  -10,  -26,   70,   65,    6,  102,    8,   65,    6,   25,   25,  104,
+     100,  -20,  -62,  -28,  -66,  -22,  -46,  -36,  -24,  102,  100,  -66,  -24,   24,  -28,   12,
+      33,  -56, -128,   35, -125, -114, -118,   93, -104,  -36,   23,  -36,   91, -102,   27,  -99,
+      12,   13,  -88,  -73,   52,   55,   58, -103,   33,    4,   25,  124,  100,    0,    6,   92,
+     -20,  -62,  -28,  -66,  -46,  -36,  -24,  -66,  -32,  -24,  -28,   72,  -88,  -92,  -71,  -47,
+      13,   33,  -56,   64,   12,  -56,   96,   12,   24,  -48,   12,   17,  -56,  -96,   12, -120,
+    -104,  -43,  -71, -115,  -47,  -91,  -67,  -71,   13,   17,  -56,  -32,   12,   24,  -71,  -96,
+    -107,  -79,  -63, -107,  -55,  125, -103,  -43,  -71, -115,  -47,  -91,  -67,  -71,   89,   13,
+      17,  -56,   32,   13,   24,  -71,  -96, -107,  -79,  -63, -107,  -55,  125,  -51, -107,  -47,
+       9,  -43, -103, -103, -107,  -55,   13,   17,  -56,   96,   13,   88,  -71,  -96, -107,  -79,
+     -63, -107,  -55,  125,  -51, -107,  -47,    5,  -79,  -79,  -67, -115, -123,  -47,  -91,  -67,
+     -71,   13,   17,  -56,  -96,   13,   72,  -56,  -67,  -67,  -47,   13,   17,  -56,  -32,   13,
+    -104,  -92,  -71, -115,  -55, -107,  -75, -107,  -71,  -47,   13,   17,  -56,   32,   14,   24,
+     -64,   12,   17,  -56,   96,   14,   40,  -52,  -44,   12,   17,  -56,  -96,   14, -104,  -52,
+     -43,  -75,  -75, -123,  -47,  -91,  -67,  -71,  -47, -103,  -85,  107,   11,   26,   27,  -85,
+     107,  -85,   99,   11,  -93,  123, -109,   27,   66, -112,    1,   30, -112,   65,  -62,  101,
+     -82,  -82,  109,  -24,  -83,   77,   44,  -51,  -83,   76,  110, -120,   66,    6,  119,   64,
+       6,  101,   64,    6,  121,    0,    1,  100,  -96,    7,   67,    4,   50,    0,    3,    6,
+     120,   28,  -46,  -36,  -24, -122,   16,  100,  -48,    7,  100,  -32,    7,   12,  -14, -122,
+      16,  100,    0,   10,  100,  -32,    7,  124,  -34,  -38,  -36,  -46,  -32,  -34,  -24,  -54,
+     -36,  -24,   64,  -58,  -48,  -62,  -28,   24,   77,  -91,  -75,  -63,  -79, -107, -127,   12,
+     -67,   12,  -83,  -84, -128,   80,    9,    5,    5,   13,   17,  -56,   96,   20, -122,    8,
+    -126,   54,  -60,   32,    3,   81,   32,    3,   82,   16,  -76,   33,    6,   25,   -8,    1,
+      25, -104, -126,  -96,   13,   49,  -56,  -32,   20,  -56,  -32,   20,    4, -115,    4,  -37,
+    -101,  -37,  -39,   16, -125,   12,   82, -127,   12,   76,   65,  -48, -122,   24,  100,  -96,
+      10,  100,  -96,   10, -126,  -58,  -62, -116,  -19,   45, -116,  110, -120,   65,    6,  -84,
+      64,    6,  -90,   32,  104,   67,   12,   50,  104,    5,   50,  104,    5,   65,  -93,   65,
+     -10,   86,   39,  -58,   86,   54,  -60,   32, -125,   87,   32,    3,   83,   16,  -76,   33,
+       6,   25,  -64,    2,   25,  -64, -126,  -96,  113,    9,  115,  -53,    3, -127,  123,   75,
+     115,  -93,   43, -109,   27,   98, -112, -127,   44, -112, -127,   41,    8,  -38,   16, -125,
+      12,  102, -127,   12,  102,   65,  -48,   26,  -79,  -79,  -39,  -75,  -71,  -76,  -67, -111,
+     -43,  -79, -107,  -71, -104,  -79, -123,  -99,  -51,   77,   17, -122,  -94,   10,   27, -101,
+      93, -101,   75,   26,   89, -103,   27,  -35, -108,  -32,  -24,   49,    2,   39,   23,  118,
+     -42,   22,   54,   69,   80, -102,   58,   35,  114,  115,   95,  101,  120,  112,  111,  114,
+     116,   95,  118,   97,  114,   83,   16,  104,  -86,  -80,  -51,   11,    3,   50,   40,   52,
+      34,   55,   -9,  -11,   38,  -90,   86,   54,   70,   -9,   53,  -57,  -10,   70,   55,   55,
+      37,   48, -125,   62,   35,  114,  115,   95,  101,  120,  112,  111,  114,  116,   95,  102,
+     117,  110,   99,   83,    8,   52,   80,    3,   54,  112, -125,   94,   35,  114,  115,   95,
+     101,  120,  112,  111,  114,  116,   95,  102,  111,  114,  101,   97,   99,  104,   95,  110,
+      97,  109,  101,   83,    4,   56, -112, -125,   74,   35,  114,  115,   95,  101,  120,  112,
+     111,  114,  116,   95,  102,  111,  114,  101,   97,   99,  104,   83,    4,   58,  -80, -125,
+      70,   35,  114,  115,   95,  101,  120,  112,  111,  114,  116,   95,  114,  101,  100,  117,
+      99,  101,   83, -126,   61,  -24,   51,   34,   55,   -9,   85, -122,    7,   -9,   38,   71,
+      -9,   69, -105,    7,   87,   54,   37,  -32, -125,   30,   37,   80,  111,  105,  110,  116,
+      50,   83, -124,   63,    8,    5,    0,    0,  121,   24,    0,    0,   92,    0,    0,    0,
       51,    8, -128,   28,  -60,  -31,   28,  102,   20,    1,   61, -120,   67,   56, -124,  -61,
     -116,   66, -128,    7,  121,  120,    7,  115, -104,  113,   12,  -26,    0,   15,  -19,   16,
       14,  -12, -128,   14,   51,   12,   66,   30,  -62,  -63,   29,  -50,  -95,   28,  102,   48,
@@ -201,236 +247,309 @@
     -127,   30,  -36,  -32,   28,  -28,  -31,   29,  -22,    1,   30,  102,   24,   81,   56,  -80,
       67,   58, -100, -125,   59,  -52,   80,   36,  118,   96,    7,  123,  104,    7,   55,   96,
     -121,  119,  120,    7,  120, -104,   81,   76,  -12, -112,   15,  -16,   80,   14,    0,    0,
-     113,   32,    0,    0,   56,    0,    0,    0,    6,   17,    6,   -1,   92,  -33, -111,  -60,
-      45,    4,   16,  -95,   65,   66,    8,   83,   90,  -33, -111,  -12,    3,  -53,  -30,    8,
-     -64, -124,   56, -115,   13,   40,   21,   16,   -3, -125,   67,    5,   11,   97,    5,   74,
-       5,   68,   -1,  -29,   32,  -51,  100,   27,   67, -126,   52,   66,   68,   48,   68,   51,
-    -103,    2,   82,   80, -115,   48,   33,   78,   99,    4,   73,    5,   68,   63,   16,   69,
-       0,  102,   17, -111,  127,   16,  -53,   67,   68,  127,   65,   53,  -62, -124,   56,  -51,
-     107,   14, -117,   68,   49, -100,  -61,    4,   72,   67,   68,  102,  -32,   84,   64,  -12,
-       3,  -53,  -30,    8,  -64, -124,   56, -115,   33,  112,  126,   36,   -7,   17,   49,   80,
-       2,  -15,   23, -115,   47,   81, -116,   38,    8,   20,   67,   45,  -64,  -28,   68,    6,
-     112,   84,   64,  -12,   35,  -51,  100,   13, -114,   68,   49, -102,   32,   80,   12,  -75,
-       0, -109,   19,   89,    0,   82,    1,  -47,  -65,   56, -115,   97,    7,   78,    5,   68,
-      -1,  -29,   32,  -51,  100,   -1,  -49,   20,  -39,    3,  -30,   71, -110,   63,   76,   78,
-     100,   11,   73,   65,   53,  -62, -124,   56,  -51,  107,    2,   73,    5,   68,  127,  -79,
-      56,  -64,  100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,
-      20,  -61,   57,   76, -128,   52,   68,    4,   97,   32,    0,    0,   54,    0,    0,    0,
-      19,    4,   65,   44,   16,    0,    0,    0,   20,    0,    0,    0,    4, -108,   66,   49,
-    -108,   67,   17,   20,   68,   25, -108,   68,   81, -112,   80,    4,   20,   12,  101,   36,
-       4,   32,    1,  -45,   80,   70,   66,    0,   18,   16,    6,   67,   25,    9,    1,   72,
-     -64,   24,   12,  101,   44,    5,   32,    1,  -46,   80,  -58,   82,    0,   18,   48,   13,
-     101,   36,    4,   32,    1,   18,   17,   99,    4,   32,    8, -126,   36,   24, -112,   49,
-      70,    0, -126,   32,    8, -126,   32,    8, -126,   36,   72,    0, -125,   17,  -64,   52,
-       0, -125,   17, -127,   25,   16,  -64,   96, -124,  -48,    6,    3,   48,   24,   49,  -72,
-       1,    1,   12,   70,  -80, -127,   55,    0, -125,   17,  103,  -16,   13,  -64,   96,    4,
-      26, -128,  -63,    0,   12,   70,  -92, -127,   24,   12,  -64,   96, -124,   26, -112,  -63,
-       0,   12,   70,  -84,   65,   25,   12,    0,    6,  -60,    0,    0,   13,    0,    0,    0,
-      91,    6,   32,   32, -123,   45,   67,   16, -100,  -62, -106,   65,    8,   84,   97,  -53,
-      48,    4,  -83,  -80,  101,   32,    2,   82,  -40,   50,   20,    1,   41,  108,   25, -116,
-    -128,   20,  -74,   12,   71,   64,   10,   91,    6,   36,   32, -123,   45,   67,   18, -112,
-       2,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   11,    0,    0,    0,
-      19,    4,  -63,   96,    4,  -32,   13,    0, -122,    3,    1,    0,    2,    0,    0,    0,
-     -26,   49,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,    2,    0,    0,    0,
-      91,    6,   32,   32,    5,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
-      11,    0,    0,    0,   19,    4,  -63,  121,   64,  -40,   55,  -63,  -32,  -64,  -32, -127,
-      12, -125,  112,   32,    5,    0,    0,    0,  -10,   65,    8,   78,   83, -103, -121, -128,
-      52,   22,   82,    8,   78,   83,  -43,    6,   50,    0,  -61,    0,    0,    0,    0,    0,
-      97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1,  121,  -61,  -64,  -32,    3,
-     -63,   96, -124,   23,    6,    3, -128,  -31,   64,    0,    0,    0,    4,    0,    0,    0,
-     -10,   49,   84,  -64,   98,   30,    5,   32,    8,   20,   99,   33,    3,   48,   12,    0,
-       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   32, -123,   45, -125,   16,
-    -112,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   17,    0,    0,    0,
-      19,    4,    1,  125, -125,  -68,   97,   97,    0,    6,   32,   24, -116,  -16,  -60,   96,
-       0,   48,   28,    8,    4,    0,    0,    0,  -10,   49,   84,  -64,   98,   30,    5,   32,
-       8,   20,   99,   34,    3,   48,   12,    0,    1,   49,    0,    0,    4,    0,    0,    0,
-      91,    6,   32,   32, -123,   45,   67,   16, -112,  -62, -106,   97,    8,   72,    1,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,   19,    4,  -63, -120,
-       1, -127,    4, -112, -127,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
-      19,    4,  -63,  120, -125,   39,   73,  -12, -115,   17,    3,    2,    8,   22,   48,  -64,
-     112,   32,    0,    0,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
-       0,    0,    0,    0,    0,    0,    0,    0,
+     113,   32,    0,    0,   78,    0,    0,    0,   70,  -64,   84,   64,  -12,   83,   72,   51,
+     -35,  -10,   63,  -39, -128,   82,    1,  -47,   63,   56,   84,  -80,   16,  -90, -128,   20,
+      84,   35,   76, -120,  -45, -104,  -63,   82,    1,  -47, -113,   52,  -45,   -1,   76, -111,
+      53,   52,   18,   49,  105,  -53,  -30,    8,  -64, -124,   56, -115,    5,   32,   21,   16,
+      -3, -117,  -45,   24,  -74, -112,   20,   84,   35,   76, -120,  -45,  -68,  -26, -112,    6,
+      -1,  108,  -45, -111,  -60,   18, -109,  -73,   16,   12,  -47,   76,  -38,  -12,   83,  -62,
+       1,   68,  -11,   29,   73,   63,  -80,   44, -114,    0,   76, -120,  -45,   28, -119,   77,
+    -124,  -63,   63,  -41,  119,   36,  113,   11,    1,   68,  104, -112,   16,  -62, -108,  -42,
+     119,   36,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,   22, -107,  127,   16,  -53,
+      67,   68,  -65,   68,   76,  -38,  -78,   56,    2,   48,   33,   78,   99,    2,   73,    5,
+      68,  127,  -79,   56,  -64,  100,    5,   74,    5,   68,   -1,  -29,   32,  -51,  100,  -37,
+      67, -126,   52,   66,   68,   48,   68,   51,   25,   67,   34,   17,  -45,   70,   21,    5,
+      17,   89,  -60,   34,   81,   12,  -25,   48,    1,  -46,   16, -111,   37,  100,  126,   36,
+      -7,   17,   49,   80,    2,  -15,   23, -115,   47,   81,   12,  -25,   48,    1,  -46,   16,
+    -111,   81,   68,   -2,   65,   44,   15,   17,   -3,    5,  -43,    8,   19,  -30,   52,  -81,
+      29,   56,   21,   16,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,    8, -100,   31,
+      73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,   20,  -93,    9,    2,  -59,   80,
+      11,   48,   57, -111,    1,   28,   21,   16,   -3,   72,   51,   89,   69,  -28,   31,  -60,
+     -14,   16,  -47,   47,   17,  -45,   70,   21,    5,   17,   25, -124,   35,   81, -116,   38,
+       8,   20,   67,   45,  -64,  -28,   68,   38, -127,   -8, -111,  -28,   15, -109,   19,    1,
+      97,   32,    0,    0,   37,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
+      12,    0,    0,    0,    4, -108,   66,   49, -108,    3,    9,   69,   64,  -63,   80,   70,
+      82,    0,   23, -128,   13,  101,   36,    5,  112,    1,   23,   17,   99,    4,   32,    8,
+    -126,   36,   24, -112,   49,   70,    0, -126,   32,    8, -126,   32,    8, -126,   36,   72,
+       0,    0,    0,    0, -125,   17,    0,   54,    0, -125,   17,   65,   25,   16,  -64,   96,
+    -124, -128,    6,    3,   48,   24,   49,  -92,    1,    1,   12,   70,   16,   98,   48,    0,
+    -125,   17,  103,   48,    6,    3,   48,   24,   97,    6,  100,   48,    0,   24,   16,    3,
+       9,    0,    0,    0,   91,    6,   32,   64, -123,   45,   67,   16,  -84,  -62, -106,   65,
+       8,   92,   97,  -53,   48,    4,  -79,  -80,  101,   32,    2,   84,  -40,   50,   20,    1,
+      42,  108,   25, -116,    0,   21,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+      11,    0,    0,    0,   19,    4,  -63,   96,    4,   32,    6,    3, -128,  -31,   64,    0,
+       2,    0,    0,    0,   38,   50,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,
+       2,    0,    0,    0,   91,    6,   32,   64,    5,    0,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   38,    0,    0,    0,   19,    4,   68,   44,   16,    0,    0,    0,
+       1,    0,    0,    0,    4, -108,    2,    0,  -61,   13,   98,  112, -103,  -63,   44,   67,
+      48, -112,    1,   25,   99, -106,   64,   24,  -88,    0,  -82,    0,   13, -124,  -15, -124,
+      50,   48, -125,  -63, -120,   51,   24, -125,    1,   48,   51,  -64,   96,   48,  -36, -128,
+       6,   98,    0,    6,  -77,   12, -125, -112,    6,   24,   14,    4,   14,    0,    0,    0,
+      23,   96,   -8,   75,  -28,   63,  -57,   13,   44,   -2,   47,   68,  -56,  -12,   19, -125,
+      65,  -40,    9,    2,   68,   17, -128,   33,  -61,  101,   36, -124,  -64,   60,  -72, -119,
+      12,    3,  -62,   24,  -54, -128,   52, -126, -103,   16, -120,   79,  -25, -106, -126,   16,
+      23,   50,    9,   78,   51,    0,    0,    0,    1,   49,    0,    0,    3,    0,    0,    0,
+      91,    6,   33,  -96, -123,   45, -125,   17,  -96,    2,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   36,    0,    0,    0,   19,    4,   67,   44,   16,    0,    0,    0,
+       3,    0,    0,    0,  -44, -108,    3,    5,  -74,  -52,    1,   85,   51,    0,    0,    0,
+     -61,   13,   98,  112, -103,  -63,   44,   67,   32, -104,  -63,   64,    5,  -96,    6,  -63,
+       5,   16,   25, -116,  -39, -122,   50,   64,    3,   96,  -60,  -64,   80,    2,   39,   13,
+     -58,  -32,   12,  -20,   12,   48,   24,   12,   55,  -88, -127,   24, -128,  -63,   44, -125,
+      16,  -84,    1, -122,    3,    1,    0,    0,   14,    0,    0,    0, -122,  114,   -8,   84,
+     -13,    0, -126,  114,    1, -122,  -65,   68,   -2,  115, -100,  -64,  -30,   -1,   66, -124,
+      76,   63,   49,   24, -124, -103,   16,    2,  -13,  -32,   38,   50,   12,    8,   99,   42,
+       3,  -46,    8,  118,   66,   92,   62,  -99,  -37,   10,   66,   92,  -56,   36,   56,  -51,
+       0,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   12,    0,    0,    0,
+      19,    4,  -63, -119,    1,   16,   54,    6,   24,   12, -114,   12,   26,  -56,   50,    8,
+       7,    2,    0,    0,    5,    0,    0,    0,   54,   66,    8,   78,   83, -103, -120, -128,
+      52,   86,   82,    8,   78,   83,  -43,   70,   50,    0,  -61,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1, -119,  -63,   48,   50,   24,
+       3,   16,   12,   70, -120,   65,   25,   12,    0, -122,    3,    1,    4,    0,    0,    0,
+      54,   50,   84,  -64,   98,   34,    5,   32,    8,   20,   99,   37,    3,   48,   12,    0,
+       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   64, -123,   45, -125,   16,
+     -96,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   18,    0,    0,    0,
+      19,    4,    1, -115,  -63,   32,   49,   24,   86,    6,  100,    0, -126,  -63,    8,   49,
+      48, -125,    1,  -64,  112,   32,    0,    0,    4,    0,    0,    0,   54,   50,   84,  -64,
+      98,   34,    5,   32,    8,   20,   99,   38,    3,   48,   12,    0,    1,   49,    0,    0,
+       4,    0,    0,    0,   91,    6,   32,   64, -123,   45,   67,   16,  -96,  -62, -106,   97,
+       8,   80,    1,    0,    0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,
+      19,    4,  -63, -120,    1,  -79,    4,  -45, -127,    0,    0,    0,   97,   32,    0,    0,
+       9,    0,    0,    0,   19,    4,  -63,  120, -125,   24,   92,   23, -115,  -63,   24,   49,
+      32, -128,   96,   33,    3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,
+      20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
+      19,    4,  -63,  120, -125,   24,   92,   23, -115,  -63,   24,   49,   32, -128, -128,   33,
+       3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,   19,    4,  -63,  120,
+    -125,   24,   92,   23, -115,  -63,   24,   49,   32, -128,  -96,   33,    3,   12,    7,    2,
+       2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,    0,    0,    0,    0,
+       0,    0,    0,    0,
 };
 
-const int bitCodeLength = 2776;
+const int bitCodeLength = 3364;
 
 #else
 
 const int8_t bitCode[] = {
-     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0, -116,   10,    0,    0,
+     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,  108,   13,    0,    0,
        0,    0,    0,    0,   -1,   -1,   -1,   -1,    0,    0,    0,    0,    1,   64,    4,    0,
       96,    9,    0,    0,    2,   64,    4,    0,    3,    0,    0,    0,   66,   67,  -64,  -34,
-      33,   12,    0,    0,  -96,    2,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
+      33,   12,    0,    0,   88,    3,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
        7, -127,   35, -111,   65,  -56,    4,   73,    6,   16,   50,   57, -110,    1, -124,   12,
       37,    5,    8,   25,   30,    4, -117,   98, -128,   24,   69,    2,   66, -110,   11,   66,
      -60,   16,   50,   20,   56,    8,   24,   73,   10,   50,   68,   36,   72,   10, -112,   33,
       35,  -60,   82, -128,   12,   25,   33,  114,   36,    7,  -56, -120,   17,   98,  -88,  -96,
-     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   24,    0,    0,    0,
+     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   33,    0,    0,    0,
       11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,  -16,   -1,   -1,   -1,   -1,    3,
-      24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,   -1,   -1,  127,    0, -125,
-       5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,    8, -126,  -60,   -1,   -1,
-      -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,    1,   12,   22,    8,   -1,
-      -1,   -1,   -1,   63,    0,   11, -120,    0,    4,   65,   16,    4, -119,   -1,   -1,   -1,
-      -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,   15,   96,    0,    0,
-    -119,   32,    0,    0,   34,    0,    0,    0,   50,   34, -120,    9,   32,  100, -123,    4,
-      19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,   18,   76, -116, -116,
-      11, -124,  -60,   76,   16, -112,  -63,   28,    1,   24,   16,   48,   71,    0,   10,   36,
-     -52,    0,   16,   49,    4,   64,   70,   18,    0, -124,   28,   36,   77,   17,   37,   76,
-     126,  -22,   32,  -51,  100,   -5,   61, -114,    4,    0,   32,  -27,   46,  105, -118,   40,
-      97,  -14,   35,  -23,    7, -106,  -59,   17, -128,    9,  113,   26,  -65,  -49,   17,   49,
-      12,  -61,   64,   12,   45,  115,    4,    8,   61,    4, -115,    0, -108,   64,  -94,  -87,
-       8,   18,   64,   85,   17,  -98, -121,  -82,   50,   72,    1,   64,   89,   25,  -92,   32,
-     -96,  -83,    8,   82,   67,  -99,    9,    0,   -6, -118,   32, -127,   20,   14,    4,    0,
-      19,  -76,  112,    8,    7,  121,   24,    7,  116,  -80,    3,   58,  104,    3,  119,  120,
-       7,  119,   40, -121,   54,   96, -121,  116,  112, -121,  122,  -64, -121,   54,   56,    7,
-     119,  -88, -121,  114,    8,    7,  113,   72, -121,   13,  115,   80,   14,  109,  -48,   14,
-     122,   80,   14,  109, -112,   14,  120,  -96,    7,  120,  -96,    7,  115,   32,    7,  109,
-    -112,   14,  113,   96,    7,  122,   16,    7,  118,  -96,    7,  115,   32,    7,  109, -112,
-      14,  118,   64,    7,  122,   96,    7,  116,  -48,    6,  -23,   16,    7,  114, -128,    7,
-     122,   16,    7,  114, -128,    7,  109,  -32,   14,  115,   32,    7,  122,   96,    7,  116,
-     -48,    6,  -77,   16,    7,  114, -128,    7,   58,   15,  -92,   72,   32,   35,   68,   70,
-    -128,   29,   74,    0,   76,  -56,    0,    0,   64,    0,  -20,   80,    6, -128,   66,    8,
-       0,    0,    2,   96, -121,   82,    0,   21,   50,    0,    0,   16,    0,   59, -108,    3,
-     -80,   16,    2,    0, -128,    0,  -40,  -95,   36,  -64, -123,   12,    0,    0,    4,  -64,
-      14,  101,    1,   48,  100,    0,    0,   32,    0,  -40,  104,  -56,   29, -118,    3,  100,
-       8,    1,    0,   64,    0,  -20,   80,   34,   96,    3,    8,    0,    0,    2,   96, -121,
-      18,    1,   28,   64,    0,    0,   16,    0,   67,   20,   10,    0, -128,    0,    0,    0,
-      32,   24,  -94,   88,    0,    0,    4,    0,    0,    0,  -63,   16,    5,    3,    0,   64,
-       0,    0,    0,    8, -122,   40,   26,    0,   12,    3,    0,    0,    0,   48,   68,  -31,
-       0,   96,   32,    0,    0,    0, -128,   33,   10,    5,    0,   64,    1,    0,    0,   16,
-      12,   81,   60,   32,    0,   12,    0,    0, -128,   96, -120,   34,    6,    0,    0,   28,
-       0,    0,    0,   65,   22,    8,    0,    0,   13,    0,    0,    0,   50,   30, -104,   20,
-      25,   17,   76, -112, -116,    9,   38,   71,  -58,    4,   67,    2,   70,    0,   72,   24,
-       1,   32,   98,    4, -128, -116,   17,    0,   66,   70,    0,   72,   25,    1,  -96,  101,
-       4, -128, -104,   17,    0, -126,  108,  -75,    6,   91,  -50,    1,    0,    0,    0,    0,
-     121,   24,    0,    0,  -48,    0,    0,    0,   26,    3,   76, -112,   70,    2,   19,   68,
+      24,   44,   16,   -2,   -1,   -1,   -1,  127,    0,   22,   24,    1,    8, -126,   32,    8,
+      18,    2,    8, -126,   32,    8,   18,   -1,   -1,   -1,   -1,   63, -128,  -63,    2,  -31,
+      -1,   -1,   -1,   -1,    7,   48,   90,   64,    4,   32,    8, -126,   32,   72,   -4,   -1,
+      -1,   -1,   -1,    0,    6,   11, -116,    0,    4,   65,   16,    4,    9,    1,    4,   65,
+      16,    4, -119,   -1,   -1,   -1,   -1,   31,  -64,   96,    1,   17, -128,   32,    8, -126,
+      32,  -15,   -1,   -1,   -1,   -1,    3,   24,   10,   11, -120,    0,    4,   65,   16,    4,
+    -119,   -1,   -1,   -1,   -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,
+      15,   96,    0,    0, -119,   32,    0,    0,   38,    0,    0,    0,   50,   34, -120,    9,
+      32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,
+      18,   76, -116, -116,   11, -124,  -60,   76,   16,  -96,  -63,   28,    1,   24,   16,   48,
+      71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,  -58,   65,  -46,   20,   81,  -62,
+     -28,  -89,   14,  -46,   76,  -74,  -33,  -29,   72,    0,    0,   66,   40,  -72,   75, -102,
+      34,   74, -104,   -4,   72,   -6, -127,  101,  113,    4,   96,   66, -100,  -58,  -17,  115,
+      68,   12,  -61,   48,  -48,   50,   71, -128,   80,   67,  -50,    8,   64,    9,   32, -118,
+    -118,    0,    1,   52,   21,    2,   98,   26, -128,  -86,   57, -126,  -96,   24, -112,  -29,
+       8,  -64,   69,   88,   17, -102, -122,  -76,   50,   64,    1,   64,   92,   25,  -96,   32,
+      32,  -81,    8,   16,   67,  -96,    9,    0,   18, -117,    0, -115,   68,   14,    4,   76,
+       1,    0,    0,    0,   19,  -76,  112,    8,    7,  121,   24,    7,  116,  -80,    3,   58,
+     104,    3,  119,  120,    7,  119,   40, -121,   54,   96, -121,  116,  112, -121,  122,  -64,
+    -121,   54,   56,    7,  119,  -88, -121,  114,    8,    7,  113,   72, -121,   13,  115,   80,
+      14,  109,  -48,   14,  122,   80,   14,  109, -112,   14,  120,  -96,    7,  120,  -96,    7,
+     115,   32,    7,  109, -112,   14,  113,   96,    7,  122,   16,    7,  118,  -96,    7,  115,
+      32,    7,  109, -112,   14,  118,   64,    7,  122,   96,    7,  116,  -48,    6,  -23,   16,
+       7,  114, -128,    7,  122,   16,    7,  114, -128,    7,  109,  -32,   14,  115,   32,    7,
+     122,   96,    7,  116,  -48,    6,  -77,   16,    7,  114, -128,    7,   58,   15, -124,   72,
+      32,   35,   68,   70, -128,   29,   74,    0,  100,  -56,    0,    0,   64,    0,  -20,   80,
+       6,   96,   67,    8,    0,    0,    2,   96, -121,   82,    0,   31,   50,    0,    0,   16,
+       0,   59, -108,    3,    0,    3, -124,    0,    0,   32,    0,  118,   40,    1, -112,   33,
+       3,    0,    0,    1,  -80,   67,   73, -128,   48,   64,    6,    0,    0,    2,   96, -121,
+     -94,    0,   30,   66,    0,    0,   16,    0,  100,   98, -128,  -36,  -95,   60,  -64,   24,
+       0,    4,    0,    0,    1,  -80,   67,  121,    0,   50,    0,    8,    0,    0,    2,   96,
+    -120,   34,    1,    0,   16,    0,    0,    0,    4,   67,   20,   10,    0, -128,    0,    0,
+       0,   32,   24,  -94,   80,    0,    0,    4,    0,    0,    0,  -63,   16, -123,    2,    0,
+      64,    0,    0,    0,    8, -122,   40,   22,   16,    0,    3,    0,    0,   64,   48,   68,
+     -55, -128,    0,   32,    0,    0,    0, -128,   33,  -54,    6,    0,   64,    1,    0,    0,
+      16,   12,   81,   58,    0,   24,   12,    0,    0,    0,   96, -120,  -14,    1,  -64,  112,
+       0,    0,    0,    0,   67,   20,    9,    0,    0,    1,    0,    0,   32,   24,  -94, -124,
+       1,   16,    0,    3,    0,    0,   64,   48,   68,   41,    3,    0,    0,   16,    0,    0,
+    -128,   96, -120,   82,    6,    0,    0,   32,    0,    0,    0,  -63,   16,  -91,   12,    0,
+       0,   72,    0,    0,    0, -126,   44,   16,   13,    0,    0,    0,   50,   30, -104,   24,
+      25,   17,   76, -112, -116,    9,   38,   71,  -58,    4,   67,    2,   70,    0,   72,   40,
+    -104,   17, -128, -126,   40,   16,   10,   70,    0, -120,   24,    1,   32,   99,    4, -128,
+    -112,   17,    0,   90,   70,    0,  -56,  -79,  -19,   34,  108,   63,    9,    0,    0,    0,
+     121,   24,    0,    0,  -22,    0,    0,    0,   26,    3,   76, -112,   70,    2,   19,   68,
       62,    8,  114,   35, -109,  123,   75,   35,    3,   25,   99,   11,  115,   59,    3,  -79,
       43, -109, -101,   75,  123,  115,    3, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63,
     -127,    1,    1,   65,   17,   11, -101,   43,   35,    3,  121,  115,    3,   97,   98,  -78,
-     106,    2, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63, -127,   73,   25,   34, -116,
-       1,  -64,  -61,  -82,   76,  110,   46,  -19,  -51, -115,   65,  -52,   16,   98,   12, -124,
-      49,   24,   24,  -87, -123,  -39, -123,  125,  -63, -123, -115,  -83, -123,  -99, -107,  125,
+     106,    2, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63, -127,   73,   25,   34, -104,
+       1,  -64,  -61,  -82,   76,  110,   46,  -19,  -51, -115,   65,  -52,   16,  -62,   12,    4,
+      51,   24,   24,  -87, -123,  -39, -123,  125,  -63, -123, -115,  -83, -123,  -99, -107,  125,
      -71, -123,  -75, -107,  113,   26,  123,  107,  115,    9,  115,   35, -109,  123,   75,   35,
-     115, -111, -101,  115,  -95,   43, -101,  -93,   27,   66, -116,   65,   49,    6,    6,   15,
-     -69,   48,  -71,  -81,   52,   55,   58,    6,   53,   67, -120,   49,   64,  -58,   32,   33,
-      98,   23,   38,   -9,  -59,  -10,  -26,  118,  -58,  -64,  102,    8,   49,    6,  -53,   24,
-      48,   76,  -20,  -62,  -28,  -66,  -52,  -40,  -34,  -62,  -24, -122,   16,   99,  -32, -116,
+     115, -111, -101,  115,  -95,   43, -101,  -93,   27,   66, -104,   65,   97,    6,    6,   15,
+     -69,   48,  -71,  -81,   52,   55,   58,    6,   53,   67,    8,   51,   64,  -52,   32,   33,
+      98,   23,   38,   -9,  -59,  -10,  -26,  118,  -58,  -64,  102,    8,   97,    6, -117,   25,
+      48,   76,  -20,  -62,  -28,  -66,  -52,  -40,  -34,  -62,  -24, -122,   16,  102,  -32, -104,
      -63,   64,  -59,   46,   76,  -18, -117,  -20,  -83,   78, -116,  -83, -116, -127,  -52,   16,
-      98,   12,  -96,   49, -120,  -24,  -40, -123,  -55,  125, -123,  -79,  -79,  -67, -115, -123,
-     -47,  -91,  -67,  -71,   81, -112, -127,   25,   66, -116,  -63,   52,    6,   20,   19,  -69,
-      48,  -71,  -81,   48,   57,  -71,  -80,   60,   62,   60,   67,  111,  110,  115,  116,   97,
-     110,  116,   65,  114,  114,   97,  121,   62,   67, -120,   49,  -80,  -58,  -32,  -94,   98,
-      23,   38,   -9,    5,   -9, -106,  -26,   70,   39,   67,    3,  -22,   45,  -51, -115,   78,
-     102,    8,   49,    6,  -39,   24,  104,  116,  -20,  -62,  -28,  -66,  -32,  -34,  -46,  -36,
-     -24,  100,  -66,  -32,  -24,  -28,  120,  -88,   64,  -67,  -91,  -71,  -47,  -55,   12,   33,
-     -58, -128,   27, -125, -114,    1,  -51,   16,   97,   12,   62,   34,  102,  117,  110,   99,
-     116,  105,  111,  110,   67, -124,   49,    8,    3,   70,   46,  104,  101,  108,  112,  101,
-     114,   95,  102,  117,  110,   99,  116,  105,  111,  110,   86,   67, -124,   49,   24,    3,
-      18,  114,  111,  111,  116,   67, -124,   49,   40,    3,   38,  105,  110,   99,  114,  101,
-     109,  101,  110,  116,   67, -124,   49,   56,    3,    6,   48,   67, -124,   49,   72,    3,
-      10,   51,   53,   67, -124,   49,   88,    3,   38,  115,  117,  109,  109,   97,  116,  105,
-     111,  110,  116,  -26,  -22,  -38, -126,  -58,  -58,  -22,  -38,  -22,  -40,  -62,  -24,  -34,
-     -28, -122,   16,   99,  -32,    6,   99,   48,  112, -103,  -85,  107,   27,  122,  107,   19,
-      75,  115,   43, -109,   27,  -94, -116,   65,   27, -116,  -63,   55,    6,  111,   32,    1,
-      99,    0,    7,   67, -124,   49,  -48,   24,  -32,  113,   72,  115,  -93,   27,   66, -116,
-     -63,   28, -116,    1,   29,   48,  -56,   27,   66, -116, -127,   29, -116,    1,   29,  -16,
-     121,  107,  115,   75, -125,  123,  -93,   43,  115,  -93,    3,   25,   67,   11, -109,   99,
-      52, -107,  -42,    6,  -57,   86,    6,   50,  -12,   50,  -76,  -78,    2,   66,   37,   20,
-      20,   52,   68,   24, -125,   60,   24,   34,    8,  -45,   16,   99,   12,  -16,   96,   12,
-     -12,   64, -104, -122,   24,   99,   64,    7,   99,  -64,    7,  -62,   52,  -60,   24, -125,
-      62,   24, -125,   62,   16,   38,   18,  108,  111,  110,  103,   67, -116,   49,   -8, -125,
-      49,  -32,    3,   97,   26,   98, -116,    1,   40, -116,    1,   40,    8,   19,   11,   51,
-     -74,  -73,   48,  -70,   33,  -58,   24, -120,  -62,   24,  -16, -127,   48,   13,   49,  -58,
-      96,   20,  -58,   96,   20, -124, -119,    6,  -39,   91,  -99,   24,   91,  -39,   16,   99,
-      12,   74,   97,   12,   -8,   64, -104, -122,   24,   99,   96,   10,   99,   96,   10,  -62,
-      84, -123, -115,  -51,  -82,  -51,   37, -115,  -84,  -52, -115,  110,   74,   16,  -12,   24,
-    -127, -109,   11,   59,  107,   11, -101,   34,   16,   71,  -99,   17,  -71,  -71,  -81,   50,
-      60,  -72,   55,   57,  -70,   47,  -69,   48,  -71,   41, -120,  -46,   60,   82, -123,  109,
-      94,  -95,   17,  -71,  -71,  -81,   55,   49,  -75,  -78,   49,  -70,  -81,   57,  -74,   55,
-     -70,  -71,   41,    1,   24,  -12,   25, -111, -101,   -5,   42,  -61, -125,  123, -109,  -93,
-      -5,   50,  -85,  115,   27, -101,   34, -120,    1,   25,  -12,   26, -111, -101,   -5,   42,
-     -61, -125,  123, -109,  -93,   -5,   50,  123, -109,   43,   11,   27,   67,   -5,  114,   11,
-     107,   43, -101,   34, -104,    1,   26,   84,   26, -111, -101,   -5,   42,  -61, -125,  123,
-    -109,  -93,   -5,   50,  123, -109,   43,   11,   27,   67, -101,   34,  -88,    1,   27,   52,
-      26, -111, -101,   -5,   42,  -61, -125,  123, -109,  -93,   -5, -110,   43,   35,  -85,   27,
-      43, -101,   18,  -60,   65,  -97,   17,  -71,  -71,  -81,   50,   60,  -72,   55,   57,  -70,
-      47,  -70,   60,  -72,  -78,   41, -127,   28,  -12,   40, -127,  122,   75,  115,  -93, -109,
-    -103,   34,  -44,  -63,   29,    0,    0,    0,  121,   24,    0,    0,   92,    0,    0,    0,
-      51,    8, -128,   28,  -60,  -31,   28,  102,   20,    1,   61, -120,   67,   56, -124,  -61,
-    -116,   66, -128,    7,  121,  120,    7,  115, -104,  113,   12,  -26,    0,   15,  -19,   16,
-      14,  -12, -128,   14,   51,   12,   66,   30,  -62,  -63,   29,  -50,  -95,   28,  102,   48,
-       5,   61, -120,   67,   56, -124, -125,   27,  -52,    3,   61,  -56,   67,   61, -116,    3,
-      61,  -52,  120, -116,  116,  112,    7,  123,    8,    7,  121,   72, -121,  112,  112,    7,
-     122,  112,    3,  118,  120, -121,  112,   32, -121,   25,  -52,   17,   14,  -20, -112,   14,
-     -31,   48,   15,  110,   48,   15,  -29,  -16,   14,  -16,   80,   14,   51,   16,  -60,   29,
-     -34,   33,   28,  -40,   33,   29,  -62,   97,   30,  102,   48, -119,   59,  -68, -125,   59,
-     -48,   67,   57,  -76,    3,   60,  -68, -125,   60, -124,    3,   59,  -52,  -16,   20,  118,
-      96,    7,  123,  104,    7,   55,  104, -121,  114,  104,    7,   55, -128, -121,  112, -112,
-    -121,  112,   96,    7,  118,   40,    7,  118,   -8,    5,  118,  120, -121,  119, -128, -121,
-      95,    8, -121,  113,   24, -121,  114, -104, -121,  121, -104, -127,   44,  -18,  -16,   14,
-     -18,  -32,   14,  -11,  -64,   14,  -20,   48,    3,   98,  -56,  -95,   28,  -28,  -95,   28,
-     -52,  -95,   28,  -28,  -95,   28,  -36,   97,   28,  -54,   33,   28,  -60, -127,   29,  -54,
-      97,    6,  -42, -112,   67,   57,  -56,   67,   57, -104,   67,   57,  -56,   67,   57,  -72,
-     -61,   56, -108,   67,   56, -120,    3,   59, -108,  -61,   47,  -68, -125,   60,   -4, -126,
-      59,  -44,    3,   59,  -80,  -61,   12,  -57,  105, -121,  112,   88, -121,  114,  112, -125,
-     116,  104,    7,  120,   96, -121,  116,   24, -121,  116,  -96, -121,   25,  -50,   83,   15,
-     -18,    0,   15,  -14,   80,   14,  -28, -112,   14,  -29,   64,   15,  -31,   32,   14,  -20,
-      80,   14,   51,   32,   40,   29,  -36,  -63,   30,  -62,   65,   30,  -46,   33,   28,  -36,
-    -127,   30,  -36,  -32,   28,  -28,  -31,   29,  -22,    1,   30,  102,   24,   81,   56,  -80,
-      67,   58, -100, -125,   59,  -52,   80,   36,  118,   96,    7,  123,  104,    7,   55,   96,
-    -121,  119,  120,    7,  120, -104,   81,   76,  -12, -112,   15,  -16,   80,   14,    0,    0,
-     113,   32,    0,    0,   56,    0,    0,    0,    6,   17,    6,   -1,   92,  -33, -111,  -60,
-      45,    4,   16,  -95,   65,   66,    8,   83,   90,  -33, -111,  -12,    3,  -53,  -30,    8,
-     -64, -124,   56, -115,   13,   40,   21,   16,   -3, -125,   67,    5,   11,   97,    5,   74,
-       5,   68,   -1,  -29,   32,  -51,  100,   27,   67, -126,   52,   66,   68,   48,   68,   51,
-    -103,    2,   82,   80, -115,   48,   33,   78,   99,    4,   73,    5,   68,   63,   16,   69,
-       0,  102,   17, -111,  127,   16,  -53,   67,   68,  127,   65,   53,  -62, -124,   56,  -51,
-     107,   14, -117,   68,   49, -100,  -61,    4,   72,   67,   68,  102,  -32,   84,   64,  -12,
-       3,  -53,  -30,    8,  -64, -124,   56, -115,   33,  112,  126,   36,   -7,   17,   49,   80,
-       2,  -15,   23, -115,   47,   81, -116,   38,    8,   20,   67,   45,  -64,  -28,   68,    6,
-     112,   84,   64,  -12,   35,  -51,  100,   13, -114,   68,   49, -102,   32,   80,   12,  -75,
-       0, -109,   19,   89,    0,   82,    1,  -47,  -65,   56, -115,   97,    7,   78,    5,   68,
-      -1,  -29,   32,  -51,  100,   -1,  -49,   20,  -39,    3,  -30,   71, -110,   63,   76,   78,
-     100,   11,   73,   65,   53,  -62, -124,   56,  -51,  107,    2,   73,    5,   68,  127,  -79,
-      56,  -64,  100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,
-      20,  -61,   57,   76, -128,   52,   68,    4,   97,   32,    0,    0,   55,    0,    0,    0,
-      19,    4,   65,   44,   16,    0,    0,    0,   21,    0,    0,    0,    4, -108,   64,   41,
-      20,   67,   57,   20,   68,   73,   20,    5,    9,  101,   80,    2,   69,   64,  -63,   80,
-      70,   66,    8, -109,   48,    6,   67,   25,   75,   33,   76, -128,   52, -108,  -79,   20,
-     -62,    4,  112,   67,   25,    9,   33,   76,   66,   25,   12,  101,   36, -124,   48,    9,
-     100,   48, -108, -111,   16,  -62,   36,   76,   68, -116,   17, -128,   32,    8, -110,   96,
-      64,  -58,   24,    1,    8, -126,   32,    8, -126,   32,    8, -110,   32,    1,    0,    0,
-    -125,   17,    0,   55,    0, -125,   17,   65,   25,   16,  -64,   96, -124,  -64,    6,    3,
-      48,   24,   49,  -76,    1,    1,   12,   70,  -84,   65,   55,    0, -125,   17,  106,  -32,
-      13,  -64,   96,   68,   26,  124,    3,   48,   24,   97,    6,   96,   48,    0, -125,   17,
-     103,   16,    6,    3,   48,   24, -127,    6,   98,   48,    0,   24,   16,    3,    0,    0,
-      13,    0,    0,    0,   91,    6,   32,  -16, -125,   45,   67,   16, -124,  -62, -106,   65,
-       8,   72,   97,  -53,   48,    4,  -89,  -80,  101,   32,    2,   63,  -40,   50,   20, -127,
-      31,  108,   25, -116,  -64,   15,  -74,   12,   71,  -32,    7,   91,    6,   36,  -16, -125,
-      45,   67,   18,   -8,    1,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
-      11,    0,    0,    0,   19,    4,  -63,   96,    4,  -64,   13,    0, -122,    3,    1,    0,
-       2,    0,    0,    0,  -58,   49,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,
-       2,    0,    0,    0,   91,    6,   32,  -16,    3,    0,    0,    0,    0,    0,    0,    0,
+     -62,   12,   32,   51, -120,  -24,  -40, -123,  -55,  125, -123,  -79,  -79,  -67, -115, -123,
+     -47,  -91,  -67,  -71,   81, -112, -127,   25,   66, -104,  -63,  100,    6,   20,   25,  -69,
+      48,  -71,  -81,  -70,   52,   55,  -70,   25, -103,   47,   58,    6,   57,   67,    8,   51,
+     -80,  -52,  -32,  -94,   98,   23,   38,   -9,    5,   -9, -106,  -26,   70,   39,   67,    3,
+     -22,   45,  -51, -115,   78,  102,    8,   97,    6, -103,   25,  104,   92,  -20,  -62,  -28,
+     -66,  -46,  -36,  -24,  -66,  -32,  -24,  -28,   72,  -88,  -92,  -71,  -47,   13,   33,  -52,
+    -128,   51, -125, -114,    1,  -51,   16,  -63,   12,   62,   34,  102,  117,  110,   99,  116,
+     105,  111,  110,   67,    4,   51,    8,    3,   70,   46,  104,  101,  108,  112,  101,  114,
+      95,  102,  117,  110,   99,  116,  105,  111,  110,   86,   67,    4,   51,   24,    3,   70,
+      46,  104,  101,  108,  112,  101,  114,   95,  115,  101,  116,   66,  117,  102,  102,  101,
+     114,   67,    4,   51,   40,    3,   86,   46,  104,  101,  108,  112,  101,  114,   95,  115,
+     101,  116,   65,  108,  108,  111,   99,   97,  116,  105,  111,  110,   67,    4,   51,   56,
+       3,   18,  114,  111,  111,  116,   67,    4,   51,   72,    3,   38,  105,  110,   99,  114,
+     101,  109,  101,  110,  116,   67,    4,   51,   88,    3,    6,   48,   67,    4,   51,  104,
+       3,   10,   51,   53,   67,    4,   51,  120,    3,   38,  115,  117,  109,  109,   97,  116,
+     105,  111,  110,  116,  -26,  -22,  -38, -126,  -58,  -58,  -22,  -38,  -22,  -40,  -62,  -24,
+     -34,  -28, -122,   16,  102,   32,    7,  102,   48,  112, -103,  -85,  107,   27,  122,  107,
+      19,   75,  115,   43, -109,   27,  -94, -104,   65,   28, -104,  -63,  103,    6,  115,    0,
+       1,  102,   64,    7,   67,    4,   51,  -48,   24,  -32,  113,   72,  115,  -93,   27,   66,
+    -104,  -63,   29, -104,    1,   30,   48,  -56,   27,   66, -104, -127,   30, -104,    1,   30,
+     -16,  121,  107,  115,   75, -125,  123,  -93,   43,  115,  -93,    3,   25,   67,   11, -109,
+      99,   52, -107,  -42,    6,  -57,   86,    6,   50,  -12,   50,  -76,  -78,    2,   66,   37,
+      20,   20,   52,   68,   48, -125,   62,   24,   34,    8,  -38,   16,  -61,   12,   -8,  -64,
+      12,   -4,   64,  -48, -122,   24,  102, -128,    7,  102,    0,   10, -126,   54,  -60,   48,
+    -125,   80,   48, -125,   80,   16,   52,   18,  108,  111,  110,  103,   67,   12,   51,   24,
+       5,   51,    0,    5,   65,   27,   98, -104,    1,   41, -104,    1,   41,    8,   26,   11,
+      51,  -74,  -73,   48,  -70,   33, -122,   25, -104, -126,   25, -128, -126,  -96,   13,   49,
+     -52,  -32,   20,  -52,  -32,   20,    4, -115,    6,  -39,   91,  -99,   24,   91,  -39,   16,
+     -61,   12,   82,  -63,   12,   64,   65,  -48, -122,   24,  102,  -96,   10,  102,  -96,   10,
+    -126,  -58,   37,  -52,   45,   15,    4,  -18,   45,  -51, -115,  -82,   76,  110, -120,   97,
+       6,  -84,   96,    6,  -96,   32,  104,   67,   12,   51,  104,    5,   51,  104,    5,   65,
+      27,   34,    8,  -37,   16,   65,  -32, -122,    8,   66,   54,    4,   19,   52,   97,   51,
+       3,   87,   16,   54,   97,   51,    3,   87,   16,   56,   97,   51,    3,   87,   16,   50,
+      97,   51,    3,   87,  -88,  -62,  -58,  102,  -41,  -26, -110,   70,   86,  -26,   70,   55,
+      37,    8,  122, -116,  -64,  -55, -123,  -99,  -75, -123,   77,   17, -120,  -93,  -50, -120,
+     -36,  -36,   87,   25,   30,  -36, -101,   28,  -35, -105,   93, -104,  -36,   20,   68,  105,
+      30,  -87,  -62,   54,  -81,  -48, -120,  -36,  -36,  -41, -101, -104,   90,  -39,   24,  -35,
+     -41,   28,  -37,   27,  -35,  -36, -108,    0,   12,   -6, -116,  -56,  -51,  125, -107,  -31,
+     -63,  -67,  -55,  -47,  125, -103,  -43,  -71, -115,   77,   33,  -60, -128,   12,  -52,    0,
+      13,  122, -115,  -56,  -51,  125, -107,  -31,  -63,  -67,  -55,  -47,  125, -103,  -67,  -55,
+    -107, -123, -115,  -95,  125,  -71, -123,  -75, -107,   77,   17,  -44, -128,   13,   42, -115,
+     -56,  -51,  125, -107,  -31,  -63,  -67,  -55,  -47,  125, -103,  -67,  -55, -107, -123, -115,
+     -95,   77,   17,  -36,    0,   14,   26, -115,  -56,  -51,  125, -107,  -31,  -63,  -67,  -55,
+     -47,  125,  -55, -107, -111,  -43, -115, -107,   77,    9,  -22,  -96,  -49, -120,  -36,  -36,
+      87,   25,   30,  -36, -101,   28,  -35,   23,   93,   30,   92,  -39, -108,  -64,   14,  122,
+    -108,   64,  -67,  -91,  -71,  -47,  -55,   76,   17,  -14,   96,   15,    0,    0,    0,    0,
+     121,   24,    0,    0,   92,    0,    0,    0,   51,    8, -128,   28,  -60,  -31,   28,  102,
+      20,    1,   61, -120,   67,   56, -124,  -61, -116,   66, -128,    7,  121,  120,    7,  115,
+    -104,  113,   12,  -26,    0,   15,  -19,   16,   14,  -12, -128,   14,   51,   12,   66,   30,
+     -62,  -63,   29,  -50,  -95,   28,  102,   48,    5,   61, -120,   67,   56, -124, -125,   27,
+     -52,    3,   61,  -56,   67,   61, -116,    3,   61,  -52,  120, -116,  116,  112,    7,  123,
+       8,    7,  121,   72, -121,  112,  112,    7,  122,  112,    3,  118,  120, -121,  112,   32,
+    -121,   25,  -52,   17,   14,  -20, -112,   14,  -31,   48,   15,  110,   48,   15,  -29,  -16,
+      14,  -16,   80,   14,   51,   16,  -60,   29,  -34,   33,   28,  -40,   33,   29,  -62,   97,
+      30,  102,   48, -119,   59,  -68, -125,   59,  -48,   67,   57,  -76,    3,   60,  -68, -125,
+      60, -124,    3,   59,  -52,  -16,   20,  118,   96,    7,  123,  104,    7,   55,  104, -121,
+     114,  104,    7,   55, -128, -121,  112, -112, -121,  112,   96,    7,  118,   40,    7,  118,
+      -8,    5,  118,  120, -121,  119, -128, -121,   95,    8, -121,  113,   24, -121,  114, -104,
+    -121,  121, -104, -127,   44,  -18,  -16,   14,  -18,  -32,   14,  -11,  -64,   14,  -20,   48,
+       3,   98,  -56,  -95,   28,  -28,  -95,   28,  -52,  -95,   28,  -28,  -95,   28,  -36,   97,
+      28,  -54,   33,   28,  -60, -127,   29,  -54,   97,    6,  -42, -112,   67,   57,  -56,   67,
+      57, -104,   67,   57,  -56,   67,   57,  -72,  -61,   56, -108,   67,   56, -120,    3,   59,
+    -108,  -61,   47,  -68, -125,   60,   -4, -126,   59,  -44,    3,   59,  -80,  -61,   12,  -57,
+     105, -121,  112,   88, -121,  114,  112, -125,  116,  104,    7,  120,   96, -121,  116,   24,
+    -121,  116,  -96, -121,   25,  -50,   83,   15,  -18,    0,   15,  -14,   80,   14,  -28, -112,
+      14,  -29,   64,   15,  -31,   32,   14,  -20,   80,   14,   51,   32,   40,   29,  -36,  -63,
+      30,  -62,   65,   30,  -46,   33,   28,  -36, -127,   30,  -36,  -32,   28,  -28,  -31,   29,
+     -22,    1,   30,  102,   24,   81,   56,  -80,   67,   58, -100, -125,   59,  -52,   80,   36,
+     118,   96,    7,  123,  104,    7,   55,   96, -121,  119,  120,    7,  120, -104,   81,   76,
+     -12, -112,   15,  -16,   80,   14,    0,    0,  113,   32,    0,    0,   84,    0,    0,    0,
+      70,  -64,   84,   64,  -12,   83,   72,   51,  -35,  -10,   63,  -39, -128,   82,    1,  -47,
+      63,   56,   84,  -80,   16,  -90, -128,   20,   84,   35,   76, -120,  -45, -104,  -63,   82,
+       1,  -47, -113,   52,  -45,   -1,   76, -111,   53,   52,   18,   49,  105,  -53,  -30,    8,
+     -64, -124,   56, -115,   61,  100,  -53,   82,   49,   62,   67,   48,  -62, -125,   -7,   15,
+    -115,  -16,   -2,   67,   35,  -68, -113,  -24,  -72,    5,   32,   21,   16,   -3, -117,  -45,
+      24,  -74, -112,   20,   84,   35,   76, -120,  -45,  -68,  -26, -112,    6,   -1,  108,  -45,
+    -111,  -60,   18, -109,  -73,   16,   12,  -47,   76,  -38,  -12,   83,  -62,    1,   68,  -11,
+      29,   73,   63,  -80,   44, -114,    0,   76, -120,  -45,   28, -119,   81, -124,  -63,   63,
+     -41,  119,   36,  113,   11,    1,   68,  104, -112,   16,  -62, -108,  -42,  119,   36,   -3,
+     -64,  -78,   56,    2,   48,   33,   78,   99,    2,   73,    5,   68,  127,  -79,   56,  -64,
+     100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,   20,  -61,
+      57,   76, -128,   52,   68,  100,   23, -107,  127,   16,  -53,   67,   68,  -65,   68,   76,
+     -38,  -78,   56,    2,   48,   33,   78,   99,    5,   74,    5,   68,   -1,  -29,   32,  -51,
+     100,   27,   68, -126,   52,   66,   68,   48,   68,   51,   25,   67,   34,   17,  -45,   70,
+      21,    5,   17, -103,  -60,   34,   81,   12,  -25,   48,    1,  -46,   16, -111,   85,   68,
+      -2,   65,   44,   15,   17,   -3,    5,  -43,    8,   19,  -30,   52,  -81,   29,   56,   21,
+      16,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,    8, -100,   31,   73,  126,   68,
+      12, -108,   64,   -4,   69,  -29,   75,   20,  -93,    9,    2,  -59,   80,   11,   48,   57,
+    -111,    1,   28,   21,   16,   -3,   72,   51, -103,   69,  -28,   31,  -60,  -14,   16,  -47,
+      47,   17,  -45,   70,   21,    5,   17,   89, -124,   35,   81, -116,   38,    8,   20,   67,
+      45,  -64,  -28,   68,   54, -127,   -8, -111,  -28,   15, -109,   19,    1,    0,    0,    0,
+      97,   32,    0,    0,   38,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
+      12,    0,    0,    0,    4, -108,   64,   41,   20,   67,   57, -112,   80,    4,   20,   12,
+     101,   36, -123,  -96,    1,  100,   48, -108, -111,   20, -126,    6,   96,   68, -116,   17,
+    -128,   32,    8, -110,   96,   64,  -58,   24,    1,    8, -126,   32,    8, -126,   32,    8,
+    -110,   32,    1,    0, -125,   17,    0,   25,   12,  -64,   96,   68, -128,    6,    4,   48,
+      24,   33,  -84,  -63,    0,   12,   70,   12,  108,   64,    0, -125,   17,   68,   25,   12,
+     -64,   96, -124,   26, -104,  -63,    0,   12,   70,  -92,  -63,   25,   12,    0,    6,  -60,
+       0,    0,    0,    0,    9,    0,    0,    0,   91,    6,   32,   16, -123,   45,   67,   16,
+    -108,  -62, -106,   65,    8,   80,   97,  -53,   48,    4,  -85,  -80,  101,   32,    2,   81,
+     -40,   50,   20, -127,   40,  108,   25, -116,   64,   20,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   11,    0,    0,    0,   19,    4,  -63,   96,    4,   64,    6,    3,
+    -128,  -31,   64,    0,    2,    0,    0,    0,   70,   50,    0, -111,    1,    0,    0,    0,
+       1,   49,    0,    0,    2,    0,    0,    0,   91,    6,   32,   16,    5,    0,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   46,    0,    0,    0,   19,    4,   68,   44,
+      16,    0,    0,    0,    2,    0,    0,    0,    4, -108,    2,    9,   37,    0,    0,    0,
+     -61,   13,  100, -128, -103,  -63,   44,   67,   48, -100,    1,   25,  100, -106,   64,   24,
+     -88,   16,  -76,   96,   13, -124,  -15,    4,   52,   72, -125,  -63,    8,   53,   40, -125,
+       1,  -80,   52,   48,    3,   24,  -36,   26,    0,   48,  -36,  -64,    6,  100,    0,    6,
+     -77,   12, -125,  -48,    6,   24,   14,    4,   20,    0,    0,    0,  -90, -126,    0,   81,
+       4,   96,  -56,  112,   89, -118, -126,   52,   67,    5,   68, -110, -113,   84,  -58,  -78,
+      44,  -59,   20,   -7,   22,   50,   16,   72,  101,   43,   15,  -46,   12,   21,   16,   73,
+      62,   82,   -7,   13,  113,   77,   23,   96,   -8,   75,  -28,   63,  -57,   13,   44,   -2,
+      47,   68,  -56,  -12,   19, -125,   65,  -40,    9,   33,   48,   15,  110,   36,  -61, -128,
+      48,  -42, -126,   16,   23,   50,    9,   78,   51,    0,    0,    0,    1,   49,    0,    0,
+       3,    0,    0,    0,   91,    6,   33,  112, -123,   45, -125,   17, -120,    2,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   45,    0,    0,    0,   19,    4,   68,   44,
+      16,    0,    0,    0,    5,    0,    0,    0,    4, -108,   64,   65, -112,   80,   64,  -44,
+    -108,    3,   93,   35,    0,  -28,  -40,   50,    7,    0,    0,    0,   51,   17,   12,   80,
+       6,  -60,  112,    3,   25,   96,  102,   48,  -53,   16,   12,  108,  112,  107,  -32,  -20,
+      44, -127,   48,   80,    1,   96,  -63,   27,    8,   35,    6,    8,    0,   60,  109,  -96,
+       6,  103,   96,    6,  105,   48,   98,   96,   40, -128,  -77,    6,  104,  -32,    6,  -26,
+       6,  101,    0, -125,  -31, -122,   55,   32,    3,   48, -104,  101,   24,    4,   56,  -64,
+     112,   32,    0,    0,   13,    0,    0,    0,  -74,   50,   76,  -52,  115,    1, -122,  -65,
+      68,   -2,  115,  -36,  -64,  -30,   -1,   66, -124,   76,   63,   49,   24, -124,  -79,   16,
+       2,  -13,  -32,   70,   50,   12,    8,   99,   47,    3,  -46,    8,  -26,   66,   92,   62,
+     -99,   27,   12,   66,   92,  -56,   36,   56,  -51,    0,    0,    0,    1,   49,    0,    0,
+       2,    0,    0,    0,   91,    6,  -93, -112,    5,    0,    0,    0,    0,    0,    0,    0,
       97,   32,    0,    0,   15,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
-       1,    0,    0,    0,    4, -108,    0,    0,  -57,    1,   97,   94,    7, -125,   -5,   30,
-      72,   48,    8,    7,    2,    0,    0,    0,    5,    0,    0,    0,  -26,   65,    8,   78,
-      83,   25, -121, -128,   52,    6,   82,    8,   78,   83,  -43,  -10,   49,    0,  -61,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,   15,    0,    0,    0,   19,    4,    1,  113,
-     -61,  -68,   14,    4, -125,   17,  -36,   55,    0,   24,   14,    4,    4,    0,    0,    0,
-     -42,   49,   84,  -64,   98,   28,    5,   32,    8,   20,   99,   31,    3,   48,   12,    0,
-       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,  -16, -125,   45, -125,   16,
-      -8,    1,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   17,    0,    0,    0,
-      19,    4,    1,  117, -125,  -72,   97,  -97,    7, -126,  -63,    8,   14,   12,    6,    0,
-     -61, -127,    0,    0,    4,    0,    0,    0,  -42,   49,   84,  -64,   98,   28,    5,   32,
-       8,   20,   99,   32,    3,   48,   12,    0,    1,   49,    0,    0,    4,    0,    0,    0,
-      91,    6,   32,  -16, -125,   45,   67,   16,   -8,  -63, -106,   97,    8,   -4,    0,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,   19,    4,  -63, -120,
-       1, -127,    4, -112, -127,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
-      19,    4,  -63,  120,    3,   55,   73,  -44, -115,   17,    3,    2,    8,   22,   15,  -61,
-    -127,    0,    0,    0,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
+       1,    0,    0,    0,    4, -108,    0,    0,   71,    6,   64, -104,   25, -108,    1,   12,
+     -18,   12,   26,   72,   52,    8,    7,    2,    5,    0,    0,    0,  102,   66,    8,   78,
+      83,   25, -119, -128,   52, -122,   82,    8,   78,   83,  -43,  118,   50,    0,  -61,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1, -111,
+     -63,   48,   51,   40,    3,   16,   12,   70, -112,  -63,   25,   12,    0, -122,    3,    1,
+       4,    0,    0,    0,   86,   50,   84,  -64,   98,   36,    5,   32,    8,   20,   99,   39,
+       3,   48,   12,    0,    1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   16,
+    -123,   45, -125,   16, -120,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+      18,    0,    0,    0,   19,    4,    1, -107,  -63,   32,   50,   24,  118,    6,  102,    0,
+    -126,  -63,    8,   50,   64, -125,    1,  -64,  112,   32,    0,    0,    4,    0,    0,    0,
+      86,   50,   84,  -64,   98,   36,    5,   32,    8,   20,   99,   40,    3,   48,   12,    0,
+       1,   49,    0,    0,    4,    0,    0,    0,   91,    6,   32,   16, -123,   45,   67,   16,
+    -120,  -62, -106,   97,    8,   68,    1,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+       3,    0,    0,    0,   19,    4,  -63, -120,    1,  -95,    4,  -44, -127,    0,    0,    0,
+      97,   32,    0,    0,    9,    0,    0,    0,   19,    4,  -63,  120,    3,   25,  104,   24,
+    -107,  -63,   24,   49,   32, -128,   96,   49,    3,   12,    7,    2,    2,    0,    0,    0,
+       7,   80,   16,  -51,   20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+       9,    0,    0,    0,   19,    4,  -63,  120,    3,   25,  104,   24, -107,  -63,   24,   49,
+      32, -128, -128,   49,    3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,
+      20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
+      19,    4,  -63,  120,    3,   25,  104,   24, -107,  -63,   24,   49,   32, -128,  -96,   49,
+       3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,
 };
 
-const int bitCodeLength = 2744;
+const int bitCodeLength = 3480;
 
 #endif
diff --git a/sensors/1.0/ISensors.hal b/sensors/1.0/ISensors.hal
index 5c8301a..8d41de2 100644
--- a/sensors/1.0/ISensors.hal
+++ b/sensors/1.0/ISensors.hal
@@ -37,7 +37,8 @@
      */
     setOperationMode(OperationMode mode) generates (Result result);
 
-    /* Activate/de-activate one sensor.
+    /**
+     * Activate/de-activate one sensor.
      *
      * After sensor de-activation, existing sensor events that have not
      * been picked up by poll() must be abandoned immediately so that
@@ -76,7 +77,7 @@
                 vec<Event> data,
                 vec<SensorInfo> dynamicSensorsAdded);
 
-    /*
+    /**
      * Sets a sensor’s parameters, including sampling frequency and maximum
      * report latency. This function can be called while the sensor is
      * activated, in which case it must not cause any sensor measurements to
@@ -96,7 +97,7 @@
           int64_t samplingPeriodNs,
           int64_t maxReportLatencyNs) generates (Result result);
 
-    /*
+    /**
      * Trigger a flush of internal FIFO.
      *
      * Flush adds a FLUSH_COMPLETE metadata event to the end of the "batch mode"
@@ -113,7 +114,7 @@
      */
     flush(int32_t sensorHandle) generates (Result result);
 
-    /*
+    /**
      * Inject a single sensor event or push operation environment parameters to
      * device.
      *
@@ -137,7 +138,7 @@
      */
     injectSensorData(Event event) generates (Result result);
 
-    /*
+    /**
      * Register direct report channel.
      *
      * Register a direct channel with supplied shared memory information. Upon
@@ -156,7 +157,7 @@
     registerDirectChannel(SharedMemInfo mem)
             generates (Result result, int32_t channelHandle);
 
-    /*
+    /**
      * Unregister direct report channel.
      *
      * Unregister a direct channel previously registered using
@@ -169,7 +170,7 @@
      */
     unregisterDirectChannel(int32_t channelHandle) generates (Result result);
 
-    /*
+    /**
      * Configure direct sensor event report in direct channel.
      *
      * This function start, modify rate or stop direct report of a sensor in a
diff --git a/sensors/1.0/types.hal b/sensors/1.0/types.hal
index efb18c6..3926e2f 100644
--- a/sensors/1.0/types.hal
+++ b/sensors/1.0/types.hal
@@ -22,7 +22,7 @@
  * http://source.android.com/devices/sensors/index.html
  */
 
-/* Type enumerating various result codes returned from ISensors methods */
+/** Type enumerating various result codes returned from ISensors methods */
 enum Result : int32_t {
     OK,
     PERMISSION_DENIED                   = -1,
@@ -31,7 +31,7 @@
     INVALID_OPERATION                   = -38,
 };
 
-/*
+/**
  * Sensor HAL modes used in setOperationMode method
  */
 @export(name="", value_prefix="SENSOR_HAL_", value_suffix="_MODE")
@@ -40,7 +40,7 @@
     DATA_INJECTION                  = 1,
 };
 
-/*
+/**
  * Sensor type
  *
  * Each sensor has a type which defines what this sensor measures and how
@@ -88,7 +88,7 @@
  *  - This way, all applications can now use this sensor.
  */
 
-/*
+/**
  * Wake up sensors.
  * Each sensor may have either or both a wake-up and a non-wake variant.
  * When registered in batch mode, wake-up sensors will wake up the AP when
@@ -116,14 +116,15 @@
 
 @export(name="", value_prefix="SENSOR_TYPE_")
 enum SensorType : int32_t {
-    /* META_DATA is a special event type used to populate the MetaData
+    /**
+     * META_DATA is a special event type used to populate the MetaData
      * structure. It doesn't correspond to a physical sensor. Events of this
      * type exist only inside the HAL, their primary purpose is to signal the
      * completion of a flush request.
      */
     META_DATA                       = 0,
 
-    /*
+    /**
      * ACCELEROMETER
      * reporting-mode: continuous
      *
@@ -135,7 +136,7 @@
      */
     ACCELEROMETER                   = 1,
 
-    /*
+    /**
      * MAGNETIC_FIELD
      * reporting-mode: continuous
      *
@@ -147,7 +148,7 @@
      */
     MAGNETIC_FIELD                  = 2,
 
-    /*
+    /**
      * ORIENTATION
      * reporting-mode: continuous
      *
@@ -161,7 +162,7 @@
      */
     ORIENTATION                     = 3,
 
-    /*
+    /**
      * GYROSCOPE
      * reporting-mode: continuous
      *
@@ -173,7 +174,7 @@
      */
     GYROSCOPE                       = 4,
 
-    /*
+    /**
      * LIGHT
      * reporting-mode: on-change
      *
@@ -183,7 +184,7 @@
      */
     LIGHT                           = 5,
 
-    /*
+    /**
      * PRESSURE
      * reporting-mode: continuous
      *
@@ -194,10 +195,10 @@
      */
     PRESSURE                        = 6,
 
-    /* TEMPERATURE is deprecated in the HAL */
+    /** TEMPERATURE is deprecated in the HAL */
     TEMPERATURE                     = 7,
 
-    /*
+    /**
      * PROXIMITY
      * reporting-mode: on-change
      *
@@ -210,7 +211,7 @@
      */
     PROXIMITY                       = 8,
 
-    /*
+    /**
      * GRAVITY
      * reporting-mode: continuous
      *
@@ -222,7 +223,7 @@
      */
     GRAVITY                         = 9,
 
-    /*
+    /**
      * LINEAR_ACCELERATION
      * reporting-mode: continuous
      *
@@ -234,7 +235,7 @@
      */
     LINEAR_ACCELERATION             = 10,
 
-    /*
+    /**
      * ROTATION_VECTOR
      * reporting-mode: continuous
      *
@@ -246,7 +247,7 @@
      */
     ROTATION_VECTOR                 = 11,
 
-    /*
+    /**
      * RELATIVE_HUMIDITY
      * reporting-mode: on-change
      *
@@ -257,7 +258,7 @@
      */
     RELATIVE_HUMIDITY               = 12,
 
-    /*
+    /**
      * AMBIENT_TEMPERATURE
      * reporting-mode: on-change
      *
@@ -267,7 +268,7 @@
      */
     AMBIENT_TEMPERATURE             = 13,
 
-    /*
+    /**
      * MAGNETIC_FIELD_UNCALIBRATED
      * reporting-mode: continuous
      *
@@ -279,7 +280,7 @@
      */
     MAGNETIC_FIELD_UNCALIBRATED     = 14,
 
-    /*
+    /**
      * GAME_ROTATION_VECTOR
      * reporting-mode: continuous
      *
@@ -291,7 +292,7 @@
      */
     GAME_ROTATION_VECTOR            = 15,
 
-    /*
+    /**
      * GYROSCOPE_UNCALIBRATED
      * reporting-mode: continuous
      *
@@ -303,7 +304,7 @@
      */
     GYROSCOPE_UNCALIBRATED          = 16,
 
-    /*
+    /**
      * SIGNIFICANT_MOTION
      * reporting-mode: one-shot
      *
@@ -316,7 +317,7 @@
      */
     SIGNIFICANT_MOTION              = 17,
 
-    /*
+    /**
      * STEP_DETECTOR
      * reporting-mode: special
      *
@@ -328,7 +329,7 @@
      */
     STEP_DETECTOR                   = 18,
 
-    /*
+    /**
      * STEP_COUNTER
      * reporting-mode: on-change
      *
@@ -341,7 +342,7 @@
      */
     STEP_COUNTER                    = 19,
 
-    /*
+    /**
      * GEOMAGNETIC_ROTATION_VECTOR
      * reporting-mode: continuous
      *
@@ -353,7 +354,7 @@
      */
     GEOMAGNETIC_ROTATION_VECTOR     = 20,
 
-    /*
+    /**
      * HEART_RATE
      * reporting-mode: on-change
      *
@@ -377,7 +378,7 @@
      */
     HEART_RATE                      = 21,
 
-    /*
+    /**
      * WAKE_UP_TILT_DETECTOR
      * reporting-mode: special (setDelay has no impact)
      *
@@ -416,7 +417,7 @@
      */
     TILT_DETECTOR                   = 22,
 
-    /*
+    /**
      * WAKE_GESTURE
      * reporting-mode: one-shot
      *
@@ -437,7 +438,7 @@
      */
     WAKE_GESTURE                    = 23,
 
-    /*
+    /**
      * GLANCE_GESTURE
      * reporting-mode: one-shot
      *
@@ -474,7 +475,7 @@
      */
     PICK_UP_GESTURE                 = 25,
 
-    /*
+    /**
      * WRIST_TILT_GESTURE
      * trigger-mode: special
      * wake-up sensor: yes
@@ -489,7 +490,7 @@
      */
     WRIST_TILT_GESTURE              = 26,
 
-    /*
+    /**
      * DEVICE_ORIENTATION
      * reporting-mode: on-change
      *
@@ -523,7 +524,7 @@
      */
     DEVICE_ORIENTATION              = 27,
 
-    /*
+    /**
      * POSE_6DOF
      * trigger-mode: continuous
      *
@@ -541,7 +542,7 @@
      */
     POSE_6DOF                       = 28,
 
-    /*
+    /**
      * STATIONARY_DETECT
      * trigger mode: one shot
      *
@@ -555,7 +556,7 @@
      */
     STATIONARY_DETECT               = 29,
 
-    /*
+    /**
      * MOTION_DETECT
      * trigger mode: one shot
      *
@@ -573,7 +574,7 @@
      */
     MOTION_DETECT                   = 30,
 
-    /*
+    /**
      * HEART_BEAT
      * trigger mode: continuous
      *
@@ -680,7 +681,7 @@
      */
     ADDITIONAL_INFO                 = 33,
 
-    /*
+    /**
      * LOW_LATENCY_OFFBODY_DETECT
      * trigger-mode: on-change
      * wake-up sensor: yes
@@ -703,7 +704,7 @@
      */
     LOW_LATENCY_OFFBODY_DETECT      = 34,
 
-    /*
+    /**
      * ACCELEROMETER_UNCALIBRATED
      * reporting-mode: continuous
      *
@@ -715,7 +716,7 @@
      */
     ACCELEROMETER_UNCALIBRATED      = 35,
 
-    /*
+    /**
      * Base for device manufacturers private sensor types.
      * These sensor types can't be exposed in the SDK.
      */
@@ -724,7 +725,7 @@
 
 @export(name="", value_prefix="SENSOR_FLAG_")
 enum SensorFlagBits : uint32_t {
-    /*
+    /**
      * Whether this sensor wakes up the AP from suspend mode when data is
      * available.  Whenever sensor events are delivered from a wake_up sensor,
      * the driver needs to hold a wake_lock till the events are read by the
@@ -735,7 +736,7 @@
      */
     WAKE_UP                     = 1,
 
-    /*
+    /**
      * Reporting modes for various sensors. Each sensor will have exactly one of
      * these modes set.
      * The least significant 2nd, 3rd and 4th bits are used to represent four
@@ -746,7 +747,7 @@
     ONE_SHOT_MODE               = 4,
     SPECIAL_REPORTING_MODE      = 6,
 
-    /*
+    /**
      * Set this flag if the sensor supports data_injection mode and allows data
      * to be injected from the SensorService. When in data_injection ONLY
      * sensors with this flag set are injected sensor data and only sensors with
@@ -756,42 +757,42 @@
      */
     DATA_INJECTION              = 0x10,
 
-    /*
+    /**
      * Set this flag if the sensor is a dynamically connected sensor. See
      * DynamicSensorInfo and DYNAMIC_SENSOR_META for details.
      */
     DYNAMIC_SENSOR              = 0x20,
 
-    /*
+    /**
      * Set this flag if sensor additional information is supported.
      * See ADDITIONAL_INFO and AdditionalInfo for details.
      */
     ADDITIONAL_INFO             = 0x40,
 
-    /*
+    /**
      * Set this flag if sensor suppor direct channel backed by ashmem.
      * See SharedMemType and registerDirectChannel for more details.
      */
     DIRECT_CHANNEL_ASHMEM       = 0x400,
 
-    /*
+    /**
      * Set this flag if sensor suppor direct channel backed by gralloc HAL memory.
      * See SharedMemType and registerDirectChannel for more details.
      */
     DIRECT_CHANNEL_GRALLOC      = 0x800,
 
-    /*
+    /**
      * Flags mask for reporting mode of sensor.
      */
     MASK_REPORTING_MODE         = 0xE,
 
-    /*
+    /**
      * Flags mask for direct report maximum rate level support.
      * See RateLevel.
      */
     MASK_DIRECT_REPORT          = 0x380,
 
-    /*
+    /**
      * Flags mask for all direct channel support bits.
      * See SharedMemType.
      */
@@ -809,30 +810,34 @@
 };
 
 struct SensorInfo {
-    /* handle that identifies this sensors. This handle is used to reference
+    /**
+     * handle that identifies this sensors. This handle is used to reference
      * this sensor throughout the HAL API.
      */
     int32_t sensorHandle;
 
-    /* Name of this sensor.
+    /**
+     * Name of this sensor.
      * All sensors of the same "type" must have a different "name".
      */
     string name;
 
-    /* vendor of the hardware part */
+    /** vendor of the hardware part */
     string vendor;
 
-    /* version of the hardware part + driver. The value of this field
+    /**
+     * version of the hardware part + driver. The value of this field
      * must increase when the driver is updated in a way that changes the
      * output of this sensor. This is important for fused sensors when the
      * fusion algorithm is updated.
      */
     int32_t version;
 
-    /* this sensor's type. */
+    /** this sensor's type. */
     SensorType type;
 
-    /* type of this sensor as a string.
+    /**
+     * type of this sensor as a string.
      *
      * When defining an OEM specific sensor or sensor manufacturer specific
      * sensor, use your reserve domain name as a prefix.
@@ -843,16 +848,17 @@
      */
     string typeAsString;
 
-    /* maximum range of this sensor's value in SI units */
+    /** maximum range of this sensor's value in SI units */
     float maxRange;
 
-    /* smallest difference between two values reported by this sensor */
+    /** smallest difference between two values reported by this sensor */
     float resolution;
 
-    /* rough estimate of this sensor's power consumption in mA */
+    /** rough estimate of this sensor's power consumption in mA */
     float power;
 
-    /* this value depends on the reporting mode:
+    /**
+     * this value depends on the reporting mode:
      *
      *   continuous: minimum sample period allowed in microseconds
      *   on-change : 0
@@ -861,20 +867,23 @@
      */
     int32_t minDelay;
 
-    /* number of events reserved for this sensor in the batch mode FIFO.
+    /**
+     * number of events reserved for this sensor in the batch mode FIFO.
      * If there is a dedicated FIFO for this sensor, then this is the
      * size of this FIFO. If the FIFO is shared with other sensors,
      * this is the size reserved for that sensor and it can be zero.
      */
     uint32_t fifoReservedEventCount;
 
-    /* maximum number of events of this sensor that could be batched.
+    /**
+     * maximum number of events of this sensor that could be batched.
      * This is especially relevant when the FIFO is shared between
      * several sensors; this value is then set to the size of that FIFO.
      */
     uint32_t fifoMaxEventCount;
 
-    /* permission required to see this sensor, register to it and receive data.
+    /**
+     * permission required to see this sensor, register to it and receive data.
      * Set to "" if no permission is required. Some sensor types like the
      * heart rate monitor have a mandatory require_permission.
      * For sensors that always require a specific permission, like the heart
@@ -883,7 +892,8 @@
      */
     string requiredPermission;
 
-    /* This value is defined only for continuous mode and on-change sensors.
+    /**
+     * This value is defined only for continuous mode and on-change sensors.
      * It is the delay between two sensor events corresponding to the lowest
      * frequency that this sensor supports. When lower frequencies are requested
      * through batch()/setDelay() the events will be generated at this frequency
@@ -901,7 +911,7 @@
      */
     int32_t maxDelay;
 
-    /* Bitmask of SensorFlagBits */
+    /** Bitmask of SensorFlagBits */
     bitfield<SensorFlagBits> flags;
 };
 
@@ -938,13 +948,14 @@
 };
 
 struct HeartRate {
-    /* Heart rate in beats per minute.
+    /**
+     * Heart rate in beats per minute.
      * Set to 0 when status is SensorStatus::UNRELIABLE or
      * SensorStatus::NO_CONTACT
      */
     float bpm;
 
-    /* Status of the heart rate sensor for this reading. */
+    /** Status of the heart rate sensor for this reading. */
     SensorStatus status;
 };
 
@@ -961,7 +972,8 @@
     bool connected;
     int32_t sensorHandle;
 
-    /* UUID of a dynamic sensor (using RFC 4122 byte order)
+    /**
+     * UUID of a dynamic sensor (using RFC 4122 byte order)
      * For UUID 12345678-90AB-CDEF-1122-334455667788 the uuid field is
      * initialized as:
      *   {0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x11, ...}
@@ -971,53 +983,60 @@
 
 @export(name="additional_info_type_t")
 enum AdditionalInfoType : uint32_t {
-    /* Marks the beginning of additional information frames */
+    /** Marks the beginning of additional information frames */
     AINFO_BEGIN                       = 0,
 
-    /* Marks the end of additional information frames */
+    /** Marks the end of additional information frames */
     AINFO_END                         = 1,
 
-    /* Estimation of the delay that is not tracked by sensor timestamps. This
+    /**
+     * Estimation of the delay that is not tracked by sensor timestamps. This
      * includes delay introduced by sensor front-end filtering, data transport,
      * etc.
      * float[2]: delay in seconds, standard deviation of estimated value
      */
     AINFO_UNTRACKED_DELAY             = 0x10000,
 
-    /* float: Celsius temperature */
+    /** float: Celsius temperature */
     AINFO_INTERNAL_TEMPERATURE,
 
-    /* First three rows of a homogeneous matrix, which represents calibration to
+    /**
+     * First three rows of a homogeneous matrix, which represents calibration to
      * a three-element vector raw sensor reading.
      * float[12]: 3x4 matrix in row major order
      */
     AINFO_VEC3_CALIBRATION,
 
-    /* Location and orientation of sensor element in the device frame: origin is
+    /**
+     * Location and orientation of sensor element in the device frame: origin is
      * the geometric center of the mobile device screen surface; the axis
      * definition corresponds to Android sensor definitions.
      * float[12]: 3x4 matrix in row major order
      */
     AINFO_SENSOR_PLACEMENT,
 
-    /* float[2]: raw sample period in seconds,
+    /**
+     * float[2]: raw sample period in seconds,
      *           standard deviation of sampling period
      */
     AINFO_SAMPLING,
 
     // Sampling channel modeling information section
 
-    /* int32_t: noise type
+    /**
+     * int32_t: noise type
      * float[n]: parameters
      */
     AINFO_CHANNEL_NOISE               = 0x20000,
 
-    /* float[3]: sample period, standard deviation of sample period,
+    /**
+     * float[3]: sample period, standard deviation of sample period,
      * quantization unit
      */
     AINFO_CHANNEL_SAMPLER,
 
-    /* Represents a filter:
+    /**
+     * Represents a filter:
      *   \sum_j a_j y[n-j] == \sum_i b_i x[n-i]
      *
      * int32_t[3]: number of feedforward coeffients M,
@@ -1031,48 +1050,56 @@
      */
     AINFO_CHANNEL_FILTER,
 
-    /* int32_t[2]: size in (row, column) ... 1st frame
+    /**
+     * int32_t[2]: size in (row, column) ... 1st frame
      * float[n]: matrix element values in row major order.
      */
     AINFO_CHANNEL_LINEAR_TRANSFORM,
 
-    /* int32_t[2]: extrapolate method, interpolate method
+    /**
+     * int32_t[2]: extrapolate method, interpolate method
      * float[n]: mapping key points in pairs, (in, out)...
      *           (may be used to model saturation).
      */
     AINFO_CHANNEL_NONLINEAR_MAP,
 
-    /* int32_t: resample method (0-th order, 1st order...)
+    /**
+     * int32_t: resample method (0-th order, 1st order...)
      * float[1]: resample ratio (upsampling if < 1.0, downsampling if > 1.0).
      */
     AINFO_CHANNEL_RESAMPLER,
 
-    /* Operation environment parameters section
+    /**
+     * Operation environment parameters section
      * Types in the following section is sent down (instead of reported from)
      * device as additional information to aid sensor operation. Data is sent
      * via injectSensorData() function to sensor handle -1 denoting all sensors
      * in device.
      */
 
-    /* Local geomagnetic field information based on device geo location. This
+    /**
+     * Local geomagnetic field information based on device geo location. This
      * type is primarily for for magnetic field calibration and rotation vector
      * sensor fusion.
      * float[3]: strength (uT), declination and inclination angle (rad).
      */
     AINFO_LOCAL_GEOMAGNETIC_FIELD     = 0x30000,
 
-    /* Local gravitational acceleration strength at device geo location.
+    /**
+     * Local gravitational acceleration strength at device geo location.
      * float: gravitational acceleration norm in m/s^2.
      */
     AINFO_LOCAL_GRAVITY,
 
-    /* Device dock state.
+    /**
+     * Device dock state.
      * int32_t: dock state following Android API Intent.EXTRA_DOCK_STATE
      * definition, undefined value is ignored.
      */
     AINFO_DOCK_STATE,
 
-    /* High performance mode hint. Device is able to use up more power and take
+    /**
+     * High performance mode hint. Device is able to use up more power and take
      * more reources to improve throughput and latency in high performance mode.
      * One possible use case is virtual reality, when sensor latency need to be
      * carefully controlled.
@@ -1081,7 +1108,8 @@
      */
     AINFO_HIGH_PERFORMANCE_MODE,
 
-    /* Magnetic field calibration hint. Device is notified when manually
+    /**
+     * Magnetic field calibration hint. Device is notified when manually
      * triggered magnetic field calibration procedure is started or stopped. The
      * calibration procedure is assumed timed out after 1 minute from start,
      * even if an explicit stop is not received.
@@ -1090,18 +1118,18 @@
      */
     AINFO_MAGNETIC_FIELD_CALIBRATION,
 
-    /* Custom information */
+    /** Custom information */
     AINFO_CUSTOM_START                = 0x10000000,
 
-    /* Debugging */
+    /** Debugging */
     AINFO_DEBUGGING_START             = 0x40000000,
 };
 
 struct AdditionalInfo {
-    /* type of payload data, see AdditionalInfoType */
+    /** type of payload data, see AdditionalInfoType */
     AdditionalInfoType type;
 
-    /* sequence number of this frame for this type */
+    /** sequence number of this frame for this type */
     int32_t serial;
 
     union Payload {
@@ -1121,27 +1149,31 @@
  * relative humidity in percent
  */
 union EventPayload {
-    /* SensorType::ACCELEROMETER, SensorType::MAGNETIC_FIELD,
+    /**
+     * SensorType::ACCELEROMETER, SensorType::MAGNETIC_FIELD,
      * SensorType::ORIENTATION, SensorType::GYROSCOPE, SensorType::GRAVITY,
      * SensorType::LINEAR_ACCELERATION
      */
     Vec3 vec3;
 
-    /* SensorType::ROTATION_VECTOR, SensorType::GAME_ROTATION_VECTOR,
+    /**
+     * SensorType::ROTATION_VECTOR, SensorType::GAME_ROTATION_VECTOR,
      * SensorType::GEOMAGNETIC_ROTATION_VECTOR
      */
     Vec4 vec4;
 
-    /* SensorType::MAGNETIC_FIELD_UNCALIBRATED,
+    /**
+     * SensorType::MAGNETIC_FIELD_UNCALIBRATED,
      * SensorType::GYROSCOPE_UNCALIBRATED
      * SensorType::ACCELEROMETER_UNCALIBRATED
      */
     Uncal uncal;
 
-    /* SensorType::META_DATA */
+    /** SensorType::META_DATA */
     MetaData meta;
 
-    /* SensorType::DEVICE_ORIENTATION, SensorType::LIGHT, SensorType::PRESSURE,
+    /**
+     * SensorType::DEVICE_ORIENTATION, SensorType::LIGHT, SensorType::PRESSURE,
      * SensorType::TEMPERATURE, SensorType::PROXIMITY,
      * SensorType::RELATIVE_HUMIDITY, SensorType::AMBIENT_TEMPERATURE,
      * SensorType::SIGNIFICANT_MOTION, SensorType::STEP_DETECTOR,
@@ -1153,35 +1185,35 @@
      */
     float scalar;
 
-    /* SensorType::STEP_COUNTER */
+    /** SensorType::STEP_COUNTER */
     uint64_t stepCount;
 
-    /* SensorType::HEART_RATE */
+    /** SensorType::HEART_RATE */
     HeartRate heartRate;
 
-    /* SensorType::POSE_6DOF */
+    /** SensorType::POSE_6DOF */
     float[15] pose6DOF;
 
-    /* SensorType::DYNAMIC_SENSOR_META */
+    /** SensorType::DYNAMIC_SENSOR_META */
     DynamicSensorInfo dynamic;
 
-    /* SensorType::ADDITIONAL_INFO */
+    /** SensorType::ADDITIONAL_INFO */
     AdditionalInfo additional;
 
-    /* undefined/custom sensor type >= SensorType::DEVICE_PRIVATE_BASE */
+    /** undefined/custom sensor type >= SensorType::DEVICE_PRIVATE_BASE */
     float[16] data;
 };
 
 struct Event {
-    /* Time measured in nanoseconds, in "elapsedRealtimeNano()'s" timebase. */
+    /** Time measured in nanoseconds, in "elapsedRealtimeNano()'s" timebase. */
     int64_t timestamp;
 
-    /* sensor identifier */
+    /** sensor identifier */
     int32_t sensorHandle;
 
     SensorType sensorType;
 
-    /* Union discriminated on sensorType */
+    /** Union discriminated on sensorType */
     EventPayload u;
 };
 
diff --git a/soundtrigger/2.0/ISoundTriggerHw.hal b/soundtrigger/2.0/ISoundTriggerHw.hal
index cf35ef1..0c235c9 100644
--- a/soundtrigger/2.0/ISoundTriggerHw.hal
+++ b/soundtrigger/2.0/ISoundTriggerHw.hal
@@ -22,106 +22,110 @@
 
 interface ISoundTriggerHw {
 
-    /*
+    /**
      * Sound trigger implementation descriptor read by the framework via
      * getProperties(). Used by SoundTrigger service to report to applications
      * and manage concurrency and policy.
      */
     struct Properties {
-        /* Implementor name */
+        /** Implementor name */
         string   implementor;
-        /* Implementation description */
+        /** Implementation description */
         string   description;
-        /* Implementation version */
+        /** Implementation version */
         uint32_t version;
-        /* Unique implementation ID. The UUID must change with each version of
+        /**
+         * Unique implementation ID. The UUID must change with each version of
            the engine implementation */
         Uuid     uuid;
-        /* Maximum number of concurrent sound models loaded */
+        /** Maximum number of concurrent sound models loaded */
         uint32_t maxSoundModels;
-        /* Maximum number of key phrases */
+        /** Maximum number of key phrases */
         uint32_t maxKeyPhrases;
-        /* Maximum number of concurrent users detected */
+        /** Maximum number of concurrent users detected */
         uint32_t maxUsers;
-        /* All supported modes. e.g RecognitionMode.VOICE_TRIGGER */
+        /** All supported modes. e.g RecognitionMode.VOICE_TRIGGER */
         uint32_t recognitionModes;
-        /* Supports seamless transition from detection to capture */
+        /** Supports seamless transition from detection to capture */
         bool     captureTransition;
-        /* Maximum buffering capacity in ms if captureTransition is true */
+        /** Maximum buffering capacity in ms if captureTransition is true */
         uint32_t maxBufferMs;
-        /* Supports capture by other use cases while detection is active */
+        /** Supports capture by other use cases while detection is active */
         bool     concurrentCapture;
-        /* Returns the trigger capture in event */
+        /** Returns the trigger capture in event */
         bool     triggerInEvent;
-        /* Rated power consumption when detection is active with TDB
+        /**
+         * Rated power consumption when detection is active with TDB
          * silence/sound/speech ratio */
         uint32_t powerConsumptionMw;
     };
 
 
-    /*
+    /**
      * Base sound model descriptor. This struct is the header of a larger block
      * passed to loadSoundModel() and contains the binary data of the
      * sound model.
      */
     struct SoundModel {
-        /* Model type. e.g. SoundModelType.KEYPHRASE */
+        /** Model type. e.g. SoundModelType.KEYPHRASE */
         SoundModelType type;
-        /* Unique sound model ID. */
+        /** Unique sound model ID. */
         Uuid           uuid;
-        /* Unique vendor ID. Identifies the engine the sound model
+        /**
+         * Unique vendor ID. Identifies the engine the sound model
          * was build for */
         Uuid           vendorUuid;
-        /* Opaque data transparent to Android framework */
+        /** Opaque data transparent to Android framework */
         vec<uint8_t>   data;
     };
 
-    /* Key phrase descriptor */
+    /** Key phrase descriptor */
     struct Phrase {
-        /* Unique keyphrase ID assigned at enrollment time */
+        /** Unique keyphrase ID assigned at enrollment time */
         uint32_t      id;
-        /* Recognition modes supported by this key phrase */
+        /** Recognition modes supported by this key phrase */
         uint32_t      recognitionModes;
-        /* List of users IDs associated with this key phrase */
+        /** List of users IDs associated with this key phrase */
         vec<uint32_t> users;
-        /* Locale - Java Locale style (e.g. en_US) */
+        /** Locale - Java Locale style (e.g. en_US) */
         string        locale;
-        /* Phrase text in UTF-8 format. */
+        /** Phrase text in UTF-8 format. */
         string        text;
     };
 
-    /*
+    /**
      * Specialized sound model for key phrase detection.
      * Proprietary representation of key phrases in binary data must match
      * information indicated by phrases field
      */
     struct PhraseSoundModel {
-        /* Common part of sound model descriptor */
+        /** Common part of sound model descriptor */
         SoundModel  common;
-        /* List of descriptors for key phrases supported by this sound model */
+        /** List of descriptors for key phrases supported by this sound model */
         vec<Phrase> phrases;
     };
 
-    /*
+    /**
      * Configuration for sound trigger capture session passed to
      * startRecognition() method
      */
     struct RecognitionConfig {
-        /* IO handle that will be used for capture. N/A if captureRequested
+        /**
+         * IO handle that will be used for capture. N/A if captureRequested
          * is false */
         AudioIoHandle   captureHandle;
-        /* Input device requested for detection capture */
+        /** Input device requested for detection capture */
         AudioDevice     captureDevice;
-        /* Capture and buffer audio for this recognition instance */
+        /** Capture and buffer audio for this recognition instance */
         bool            captureRequested;
-        /* Configuration for each key phrase */
+        /** Configuration for each key phrase */
         vec<PhraseRecognitionExtra> phrases;
-        /* Opaque capture configuration data transparent to the framework */
+        /** Opaque capture configuration data transparent to the framework */
         vec<uint8_t>    data;
     };
 
 
-    /*
+    /**
      * Retrieve implementation properties.
      * @return retval Operation completion status: 0 in case of success,
      *                -ENODEV in case of initialization error.
@@ -130,7 +134,7 @@
      */
     getProperties() generates (int32_t retval, Properties properties);
 
-    /*
+    /**
      * Load a sound model. Once loaded, recognition of this model can be
      * started and stopped. Only one active recognition per model at a time.
      * The SoundTrigger service must handle concurrent recognition requests by
@@ -158,7 +162,7 @@
                    CallbackCookie cookie)
             generates (int32_t retval, SoundModelHandle modelHandle);
 
-    /*
+    /**
      * Load a key phrase sound model. Once loaded, recognition of this model can
      * be started and stopped. Only one active recognition per model at a time.
      * The SoundTrigger service must handle concurrent recognition requests by
@@ -186,7 +190,7 @@
                    CallbackCookie cookie)
             generates (int32_t retval, SoundModelHandle modelHandle);
 
-    /*
+    /**
      * Unload a sound model. A sound model may be unloaded to make room for a
      * new one to overcome implementation limitations.
      * @param modelHandle the handle of the sound model to unload
@@ -197,7 +201,7 @@
     unloadSoundModel(SoundModelHandle modelHandle)
             generates (int32_t retval);
 
-    /*
+    /**
      * Start recognition on a given model. Only one recognition active
      * at a time per model. Once recognition succeeds of fails, the callback
      * is called.
@@ -221,7 +225,7 @@
                      CallbackCookie cookie)
             generates (int32_t retval);
 
-    /*
+    /**
      * Stop recognition on a given model.
      * The implementation must not call the recognition callback when stopped
      * via this method.
@@ -233,7 +237,7 @@
     stopRecognition(SoundModelHandle modelHandle)
             generates (int32_t retval);
 
-    /*
+    /**
      * Stop recognition on all models.
      * @return retval Operation completion status: 0 in case of success,
      *                -ENODEV in case of initialization error.
diff --git a/soundtrigger/2.0/ISoundTriggerHwCallback.hal b/soundtrigger/2.0/ISoundTriggerHwCallback.hal
index c6555f6..90132d9 100644
--- a/soundtrigger/2.0/ISoundTriggerHwCallback.hal
+++ b/soundtrigger/2.0/ISoundTriggerHwCallback.hal
@@ -29,62 +29,66 @@
         UPDATED  = 0,
     };
 
-    /*
+    /**
      * Generic recognition event sent via recognition callback
      */
     struct RecognitionEvent {
-        /* Recognition status e.g. SUCCESS */
+        /** Recognition status e.g. SUCCESS */
         RecognitionStatus status;
-        /* Sound model type for this event. e.g SoundModelType.TYPE_KEYPHRASE */
+        /** Sound model type for this event. e.g SoundModelType.TYPE_KEYPHRASE */
         SoundModelType    type;
-        /* Handle of loaded sound model which triggered the event */
+        /** Handle of loaded sound model which triggered the event */
         SoundModelHandle  model;
-        /* It is possible to capture audio from this */
-        /* utterance buffered by the implementation */
+        /** It is possible to capture audio from this */
+        /** utterance buffered by the implementation */
         bool              captureAvailable;
-        /* Audio session ID. framework use */
+        /** Audio session ID. framework use */
         int32_t           captureSession;
-        /* Delay in ms between end of model detection and start of audio
-        /* available for capture. A negative value is possible
+        /**
+         * Delay in ms between end of model detection and start of audio
+        /**
+         * available for capture. A negative value is possible
          * (e.g. if key phrase is also available for capture */
         int32_t           captureDelayMs;
-        /* Duration in ms of audio captured before the start of the trigger.
+        /**
+         * Duration in ms of audio captured before the start of the trigger.
          * 0 if none. */
         int32_t           capturePreambleMs;
-        /* The opaque data is the capture of the trigger sound */
+        /** The opaque data is the capture of the trigger sound */
         bool              triggerInData;
-        /* Audio format of either the trigger in event data or to use for
+        /**
+         * Audio format of either the trigger in event data or to use for
          * capture of the rest of the utterance */
         AudioConfig       audioConfig;
-        /* Opaque event data */
+        /** Opaque event data */
         vec<uint8_t>      data;
     };
 
-    /*
+    /**
      * Specialized recognition event for key phrase recognitions
      */
     struct PhraseRecognitionEvent {
-        /* Common part of the recognition event */
+        /** Common part of the recognition event */
         RecognitionEvent common;
-        /* List of descriptors for each recognized key phrase */
+        /** List of descriptors for each recognized key phrase */
         vec<PhraseRecognitionExtra> phraseExtras;
     };
 
-    /*
+    /**
      * Event sent via load sound model callback
      */
     struct ModelEvent {
-         /* Sound model status e.g. SoundModelStatus.UPDATED */
+         /** Sound model status e.g. SoundModelStatus.UPDATED */
         SoundModelStatus status;
-        /* Loaded sound model that triggered the event */
+        /** Loaded sound model that triggered the event */
         SoundModelHandle model;
-        /* Opaque event data, passed transparently by the framework */
+        /** Opaque event data, passed transparently by the framework */
         vec<uint8_t>     data;
     };
 
     typedef int32_t CallbackCookie;
 
-    /*
+    /**
      * Callback method called by the HAL when the sound recognition triggers
      * @param event A RecognitionEvent structure containing detailed results
      *              of the recognition triggered
@@ -93,7 +97,7 @@
      */
     recognitionCallback(RecognitionEvent event, CallbackCookie cookie);
 
-    /*
+    /**
      * Callback method called by the HAL when the sound recognition triggers
      * for a key phrase sound model.
      * @param event A RecognitionEvent structure containing detailed results
@@ -103,7 +107,7 @@
      */
     phraseRecognitionCallback(PhraseRecognitionEvent event,
                               CallbackCookie cookie);
-    /*
+    /**
      * Callback method called by the HAL when the sound model loading completes
      * @param event A ModelEvent structure containing detailed results of the
      *              model loading operation
diff --git a/soundtrigger/2.0/types.hal b/soundtrigger/2.0/types.hal
index 26928ba..fc7d019 100644
--- a/soundtrigger/2.0/types.hal
+++ b/soundtrigger/2.0/types.hal
@@ -16,66 +16,67 @@
 
 package android.hardware.soundtrigger@2.0;
 
-/*
+/**
  * Sound model types modes used in ISoundTriggerHw.SoundModel
  */
 enum SoundModelType : int32_t {
-    /* use for unspecified sound model type */
+    /** use for unspecified sound model type */
     UNKNOWN   = -1,
-    /* use for key phrase sound models */
+    /** use for key phrase sound models */
     KEYPHRASE = 0,
-    /* use for all models other than keyphrase */
+    /** use for all models other than keyphrase */
     GENERIC   = 1,
 };
 
 typedef int32_t SoundModelHandle;
 
 
-/*
+/**
  * Recognition modes used in ISoundTriggerHw.RecognitionConfig,
  * ISoundTriggerHw.Properties or PhraseRecognitionExtra
  */
 enum RecognitionMode : uint32_t {
-    /* simple voice trigger */
+    /** simple voice trigger */
     VOICE_TRIGGER       = (1 << 0),
-    /* trigger only if one user in model identified */
+    /** trigger only if one user in model identified */
     USER_IDENTIFICATION = (1 << 1),
-    /* trigger only if one user in mode authenticated */
+    /** trigger only if one user in mode authenticated */
     USER_AUTHENTICATION = (1 << 2),
-    /* generic sound trigger */
+    /** generic sound trigger */
     GENERIC_TRIGGER     = (1 << 3),
 };
 
-/*
+/**
  * Confidence level for each user in structure PhraseRecognitionExtra
  */
 struct ConfidenceLevel {
-    /* user ID */
+    /** user ID */
     uint32_t userId;
-    /* confidence level in percent (0 - 100): */
-    /* - min level for recognition configuration */
-    /* - detected level for recognition event */
+    /** confidence level in percent (0 - 100): */
+    /** - min level for recognition configuration */
+    /** - detected level for recognition event */
     uint32_t levelPercent;
 };
 
-/*
+/**
  * Specialized recognition event for key phrase detection
  */
 struct PhraseRecognitionExtra {
-    /* keyphrase ID */
+    /** keyphrase ID */
     uint32_t id;
-    /* recognition modes used for this keyphrase */
+    /** recognition modes used for this keyphrase */
     uint32_t recognitionModes;
-    /* confidence level for mode RecognitionMode.VOICE_TRIGGER */
+    /** confidence level for mode RecognitionMode.VOICE_TRIGGER */
     uint32_t confidenceLevel;
-    /* list of confidence levels per user for
+    /**
+     * list of confidence levels per user for
      * RecognitionMode.USER_IDENTIFICATION and
      * RecognitionMode.USER_AUTHENTICATION */
     vec<ConfidenceLevel> levels;
 };
 
-/* TODO(elaurent) remove when Java build problem is fixed */
+/** TODO(elaurent) remove when Java build problem is fixed */
 union Dummy {
   uint32_t dummy1;
   int32_t dummy2;
-};
\ No newline at end of file
+};
diff --git a/thermal/1.0/IThermal.hal b/thermal/1.0/IThermal.hal
index e5f70cb..31a65d4 100644
--- a/thermal/1.0/IThermal.hal
+++ b/thermal/1.0/IThermal.hal
@@ -18,7 +18,7 @@
 
 interface IThermal {
 
-    /*
+    /**
      * Retrieves temperatures in Celsius.
      *
      * @return status Status of the operation. If status code is FAILURE,
@@ -38,7 +38,7 @@
     getTemperatures()
         generates (ThermalStatus status, vec<Temperature> temperatures);
 
-    /*
+    /**
      * Retrieves CPU usage information of each core: active and total times
      * in ms since first boot.
      *
@@ -55,7 +55,7 @@
     @exit
     getCpuUsages() generates (ThermalStatus status, vec<CpuUsage> cpuUsages);
 
-    /*
+    /**
      * Retrieves the cooling devices information.
      *
      * @return status Status of the operation. If status code is FAILURE,
diff --git a/tv/cec/1.0/IHdmiCec.hal b/tv/cec/1.0/IHdmiCec.hal
index e8db265..2840417 100644
--- a/tv/cec/1.0/IHdmiCec.hal
+++ b/tv/cec/1.0/IHdmiCec.hal
@@ -18,11 +18,11 @@
 
 import IHdmiCecCallback;
 
-/*
+/**
  * HDMI-CEC HAL interface definition.
  */
 interface IHdmiCec {
-    /*
+    /**
      * Passes the logical address that must be used in this system.
      *
      * HAL must use it to configure the hardware so that the CEC commands
@@ -39,7 +39,7 @@
     @callflow(next={"*"})
     addLogicalAddress(CecLogicalAddress addr) generates (Result result);
 
-    /*
+    /**
      * Clears all the logical addresses.
      *
      * It is used when the system doesn't need to process CEC command any more,
@@ -50,7 +50,7 @@
     @exit
     clearLogicalAddress();
 
-    /*
+    /**
      * Gets the CEC physical address.
      *
      * The physical address depends on the topology of the network formed by
@@ -66,7 +66,7 @@
     @callflow(next="*")
     getPhysicalAddress() generates (Result result, uint16_t addr);
 
-    /*
+    /**
      * Transmits HDMI-CEC message to other HDMI device.
      *
      * The method must be designed to return in a certain amount of time and not
@@ -84,7 +84,7 @@
     @callflow(next="*")
     sendMessage(CecMessage message) generates (SendMessageResult result);
 
-    /*
+    /**
      * Sets a callback that HDMI-CEC HAL must later use for incoming CEC
      * messages or internal HDMI events.
      *
@@ -95,7 +95,7 @@
     @entry
     setCallback(IHdmiCecCallback callback);
 
-    /*
+    /**
      * Returns the CEC version supported by underlying hardware.
      *
      * @return version the CEC version supported by underlying hardware.
@@ -103,7 +103,7 @@
     @callflow(next={"*"})
     getCecVersion() generates (int32_t version);
 
-    /*
+    /**
      * Gets the identifier of the vendor.
      *
      * @return vendorId Identifier of the vendor that is the 24-bit unique
@@ -113,7 +113,7 @@
     @callflow(next={"*"})
     getVendorId() generates (uint32_t vendorId);
 
-    /*
+    /**
      * Gets the hdmi port information of underlying hardware.
      *
      * @return infos The list of HDMI port information
@@ -121,7 +121,7 @@
     @callflow(next={"*"})
     getPortInfo() generates (vec<HdmiPortInfo> infos);
 
-    /*
+    /**
      * Sets flags controlling the way HDMI-CEC service works down to HAL
      * implementation. Those flags must be used in case the feature needs update
      * in HAL itself, firmware or microcontroller.
@@ -132,7 +132,7 @@
     @callflow(next="*")
     setOption(OptionKey key, bool value);
 
-    /*
+    /**
      * Passes the updated language information of Android system. Contains
      * three-letter code as defined in ISO/FDIS 639-2. Must be used for HAL to
      * respond to <Get Menu Language> while in standby mode.
@@ -143,7 +143,7 @@
     @callflow(next="*")
     setLanguage(string language);
 
-    /*
+    /**
      * Configures ARC circuit in the hardware logic to start or stop the
      * feature.
      *
@@ -154,7 +154,7 @@
     @callflow(next="*")
     enableAudioReturnChannel(int32_t portId, bool enable);
 
-    /*
+    /**
      * Gets the connection status of the specified port.
      *
      * @param portId Port id to be inspected for the connection status.
diff --git a/tv/cec/1.0/IHdmiCecCallback.hal b/tv/cec/1.0/IHdmiCecCallback.hal
index 4a9d28f..754d19f 100644
--- a/tv/cec/1.0/IHdmiCecCallback.hal
+++ b/tv/cec/1.0/IHdmiCecCallback.hal
@@ -17,13 +17,13 @@
 package android.hardware.tv.cec@1.0;
 
 interface IHdmiCecCallback {
-    /*
+    /**
      * The callback function that must be called by HAL implementation to notify
      * the system of new CEC message arrival.
      */
     oneway onCecMessage(CecMessage message);
 
-    /*
+    /**
      * The callback function that must be called by HAL implementation to notify
      * the system of new hotplug event.
      */
diff --git a/tv/cec/1.0/types.hal b/tv/cec/1.0/types.hal
index ec2e373..a1853a3 100644
--- a/tv/cec/1.0/types.hal
+++ b/tv/cec/1.0/types.hal
@@ -48,7 +48,7 @@
     BROADCAST = 15, // as Destination address
 };
 
-/*
+/**
  * HDMI CEC message types. The assigned values represent opcode used in CEC
  * frame as specified in CEC Table 8-26 of the CEC Spec 1.4b.
  */
@@ -123,7 +123,7 @@
     ABORT = 0xFF,
 };
 
-/*
+/**
  * Operand description [Abort Reason]
  */
 enum AbortReason : int32_t {
@@ -144,7 +144,7 @@
     FAILURE_BUSY = 5,
 };
 
-/*
+/**
  * error code used for send_message.
  */
 enum SendMessageResult : int32_t {
@@ -154,7 +154,7 @@
     FAIL = 3,
 };
 
-/*
+/**
  * HDMI port type.
  */
 enum HdmiPortType : int32_t {
@@ -162,24 +162,27 @@
     OUTPUT = 1,
 };
 
-/*
+/**
  * Options used for IHdmiCec.setOption()
  */
 enum OptionKey : int32_t {
-    /* When set to false, HAL does not wake up the system upon receiving <Image
+    /**
+     * When set to false, HAL does not wake up the system upon receiving <Image
      * View On> or <Text View On>. Used when user changes the TV settings to
      * disable the auto TV on functionality.
      * True by default.
      */
     WAKEUP = 1,
 
-    /* When set to false, all the CEC commands are discarded. Used when user
+    /**
+     * When set to false, all the CEC commands are discarded. Used when user
      * changes the TV settings to disable CEC functionality.
      * True by default.
      */
     ENABLE_CEC = 2,
 
-    /* Setting this flag to false means Android system must stop handling CEC
+    /**
+     * Setting this flag to false means Android system must stop handling CEC
      * service and yield the control over to the microprocessor that is powered
      * on through the standby mode. When set to true, the system must gain the
      * control over, hence telling the microprocessor to stop handling the CEC
@@ -190,17 +193,18 @@
      */
     SYSTEM_CEC_CONTROL = 3,
 
-    /* Option 4 not used */
+    /** Option 4 not used */
 };
 
 struct CecMessage {
-    /* logical address of sender */
+    /** logical address of sender */
     CecLogicalAddress initiator;
 
-    /* logical address of receiver */
+    /** logical address of receiver */
     CecLogicalAddress destination;
 
-    /* The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in
+    /**
+     * The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in
      * the section 6 of the CEC Spec 1.4b. Overflowed data must be ignored. */
     vec<uint8_t> body;
 };
@@ -210,7 +214,7 @@
     uint32_t portId;
 };
 
-/*
+/**
  * HDMI port descriptor
  */
 struct HdmiPortInfo {
diff --git a/tv/input/1.0/ITvInput.hal b/tv/input/1.0/ITvInput.hal
index 43de276..95aff21 100644
--- a/tv/input/1.0/ITvInput.hal
+++ b/tv/input/1.0/ITvInput.hal
@@ -19,7 +19,7 @@
 import ITvInputCallback;
 
 interface ITvInput {
-    /*
+    /**
      * Sets a callback for events.
      *
      * Note that initially no device is available in the client side, so the
@@ -33,7 +33,7 @@
     @callflow(next={"getStreamConfigurations"})
     setCallback(ITvInputCallback callback);
 
-    /*
+    /**
      * Gets stream configurations for a specific device.
      *
      * The configs object is valid only until the next
@@ -48,7 +48,7 @@
     getStreamConfigurations(int32_t deviceId)
             generates (Result result, vec<TvStreamConfig> configurations);
 
-    /*
+    /**
      * Opens a specific stream in a device.
      *
      * @param deviceId Device ID for the steam to open.
@@ -65,7 +65,7 @@
     openStream(int32_t deviceId, int32_t streamId)
             generates (Result result, handle sidebandStream);
 
-    /*
+    /**
      * Closes a specific stream in a device.
      *
      * @param deviceId Device ID for the steam to open.
diff --git a/tv/input/1.0/ITvInputCallback.hal b/tv/input/1.0/ITvInputCallback.hal
index f2f07a0..6d88c5b 100644
--- a/tv/input/1.0/ITvInputCallback.hal
+++ b/tv/input/1.0/ITvInputCallback.hal
@@ -17,7 +17,7 @@
 package android.hardware.tv.input@1.0;
 
 interface ITvInputCallback {
-    /*
+    /**
      * Notifies the client that an event has occured. For possible event types,
      * check TvInputEventType.
      *
diff --git a/tv/input/1.0/types.hal b/tv/input/1.0/types.hal
index 60a3b7b..55dd6c0 100644
--- a/tv/input/1.0/types.hal
+++ b/tv/input/1.0/types.hal
@@ -26,7 +26,7 @@
     INVALID_STATE,
 };
 
-/* Type of physical TV input. */
+/** Type of physical TV input. */
 @export(name="", value_prefix="TV_INPUT_TYPE_")
 enum TvInputType : int32_t {
     OTHER = 1,         // Generic hardware.
@@ -41,7 +41,7 @@
     DISPLAY_PORT = 10,
 };
 
-/*
+/**
  * Status of cable connection.
  * This status is for devices having availability to detect the cable in a mechanical way,
  * regardless of whether the connected external device is electrically on or not.
@@ -67,7 +67,7 @@
 
 @export(name="", value_prefix="EVENT_")
 enum TvInputEventType : int32_t {
-    /*
+    /**
      * Hardware notifies the framework that a device is available.
      *
      * Note that DEVICE_AVAILABLE and DEVICE_UNAVAILABLE events do not represent
@@ -89,7 +89,7 @@
      */
     DEVICE_AVAILABLE = 1,
 
-    /*
+    /**
      * Hardware notifies the framework that a device is unavailable.
      *
      * HAL implementation must generate this event when a device registered
@@ -104,7 +104,7 @@
      */
     DEVICE_UNAVAILABLE = 2,
 
-    /*
+    /**
      * Stream configurations are changed. Client must regard all open streams
      * at the specific device are closed, and must call
      * getStreamConfigurations() again, opening some of them if necessary.
@@ -126,7 +126,7 @@
 
 struct TvInputEvent {
     TvInputEventType type;
-    /*
+    /**
      * DEVICE_AVAILABLE: all fields are relevant.
      * DEVICE_UNAVAILABLE: only deviceId is relevant.
      * STREAM_CONFIGURATIONS_CHANGED: only deviceId is relevant.
diff --git a/usb/1.0/IUsb.hal b/usb/1.0/IUsb.hal
index 965326a..f464379 100644
--- a/usb/1.0/IUsb.hal
+++ b/usb/1.0/IUsb.hal
@@ -19,7 +19,7 @@
 import IUsbCallback;
 
 interface IUsb {
-    /*
+    /**
      * This function is used to change the port role of a specific port.
      * For example, when PD_SWAP or PR_SWAP is supported.
      * This is function is asynchronous. The status of the role switch
@@ -31,7 +31,7 @@
      */
     oneway switchRole(string portName, PortRole role);
 
-    /*
+    /**
      * This function is used to register a callback function which is
      * called by the HAL whenever there is a change in the port state.
      * i.e. DATA_ROLE, POWER_ROLE or MODE.
@@ -44,7 +44,7 @@
      */
     oneway setCallback(IUsbCallback callback);
 
-    /*
+    /**
      * This functions is used to request the hal for the current status
      * status of the Type-C ports. This method is async/oneway. The result of the
      * query would be sent through the IUsbCallback object's notifyRoleSwitchStatus
diff --git a/usb/1.0/IUsbCallback.hal b/usb/1.0/IUsbCallback.hal
index b665ba3..fd91cbf 100644
--- a/usb/1.0/IUsbCallback.hal
+++ b/usb/1.0/IUsbCallback.hal
@@ -16,13 +16,13 @@
 
 package android.hardware.usb@1.0;
 
-/*
+/**
  * Callback object used for all the IUsb async methods which expects a result.
  * Caller is expected to register the callback object using setCallback method
  * to receive updates on the PortStatus.
  */
 interface IUsbCallback {
-    /*
+    /**
      * Used to convey the current port status to the caller.
      * Called either when PortState changes due to the port partner (or)
      * when caller requested for the PortStatus update through queryPortStatus.
@@ -34,7 +34,7 @@
      */
     oneway notifyPortStatusChange(vec<PortStatus> currentPortStatus, Status retval);
 
-    /*
+    /**
      * Used to notify the result of the switchRole call to the caller.
      *
      * @param portName name of the port for which the roleswap is requested.
diff --git a/usb/1.0/types.hal b/usb/1.0/types.hal
index 17cd8c7..302616e 100644
--- a/usb/1.0/types.hal
+++ b/usb/1.0/types.hal
@@ -19,42 +19,42 @@
 enum Status : uint32_t {
     SUCCESS = 0,
 
-    /*
+    /**
      * error value when the HAL operation fails for reasons not listed here.
      */
     ERROR = 1,
 
-    /*
+    /**
      * error value returned when input argument is invalid.
      */
     INVALID_ARGUMENT = 2,
 
-    /*
+    /**
      * error value returned when role string is unrecognized.
      */
     UNRECOGNIZED_ROLE = 3,
 };
 
-/*
+/**
  * Denotes the Port role type.
  * Passed as an argument for functions used to query or change port roles.
  */
 enum PortRoleType : uint32_t {
-    /*
+    /**
      * Denotes the data role of the port.
      * The port can either be a "host" or a "device" for data.
      * This maps to the PortDataRole enum.
      */
     DATA_ROLE = 0,
 
-    /*
+    /**
      * Denotes the power role of the port.
      * The port can either be a "source" or "sink" for power.
      * This maps to PortPowerRole enum.
      */
     POWER_ROLE = 1,
 
-    /*
+    /**
      * USB ports can be a pure DFP port which can only act
      * as a host. A UFP port which can only act as a device.
      * Or a dual role ports which can either can as a host or
@@ -65,19 +65,19 @@
 
 @export
 enum PortDataRole : uint32_t {
-    /*
+    /**
      * Indicates that the port does not have a data role.
      * In case of DRP, the current data role of the port is only resolved
      * when the type-c handshake happens.
      */
     NONE = 0,
 
-    /*
+    /**
      * Indicates that the port is acting as a host for data.
      */
     HOST = 1,
 
-    /*
+    /**
      * Indicated that the port is acting as a device for data.
      */
     DEVICE = 2,
@@ -87,19 +87,19 @@
 
 @export
 enum PortPowerRole : uint32_t {
-    /*
+    /**
      * Indicates that the port does not have a power role.
      * In case of DRP, the current power role of the port is only resolved
      * when the type-c handshake happens.
      */
     NONE = 0,
 
-    /*
+    /**
      * Indicates that the port is supplying power to the other port.
      */
     SOURCE = 1,
 
-    /*
+    /**
      * Indicates that the port is sinking power from the other port.
      */
     SINK = 2,
@@ -109,23 +109,23 @@
 
 @export
 enum PortMode : uint32_t {
-    /*
+    /**
      * Indicates that the port does not have a mode.
      * In case of DRP, the current mode of the port is only resolved
      * when the type-c handshake happens.
      */
     NONE = 0,
-    /*
+    /**
      * Indicates that port can only act as device for data and sink for power.
      */
     UFP = 1,
 
-    /*
+    /**
      * Indicates the port can only act as host for data and source for power.
      */
     DFP = 2,
 
-    /*
+    /**
      * Indicates can either act as UFP or DFP at a given point of time.
      */
     DRP = 3,
@@ -133,17 +133,17 @@
     NUM_MODES = 4,
 };
 
-/*
+/**
  * Used as a container to send port role information.
  */
 struct PortRole {
-    /*
+    /**
      * Indicates the type of Port Role.
      * Maps to the PortRoleType enum.
      */
     PortRoleType type;
 
-    /*
+    /**
      * when type is HAL_USB_DATA_ROLE pass values from enum PortDataRole.
      * when type is HAL_USB_POWER_ROLE pass values from enum PortPowerRole.
      * when type is HAL_USB_MODE pass values from enum PortMode.
@@ -151,40 +151,40 @@
     uint32_t role;
 };
 
-/*
+/**
  * Used as the container to report data back to the caller.
  * Represents the current connection status of a single USB port.
  */
 struct PortStatus {
-     /*
+     /**
       * Name of the port.
       * Used as the port's id by the caller.
       */
      string portName;
 
-     /*
+     /**
       * Data role of the port.
       */
      PortDataRole currentDataRole;
 
-     /*
+     /**
       * Power Role of thte port.
       */
      PortPowerRole currentPowerRole;
 
-     /*
+     /**
       * Mode in which the port is connected.
       * Can be UFP or DFP.
       */
      PortMode currentMode;
 
-     /*
+     /**
       * True indicates that the port's mode can
       * be changed. False otherwise.
       */
      bool canChangeMode;
 
-     /*
+     /**
       * True indicates that the port's data role
       * can be changed. False otherwise.
       * For example, true if Type-C PD PD_SWAP
@@ -192,7 +192,7 @@
       */
      bool canChangeDataRole;
 
-     /*
+     /**
       * True indicates that the port's power role
       * can be changed. False otherwise.
       * For example, true if Type-C PD PR_SWAP
@@ -200,7 +200,7 @@
       */
      bool canChangePowerRole;
 
-     /*
+     /**
       * Identifies the type of the local port.
       *
       * UFP - Indicates that port can only act as device for
