diff --git a/transport/include/hidl/HidlBinderSupport.h b/transport/include/hidl/HidlBinderSupport.h
index 1dfaecd..38ff6c9 100644
--- a/transport/include/hidl/HidlBinderSupport.h
+++ b/transport/include/hidl/HidlBinderSupport.h
@@ -296,12 +296,7 @@
     if (ifacePtr->isRemote()) {
         return ::android::hardware::IInterface::asBinder(static_cast<ProxyType *>(ifacePtr));
     } else {
-        std::string myDescriptor{};
-        ifacePtr->interfaceChain([&](const hidl_vec<hidl_string> &types) {
-            if (types.size() > 0) {
-                myDescriptor = types[0].c_str();
-            }
-        });
+        std::string myDescriptor = getDescriptor(ifacePtr);
         if (myDescriptor.empty()) {
             // interfaceChain fails
             return nullptr;
diff --git a/transport/include/hidl/HidlPassthroughSupport.h b/transport/include/hidl/HidlPassthroughSupport.h
new file mode 100644
index 0000000..2b2f86b
--- /dev/null
+++ b/transport/include/hidl/HidlPassthroughSupport.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HIDL_PASSTHROUGH_SUPPORT_H
+#define ANDROID_HIDL_PASSTHROUGH_SUPPORT_H
+
+#include <android/hidl/base/1.0/IBase.h>
+
+namespace android {
+namespace hardware {
+
+/*
+ * Wrap the given interface with the smallest BsChild possible. Will return the
+ * argument directly if nullptr or isRemote().
+ */
+sp<::android::hidl::base::V1_0::IBase> wrapPassthrough(
+        sp<::android::hidl::base::V1_0::IBase> iface);
+
+}  // namespace hardware
+}  // namespace android
+
+
+#endif  // ANDROID_HIDL_PASSTHROUGH_SUPPORT_H
diff --git a/transport/include/hidl/HidlTransportUtils.h b/transport/include/hidl/HidlTransportUtils.h
index d890988..dc444dc 100644
--- a/transport/include/hidl/HidlTransportUtils.h
+++ b/transport/include/hidl/HidlTransportUtils.h
@@ -31,7 +31,7 @@
     }
 
     bool canCast = false;
-    interface->interfaceChain([&](const hidl_vec<hidl_string> &types) {
+    auto ret = interface->interfaceChain([&](const hidl_vec<hidl_string> &types) {
         for (size_t i = 0; i < types.size(); i++) {
             if (types[i] == castTo) {
                 canCast = true;
@@ -39,7 +39,17 @@
             }
         }
     });
-    return canCast;
+    return ret.isOk() && canCast;
+}
+
+inline std::string getDescriptor(::android::hidl::base::V1_0::IBase* interface) {
+    std::string myDescriptor{};
+    auto ret = interface->interfaceChain([&](const hidl_vec<hidl_string> &types) {
+        if (types.size() > 0) {
+            myDescriptor = types[0].c_str();
+        }
+    });
+    return ret.isOk() ? myDescriptor : "";
 }
 
 }   // namespace hardware
diff --git a/transport/include/hidl/Static.h b/transport/include/hidl/Static.h
index 2a40125..1f6fa9f 100644
--- a/transport/include/hidl/Static.h
+++ b/transport/include/hidl/Static.h
@@ -32,7 +32,14 @@
 // For HidlBinderSupport
 // value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
 // returns sp<IBinder>
-extern std::map<std::string, std::function<sp<IBinder>(void*)>> gBnConstructorMap;
+extern std::map<std::string, std::function<sp<IBinder>(void *)>>
+        gBnConstructorMap;
+
+// For HidlPassthroughSupport
+// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
+// returns sp<IBase>
+extern std::map<std::string, std::function<sp<::android::hidl::base::V1_0::IBase>(void *)>>
+        gBsConstructorMap;
 
 }   // namespace hardware
 }   // namespace android
