diff --git a/init.hardware.rc b/init.hardware.rc index 0a01e014..ff30fa8b 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -183,6 +183,7 @@ on post-fs-data # NFC local data and nfcee xml storage mkdir /data/nfc 0770 nfc nfc mkdir /data/nfc/param 0770 nfc nfc + mkdir /data/vendor/nfc 0770 nfc nfc # Set indication (checked by vold) that we have finished this action diff --git a/sepolicy/file.te b/sepolicy/file.te index 91a9762a..1faab618 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -36,4 +36,6 @@ type persist_sensors_file, file_type; type netmgr_data_file, file_type, data_file_type; +type nfc_vendor_data_file, file_type, data_file_type; + type ramdump_data_file, file_type, data_file_type, mlstrustedobject; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 905923ad..e125b9de 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -137,6 +137,7 @@ /data/misc/location(/.*)? u:object_r:location_data_file:s0 /data/ramdump(/.*)? u:object_r:ramdump_data_file:s0 /data/nfc(/.*)? u:object_r:nfc_data_file:s0 +/data/vendor/nfc(/.*)? u:object_r:nfc_vendor_data_file:s0 # / /tombstones u:object_r:rootfs:s0 diff --git a/sepolicy/hal_nfc_default.te b/sepolicy/hal_nfc_default.te new file mode 100644 index 00000000..3044f1d5 --- /dev/null +++ b/sepolicy/hal_nfc_default.te @@ -0,0 +1,3 @@ +# Data file accesses. +allow hal_nfc_default nfc_vendor_data_file:dir create_dir_perms; +allow hal_nfc_default nfc_vendor_data_file:file create_file_perms;