Merge "Label /dev/usb-ffs/adb functionfs"
diff --git a/adbd.te b/adbd.te
index 76cc4b1..44607c7 100644
--- a/adbd.te
+++ b/adbd.te
@@ -22,8 +22,10 @@
 # Create and use network sockets.
 net_domain(adbd)
 
-# Access /dev/android_adb.
+# Access /dev/android_adb or /dev/usb-ffs/adb/ep0
 allow adbd adb_device:chr_file rw_file_perms;
+allow adbd functionfs:dir search;
+allow adbd functionfs:file rw_file_perms;
 
 # Use a pseudo tty.
 allow adbd devpts:chr_file rw_file_perms;
diff --git a/file.te b/file.te
index 0ddf50f..af2f958 100644
--- a/file.te
+++ b/file.te
@@ -32,6 +32,7 @@
 type sdcard_external, sdcard_type, fs_type, mlstrustedobject;
 type debugfs, fs_type, mlstrustedobject;
 type pstorefs, fs_type;
+type functionfs, fs_type;
 
 # File types
 type unlabeled, file_type;
diff --git a/genfs_contexts b/genfs_contexts
index 07208f9..ec636b6 100644
--- a/genfs_contexts
+++ b/genfs_contexts
@@ -29,3 +29,4 @@
 genfscon debugfs / u:object_r:debugfs:s0
 genfscon fuse / u:object_r:sdcard_internal:s0
 genfscon pstore / u:object_r:pstorefs:s0
+genfscon functionfs / u:object_r:functionfs:s0