Merge "[sensors] extend functionality of injectSensorData"
diff --git a/audio/2.0/IStreamOut.hal b/audio/2.0/IStreamOut.hal
index 155e329..336684f 100644
--- a/audio/2.0/IStreamOut.hal
+++ b/audio/2.0/IStreamOut.hal
@@ -47,14 +47,21 @@
      * Data structure passed back to the client via status message queue
      * of 'write' operation.
      *
-     * Possible values of 'retval' field:
+     * Possible values of 'writeRetval' field:
      *  - OK, write operation was successful;
      *  - INVALID_ARGUMENTS, stream was not configured properly;
      *  - INVALID_STATE, stream is in a state that doesn't allow writes.
+     *
+     * Possible values of 'presentationPositionRetval' field (must only
+     * be considered if 'writeRetval' field is set to 'OK'):
+     *  - OK, presentation position retrieved successfully;
+     *  - INVALID_ARGUMENTS, indicates that the position can't be retrieved;
+     *  - INVALID_OPERATION, retrieving presentation position isn't supported;
      */
     struct WriteStatus {
-        Result retval;
+        Result writeRetval;
         uint64_t written;
+        Result presentationPositionRetval;
         uint64_t frames;    // presentation position
         TimeSpec timeStamp; // presentation position
     };
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index 51c2cc7..de7bf13 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -330,7 +330,10 @@
         int64_t halFrames, halTime;
         retval = Stream::analyzeStatus(
                 "get_capture_position",
-                mStream->get_capture_position(mStream, &halFrames, &halTime));
+                mStream->get_capture_position(mStream, &halFrames, &halTime),
+                // HAL may have a stub function, always returning ENOSYS, don't
+                // spam the log in this case.
+                ENOSYS);
         if (retval == Result::OK) {
             frames = halFrames;
             time = halTime;
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index 4bb2274..ea6221e 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -88,24 +88,20 @@
         }
 
         const size_t availToRead = mDataMQ->availableToRead();
-        Result retval = Result::OK;
-        uint64_t written = 0;
+        IStreamOut::WriteStatus status;
+        status.writeRetval = Result::OK;
+        status.written = 0;
         if (mDataMQ->read(&mBuffer[0], availToRead)) {
             ssize_t writeResult = mStream->write(mStream, &mBuffer[0], availToRead);
             if (writeResult >= 0) {
-                written = writeResult;
+                status.written = writeResult;
             } else {
-                retval = Stream::analyzeStatus("write", writeResult);
+                status.writeRetval = Stream::analyzeStatus("write", writeResult);
             }
         }
-        uint64_t frames = 0;
-        struct timespec halTimeStamp = { 0, 0 };
-        if (retval == Result::OK && mStream->get_presentation_position != NULL) {
-            mStream->get_presentation_position(mStream, &frames, &halTimeStamp);
-        }
-        IStreamOut::WriteStatus status = { retval, written, frames,
-                                           { static_cast<uint64_t>(halTimeStamp.tv_sec),
-                                             static_cast<uint64_t>(halTimeStamp.tv_nsec) } };
+        status.presentationPositionRetval = status.writeRetval == Result::OK ?
+                StreamOut::getPresentationPositionImpl(mStream, &status.frames, &status.timeStamp) :
+                Result::OK;
         if (!mStatusMQ->write(&status)) {
             ALOGW("status message queue write failed");
         }
@@ -399,23 +395,29 @@
             Result::NOT_SUPPORTED;
 }
 
-Return<void> StreamOut::getPresentationPosition(getPresentationPosition_cb _hidl_cb)  {
+// static
+Result StreamOut::getPresentationPositionImpl(
+        audio_stream_out_t *stream, uint64_t *frames, TimeSpec *timeStamp) {
     Result retval(Result::NOT_SUPPORTED);
+    if (stream->get_presentation_position == NULL) return retval;
+    struct timespec halTimeStamp;
+    retval = Stream::analyzeStatus(
+            "get_presentation_position",
+            stream->get_presentation_position(stream, frames, &halTimeStamp),
+            // Don't logspam on EINVAL--it's normal for get_presentation_position
+            // to return it sometimes.
+            EINVAL);
+    if (retval == Result::OK) {
+        timeStamp->tvSec = halTimeStamp.tv_sec;
+        timeStamp->tvNSec = halTimeStamp.tv_nsec;
+    }
+    return retval;
+}
+
+Return<void> StreamOut::getPresentationPosition(getPresentationPosition_cb _hidl_cb)  {
     uint64_t frames = 0;
     TimeSpec timeStamp = { 0, 0 };
-    if (mStream->get_presentation_position != NULL) {
-        struct timespec halTimeStamp;
-        retval = Stream::analyzeStatus(
-                "get_presentation_position",
-                mStream->get_presentation_position(mStream, &frames, &halTimeStamp),
-                // Don't logspam on EINVAL--it's normal for get_presentation_position
-                // to return it sometimes.
-                EINVAL);
-        if (retval == Result::OK) {
-            timeStamp.tvSec = halTimeStamp.tv_sec;
-            timeStamp.tvNSec = halTimeStamp.tv_nsec;
-        }
-    }
+    Result retval = getPresentationPositionImpl(mStream, &frames, &timeStamp);
     _hidl_cb(retval, frames, timeStamp);
     return Void();
 }
diff --git a/audio/2.0/default/StreamOut.h b/audio/2.0/default/StreamOut.h
index 83f4447..754a0c0 100644
--- a/audio/2.0/default/StreamOut.h
+++ b/audio/2.0/default/StreamOut.h
@@ -108,6 +108,9 @@
     Return<void> createMmapBuffer(int32_t minSizeFrames, createMmapBuffer_cb _hidl_cb) override;
     Return<void> getMmapPosition(getMmapPosition_cb _hidl_cb) override;
 
+    static Result getPresentationPositionImpl(
+            audio_stream_out_t *stream, uint64_t *frames, TimeSpec *timeStamp);
+
   private:
     bool mIsClosed;
     audio_hw_device_t *mDevice;
diff --git a/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/AndroidTest.xml b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/AndroidTest.xml
index 60a2cd0..f0af67a 100644
--- a/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/AndroidTest.xml
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/AndroidTest.xml
@@ -24,7 +24,6 @@
             _32bit::DATA/nativetest/audio_effect_hidl_hal_test/audio_effect_hidl_hal_test,
             _64bit::DATA/nativetest64/audio_effect_hidl_hal_test/audio_effect_hidl_hal_test,
             "/>
-        <option name="test-config-path" value="vts/testcases/hal/audio/effect/hidl/target/HalAudioEffectHidlTargetBasicTest.config" />
         <option name="binary-test-type" value="gtest" />
         <option name="test-timeout" value="1m" />
     </test>
diff --git a/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/HalAudioEffectHidlTargetBasicTest.config b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/HalAudioEffectHidlTargetBasicTest.config
deleted file mode 100644
index 495fda9..0000000
--- a/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/HalAudioEffectHidlTargetBasicTest.config
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-    "use_gae_db": true,
-    "coverage": true,
-    "modules": [{
-                    "module_name": "system/lib64/hw/android.hardware.audio.effect@2.0-impl",
-                    "git_project": {
-                        "name": "platform/hardware/interfaces",
-                        "path": "hardware/interfaces"
-                    }
-                }]
-}
diff --git a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
index 0a8a22c..6e599d1 100644
--- a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
+++ b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
@@ -17,7 +17,8 @@
 #ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
 #define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
 
