diff --git a/Android.bp b/Android.bp
index 727f07f..dbc9fa2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -22,6 +22,14 @@
     ],
 }
 
+phony {
+    name: "libhidl",
+    required: [
+        "libhidlbase",
+        "libhidltransport",
+    ],
+}
+
 cc_test {
     name: "libhidl_test",
     defaults: ["libhidl-defaults"],
diff --git a/base/Status.cpp b/base/Status.cpp
index 90474a0..08631cc 100644
--- a/base/Status.cpp
+++ b/base/Status.cpp
@@ -149,19 +149,28 @@
 }
 
 namespace details {
-    void return_status::assertOk() const {
+    void return_status::onValueRetrieval() const {
         if (!isOk()) {
             LOG(FATAL) << "Attempted to retrieve value from failed HIDL call: " << description();
         }
     }
 
+    void return_status::assertOk() const {
+        if (!isOk()) {
+            LOG(FATAL) << "Failed HIDL return status not checked. Usually this happens because of "
+                          "a transport error (error parceling, binder driver, or from unparceling)"
+                          ". If you see this in code calling into \"Bn\" classes in for a HAL "
+                          "server process, then it is likely that the code there is returning "
+                          "transport errors there (as opposed to errors defined within its "
+                          "protocol). Error is: " << description();
+        }
+    }
+
     return_status::~return_status() {
         // mCheckedStatus must be checked before isOk since isOk modifies mCheckedStatus
         if (mCheckedStatus) return;
 
-        if (!isOk()) {
-            LOG(FATAL) << "Failed HIDL return status not checked: " << description();
-        }
+        assertOk();
 
         if (gReturnRestriction == HidlReturnRestriction::NONE) {
             return;
@@ -176,9 +185,10 @@
     }
 
     return_status& return_status::operator=(return_status&& other) noexcept {
-        if (!mCheckedStatus && !isOk()) {
-            LOG(FATAL) << "Failed HIDL return status not checked: " << description();
+        if (!mCheckedStatus) {
+            assertOk();
         }
+
         std::swap(mStatus, other.mStatus);
         std::swap(mCheckedStatus, other.mCheckedStatus);
         return *this;
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 93a6251..4c133c1 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -326,6 +326,8 @@
 
 template<typename T>
 struct hidl_vec {
+    using value_type = T;
+
     hidl_vec() {
         static_assert(hidl_vec<T>::kOffsetOfBuffer == 0, "wrong offset");
 
@@ -793,7 +795,7 @@
 // An array of T's. Assumes that T::operator=(const T &) is defined.
 template<typename T, size_t SIZE1>
 struct hidl_array<T, SIZE1> {
-
+    using value_type = T;
     using std_array_type = typename details::std_array<T, SIZE1>::type;
 
     hidl_array() = default;
diff --git a/base/include/hidl/Status.h b/base/include/hidl/Status.h
index 817277f..07d352f 100644
--- a/base/include/hidl/Status.h
+++ b/base/include/hidl/Status.h
@@ -143,6 +143,8 @@
 
         template <typename T, typename U>
         friend Return<U> StatusOf(const Return<T> &other);
+    protected:
+        void onValueRetrieval() const;
     public:
         void assertOk() const;
         return_status() {}
@@ -224,7 +226,7 @@
     ~Return() = default;
 
     operator T() const {
-        assertOk();
+        onValueRetrieval();  // assert okay
         return mVal;
     }
 
@@ -253,7 +255,7 @@
     ~Return() = default;
 
     operator sp<T>() const {
-        assertOk();
+        onValueRetrieval();  // assert okay
         return mVal;
     }
 
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index 352ed78..02d10d0 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -163,20 +163,6 @@
             parentOffset + hidl_string::kOffsetOfBuffer);
 }
 
-android::status_t writeToParcel(const hidl_version &version, android::hardware::Parcel& parcel) {
-    return parcel.writeUint32(static_cast<uint32_t>(version.get_major()) << 16 | version.get_minor());
-}
-
-hidl_version* readFromParcel(const android::hardware::Parcel& parcel) {
-    uint32_t version;
-    android::status_t status = parcel.readUint32(&version);
-    if (status != OK) {
-        return nullptr;
-    } else {
-        return new hidl_version(version >> 16, version & 0xFFFF);
-    }
-}
-
 status_t readFromParcel(Status *s, const Parcel& parcel) {
     int32_t exception;
     status_t status = parcel.readInt32(&exception);
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index e7bec41..374470e 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -769,6 +769,13 @@
     const char* env = std::getenv("TREBLE_TESTING_OVERRIDE");
     const bool trebleTestingOverride = env && !strcmp(env, "true");
     const bool vintfLegacy = (transport == Transport::EMPTY);
+
+    ALOGE("getService: Potential race detected. The VINTF manifest is not being enforced. If a HAL "
+          "server has a delay in starting and it is not in the manifest, it will not be retrieved. "
+          "Please make sure all HALs on this device are in the VINTF manifest and enable "
+          "PRODUCT_ENFORCE_VINTF_MANIFEST on this device (this is also enabled by "
+          "PRODUCT_FULL_TREBLE). PRODUCT_ENFORCE_VINTF_MANIFEST will ensure that no race condition "
+          "is possible here.");
 #endif  // ENFORCE_VINTF_MANIFEST
 
     for (int tries = 0; !getStub && (vintfHwbinder || vintfLegacy); tries++) {
diff --git a/transport/allocator/1.0/Android.bp b/transport/allocator/1.0/Android.bp
index a3d885a..80364a7 100644
--- a/transport/allocator/1.0/Android.bp
+++ b/transport/allocator/1.0/Android.bp
@@ -14,4 +14,3 @@
     ],
     gen_java: false,
 }
-
diff --git a/transport/base/1.0/Android.bp b/transport/base/1.0/Android.bp
index cebb01b..f90831e 100644
--- a/transport/base/1.0/Android.bp
+++ b/transport/base/1.0/Android.bp
@@ -12,4 +12,3 @@
     ],
     gen_java: true,
 }
-
diff --git a/transport/include/hidl/HidlBinderSupport.h b/transport/include/hidl/HidlBinderSupport.h
index a098805..5dec5cd 100644
--- a/transport/include/hidl/HidlBinderSupport.h
+++ b/transport/include/hidl/HidlBinderSupport.h
@@ -28,7 +28,7 @@
 #include <hwbinder/Parcel.h>
 #include <log/log.h>  // TODO(b/65843592): remove. Too many users depending on this transitively.
 
-// Defines functions for hidl_string, hidl_version, Status, hidl_vec, MQDescriptor,
+// Defines functions for hidl_string, Status, hidl_vec, MQDescriptor,
 // etc. to interact with Parcel.
 
 namespace android {
@@ -72,13 +72,6 @@
 status_t writeEmbeddedToParcel(const hidl_string &string,
         Parcel *parcel, size_t parentHandle, size_t parentOffset);
 
-// ---------------------- hidl_version
-
-status_t writeToParcel(const hidl_version &version, android::hardware::Parcel& parcel);
-
-// Caller is responsible for freeing the returned object.
-hidl_version* readFromParcel(const android::hardware::Parcel& parcel);
-
 // ---------------------- Status
 
 // Bear in mind that if the client or service is a Java endpoint, this
@@ -185,127 +178,6 @@
     return _hidl_err;
 }
 
-// ---------------------- pointers for HIDL
-
-template <typename T>
-static status_t readEmbeddedReferenceFromParcel(
-        T const* * /* bufptr */,
-        const Parcel & parcel,
-        size_t parentHandle,
-        size_t parentOffset,
-        size_t *handle,
-        bool *shouldResolveRefInBuffer
-    ) {
-    // *bufptr is ignored because, if I am embedded in some
-    // other buffer, the kernel should have fixed me up already.
-    bool isPreviouslyWritten;
-    status_t result = parcel.readEmbeddedReference(
-        nullptr, // ignored, not written to bufptr.
-        handle,
-        parentHandle,
-        parentOffset,
-        &isPreviouslyWritten);
-    // tell caller to run T::readEmbeddedToParcel and
-    // T::readEmbeddedReferenceToParcel if necessary.
-    // It is not called here because we don't know if these two are valid methods.
-    *shouldResolveRefInBuffer = !isPreviouslyWritten;
-    return result;
-}
-
-template <typename T>
-static status_t writeEmbeddedReferenceToParcel(
-        T const* buf,
-        Parcel *parcel, size_t parentHandle, size_t parentOffset,
-        size_t *handle,
-        bool *shouldResolveRefInBuffer
-        ) {
-
-    if(buf == nullptr) {
-        *shouldResolveRefInBuffer = false;
-        return parcel->writeEmbeddedNullReference(handle, parentHandle, parentOffset);
-    }
-
-    // find whether the buffer exists
-    size_t childHandle, childOffset;
-    status_t result;
-    bool found;
-
-    result = parcel->findBuffer(buf, sizeof(T), &found, &childHandle, &childOffset);
-
-    // tell caller to run T::writeEmbeddedToParcel and
-    // T::writeEmbeddedReferenceToParcel if necessary.
-    // It is not called here because we don't know if these two are valid methods.
-    *shouldResolveRefInBuffer = !found;
-
-    if(result != OK) {
-        return result; // bad pointers and length given
-    }
-    if(!found) { // did not find it.
-        return parcel->writeEmbeddedBuffer(buf, sizeof(T), handle,
-                parentHandle, parentOffset);
-    }
-    // found the buffer. easy case.
-    return parcel->writeEmbeddedReference(
-            handle,
-            childHandle,
-            childOffset,
-            parentHandle,
-            parentOffset);
-}
-
-template <typename T>
-static status_t readReferenceFromParcel(
-        T const* *bufptr,
-        const Parcel & parcel,
-        size_t *handle,
-        bool *shouldResolveRefInBuffer
-    ) {
-    bool isPreviouslyWritten;
-    status_t result = parcel.readReference(reinterpret_cast<void const* *>(bufptr),
-            handle, &isPreviouslyWritten);
-    // tell caller to run T::readEmbeddedToParcel and
-    // T::readEmbeddedReferenceToParcel if necessary.
-    // It is not called here because we don't know if these two are valid methods.
-    *shouldResolveRefInBuffer = !isPreviouslyWritten;
-    return result;
-}
-
-template <typename T>
-static status_t writeReferenceToParcel(
-        T const *buf,
-        Parcel * parcel,
-        size_t *handle,
-        bool *shouldResolveRefInBuffer
-    ) {
-
-    if(buf == nullptr) {
-        *shouldResolveRefInBuffer = false;
-        return parcel->writeNullReference(handle);
-    }
-
-    // find whether the buffer exists
-    size_t childHandle, childOffset;
-    status_t result;
-    bool found;
-
-    result = parcel->findBuffer(buf, sizeof(T), &found, &childHandle, &childOffset);
-
-    // tell caller to run T::writeEmbeddedToParcel and
-    // T::writeEmbeddedReferenceToParcel if necessary.
-    // It is not called here because we don't know if these two are valid methods.
-    *shouldResolveRefInBuffer = !found;
-
-    if(result != OK) {
-        return result; // bad pointers and length given
-    }
-    if(!found) { // did not find it.
-        return parcel->writeBuffer(buf, sizeof(T), handle);
-    }
-    // found the buffer. easy case.
-    return parcel->writeReference(handle,
-        childHandle, childOffset);
-}
-
 // ---------------------- support for casting interfaces
 
 // Constructs a binder for this interface and caches it. If it has already been created
diff --git a/transport/include/hidl/LegacySupport.h b/transport/include/hidl/LegacySupport.h
index 1e983eb..0a9feee 100644
--- a/transport/include/hidl/LegacySupport.h
+++ b/transport/include/hidl/LegacySupport.h
@@ -91,6 +91,15 @@
     return defaultPassthroughServiceImplementation<Interface>("default", maxThreads);
 }
 
+// Make LazyServiceRegistrar static so that multiple calls to
+// registerLazyPassthroughServiceImplementation work as expected: each HAL is registered and the
+// process only exits once all HALs have 0 clients.
+static inline std::shared_ptr<LazyServiceRegistrar> getOrCreateLazyServiceRegistrar() {
+    using android::hardware::LazyServiceRegistrar;
+    static auto serviceCounter(std::make_shared<LazyServiceRegistrar>());
+    return serviceCounter;
+}
+
 /**
  * Registers a passthrough service implementation that exits when there are 0 clients.
  *
@@ -102,15 +111,9 @@
 template <class Interface>
 __attribute__((warn_unused_result)) status_t registerLazyPassthroughServiceImplementation(
     const std::string& name = "default") {
-    // Make LazyServiceRegistrar static so that multiple calls to
-    // registerLazyPassthroughServiceImplementation work as expected: each HAL is registered and the
-    // process only exits once all HALs have 0 clients.
-    using android::hardware::LazyServiceRegistrar;
-    static auto serviceCounter(std::make_shared<LazyServiceRegistrar>());
-
     return details::registerPassthroughServiceImplementation<Interface>(
         [](const sp<Interface>& service, const std::string& name) {
-            return serviceCounter->registerService(service, name);
+            return getOrCreateLazyServiceRegistrar()->registerService(service, name);
         },
         name);
 }
diff --git a/transport/manager/1.0/Android.bp b/transport/manager/1.0/Android.bp
index 869c58e..c91dcd2 100644
--- a/transport/manager/1.0/Android.bp
+++ b/transport/manager/1.0/Android.bp
@@ -15,4 +15,3 @@
     ],
     gen_java: true,
 }
-
diff --git a/transport/manager/1.1/Android.bp b/transport/manager/1.1/Android.bp
index 407dfa3..82545e5 100644
--- a/transport/manager/1.1/Android.bp
+++ b/transport/manager/1.1/Android.bp
@@ -15,4 +15,3 @@
     ],
     gen_java: true,
 }
-
diff --git a/transport/manager/1.2/Android.bp b/transport/manager/1.2/Android.bp
index 3f02f78..e7ee143 100644
--- a/transport/manager/1.2/Android.bp
+++ b/transport/manager/1.2/Android.bp
@@ -17,4 +17,3 @@
     ],
     gen_java: true,
 }
-
diff --git a/transport/memory/1.0/Android.bp b/transport/memory/1.0/Android.bp
index eaa3037..dd76889 100644
--- a/transport/memory/1.0/Android.bp
+++ b/transport/memory/1.0/Android.bp
@@ -16,4 +16,3 @@
     ],
     gen_java: false,
 }
-
diff --git a/transport/safe_union/1.0/Android.bp b/transport/safe_union/1.0/Android.bp
index 88c7d5d..2760863 100644
--- a/transport/safe_union/1.0/Android.bp
+++ b/transport/safe_union/1.0/Android.bp
@@ -12,4 +12,3 @@
     ],
     gen_java: true,
 }
-
diff --git a/transport/token/1.0/Android.bp b/transport/token/1.0/Android.bp
index c0988cb..28f16f7 100644
--- a/transport/token/1.0/Android.bp
+++ b/transport/token/1.0/Android.bp
@@ -14,4 +14,3 @@
     ],
     gen_java: true,
 }
-
