From 9402f2775b41d941703febe0c68554c1644b7dde Mon Sep 17 00:00:00 2001 From: Janis Danisevskis Date: Fri, 23 Oct 2020 10:33:29 -0700 Subject: [PATCH] Keystore 2.0: Start keystore2 daemon conditionally. This patch makes the keystore2 daemon start conditionally based on the platform property ro.android.system.keystore2.enable. This is patch can be reverted when the Keystore 2.0 migration is complete. b/171563717 Bug: 171563717 Bug: 171305684 Test: The keystore2 daemon is running if the property ro.android.system.keystore2.enable is set and true and not running otherwise. Change-Id: I2b3d6c70f45f3dafb9edb6f2f6960be94e13ed20 --- keystore2/keystore2.rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keystore2/keystore2.rc b/keystore2/keystore2.rc index 139c94b2..bc040e51 100644 --- a/keystore2/keystore2.rc +++ b/keystore2/keystore2.rc @@ -5,8 +5,16 @@ # Keystore shall run as user keystore and groups keystore, readproc, and log. # # See system/core/init/README.md for information on the init.rc language. + +# Start Keystore 2 conditionally +# TODO b/171563717 Remove when Keystore 2 migration is complete. +on nonencrypted && property:ro.android.security.keystore2.enable=true + enable keystore2 + service keystore2 /system/bin/keystore2 /data/misc/keystore class main user keystore group keystore readproc log writepid /dev/cpuset/foreground/tasks + # TODO b/171563717 Remove when Keystore 2 migration is complete. + disabled