-#include <android/log.h>
+#include <log/log.h>
+
 #include <hidl/MQDescriptor.h>
 #include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
 #include <hidl/Status.h>
diff --git a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp b/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
index cdca7e2..3413a93 100644
--- a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
+++ b/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
@@ -35,18 +35,8 @@
 class BootHidlTest : public ::testing::Test {
  public:
   virtual void SetUp() override {
-    // TODO(b/33385836) Delete copied code
-    bool getStub = false;
-    char getsubProperty[PROPERTY_VALUE_MAX];
-    if (property_get("vts.hidl.get_stub", getsubProperty, "") > 0) {
-      if (!strcmp(getsubProperty, "true") || !strcmp(getsubProperty, "True") ||
-          !strcmp(getsubProperty, "1")) {
-        getStub = true;
-      }
-    }
-    boot = IBootControl::getService("bootctrl", getStub);
+    boot = IBootControl::getService("bootctrl");
     ASSERT_NE(boot, nullptr);
-    ASSERT_EQ(!getStub, boot->isRemote());
   }
 
   virtual void TearDown() override {}
@@ -91,6 +81,13 @@
     EXPECT_TRUE(result.isOk());
   }
   {
+    // Restore original flags to avoid problems on reboot
+    CommandResult cr;
+    Return <void> result = boot->markBootSuccessful(generate_callback(&cr));
+    EXPECT_TRUE(result.isOk());
+    EXPECT_TRUE(cr.success);
+  }
+  {
     CommandResult cr;
     uint32_t slots = boot->getNumberSlots();
     Return<void> result =
@@ -111,7 +108,16 @@
     EXPECT_TRUE(result.isOk());
     if (cr.success) {
       EXPECT_EQ(BoolResult::FALSE, boot->isSlotBootable(otherSlot));
-      boot->setActiveBootSlot(otherSlot, generate_callback(&cr));
+
+      // Restore original flags to avoid problems on reboot
+      result = boot->setActiveBootSlot(otherSlot, generate_callback(&cr));
+      EXPECT_TRUE(result.isOk());
+      EXPECT_TRUE(cr.success);
+      result = boot->setActiveBootSlot(curSlot, generate_callback(&cr));
+      EXPECT_TRUE(result.isOk());
+      EXPECT_TRUE(cr.success);
+      result = boot->markBootSuccessful(generate_callback(&cr));
+      EXPECT_TRUE(result.isOk());
       EXPECT_TRUE(cr.success);
     }
   }
diff --git a/broadcastradio/1.0/default/BroadcastRadio.cpp b/broadcastradio/1.0/default/BroadcastRadio.cpp
index 32331ce..45ffdb2 100644
--- a/broadcastradio/1.0/default/BroadcastRadio.cpp
+++ b/broadcastradio/1.0/default/BroadcastRadio.cpp
@@ -16,7 +16,8 @@
 #define LOG_TAG "BroadcastRadio"
 //#define LOG_NDEBUG 0
 
-#include <android/log.h>
+#include <log/log.h>
+
 #include <hardware/radio.h>
 
 #include "BroadcastRadio.h"
diff --git a/broadcastradio/1.0/default/Tuner.cpp b/broadcastradio/1.0/default/Tuner.cpp
index de63127..b564d5a 100644
--- a/broadcastradio/1.0/default/Tuner.cpp
+++ b/broadcastradio/1.0/default/Tuner.cpp
@@ -17,7 +17,7 @@
 #define LOG_TAG "Tuner"
 //#define LOG_NDEBUG 0
 
-#include <android/log.h>
+#include <log/log.h>
 
 #include "BroadcastRadio.h"
 #include "Tuner.h"
diff --git a/broadcastradio/1.0/default/Utils.cpp b/broadcastradio/1.0/default/Utils.cpp
index aefeeb1..8776222 100644
--- a/broadcastradio/1.0/default/Utils.cpp
+++ b/broadcastradio/1.0/default/Utils.cpp
@@ -16,7 +16,7 @@
 #define LOG_TAG "BroadcastRadioHalUtils"
 //#define LOG_NDEBUG 0
 
-#include <android/log.h>
+#include <log/log.h>
 #include <utils/misc.h>
 #include <system/radio_metadata.h>
 
diff --git a/contexthub/1.0/Android.mk b/contexthub/1.0/Android.mk
index 1286e66..c73c5c4 100644
--- a/contexthub/1.0/Android.mk
+++ b/contexthub/1.0/Android.mk
@@ -74,6 +74,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (HostEndPoint)
+#
+GEN := $(intermediates)/android/hardware/contexthub/V1_0/HostEndPoint.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.contexthub@1.0::types.HostEndPoint
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (HubAppInfo)
 #
 GEN := $(intermediates)/android/hardware/contexthub/V1_0/HubAppInfo.java
@@ -381,6 +400,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (HostEndPoint)
+#
+GEN := $(intermediates)/android/hardware/contexthub/V1_0/HostEndPoint.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.contexthub@1.0::types.HostEndPoint
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (HubAppInfo)
 #
 GEN := $(intermediates)/android/hardware/contexthub/V1_0/HubAppInfo.java
diff --git a/contexthub/1.0/IContexthub.hal b/contexthub/1.0/IContexthub.hal
index 1d136d3..42f2e2d 100644
--- a/contexthub/1.0/IContexthub.hal
+++ b/contexthub/1.0/IContexthub.hal
@@ -18,6 +18,13 @@
 
 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
+ * they execute within the Context Hub Runtime Environment (CHRE), which is
+ * standardized via the CHRE API, defined elsewhere.
+ */
 interface IContexthub {
     /*
      * Enumerate all available context hubs on the system.
diff --git a/contexthub/1.0/IContexthubCallback.hal b/contexthub/1.0/IContexthubCallback.hal
index 9e9cf27..9a6db4c 100644
--- a/contexthub/1.0/IContexthubCallback.hal
+++ b/contexthub/1.0/IContexthubCallback.hal
@@ -49,6 +49,20 @@
      */
      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.
+     * This method must be called when a nanoapp invokes chreAbort(...)).
+     *
+     * @params appId : app identifier
+     *               : abortCode code passed by the nanoApp.
+     *
+     * Also see chreAbort(...)
+     *
+     */
+     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
diff --git a/contexthub/1.0/default/Contexthub.cpp b/contexthub/1.0/default/Contexthub.cpp
index d530a87..5f78004 100644
--- a/contexthub/1.0/default/Contexthub.cpp
+++ b/contexthub/1.0/default/Contexthub.cpp
@@ -18,7 +18,8 @@
 
 #include <inttypes.h>
 
-#include <android/log.h>
+#include <log/log.h>
+
 #include <android/hardware/contexthub/1.0/IContexthub.h>
 #include <hardware/context_hub.h>
 
diff --git a/contexthub/1.0/types.hal b/contexthub/1.0/types.hal
index c8ea623..2326b58 100644
--- a/contexthub/1.0/types.hal
+++ b/contexthub/1.0/types.hal
@@ -30,6 +30,20 @@
     ENCRYPTED = (1<<1),// Encrypted nanoapp
 };
 
