db845c: Make userdata formattable
If one runs "fastboot erase userdata", and then does not flash
a userdata image to the partition, the system will fail to boot
as /data/ will not mount, and the apex and dalvik cache
directories won't be present or writable.
This tries to address this by adding the formattable flag to
the fstab and add the partition to the sepolicy so mkfs can
access it.
NOTE: I did have to use the full by-name path in the fstab,
which is less flexible then the LABEL= method, but if the
partition isn't formatted there isn't neceessarily a partition
label to find.
Big thanks to AmitP for suggesting this approach
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ia678d0d1d5e1eb35462f8fcfee478969c614b0d4
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 81edb8c..f1d323c 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -11,6 +11,8 @@
/sys/devices/platform/soc@0/ae00000.mdss u:object_r:sysfs_gpu:s0
/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc u:object_r:sysfs_rtc:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/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/lib(64)?/dri/.* u:object_r:same_process_hal_file:s0