Skip to content

Instantly share code, notes, and snippets.

@fat-tire
Last active June 24, 2018 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fat-tire/6cd2fe44892c2fa82fb44d215660ba07 to your computer and use it in GitHub Desktop.
Save fat-tire/6cd2fe44892c2fa82fb44d215660ba07 to your computer and use it in GitHub Desktop.
SetEnforcing stuff for _mone (for TMO)
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index f8bbbcd..75c1858 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -42,7 +42,6 @@ BOARD_HARDWARE_CLASS += $(DEVICE_PATH)/lineagehw
EXTENDED_FONT_FOOTPRINT := true
# Kernel
-BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_RAMDISK_OFFSET := 0x02600000
BOARD_KERNEL_TAGS_OFFSET := 0x02400000
BOARD_SECOND_OFFSET := 0x00f00000
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 7ba6d60..0a92d2b 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -1196,8 +1196,9 @@ on boot
# Permission for Input Device(Wacom).
chmod 0660 /sys/class/input/input4/enabled
- chown system system /sys/class/input/input4/enabled
- chown system system /sys/class/input/input18/enabled
+ chown system input /sys/class/input/input4/enabled
+ chmod 0660 /sys/class/input/input18/enabled
+ chown system input /sys/class/input/input18/enabled
# Permissions for bluetooth.
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 4d10bee..c45f82a 100755
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -83,7 +83,7 @@
/sys/devices/battery.[0-9]+/power_supply/battery(/.*)? u:object_r:sysfs_batteryinfo:s0
/sys/devices/fd900000.qcom,mdss_mdp/caps u:object_r:sysfs_hal_gralloc:s0
/sys/devices/fd900000.qcom,mdss_mdp/power/runtime_status u:object_r:sysfs_runtime_status:s0
-/sys/devices/qcom,mdm1.[0-9]+/esoc[0-9](/.*)? u:object_r:sysfs_esoc:s0
+/sys/devices/qcom,mdm[01].[0-9]+/esoc[0-9](/.*)? u:object_r:sysfs_esoc:s0
/sys/devices/virtual/graphics/fb[0-2]/msm_.* u:object_r:sysfs_hal_gralloc:s0
/sys/module/dhd/parameters/firmware_path u:object_r:sysfs_wifi_writeable:s0
/sys/module/dhd/parameters/nvram_path u:object_r:sysfs_wifi_writeable:s0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment