init.recovery.trustonic.rc 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Start Daemon (Registry directories should already be present)
  2. service mobicore /vendor/bin/mcDriverDaemon --P1 /mnt/vendor/persist/mcRegistry \
  3. -r /vendor/app/mcRegistry/020f0000000000000000000000000000.drbin \
  4. -r /vendor/app/mcRegistry/05120000000000000000000000000000.drbin \
  5. -r /vendor/app/mcRegistry/05140000000000000000000000000000.drbin \
  6. -r /vendor/app/mcRegistry/020b0000000000000000000000000000.drbin \
  7. -r /vendor/app/mcRegistry/05070000000000000000000000000000.drbin \
  8. -r /vendor/app/mcRegistry/030b0000000000000000000000000000.drbin \
  9. -r /vendor/app/mcRegistry/030c0000000000000000000000000000.drbin \
  10. -r /vendor/app/mcRegistry/07060000000000000000000000007169.drbin \
  11. -r /vendor/app/mcRegistry/40188311faf343488db888ad39496f9a.drbin \
  12. -r /vendor/app/mcRegistry/06090000000000000000000000000000.drbin \
  13. -r /vendor/app/mcRegistry/9073f03a9618383bb1856eb3f990babd.drbin \
  14. -r /vendor/app/mcRegistry/5020170115e016302017012521300000.drbin
  15. user system
  16. group system
  17. class core
  18. priority -20
  19. seclabel u:r:recovery:s0
  20. service gatekeeper-1-0 /vendor/bin/hw/android.hardware.gatekeeper@1.0-service
  21. interface android.hardware.gatekeeper@1.0::IGatekeeper default
  22. class hal
  23. user system
  24. group system
  25. service keymaster-3-0 /vendor/bin/hw/android.hardware.keymaster@3.0-service.trustonic
  26. class early_hal
  27. user system
  28. group system drmrpc
  29. on init
  30. #create mountpoint for /mnt/vendor/persist partition
  31. mkdir /mnt/vendor/persist 0771 system system
  32. on post-fs
  33. chown system system /mnt/vendor/persist
  34. chmod 0771 /mnt/vendor/persist
  35. # We restorecon /mnt/vendor/persist to set SEPolicy label.
  36. restorecon /mnt/vendor/persist
  37. # Create mcRegistry to store failure record
  38. mkdir /mnt/vendor/persist/mcRegistry 0771 system system
  39. on post-fs-data
  40. # Create /data/vendor/key_provisioning dir and get proper encryption policy installed
  41. # Key Installation
  42. mkdir /data/vendor/key_provisioning 0771 system system
  43. # For META/FACTORY mode
  44. on property:ro.crypto.state=unsupported
  45. write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry ++ (unencrypted)"
  46. mkdir /data/vendor/mcRegistry 0775 system system
  47. mkdir /mnt/vendor/nvcfg/mcRegistry 0775 system system
  48. symlink /mnt/vendor/nvcfg/mcRegistry/00000000.authtokcont /data/vendor/mcRegistry/00000000.authtokcont
  49. chown system system /mnt/vendor/nvcfg/mcRegistry
  50. write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry -- (unencrypted)"
  51. # Normal mode, FBE
  52. on property:ro.crypto.type=file && property:ro.crypto.state=encrypted
  53. write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry ++ (FBE encrypted)"
  54. mkdir /data/vendor/mcRegistry 0775 system system
  55. mkdir /mnt/vendor/nvcfg/mcRegistry 0775 system system
  56. symlink /mnt/vendor/nvcfg/mcRegistry/00000000.authtokcont /data/vendor/mcRegistry/00000000.authtokcont
  57. chown system system /mnt/vendor/nvcfg/mcRegistry
  58. write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry -- (FBE encrypted)"
  59. # Normal mode, FDE
  60. on property:vold.decrypt=trigger_restart_framework
  61. write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry ++ (FDE encrypted)"
  62. mkdir /data/vendor/mcRegistry 0775 system system
  63. mkdir /mnt/vendor/nvcfg/mcRegistry 0775 system system
  64. symlink /mnt/vendor/nvcfg/mcRegistry/00000000.authtokcont /data/vendor/mcRegistry/00000000.authtokcont
  65. chown system system /mnt/vendor/nvcfg/mcRegistry
  66. write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry -- (FDE encrypted)"