diff --git a/BoardConfig.mk b/BoardConfig.mk
index 36d9d2f..df7caf6 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -54,6 +54,9 @@ BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100
+# Enable dex-preoptimization to speed up first boot sequence
+WITH_DEXPREOPT := true
+
# Global flags
COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DLG_CAMERA_HARDWARE
@@ -61,19 +64,28 @@ COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DLG_CAMERA_HARDWARE
TARGET_USES_QCOM_BSP := true
COMMON_GLOBAL_CFLAGS += -DQCOM_BSP
+# QCOM hardware
+BOARD_USES_QCOM_HARDWARE := true
+TARGET_USES_QCOM_BSP := true
+TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
+
# Audio
AUDIO_FEATURE_DISABLED_FM := false
-AUDIO_FEATURE_DISABLED_SSR := true
BOARD_HAVE_QCOM_FM := true
-AUDIO_FEATURE_DISABLED_ANC_HEADSET := true
-AUDIO_FEATURE_DISABLED_DS1_DOLBY_DDP := true
+AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
+AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
+AUDIO_FEATURE_ENABLED_FLUENCE := true
+AUDIO_FEATURE_ENABLED_FM := true
+AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
+AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
+AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
+TARGET_USES_QCOM_MM_AUDIO := true
BOARD_USES_ALSA_AUDIO := true
BOARD_USES_FLUENCE_INCALL := true
BOARD_USES_SEPERATED_AUDIO_INPUT := true
BOARD_USES_SEPERATED_VOICE_SPEAKER := true
-TARGET_QCOM_AUDIO_VARIANT := caf
TARGET_USES_QCOM_COMPRESSED_AUDIO := true
-TARGET_QCOM_MEDIA_VARIANT := caf-new
# GPS
TARGET_NO_RPC := true
@@ -81,7 +93,6 @@ TARGET_NO_RPC := true
# Graphics
BOARD_EGL_CFG := device/lge/w7/prebuilt/egl.cfg
TARGET_DISPLAY_USE_RETIRE_FENCE := true
-TARGET_QCOM_DISPLAY_VARIANT := caf-new
USE_OPENGL_RENDERER := true
TARGET_USES_C2D_COMPOSITION := true
TARGET_USES_ION := true
@@ -120,12 +131,6 @@ WIFI_DRIVER_FW_PATH_AP := "ap"
ENABLE_WEBGL := true
TARGET_FORCE_CPU_UPLOAD := true
-# QCOM hardware
-BOARD_USES_QCOM_HARDWARE := true
-
-# QCOM enhanced A/V
-TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
-
# Camera
USE_DEVICE_SPECIFIC_CAMERA := true
TARGET_DISPLAY_INSECURE_MM_HEAP := true
@@ -176,58 +181,13 @@ BOARD_HAS_NO_MISC_PARTITION := true
TARGET_RECOVERY_QCOM_RTC_FIX := true
TARGET_INCREMENTAL_OTA_VERBATIM_FILES := system/app/Provision.apk
+# Enable Minikin text layout engine (will be the default soon)
+USE_MINIKIN := true
+
+# Include an expanded selection of fonts
+EXTENDED_FONT_FOOTPRINT := true
+
# Nfc
BOARD_NFC_HAL_SUFFIX := w7
BOARD_NFC_CHIPSET := pn547
-# SELinux
-BOARD_SEPOLICY_DIRS += \
- device/lge/w7/sepolicy
-
-BOARD_SEPOLICY_UNION += \
- adbd.te \
- app.te \
- bluetooth_loader.te \
- bridge.te \
- camera.te \
- device.te \
- dhcp.te \
- dnsmasq.te \
- domain.te \
- drmserver.te \
- file_contexts \
- file.te \
- hostapd.te \
- init_shell.te \
- init.te \
- libqc-opt.te \
- mediaserver.te \
- mpdecision.te \
- netd.te \
- netmgrd.te \
- nfc.te \
- property_contexts \
- property.te \
- qcom.te \
- qmux.te \
- radio.te \
- rild.te \
- rmt.te \
- sdcard_internal.te \
- sdcardd.te \
- sensors.te \
- shell.te \
- surfaceflinger.te \
- system.te \
- tee.te \
- te_macros \
- thermald.te \
- ueventd.te \
- vold.te \
- wpa_supplicant.te \
- zygote.te
-
-ifneq ($(TARGET_BUILD_VARIANT),user)
- BOARD_SEPOLICY_UNION += su.te
-endif
-
diff --git a/device_w7.mk b/device_w7.mk
index bef5e80..c70bfd8 100644
--- a/device_w7.mk
+++ b/device_w7.mk
@@ -125,6 +125,7 @@ PRODUCT_COPY_FILES += \
# Audio
PRODUCT_PACKAGES += \
+ audio.primary.msm8226 \
audio_policy.msm8226 \
audio.a2dp.default \
audio.usb.default \
@@ -134,6 +135,9 @@ PRODUCT_PACKAGES += \
libqcomvisualizer \
libqcompostprocbundle \
libqcomvoiceprocessing \
+ libaudioroute \
+ libtinyalsa \
+ libtinycompress \
tinycap \
tinymix \
tinypcminfo \
@@ -182,6 +186,10 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
p2p_supplicant_overlay.conf \
wpa_supplicant_overlay.conf \
+ libwpa_client \
+ hostapd \
+ wpa_supplicant \
+ wpa_supplicant.conf \
libwcnss_qmi \
# Charger
@@ -306,7 +314,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
lpa.decode=true \
qcom.hw.aac.encoder=true \
af.resampler.quality=255 \
- persist.audio.lowlatency.rec=false
+ persist.audio.lowlatency.rec=false \
+ persist.sys.media.use-awesome=true
# WiFi
PRODUCT_PROPERTY_OVERRIDES += \
diff --git a/include/camera/CameraParametersExtra.h b/include/camera/CameraParametersExtra.h
new file mode 100644
index 0000000..923af59
--- /dev/null
+++ b/include/camera/CameraParametersExtra.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2014 The CyanogenMod Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define CAMERA_PARAMETERS_EXTRA_C \
+const char CameraParameters::AUDIO_ZOOM_OFF[] = "audio-zoom"; \
+const char CameraParameters::AUDIO_ZOOM_ON[] = "audio-zoom"; \
+const char CameraParameters::BEAUTY_SHOT_OFF[] = "beauty-shot"; \
+const char CameraParameters::BEAUTY_SHOT_ON[] = "beauty-shot"; \
+const char CameraParameters::BURST_SHOT_OFF[] = "burst-shot"; \
+const char CameraParameters::BURST_SHOT_ON[] = "burst-shot"; \
+const char CameraParameters::KEY_AUDIO_ZOOM[] = "audio-zoom"; \
+const char CameraParameters::KEY_AUDIO_ZOOM_SUPPORTED[] = "audio-zoom-supported"; \
+const char CameraParameters::KEY_BEAUTY_SHOT[] = "beauty-shot"; \
+const char CameraParameters::KEY_BEAUTY_SHOT_SUPPORTED[] = "beauty-shot-supported"; \
+const char CameraParameters::KEY_BURST_SHOT[] = "burst-shot"; \
+const char CameraParameters::KEY_BURST_SHOT_SUPPORTED[] = "burst-shot-supported"; \
+const char CameraParameters::KEY_FOCUS_MODE_OBJECT_TRACKING[] = "object-tracking"; \
+const char CameraParameters::KEY_FOCUS_MODE_OBJECT_TRACKING_SUPPORTED[] = "object-tracking-supported"; \
+const char CameraParameters::KEY_VIDEO_WDR[] = "video-wdr"; \
+const char CameraParameters::KEY_VIDEO_WDR_SUPPORTED[] = "video-wdr-supported"; \
+const char CameraParameters::VIDEO_WDR_OFF[] = "video-wdr"; \
+const char CameraParameters::VIDEO_WDR_ON[] = "video-wdr"; \
+const char CameraParameters::OBJECT_TRACKING_ON[] = "object-tracking"; \
+const char CameraParameters::OBJECT_TRACKING_OFF[] = "object-tracking";
+
+#define CAMERA_PARAMETERS_EXTRA_H \
+ static const char AUDIO_ZOOM_OFF[]; \
+ static const char AUDIO_ZOOM_ON[]; \
+ static const char BEAUTY_SHOT_OFF[]; \
+ static const char BEAUTY_SHOT_ON[]; \
+ static const char BURST_SHOT_OFF[]; \
+ static const char BURST_SHOT_ON[]; \
+ static const char KEY_AUDIO_ZOOM[]; \
+ static const char KEY_AUDIO_ZOOM_SUPPORTED[]; \
+ static const char KEY_BEAUTY_SHOT[]; \
+ static const char KEY_BEAUTY_SHOT_SUPPORTED[]; \
+ static const char KEY_BURST_SHOT[]; \
+ static const char KEY_BURST_SHOT_SUPPORTED[]; \
+ static const char KEY_FOCUS_MODE_OBJECT_TRACKING[]; \
+ static const char KEY_FOCUS_MODE_OBJECT_TRACKING_SUPPORTED[]; \
+ static const char KEY_VIDEO_WDR[]; \
+ static const char KEY_VIDEO_WDR_SUPPORTED[]; \
+ static const char VIDEO_WDR_OFF[]; \
+ static const char VIDEO_WDR_ON[]; \
+ static const char OBJECT_TRACKING_ON[]; \
+ static const char OBJECT_TRACKING_OFF[];
diff --git a/overlay/frameworks/base/core/res/res/values/arrays.xml b/overlay/frameworks/base/core/res/res/values/arrays.xml
index 43c72a1..bc6313f 100644
--- a/overlay/frameworks/base/core/res/res/values/arrays.xml
+++ b/overlay/frameworks/base/core/res/res/values/arrays.xml
@@ -19,19 +19,19 @@
-->
-
+
+ The first item should be empty for regular reboot.
- soft_reboot
- recovery
-
+-->
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 8e82218..42cca55 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -44,63 +44,19 @@
- 0
- 15
-
- - 0
- - 15
- - 200
-
-
-
-
- - 0
- - 13
- - 17
- - 13
-
-
-
-
- - 0
- - 230
- - 170
- - 230
-
-
-
- - 0
- - 75
- - 130
- - 75
-
-
-
-
- - 0
- - 30
- - 75
- - 30
-
-
-
+
true
-
+
true
-
- false
+
-
- false
+
-
- false
+
-
- true
+
true
@@ -282,8 +238,8 @@
false
-
- false
+
@@ -304,27 +260,27 @@
16 - App switch
32 - Camera
For example, a device with Home, Back and Menu keys would set this
- config to 7. -->
+ config to 7.
1
-
-
- true
+-->
+
true
+ NOTE ! - Enable for devices that have a fast response proximity sensor
true
400
-
+ -->
-
- - 55
- - 200
- - 850
- - 880
-
+
+
+
+
+
+
diff --git a/prebuilt/etc/media_codecs.xml b/prebuilt/etc/media_codecs.xml
index 7a0f0b9..d47aa04 100644
--- a/prebuilt/etc/media_codecs.xml
+++ b/prebuilt/etc/media_codecs.xml
@@ -1,5 +1,7 @@
-
-
+
+
-
-
-
-
-
-
-
+
@@ -47,23 +40,20 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -76,17 +66,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -98,71 +77,77 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
+
diff --git a/sepolicy/adbd.te b/sepolicy/adbd.te
deleted file mode 100644
index a430d1c..0000000
--- a/sepolicy/adbd.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow adbd system_data_file:file open;
-allow adbd tmpfs:lnk_file read;
diff --git a/sepolicy/app.te b/sepolicy/app.te
deleted file mode 100644
index f9a2eba..0000000
--- a/sepolicy/app.te
+++ /dev/null
@@ -1,11 +0,0 @@
-allow media_app cache_backup_file:dir getattr;
-allow media_app rootfs:file { read getattr open };
-allow platform_app pds_file:dir getattr;
-allow platform_app persist_file:dir getattr;
-allow platform_app rootfs:file getattr;
-allow platform_app tombstone_data_file:dir getattr;
-#su
-allow platform_app device:fifo_file { read write open };
-allow platform_app device:sock_file write;
-allow platform_app init:unix_stream_socket connectto;
-allow platform_app su_exec:file { read getattr open execute execute_no_trans };
diff --git a/sepolicy/bluetooth_loader.te b/sepolicy/bluetooth_loader.te
deleted file mode 100644
index d14a033..0000000
--- a/sepolicy/bluetooth_loader.te
+++ /dev/null
@@ -1,42 +0,0 @@
-# Bluetooth executables and script (btnvtool, init.qcom.bt.sh)
-type bluetooth_loader, domain;
-type bluetooth_loader_exec, exec_type, file_type;
-
-allow bluetooth_loader rootfs:file { read open };
-
-# Start bluetooth from init
-init_daemon_domain(bluetooth_loader)
-
-# Run init.qcom.bt.sh
-allow bluetooth_loader shell_exec:file { entrypoint read };
-allow bluetooth_loader bluetooth_loader_exec:file { getattr open execute_no_trans };
-
-# init.qcom.bt.sh needs /system/bin/log access
-allow bluetooth_loader devpts:chr_file rw_file_perms;
-
-# Run hci_qcomm_init from init.qcom.bt.sh
-domain_auto_trans(bluetooth_loader, hci_attach_exec, hci_attach)
-
-# hci_qcomm_init started with logwrapper
-allow hci_attach devpts:chr_file rw_file_perms;
-allow hci_attach bluetooth_loader:fd use;
-
-# Read mac address from persist partition
-allow shell persist_file:dir getattr;
-allow hci_attach persist_bluetooth_file:file { read open };
-allow bluetooth_loader persist_file:dir search;
-r_dir_file(bluetooth_loader, persist_bluetooth_file)
-
-# Talk to init over the property socket
-unix_socket_connect(bluetooth_loader, property, init)
-# Set persist.service.bdroid.* and bluetooth.* property values
-allow { bluetooth bluetooth_loader } bluetooth_prop:property_service set;
-
-# Shared memory node access
-allow hci_attach bluetooth_device:chr_file rw_file_perms;
-
-# Allow getprop/setprop for init.qcom.bt.sh
-allow bluetooth_loader system_file:file execute_no_trans;
-
-allow hci_attach bluetooth_loader:fifo_file { write getattr };
-allow hci_attach self:capability dac_override;
diff --git a/sepolicy/bridge.te b/sepolicy/bridge.te
deleted file mode 100644
index 381ea16..0000000
--- a/sepolicy/bridge.te
+++ /dev/null
@@ -1,17 +0,0 @@
-# Bridge Manager (radio process)
-type bridge, domain;
-type bridge_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(bridge)
-
-allow bridge self:netlink_kobject_uevent_socket { create bind read };
-
-# Allow logging diagnostic items
-allow bridge diagnostic_device:chr_file rw_file_perms;
-
-# Talk to qmuxd
-qmux_socket(bridge)
-
-# XXX Label sysfs files with a specific type?
-allow bridge sysfs:file { open write read getattr };
diff --git a/sepolicy/camera.te b/sepolicy/camera.te
deleted file mode 100644
index dc31bb2..0000000
--- a/sepolicy/camera.te
+++ /dev/null
@@ -1,37 +0,0 @@
-# Qualcomm MSM camera
-type camera, domain;
-type camera_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(camera)
-
-allow camera self:process execmem;
-
-allow camera camera_device:dir search;
-allow camera { video_device camera_device }:chr_file rw_file_perms;
-allow camera { surfaceflinger mediaserver }:fd use;
-
-# Create /data/cam_socket0 as camera_socket
-type_transition camera system_data_file:sock_file camera_socket "cam_socket0";
-type_transition camera system_data_file:sock_file camera_socket "cam_socket1";
-allow camera camera_socket:sock_file { create unlink };
-allow camera system_data_file:dir remove_name;
-allow camera system_data_file:sock_file unlink;
-
-# All others under /data get camera_data_file
-file_type_auto_trans(camera, system_data_file, camera_data_file);
-allow camera camera_data_file:dir { write add_name };
-allow camera camera_data_file:file create_file_perms;
-
-# Connect to /data/app/sensor_ctl_socket
-unix_socket_connect(camera, sensors, sensors)
-allow camera sensors_socket:sock_file read;
-
-allow camera devpts:chr_file { read write getattr };
-allow camera device:chr_file { read write ioctl open };
-allow camera mpdecision:unix_stream_socket connectto;
-allow camera servicemanager:binder call;
-allow camera socket_device:sock_file write;
-allow camera system:binder call;
-allow camera system:unix_stream_socket { read write setopt };
-allow camera system_data_file:file { open write };
diff --git a/sepolicy/device.te b/sepolicy/device.te
deleted file mode 100644
index 29809f8..0000000
--- a/sepolicy/device.te
+++ /dev/null
@@ -1,8 +0,0 @@
-type diagnostic_device, dev_type;
-type kgsl_device, dev_type, mlstrustedobject;
-type mpdecision_device, dev_type;
-type shared_log_device, dev_type;
-type power_control_device, dev_type;
-type efs_block_device, dev_type;
-type bluetooth_device, dev_type;
-type shared_memory_device, dev_type;
diff --git a/sepolicy/dhcp.te b/sepolicy/dhcp.te
deleted file mode 100644
index 75808dc..0000000
--- a/sepolicy/dhcp.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow dhcp self:rawip_socket { create write setopt read };
-allow dhcp devpts:chr_file { read write ioctl };
diff --git a/sepolicy/dnsmasq.te b/sepolicy/dnsmasq.te
deleted file mode 100644
index 058250d..0000000
--- a/sepolicy/dnsmasq.te
+++ /dev/null
@@ -1,14 +0,0 @@
-allow dnsmasq self:capability net_admin;
-allow dnsmasq self:udp_socket { read write ioctl create bind };
-allow dnsmasq node:udp_socket node_bind;
-allow dnsmasq port:udp_socket name_bind;
-allow dnsmasq self:capability { net_raw dac_override };
-allow dnsmasq self:netlink_route_socket { write read getattr nlmsg_read bind create };
-allow dnsmasq self:rawip_socket { write read create setopt };
-allow dnsmasq self:udp_socket setopt;
-allow dnsmasq netd:fd use;
-allow dnsmasq netd:fifo_file { read write };
-allow dnsmasq netd:netlink_kobject_uevent_socket { read write };
-allow dnsmasq netd:netlink_nflog_socket { read write };
-allow dnsmasq netd:netlink_route_socket { read write };
-allow dnsmasq netd:unix_stream_socket { read write };
diff --git a/sepolicy/domain.te b/sepolicy/domain.te
deleted file mode 100644
index 8fdcb15..0000000
--- a/sepolicy/domain.te
+++ /dev/null
@@ -1,3 +0,0 @@
-allow domain kgsl_device:chr_file rw_file_perms;
-# libgsl is chatty about accessing /data/local/tmp
-dontaudit { surfaceflinger appdomain } shell_data_file:dir search;
diff --git a/sepolicy/drmserver.te b/sepolicy/drmserver.te
deleted file mode 100644
index 2c224e1..0000000
--- a/sepolicy/drmserver.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Drm wants to read /firmware/image/tzapps.mdt
-r_dir_file(drmserver, radio_efs_file)
diff --git a/sepolicy/file.te b/sepolicy/file.te
deleted file mode 100644
index c3d230a..0000000
--- a/sepolicy/file.te
+++ /dev/null
@@ -1,19 +0,0 @@
-type mpdecision_socket, file_type;
-type qmuxd_socket, file_type;
-type sensors_socket, file_type;
-type camera_socket, file_type;
-
-type sensors_data_file, file_type, data_file_type;
-
-# Default type for anything under /firmware
-type radio_efs_file, fs_type;
-
-# Persist firmware types
-type persist_file, file_type;
-type persist_bluetooth_file, file_type;
-type persist_drm_file, file_type;
-type persist_wifi_file, file_type;
-
-# PDS partition
-type pds_file, file_type;
-
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
deleted file mode 100644
index 9188155..0000000
--- a/sepolicy/file_contexts
+++ /dev/null
@@ -1,92 +0,0 @@
-/dev/msm_acdb u:object_r:audio_device:s0
-/dev/msm_mp3 u:object_r:audio_device:s0
-/dev/msm_rtac u:object_r:audio_device:s0
-/dev/msm_vidc.* u:object_r:audio_device:s0
-/dev/msm_amrnb.* u:object_r:audio_device:s0
-/dev/msm_amrwb.* u:object_r:audio_device:s0
-/dev/msm_aac.* u:object_r:audio_device:s0
-
-/dev/qseecom u:object_r:tee_device:s0
-
-# Jpeg Engine support
-/dev/gemini.* u:object_r:camera_device:s0
-# MSM camera related
-/dev/video.* u:object_r:camera_device:s0
-/dev/msm_camera(/.*)? u:object_r:camera_device:s0
-/dev/msm_camera/video_msm u:object_r:camera_device:s0
-
-# Media interface
-/dev/media.* u:object_r:video_device:s0
-
-# Image Rotator Driver
-/dev/msm_rotator u:object_r:video_device:s0
-
-# Sensors DSPS driver
-/dev/msm_dsps u:object_r:sensors_device:s0
-/dev/smd_sns_dsps u:object_r:sensors_device:s0
-
-/dev/hsicctl[0-3] u:object_r:radio_device:s0
-/dev/rmnet_mux_ctrl u:object_r:radio_device:s0
-/dev/qmi[0-2] u:object_r:radio_device:s0
-/dev/radio0 u:object_r:radio_device:s0
-/dev/ramdump_.* u:object_r:radio_device:s0
-/dev/smd7 u:object_r:radio_device:s0
-/dev/smdcntl0 u:object_r:radio_device:s0
-/dev/smdcntl1 u:object_r:radio_device:s0
-/dev/smdcntl2 u:object_r:radio_device:s0
-/dev/smdcntl3 u:object_r:radio_device:s0
-/dev/smdcntl4 u:object_r:radio_device:s0
-/dev/smdcntl5 u:object_r:radio_device:s0
-/dev/smdcntl6 u:object_r:radio_device:s0
-/dev/smdcntl7 u:object_r:radio_device:s0
-/dev/ttyUSB0 u:object_r:radio_device:s0
-
-/dev/ttyHS.* u:object_r:hci_attach_dev:s0
-/dev/smd2 u:object_r:hci_attach_dev:s0
-/dev/smd3 u:object_r:hci_attach_dev:s0
-
-/dev/cpu_dma_latency u:object_r:power_control_device:s0
-/dev/diag u:object_r:diagnostic_device:s0
-/dev/smd.* u:object_r:shared_memory_device:s0
-/dev/smem_log u:object_r:shared_log_device:s0
-/dev/kgsl-.* u:object_r:kgsl_device:s0
-
-# Sockets
-/dev/socket/qmux_audio(/.*)? u:object_r:qmuxd_socket:s0
-/dev/socket/qmux_bluetooth(/.*)? u:object_r:qmuxd_socket:s0
-/dev/socket/qmux_gps(/.*)? u:object_r:qmuxd_socket:s0
-/dev/socket/qmux_radio(/.*)? u:object_r:qmuxd_socket:s0
-/dev/socket/mpdecision(/.*)? u:object_r:mpdecision_socket:s0
-
-# Block labeling
-/dev/block/mmcblk0p1 u:object_r:efs_block_device:s0
-
-# Data labeling
-/data/misc/sensors(/.*)? u:object_r:sensors_data_file:s0
-/data/system/sensors(/.*)? u:object_r:sensors_data_file:s0
-
-# System binaries
-/system/bin/rmt_storage u:object_r:rmt_exec:s0
-/system/bin/thermald u:object_r:thermald_exec:s0
-/system/bin/mpdecision u:object_r:mpdecision_exec:s0
-/system/bin/mm-qcamera-daemon u:object_r:camera_exec:s0
-/system/bin/sensors.qcom u:object_r:sensors_exec:s0
-/system/bin/qmuxd u:object_r:qmux_exec:s0
-/system/bin/bridgemgrd u:object_r:bridge_exec:s0
-/system/bin/netmgrd u:object_r:netmgrd_exec:s0
-/system/bin/qseecomd u:object_r:tee_exec:s0
-/system/bin/hci_qcomm_init u:object_r:hci_attach_exec:s0
-/system/etc/init.qcom.bt.sh u:object_r:bluetooth_loader_exec:s0
-/system/bin/btnvtool u:object_r:bluetooth_loader_exec:s0
-
-# Persist firmware filesystem
-/persist(/.*)? u:object_r:persist_file:s0
-/persist/.bt_nv.bin u:object_r:persist_bluetooth_file:s0
-/persist/drm/widevine(/.*)? u:object_r:persist_drm_file:s0
-/persist/WCNSS_qcom_wlan_nv.bin u:object_r:persist_wifi_file:s0
-/persist/WCNSS_qcom_wlan_nv_calibration_persist.bin u:object_r:persist_wifi_file:s0
-/persist/WCNSS_qcom_wlan_nv_regulatory_persist.bin u:object_r:persist_wifi_file:s0
-
-# PDS partition
-/pds(/.*)? u:object_r:pds_file:s0
-/pds/camera(/.*)? u:object_r:camera_data_file:s0
diff --git a/sepolicy/hostapd.te b/sepolicy/hostapd.te
deleted file mode 100644
index d2e2517..0000000
--- a/sepolicy/hostapd.te
+++ /dev/null
@@ -1 +0,0 @@
-allow hostapd cgroup:dir { create add_name };
diff --git a/sepolicy/init.te b/sepolicy/init.te
deleted file mode 100644
index 3f11893..0000000
--- a/sepolicy/init.te
+++ /dev/null
@@ -1 +0,0 @@
-allow init wpa_socket:unix_dgram_socket { bind create };
diff --git a/sepolicy/init_shell.te b/sepolicy/init_shell.te
deleted file mode 100644
index 7569974..0000000
--- a/sepolicy/init_shell.te
+++ /dev/null
@@ -1,4 +0,0 @@
-allow init_shell sysfs_writable:file setattr;
-#su
-allow init_shell device:fifo_file { read write ioctl getattr };
-
diff --git a/sepolicy/libqc-opt.te b/sepolicy/libqc-opt.te
deleted file mode 100644
index a908887..0000000
--- a/sepolicy/libqc-opt.te
+++ /dev/null
@@ -1,6 +0,0 @@
-type libqc-opt, domain;
-
-# Set sys.media.vdec.sw value
-allow init_shell performance_prop:property_service set;
-allow libqc-opt performance_prop:property_service set;
-allow zygote performance_prop:property_service set;
diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te
deleted file mode 100644
index ce35f71..0000000
--- a/sepolicy/mediaserver.te
+++ /dev/null
@@ -1,15 +0,0 @@
-allow mediaserver camera_data_file:sock_file w_file_perms;
-allow mediaserver device:sock_file write;
-
-qmux_socket(mediaserver)
-
-unix_socket_send(mediaserver, camera, camera)
-
-allow mediaserver self:socket create;
-
-# Allow logging diagnostic items
-allow mediaserver diagnostic_device:chr_file rw_file_perms;
-
-allow mediaserver system_data_file:file { write open };
-allow mediaserver camera_device:dir search;
-allow mediaserver camera_data_file:dir search;
diff --git a/sepolicy/mpdecision.te b/sepolicy/mpdecision.te
deleted file mode 100644
index c3be678..0000000
--- a/sepolicy/mpdecision.te
+++ /dev/null
@@ -1,30 +0,0 @@
-# CPU governor (root process)
-type mpdecision, domain;
-type mpdecision_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(mpdecision)
-
-# dac_override to unlink /dev/socket/mpdecision/touchboost
-allow mpdecision self:capability { dac_override fsetid net_admin };
-allow mpdecision self:netlink_kobject_uevent_socket { create read setopt bind read };
-
-# Create under /dev/socket/mpdecision
-allow mpdecision mpdecision_socket:dir w_dir_perms;
-allow mpdecision mpdecision_socket:sock_file { create setattr write };
-
-# XXX Should we label with own type?
-allow mpdecision sysfs:file { read open write getattr };
-
-allow mpdecision self:capability { chown sys_nice };
-allow mpdecision socket_device:dir { write add_name };
-allow mpdecision socket_device:sock_file { create setattr write };
-
-allow mpdecision system_data_file:file { open append create };
-allow mpdecision system_data_file:dir { write add_name };
-allow mpdecision power_control_device:chr_file { write open };
-allow mpdecision sysfs_devices_system_cpu:file write;
-allow mpdecision mediaserver:dir search;
-allow mpdecision mediaserver:file { read open };
-allow mpdecision system:dir search;
-allow mpdecision system:file { read open };
diff --git a/sepolicy/netd.te b/sepolicy/netd.te
deleted file mode 100644
index ee1496b..0000000
--- a/sepolicy/netd.te
+++ /dev/null
@@ -1 +0,0 @@
-allow netd self:capability fsetid;
diff --git a/sepolicy/netmgrd.te b/sepolicy/netmgrd.te
deleted file mode 100644
index f745767..0000000
--- a/sepolicy/netmgrd.te
+++ /dev/null
@@ -1,33 +0,0 @@
-# Network utilities (radio process)
-type netmgrd, domain;
-type netmgrd_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(netmgrd)
-
-allow netmgrd self:udp_socket { create ioctl };
-# fsetid, dac_override unlink on /dev/socket/qmux_radio/qmux_client_socket
-allow netmgrd self:capability { sys_module fsetid setuid setgid net_admin net_raw dac_override };
-allow netmgrd self:packet_socket { write bind read create };
-allow netmgrd self:netlink_socket { write read create bind setopt };
-allow netmgrd self:netlink_route_socket { create bind read write nlmsg_read nlmsg_write setopt getattr };
-
-# Talk to qmuxd
-qmux_socket(netmgrd)
-
-# Allow logging diagnostic items
-allow netmgrd diagnostic_device:chr_file rw_file_perms;
-
-# /data/data_test/ access with shell
-allow netmgrd shell_exec:file { execute read open execute_no_trans };
-allow netmgrd system_file:file { execute_no_trans };
-
-# Talk to init over the property socket
-unix_socket_connect(netmgrd, property, init)
-# Set net.rmnet_usb0. values
-allow netmgrd radio_prop:property_service set;
-
-allow netmgrd kernel:system module_request;
-allow netmgrd self:rawip_socket { write create setopt getopt };
-allow netmgrd proc:file write;
-allow netmgrd self:netlink_xfrm_socket { bind create };
diff --git a/sepolicy/nfc.te b/sepolicy/nfc.te
deleted file mode 100644
index 583a5db..0000000
--- a/sepolicy/nfc.te
+++ /dev/null
@@ -1 +0,0 @@
-allow nfc cache_file:file { lock open };
diff --git a/sepolicy/property.te b/sepolicy/property.te
deleted file mode 100644
index 02bfce2..0000000
--- a/sepolicy/property.te
+++ /dev/null
@@ -1 +0,0 @@
-type performance_prop, property_type;
diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts
deleted file mode 100644
index 8ee3d2d..0000000
--- a/sepolicy/property_contexts
+++ /dev/null
@@ -1,2 +0,0 @@
-net.rmnet_usb0. u:object_r:radio_prop:s0
-sys.media.vdec.sw u:object_r:performance_prop:s0
diff --git a/sepolicy/qcom.te b/sepolicy/qcom.te
deleted file mode 100644
index 729828a..0000000
--- a/sepolicy/qcom.te
+++ /dev/null
@@ -1,55 +0,0 @@
-# Qcom init scripts
-
-allow rootfs shell_exec:file rx_file_perms;
-allow init_shell ctl_default_prop:property_service set;
-allow init_shell default_prop:property_service set;
-allow init_shell graphics_device:dir w_dir_perms;
-allow init_shell graphics_device:lnk_file create_file_perms;
-allow init_shell radio_efs_file:dir r_dir_perms;
-allow init_shell radio_efs_file:file x_file_perms;
-allow init_shell rootfs:file r_file_perms;
-allow init_shell self:capability { fowner chown fsetid };
-allow init_shell sysfs:file create_file_perms;
-allow init_shell system_prop:property_service set;
-allow init_shell tmpfs:chr_file r_file_perms;
-allow init_shell system_file:lnk_file getattr;
-allow init_shell tmpfs:chr_file w_file_perms;
-allow init_shell kernel:process setsched;
-allow init_shell labeledfs:filesystem remount;
-allow init_shell system_file:file { write create };
-allow init_shell system_file:lnk_file create;
-allow init_shell system_file:dir w_dir_perms;
-allow init_shell cache_file:file { write lock open setattr };
-allow init_shell dhcp_data_file:dir { read write open remove_name };
-allow init_shell dhcp_data_file:file unlink;
-allow init_shell proc:file write;
-allow init_shell self:capability { net_admin dac_override };
-allow init_shell sensors_data_file:dir { getattr setattr };
-allow init_shell sensors_data_file:file { write getattr setattr };
-allow init_shell system_data_file:dir setattr;
-allow init_shell tmpfs:file execute;
-allow init_shell wifi_data_file:file { read getattr open };
-
-# pds backup and restorecon
-allow shell camera_data_file:dir getattr;
-allow shell pds_file:dir { read search open getattr };
-allow shell pds_file:file getattr;
-allow init_shell pds_file:file { read open };
-allow init_shell pds_file:dir getattr;
-allow pds_file rootfs:filesystem associate;
-
-allow init_shell block_device:blk_file { read open };
-allow init_shell device:chr_file { getattr setattr write open };
-allow init_shell device:dir { write read open add_name };
-allow init_shell device:lnk_file create;
-allow init_shell self:capability sys_module;
-allow init_shell sensors_device:chr_file getattr;
-allow init_shell kernel:system syslog_mod;
-allow init_shell self:capability2 syslog;
-allow persist_file rootfs:filesystem associate;
-allow init_shell persist_file:dir { getattr write remove_name read add_name open };
-allow init_shell persist_file:lnk_file { read create getattr unlink };
-allow init_shell persist_wifi_file:file getattr;
-allow init_shell persist_wifi_file:lnk_file unlink;
-allow init_shell diagnostic_device:chr_file { read write };
-allow init_shell init:fifo_file { read ioctl getattr };
diff --git a/sepolicy/qmux.te b/sepolicy/qmux.te
deleted file mode 100644
index 6f84ed8..0000000
--- a/sepolicy/qmux.te
+++ /dev/null
@@ -1,20 +0,0 @@
-# Qualcomm Management Interface Multiplexer
-type qmux, domain;
-type qmux_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(qmux)
-
-# Create local qmux_connect_socket
-allow qmux qmuxd_socket:dir w_dir_perms;
-allow qmux qmuxd_socket:sock_file { create setattr getattr unlink };
-
-# /dev/hsicctl* node access
-allow qmux radio_device:chr_file rw_file_perms;
-
-# Allow logging diagnostic items
-allow qmux diagnostic_device:chr_file rw_file_perms;
-
-# XXX Should we label with own type
-allow qmux sysfs:file { open write append read getattr };
-allow qmux sysfs_wake_lock:file { append open };
diff --git a/sepolicy/radio.te b/sepolicy/radio.te
deleted file mode 100644
index d219df8..0000000
--- a/sepolicy/radio.te
+++ /dev/null
@@ -1 +0,0 @@
-allow radio cache_file:file { lock open };
diff --git a/sepolicy/rild.te b/sepolicy/rild.te
deleted file mode 100644
index e4e3d0c..0000000
--- a/sepolicy/rild.te
+++ /dev/null
@@ -1,15 +0,0 @@
-allow rild self:netlink_socket { create bind read write };
-allow rild self:netlink_route_socket { write };
-
-# Talk to qmuxd
-qmux_socket(rild)
-
-# Allow logging diagnostic items
-allow rild diagnostic_device:chr_file rw_file_perms;
-
-# XXX label with own type?
-allow rild sysfs:file { read open write getattr };
-
-allow rild self:socket { read write create ioctl };
-
-allow rild self:netlink_kobject_uevent_socket { read bind create setopt getopt };
diff --git a/sepolicy/rmt.te b/sepolicy/rmt.te
deleted file mode 100644
index cb7f7c9..0000000
--- a/sepolicy/rmt.te
+++ /dev/null
@@ -1,31 +0,0 @@
-# remote storage process
-type rmt, domain;
-type rmt_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(rmt)
-
-# opens and reads the primary block device
-allow rmt block_device:blk_file { open read write };
-allow rmt block_device:dir search;
-
-# XXX should we allow sys_rawio on /dev/mem?
-allow rmt self:capability { sys_rawio sys_admin };
-# dac_override on open /sys/power/wake_lock
-allow rmt self:capability { setuid setgid dac_override };
-allow rmt self:socket { create ioctl bind setopt read write };
-
-allow rmt cgroup:dir { create add_name };
-# XXX do we need write access?
-allow rmt kmem_device:chr_file rw_file_perms;
-
-# Allow shared memory logging access
-allow rmt shared_log_device:chr_file rw_file_perms;
-
-# XXX Should we label with own type?
-allow rmt sysfs:file { open append read getattr write };
-allow rmt sysfs:dir rw_dir_perms;
-
-allow rmt radio_efs_file:file { read open };
-allow rmt sysfs_wake_lock:file { append open };
-allow rmt device:chr_file { read write open };
diff --git a/sepolicy/sdcard_internal.te b/sepolicy/sdcard_internal.te
deleted file mode 100644
index a08628f..0000000
--- a/sepolicy/sdcard_internal.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow sdcard_internal labeledfs:filesystem associate;
-
diff --git a/sepolicy/sdcardd.te b/sepolicy/sdcardd.te
deleted file mode 100644
index 3172e99..0000000
--- a/sepolicy/sdcardd.te
+++ /dev/null
@@ -1 +0,0 @@
-allow sdcardd self:capability sys_resource;
diff --git a/sepolicy/sensors.te b/sepolicy/sensors.te
deleted file mode 100644
index 09e152a..0000000
--- a/sepolicy/sensors.te
+++ /dev/null
@@ -1,36 +0,0 @@
-# Integrated qualcomm sensor process
-type sensors, domain;
-type sensors_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(sensors)
-
-# dac_override open /dev/msm_dsps
-allow sensors self:capability { setuid setgid chown dac_override };
-
-# Allow logging diagnostic items
-allow sensors diagnostic_device:chr_file rw_file_perms;
-
-# Create /data/app/sensor_ctl_socket
-file_type_auto_trans(sensors, apk_data_file, sensors_socket);
-
-allow sensors sensors_data_file:dir create_dir_perms;
-allow sensors sensors_data_file:file create_file_perms;
-dontaudit sensors apk_data_file:dir remove_name;
-
-# Access to sensor nodes
-allow sensors sensors_device:chr_file rw_file_perms;
-
-# XXX should power_control_device be labeled differently?
-allow sensors power_control_device:chr_file { write open append };
-
-# XXX label with own type?
-allow sensors sysfs:file { open append read write getattr };
-
-allow sensors system_data_file:file { write open };
-allow sensors input_device:chr_file { read ioctl open };
-allow sensors input_device:dir { read open };
-allow sensors cgroup:dir { add_name create };
-allow sensors sysfs_wake_lock:file { append open };
-allow sensors shared_log_device:chr_file { read write };
-allow sensors sensors:socket { create };
diff --git a/sepolicy/shell.te b/sepolicy/shell.te
deleted file mode 100644
index 259d79b..0000000
--- a/sepolicy/shell.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow shell rootfs:file getattr;
-allow shell tmpfs:lnk_file read;
diff --git a/sepolicy/su.te b/sepolicy/su.te
deleted file mode 100644
index 987eddf..0000000
--- a/sepolicy/su.te
+++ /dev/null
@@ -1 +0,0 @@
-allow system su:binder call;
diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te
deleted file mode 100644
index aca5928..0000000
--- a/sepolicy/surfaceflinger.te
+++ /dev/null
@@ -1 +0,0 @@
-allow surfaceflinger sysfs:file rw_file_perms;
diff --git a/sepolicy/system.te b/sepolicy/system.te
deleted file mode 100644
index 7eff8f2..0000000
--- a/sepolicy/system.te
+++ /dev/null
@@ -1,29 +0,0 @@
-allow system diagnostic_device:chr_file rw_file_perms;
-
-allow system init:unix_dgram_socket sendto;
-allow system wpa_socket:unix_dgram_socket sendto;
-
-qmux_socket(system)
-
-# PowerManagerService
-unix_socket_connect(system, sensors, sensors)
-allow system sensors_socket:sock_file read;
-allow system sensors:unix_stream_socket sendto;
-
-# mpdecision access
-unix_socket_connect(system, mpdecision, mpdecision)
-unix_socket_send(system, mpdecision, mpdecision)
-allow system mpdecision:unix_stream_socket sendto;
-allow system mpdecision_socket:dir search;
-
-allow system self:capability sys_module;
-allow system sysfs:file { read open write };
-allow system adbd_socket:sock_file write;
-allow system_app cache_file:file { write lock open setattr };
-allow system sdcard_internal:dir search;
-allow system sdcard_internal:file { read open };
-allow system init_shell:binder call;
-allow system sysfs_writable:file { write open };
-allow system device:chr_file { read ioctl open };
-allow system camera:binder transfer;
-allow system cache_backup_file:file relabelto;
diff --git a/sepolicy/te_macros b/sepolicy/te_macros
deleted file mode 100644
index 274fd55..0000000
--- a/sepolicy/te_macros
+++ /dev/null
@@ -1,12 +0,0 @@
-#####################################
-# qmux_socket(clientdomain)
-# Allow client to send via a local
-# socket to the qmux domain.
-define(`qmux_socket', `
-type $1_qmuxd_socket, file_type;
-file_type_auto_trans($1, qmuxd_socket, $1_qmuxd_socket)
-unix_socket_connect($1, qmuxd, qmux)
-allow qmux $1_qmuxd_socket:sock_file { getattr unlink };
-')
-
-
diff --git a/sepolicy/tee.te b/sepolicy/tee.te
deleted file mode 100644
index 75073bd..0000000
--- a/sepolicy/tee.te
+++ /dev/null
@@ -1,7 +0,0 @@
-# Qualcomm Secure Execution Environment Communicator policy
-allow tee self:process execmem;
-
-# Access /persist/drm/widevine
-allow tee persist_file:dir search;
-allow tee persist_drm_file:dir r_dir_perms;
-allow tee persist_drm_file:file r_file_perms;
diff --git a/sepolicy/thermald.te b/sepolicy/thermald.te
deleted file mode 100644
index 33a61df..0000000
--- a/sepolicy/thermald.te
+++ /dev/null
@@ -1,27 +0,0 @@
-# Temperature sensor daemon (root process)
-type thermald, domain;
-type thermald_exec, exec_type, file_type;
-
-# Started by init
-init_daemon_domain(thermald)
-
-# XXX should we allow kexec_load with /dev/socket/qmux_radio/qmux_client_socket
-# dac_override open, unlink with /dev/socket/qmux_radio/qmux_client_socket
-allow thermald self:capability { net_admin fsetid dac_override };
-
-allow thermald self:socket { ioctl create write read };
-allow thermald self:netlink_kobject_uevent_socket { read create setopt bind };
-
-# Talk to qmuxd
-qmux_socket(thermald)
-
-# Access to shared memory logger and logging diagnostic items
-allow thermald { shared_log_device diagnostic_device }:chr_file rw_file_perms;
-
-# XXX Should we label with own type?
-allow thermald sysfs:file { open read write getattr };
-
-allow thermald self:capability chown;
-allow thermald socket_device:dir { write add_name };
-allow thermald socket_device:sock_file { create setattr };
-allow thermald qmuxd_socket:dir remove_name;
diff --git a/sepolicy/ueventd.te b/sepolicy/ueventd.te
deleted file mode 100644
index 1a3ecfb..0000000
--- a/sepolicy/ueventd.te
+++ /dev/null
@@ -1,11 +0,0 @@
-# Drivers read firmware files (/firmware/image, /system/etc/firmware/wlan/prima)
-allow ueventd { radio_efs_file wifi_data_file }:file r_file_perms;
-allow ueventd { radio_efs_file wifi_data_file }:dir search;
-allow ueventd { radio_efs_file wifi_data_file }:file getattr;
-allow ueventd persist_file:dir search;
-allow ueventd persist_wifi_file:file { read getattr open };
-allow ueventd sysfs:file relabelfrom;
-allow ueventd sysfs_writable:file { getattr setattr };
-allow ueventd cgroup:dir { create add_name };
-allow ueventd sdcard_external:dir search;
-allow ueventd sdcard_external:file r_file_perms;
diff --git a/sepolicy/vold.te b/sepolicy/vold.te
deleted file mode 100644
index 3d633de..0000000
--- a/sepolicy/vold.te
+++ /dev/null
@@ -1,4 +0,0 @@
-allow vold system_data_file:file { write open };
-allow vold kernel:system module_request;
-allow vold persist_file:dir { read getattr open ioctl };
-
diff --git a/sepolicy/wpa_supplicant.te b/sepolicy/wpa_supplicant.te
deleted file mode 100644
index 6e96fd5..0000000
--- a/sepolicy/wpa_supplicant.te
+++ /dev/null
@@ -1,8 +0,0 @@
-allow wpa init:unix_dgram_socket { read write };
-
-# logwrapper used with wpa_supplicant
-allow wpa devpts:chr_file { read write };
-
-allow wpa wpa_socket:unix_dgram_socket { read write };
-allow wpa_socket system:unix_dgram_socket sendto;
-allow wpa wifi_data_file:sock_file { write unlink };
diff --git a/sepolicy/zygote.te b/sepolicy/zygote.te
deleted file mode 100644
index 926e04c..0000000
--- a/sepolicy/zygote.te
+++ /dev/null
@@ -1,6 +0,0 @@
-allow zygote cache_file:file { write lock open setattr };
-allow zygote init:unix_stream_socket connectto;
-allow zygote property_socket:sock_file write;
-allow zygote labeledfs:filesystem remount;
-allow zygote system_data_file:dir { setattr mounton };
-allow zygote devpts:chr_file { read write };