Merge commit 'f71e19ee744a6bbac628a8fe85f9f3f2ccfa64ff' into HEAD

Change-Id: I83cf43dcfd3ff7ce866acf4339ecfbe957a21a3c
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 5aa9f3b..b256fa0 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -21,7 +21,7 @@
 TARGET_CPU_VARIANT := cortex-a53
 
 TARGET_2ND_ARCH := arm
-TARGET_2ND_ARCH_VARIANT := armv7-a-neon
+TARGET_2ND_ARCH_VARIANT := armv8-a
 TARGET_2ND_CPU_ABI := armeabi-v7a
 TARGET_2ND_CPU_ABI2 := armeabi
 TARGET_2ND_CPU_VARIANT := cortex-a53.a57
diff --git a/init.bullhead.rc b/init.bullhead.rc
index 425714a..a85712d 100644
--- a/init.bullhead.rc
+++ b/init.bullhead.rc
@@ -109,7 +109,6 @@
     # foreground gets all CPUs except CPU 3
     # CPU 3 is reserved for the top app
     write /dev/cpuset/foreground/cpus 0-2,4-5
-    write /dev/cpuset/foreground/boost/cpus 4-5
     write /dev/cpuset/background/cpus 0
     write /dev/cpuset/system-background/cpus 0-2
     write /dev/cpuset/top-app/cpus 0-5
diff --git a/self-extractors/extract-lists.txt b/self-extractors/extract-lists.txt
index 146b48e..d3b20d0 100644
--- a/self-extractors/extract-lists.txt
+++ b/self-extractors/extract-lists.txt
@@ -88,9 +88,5 @@
             system/lib/libgps.utils.so \
             system/lib/libiperf.so \
             system/xbin/iperf3 \
-            system/lib64/android.hardware.biometrics.fingerprint@2.1.so \
-            system/lib64/android.hardware.configstore@1.0.so \
-            system/lib64/android.hardware.usb@1.0.so \
-            system/lib64/android.hardware.wifi@1.0.so \
             "
     ;;
diff --git a/self-extractors/qcom/staging/device-partial.mk b/self-extractors/qcom/staging/device-partial.mk
index 9efc294..1087c64 100644
--- a/self-extractors/qcom/staging/device-partial.mk
+++ b/self-extractors/qcom/staging/device-partial.mk
@@ -97,8 +97,4 @@
     vendor/qcom/bullhead/proprietary/libgps.utils.so:system/lib/libgps.utils.so:qcom \
     vendor/qcom/bullhead/proprietary/libiperf.so:system/lib/libiperf.so:qcom \
     vendor/qcom/bullhead/proprietary/iperf3:system/xbin/iperf3:qcom \
-    vendor/qcom/bullhead/proprietary/lib64/android.hardware.biometrics.fingerprint@2.1.so:system/lib64/android.hardware.biometrics.fingerprint@2.1.so:qcom \
-    vendor/qcom/bullhead/proprietary/lib64/android.hardware.configstore@1.0.so:system/lib64/android.hardware.configstore@1.0.so:qcom \
-    vendor/qcom/bullhead/proprietary/lib64/android.hardware.usb@1.0.so:system/lib64/android.hardware.usb@1.0.so:qcom \
-    vendor/qcom/bullhead/proprietary/lib64/android.hardware.wifi@1.0.so:system/lib64/android.hardware.wifi@1.0.so:qcom \
 
diff --git a/sepolicy/hal_camera.te b/sepolicy/hal_camera.te
index 0811092..3e6d94f 100644
--- a/sepolicy/hal_camera.te
+++ b/sepolicy/hal_camera.te
@@ -4,3 +4,7 @@
 allow hal_camera perfd_data_file:sock_file write;
 allow hal_camera perfd:unix_stream_socket connectto;
 allow hal_camera scheduling_policy_service:service_manager find;
+
+# access /data/misc/camera
+allow hal_camera camera_data_file:dir create_dir_perms;
+allow hal_camera camera_data_file:file create_file_perms;
diff --git a/sepolicy/hal_drm.te b/sepolicy/hal_drm.te
new file mode 100644
index 0000000..1bbb734
--- /dev/null
+++ b/sepolicy/hal_drm.te
@@ -0,0 +1,3 @@
+# Allow access to app_data and media_data_files
+allow hal_drm media_data_file:dir create_dir_perms;
+allow hal_drm media_data_file:file create_file_perms;
diff --git a/sepolicy/hal_fingerprint.te b/sepolicy/hal_fingerprint.te
index a339bc7..dfb641e 100644
--- a/sepolicy/hal_fingerprint.te
+++ b/sepolicy/hal_fingerprint.te
@@ -17,3 +17,7 @@
 
 # allow access to sysfs files
 r_dir_file(hal_fingerprint, sysfs_type)
+
+# allow HAL module to read/write dir contents and read/write/unlink files
+allow hal_fingerprint fingerprintd_data_file:file create_file_perms;
+allow hal_fingerprint fingerprintd_data_file:dir rw_dir_perms;
diff --git a/sepolicy/hal_nfc.te b/sepolicy/hal_nfc.te
new file mode 100644
index 0000000..664eaa9
--- /dev/null
+++ b/sepolicy/hal_nfc.te
@@ -0,0 +1,3 @@
+# Data file accesses.
+allow hal_nfc nfc_data_file:dir create_dir_perms;
+allow hal_nfc nfc_data_file:{ file lnk_file fifo_file } create_file_perms;
diff --git a/sepolicy/hal_wifi_supplicant.te b/sepolicy/hal_wifi_supplicant.te
new file mode 100644
index 0000000..b1f24d8
--- /dev/null
+++ b/sepolicy/hal_wifi_supplicant.te
@@ -0,0 +1,6 @@
+allow hal_wifi_supplicant wifi_data_file:dir create_dir_perms;
+allow hal_wifi_supplicant wifi_data_file:file create_file_perms;
+
+# Create a socket for receiving info from wpa
+allow hal_wifi_supplicant wpa_socket:dir create_dir_perms;
+allow hal_wifi_supplicant wpa_socket:sock_file create_file_perms;
diff --git a/sepolicy/hostapd.te b/sepolicy/hostapd.te
new file mode 100644
index 0000000..15064a0
--- /dev/null
+++ b/sepolicy/hostapd.te
@@ -0,0 +1,9 @@
+# hostapd can read and write WiFi related data and configuration.
+# For example, the entropy file is periodically updated.
+allow hostapd wifi_data_file:file rw_file_perms;
+r_dir_file(hostapd, wifi_data_file)
+
+# hostapd wants to create the directory holding its control socket.
+allow hostapd hostapd_socket:dir create_dir_perms;
+# hostapd needs to create, bind to, read, and write its control socket.
+allow hostapd hostapd_socket:sock_file create_file_perms;