Merge "Revert "On-device signing: Add TEST_MAPPING.""
diff --git a/keystore-engine/keystore2_engine.cpp b/keystore-engine/keystore2_engine.cpp
index 8d25f48..69d2ca6 100644
--- a/keystore-engine/keystore2_engine.cpp
+++ b/keystore-engine/keystore2_engine.cpp
@@ -33,7 +33,7 @@
#define AT __func__ << ":" << __LINE__ << " "
-constexpr const char keystore2_service_name[] = "android.system.keystore2";
+constexpr const char keystore2_service_name[] = "android.system.keystore2.IKeystoreService/default";
const std::string keystore2_grant_id_prefix("ks2_keystore-engine_grant_id:");
/**
diff --git a/keystore2/Android.bp b/keystore2/Android.bp
index b6ccf4c..aff824b 100644
--- a/keystore2/Android.bp
+++ b/keystore2/Android.bp
@@ -100,4 +100,6 @@
"libvpnprofilestore-rust",
],
init_rc: ["keystore2.rc"],
+
+ vintf_fragments: ["android.system.keystore2-service.xml"],
}
diff --git a/keystore2/android.system.keystore2-service.xml b/keystore2/android.system.keystore2-service.xml
new file mode 100644
index 0000000..6b8d0cb
--- /dev/null
+++ b/keystore2/android.system.keystore2-service.xml
@@ -0,0 +1,9 @@
+<manifest version="1.0" type="framework">
+ <hal format="aidl">
+ <name>android.system.keystore2</name>
+ <interface>
+ <name>IKeystoreService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/keystore2/src/keystore2_main.rs b/keystore2/src/keystore2_main.rs
index 09ffecb..e745697 100644
--- a/keystore2/src/keystore2_main.rs
+++ b/keystore2/src/keystore2_main.rs
@@ -25,7 +25,7 @@
use std::{panic, path::Path, sync::mpsc::channel};
use vpnprofilestore::VpnProfileStore;
-static KS2_SERVICE_NAME: &str = "android.system.keystore2";
+static KS2_SERVICE_NAME: &str = "android.system.keystore2.IKeystoreService/default";
static APC_SERVICE_NAME: &str = "android.security.apc";
static AUTHORIZATION_SERVICE_NAME: &str = "android.security.authorization";
static REMOTE_PROVISIONING_SERVICE_NAME: &str = "android.security.remoteprovisioning";
diff --git a/ondevice-signing/KeystoreKey.cpp b/ondevice-signing/KeystoreKey.cpp
index de7033f..840b683 100644
--- a/ondevice-signing/KeystoreKey.cpp
+++ b/ondevice-signing/KeystoreKey.cpp
@@ -129,7 +129,7 @@
if (sm == nullptr) {
return false;
}
- auto service = sm->getService(String16("android.system.keystore2"));
+ auto service = sm->getService(String16("android.system.keystore2.IKeystoreService/default"));
if (service == nullptr) {
return false;
}