diff --git a/drm/libmediadrmrkp/src/DrmRemotelyProvisionedComponent.cpp b/drm/libmediadrmrkp/src/DrmRemotelyProvisionedComponent.cpp
index 0b4daca..440be79 100644
--- a/drm/libmediadrmrkp/src/DrmRemotelyProvisionedComponent.cpp
+++ b/drm/libmediadrmrkp/src/DrmRemotelyProvisionedComponent.cpp
@@ -27,8 +27,13 @@
 namespace android::mediadrm {
 DrmRemotelyProvisionedComponent::DrmRemotelyProvisionedComponent(std::shared_ptr<IDrmPlugin> drm,
                                                                  std::string drmVendor,
-                                                                 std::string drmDesc)
-    : mDrm(std::move(drm)), mDrmVendor(std::move(drmVendor)), mDrmDesc(std::move(drmDesc)) {}
+                                                                 std::string drmDesc,
+                                                                 std::vector<uint8_t> bcc)
+    : mDrm(std::move(drm)),
+      mDrmVendor(std::move(drmVendor)),
+      mDrmDesc(std::move(drmDesc)),
+      mBcc(std::move(bcc)) {}
+
 ScopedAStatus DrmRemotelyProvisionedComponent::getHardwareInfo(RpcHardwareInfo* info) {
     info->versionNumber = 3;
     info->rpcAuthorName = mDrmVendor;
@@ -133,14 +138,6 @@
         return status;
     }
 
-    std::vector<uint8_t> bcc;
-    status = mDrm->getPropertyByteArray("bootCertificateChain", &bcc);
-    if (!status.isOk()) {
-        ALOGE("getPropertyByteArray bootCertificateChain failed. Details: [%s].",
-              status.getDescription().c_str());
-        return status;
-    }
-
     std::vector<uint8_t> deviceInfo;
     status = getDeviceInfo(&deviceInfo);
     if (!status.isOk()) {
@@ -167,7 +164,7 @@
     *out = cppbor::Array()
                    .add(1 /* version */)
                    .add(cppbor::Map() /* UdsCerts */)
-                   .add(cppbor::EncodedItem(std::move(bcc)))
+                   .add(cppbor::EncodedItem(mBcc))
                    .add(cppbor::EncodedItem(std::move(deviceSignedCsrPayload)))
                    .encode();
     return ScopedAStatus::ok();
diff --git a/drm/libmediadrmrkp/src/DrmRkpAdapter.cpp b/drm/libmediadrmrkp/src/DrmRkpAdapter.cpp
index a2d4cc1..515d157 100644
--- a/drm/libmediadrmrkp/src/DrmRkpAdapter.cpp
+++ b/drm/libmediadrmrkp/src/DrmRkpAdapter.cpp
@@ -79,12 +79,21 @@
                     return;
                 }
 
-                std::string compName = "DrmRemotelyProvisionedComponent_" + std::string(instance);
+                std::vector<uint8_t> bcc;
+                status = mDrm->getPropertyByteArray("bootCertificateChain", &bcc);
+                if (!status.isOk()) {
+                    ALOGE("mDrm->getPropertyByteArray(\"bootCertificateChain\") failed."
+                          "Detail: [%s].",
+                          status.getDescription().c_str());
+                    return;
+                }
+
+                std::string compName(instance);
                 auto comps = static_cast<
                         std::map<std::string, std::shared_ptr<IRemotelyProvisionedComponent>>*>(
                         context);
                 (*comps)[compName] = ::ndk::SharedRefBase::make<DrmRemotelyProvisionedComponent>(
-                        mDrm, drmVendor, drmDesc);
+                        mDrm, drmVendor, drmDesc, bcc);
             });
     return comps;
 }
