Merge "hikey960: enable File-Based Encryption" am: 6cb5ca28f1 am: 30a18580e8 am: 132cfd22d2 am: 5ec4f578b5
Change-Id: I573b589abe238d7c4108b2573901942cafcf9efe
diff --git a/hikey960/fstab.hikey960 b/hikey960/fstab.hikey960
index 2bb2bbe..8697004 100644
--- a/hikey960/fstab.hikey960
+++ b/hikey960/fstab.hikey960
@@ -7,7 +7,7 @@
#/dev/block/platform/soc/ff3b0000.ufs/by-name/cache /cache ext4 discard,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait
#/dev/block/platform/soc/ff3b0000.ufs/by-name/userdata /data ext4 discard,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait
/dev/block/by-name/userdata /data f2fs discard,noatime,nosuid,nodev wait,check,fileencryption=software,quota
-/dev/block/by-name/userdata /data ext4 discard,noatime,nosuid,nodev,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait,formattable
+/dev/block/by-name/userdata /data ext4 discard,noatime,nosuid,nodev,noauto_da_alloc,data=ordered,user_xattr,barrier=1,inlinecrypt wait,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized
/devices/platform/soc/ff37f000.dwmmc1/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
/devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.*.auto/usb* auto auto defaults voldmanaged=usbdisk:auto,encryptable=userdata
/devices/platform/soc/f4000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/nvme/nvme* auto auto defaults voldmanaged=nvmedisk:auto,encryptable=userdata
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 0fb634c..927ec77 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -30,9 +30,14 @@
/sys/devices/platform/ddr_devfreq/devfreq/ddr_devfreq/min_freq u:object_r:sysfs_power:s0
/sys/devices/platform/e82c0000\.mali/devfreq/e82c0000\.mali/min_freq u:object_r:sysfs_power:s0
+# for HiKey Board
/dev/block/platform/soc/f723d000\.dwmmc0/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/f723d000\.dwmmc0/by-name/userdata u:object_r:userdata_block_device:s0
+# for HiKey960 Board
+/dev/block/platform/soc/ff3b0000\.ufs/by-name/cache u:object_r:cache_block_device:s0
+/dev/block/platform/soc/ff3b0000\.ufs/by-name/userdata u:object_r:userdata_block_device:s0
+
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service\.software u:object_r:hal_gatekeeper_default_exec:s0
/vendor/bin/hw/android\.hardware\.power@1\.1-service\.hikey-common u:object_r:hal_power_default_exec:s0