Files
vendor_xiaomi_rosemary/proprietary/vendor/etc/init/microtrust.rc
2024-02-19 11:48:03 +01:00

242 lines
8.9 KiB
Plaintext

# For MTK DRM integration:
service teei_daemon /vendor/bin/teei_daemon \
-r 020b0000000000000000000000000000 \
-r 020f0000000000000000000000000000 \
-r 06090000000000000000000000000000 \
-r 05120000000000000000000000000000 \
-r 40188311faf343488db888ad39496f9a \
-r 07060000000000000000000000007169 \
-r 4be4f7dc1f2c11e5b5f7727283247c7f \
-r 9073f03a9618383bb1856eb3f990babd \
-r 08050000000000000000000000003419 \
-r 5020170115e016302017012521300000 \
-r 0f5eed3c3b5a47afacca69a84bf0efad \
-r 07407000000000000000000000000000 \
-r 05160000000000000000000000000000 \
-r 91dba524a6e24909acc48abd7163121a \
-r 08070000000000000000000000008270 \
-r 09080000000000000000000000009381 \
-t 08030000000000000000000000000000 \
-t 85f630e0f0964c5fa2cc268ce04e3da3 \
-t 98fb95bcb4bf42d26473eae48690d7ea \
-t 7b66512021214487ba710a51d7ea78fe \
-t 09010000000000000000000000000000
class core
user system
group system
disabled
# oneshot
on boot
chown system system /sys/bus/platform/devices/utos/dcih_notify_test
chown system system /sys/bus/platform/devices/utos/dcih_wait_notify_test
chown system system /sys/bus/platform/devices/utos/load_ut_drv
chown system system /sys/bus/platform/devices/utos/unload_ut_drv
chown system system /sys/bus/platform/devices/utos/notify_ree_dci_handler
#for All mode
on load_persist_props_action
write /proc/bootprof "start teei cfg (on load_persist_props_action)"
mkdir /data/vendor/thh
mkdir /data/vendor/thh/system
mkdir /data/vendor/thh/tee_00
mkdir /data/vendor/thh/tee_01
mkdir /data/vendor/thh/tee_02
mkdir /data/vendor/thh/tee_03
mkdir /data/vendor/thh/tee_04
mkdir /data/vendor/thh/tee_05
mkdir /data/vendor/thh/tee_06
mkdir /data/vendor/thh/tee_07
mkdir /data/vendor/thh/tee
mkdir /data/vendor/thh/tee/tas
mkdir /data/vendor/thh/tee_08
mkdir /data/vendor/thh/tee_09
mkdir /data/vendor/thh/tee_0A
mkdir /data/vendor/thh/tee_0B
mkdir /data/vendor/thh/tee_0C
mkdir /data/vendor/thh/tee_0D
mkdir /data/vendor/thh/tee_0E
mkdir /data/vendor/thh/tee_0F
mkdir /data/vendor/thh/ta
mkdir /data/vendor/thh/tee_log
mkdir /data/vendor/key_provisioning
chmod 0755 /data/vendor/thh
chown system system /data/vendor/thh
chmod 0755 /data/vendor/thh/tee_00
chown system system /data/vendor/thh/tee_00
chmod 0755 /data/vendor/thh/tee_01
chown system system /data/vendor/thh/tee_01
chmod 0755 /data/vendor/thh/tee_02
chown system system /data/vendor/thh/tee_02
chmod 0755 /data/vendor/thh/tee_03
chown system system /data/vendor/thh/tee_03
chmod 0755 /data/vendor/thh/tee_04
chown system system /data/vendor/thh/tee_04
chmod 0755 /data/vendor/thh/tee_05
chown system system /data/vendor/thh/tee_05
chmod 0755 /data/vendor/thh/tee_06
chown system system /data/vendor/thh/tee_06
chmod 0755 /data/vendor/thh/tee_07
chown system system /data/vendor/thh/tee_07
chmod 0755 /data/vendor/thh/tee
chown system system /data/vendor/thh/tee
chmod 0755 /data/vendor/thh/tee/tas
chown system system /data/vendor/thh/tee/tas
chmod 0755 /data/vendor/thh/tee_08
chown system system /data/vendor/thh/tee_08
chmod 0755 /data/vendor/thh/tee_09
chown system system /data/vendor/thh/tee_09
chmod 0755 /data/vendor/thh/tee_0A
chown system system /data/vendor/thh/tee_0A
chmod 0755 /data/vendor/thh/tee_0B
chown system system /data/vendor/thh/tee_0B
chmod 0755 /data/vendor/thh/tee_0C
chown system system /data/vendor/thh/tee_0C
chmod 0755 /data/vendor/thh/tee_0D
chown system system /data/vendor/thh/tee_0D
chmod 0755 /data/vendor/thh/tee_0E
chown system system /data/vendor/thh/tee_0E
chmod 0755 /data/vendor/thh/tee_0F
chown system system /data/vendor/thh/tee_0F
chmod 0755 /data/vendor/thh/tee_log
chown system system /data/vendor/thh/tee_log
chmod 0755 /data/vendor/thh/ta
chown system system /data/vendor/thh/ta
chmod 0755 /data/vendor/thh/system
chown system system /data/vendor/thh/system
restorecon_recursive /data/vendor/thh
chmod 0771 /data/vendor/key_provisioning
chown system system /data/vendor/key_provisioning
write /proc/bootprof "start teei cfg end (on load_persist_props_action)"
on property:vold.decrypt=trigger_restart_framework
write /proc/bootprof "start teei cfg (on trigger_restart_framework)"
mkdir /data/vendor/thh
mkdir /data/vendor/thh/system
mkdir /data/vendor/thh/tee_00
mkdir /data/vendor/thh/tee_01
mkdir /data/vendor/thh/tee_02
mkdir /data/vendor/thh/tee_03
mkdir /data/vendor/thh/tee_04
mkdir /data/vendor/thh/tee_05
mkdir /data/vendor/thh/tee_06
mkdir /data/vendor/thh/tee_07
mkdir /data/vendor/thh/tee
mkdir /data/vendor/thh/tee/tas
mkdir /data/vendor/thh/tee_08
mkdir /data/vendor/thh/tee_09
mkdir /data/vendor/thh/tee_0A
mkdir /data/vendor/thh/tee_0B
mkdir /data/vendor/thh/tee_0C
mkdir /data/vendor/thh/tee_0D
mkdir /data/vendor/thh/tee_0E
mkdir /data/vendor/thh/tee_0F
mkdir /data/vendor/thh/ta
mkdir /data/vendor/key_provisioning
mkdir /data/vendor/thh/tee_log
chmod 0755 /data/vendor/thh
chown system system /data/vendor/thh
chmod 0755 /data/vendor/thh/tee_00
chown system system /data/vendor/thh/tee_00
chmod 0755 /data/vendor/thh/tee_01
chown system system /data/vendor/thh/tee_01
chmod 0755 /data/vendor/thh/tee_02
chown system system /data/vendor/thh/tee_02
chmod 0755 /data/vendor/thh/tee_03
chown system system /data/vendor/thh/tee_03
chmod 0755 /data/vendor/thh/tee_04
chown system system /data/vendor/thh/tee_04
chmod 0755 /data/vendor/thh/tee_05
chown system system /data/vendor/thh/tee_05
chmod 0755 /data/vendor/thh/tee_06
chown system system /data/vendor/thh/tee_06
chmod 0755 /data/vendor/thh/tee_07
chown system system /data/vendor/thh/tee_07
chmod 0755 /data/vendor/thh/tee
chown system system /data/vendor/thh/tee
chmod 0755 /data/vendor/thh/tee/tas
chown system system /data/vendor/thh/tee/tas
chmod 0755 /data/vendor/thh/tee_08
chown system system /data/vendor/thh/tee_08
chmod 0755 /data/vendor/thh/tee_09
chown system system /data/vendor/thh/tee_09
chmod 0755 /data/vendor/thh/tee_0A
chown system system /data/vendor/thh/tee_0A
chmod 0755 /data/vendor/thh/tee_0B
chown system system /data/vendor/thh/tee_0B
chmod 0755 /data/vendor/thh/tee_0C
chown system system /data/vendor/thh/tee_0C
chmod 0755 /data/vendor/thh/tee_0D
chown system system /data/vendor/thh/tee_0D
chmod 0755 /data/vendor/thh/tee_0E
chown system system /data/vendor/thh/tee_0E
chmod 0755 /data/vendor/thh/tee_0F
chown system system /data/vendor/thh/tee_0F
chmod 0755 /data/vendor/thh/tee_log
chown system system /data/vendor/thh/tee_log
chmod 0755 /data/vendor/thh/ta
chown system system /data/vendor/thh/ta
chmod 0755 /data/vendor/thh/system
chown system system /data/vendor/thh/system
chmod 0771 /data/vendor/key_provisioning
chown system system /data/vendor/key_provisioning
restorecon_recursive /data/vendor/thh
write /proc/bootprof "start teei cfg end (on trigger_restart_framework)"
on post-fs
# Set /mnt/vendor/persist/rpmb
chown system system /mnt/vendor/persist
chmod 0771 /mnt/vendor/persist
restorecon_recursive /mnt/vendor/persist
mkdir /mnt/vendor/persist/rpmb
chown system system /mnt/vendor/persist/rpmb
chmod 0771 /mnt/vendor/persist/rpmb
restorecon_recursive /mnt/vendor/persist/rpmb
# Set other rpmb
mkdir /persist/rpmb
mkdir /vendor/persist/rpmb
chmod 0771 /persist/rpmb
chmod 0771 /vendor/persist/rpmb
chown system system /persist/rpmb
chown system system /vendor/persist/rpmb
restorecon_recursive /persist
restorecon_recursive /vendor/persist
on fs
chmod 0660 /dev/teei_client
chown system system /dev/teei_client
chmod 0660 /dev/teei_config
chown system system /dev/teei_config
# 666 for SVP
chmod 0666 /dev/isee_tee0
chown system drmrpc /dev/isee_tee0
chmod 0660 /dev/tz_vfs
chown system system /dev/tz_vfs
chmod 0660 /dev/teei_fp
chown system /dev/teei_fp
chown system drmrpc /dev/ut_keymaster
chmod 0660 /dev/ut_keymaster
# rpmb device
chmod 0660 /dev/rpmb0
chown system system /dev/rpmb0
chmod 0660 /dev/mmcblk0rpmb
chown root system /dev/mmcblk0rpmb
# legacy rpmb device for cross-platform compatibility
chmod 0660 /dev/emmcrpmb0
chown system system /dev/emmcrpmb0
chown system system /dev/utr_tui
chmod 0660 /dev/utr_tui
write /proc/bootprof "start teei_daemon (on fs)"
start teei_daemon
write /proc/bootprof "start teei_daemon end (on fs)"
on property:vendor.crypto.fake_encrypt=1 && property:vold.post_fs_data_done=1
setprop vendor.soter.teei.crypto.state unencrypted
on post-fs-data
setprop vendor.soter.teei.logini "start"