Don't use deviceSuffix, it isn't needed
Test: m rkp_factory_extraction_tool
adb root
adb push ...
adb shell
run the tool
Change-Id: Iab9838b795ba09917ee4b221c54229484f21851b
diff --git a/provisioner/rkp_factory_extraction_tool.cpp b/provisioner/rkp_factory_extraction_tool.cpp
index eaa0acc..599b52a 100644
--- a/provisioner/rkp_factory_extraction_tool.cpp
+++ b/provisioner/rkp_factory_extraction_tool.cpp
@@ -35,7 +35,6 @@
using aidl::android::hardware::drm::IDrmFactory;
using aidl::android::hardware::security::keymint::IRemotelyProvisionedComponent;
using aidl::android::hardware::security::keymint::RpcHardwareInfo;
-using aidl::android::hardware::security::keymint::remote_prov::deviceSuffix;
using aidl::android::hardware::security::keymint::remote_prov::jsonEncodeCsrWithBuild;
using aidl::android::hardware::security::keymint::remote_prov::RKPVM_INSTANCE_NAME;
@@ -86,9 +85,10 @@
void getCsrForIRpc(const char* descriptor, const char* name, IRemotelyProvisionedComponent* irpc,
bool requireUdsCerts) {
+ auto fullName = getFullServiceName(descriptor, name);
// AVF RKP HAL is not always supported, so we need to check if it is supported before
// generating the CSR.
- if (std::string(name) == deviceSuffix(RKPVM_INSTANCE_NAME)) {
+ if (fullName == RKPVM_INSTANCE_NAME) {
RpcHardwareInfo hwInfo;
auto status = irpc->getHardwareInfo(&hwInfo);
if (!status.isOk()) {
@@ -99,7 +99,6 @@
auto [request, errMsg] =
getCsr(name, irpc, FLAGS_self_test, FLAGS_allow_degenerate, requireUdsCerts);
if (!request) {
- auto fullName = getFullServiceName(descriptor, name);
std::cerr << "Unable to build CSR for '" << fullName << "': " << errMsg << ", exiting."
<< std::endl;
exit(-1);
@@ -149,7 +148,7 @@
AServiceManager_forEachDeclaredInstance(IRemotelyProvisionedComponent::descriptor,
&requireUdsCertsRpcNames, getCsrForInstance);
- // Append drm csr's
+ // Append drm CSRs
for (auto const& [name, irpc] : android::mediadrm::getDrmRemotelyProvisionedComponents()) {
auto requireUdsCerts = requireUdsCertsRpcNames.count(name) != 0;
requireUdsCertsRpcNames.erase(name);