vendor_brax_brax3/proprietary/vendor/etc/init/tee.rc
2025-04-30 14:50:45 +02:00

36 lines
1.5 KiB
Text

on init
#create mountpoint for /mnt/vendor/persist partition
mkdir /mnt/vendor/persist 0771 system system
on post-fs
chown system system /mnt/vendor/persist
chmod 0771 /mnt/vendor/persist
# We restorecon /mnt/vendor/persist to set SEPolicy label.
restorecon /mnt/vendor/persist
# Create mcRegistry to store failure record
mkdir /mnt/vendor/persist/mcRegistry 0771 system system
on post-fs-data
# Create /data/vendor/key_provisioning dir and get proper encryption policy installed
# Key Installation
mkdir /data/vendor/key_provisioning 0771 system system
# For META/FACTORY mode
on property:ro.crypto.state=unsupported
write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry ++ (unencrypted)"
mkdir /data/vendor/mcRegistry 0775 system system
write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry -- (unencrypted)"
# Normal mode, FBE
on property:ro.crypto.type=file && property:ro.crypto.state=encrypted
write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry ++ (FBE encrypted)"
mkdir /data/vendor/mcRegistry 0775 system system
write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry -- (FBE encrypted)"
# Normal mode, FDE
on property:vold.decrypt=trigger_restart_framework
write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry ++ (FDE encrypted)"
mkdir /data/vendor/mcRegistry 0775 system system
write /proc/bootprof "MOBICORE: create /data/vendor/mcRegistry -- (FDE encrypted)"