+enum HostEndPoint : uint16_t {
+    BROADCAST = 0xFFFF, // The message endpoint is a broadcast end point.
+                        // This value must never be used for a message from
+                        // the host to the hub.
+                        // If BROADCAST is specified as a destination for a
+                        // message from the context hub to the ContextHub
+                        // service, the message must be broadcast to all
+                        // registered clients by the Context Hub service.
+    UNSPECIFIED = 0xFFFE, // The message endpoint is unspecified. This value
+                          // must not be used for messages from the hub to host.
+                          // This value may be used for messages from the host
+                          // to the hub.
+};
+
 struct NanoAppBinary {
     uint32_t headerVersion;    // 0x1 for this version
     uint32_t magic;            // "NANO"
@@ -51,6 +65,8 @@
     BAROMETER,
     PROXIMITY_SENSOR,
     AMBIENT_LIGHT_SENSOR,
+    STATIONARY_DETECT,
+    INSTANT_MOTION_DETECT,
 
     GPS = 0x100,
     // Reserving this space for variants on GPS
@@ -65,6 +81,10 @@
     // Reserving this space for variants on Camera
 
     BLE = 0x500,
+    // Reserving this space for variants on Bluetooth Low Energy
+
+    WWAN = 0x600,
+    // Reserving this space for variants on WWAN
 
     PRIVATE_SENSOR_BASE = 0x10000,
     // Sensor types beyond PRIVATE_SENSOR_BASE are custom types
@@ -108,12 +128,29 @@
 
     uint32_t maxSupportedMsgLen;// This is the maximum size of the message that can
                                 // be sent to the hub in one chunk (in bytes)
+
+    // Machine-readable CHRE platform ID, returned to nanoapps in the CHRE API
+    // function call chreGetPlatformId(). The most significant 5 bytes of this
+    // value identify the vendor, while the remaining bytes are set by the
+    // vendor to uniquely identify each different CHRE implementation/hardware
+    // that the vendor supplies. This field pairs with the patch version part of
+    // chreVersion to fully specify the CHRE implementation version. See also
+    // the CHRE API header file chre/version.h.
+    uint64_t chrePlatformId;
+
+    // CHRE implementation version, returned to nanoApps in the CHRE API
+    // function call chreGetVersion(). This value consists of the implemented
+    // CHRE API version (major version in most significant byte, followed by
+    // minor version), and the platform-specific implementation patch version
+    // in the lower two bytes. See also the CHRE API header file chre/version.h.
+    uint32_t chreVersion;
 };
 
 struct ContextHubMsg {
-    uint64_t appName; // Intended recipient (appId)
-    uint32_t msgType; // Identifier for message
-    vec<uint8_t> msg; // Message body
+    uint64_t appName;      // Intended recipient (appId)
+    uint16_t hostEndPoint; // identifier for the endpoint. (also see enum HostEndPoint)
+    uint32_t msgType;      // Identifier for message
+    vec<uint8_t> msg;      // Message body
 };
 
 enum HubMemoryType : uint32_t {
diff --git a/gatekeeper/1.0/default/Gatekeeper.cpp b/gatekeeper/1.0/default/Gatekeeper.cpp
index 36e044c..dce06e6 100644
--- a/gatekeeper/1.0/default/Gatekeeper.cpp
+++ b/gatekeeper/1.0/default/Gatekeeper.cpp
@@ -15,9 +15,10 @@
  */
 #define LOG_TAG "android.hardware.gatekeeper@1.0-service"
 
-#include <android/log.h>
 #include <dlfcn.h>
 
+#include <log/log.h>
+
 #include "Gatekeeper.h"
 
 namespace android {
diff --git a/gnss/1.0/default/GnssConfiguration.cpp b/gnss/1.0/default/GnssConfiguration.cpp
index 0442c83..0c1aa86 100644
--- a/gnss/1.0/default/GnssConfiguration.cpp
+++ b/gnss/1.0/default/GnssConfiguration.cpp
@@ -15,7 +15,8 @@
  */
 
 #define LOG_TAG "GnssHAL_GnssConfigurationInterface"
-#include <android/log.h>
+
+#include <log/log.h>
 
 #include "GnssConfiguration.h"
 
diff --git a/gnss/1.0/default/GnssDebug.cpp b/gnss/1.0/default/GnssDebug.cpp
index d61f91d..cfc38ca 100644
--- a/gnss/1.0/default/GnssDebug.cpp
+++ b/gnss/1.0/default/GnssDebug.cpp
@@ -15,7 +15,8 @@
  */
 
 #define LOG_TAG "GnssHAL_GnssDebugInterface"
-#include <android/log.h>
+
+#include <log/log.h>
 
 #include "GnssDebug.h"
 
diff --git a/gnss/1.0/default/GnssNavigationMessage.cpp b/gnss/1.0/default/GnssNavigationMessage.cpp
index ef78ff4..c98abf6 100644
--- a/gnss/1.0/default/GnssNavigationMessage.cpp
+++ b/gnss/1.0/default/GnssNavigationMessage.cpp
@@ -15,7 +15,8 @@
  */
 
 #define LOG_TAG "GnssHAL_GnssNavigationMessageInterface"
-#include <android/log.h>
+
+#include <log/log.h>
 
 #include "GnssNavigationMessage.h"
 
diff --git a/light/2.0/default/Light.cpp b/light/2.0/default/Light.cpp
index f52c6af..cde1536 100644
--- a/light/2.0/default/Light.cpp
+++ b/light/2.0/default/Light.cpp
@@ -15,7 +15,8 @@
  */
 
 #define LOG_TAG "light"
-#include <android/log.h>
+
+#include <log/log.h>
 
 #include "Light.h"
 
diff --git a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target/AndroidTest.xml b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target/AndroidTest.xml
index 94a942b..240f1f0 100644
--- a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target/AndroidTest.xml
+++ b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target/AndroidTest.xml
@@ -24,7 +24,6 @@
             _32bit::DATA/nativetest/light_hidl_hal_test/light_hidl_hal_test,
             _64bit::DATA/nativetest64/light_hidl_hal_test/light_hidl_hal_test,
             "/>
-        <option name="test-config-path" value="vts/testcases/hal/light/hidl/target/HalLightHidlTargetBasicTest.config" />
         <option name="binary-test-type" value="gtest" />
         <option name="test-timeout" value="1m" />
     </test>
diff --git a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target/HalLightHidlTargetBasicTest.config b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target/HalLightHidlTargetBasicTest.config
deleted file mode 100644
index cb572aa..0000000
--- a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target/HalLightHidlTargetBasicTest.config
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-    "coverage": true,
-    "modules": [
-        {
-            "module_name": "system/lib64/hw/lights.bullhead",
-            "git_project": {
-                "name": "device/lge/bullhead",
-                "path": "device/lge/bullhead"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/lights.marlin",
-            "git_project": {
-                "name": "device/google/marlin",
-                "path": "device/google/marlin"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/lights.sailfish",
-            "git_project": {
-                "name": "device/google/marlin",
-                "path": "device/google/marlin"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/android.hardware.light@2.0-impl",
-            "git_project": {
-                "name": "platform/hardware/interfaces",
-                "path": "hardware/interfaces"
-            }
-        }
-    ]
-}
diff --git a/memtrack/1.0/default/Memtrack.cpp b/memtrack/1.0/default/Memtrack.cpp
index b93227f..5c1a5c4 100644
--- a/memtrack/1.0/default/Memtrack.cpp
+++ b/memtrack/1.0/default/Memtrack.cpp
@@ -15,11 +15,14 @@
  */
 
 #define LOG_TAG "android.hardware.memtrack@1.0-impl"
+
+#include <log/log.h>
+
 #include <hardware/hardware.h>
 #include <hardware/memtrack.h>
-#include <android/log.h>
 
 #include "Memtrack.h"
+
 namespace android {
 namespace hardware {
 namespace memtrack {
diff --git a/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target/AndroidTest.xml b/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target/AndroidTest.xml
index 7fb286b..9b00b4c 100644
--- a/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target/AndroidTest.xml
+++ b/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target/AndroidTest.xml
@@ -24,7 +24,6 @@
             _32bit::DATA/nativetest/memtrack_hidl_hal_test/memtrack_hidl_hal_test,
             _64bit::DATA/nativetest64/memtrack_hidl_hal_test/memtrack_hidl_hal_test,
             "/>
-        <option name="test-config-path" value="vts/testcases/hal/memtrack/hidl/target/HalMemtrackHidlTargetTest.config" />
         <option name="binary-test-type" value="gtest" />
         <option name="test-timeout" value="5m" />
     </test>
diff --git a/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target/HalMemtrackHidlTargetTest.config b/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target/HalMemtrackHidlTargetTest.config
deleted file mode 100644
index d2597a2..0000000
--- a/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target/HalMemtrackHidlTargetTest.config
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-    "use_gae_db": true,
-    "coverage": true,
-    "modules": [
-        {
-            "module_name": "system/lib64/hw/memtrack.msm8992",
-            "git_project": {
-                "name": "platform/hardware/qcom/display",
-                "path": "hardware/qcom/display"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/android.hardware.memtrack@1.0-impl",
-            "git_project": {
-                "name": "platform/hardware/interfaces",
-                "path": "hardware/interfaces"
-            }
-        }
-    ]
-}
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index 0759605..9d05fc2 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -51,21 +51,21 @@
 }
 
 
-INfc* HIDL_FETCH_INfc(const char *hal) {
+INfc* HIDL_FETCH_INfc(const char * /*name*/) {
     nfc_nci_device_t* nfc_device;
     int ret = 0;
     const hw_module_t* hw_module = NULL;
 
-    ret = hw_get_module (hal, &hw_module);
+    ret = hw_get_module (NFC_NCI_HARDWARE_MODULE_ID, &hw_module);
     if (ret == 0)
     {
         ret = nfc_nci_open (hw_module, &nfc_device);
         if (ret != 0) {
-            ALOGE ("nfc_nci_open %s failed: %d", hal, ret);
+            ALOGE ("nfc_nci_open failed: %d", ret);
         }
     }
     else
-        ALOGE ("hw_get_module %s failed: %d", hal, ret);
+        ALOGE ("hw_get_module failed: %d", ret);
 
     if (ret == 0) {
         return new Nfc(nfc_device);
diff --git a/nfc/1.0/vts/Nfc.vts b/nfc/1.0/vts/Nfc.vts
index 5882bf5..9261a60 100644
--- a/nfc/1.0/vts/Nfc.vts
+++ b/nfc/1.0/vts/Nfc.vts
@@ -87,6 +87,13 @@
             next: "powerCycle"
             next: "controlGranted"
         }
+        callflow: {
+            next: "write"
+            next: "close"
+            next: "coreInitialized"
+            next: "powerCycle"
+            next: "controlGranted"
+        }
     }
 
     api: {
@@ -98,6 +105,9 @@
         callflow: {
             exit: true
         }
+        callflow: {
+            exit: true
+        }
     }
 
     api: {
@@ -113,6 +123,13 @@
             next: "coreInitialized"
             next: "powerCycle"
         }
+        callflow: {
+            next: "write"
+            next: "close"
+            next: "prediscover"
+            next: "coreInitialized"
+            next: "powerCycle"
+        }
     }
 
     api: {
@@ -128,6 +145,13 @@
             next: "controlGranted"
             next: "close"
         }
+        callflow: {
+            next: "write"
+            next: "coreInitialized"
+            next: "prediscover"
+            next: "controlGranted"
+            next: "close"
+        }
     }
 
 }
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
index de01f43..f2f17f4 100644
--- a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
@@ -22,6 +22,7 @@
 from vts.runners.host import base_test_with_webdb
 from vts.runners.host import test_runner
 from vts.utils.python.controllers import android_device
+from vts.utils.python.coverage import coverage_utils
 
 PASSTHROUGH_MODE_KEY = "passthrough_mode"
 
@@ -104,7 +105,7 @@
         result = self.dut.hal.nfc.close()
         logging.info("close result: %s", result)
 
-        self.SetCoverageData(self.dut.hal.nfc.GetRawCodeCoverage())
+        self.SetCoverageData(coverage_utils.GetGcdaDict(self.dut))
 
 if __name__ == "__main__":
     test_runner.main()
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config
index c2429e0..9173e19 100644
--- a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config
@@ -1,11 +1,3 @@
 {
-    "passthrough_mode": true,
-    "coverage": true,
-    "modules": [{
-                    "module_name": "system/lib64/hw/nfc_nci.bullhead",
-                    "git_project": {
-                        "name": "platform/system/nfc",
-                        "path": "system/nfc"
-                    }
-                }]
+    "passthrough_mode": true
 }
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
index ee02488..9576183 100644
--- a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
@@ -24,7 +24,6 @@
             _32bit::DATA/nativetest/nfc_hidl_hal_test/nfc_hidl_hal_test,
             _64bit::DATA/nativetest64/nfc_hidl_hal_test/nfc_hidl_hal_test,
             "/>
-        <option name="test-config-path" value="vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config" />
         <option name="binary-test-type" value="gtest" />
         <option name="test-timeout" value="10m" />
     </test>
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config
deleted file mode 100644
index e6b5a2c..0000000
--- a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-    "coverage": true,
-    "modules": [{
-                    "module_name": "system/lib64/hw/nfc_nci.bullhead",
-                    "git_project": {
-                        "name": "platform/system/nfc",
-                        "path": "system/nfc"
-                    }
-                }]
-}
diff --git a/power/1.0/default/Power.cpp b/power/1.0/default/Power.cpp
index 820c410..656a2ae 100644
--- a/power/1.0/default/Power.cpp
+++ b/power/1.0/default/Power.cpp
@@ -15,9 +15,12 @@
  */
 
 #define LOG_TAG "android.hardware.power@1.0-impl"
+
+#include <log/log.h>
+
 #include <hardware/hardware.h>
 #include <hardware/power.h>
-#include <android/log.h>
+
 #include "Power.h"
 
 namespace android {
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/AndroidTest.xml b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/AndroidTest.xml
index 0eb2142..bb80de2 100644
--- a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/AndroidTest.xml
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/AndroidTest.xml
@@ -24,7 +24,6 @@
             _32bit::DATA/nativetest/power_hidl_hal_test/power_hidl_hal_test,
             _64bit::DATA/nativetest64/power_hidl_hal_test/power_hidl_hal_test,
             "/>
-        <option name="test-config-path" value="vts/testcases/hal/power/hidl/target/HalPowerHidlTargetTest.config" />
         <option name="binary-test-type" value="gtest" />
         <option name="test-timeout" value="1m" />
     </test>
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/HalPowerHidlTargetTest.config b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/HalPowerHidlTargetTest.config
deleted file mode 100644
index 54c0175..0000000
--- a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target/HalPowerHidlTargetTest.config
+++ /dev/null
@@ -1,34 +0,0 @@
-{
-    "use_gae_db": true,
-    "coverage": true,
-    "modules": [
-        {
-            "module_name": "system/lib64/hw/power.bullhead",
-            "git_project": {
-                "name": "device/lge/bullhead",
-                "path": "device/lge/bullhead"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/power.marlin",
-            "git_project": {
-                "name": "device/google/marlin",
-                "path": "device/google/marlin"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/power.sailfish",
-            "git_project": {
-                "name": "device/google/marlin",
-                "path": "device/google/marlin"
-            }
-        },
-        {
-            "module_name": "system/lib64/hw/android.hardware.power@1.0-impl",
-            "git_project": {
-                "name": "platform/hardware/interfaces",
-                "path": "hardware/interfaces"
-            }
-        }
-    ]
-}
diff --git a/sensors/1.0/default/convert.cpp b/sensors/1.0/default/convert.cpp
index 18725e7..68fb75c 100644
--- a/sensors/1.0/default/convert.cpp
+++ b/sensors/1.0/default/convert.cpp
@@ -105,6 +105,7 @@
 
         case SensorType::SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED:
         case SensorType::SENSOR_TYPE_GYROSCOPE_UNCALIBRATED:
+        case SensorType::SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED:
         {
             dst->u.uncal.x = src.uncalibrated_gyro.x_uncalib;
             dst->u.uncal.y = src.uncalibrated_gyro.y_uncalib;
@@ -243,6 +244,7 @@
 
         case SensorType::SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED:
         case SensorType::SENSOR_TYPE_GYROSCOPE_UNCALIBRATED:
+        case SensorType::SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED:
         {
             dst->uncalibrated_gyro.x_uncalib = src.u.uncal.x;
             dst->uncalibrated_gyro.y_uncalib = src.u.uncal.y;
diff --git a/sensors/1.0/types.hal b/sensors/1.0/types.hal
index 22931b2..d93fabd 100644
--- a/sensors/1.0/types.hal
+++ b/sensors/1.0/types.hal
@@ -126,7 +126,7 @@
      * reporting-mode: continuous
      *
      * All values are in SI units (m/s^2) and measure the acceleration of the
-     * device minus the force of gravity.
+     * device minus the acceleration due to gravity.
      *
      * Implement the non-wake-up version of this sensor and implement the
      * wake-up version if the system possesses a wake up fifo.
@@ -701,6 +701,18 @@
     SENSOR_TYPE_LOW_LATENCY_OFFBODY_DETECT      = 34,
 
     /*
+     * SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED
+     * reporting-mode: continuous
+     *
+     * All values are in SI units (m/s^2) and measure the acceleration of the
+     * device minus the acceleration due to gravity.
+     *
+     * Implement the non-wake-up version of this sensor and implement the
+     * wake-up version if the system possesses a wake up fifo.
+     */
+    SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED      = 35,
+
+    /*
      * Base for device manufacturers private sensor types.
      * These sensor types can't be exposed in the SDK.
      */
@@ -1107,6 +1119,7 @@
 
     /* SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED,
      * SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
+     * SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED
      */
     Uncal uncal;
 
diff --git a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py
index de764af..70eca84 100644
--- a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py
+++ b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py
@@ -52,6 +52,7 @@
             target_version=1.0,
             target_package="android.hardware.sensors",
             target_component_name="ISensors",
+            hw_binder_service_name=None,
             bits=64 if self.dut.is64Bit else 32)
 
     def tearDownClass(self):
diff --git a/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp b/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp
index 3379d93..cb00ad5 100644
--- a/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp
+++ b/soundtrigger/2.0/vts/functional/soundtrigger_hidl_hal_test.cpp
@@ -40,9 +40,8 @@
 class SoundTriggerHidlTest : public ::testing::Test {
  public:
   virtual void SetUp() override {
-    mSoundTriggerHal = ISoundTriggerHw::getService("sound_trigger.primary", false);
+    mSoundTriggerHal = ISoundTriggerHw::getService("sound_trigger.primary");
     ASSERT_NE(nullptr, mSoundTriggerHal.get());
-    ASSERT_TRUE(mSoundTriggerHal->isRemote());
     mCallback = new MyCallback();
     ASSERT_NE(nullptr, mCallback.get());
   }
diff --git a/tests/memory/1.0/IMemoryTest.hal b/tests/memory/1.0/IMemoryTest.hal
index c20c536..4d6de3f 100644
--- a/tests/memory/1.0/IMemoryTest.hal
+++ b/tests/memory/1.0/IMemoryTest.hal
@@ -17,5 +17,6 @@
 package android.hardware.tests.memory@1.0;
 
 interface IMemoryTest {
+    haveSomeMemory(memory mem) generates(memory mem);
     fillMemory(memory memory_in, uint8_t filler);
 };
diff --git a/tests/memory/1.0/default/MemoryTest.cpp b/tests/memory/1.0/default/MemoryTest.cpp
index 40bb2dc..37a2a60 100644
--- a/tests/memory/1.0/default/MemoryTest.cpp
+++ b/tests/memory/1.0/default/MemoryTest.cpp
@@ -34,6 +34,11 @@
 namespace implementation {
 
 // Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow.
+Return<void> Memory::haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) {
+    _hidl_cb(mem);
+    return Void();
+}
+
 Return<void> Memory::fillMemory(const hidl_memory& memory_in, uint8_t filler) {
     sp<IMemory> memory = mapMemory(memory_in);
 
diff --git a/tests/memory/1.0/default/MemoryTest.h b/tests/memory/1.0/default/MemoryTest.h
index 5cab494..0d903f1 100644
--- a/tests/memory/1.0/default/MemoryTest.h
+++ b/tests/memory/1.0/default/MemoryTest.h
@@ -39,6 +39,8 @@
 
 struct Memory : public IMemoryTest {
     // Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow.
+    Return<void> haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) override;
+
     Return<void> fillMemory(const hidl_memory& memory_in, uint8_t filler) override;
 
 };
diff --git a/thermal/1.0/default/Thermal.cpp b/thermal/1.0/default/Thermal.cpp
index 580b540..8a8ad0a 100644
--- a/thermal/1.0/default/Thermal.cpp
+++ b/thermal/1.0/default/Thermal.cpp
@@ -15,12 +15,15 @@
  */
 
 #define LOG_TAG "android.hardware.thermal@1.0-impl"
-#include <android/log.h>
 
 #include <errno.h>
+
+#include <vector>
+
+#include <log/log.h>
+
 #include <hardware/hardware.h>
 #include <hardware/thermal.h>
-#include <vector>
 
 #include "Thermal.h"
 
diff --git a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/AndroidTest.xml b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/AndroidTest.xml
index 3594745..169264d 100644
--- a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/AndroidTest.xml
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/AndroidTest.xml
@@ -26,8 +26,6 @@
             "/>
         <option name="binary-test-type" value="gtest" />
         <option name="test-timeout" value="5m" />
-        <option name="test-config-path"
-            value="vts/testcases/hal/thermal/hidl/target/ThermalHidlBasicTest.config" />
     </test>
 </configuration>
 
diff --git a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/ThermalHidlBasicTest.config b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/ThermalHidlBasicTest.config
deleted file mode 100644
index 0d19619..0000000
--- a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/ThermalHidlBasicTest.config
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-    "use_gae_db": true,
-    "coverage": true,
-    "modules": [{
-                    "module_name": "system/lib64/hw/thermal.bullhead",
-                    "git_project": {
-                        "name": "device/lge/bullhead",
-                        "path": "device/lge/bullhead"
-                    }
-                },
-                {
-                    "module_name": "system/lib64/hw/thermal.marlin",
-                    "git_project": {
-                        "name": "device/google/marlin",
-                        "path": "device/google/marlin"
-                    }
-                },
-                {
-                    "module_name": "system/lib64/hw/android.hardware.thermal@1.0-impl",
-                    "git_project": {
-                        "name": "platform/hardware/interfaces",
-                        "path": "hardware/interfaces"
-                    }
-                }]
-}
diff --git a/vehicle/2.0/default/vehicle_hal_manager/AccessControlConfigParser.cpp b/vehicle/2.0/default/vehicle_hal_manager/AccessControlConfigParser.cpp
index d6458c2..063a16d 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/AccessControlConfigParser.cpp
+++ b/vehicle/2.0/default/vehicle_hal_manager/AccessControlConfigParser.cpp
@@ -19,10 +19,10 @@
 #include "AccessControlConfigParser.h"
 
 #include <fstream>
-#include <sstream>
 #include <iostream>
+#include <sstream>
 
-#include <android/log.h>
+#include <log/log.h>
 
 namespace android {
 namespace hardware {
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.cpp b/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.cpp
index 463b333..e9dd68d 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.cpp
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.cpp
@@ -18,7 +18,7 @@
 
 #include "VehicleObjectPool.h"
 
-#include <android/log.h>
+#include <log/log.h>
 
 #include "VehicleUtils.h"
 
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.cpp b/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.cpp
index ab1d908..5a00631 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.cpp
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.cpp
@@ -18,7 +18,7 @@
 
 #include "VehicleUtils.h"
 
-#include <android/log.h>
+#include <log/log.h>
 
 namespace android {
 namespace hardware {
diff --git a/vehicle/2.0/types.hal b/vehicle/2.0/types.hal
index bb83c8a..a9b706d 100644
--- a/vehicle/2.0/types.hal
+++ b/vehicle/2.0/types.hal
@@ -720,6 +720,23 @@
         | 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
+     * this property and vehicle HAL may use this property value to decide
+     * response sent through AUDIO_FOCUS property.
+     * Data format is the same as AUDIO_FOCUS property.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ_WRITE
+     */
+    AUDIO_FOCUS_EXT_SYNC = (
+        0x0910
+        | VehiclePropertyGroup:SYSTEM
+        | VehiclePropertyType:INT32_VEC
+        | VehicleArea:GLOBAL),
+
+    /*
      * Property to control audio volume of each audio context.
      *
      * VehiclePropConfig
@@ -757,6 +774,22 @@
         | 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.
+     * Data format for this property is the same as AUDIO_VOLUME property.
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ_WRITE
+     * @config_flags all audio contexts supported.
+     */
+    AUDIO_VOLUME_EXT_SYNC = (
+        0x0911
+        | VehiclePropertyGroup:SYSTEM
+        | 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.
      *
@@ -890,6 +923,53 @@
         | VehiclePropertyType:INT32_VEC
         | VehicleArea:GLOBAL),
 
+    /**
+     * Represents state of audio stream. Audio HAL should set this when a stream is starting or
+     * ending. Car service can request focus for audio played without focus. If such feature
+     * is not required, this property does not need to be implemented.
+     * Car service only monitors setting of this property. It is up to each vehicle HAL
+     * implementation to add necessary action but default implementation will be doing nothing on
+     * this propery's set from audio HAL.
+     * Actual streaming of data should be done only after getting focus for the given stream from
+     * car audio module. Focus can be already granted when stream is started. Focus state can be
+     * monitored by monitoring AUDIO_FOCUS property. If car does not support
+     * AUDIO_FOCUS property, there is no need to monitor focus as focus is assumed to be
+     * granted always.
+     * Data has the following format:
+     *   int32_array[0] : vehicle_audio_stream_state, 0: stopped, 1: started
+     *   int32_array[1] : stream number like 0, 1, 2, ...
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ_WRITE
+     */
+    AUDIO_STREAM_STATE  = (
+        0x0906
+        | VehiclePropertyGroup:SYSTEM
+        | VehiclePropertyType:INT32_VEC
+        | VehicleArea:GLOBAL),
+
+    /**
+     * Property to control car specific audio parameters. Each parameter is defined as string key-
+     * value pair.
+     * set and event notification can pass multiple parameters using the
+     * following format:
+     *   key1=value1;key2=value2;...
+     * get call can request multiple parameters using the following format:
+     *   key1;key2;...
+     * Response for get call has the same format as set.
+     *
+     * VehiclePropConfig
+     *   configString: give list of all supported keys with ; as separator. For example:
+     *     key1;key2;...
+     *
+     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+     * @access VehiclePropertyAccess:READ_WRITE
+    AUDIO_PARAMETERS = (
+        0x907
+        | VehiclePropertyGroup:SYSTEM
+        | VehiclePropertyType:STRING
+        | VehicleArea:GLOBAL),
+
     /*
      * Index in int32Values for AP_POWER_STATE property.
      */
diff --git a/vibrator/1.0/default/Vibrator.cpp b/vibrator/1.0/default/Vibrator.cpp
index ee3a458..e86e681 100644
--- a/vibrator/1.0/default/Vibrator.cpp
+++ b/vibrator/1.0/default/Vibrator.cpp
@@ -15,9 +15,12 @@
  */
 
 #define LOG_TAG "VibratorService"
+
+#include <log/log.h>
+
 #include <hardware/hardware.h>
 #include <hardware/vibrator.h>
-#include <android/log.h>
+
 #include "Vibrator.h"
 
 namespace android {
diff --git a/vr/1.0/default/Vr.cpp b/vr/1.0/default/Vr.cpp
index 2b2372b..a0de998 100644
--- a/vr/1.0/default/Vr.cpp
+++ b/vr/1.0/default/Vr.cpp
@@ -16,9 +16,11 @@
 
 #define LOG_TAG "VrService"
 
+#include <log/log.h>
+
 #include <hardware/hardware.h>
 #include <hardware/vr.h>
-#include <android/log.h>
+
 #include "Vr.h"
 
 namespace android {
diff --git a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
index 9ed378f..933fcde 100644
--- a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
+++ b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
@@ -48,6 +48,7 @@
             target_version=1.0,
             target_package="android.hardware.vr",
             target_component_name="IVr",
+            hw_binder_service_name=None,
             bits=64)
 
     def tearDownClass(self):
diff --git a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target/AndroidTest.xml b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target/AndroidTest.xml
index 888a585..aa5a48f 100644
--- a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target/AndroidTest.xml
+++ b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/target/AndroidTest.xml
@@ -24,7 +24,8 @@
             _32bit::DATA/nativetest/vr_hidl_hal_test/vr_hidl_hal_test,
             _64bit::DATA/nativetest64/vr_hidl_hal_test/vr_hidl_hal_test,
             "/>
-        <option name="binary-test-type" value="gtest" />
+        <option name="binary-test-type" value="hal_hidl_gtest" />
+        <option name="hwbinder-service" value="android.hardware.vr" />
         <option name="test-timeout" value="1m" />
         <option name="test-config-path" value="vts/testcases/hal/vr/hidl/target/VrHidlTargetTest.config" />
 </test>
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 98af043..0d6b560 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -81,9 +81,13 @@
      */
     TDLS_OFFCHANNEL = 1 << 11,
     /**
+     * Support for keep alive packet offload.
+     */
+    KEEP_ALIVE = 1 << 12,
+    /**
      * Support for tracking connection packets' fate.
      */
-    DEBUG_PACKET_FATE = 1 << 12
+    DEBUG_PACKET_FATE = 1 << 13
   };
 
   /**
@@ -379,6 +383,55 @@
   setRoamingState(StaRoamingState state) generates (WifiStatus status);
 
   /**
+   * Enable/Disable Neighbour discovery offload functionality in the firmware.
+   *
+   * @param enable true to enable, false to disable.
+   * @return status WifiStatus of the operation.
+   *         Possible status codes:
+   *         |WifiStatusCode.SUCCESS|,
+   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
+   *         |WifiStatusCode.ERROR_UNKNOWN|
+   */
+  enableNdOffload(bool enable) generates (WifiStatus status);
+
+  /**
+   * Start sending the specified keep alive packets periodically.
+   *
+   * @param cmdId command Id to use for this invocation.
+   * @param ipPacketData IP packet contents to be transmitted.
+   * @param etherType 16 bit ether type to be set in the ethernet frame
+   *        transmitted.
+   * @param srcAddress Source MAC address of the packet.
+   * @param dstAddress Destination MAC address of the packet.
+   * @param periodInMs Interval at which this packet must be transmitted.
+   * @return status WifiStatus of the operation.
+   *         Possible status codes:
+   *         |WifiStatusCode.SUCCESS|,
+   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
+   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
+   *         |WifiStatusCode.ERROR_UNKNOWN|
+   */
+  startSendingKeepAlivePackets(
+      CommandId cmdId, vec<uint8_t> ipPacketData, uint16_t etherType,
+      MacAddress srcAddress, MacAddress dstAddress, uint32_t periodInMs)
+      generates (WifiStatus status);
+
+  /**
+   * Stop sending the specified keep alive packets.
+   *
+   * @param cmdId command Id corresponding to the request.
+   * @return status WifiStatus of the operation.
+   *         Possible status codes:
+   *         |WifiStatusCode.SUCCESS|,
+   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
+   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
+   *         |WifiStatusCode.ERROR_UNKNOWN|
+   */
+  stopSendingKeepAlivePackets(CommandId cmdId) generates (WifiStatus status);
+
+  /**
    * API to start packet fate monitoring.
    * - Once stared, monitoring must remain active until HAL is unloaded.
    * - When HAL is unloaded, all packet fate buffers must be cleared.
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 9cc57bb..80cc56e 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -82,6 +82,8 @@
       return HidlStaIfaceCaps::TDLS;
     case WIFI_FEATURE_TDLS_OFFCHANNEL:
       return HidlStaIfaceCaps::TDLS_OFFCHANNEL;
+    case WIFI_FEATURE_MKEEP_ALIVE:
+      return HidlStaIfaceCaps::KEEP_ALIVE;
   };
   CHECK(false) << "Unknown legacy feature: " << feature;
   return {};
@@ -239,7 +241,8 @@
                              WIFI_FEATURE_HOTSPOT,
                              WIFI_FEATURE_PNO,
                              WIFI_FEATURE_TDLS,
-                             WIFI_FEATURE_TDLS_OFFCHANNEL}) {
+                             WIFI_FEATURE_TDLS_OFFCHANNEL,
+                             WIFI_FEATURE_MKEEP_ALIVE}) {
     if (feature & legacy_feature_set) {
       *hidl_caps |= convertLegacyFeatureToHidlStaIfaceCapability(feature);
     }
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index 3b99e60..3bfd2bb 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -633,15 +633,46 @@
   return {status, caps};
 }
 
+wifi_error WifiLegacyHal::configureRoaming(const wifi_roaming_config& config) {
+  wifi_roaming_config config_internal = config;
+  return global_func_table_.wifi_configure_roaming(wlan_interface_handle_,
+                                                   &config_internal);
+}
+
 wifi_error WifiLegacyHal::enableFirmwareRoaming(fw_roaming_state_t state) {
   return global_func_table_.wifi_enable_firmware_roaming(wlan_interface_handle_,
                                                          state);
 }
 
-wifi_error WifiLegacyHal::configureRoaming(const wifi_roaming_config& config) {
-  wifi_roaming_config config_internal = config;
-  return global_func_table_.wifi_configure_roaming(wlan_interface_handle_,
-                                                   &config_internal);
+wifi_error WifiLegacyHal::configureNdOffload(bool enable) {
+  return global_func_table_.wifi_configure_nd_offload(wlan_interface_handle_,
+                                                      enable);
+}
+
+wifi_error WifiLegacyHal::startSendingOffloadedPacket(
+    uint32_t cmd_id,
+    const std::vector<uint8_t>& ip_packet_data,
+    const std::array<uint8_t, 6>& src_address,
+    const std::array<uint8_t, 6>& dst_address,
+    uint32_t period_in_ms) {
+  std::vector<uint8_t> ip_packet_data_internal(ip_packet_data);
+  std::vector<uint8_t> src_address_internal(
+      src_address.data(), src_address.data() + src_address.size());
+  std::vector<uint8_t> dst_address_internal(
+      dst_address.data(), dst_address.data() + dst_address.size());
+  return global_func_table_.wifi_start_sending_offloaded_packet(
+      cmd_id,
+      wlan_interface_handle_,
+      ip_packet_data_internal.data(),
+      ip_packet_data_internal.size(),
+      src_address_internal.data(),
+      dst_address_internal.data(),
+      period_in_ms);
+}
+
+wifi_error WifiLegacyHal::stopSendingOffloadedPacket(uint32_t cmd_id) {
+  return global_func_table_.wifi_stop_sending_offloaded_packet(
+      cmd_id, wlan_interface_handle_);
 }
 
 std::pair<wifi_error, uint32_t> WifiLegacyHal::getLoggerSupportedFeatureSet() {
diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h
index b585314..a3ac075 100644
--- a/wifi/1.0/default/wifi_legacy_hal.h
+++ b/wifi/1.0/default/wifi_legacy_hal.h
@@ -182,8 +182,16 @@
                                      on_threshold_breached_callback);
   wifi_error stopRssiMonitoring(wifi_request_id id);
   std::pair<wifi_error, wifi_roaming_capabilities> getRoamingCapabilities();
-  wifi_error enableFirmwareRoaming(fw_roaming_state_t state);
   wifi_error configureRoaming(const wifi_roaming_config& config);
+  wifi_error enableFirmwareRoaming(fw_roaming_state_t state);
+  wifi_error configureNdOffload(bool enable);
+  wifi_error startSendingOffloadedPacket(
+      uint32_t cmd_id,
+      const std::vector<uint8_t>& ip_packet_data,
+      const std::array<uint8_t, 6>& src_address,
+      const std::array<uint8_t, 6>& dst_address,
+      uint32_t period_in_ms);
+  wifi_error stopSendingOffloadedPacket(uint32_t cmd_id);
   // Logger/debug functions.
   std::pair<wifi_error, uint32_t> getLoggerSupportedFeatureSet();
   wifi_error startPktFateMonitoring();
diff --git a/wifi/1.0/default/wifi_sta_iface.cpp b/wifi/1.0/default/wifi_sta_iface.cpp
index e48978e..a00c5bc 100644
--- a/wifi/1.0/default/wifi_sta_iface.cpp
+++ b/wifi/1.0/default/wifi_sta_iface.cpp
@@ -212,6 +212,44 @@
                          state);
 }
 
+Return<void> WifiStaIface::enableNdOffload(bool enable,
+                                           enableNdOffload_cb hidl_status_cb) {
+  return validateAndCall(this,
+                         WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+                         &WifiStaIface::enableNdOffloadInternal,
+                         hidl_status_cb,
+                         enable);
+}
+
+Return<void> WifiStaIface::startSendingKeepAlivePackets(
+    uint32_t cmd_id,
+    const hidl_vec<uint8_t>& ip_packet_data,
+    uint16_t ether_type,
+    const hidl_array<uint8_t, 6>& src_address,
+    const hidl_array<uint8_t, 6>& dst_address,
+    uint32_t period_in_ms,
+    startSendingKeepAlivePackets_cb hidl_status_cb) {
+  return validateAndCall(this,
+                         WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+                         &WifiStaIface::startSendingKeepAlivePacketsInternal,
+                         hidl_status_cb,
+                         cmd_id,
+                         ip_packet_data,
+                         ether_type,
+                         src_address,
+                         dst_address,
+                         period_in_ms);
+}
+
+Return<void> WifiStaIface::stopSendingKeepAlivePackets(
+    uint32_t cmd_id, stopSendingKeepAlivePackets_cb hidl_status_cb) {
+  return validateAndCall(this,
+                         WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+                         &WifiStaIface::stopSendingKeepAlivePacketsInternal,
+                         hidl_status_cb,
+                         cmd_id);
+}
+
 Return<void> WifiStaIface::startDebugPacketFateMonitoring(
     startDebugPacketFateMonitoring_cb hidl_status_cb) {
   return validateAndCall(this,
@@ -498,6 +536,31 @@
   return createWifiStatusFromLegacyError(legacy_status);
 }
 
+WifiStatus WifiStaIface::enableNdOffloadInternal(bool enable) {
+  legacy_hal::wifi_error legacy_status =
+      legacy_hal_.lock()->configureNdOffload(enable);
+  return createWifiStatusFromLegacyError(legacy_status);
+}
+
+WifiStatus WifiStaIface::startSendingKeepAlivePacketsInternal(
+    uint32_t cmd_id,
+    const std::vector<uint8_t>& ip_packet_data,
+    uint16_t /* ether_type */,
+    const std::array<uint8_t, 6>& src_address,
+    const std::array<uint8_t, 6>& dst_address,
+    uint32_t period_in_ms) {
+  legacy_hal::wifi_error legacy_status =
+      legacy_hal_.lock()->startSendingOffloadedPacket(
+          cmd_id, ip_packet_data, src_address, dst_address, period_in_ms);
+  return createWifiStatusFromLegacyError(legacy_status);
+}
+
+WifiStatus WifiStaIface::stopSendingKeepAlivePacketsInternal(uint32_t cmd_id) {
+  legacy_hal::wifi_error legacy_status =
+      legacy_hal_.lock()->stopSendingOffloadedPacket(cmd_id);
+  return createWifiStatusFromLegacyError(legacy_status);
+}
+
 WifiStatus WifiStaIface::startDebugPacketFateMonitoringInternal() {
   legacy_hal::wifi_error legacy_status =
       legacy_hal_.lock()->startPktFateMonitoring();
diff --git a/wifi/1.0/default/wifi_sta_iface.h b/wifi/1.0/default/wifi_sta_iface.h
index 90126cd..311c991 100644
--- a/wifi/1.0/default/wifi_sta_iface.h
+++ b/wifi/1.0/default/wifi_sta_iface.h
@@ -83,6 +83,18 @@
                                 configureRoaming_cb hidl_status_cb) override;
   Return<void> setRoamingState(StaRoamingState state,
                                setRoamingState_cb hidl_status_cb) override;
+  Return<void> enableNdOffload(bool enable,
+                               enableNdOffload_cb hidl_status_cb) override;
+  Return<void> startSendingKeepAlivePackets(
+      uint32_t cmd_id,
+      const hidl_vec<uint8_t>& ip_packet_data,
+      uint16_t ether_type,
+      const hidl_array<uint8_t, 6>& src_address,
+      const hidl_array<uint8_t, 6>& dst_address,
+      uint32_t period_in_ms,
+      startSendingKeepAlivePackets_cb hidl_status_cb) override;
+  Return<void> stopSendingKeepAlivePackets(
+      uint32_t cmd_id, stopSendingKeepAlivePackets_cb hidl_status_cb) override;
   Return<void> startDebugPacketFateMonitoring(
       startDebugPacketFateMonitoring_cb hidl_status_cb) override;
   Return<void> stopDebugPacketFateMonitoring(
@@ -121,6 +133,15 @@
   getRoamingCapabilitiesInternal();
   WifiStatus configureRoamingInternal(const StaRoamingConfig& config);
   WifiStatus setRoamingStateInternal(StaRoamingState state);
+  WifiStatus enableNdOffloadInternal(bool enable);
+  WifiStatus startSendingKeepAlivePacketsInternal(
+      uint32_t cmd_id,
+      const std::vector<uint8_t>& ip_packet_data,
+      uint16_t ether_type,
+      const std::array<uint8_t, 6>& src_address,
+      const std::array<uint8_t, 6>& dst_address,
+      uint32_t period_in_ms);
+  WifiStatus stopSendingKeepAlivePacketsInternal(uint32_t cmd_id);
   WifiStatus startDebugPacketFateMonitoringInternal();
   WifiStatus stopDebugPacketFateMonitoringInternal();
   std::pair<WifiStatus, std::vector<WifiDebugTxPacketFateReport>>
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIface.hal b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
index 0fa19c8..35985fc 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
@@ -261,12 +261,12 @@
   /**
    * Set up a P2P group owner manually (i.e., without group owner
    * negotiation with a specific peer). This is also known as autonomous
-   * group owner. Optional |persistent| may be used to specify restart of a
-   * persistent group.
+   * group owner. Optional |persistentNetworkId| may be used to specify
+   * restart of a persistent group.
    *
    * @param persistent Used to request a persistent group to be formed.
    * @param persistentNetworkId Used to specify the restart of a persistent
-   *        group.
+   *        group. Set to UINT32_MAX for a non-persistent group.
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,