Resume-on-Reboot: Citadel implementation

This is an implementation of the RebootEscrow HAL for Citadel. It
escrows a key-encryption-key for the synthetic password during an OTA.

Bug: 157857322
Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.ResumeOnRebootHostTest
Change-Id: If116b8874c07d93a19600c581f3846cf6ec04753
diff --git a/device.mk b/device.mk
index 12b3d05..a0f8f82 100644
--- a/device.mk
+++ b/device.mk
@@ -143,7 +143,7 @@
 
 # Resume on Reboot support
 PRODUCT_PACKAGES += \
-    android.hardware.rebootescrow-service.default
+    android.hardware.rebootescrow-service.citadel
 
 # Use Sdcardfs
 PRODUCT_PRODUCT_PROPERTIES += \
diff --git a/init.hardware.rc b/init.hardware.rc
index 4058693..48d5668 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -238,6 +238,10 @@
     # Setup folder for modem fdr
     mkdir /data/vendor/modem_fdr 0700 root system
 
+    # Resume-on-Reboot after we have the data dir and keymaster
+    mkdir /data/vendor/rebootescrow 0770 hsm hsm
+    start vendor.rebootescrow-citadel
+
     # keep that at the end of on post-fs-data
     # Set indication (checked by vold) that we have finished this action
     setprop vold.post_fs_data_done 1