1on property:ro.vendor.persist.status=mounted
2    # for modem related functions
3    restorecon_recursive /mnt/vendor/efs
4    chown radio system /mnt/vendor/efs
5    restorecon_recursive /mnt/vendor/efs_backup
6    chown radio system /mnt/vendor/efs_backup
7    restorecon_recursive /mnt/vendor/modem_userdata
8    chown radio system /mnt/vendor/modem_userdata
9
10    # for battery defender
11    mkdir /mnt/vendor/persist/battery 0700 system system
12
13    # Factory calibration files
14    chmod 0771 /mnt/vendor/persist/camera
15    chmod 0771 /mnt/vendor/persist/camera/OTP_calibration
16    chmod 0771 /mnt/vendor/persist/camera/pdaf_calibration_data
17    mkdir /mnt/vendor/persist/camera/rear 0771 system camera
18    chmod 0771 /mnt/vendor/persist/camera/rear
19
20    restorecon_recursive /mnt/vendor/persist
21    restorecon_recursive /mnt/vendor/persist/aoc
22    restorecon_recursive /mnt/vendor/persist/audio
23    restorecon_recursive /mnt/vendor/persist/sensors
24    restorecon_recursive /mnt/vendor/persist/battery
25    restorecon_recursive /mnt/vendor/persist/camera
26    restorecon_recursive /mnt/vendor/persist/modem
27    # Set up display-related directories and permissions
28    # Add restorecon_recursive command to make sure the restorecon label is persist_display_file.
29    restorecon_recursive /mnt/vendor/persist/display
30    mkdir /mnt/vendor/persist/data/sfs 0700 system system
31    mkdir /mnt/vendor/persist/data/tz 0700 system system
32    mkdir /mnt/vendor/persist/touch 0770 system system
33
34on property:ro.fstype.data=* && property:ro.vendor.persist.status=mounted
35    # Proxy for Secure Storage
36    mkdir /data/vendor/rebootescrow 0770 hsm hsm
37    mkdir /data/vendor/ss 0770 root system
38    mkdir /mnt/vendor/persist/ss 0770 root system
39    restorecon_recursive /mnt/vendor/persist/ss
40    symlink /mnt/vendor/persist/ss /data/vendor/ss/persist
41    chown root system /data/vendor/ss/persist
42    chmod 0770 /data/vendor/ss/persist
43    symlink /dev/block/platform/13200000\.ufs/by-name/trusty_persist /data/vendor/ss/persist/0
44    chown system system /data/vendor/ss/persist/0
45    chown system system /data/vendor/ss/persist/nsp
46
47    restart storageproxyd
48