diff --git a/file_contexts b/file_contexts
index 8bc312f2e0cab6c91723f251be26416f00083d05..fe9a942392c35f6c9fde0cc18ddd9bba4947f88d 100644
--- a/file_contexts
+++ b/file_contexts
@@ -192,6 +192,7 @@
 /data/misc/wifi(/.*)?           u:object_r:wifi_data_file:s0
 /data/misc/wifi/sockets(/.*)?   u:object_r:wpa_socket:s0
 /data/misc/wifi/sockets/wpa_ctrl.*   u:object_r:system_wpa_socket:s0
+/data/misc/wifi/hostapd(/.*)?   u:object_r:wpa_socket:s0
 /data/misc/zoneinfo(/.*)?       u:object_r:zoneinfo_data_file:s0
 
 # Wallpaper file for other users
diff --git a/hostapd.te b/hostapd.te
index 184b26f28234622d04448e73d8f24358db5ada61..90a0314002e290dc5e435b73c801bf3f180b2116 100644
--- a/hostapd.te
+++ b/hostapd.te
@@ -13,6 +13,7 @@ allow hostapd self:netlink_route_socket nlmsg_write;
 allow hostapd wifi_data_file:file rw_file_perms;
 allow hostapd wifi_data_file:dir create_dir_perms;
 type_transition hostapd wifi_data_file:dir wpa_socket "sockets";
+type_transition hostapd wifi_data_file:dir wpa_socket "hostapd";
 allow hostapd wpa_socket:dir create_dir_perms;
 allow hostapd wpa_socket:sock_file create_file_perms;
 allow hostapd netd:fd use;