From 24f3c28234abf7d1a84f9583298098550d2008f5 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Tue, 4 Feb 2014 20:03:53 +0100 Subject: [PATCH 01/17] Initial cm-11.0 bringup --- BoardConfig.mk | 16 ++++++++++++++++ selinux/device.te | 3 +++ selinux/domain.te | 2 ++ selinux/file.te | 5 +++++ selinux/file_contexts | 30 ++++++++++++++++++++++++++++++ selinux/init.te | 1 + selinux/mediaserver.te | 3 +++ selinux/rild.te | 7 +++++++ selinux/system.te | 10 ++++++++++ selinux/ueventd.te | 3 +++ selinux/wpa_supplicant.te | 10 ++++++++++ 11 files changed, 90 insertions(+) create mode 100644 selinux/device.te create mode 100644 selinux/domain.te create mode 100644 selinux/file.te create mode 100644 selinux/file_contexts create mode 100644 selinux/init.te create mode 100644 selinux/mediaserver.te create mode 100644 selinux/rild.te create mode 100644 selinux/system.te create mode 100644 selinux/ueventd.te create mode 100644 selinux/wpa_supplicant.te diff --git a/BoardConfig.mk b/BoardConfig.mk index 00d2eb6..bbc101b 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -30,3 +30,19 @@ TARGET_OTA_ASSERT_DEVICE := c0,p4notewifi,p4notewifiww,n8013,GT-N8013 #Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/n8013/bluetooth + +# Selinux +BOARD_SEPOLICY_DIRS := \ + device/samsung/n801x/selinux + +BOARD_SEPOLICY_UNION := \ + device.te \ + domain.te \ + file.te \ + file_contexts \ + init.te \ + mediaserver.te \ + rild.te \ + system.te \ + ueventd.te \ + wpa_supplicant.te \ No newline at end of file diff --git a/selinux/device.te b/selinux/device.te new file mode 100644 index 0000000..cca8ee1 --- /dev/null +++ b/selinux/device.te @@ -0,0 +1,3 @@ +type mali_device, dev_type, mlstrustedobject; +type rfkill_device, dev_type; +type efs_block_device, dev_type; diff --git a/selinux/domain.te b/selinux/domain.te new file mode 100644 index 0000000..26e8033 --- /dev/null +++ b/selinux/domain.te @@ -0,0 +1,2 @@ +## /dev/mali, /dev/ump +allow domain mali_device:chr_file rw_file_perms; diff --git a/selinux/file.te b/selinux/file.te new file mode 100644 index 0000000..2a01dac --- /dev/null +++ b/selinux/file.te @@ -0,0 +1,5 @@ +type firmware_mfc, file_type; +type firmware_camera, file_type; + +type camera_data_file, file_type, data_file_type; +type sensors_data_file, file_type, data_file_type; diff --git a/selinux/file_contexts b/selinux/file_contexts new file mode 100644 index 0000000..00dc343 --- /dev/null +++ b/selinux/file_contexts @@ -0,0 +1,30 @@ +# GFX +/dev/mali u:object_r:mali_device:s0 +/dev/ump u:object_r:mali_device:s0 +/dev/fimg2d u:object_r:mali_device:s0 + +/dev/block/mmcblk0p7 u:object_r:efs_block_device:s0 + +# Camera +/data/ISP_CV u:object_r:camera_data_file:s0 +/dev/exynos-mem u:object_r:video_device:s0 + +# Bluetooth +/dev/ttySAC0 u:object_r:hci_attach_dev:s0 +/efs/bluetooth/(/.*)? u:object_r:bluetooth_efs_file:s0 + +# GPS +/dev/ttySAC1 u:object_r:gps_device:s0 + +# Sensors +/dev/akm8975 u:object_r:sensors_device:s0 +/efs/gyro_cal_data u:object_r:sensors_data_file:s0 + +# Wifi +/dev/rfkill u:object_r:rfkill_device:s0 +/efs/wifi/.mac.info u:object_r:wifi_data_file:s0 + +# Firmwares +/system/vendor/firmware(/.*)? u:object_r:firmware_camera:s0 +/system/vendor/firmware/mfc_fw.bin u:object_r:firmware_mfc:s0 +/data/cfw(/.*)? u:object_r:firmware_camera:s0 diff --git a/selinux/init.te b/selinux/init.te new file mode 100644 index 0000000..3f11893 --- /dev/null +++ b/selinux/init.te @@ -0,0 +1 @@ +allow init wpa_socket:unix_dgram_socket { bind create }; diff --git a/selinux/mediaserver.te b/selinux/mediaserver.te new file mode 100644 index 0000000..520da3a --- /dev/null +++ b/selinux/mediaserver.te @@ -0,0 +1,3 @@ +allow mediaserver { firmware_camera }:file r_file_perms; +allow mediaserver firmware_camera:dir r_dir_perms; +allow mediaserver camera_data_file:file rw_file_perms; diff --git a/selinux/rild.te b/selinux/rild.te new file mode 100644 index 0000000..7f817d0 --- /dev/null +++ b/selinux/rild.te @@ -0,0 +1,7 @@ +allow rild self:netlink_socket { create bind read write }; +allow rild self:netlink_route_socket { write }; +allow rild self:netlink_kobject_uevent_socket { create bind read write setopt }; + +allow rild radio_device:chr_file rw_file_perms; +allow rild efs_block_device:blk_file rw_file_perms; +allow rild efs_file:file { read open write setattr }; diff --git a/selinux/system.te b/selinux/system.te new file mode 100644 index 0000000..48fe03e --- /dev/null +++ b/selinux/system.te @@ -0,0 +1,10 @@ +# allow system uinput_device:chr_file { read ioctl write open }; +allow system sensors_device:chr_file { read open }; +allow system sensors_data_file:file r_file_perms; +allow system wpa_socket:unix_dgram_socket sendto; + +allow system sysfs:file { read open write }; +allow system self:capability { sys_module }; + +# /efs/wifi/.mac.info +allow system wifi_data_file:file { read open }; diff --git a/selinux/ueventd.te b/selinux/ueventd.te new file mode 100644 index 0000000..4037e57 --- /dev/null +++ b/selinux/ueventd.te @@ -0,0 +1,3 @@ +# Firmwares +allow ueventd { firmware_mfc }:file r_file_perms; +allow ueventd { firmware_camera }:dir search; diff --git a/selinux/wpa_supplicant.te b/selinux/wpa_supplicant.te new file mode 100644 index 0000000..ab5fb24 --- /dev/null +++ b/selinux/wpa_supplicant.te @@ -0,0 +1,10 @@ +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_socket wifi_data_file:sock_file unlink; +allow wpa rfkill_device:chr_file rw_file_perms; \ No newline at end of file From 90df04c7a0e058e3fd7df042a214a8725a97fa30 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Wed, 5 Feb 2014 08:43:25 +0100 Subject: [PATCH 02/17] Update BoardConfig.mk Fix typo in selinux config --- BoardConfig.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index bbc101b..ae442da 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -33,7 +33,7 @@ BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/n8013/bluetooth # Selinux BOARD_SEPOLICY_DIRS := \ - device/samsung/n801x/selinux + device/samsung/n8013/selinux BOARD_SEPOLICY_UNION := \ device.te \ @@ -45,4 +45,4 @@ BOARD_SEPOLICY_UNION := \ rild.te \ system.te \ ueventd.te \ - wpa_supplicant.te \ No newline at end of file + wpa_supplicant.te From 7a2bc14763f120166b1431ef461fed09808467de Mon Sep 17 00:00:00 2001 From: lirokoa Date: Sun, 11 May 2014 09:26:49 +0200 Subject: [PATCH 03/17] Fix build --- selinux/file.te | 1 - 1 file changed, 1 deletion(-) diff --git a/selinux/file.te b/selinux/file.te index 2a01dac..9d1d823 100644 --- a/selinux/file.te +++ b/selinux/file.te @@ -1,5 +1,4 @@ type firmware_mfc, file_type; type firmware_camera, file_type; -type camera_data_file, file_type, data_file_type; type sensors_data_file, file_type, data_file_type; From 768a5d795650b9cffbaf452f74bd46e6a9bf9028 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Tue, 11 Nov 2014 09:37:26 +0100 Subject: [PATCH 04/17] cleanup --- BoardConfig.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index ae442da..8bc8987 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -18,10 +18,6 @@ -include device/samsung/n80xx-common/BoardConfigCommon.mk # Inline kernel building -#FIXME NOT READY YET - NEEDS DEFCONFIG -#TARGET_KERNEL_SOURCE := kernel/samsung/n8000 -#TARGET_KERNEL_CONFIG := cyanogenmod_n8013_defconfig - TARGET_KERNEL_SOURCE := kernel/samsung/smdk4412 TARGET_KERNEL_CONFIG := cyanogenmod_n8013_defconfig @@ -45,4 +41,5 @@ BOARD_SEPOLICY_UNION := \ rild.te \ system.te \ ueventd.te \ + vold.te \ wpa_supplicant.te From 04f7eee9f11269b686a415738e9b443597d515c6 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Tue, 11 Nov 2014 09:37:55 +0100 Subject: [PATCH 05/17] Fix makefile call order --- n8013.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/n8013.mk b/n8013.mk index de5270d..a923587 100644 --- a/n8013.mk +++ b/n8013.mk @@ -14,8 +14,6 @@ # limitations under the License. # -$(call inherit-product, device/samsung/n80xx-common/n80xx-common.mk) - LOCAL_PATH := device/samsung/n8013 DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay @@ -37,3 +35,5 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/samsung/n8013/configs/gps.conf:system/etc/gps.conf \ device/samsung/n8013/configs/gps.xml:system/etc/gps.xml + +$(call inherit-product, device/samsung/n80xx-common/n80xx-common.mk) \ No newline at end of file From a4565fae6b3e6b0aed68ec74bafee5c81f16e693 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Tue, 11 Nov 2014 09:38:26 +0100 Subject: [PATCH 06/17] SeLinux changes --- selinux/device.te | 1 + selinux/file.te | 1 + selinux/file_contexts | 10 ++++++++++ selinux/mediaserver.te | 5 +++++ selinux/system.te | 5 +++-- selinux/ueventd.te | 5 ++++- selinux/vold.te | 2 ++ 7 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 selinux/vold.te diff --git a/selinux/device.te b/selinux/device.te index cca8ee1..8fc8105 100644 --- a/selinux/device.te +++ b/selinux/device.te @@ -1,3 +1,4 @@ type mali_device, dev_type, mlstrustedobject; type rfkill_device, dev_type; type efs_block_device, dev_type; + diff --git a/selinux/file.te b/selinux/file.te index 9d1d823..eac0631 100644 --- a/selinux/file.te +++ b/selinux/file.te @@ -2,3 +2,4 @@ type firmware_mfc, file_type; type firmware_camera, file_type; type sensors_data_file, file_type, data_file_type; +type volume_data_file, file_type, data_file_type; \ No newline at end of file diff --git a/selinux/file_contexts b/selinux/file_contexts index 00dc343..037faae 100644 --- a/selinux/file_contexts +++ b/selinux/file_contexts @@ -3,6 +3,13 @@ /dev/ump u:object_r:mali_device:s0 /dev/fimg2d u:object_r:mali_device:s0 +# RIL +/dev/umts_boot0 u:object_r:radio_device:s0 +/dev/umts_boot1 u:object_r:radio_device:s0 +/dev/umts_ipc0 u:object_r:radio_device:s0 +/dev/umts_ramdump0 u:object_r:radio_device:s0 +/dev/umts_rfs0 u:object_r:radio_device:s0 + /dev/block/mmcblk0p7 u:object_r:efs_block_device:s0 # Camera @@ -28,3 +35,6 @@ /system/vendor/firmware(/.*)? u:object_r:firmware_camera:s0 /system/vendor/firmware/mfc_fw.bin u:object_r:firmware_mfc:s0 /data/cfw(/.*)? u:object_r:firmware_camera:s0 + +# Vibrator +/dev/tspdrv u:object_r:input_device:s0 \ No newline at end of file diff --git a/selinux/mediaserver.te b/selinux/mediaserver.te index 520da3a..1d257fd 100644 --- a/selinux/mediaserver.te +++ b/selinux/mediaserver.te @@ -1,3 +1,8 @@ allow mediaserver { firmware_camera }:file r_file_perms; allow mediaserver firmware_camera:dir r_dir_perms; allow mediaserver camera_data_file:file rw_file_perms; +allow mediaserver volume_data_file:file create_file_perms; +allow mediaserver volume_data_file:dir create_dir_perms; + +# Bluetooth audio +allow mediaserver bluetooth:unix_stream_socket { connectto }; \ No newline at end of file diff --git a/selinux/system.te b/selinux/system.te index 48fe03e..30e3b47 100644 --- a/selinux/system.te +++ b/selinux/system.te @@ -1,10 +1,11 @@ -# allow system uinput_device:chr_file { read ioctl write open }; +allow system input_device:chr_file { read ioctl write open }; allow system sensors_device:chr_file { read open }; allow system sensors_data_file:file r_file_perms; allow system wpa_socket:unix_dgram_socket sendto; +allow system_app volume_data_file:file { read write open getattr }; allow system sysfs:file { read open write }; allow system self:capability { sys_module }; # /efs/wifi/.mac.info -allow system wifi_data_file:file { read open }; +allow system wifi_data_file:file { read open }; \ No newline at end of file diff --git a/selinux/ueventd.te b/selinux/ueventd.te index 4037e57..b439a67 100644 --- a/selinux/ueventd.te +++ b/selinux/ueventd.te @@ -1,3 +1,6 @@ -# Firmwares +# MFC firmware allow ueventd { firmware_mfc }:file r_file_perms; + +# Camera related firmwares allow ueventd { firmware_camera }:dir search; +allow ueventd { firmware_camera }:file r_file_perms; \ No newline at end of file diff --git a/selinux/vold.te b/selinux/vold.te new file mode 100644 index 0000000..9452abf --- /dev/null +++ b/selinux/vold.te @@ -0,0 +1,2 @@ +allow vold kernel:process setsched; +allow vold sdcardd_exec:file { read open execute execute_no_trans }; From 99b6930b847854529d2561a8bd8298f9db123fd0 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Mon, 17 Nov 2014 20:45:03 +0100 Subject: [PATCH 07/17] Temporary disable selinux --- BoardConfig.mk | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index 8bc8987..5b363eb 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -28,18 +28,18 @@ TARGET_OTA_ASSERT_DEVICE := c0,p4notewifi,p4notewifiww,n8013,GT-N8013 BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/n8013/bluetooth # Selinux -BOARD_SEPOLICY_DIRS := \ - device/samsung/n8013/selinux +# BOARD_SEPOLICY_DIRS := \ +# device/samsung/n8013/selinux -BOARD_SEPOLICY_UNION := \ - device.te \ - domain.te \ - file.te \ - file_contexts \ - init.te \ - mediaserver.te \ - rild.te \ - system.te \ - ueventd.te \ - vold.te \ - wpa_supplicant.te +# BOARD_SEPOLICY_UNION := \ +# device.te \ +# domain.te \ +# file.te \ +# file_contexts \ +# init.te \ +# mediaserver.te \ +# rild.te \ +# system.te \ +# ueventd.te \ +# vold.te \ +# wpa_supplicant.te From 994d5eaeb5b45c3a21979b2ee5948274f0c1ab1d Mon Sep 17 00:00:00 2001 From: lirokoa Date: Tue, 13 Jan 2015 18:09:43 +0100 Subject: [PATCH 08/17] tiny_hw.xml is now copied in common repo --- n8013.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/n8013.mk b/n8013.mk index a923587..465de25 100644 --- a/n8013.mk +++ b/n8013.mk @@ -23,9 +23,6 @@ DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay PRODUCT_COPY_FILES += \ device/samsung/n8013/rootdir/init.target.rc:root/init.target.rc -# Audio -PRODUCT_COPY_FILES += \ - device/samsung/n80xx-common/configs/tiny_hw.xml:system/etc/sound/GT-N8013 # These are the hardware-specific features PRODUCT_COPY_FILES += \ From e84ed7dade01babbac9c6af45e302ad987b9376d Mon Sep 17 00:00:00 2001 From: lirokoa Date: Sun, 8 Feb 2015 10:21:41 +0100 Subject: [PATCH 09/17] remove tvout dummy --- rootdir/init.target.rc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index 004e52a..d099bb3 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -32,9 +32,4 @@ service dmb /system/bin/dmbserver #service TvoutService_C /system/bin/bintvoutservice # class main # user system -# group graphics - -service SecTVOutService /system/bin/TVOutDummy - class main - group graphics - oneshot +# group graphics \ No newline at end of file From dbf361bf774e533019884e4d7dc8c27d1f8467e9 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Fri, 20 Mar 2015 17:11:11 +0100 Subject: [PATCH 10/17] update gps server --- configs/gps.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/gps.xml b/configs/gps.xml index 1e74b52..8995c80 100644 --- a/configs/gps.xml +++ b/configs/gps.xml @@ -36,7 +36,7 @@ LbsEnable="false" LbsLocal="false" - LbsServer="BCMLS2.glpals.com" + LbsServer="gllto.glpals.com/7day/glo/v2/latest/" LbsPort="7275" LbsSyncLto="false" SyncLto="true" From d0acb7e465f99a3837867b557e6acecd82959366 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Sat, 4 Apr 2015 17:02:23 +0200 Subject: [PATCH 11/17] Remove obsolete selinux rules --- BoardConfig.mk | 17 ----------------- selinux/device.te | 4 ---- selinux/domain.te | 2 -- selinux/file.te | 5 ----- selinux/file_contexts | 40 --------------------------------------- selinux/init.te | 1 - selinux/mediaserver.te | 8 -------- selinux/rild.te | 7 ------- selinux/system.te | 11 ----------- selinux/ueventd.te | 6 ------ selinux/vold.te | 2 -- selinux/wpa_supplicant.te | 10 ---------- 12 files changed, 113 deletions(-) delete mode 100644 selinux/device.te delete mode 100644 selinux/domain.te delete mode 100644 selinux/file.te delete mode 100644 selinux/file_contexts delete mode 100644 selinux/init.te delete mode 100644 selinux/mediaserver.te delete mode 100644 selinux/rild.te delete mode 100644 selinux/system.te delete mode 100644 selinux/ueventd.te delete mode 100644 selinux/vold.te delete mode 100644 selinux/wpa_supplicant.te diff --git a/BoardConfig.mk b/BoardConfig.mk index 5b363eb..36a421a 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -26,20 +26,3 @@ TARGET_OTA_ASSERT_DEVICE := c0,p4notewifi,p4notewifiww,n8013,GT-N8013 #Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/n8013/bluetooth - -# Selinux -# BOARD_SEPOLICY_DIRS := \ -# device/samsung/n8013/selinux - -# BOARD_SEPOLICY_UNION := \ -# device.te \ -# domain.te \ -# file.te \ -# file_contexts \ -# init.te \ -# mediaserver.te \ -# rild.te \ -# system.te \ -# ueventd.te \ -# vold.te \ -# wpa_supplicant.te diff --git a/selinux/device.te b/selinux/device.te deleted file mode 100644 index 8fc8105..0000000 --- a/selinux/device.te +++ /dev/null @@ -1,4 +0,0 @@ -type mali_device, dev_type, mlstrustedobject; -type rfkill_device, dev_type; -type efs_block_device, dev_type; - diff --git a/selinux/domain.te b/selinux/domain.te deleted file mode 100644 index 26e8033..0000000 --- a/selinux/domain.te +++ /dev/null @@ -1,2 +0,0 @@ -## /dev/mali, /dev/ump -allow domain mali_device:chr_file rw_file_perms; diff --git a/selinux/file.te b/selinux/file.te deleted file mode 100644 index eac0631..0000000 --- a/selinux/file.te +++ /dev/null @@ -1,5 +0,0 @@ -type firmware_mfc, file_type; -type firmware_camera, file_type; - -type sensors_data_file, file_type, data_file_type; -type volume_data_file, file_type, data_file_type; \ No newline at end of file diff --git a/selinux/file_contexts b/selinux/file_contexts deleted file mode 100644 index 037faae..0000000 --- a/selinux/file_contexts +++ /dev/null @@ -1,40 +0,0 @@ -# GFX -/dev/mali u:object_r:mali_device:s0 -/dev/ump u:object_r:mali_device:s0 -/dev/fimg2d u:object_r:mali_device:s0 - -# RIL -/dev/umts_boot0 u:object_r:radio_device:s0 -/dev/umts_boot1 u:object_r:radio_device:s0 -/dev/umts_ipc0 u:object_r:radio_device:s0 -/dev/umts_ramdump0 u:object_r:radio_device:s0 -/dev/umts_rfs0 u:object_r:radio_device:s0 - -/dev/block/mmcblk0p7 u:object_r:efs_block_device:s0 - -# Camera -/data/ISP_CV u:object_r:camera_data_file:s0 -/dev/exynos-mem u:object_r:video_device:s0 - -# Bluetooth -/dev/ttySAC0 u:object_r:hci_attach_dev:s0 -/efs/bluetooth/(/.*)? u:object_r:bluetooth_efs_file:s0 - -# GPS -/dev/ttySAC1 u:object_r:gps_device:s0 - -# Sensors -/dev/akm8975 u:object_r:sensors_device:s0 -/efs/gyro_cal_data u:object_r:sensors_data_file:s0 - -# Wifi -/dev/rfkill u:object_r:rfkill_device:s0 -/efs/wifi/.mac.info u:object_r:wifi_data_file:s0 - -# Firmwares -/system/vendor/firmware(/.*)? u:object_r:firmware_camera:s0 -/system/vendor/firmware/mfc_fw.bin u:object_r:firmware_mfc:s0 -/data/cfw(/.*)? u:object_r:firmware_camera:s0 - -# Vibrator -/dev/tspdrv u:object_r:input_device:s0 \ No newline at end of file diff --git a/selinux/init.te b/selinux/init.te deleted file mode 100644 index 3f11893..0000000 --- a/selinux/init.te +++ /dev/null @@ -1 +0,0 @@ -allow init wpa_socket:unix_dgram_socket { bind create }; diff --git a/selinux/mediaserver.te b/selinux/mediaserver.te deleted file mode 100644 index 1d257fd..0000000 --- a/selinux/mediaserver.te +++ /dev/null @@ -1,8 +0,0 @@ -allow mediaserver { firmware_camera }:file r_file_perms; -allow mediaserver firmware_camera:dir r_dir_perms; -allow mediaserver camera_data_file:file rw_file_perms; -allow mediaserver volume_data_file:file create_file_perms; -allow mediaserver volume_data_file:dir create_dir_perms; - -# Bluetooth audio -allow mediaserver bluetooth:unix_stream_socket { connectto }; \ No newline at end of file diff --git a/selinux/rild.te b/selinux/rild.te deleted file mode 100644 index 7f817d0..0000000 --- a/selinux/rild.te +++ /dev/null @@ -1,7 +0,0 @@ -allow rild self:netlink_socket { create bind read write }; -allow rild self:netlink_route_socket { write }; -allow rild self:netlink_kobject_uevent_socket { create bind read write setopt }; - -allow rild radio_device:chr_file rw_file_perms; -allow rild efs_block_device:blk_file rw_file_perms; -allow rild efs_file:file { read open write setattr }; diff --git a/selinux/system.te b/selinux/system.te deleted file mode 100644 index 30e3b47..0000000 --- a/selinux/system.te +++ /dev/null @@ -1,11 +0,0 @@ -allow system input_device:chr_file { read ioctl write open }; -allow system sensors_device:chr_file { read open }; -allow system sensors_data_file:file r_file_perms; -allow system wpa_socket:unix_dgram_socket sendto; -allow system_app volume_data_file:file { read write open getattr }; - -allow system sysfs:file { read open write }; -allow system self:capability { sys_module }; - -# /efs/wifi/.mac.info -allow system wifi_data_file:file { read open }; \ No newline at end of file diff --git a/selinux/ueventd.te b/selinux/ueventd.te deleted file mode 100644 index b439a67..0000000 --- a/selinux/ueventd.te +++ /dev/null @@ -1,6 +0,0 @@ -# MFC firmware -allow ueventd { firmware_mfc }:file r_file_perms; - -# Camera related firmwares -allow ueventd { firmware_camera }:dir search; -allow ueventd { firmware_camera }:file r_file_perms; \ No newline at end of file diff --git a/selinux/vold.te b/selinux/vold.te deleted file mode 100644 index 9452abf..0000000 --- a/selinux/vold.te +++ /dev/null @@ -1,2 +0,0 @@ -allow vold kernel:process setsched; -allow vold sdcardd_exec:file { read open execute execute_no_trans }; diff --git a/selinux/wpa_supplicant.te b/selinux/wpa_supplicant.te deleted file mode 100644 index ab5fb24..0000000 --- a/selinux/wpa_supplicant.te +++ /dev/null @@ -1,10 +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_socket wifi_data_file:sock_file unlink; -allow wpa rfkill_device:chr_file rw_file_perms; \ No newline at end of file From 44ddc7c2f3942d20bb4e506d9151a858451cba9c Mon Sep 17 00:00:00 2001 From: lirokoa Date: Sat, 4 Apr 2015 17:05:44 +0200 Subject: [PATCH 12/17] Allow flashing on n8010 --- BoardConfig.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index 36a421a..674d01f 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -22,7 +22,7 @@ TARGET_KERNEL_SOURCE := kernel/samsung/smdk4412 TARGET_KERNEL_CONFIG := cyanogenmod_n8013_defconfig # assert -TARGET_OTA_ASSERT_DEVICE := c0,p4notewifi,p4notewifiww,n8013,GT-N8013 +TARGET_OTA_ASSERT_DEVICE := c0,p4notewifi,p4notewifiww,n8013,GT-N8013,n8010,GT-N8010 #Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/n8013/bluetooth From 3d2ac44c386d4011ef3c8dfb0927d8c60edb3d4d Mon Sep 17 00:00:00 2001 From: lirokoa Date: Mon, 20 Apr 2015 18:38:40 +0200 Subject: [PATCH 13/17] Update for selinux - do not use logwrapper for gpsd - restore some files security attribute in /efs --- rootdir/init.target.rc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index d099bb3..357c4d0 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -6,6 +6,24 @@ on post-fs-data # make param block device link for SysScope symlink /dev/block/mmcblk0p4 /dev/block/param + # Restorecon + restorecon /efs + restorecon /efs/nv_data.bin + restorecon /efs/nv_data.bin.md5 + restorecon /efs/.nv_core.bak + restorecon /efs/.nv_core.bak.md5 + restorecon /efs/.nv_data.bak + restorecon /efs/.nv_data.bak.md5 + restorecon /efs/.nv_state + restorecon /efs/bluetooth/bt_addr + restorecon /efs/FactoryApp/factorymode + restorecon /efs/FactoryApp/hw_ver + restorecon /efs/FactoryApp/keystr + restorecon /efs/FactoryApp/serial_no + restorecon /efs/imei/mps_code.dat + restorecon /efs/gyro_cal_data + restorecon /efs/wifi/.mac.info + on boot setprop ro.radio.noril yes @@ -17,12 +35,13 @@ service icd /system/bin/icd onrestart exec icd_check # GPS -service gpsd /system/bin/logwrapper /system/bin/gpsd -c /system/etc/gps.xml +service gpsd /system/bin/gpsd -c /system/etc/gps.xml class main socket gps seqpacket 0660 gps system user gps group system inet sdcard_rw - + seclabel u:r:gpsd:s0 + service dmb /system/bin/dmbserver class main user system From a0f1fdcb713a5446b81eb8d00c06f34aac692d61 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Thu, 15 Oct 2015 18:07:27 +0200 Subject: [PATCH 14/17] selinux: use restorecon_recursive --- rootdir/init.target.rc | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc index 357c4d0..9f79f6e 100644 --- a/rootdir/init.target.rc +++ b/rootdir/init.target.rc @@ -7,23 +7,8 @@ on post-fs-data symlink /dev/block/mmcblk0p4 /dev/block/param # Restorecon - restorecon /efs - restorecon /efs/nv_data.bin - restorecon /efs/nv_data.bin.md5 - restorecon /efs/.nv_core.bak - restorecon /efs/.nv_core.bak.md5 - restorecon /efs/.nv_data.bak - restorecon /efs/.nv_data.bak.md5 - restorecon /efs/.nv_state - restorecon /efs/bluetooth/bt_addr - restorecon /efs/FactoryApp/factorymode - restorecon /efs/FactoryApp/hw_ver - restorecon /efs/FactoryApp/keystr - restorecon /efs/FactoryApp/serial_no - restorecon /efs/imei/mps_code.dat - restorecon /efs/gyro_cal_data - restorecon /efs/wifi/.mac.info - + restorecon_recursive /efs + on boot setprop ro.radio.noril yes From 84e61afafd5ac33511f602517cdd19f6f2e21df0 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Fri, 20 Nov 2015 17:48:02 +0100 Subject: [PATCH 15/17] kang gps from nexus 10 --- configs/gps.conf | 5 ----- configs/gps.xml | 26 +++++++++----------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/configs/gps.conf b/configs/gps.conf index 21fa8b4..4822c31 100644 --- a/configs/gps.conf +++ b/configs/gps.conf @@ -1,6 +1 @@ -NTP_SERVER=north-america.pool.ntp.org XTRA_SERVER_1=http://gllto.glpals.com/7day/glo/v2/latest/lto2.dat -XTRA_SERVER_2=http://gllto.glpals.com/7day/glo/v2/latest/lto2.dat -XTRA_SERVER_3=http://gllto.glpals.com/7day/glo/v2/latest/lto2.dat -SUPL_HOST=supl.google.com -SUPL_PORT=7276 diff --git a/configs/gps.xml b/configs/gps.xml index 8995c80..6497d53 100644 --- a/configs/gps.xml +++ b/configs/gps.xml @@ -1,5 +1,5 @@  - + - - - + \ No newline at end of file From 1bdba0fce8a4ae94f4ebc5a7bcbf9aa847480519 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Fri, 27 Nov 2015 18:17:20 +0100 Subject: [PATCH 16/17] remove obsolete prop --- system.prop | 1 - 1 file changed, 1 deletion(-) diff --git a/system.prop b/system.prop index 838ef90..dfb491c 100644 --- a/system.prop +++ b/system.prop @@ -1,6 +1,5 @@ # # system.prop for smdk4x12 # -dalvik.vm.dexopt-data-only=1 ro.sf.lcd_density=160 ro.lcd_min_brightness=20 From 0c6ad8334bfbe5571d18d23f0fbd40a34725c043 Mon Sep 17 00:00:00 2001 From: lirokoa Date: Sun, 13 Dec 2015 10:05:45 +0100 Subject: [PATCH 17/17] add ro.cm.hardware.cabc to get adaptive backlight support --- system.prop | 1 + 1 file changed, 1 insertion(+) diff --git a/system.prop b/system.prop index dfb491c..ec42c2f 100644 --- a/system.prop +++ b/system.prop @@ -3,3 +3,4 @@ # ro.sf.lcd_density=160 ro.lcd_min_brightness=20 +ro.cm.hardware.cabc=/sys/class/mdnie/mdnie/cabc \ No newline at end of file