Compare commits

...

122 Commits

Author SHA1 Message Date
Michael Bestas
fb88e713de Merge tag 'LA.UM.5.6.r1-06200-89xx.0' of https://source.codeaurora.org/quic/la/device/qcom/sepolicy into cm-14.1
"LA.UM.5.6.r1-06200-89xx.0"

Change-Id: Icd2461e1cdba6cca1d87e760997fd4d4e0a1fb7f
2017-11-07 17:49:38 +02:00
Linux Build Service Account
74cb1ef8b3 Merge a2654fb218 on remote branch
Change-Id: Ic2b52fc22300802131cf117c434e146fe971ff75
2017-09-04 02:25:20 -06:00
Michael Bestas
96615af72e msm8974: Do not grant DAC override permission to netmgrd
* This permission was added in commit 9e0da1f by us,
  but there is a better solution.
* Grant netmgrd proper unix perms instead:
  I7ed6a98dd85bf7efa8cab0b8a0851217f030ba8b

Change-Id: Ibd77e450a0dbd281b2fc148bbd01e12b715878d6
2017-08-18 13:26:58 +00:00
Michael Bestas
c6318194ad Use set_prop() macro for property sets
Change-Id: Id67a05f8ed718cad5856613c2700f4ce1e404cf0
2017-08-18 13:26:34 +00:00
Linux Build Service Account
a2654fb218 Promotion of sepolicy.lnx.2.0.c2-00038.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1080155   Iaed538768fc5747cc1b53d03dec79dce85752150   sepolicy:perfd.te Allow sending signull to mediacodec

Change-Id: I7a7a3d56fb98b785c6bbf36fc154308ef2c639ce
CRs-Fixed: 1080155
2017-08-08 23:31:13 -06:00
Dilip Gudlur
3785c09f86 sepolicy:perfd.te Allow sending signull to mediacodec
Allow Perfd to send signull to mediacodec.

Change-Id: Iaed538768fc5747cc1b53d03dec79dce85752150
2017-08-03 23:56:40 -07:00
Rashed Abdel-Tawab
415717e1ff sepolicy: Add qpnp-smbcharger battery supply contexts
Change-Id: Ie1013f1b4913f1983ed65d89393dea066a06073b
2017-08-03 01:07:22 -04:00
Rashed Abdel-Tawab
6ff8a5feb6 sepolicy: Add new dc_supply sysfs
There currently exists battery_supply and usb_supply sysfs contexts,
however these only apply to, well, battery and USB power sources. A
growing number of devices have power supplies that are not qualified
under either, which are normal DC power supplies, so add a new context
for these power supplies.

Change-Id: I6087511e229c62d896b4d129406a9aa4f858fa4f
2017-08-03 01:06:43 -04:00
Rashed Abdel-Tawab
08a5a428fd sepolicy: Allow untrusted_apps to read usb power supply stats
Change-Id: Ia3bb6e066eb316b53c3f2cbaf441189354b79110
2017-07-30 23:38:56 -04:00
Linux Build Service Account
40e2d41963 Merge dceea78581 on remote branch
Change-Id: I0a277eed1e52a0436ce30c75feae667971a84ff2
2017-05-28 05:38:00 -06:00
Linux Build Service Account
dceea78581 Promotion of sepolicy.lnx.2.0.c2-00025.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
2033666   If9ac8bcde090f50a6419355926a55dba67891e47   Add permission to SSR Ramdump
2037722   If6069ddb60b77254f211fd21dc1cdf8704368896   Add QDSS permission for LK3
2003168   I7ca8ccb5880de0970301763b0ca3950a474c07db   sepolicy: Allow audioserver to access DTS files
1092439   Iea02ca128d58592a0e5c21d71f098ad39fd7a8dc   sepolicy: Allow wfdservice read permission

Change-Id: Ib0b9e120c564f5bb7bbba41e65195a12e52602c6
CRs-Fixed: 1092439, 2003168, 2037722, 2033666
2017-05-09 23:41:58 -06:00
Mathew Winn
bfc1ded484 Add QDSS permission for LK3
Add permission to /dev/coresight-tmc-etr

Change-Id: If6069ddb60b77254f211fd21dc1cdf8704368896
CRs-Fixed: 2037722
2017-04-27 08:43:03 -07:00
Mathew Winn
04c254a0bb Add permission to SSR Ramdump
Allow system apps to read SSR Ramdumps

Change-Id: If9ac8bcde090f50a6419355926a55dba67891e47
CRs-Fixed: 2033666
2017-04-18 08:56:55 -07:00
Gabriele M
e4fb9eaefc Bluetooth: Remove stray characters
Remove the invisible and invalid M-BM- characters from these rules.

Change-Id: Ia8e3c10f51ebab86319287e31430856fbf3182b4
2017-02-16 23:52:05 +01:00
Divya Narayanan Poojary
c538c59df4 sepolicy: Allow audioserver to access DTS files
Allow audioserver to access dts files

CRs-Fixed: 2003168
Change-Id: I7ca8ccb5880de0970301763b0ca3950a474c07db
2017-02-10 03:51:45 -08:00
Linux Build Service Account
d891dafd4d Merge 016fdf5810 on remote branch
Change-Id: Ib0ae2f082fe7231d15b97a3a8378e1d984690986
2017-01-31 10:10:45 -07:00
Manu Prasad
e52bc9ce8a sepolicy: Allow wfdservice read permission
-- Allow wfdservice read permission for
    media_msm8956hw property file. This is
    needed because there will be an selinux
    denial when wfd session is run.

 -- This denial is created because wfdservice
    uses omx encoder instance and video side
    selinux changes use this property file to
    distinguish access to mediacodecs.xml between
    8952 and 8976 targets

CRs-Fixed: 1092439
Change-Id: Iea02ca128d58592a0e5c21d71f098ad39fd7a8dc
2017-01-31 03:38:53 -08:00
Linux Build Service Account
016fdf5810 Promotion of sepolicy.lnx.2.0.c2-00014.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1114393   Ic68fc09157028e239c5ef7e9b1c59a26a3e646aa   sepolicy: Allow init.qcom.sh script to media setprop's
1113768   I25031537388b787fffa098b80a46e89c962f0321   Sepolicy: allow ipacm to execute shell commands
1076039   I37b824c7147522905966f4df5d8dabc38ef17871   RCS:  Added RCS Service to radio group
1094709   I7ef43bf0f3f6499cd9036c5b97f7ff2d4e06a91a   sepolicy: remove redundant dolby.audio policy

Change-Id: I3dd53da74a6944207a0c691499e8f46746638677
CRs-Fixed: 1076039, 1113768, 1094709, 1114393
2017-01-28 04:52:43 -07:00
Linux Build Service Account
587f9f2aa0 Merge "sepolicy: Allow init.qcom.sh script to media setprop's" 2017-01-27 10:02:04 -08:00
Surajit Podder
8665ba919a sepolicy: Allow init.qcom.sh script to media setprop's
Define media.msm8953.version and media.settings.xml to choose
target specific media_codecs.xml and media_profiles.xml
based on 8953 hw version.

Change-Id: Ic68fc09157028e239c5ef7e9b1c59a26a3e646aa
2017-01-27 09:33:03 +05:30
Linux Build Service Account
4d67869180 Merge "RCS: Added RCS Service to radio group" 2017-01-25 17:34:01 -08:00
Skylar Chang
4415fb0fb6 Sepolicy: allow ipacm to execute shell commands
allow ipacm to execute ip neighbor change

Change-Id: I25031537388b787fffa098b80a46e89c962f0321
2017-01-19 16:25:11 -08:00
Weiyin Jiang
afcd7159d9 sepolicy: remove redundant dolby.audio policy
Remove redundant dolby.audio.* policy entry which has already been
covered by dolby_prop.

CRs-Fixed: 1094709
Change-Id: I7ef43bf0f3f6499cd9036c5b97f7ff2d4e06a91a
2017-01-10 04:26:51 -08:00
Linux Build Service Account
b91b77e961 Merge deab094d01 on remote branch
Change-Id: Ic3ff513eb3b5ce37ca033c8c9bb335418799ad21
2017-01-09 04:14:24 -08:00
Michael Bestas
988a518c3b Merge tag 'LA.UM.5.5.r1-02200-8x96.0' of https://source.codeaurora.org/quic/la/device/qcom/sepolicy into cm-14.1
"LA.UM.5.5.r1-02200-8x96.0"

Change-Id: Ib0496c25c7a1dc2ea988f219c0ba12d0eda6623c
2017-01-02 02:00:30 +02:00
Linux Build Service Account
0098e9b2d7 Promotion of sepolicy.lnx.2.0.c2-00010.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
972360   I196849c53f5d88d08ccdf8af46e81bd04fbd05fa   sepolicy : add allow rule for system_server to write to

Change-Id: Ieb0e089d5568454f7b67c58dac3073dbfe7db6a2
CRs-Fixed: 972360
2016-12-30 04:14:23 -07:00
Linux Build Service Account
deab094d01 Promotion of sepolicy.lnx.2.0.c2-00009.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1091297   I4018e89597ae43c4fe27900a4cd71b005cb48e8d   sepolicy: Allow wcnss_service to read /system
1084851   Iea63d584b4d0f0292bc2752a0a04a02eba40d59e   common: Add policy for bluetooth on FFBM
1094165   Ib7f054109cb2ad1a931fe218f343df821f5c4e57   sepolicy:Add rule for regional 3rd party apk
1100881   Ife3469070eef1b83cd9b208224e2e10ae7215222   sepolicy: allow thermal-engine to read GPU frequencies
1095151   Ic66f4228223396c50230f0496842703d1c063c61   sepolicy: Allow to set BService and DSR from post_boot
1094165   If55708bdd72bd753ecfb012ad2c267cec7f08a10   Sepolicy:Fix regionalization file context
1094165   I4d7be9ccbf5aed587cbe6b7f31786e64889c9194   sepolicy: Oemfs frameworks-res overlay permission
1074975   I1c56f6c7e61de10999d15bb2abc80e337247588b   wfd: Add access to gpu device for wfdservice

Change-Id: Ibb3b03bfa46203f98a326080a5cbc86a25c2080c
CRs-Fixed: 1084851, 1100881, 1091297, 1094165, 1074975, 1095151
2016-12-27 16:20:25 -07:00
Gaurav Singh
e118b92a62 sepolicy : add allow rule for system_server to write to /proc/pid/*
As part of game_trigger lib update we need system_server
to write to /proc/<pid>/sched_group_id

Change-Id: I196849c53f5d88d08ccdf8af46e81bd04fbd05fa
2016-12-27 07:08:52 -08:00
Ravi Kumar Siddojigari
de929244fa Merge commits from Rel to Dev branch
rel moved to NMR1 so back merge the changes to dev

Change-Id: I9bc810f6720314019a97caa9b74ff77ca61ca842
2016-12-26 15:45:37 +05:30
jinfaw
e6f26e47b9 Sepolicy:Fix regionalization file context
Fix /data/app-regional definition in file_contexts

Change-Id: If55708bdd72bd753ecfb012ad2c267cec7f08a10
CRs-Fixed: 1094165
2016-12-22 10:27:48 +08:00
Corinna Vinschen
d9d06c2c5b apq8084: Define qcal530_prop as property_type
A typo in apq8084 defines qcal530_prop as file_type.  This collides
with

  neverallow * ~property_type:property_service set;

in system/sepolicy/domain.te.

Change-Id: I2d16b84509d4c0f8d61c822795cd0da7e479c5cd
Signed-off-by: Corinna Vinschen <xda@vinschen.de>
2016-12-21 10:52:31 -08:00
Adhiti
457244ef0c RCS: Added RCS Service to radio group
Made RcsService as system service. And defined
rcsservice in sepolicy under radio group.

Change-Id: I37b824c7147522905966f4df5d8dabc38ef17871
CRs-Fixed: 1076039
2016-12-21 05:05:18 -08:00
Jonathan Wicks
514a4c4c50 sepolicy: allow thermal-engine to read GPU frequencies
thermal-engine needs access to the GPU frequencies sysfs node.

CRs-Fixed: 1100881
Change-Id: Ife3469070eef1b83cd9b208224e2e10ae7215222
2016-12-15 21:01:46 -08:00
Linux Build Service Account
69a487848c Merge "common: Add policy for bluetooth on FFBM" 2016-12-15 11:49:31 -08:00
Linux Build Service Account
625c892b55 Merge 98cbd210de on remote branch
Change-Id: I98fb04a3e1f2149d553eb6ec5084e2d92845a1d5
2016-12-15 03:13:25 -07:00
jinfaw
046e9af38d sepolicy: Oemfs frameworks-res overlay permission
In order to access frameworks-res overlay in oem partition,
should add read permssions for oemfs.

Change-Id: I4d7be9ccbf5aed587cbe6b7f31786e64889c9194
CRs-Fixed: 1094165
2016-12-12 17:43:52 -08:00
Michael Bestas
6bc0853659 Escape '.' character
Change-Id: I3d3c1c2d0c04f8dc77037cbf47ce7b1452fe8c33
2016-12-08 22:47:39 -08:00
Michael Bestas
820fe5f259 Add common rules for random MAC generation
* This is seen in many devices, put it here to avoid
  duplication in device trees

Change-Id: I5596eb500502adcff7ba79cd2c478eab0715a3cf
2016-12-08 09:59:16 -08:00
Suyog Sarda
c64be4fc30 sepolicy: Allow to set BService and DSR from post_boot
This change allows to set the BService and DSR properties
from post_boot.

Change-Id: Ic66f4228223396c50230f0496842703d1c063c61
2016-12-07 02:42:06 -08:00
Linux Build Service Account
03bfe54118 Merge b8a2712c80 on remote branch
Change-Id: Id3055f72ca84c70dbe4132eb408bedcdb6e1c85b
2016-12-06 13:53:07 -08:00
Naveen Kumar
98cbd210de Merge commit '6bd01160cce7f82819c32390439946253d5339f6' into remote
Conflicts:
	common/audioserver.te

Change-Id: I8702d676c63d274ebaad9ce924c2c2d6b87bfef0
2016-12-06 19:21:15 +05:30
Luca Stefani
32df817e75 Allow hci_qcomm_init /persist/.bt_nv.bin access
Change-Id: I332e25249d5e6e74ae1a082f6e9928e3b1fb11af
2016-12-06 05:29:00 -08:00
Michael Bestas
c62c6dd43f Allow qmuxd access diag
* Lots of older blobs need this, move the rule out
  of the 8974 folder

Change-Id: I6cf27622e7e93dd8addb53ecf5443f0e3222d9bb
2016-12-04 22:34:48 +02:00
Michael Bestas
46c74da9aa Readd support for old perfd socket
* This is still used by older 8916 blobs and possibly others,
  move the label out of the msm8974 folder and readd the old rules
* This essentially reverts 3173a8c8b8

Change-Id: I5c51052b3622e63a14f74600cdbb76d515001841
2016-12-04 22:34:33 +02:00
Michael Bestas
78700b45f6 Move bluetooth_loader sepolicy to common
* This can be also used by 8916 devices and possibly others,
  move it out of the msm8974 folder

Change-Id: Id36e890de99499dc964d88bbec9a7b6fbf758bca
2016-12-04 22:34:27 +02:00
Michael Bestas
05446e2fc7 Merge remote-tracking branch 'caf/LA.BR.1.2.9_rb1.9' into cm-14.1
Change-Id: Ib709cf3ca7c5a0536675aaeb0e63a4cc1f51d1cf
2016-12-04 22:34:15 +02:00
Deepak Kushwah
1f2b856f51 wfd: Add access to gpu device for wfdservice
The encoder running in wfdservice context requires access
to gpu device for retrieving YUV realated statistics

CRs-Fixed: 1074975

Change-Id: I1c56f6c7e61de10999d15bb2abc80e337247588b
2016-11-29 06:03:20 -08:00
Linux Build Service Account
a84b05d2e2 Merge "sepolicy:Add rule for regional 3rd party apk" 2016-11-29 05:38:39 -08:00
Linux Build Service Account
b8a2712c80 Promotion of sepolicy.lnx.2.0.c2-00004.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1078078   Ibd3198cc38e0446e1862b178f8d4c5ae8f8dc0c9   Add SELinux support for factory reset protection

Change-Id: If4ea0def1eb58613ab91f516cf4383ac53d0ee64
CRs-Fixed: 1078078
2016-11-28 23:37:06 -07:00
Linux Build Service Account
6bd01160cc Promotion of sepolicy.lnx.2.0-00049.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1086459   I9a32329e23363087b3a49baeeb3c3f8390a8116a   sepolicy:Add oemfs ruler for carrier switch
1093378   Ida1aa1a7714201e151c9e93ccc174adba09baa95   recovery: Allow recovery to set up adb in configfs based

Change-Id: Id1a4e524ae39929b84cb736825e7f52c770c44f2
CRs-Fixed: 1086459, 1093378
2016-11-28 07:51:07 -07:00
Linux Build Service Account
82fe979018 Merge "recovery: Allow recovery to set up adb in configfs based builds" 2016-11-25 22:39:39 -08:00
jinfaw
fccaf8d084 sepolicy:Add rule for regional 3rd party apk
Add rule for 3rd party apk under /data/app-regional

Change-Id: Ib7f054109cb2ad1a931fe218f343df821f5c4e57
CRs-Fixed: 1094165
2016-11-24 22:20:50 -08:00
jge
2d4d643c59 sepolicy: Allow wcnss_service to read /system
This is for wlan dynamic nv feature. The folder for
golden nv moves from /data/misc/wifi/nvbin to
/system/etc/wifi/nvbin, so the permission for
wcnss_service also needs change accordingly.

Change-Id: I4018e89597ae43c4fe27900a4cd71b005cb48e8d
CRs-Fixed: 1091297
2016-11-23 20:59:39 -08:00
Linux Build Service Account
c3564e7c49 Merge sepolicy.lnx.2.0-rel on remote branch
Change-Id: I3b5a84795c71bbab88061559bda00ce9102e6108
2016-11-23 02:02:50 -08:00
Linux Build Service Account
f93f5b8066 Merge "sepolicy: Added thermal engine access to audioserver" into LA.BR.1.2.9_rb1.9 2016-11-23 01:26:46 -08:00
Linux Build Service Account
eb096b43e6 Merge "sepolicy: allow writing firmware files in recovery mode." into LA.BR.1.2.9_rb1.9 2016-11-23 00:35:55 -08:00
Divya Narayanan Poojary
cab08e5968 sepolicy: Added thermal engine access to audioserver
audioserver needs to access thermal engine for
speaker calibration.

Change-Id: I141e8962b6e39ba8407b6e54710c31b9574a1b2b
CRs-fixed: 1086008
2016-11-23 00:20:03 -08:00
Sashidhar Ganiga
032f61ede2 sepolicy: allow writing firmware files in recovery mode.
FOTA upgrading requires writing firmware images into
vfat firmware partition in recovery mode.

Change-Id: I0bd61196ea7acf00582e58980aaeb3cf5128aa7a
2016-11-22 23:47:14 -08:00
Shaheda Begum
593565ba42 Add SELinux support for factory reset protection
Map factory reset protection into SELinux sepolicy/file_contexts

Change-Id: Ibd3198cc38e0446e1862b178f8d4c5ae8f8dc0c9
CRs-Fixed: 1078078
2016-11-22 23:44:23 -08:00
Linux Build Service Account
b026863a28 Merge AU_LINUX_ANDROID_LA.BR.1.2.9_RB1.07.00.00.254.013 on remote branch
Change-Id: I38201ad208285a861cbc45f3336db6d3ff9c7d88
2016-11-22 13:54:43 -08:00
taozhang
1e19a757bc common: Add policy for bluetooth on FFBM
Add policy for bluetooth on FFBM. Because the application "bdt" has
been modified, fastmmi need add new SELinux policy to call it.

CRs-Fixed: 1084851

Change-Id: Iea63d584b4d0f0292bc2752a0a04a02eba40d59e
2016-11-21 22:29:59 -08:00
Ameya Thakur
ccd3f23dfd recovery: Allow recovery to set up adb in configfs based builds
recovery now has the necessary permissions to configure adb for
configfs based builds.

Change-Id: Ida1aa1a7714201e151c9e93ccc174adba09baa95
2016-11-21 18:04:12 -08:00
Linux Build Service Account
5187e9bce5 Merge 1b19a8b7b6 on remote branch
Change-Id: I3f4745b04d4078cb1f10f7aa4bad599628a61612
2016-11-21 13:26:15 -08:00
Linux Build Service Account
96ddca02f1 Promotion of sepolicy.lnx.2.0.c2-00003.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1086008   I141e8962b6e39ba8407b6e54710c31b9574a1b2b   sepolicy: Added thermal engine access to audioserver
1068322   I0bd61196ea7acf00582e58980aaeb3cf5128aa7a   sepolicy: allow writing firmware files in recovery mode.
1078078   I721f2d7deb4dbe89a8c3fb5ed8e9413cd58ce428   Add SELinux support for factory reset protection

Change-Id: I8bde9a5c31a82a342e632f6a6d415b3d3f9b184f
CRs-Fixed: 1086008, 1078078, 1068322
2016-11-20 23:13:41 -07:00
jinfaw
6741de8fc6 sepolicy:Add oemfs ruler for carrier switch
1.Carrier overlay apk could be found and loaded in oemfs
  2.Carrier Link file could be found in oemfs,such as "lib.so.link"

Change-Id: I9a32329e23363087b3a49baeeb3c3f8390a8116a
CRs-Fixed: 1086459
2016-11-18 01:04:53 -08:00
Shaheda Begum
aca10f89bf Add SELinux support for factory reset protection
Map factory reset protection into SELinux sepolicy/file_contexts

Change-Id: Ibd3198cc38e0446e1862b178f8d4c5ae8f8dc0c9
CRs-Fixed: 1078078
2016-11-17 23:45:16 -08:00
Linux Build Service Account
276756874f Merge "sepolicy: Added thermal engine access to audioserver" 2016-11-17 21:16:59 -08:00
Linux Build Service Account
27db3c2be9 Merge "Add SELinux support for factory reset protection" 2016-11-17 03:06:41 -08:00
Divya Narayanan Poojary
a5839aa81c sepolicy: Added thermal engine access to audioserver
audioserver needs to access thermal engine for
speaker calibration.

Change-Id: I141e8962b6e39ba8407b6e54710c31b9574a1b2b
CRs-fixed: 1086008
2016-11-15 19:16:17 +05:30
Linux Build Service Account
1b19a8b7b6 Promotion of sepolicy.lnx.2.0.c2-00002.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1081484   I278422370db53e1a52220222b26995318e19d90a   Merge DAX changes
1086459   I9a32329e23363087b3a49baeeb3c3f8390a8116a   sepolicy:Add oemfs ruler for carrier switch
1077354   I10388ef8cf5855d12a7053bbffffdb70a3ba162b   sepolicy : Allow mm-pp-daemon access to diag

Change-Id: I316a8a1b9014fb4b87b3be4f2bbd17120493e581
CRs-Fixed: 1077354, 1081484, 1086459
2016-11-14 10:15:03 -07:00
Sashidhar Ganiga
6ca8d882d4 sepolicy: allow writing firmware files in recovery mode.
FOTA upgrading requires writing firmware images into
vfat firmware partition in recovery mode.

Change-Id: I0bd61196ea7acf00582e58980aaeb3cf5128aa7a
2016-11-13 23:01:03 -08:00
Shahed Begum
62565277fa Add SELinux support for factory reset protection
Modified  factory reset protection partition as per device specific

Change-Id: I721f2d7deb4dbe89a8c3fb5ed8e9413cd58ce428
CRs-Fixed: 1078078
2016-11-13 22:42:41 -08:00
Michael Bestas
9e0da1fcd6 msm8974: add common sepolicy needed for M blobs on N
Change-Id: I31cb4db310f9ced1d24e7dc430e494b2ad1d1db7
2016-11-10 15:19:52 -08:00
Linux Build Service Account
712f9ac136 Merge "sepolicy:Add oemfs ruler for carrier switch" 2016-11-10 02:18:02 -08:00
jinfaw
0daf004de8 sepolicy:Add oemfs ruler for carrier switch
1.Carrier overlay apk could be found and loaded in oemfs
  2.Carrier Link file could be found in oemfs,such as "lib.so.link"

Change-Id: I9a32329e23363087b3a49baeeb3c3f8390a8116a
CRs-Fixed: 1086459
2016-11-09 16:00:47 +08:00
Linux Build Service Account
0a75c48370 Merge "sepolicy : Allow mm-pp-daemon access to diag" 2016-11-08 09:37:04 -08:00
Gao Jie
99d36c705c Merge DAX changes
Conflicts:
    common/audioserver.te

CRs-fixed: 1081484
Change-Id: I278422370db53e1a52220222b26995318e19d90a
(cherry picked from commit a1ad06f3c26be3249af4a600db8b78510a984468)
2016-11-07 14:51:32 +05:30
Michael Bestas
8259f14eb1 Merge remote-tracking branch 'caf/LA.BR.1.2.9_rb1.8' into cm-14.1
Change-Id: I80df296b03acef02569cecc38f9f91374a36df25
2016-11-06 03:58:32 +02:00
Linux Build Service Account
10aa8d2775 Promotion of sepolicy.lnx.2.0.c2-00001.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1075722   I9154b3726a182385744786b95a3d67488fd6e8e7   Add GOTA sepolicy access for RIDL/RIDL 2.0

Change-Id: I75409ce2454688fd867b628dc38a7bd1f00f81b5
CRs-Fixed: 1075722
2016-11-03 23:11:51 -06:00
Nirmal Abraham
9de3e5cf15 sepolicy : Allow mm-pp-daemon access to diag
The access to diag was restricted as part of this commit
'sepolicy: Restrict diag access available to domains'. This
prevents mm-pp-daemon from accessing diag which results in
failure of QDCM PC tool connection with the device/pp-daemon.
To resolve this, allow mm-pp-daemon r/w access to diag.

CRs-Fixed: 1077354
Change-Id: I10388ef8cf5855d12a7053bbffffdb70a3ba162b
2016-11-02 04:13:37 -07:00
Steve Kondik
7e2df7f866 sepolicy: qti-testscripts will be foward-declared in system/sepolicy
* We need to touch a neverallow rule and not break devices which
   don't include this policy.

Change-Id: Ie2ec09adc905783541763e922e8dad9664de8fd1
2016-10-26 20:33:29 -07:00
Clarence Wong
1159fae117 Add GOTA sepolicy access for RIDL/RIDL 2.0
For most recent OS, context for /cache/recovery has changed.
RIDL/RIDL 2.0  need to read/write to this directory
for GOTA.

Change-Id: I9154b3726a182385744786b95a3d67488fd6e8e7
CRs-Fixed: 1075722
2016-10-26 11:09:35 -07:00
Linux Build Service Account
c88f63d1f9 Merge f5cc43be33 on remote branch
Change-Id: I9e8566b76c4ab95efa2294a3c5172ab4be0d6af7
2016-10-22 09:09:51 -06:00
Divya Narayanan Poojary
c9dda58f3d sepolicy: per_mgr: Allow services to find peripheral_manager
mediaserver and per_mgr_proxy can now correctly talk to
service manager in order to get the information needed to initiate
the binder call to peripheral manager.

CRs-fixed: 1072628
Change-Id: I919827b1b4adcb2aaec9dc10eabae243fe003392
2016-10-21 10:56:46 -07:00
Shaheda Begum
ddc9071b1b Add SELinux support for factory reset protection
Map factory reset protection into SELinux sepolicy/file_contexts

Change-Id: Ibd3198cc38e0446e1862b178f8d4c5ae8f8dc0c9
CRs-Fixed: 1078078
2016-10-21 10:45:06 -07:00
Adrian DC
27b3a87fa9 msm8960: Remove the references to misc_device
* Fix the missing type removed in commit
    I4c29491abef1f235a190bcd1e157aec406fac2fa

Change-Id: Ie5d4cb5c550768a117369493bcfb95c7e19f4f06
2016-10-18 18:52:35 +02:00
Steve Kondik
85e3afdb52 Revert "uncrypt needs to write to the BCB"
This reverts commit f2ce603429.

Change-Id: Id4cc66138057f3fd10f0deafd6d5290fccddbf1f
2016-10-17 22:44:49 -07:00
Steve Kondik
22ea8db34e Merge tag 'LA.UM.5.5.r1-00900-8x96.0' of git://codeaurora.org/device/qcom/sepolicy into cm-14.0
"LA.UM.5.5.r1-00900-8x96.0"

Change-Id: I1a53f98a3bfb51c0b087be8ce85d420419fa5aa1
2016-10-17 22:43:14 -07:00
Linux Build Service Account
33634b612a Merge d22eecffec on remote branch
Change-Id: Icfd788c2bb5484128ab08a7eb16a807e53794636
2016-10-10 09:24:35 -06:00
Sanjay Singh
f7a12e8484 Sepolicy: Allow mediaserver to access media_settings_xml_prop
mediaserver should be able to access media_settings_xml_prop.

change-Id: Ia099814177b7be00109c6a5cf5417317376b8ca0
2016-10-10 02:59:09 -04:00
Paras Nagda
47ef8ddb05 Sepolicy: Allow mediaserver/mediacodec to access media.msm8956hw
mediaserver/mediacodec and zygote should be able to access
media.msm8956hw property and  media_settings_xml to load target
specific media codecs and media profile file on 8976.

Change-Id: I6a115d4daee15ddf156351c82b6116f3db252991
2016-10-10 02:58:52 -04:00
taozhang
7db37e89a8 common: Add SELinux policy for Android N fastmmi
Add SELinux policy for Android N fastmmi
WIFI case need new policy
CRs-Fixed: 1050368

Change-Id: I4548c0bec2192e7f182739289b8d8c51ac0dbbf8
2016-09-24 06:28:47 -07:00
Kuirong Wang
8aee311155 sepolicy: add permissions for i2c-6 device
Add audio_device permission for i2c-6 device.

Change-Id: I43af04bd32057969662b5726ff792fead2ff2a77
2016-09-24 11:07:17 +02:00
Linux Build Service Account
46d0764c0c Merge bd14aa2039 on remote branch
Change-Id: Ib075149ef84cdbfeafde9bf7b9e966488db42e17
2016-09-22 05:28:16 -07:00
Dan Pasanen
1279ca5617 msm8974: remove mm-qcamerad execmod
* this hits a neverallow

Change-Id: Ib9c05a68fe091ed15c9cb18801af548ad53d3b77
2016-09-13 21:53:14 -05:00
Linux Build Service Account
6cb88a9df4 Merge 359064175a on remote branch
Change-Id: Id51c71e8caf16ffaef8745eb9b2acc1ea1d8510f
2016-09-12 08:55:20 -06:00
Luca Stefani
6ef224c036 sepolicy: Remove faceproc execmod
Change-Id: Id525b71c1514ceca4a1cf4bee8210e5dd385e944
2016-09-04 16:29:42 -07:00
Steve Kondik
a3ba799b50 sepolicy: Move qti_debugfs_domain to system/sepolicy
* For dealing with neverallows

Change-Id: I60928812893513946499d0df986da1ee0088f6c9
2016-09-04 16:24:20 -07:00
Adrian DC
7ab7c87d91 sepolicy: msm8960: Remove DR_AP_Service from file_contexts
* Added in common file_contexts by commit :
    c84ab788c8

Change-Id: I1b160be71e01329ab2e74a051b996b84071b3096
2016-09-01 11:58:17 +02:00
Steve Kondik
70bf950352 sepolicy: Re-add legacy IOP rules
* Still in use for now.

Change-Id: Ieb4c420e73efcb729cc9554de6837ccb71ff603d
2016-08-31 23:59:24 -07:00
Ricardo Cerqueira
75060a1019 wcnss: Fix I40eeb6895f1c5550813bf8b4182e33f9a4dc5dfd
This applies to user builds, too

Change-Id: Iddc7421ba83b3fd7b5f9a66b2dd1c3ffe240e1fa
2016-08-31 23:59:24 -07:00
Ricardo Cerqueira
1d2f767272 wcnss: Fix annoying warning when ptt looks for its log dir
Change-Id: I40eeb6895f1c5550813bf8b4182e33f9a4dc5dfd
2016-08-31 23:59:24 -07:00
Ricardo Cerqueira
d9d55d0aee msm8937: Fix labeling of the cache and FRP partitions
Change-Id: Ib48d599155a354d2a6c366816b878e041a2cbdba
2016-08-31 23:59:24 -07:00
Scott Mertz
2541d16638 sepolicy: fix mm-qcamerad permission for persist.camera* properties
This fixes denials reading/writing the property_socket

Change-Id: Id69404c16c0b10318f570d4aa41fc80bc94b040d
2016-08-31 23:59:24 -07:00
Michael Bestas
9d2a24f1a9 msm8974: Fix mm-qcamerad denial
* Same as msm8916 in eda5cad2e4

Change-Id: I8d0166c7aa92a03ba96c1e78592403205ea60751
2016-08-31 23:59:24 -07:00
Matt Wagantall
36e6b8ac3e sepolicy: allow gatekeeperd to access firmware_files (ex. kmota)
The proprietary Qualcomm library /vendor/lib/hw/gatekeeper.<soc>.so and
its 64-bit counterpart attempt to open firmware images such as kmota.mdt
and keymaste.mdt. Although we don't have visibility in the details of
exactly why these images are being opened (perhaps only checking for their
presence?), the Qualcomm gatekeeper library is trusted to be responsible,
and so we comply with it's demands for access to the (normally read-only)
/firmware filesystem.

Change-Id: I2c88cc8884cf78f5bdcc9af2bce5f2dfa80f3fe0
2016-08-31 23:59:24 -07:00
Michael Bestas
19c0a8b872 sepolicy: Label boot/recovery/cache partitions
Change-Id: I5dc5d125dec1fb03646da04ffb01c1153b9f3cab
2016-08-31 23:59:24 -07:00
Luca Stefani
342476ec81 sepolicy: add missing fdAlbum type_transition
Change-Id: Ia1a4a152d489d6300a8187947b51c5a9e9538648
2016-08-31 23:59:24 -07:00
DilipKumar Sreeramaiah
eab4397882 Add SELinux support for factory reset protection
Map factory reset protection into SELinux sepolicy/file_contexts.
Use hardcoded path for partition for now.

Change-Id: I9dfaff2307d2305b67ea91b9ae134e8e4090de5b
2016-08-31 23:59:24 -07:00
Ricardo Cerqueira
f19c2b296a thermal: Fix labeling the thermal sockets
Change-Id: Iffdaca86f539ede159aa9c02f8839e0f69bfc1d9
2016-08-31 23:59:24 -07:00
Dan Pasanen
9461e2fa9f msm8226: label cache partition
Change-Id: I19240932f689377d437599afce61efe0b7e8d3ae
2016-08-31 23:59:24 -07:00
Ricardo Cerqueira
3aaeeceb27 msm8916/common: Fix various issues
- Label the FRP and cache partitions
- Let keystore load firmware
- facedetection still uses a file at /data :(
- The tether service was broken under the new domain

Change-Id: Ifa500ca57dc71831074a39fb5b05246c12cd0d4c
2016-08-31 23:59:24 -07:00
Dan Pasanen
1866713fda msm8960: set labels on block devices
Change-Id: I146f0ebcec6028a80ac9e245095518cd8fc105d1
2016-08-31 23:59:24 -07:00
Steve Kondik
27f078f104 sepolicy: Include CM+QCOM SEpolicy
Change-Id: I6b7f1716f9850e93145d9d379df1ffc0d97e19a2
2016-08-31 23:59:24 -07:00
Steve Kondik
a5e05d2f16 sepolicy: Add cache_block_device for msm8974 devices
* 8974 needs love too <3 <3

Change-Id: Ia9e4dbfb52d404aa66f5915cba1c231ebb428403
2016-08-31 23:59:24 -07:00
Ricardo Cerqueira
959d336245 Do not include common SE policies automatically
Automatic additions to BOARD_SEPOLICY_UNION from Android.mk do not
guarantee order or precedence of rules. More often than not, these
rules get included _after_ the device's own, which makes
it impossible for the device to extend them, or even to use types
defined here.

Manually include these in the device's BoardConfig with
"include device/qcom/sepolicy/sepolicy.mk" before
its own specific BOARD_SEPOLICY_DIRS (if any) instead. Or just
include files piecemeal.

Change-Id: I2ce0c3ec325906a46570b26c5f0c2018390d2ec9
2016-08-31 23:38:44 -07:00
Ricardo Cerqueira
f2ce603429 uncrypt needs to write to the BCB
and in QC hardware, that's misc_partition...

Change-Id: I1d2f5d11423f01435f17f0e6f5d418cc0ce30e9d
2016-08-31 23:35:51 -07:00
Daniel Hillenbrand
6b6b261f5e common: remove duplicate
device/qcom/sepolicy/common/wcnss_service.te:17:ERROR 'duplicate declaration of type/attribute' at token ';' on line 14366:
type wcnss_service_qmuxd_socket, file_type;
checkpolicy:  error(s) encountered while parsing configuration

Change-Id: Idbcccdae3f0303f6b7d2a85a2ab75a82b5b729f3
2016-08-31 23:35:13 -07:00
Steve Kondik
d029aefc13 sepolicy: Allow apps to read battery status
* Various apps do this to monitor the battery. No harm there.

Change-Id: Id1b843ca509747ed963b89d025a39b5b1fcc7ddb
2016-08-31 23:35:13 -07:00
Ricardo Cerqueira
c243ce6370 camera: Fix domain socket labeling
Change-Id: I42094eb1064eca4cf227ee7af559427b160f476e
2016-08-31 23:35:13 -07:00
Ricardo Cerqueira
d55e0d6704 mediaserver: Fix access to perflock (thermal)
Change-Id: I30edc8e6aa189d4c5da2b83e90d27ec53c1f044d
2016-08-31 23:35:13 -07:00
Chirayu Desai
eba6ea57b7 Correct executable bit for source files
Change-Id: Ic37634d5e53376b59d4df80caae2681f960fceee
2016-08-31 23:35:13 -07:00
98 changed files with 775 additions and 383 deletions

View File

@@ -1,11 +1,10 @@
# Board specific SELinux policy variable definitions
ifeq ($(call is-vendor-board-platform,QCOM),true)
LOCAL_PATH:= $(call my-dir)
BOARD_SEPOLICY_DIRS := \
$(BOARD_SEPOLICY_DIRS) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/common \
$(LOCAL_PATH)/test \
$(LOCAL_PATH)/$(TARGET_BOARD_PLATFORM)
endif
# Don't recurse into the platform makefiles. We don't care about them, and
# we don't want to force a reset of BOARD_SEPOLICY_DIRS
#
# If you want to use these policies, add a
#
# include device/qcom/sepolicy/sepolicy.mk
#
# to your device's BoardConfig. It is highly recommended that in case
# you have your own BOARD_SEPOLICY_DIRS and BOARD_SEPOLICY_UNION declarations,
# the inclusion happens _before_ those lines

View File

@@ -28,4 +28,3 @@
# qca data file for apq8084
type qca1530_data_file, file_type, data_file_type;
type sysfs_qca1530, file_type;
type qca1530_prop, file_type;

View File

@@ -26,6 +26,7 @@
type qca1530, domain, domain_deprecated;
type qca1530_exec, exec_type, file_type;
type qca1530_prop, property_type;
net_domain(qca1530)
init_daemon_domain(qca1530)
@@ -36,7 +37,6 @@ userdebug_or_eng(`
qmux_socket(qca1530)
wakelock_use(qca1530)
unix_socket_connect(qca1530, property, init)
# need to access sharemem log device for smem logs
allow qca1530 smem_log_device:chr_file rw_file_perms;
@@ -68,7 +68,8 @@ allow qca1530 system_file:file x_file_perms;
#Setting sys.qca1530 property in QCA1530 detect service
#Setting system default properties on start command to system server
allow qca1530 { qca1530_prop ctl_default_prop }:property_service set;
set_prop(qca1530, qca1530_prop)
set_prop(qca1530, ctl_default_prop)
# Access to serial port conncting to QCA1530 chip
allow qca1530 serial_device:chr_file rw_file_perms;

View File

@@ -14,7 +14,6 @@ binder_call(atfwd, servicemanager);
r_dir_file(atfwd, sysfs_ssr);
allow atfwd self:{ udp_socket socket } create_socket_perms;
unix_socket_connect(atfwd, property, init);
allow atfwd radio_prop:property_service set;
set_prop(atfwd, radio_prop)
allow atfwd atfwd_service:service_manager find;

View File

@@ -26,4 +26,5 @@
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Domain type used for debugfs access
attribute qti_debugfs_domain;
# (moved to system/sepolicy)
# attribute qti_debugfs_domain;

View File

@@ -86,3 +86,10 @@ use_per_mgr(audioserver);
allow audioserver activity_service:service_manager find;
set_prop(audioserver, dolby_prop)
# DOLBY_END
# for thermal sock files
unix_socket_connect(audioserver, thermal, thermal-engine)
# allow audioserver to write DTS files
allow audioserver dts_data_file:dir rw_dir_perms;
allow audioserver dts_data_file:file create_file_perms;

View File

@@ -23,7 +23,7 @@ type fmhal_service, bluetoothdomain, domain_deprecated;
type fmhal_service_exec, exec_type, file_type;
domain_auto_trans(init, fmhal_service_exec, bluetooth)
allow bluetooth bluetooth_prop:property_service set;
set_prop(bluetooth, bluetooth_prop)
allow bluetooth sysfs:file w_file_perms;
#Access to /data/media

View File

@@ -0,0 +1,40 @@
# Bluetooth executables and scripts
type bluetooth_loader, domain, domain_deprecated;
type bluetooth_loader_exec, exec_type, file_type;
# Start bdAddrLoader from init
init_daemon_domain(bluetooth_loader)
# Run init.qcom.bt.sh
allow bluetooth_loader shell_exec:file { entrypoint getattr 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)
allow hci_attach bluetooth_loader:fd use;
# Set persist.service.bdroid.* and bluetooth.* property values
set_prop(bluetooth_loader, bluetooth_prop)
# Allow getprop/setprop for init.qcom.bt.sh
allow bluetooth_loader system_file:file execute_no_trans;
allow bluetooth_loader toolbox_exec:file rx_file_perms;
# Allow hci_qcomm_init /persist/.bt_nv.bin access
r_dir_file(bluetooth_loader, persist_file);
allow bluetooth_loader bluetooth_data_file:file r_file_perms;
# Access the smd device
allow bluetooth_loader hci_attach_dev:chr_file rw_file_perms;
# And qmuxd
allow bluetooth_loader qmuxd_socket:dir { write add_name remove_name search };
allow bluetooth_loader qmuxd_socket:sock_file { create setattr getattr write unlink };
allow bluetooth_loader qmuxd:unix_stream_socket { connectto };
userdebug_or_eng(`
diag_use(bluetooth_loader)
')

View File

@@ -45,8 +45,7 @@ allow cameraserver system_server:unix_stream_socket { read write };
allow cameraserver sysfs:file r_file_perms;
allow cameraserver persist_file:dir r_dir_perms;
allow cameraserver camera_prop:property_service set;
unix_socket_connect(cameraserver,property,init);
set_prop(cameraserver, camera_prop)
allow cameraserver self:socket create_socket_perms;
allow cameraserver sensors_persist_file:dir r_dir_perms;
allow cameraserver sensors_persist_file:file r_file_perms;

View File

@@ -14,4 +14,5 @@ allow charger_monitor{
allow charger_monitor sysfs:file w_file_perms;
allow charger_monitor sysfs_battery_supply:dir r_dir_perms;
r_dir_file(charger_monitor, sysfs_dc_supply)
r_dir_file(charger_monitor, sysfs_usb_supply)

View File

@@ -40,8 +40,7 @@ allow cnd self:{
allow cnd self:netlink_tcpdiag_socket nlmsg_read;
# allow cnd to set system property
allow cnd system_prop:property_service set;
unix_socket_connect(cnd, property, init)
set_prop(cnd, system_prop)
# allow cnd to access cnd_data_file
allow cnd cnd_data_file:file create_file_perms;

View File

@@ -36,13 +36,10 @@ allow dpmd self:capability {
#socket, self
allow dpmd smem_log_device:chr_file rw_file_perms;
unix_socket_connect(dpmd, property, init)
wakelock_use(dpmd)
allow dpmd {
system_prop
ctl_default_prop
}:property_service set;
set_prop(dpmd, system_prop)
set_prop(dpmd, ctl_default_prop)
#misc.
allow dpmd shell_exec:file rx_file_perms;

View File

@@ -17,9 +17,6 @@ binder_service(fidodaemon)
#Allow fidodaemon to be registered with service manager
allow fidodaemon fidodaemon_service:service_manager add;
#Allow communication with init over property server
unix_socket_connect(fidodaemon, property, init);
#Allow access to tee device
allow fidodaemon tee_device:chr_file rw_file_perms;

View File

@@ -74,6 +74,7 @@ type sysfs_graphics, sysfs_type, fs_type;
# USB/battery power supply type for hvdcp/quickcharge
type sysfs_usb_supply, sysfs_type, fs_type;
type sysfs_battery_supply, sysfs_type, fs_type;
type sysfs_dc_supply, sysfs_type, fs_type;
#Define the files written during the operation of mpdecision
type sysfs_mpdecision, fs_type, sysfs_type;
@@ -190,13 +191,11 @@ type ssr_ramdump_data_file, file_type, data_file_type;
# Regionalization files
type regionalization_file, file_type;
type regionalization_data_file, file_type, data_file_type;
# /data/system/swap/swapfile - swapfile
type swap_data_file, file_type, data_file_type;
# dynamic nv files
type dynamic_nv_data_file, file_type, data_file_type;
# wififtmd socket file
type wififtmd_socket, file_type;

View File

@@ -9,6 +9,7 @@
/dev/mhi_pipe_.* u:object_r:mhi_device:s0
/dev/bhi u:object_r:bhi_device:s0
/dev/msm_.* u:object_r:audio_device:s0
/dev/i2c-6 u:object_r:audio_device:s0
/dev/wcd_dsp0_control u:object_r:audio_device:s0
/dev/wcd-dsp-glink u:object_r:audio_device:s0
/dev/usf1 u:object_r:usf_device:s0
@@ -30,6 +31,7 @@
/dev/sdsprpc-smd u:object_r:dsp_device:s0
/dev/sensors u:object_r:sensors_device:s0
/dev/smd.* u:object_r:smd_device:s0
/dev/smd3 u:object_r:hci_attach_dev:s0
/dev/smem_log u:object_r:smem_log_device:s0
/dev/ttyHSL0 u:object_r:console_device:s0
/dev/ttyMSM0 u:object_r:console_device:s0
@@ -166,7 +168,7 @@
/system/bin/netmgrd u:object_r:netmgrd_exec:s0
/system/bin/qmuxd u:object_r:qmuxd_exec:s0
/system/bin/port-bridge u:object_r:port-bridge_exec:s0
/system/bin/sensors.qcom u:object_r:sensors_exec:s0
/system/bin/sensors\.qcom u:object_r:sensors_exec:s0
/system/bin/sns.* u:object_r:sensors_test_exec:s0
/system/bin/test_diag u:object_r:diag_exec:s0
/system/vendor/bin/thermal-engine u:object_r:thermal-engine_exec:s0
@@ -246,13 +248,14 @@
/system/bin/usf_sw_calib u:object_r:usf_exec:s0
/system/bin/usf_pairing u:object_r:usf_exec:s0
/system/bin/usf_tester u:object_r:usf_exec:s0
/system/vendor/bin/RIDLClient.exe u:object_r:RIDL_exec:s0
/system/vendor/bin/RIDLClient\.exe u:object_r:RIDL_exec:s0
/system/vendor/bin/LKCore u:object_r:qti_logkit_exec:s0
/system/bin/tbaseLoader u:object_r:tbaseLoader_exec:s0
/system/bin/mcStarter u:object_r:mcStarter_exec:s0
/system/bin/fstman u:object_r:fstman_exec:s0
/system/vendor/bin/mdtpd u:object_r:mdtpdaemon_exec:s0
/system/bin/wifi_ftmd u:object_r:wifi_ftmd_exec:s0
/system/etc/init\.qcom\.bt\.sh u:object_r:bluetooth_loader_exec:s0
###################################
# sysfs files
@@ -265,6 +268,9 @@
/sys/devices/msm_otg/power_supply/usb(/.*)? u:object_r:sysfs_usb_supply:s0
/sys/devices/platform/battery_current_limit u:object_r:sysfs_thermal:s0
/sys/devices/qpnp-charger.*/power_supply/battery(/.*)? u:object_r:sysfs_battery_supply:s0
/sys/devices/qpnp-smbcharger-*/power_supply/battery(/.*)? u:object_r:sysfs_battery_supply:s0
/sys/devices/qpnp-charger-*/power_supply/dc(/.*)? u:object_r:sysfs_dc_supply:s0
/sys/devices/qpnp-smbcharger-*/power_supply/dc(/.*)? u:object_r:sysfs_dc_supply:s0
/sys/devices/system/cpu/cpu0/rq-stats/* u:object_r:sysfs_rqstats:s0
/sys/devices/virtual/graphics/fb([0-2])+/idle_time u:object_r:sysfs_graphics:s0
/sys/devices/virtual/graphics/fb([0-2])+/dynamic_fps u:object_r:sysfs_graphics:s0
@@ -310,11 +316,13 @@
/data/rfs.* u:object_r:rfs_file:s0
/data/hlos_rfs(/.*)? u:object_r:rfs_shared_hlos_file:s0
/data/camera(/.*)? u:object_r:camera_socket:s0
/data/fdAlbum u:object_r:camera_data_file:s0
/data/misc/stargate(/.*)? u:object_r:qfp-daemon_data_file:s0
/data/system/sensors(/.*)? u:object_r:sensors_data_file:s0
/data/time(/.*)? u:object_r:time_data_file:s0
/data/nfc(/.*)? u:object_r:nfc_data_file:s0
/data/system/perfd(/.*)? u:object_r:mpctl_data_file:s0
/data/misc/perfd(/.*)? u:object_r:mpctl_socket:s0
/data/misc/iop(/.*)? u:object_r:iop_data_file:s0
/data/misc/display(/.*)? u:object_r:display_misc_file:s0
/data/misc/ipa(/.*)? u:object_r:ipacm_data_file:s0
@@ -343,14 +351,15 @@
/data/misc/qti-logkit/socket-privileged(/.*)? u:object_r:qti_logkit_priv_socket:s0
/data/misc/qti-logkit/socket-public(/.*)? u:object_r:qti_logkit_pub_socket:s0
/data/system/swap(/.*)? u:object_r:swap_data_file:s0
/data/misc/wifi/nvbin(/.*)? u:object_r:dynamic_nv_data_file:s0
/data/misc/wifi/wigig_sockets(/.*)? u:object_r:wpa_socket:s0
/data/misc/wifi/wigig_sockets/wpa_ctrl.* u:object_r:system_wpa_socket:s0
/data/app-regional(/.*)? u:object_r:regionalization_data_file:s0
###################################
# persist files
#
/persist(/.*)? u:object_r:persist_file:s0
/persist/\.bt_nv\.bin u:object_r:bluetooth_data_file:s0
/persist/\.genmac u:object_r:wifi_data_file:s0
/persist/bluetooth(/.*)? u:object_r:persist_bluetooth_file:s0
/persist/drm(/.*)? u:object_r:persist_drm_file:s0
/persist/sensors(/.*)? u:object_r:sensors_persist_file:s0

2
common/gatekeeperd.te Normal file
View File

@@ -0,0 +1,2 @@
# allow gatekeeperd to open firmware images (ex. kmota)
r_dir_file(gatekeeperd, firmware_file)

View File

@@ -1,4 +1,5 @@
r_dir_file(healthd, sysfs_battery_supply)
r_dir_file(healthd, sysfs_dc_supply)
r_dir_file(healthd, sysfs_usb_supply)
r_dir_file(healthd, sysfs_thermal);
r_dir_file(healthd, persist_file);

View File

@@ -9,11 +9,13 @@ init_daemon_domain(hvdcp)
allow hvdcp hvdcp_device:chr_file rw_file_perms;
allow hvdcp {
sysfs_battery_supply
sysfs_dc_supply
sysfs_usb_supply
}:dir r_dir_perms;
allow hvdcp {
sysfs_battery_supply
sysfs_dc_supply
sysfs_usb_supply
sysfs
}:file rw_file_perms;

View File

@@ -37,14 +37,11 @@ unix_socket_connect(ims, netd, netd)
# Talk to qumuxd via ims_socket
unix_socket_connect(ims, ims, qmuxd)
# Talk to init via property_socket
unix_socket_connect(ims, property, init)
#Add connectionmanager service
allow ims imscm_service:service_manager add;
# Set property to start imsdata_daemon and ims_rtp_daemon
allow ims qcom_ims_prop:property_service set;
set_prop(ims, qcom_ims_prop)
# permissions needed for IMS to connect and interact with WPA supplicant
unix_socket_send(ims, wpa, wpa)

View File

@@ -58,55 +58,57 @@ allow qti_init_shell self:capability {
# rmnet_mux_prop - Needed to set persist.rmnet.mux property
# sys_usb_controller_prop - Needed to set sys.usb.controller property
# sys_usb_configfs_prop - Needed to set sys.usb.configfs property
allow qti_init_shell {
system_prop
freq_prop
perfd_prop
gamed_prop
mpdecision_prop
bluetooth_prop
config_prop
sensors_prop
msm_irqbalance_prop
ipacm_prop
ipacm-diag_prop
qti_prop
ctl_rildaemon_prop
uicc_prop
ctl_qmuxd_prop
ctl_netmgrd_prop
ctl_port-bridge_prop
sdm_idle_time_prop
sf_lcd_density_prop
opengles_prop
mdm_helper_prop
fm_prop
usf_prop
qemu_hw_mainkeys_prop
alarm_boot_prop
boot_animation_prop
debug_gralloc_prop
# Needed for starting console in userdebug mode
userdebug_or_eng(`ctl_console_prop coresight_prop')
rmnet_mux_prop
ctl_hbtp_prop
#Needed for starting vm_bms executable post-boot
vm_bms_prop
sys_usb_controller_prop
sys_usb_configfs_prop
#Needed for setting hwui properties in post_boot
hwui_prop
graphics_vulkan_prop
}:property_service set;
set_prop(qti_init_shell, system_prop)
set_prop(qti_init_shell, freq_prop)
set_prop(qti_init_shell, perfd_prop)
set_prop(qti_init_shell, gamed_prop)
set_prop(qti_init_shell, mpdecision_prop)
set_prop(qti_init_shell, bluetooth_prop)
set_prop(qti_init_shell, config_prop)
set_prop(qti_init_shell, sensors_prop)
set_prop(qti_init_shell, msm_irqbalance_prop)
set_prop(qti_init_shell, ipacm_prop)
set_prop(qti_init_shell, ipacm-diag_prop)
set_prop(qti_init_shell, qti_prop)
set_prop(qti_init_shell, ctl_rildaemon_prop)
set_prop(qti_init_shell, uicc_prop)
set_prop(qti_init_shell, ctl_qmuxd_prop)
set_prop(qti_init_shell, ctl_netmgrd_prop)
set_prop(qti_init_shell, ctl_port-bridge_prop)
set_prop(qti_init_shell, sdm_idle_time_prop)
set_prop(qti_init_shell, sf_lcd_density_prop)
set_prop(qti_init_shell, opengles_prop)
set_prop(qti_init_shell, mdm_helper_prop)
set_prop(qti_init_shell, fm_prop)
set_prop(qti_init_shell, usf_prop)
set_prop(qti_init_shell, qemu_hw_mainkeys_prop)
set_prop(qti_init_shell, alarm_boot_prop)
set_prop(qti_init_shell, boot_animation_prop)
set_prop(qti_init_shell, debug_gralloc_prop)
# Needed for starting console in userdebug mode
userdebug_or_eng(`
set_prop(qti_init_shell, ctl_console_prop)
set_prop(qti_init_shell, coresight_prop)
')
set_prop(qti_init_shell, rmnet_mux_prop)
set_prop(qti_init_shell, ctl_hbtp_prop)
#Needed for starting vm_bms executable post-boot
set_prop(qti_init_shell, vm_bms_prop)
set_prop(qti_init_shell, sys_usb_controller_prop)
set_prop(qti_init_shell, sys_usb_configfs_prop)
#Needed for setting hwui properties in post_boot
set_prop(qti_init_shell, hwui_prop)
#Needed for setting bservice in post_boot
set_prop(qti_init_shell, bservice_prop)
#Needed for setting Delayed Service Reschedule in post_boot
set_prop(qti_init_shell, reschedule_service_prop)
set_prop(qti_init_shell, graphics_vulkan_prop)
allow qti_init_shell efs_boot_dev:blk_file r_file_perms;
# For hci_comm_init
allow qti_init_shell { serial_device userdebug_or_eng(`qdss_device') }:chr_file rw_file_perms;
# Allow property changes
unix_socket_connect(qti_init_shell, property, init)
allow qti_init_shell {
sysfs
sysfs_devices_system_cpu

View File

@@ -41,7 +41,8 @@ r_dir_file( dumpstate, appdomain );
r_dir_file( dumpstate, apk_data_file );
#Create a socket for receiving info from IOP
allow dumpstate iop_socket:sock_file rw_file_perms;
type_transition dumpstate iop_data_file:sock_file iop_socket "iop";
allow dumpstate iop_socket:sock_file { create_file_perms unlink };
#default_values file
allow dumpstate iop_data_file:dir rw_dir_perms;

View File

@@ -36,3 +36,8 @@ allow ipacm ipacm:{
# Allow creating and modifying the PID file
allow ipacm ipacm_data_file:dir w_dir_perms;
allow ipacm ipacm_data_file:file create_file_perms;
# Allow execution of 'ip neighbor change' command in shell
allow ipacm system_file:file rx_file_perms;
allow ipacm shell_exec:file rx_file_perms;
allow ipacm ipacm:netlink_route_socket nlmsg_write;

View File

@@ -1,2 +1,5 @@
# Allow keystore to operate using qseecom_device
allow keystore tee_device:chr_file rw_file_perms;
# Allow keystore to search and get keymaste.mdt
r_dir_file(keystore, firmware_file)

View File

@@ -62,7 +62,7 @@ allow location persist_file:dir r_dir_perms;
netmgr_socket(location);
#Allow access to properties
set_prop(location, location_prop);
set_prop(location, location_prop)
#diag
userdebug_or_eng(`

View File

@@ -31,8 +31,7 @@ type logdumpd_exec, exec_type, file_type;
init_daemon_domain(logdumpd)
# To set ctl property
unix_socket_connect(logdumpd, property, init)
allow logdumpd ctl_default_prop:property_service set;
set_prop(logdumpd, ctl_default_prop)
userdebug_or_eng(`
#logcat

0
common/mdm_helper.te Executable file → Normal file
View File

View File

@@ -34,6 +34,7 @@ binder_call(mediaserver, poweroffhandler);
allow mediaserver mpctl_socket:dir r_dir_perms;
unix_socket_send(mediaserver, mpctl, mpdecision)
unix_socket_connect(mediaserver, mpctl, mpdecision)
unix_socket_connect(mediaserver, thermal, thermal-engine)
# access to perflock
allow mediaserver mpctl_socket:dir r_dir_perms;
@@ -58,7 +59,7 @@ allow mediaserver audio_pp_data_file:dir rw_dir_perms;
allow mediaserver audio_pp_data_file:file create_file_perms;
#Allow mediaserver to set camera properties
allow mediaserver camera_prop:property_service set;
set_prop(mediaserver, camera_prop)
#allow mediaserver to access wfdservice
binder_call(mediaserver, wfdservice)
@@ -70,3 +71,7 @@ r_dir_file(mediaserver, adsprpcd_file);
binder_call(mediaserver, bootanim);
allow mediaserver surfaceflinger:unix_stream_socket rw_socket_perms;
# Allow mediaserver to search and get the widevine, playready firmwares
allow mediaserver firmware_file:dir search;
allow mediaserver firmware_file:file { read getattr open };

View File

@@ -24,7 +24,7 @@ allow mm-pp-daemon sensors_device:chr_file r_file_perms;
allow mm-pp-daemon sensors_socket:sock_file rw_file_perms;
allow mm-pp-daemon sensors:unix_stream_socket connectto;
allow mm-pp-daemon system_prop:property_service set;
set_prop(mm-pp-daemon, system_prop)
# Allow service manager to find surface flinger service,
# sensorservice service, permission_service, and power service (for
@@ -45,7 +45,7 @@ userdebug_or_eng(`
allow mm-pp-daemon self:process ptrace;
# This allows pp-daemon to set debug property
allow mm-pp-daemon debug_prop:property_service set;
set_prop(mm-pp-daemon, debug_prop)
# This allow pp-daemon access to diag
diag_use(mm-pp-daemon)
@@ -56,7 +56,6 @@ userdebug_or_eng(`
allow mm-pp-daemon sysfs:file rw_file_perms;
# Allow socket calls in pp-daemon
unix_socket_connect(mm-pp-daemon, property, init)
unix_socket_connect(mm-pp-daemon, pps, init)
allow mm-pp-daemon init:unix_stream_socket { listen accept };

View File

@@ -16,11 +16,12 @@ userdebug_or_eng(`
allow mm-qcamerad camera_data_file:file create_file_perms;
# mm-qcamerad needs to set persist.camera. property
allow mm-qcamerad camera_prop:property_service set;
set_prop(mm-qcamerad, camera_prop)
')
#Communicate with user land process through domain socket
type_transition mm-qcamerad system_data_file:sock_file camera_socket "cam_socket1";
type_transition mm-qcamerad system_data_file:sock_file camera_socket "cam_socket2";
allow mm-qcamerad camera_socket:sock_file { create unlink write };
allow mm-qcamerad camera_socket:dir w_dir_perms;
unix_socket_connect(mm-qcamerad, sensors, sensors)
@@ -60,7 +61,6 @@ allow mm-qcamerad graphics_device:dir r_dir_perms;
#Allow access to /dev/graphics/fb* for screen capture
allow mm-qcamerad graphics_device:chr_file rw_file_perms;
unix_socket_connect(mm-qcamerad, property, init)
#Allow camera work normally in FFBM
binder_call(mm-qcamerad, mmi);
@@ -69,3 +69,7 @@ binder_call(mm-qcamerad, mmi);
allow mm-qcamerad input_device:dir r_dir_perms;
allow mm-qcamerad input_device:chr_file r_file_perms;
allow mm-qcamerad sysfs:file rw_file_perms;
# /data/fdAlbum
type_transition mm-qcamerad system_data_file:file camera_data_file "fdAlbum";
allow mm-qcamerad camera_data_file:file create_file_perms;

View File

@@ -28,11 +28,10 @@ allow mmi mmi_data_file:dir rw_dir_perms;
allow mmi mmi_data_file:file create_file_perms;
#socket
unix_socket_connect(mmi, property, init)
allow mmi socket_device:dir w_dir_perms;
#allow mmi set system prop,sensor need write persist
allow mmi powerctl_prop:property_service set;
set_prop(mmi, powerctl_prop)
allow mmi persist_file:dir r_dir_perms;
allow mmi sensors_persist_file:dir create_dir_perms;
allow mmi sensors_persist_file:file create_file_perms;
@@ -53,13 +52,13 @@ allow mmi audio_device:chr_file rw_file_perms;
#FM case
allow mmi fm_radio_device:chr_file r_file_perms;
allow mmi fm_data_file:file r_file_perms;
allow mmi fm_prop:property_service set;
allow mmi ctl_default_prop:property_service set;
set_prop(mmi, fm_prop)
set_prop(mmi, ctl_default_prop)
#bluetooth case
allow mmi bluetooth_data_file:dir rw_dir_perms;
allow mmi bluetooth_data_file:file create_file_perms;
allow mmi bluetooth_prop:property_service set;
set_prop(mmi, bluetooth_prop)
allow mmi smd_device:chr_file rw_file_perms;
allow mmi persist_bluetooth_file:file r_file_perms;
allow mmi wcnss_filter:unix_stream_socket connectto;
@@ -93,7 +92,7 @@ allow mmi nfc_data_file:file create_file_perms;
qmux_socket(mmi);
#allow mmi access chgdiabled prop
allow mmi chgdiabled_prop:property_service set;
set_prop(mmi, chgdiabled_prop)
#Allow mmi operate on surfaceflinger
allow mmi surfaceflinger:fd use;
@@ -120,7 +119,7 @@ unix_socket_connect(mmi, netmgrd, netmgrd);
net_domain(mmi);
#allow mmi access boot mode switch
allow mmi boot_mode_prop:property_service set;
set_prop(mmi, boot_mode_prop)
#diag
userdebug_or_eng(`
diag_use(mmi)

View File

@@ -41,5 +41,4 @@ allow mpdecision mpctl_data_file:file create_file_perms;
r_dir_file(mpdecision, system_server)
#mpdecision set properties
unix_socket_connect(mpdecision, property, init)
allow mpdecision mpdecision_prop:property_service set;
set_prop(mpdecision, mpdecision_prop)

View File

@@ -19,7 +19,7 @@ allow netd ipacm_data_file:file r_file_perms;
allowxperm netd self: { unix_stream_socket } ioctl priv_sock_ioctls;
# needed for netd to start FST Manager via system property
allow netd netd_prop:property_service set;
set_prop(netd, netd_prop)
allow netd self:capability fsetid;
allow netd hostapd:unix_dgram_socket sendto;

View File

@@ -32,7 +32,6 @@ allow netmgrd netmgrd:netlink_xfrm_socket { create_socket_perms nlmsg_write nlms
allow netmgrd netmgrd:netlink_socket { write read create bind };
allow netmgrd netmgrd:socket { create ioctl };
allow netmgrd netmgrd:netlink_route_socket { setopt getattr write nlmsg_write };
unix_socket_connect(netmgrd, property, init)
allow netmgrd self:netlink_generic_socket create_socket_perms;
allow netmgrd self:netlink_tcpdiag_socket { create_socket_perms nlmsg_read nlmsg_write };
@@ -45,9 +44,10 @@ allow netmgrd { proc_net sysfs }:file w_file_perms;
#Allow address configuration
#Allow setting of DNS and GW Android properties
allow netmgrd { system_prop net_radio_prop }:property_service set;
set_prop(netmgrd, system_prop)
set_prop(netmgrd, net_radio_prop)
allow netmgrd xlat_prop:property_service set;
set_prop(netmgrd, xlat_prop)
#Allow execution of commands in shell
allow netmgrd system_file:file x_file_perms;

View File

@@ -33,7 +33,7 @@ init_daemon_domain(nqnfcinfo)
r_dir_file(nqnfcinfo, sysfs_socinfo);
set_prop(nqnfcinfo, nfc_nq_prop);
set_prop(nqnfcinfo, nfc_nq_prop)
# Access device nodes inside /dev/nq-nci
allow nqnfcinfo nfc_device:chr_file rw_file_perms;

View File

@@ -14,7 +14,8 @@ allow perfd {
allow perfd self:{ netlink_kobject_uevent_socket socket} create_socket_perms;
# mpctl socket
allow perfd mpctl_socket:sock_file rw_file_perms;
allow perfd mpctl_socket:dir rw_dir_perms;
allow perfd mpctl_socket:sock_file create_file_perms;
# default_values file
allow perfd mpctl_data_file:dir rw_dir_perms;
@@ -47,6 +48,7 @@ allow perfd {
system_app
wfdservice
mediaserver
mediacodec
thermal-engine
surfaceflinger
appdomain

View File

@@ -94,6 +94,12 @@ type alarm_instance_prop, property_type, core_property_type;
#HWUI property
type hwui_prop, property_type, core_property_type;
#Bservice property
type bservice_prop, property_type, core_property_type;
#Delayed Service Reschedule property
type reschedule_service_prop, property_type, core_property_type;
type graphics_vulkan_prop, property_type, core_property_type;
#boot mode property
type boot_mode_prop, property_type;

View File

@@ -1,3 +1,4 @@
# Copyright (c) 2014 - 2016, The Linux Foundation. All rights reserved.
# Copyright (c) 2015-2016 Dolby Laboratories, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,7 +25,6 @@
wc_transport. u:object_r:bluetooth_prop:s0
sys.usb_uicc. u:object_r:uicc_prop:s0
dolby.audio. u:object_r:audio_prop:s0
persist.bluetooth. u:object_r:bluetooth_prop:s0
sys.ims. u:object_r:qcom_ims_prop:s0
hw.fm. u:object_r:fm_prop:s0
@@ -84,6 +84,10 @@ ro.alarm_handled u:object_r:alarm_handled_prop:s0
ro.alarm_instance u:object_r:alarm_instance_prop:s0
#HWUI Property
ro.hwui.texture_cache_size u:object_r:hwui_prop:s0
#Bservice Property
ro.sys.fw.bservice_ u:object_r:bservice_prop:s0
#Delayed Service Restart Property
ro.am.reschedule_service u:object_r:reschedule_service_prop:s0
persist.graphics.vulkan.disable u:object_r:graphics_vulkan_prop:s0
#boot mode property
sys.boot_mode u:object_r:boot_mode_prop:s0

View File

@@ -21,7 +21,7 @@ allow qcomsysd sysfs_socinfo:file w_file_perms;
allow qcomsysd self:capability { dac_override sys_boot };
use_per_mgr(qcomsysd);
#allow qcomsysd access boot mode switch
set_prop(qcomsysd, boot_mode_prop);
set_prop(qcomsysd, boot_mode_prop)
#diag
userdebug_or_eng(`

View File

@@ -6,6 +6,7 @@ init_daemon_domain(qmuxd)
userdebug_or_eng(`
domain_auto_trans(shell, qmuxd_exec, qmuxd)
domain_auto_trans(adbd, qmuxd_exec, qmuxd)
diag_use(qmuxd)
')
#Allow qmuxd to operate on various qmux device sockets

View File

@@ -56,10 +56,9 @@ binder_call(tee, surfaceflinger)
binder_use(tee)
allow tee system_app:unix_dgram_socket sendto;
unix_socket_connect(tee, property, init)
# allow qseecom access to set system property
allow tee system_prop:property_service set;
set_prop(tee, system_prop)
userdebug_or_eng(`
allow tee su:unix_dgram_socket sendto;
@@ -67,9 +66,6 @@ userdebug_or_eng(`
#allow tee shell_data_file:dir search;
')
# allow qseecom access to set system property
allow tee system_prop:property_service set;
#allow access to qfp-daemon
allow tee qfp-daemon_data_file:dir create_dir_perms;
allow tee qfp-daemon_data_file:file create_file_perms;

View File

@@ -46,9 +46,6 @@ allow qseeproxy qseeproxy_service:service_manager add;
#Allow qseeproxy to use system_server via binder to check caller identity
binder_call(qseeproxy, system_server)
#Allow communication with init over property server
unix_socket_connect(qseeproxy, property, init);
#Allow access to tee device
allow qseeproxy tee_device:chr_file rw_file_perms;

View File

@@ -65,6 +65,9 @@ userdebug_or_eng(`
allow qti_logkit self:packet_socket create_socket_perms;
allow qti_logkit self:capability net_raw;
diag_use(qti_logkit)
# QDSS support
allow qti_logkit qdss_device:chr_file r_file_perms;
')
binder_use(qti_logkit)

View File

@@ -17,4 +17,10 @@ recovery_only(`
allow recovery sg_device:chr_file rw_file_perms;
allow recovery self:capability sys_rawio;
allow recovery sg_device:chr_file ioctl;
# Enable adb on configfs devices
allow recovery configfs:file rw_file_perms;
allow recovery configfs:dir rw_dir_perms;
set_prop(recovery, ffs_prop)
get_prop(recovery, sys_usb_controller_prop)
get_prop(recovery, boot_mode_prop)
')

View File

@@ -75,8 +75,7 @@ allow RIDL cache_recovery_file:dir rw_dir_perms;
allow RIDL cache_recovery_file:file create_file_perms;
# reboot recovery
allow RIDL powerctl_prop:property_service set;
unix_socket_connect(RIDL, property, init)
set_prop(RIDL, powerctl_prop)
# ANR
allow RIDL anr_data_file:dir r_dir_perms;

View File

@@ -22,8 +22,7 @@ allow rmt_storage self:capability {
};
#For set the ctl properties
unix_socket_connect(rmt_storage, property, init)
allow rmt_storage ctl_default_prop:property_service set;
set_prop(rmt_storage, ctl_default_prop)
#For Wakelocks
wakelock_use(rmt_storage)

View File

@@ -59,3 +59,4 @@ wigig u:object_r:wigig_service:s0
# DOLBY_START
media.dolby_memoryservice u:object_r:audioserver_service:s0
# DOLBY_END
enrichrcsservice u:object_r:radio_service:s0

0
common/ssr_diag.te Executable file → Normal file
View File

0
common/subsystem_ramdump.te Executable file → Normal file
View File

View File

@@ -28,11 +28,9 @@ r_dir_file(system_app, fm_data_file);
r_dir_file(system_app, bluetooth_data_file);
r_dir_file(system_app, bt_firmware_file);
allow system_app {
ctl_default_prop
fm_prop
usf_prop
}:property_service set;
set_prop(system_app, ctl_default_prop)
set_prop(system_app, fm_prop)
set_prop(system_app, usf_prop)
allow system_app {
atfwd_service
@@ -64,6 +62,9 @@ userdebug_or_eng(`
allow system_app tombstone_data_file:dir r_dir_perms;
allow system_app tombstone_data_file:file r_file_perms;
diag_use(system_app)
# allow to read ssr ramdump
allow system_app ssr_ramdump_data_file:dir r_dir_perms;
')
allow system_app cnd_data_file:dir w_dir_perms;
@@ -86,7 +87,7 @@ allow system_app usf_data_file:dir rw_dir_perms;
allow system_app usf_data_file:{ file lnk_file } create_file_perms;
#access to wifi_ftmd
allow system_app wififtmd_prop:property_service set;
set_prop(system_app, wififtmd_prop)
unix_socket_send(system_app, wififtmd, wifi_ftmd)
# allow system_app to interact with dtseagleservice
@@ -140,7 +141,7 @@ allow system_app qti_logkit_priv_socket:sock_file r_file_perms;
allow system_app wcnss_service_exec:file rx_file_perms;
# bugreport
allow system_app ctl_dumpstate_prop:property_service set;
set_prop(system_app, ctl_dumpstate_prop)
unix_socket_connect(system_app, dumpstate, dumpstate)
# allow gba auth service to add itself as system service

View File

@@ -37,16 +37,16 @@ allow system_server {
allow system_server qtitetherservice_service:service_manager find;
#For ANT tty communication and to set wc_transport prop
allow system_server {
bluetooth_prop
usf_prop
alarm_handled_prop
alarm_instance_prop
}:property_service set;
set_prop(system_server, bluetooth_prop)
set_prop(system_server, usf_prop)
set_prop(system_server, alarm_handled_prop)
set_prop(system_server, alarm_instance_prop)
# required for ANT App to connectto wcnss_filter sockets
allow system_server bluetooth:unix_stream_socket connectto;
# access to iop
allow system_server iop_socket:dir r_dir_perms;
allow system_server iop_data_file:dir r_dir_perms;
unix_socket_send(system_server, iop, dumpstate)
unix_socket_connect(system_server, iop, dumpstate)
@@ -68,7 +68,7 @@ allow system_server location_data_file:dir create_dir_perms;
allow system_server { location_app_data_file mdtp_svc_app_data_file } :file rw_file_perms;
allow system_server { location_app_data_file mdtp_svc_app_data_file } :dir r_dir_perms;
allow system_server location_socket:sock_file create_file_perms;
allow system_server location_prop:property_service set;
set_prop(system_server, location_prop)
#For wifistatemachine
allow system_server kernel:key search;
@@ -142,13 +142,13 @@ allow system_server iqfp_service:service_manager find;
unix_socket_send(system_server, seempdw, seempd)
# For shutdown animation
allow system_server ctl_bootanim_prop:property_service set;
set_prop(system_server, ctl_bootanim_prop)
# allow tethering to access dhcp leases
r_dir_file(system_server, dhcp_data_file)
# Allow system server to set fst system properties
allow system_server fst_prop:property_service set;
set_prop(system_server, fst_prop)
#allow access to fingerprintd data file
allow system_server fingerprintd_data_file:file { r_file_perms unlink };

View File

@@ -49,6 +49,12 @@ unix_socket_connect(thermal-engine, mpctl, mpdecision)
#This is to allow access to uio device
allow thermal-engine uio_device:chr_file rw_file_perms;
#Label the thermal sockets correctly
type_transition thermal-engine socket_device:sock_file thermal_socket;
userdebug_or_eng(`
diag_use(thermal-engine)
')
# To get GPU frequencies
allow thermal-engine sysfs_kgsl:file r_file_perms;

View File

@@ -9,6 +9,7 @@ r_dir_file(ueventd, wifi_data_file)
allow ueventd {
sysfs_battery_supply
sysfs_dc_supply
sysfs_thermal
sysfs_usb_supply
sysfs_socinfo

View File

@@ -5,6 +5,16 @@ unix_socket_connect(untrusted_app, mpctl, mpdecision)
# diag device node access is restricted to untrusted_app
neverallow untrusted_app diag_device:chr_file rw_file_perms;
# allow apps to read battery status
allow untrusted_app sysfs_battery_supply:dir r_dir_perms;
allow untrusted_app sysfs_battery_supply:file r_file_perms;
# allow apps to read charging status
allow untrusted_app sysfs_dc_supply:dir r_dir_perms;
allow untrusted_app sysfs_dc_supply:file r_file_perms;
allow untrusted_app sysfs_usb_supply:dir r_dir_perms;
allow untrusted_app sysfs_usb_supply:file r_file_perms;
# test apps needs to communicate with imscm
# using binder call
userdebug_or_eng(`

View File

@@ -7,8 +7,6 @@ init_daemon_domain(usb_uicc_daemon)
allow usb_uicc_daemon self:socket create_socket_perms;
allow usb_uicc_daemon usb_uicc_device:chr_file rw_file_perms;
allow usb_uicc_daemon uicc_prop:property_service set;
set_prop(usb_uicc_daemon, uicc_prop)
allow usb_uicc_daemon sysfs_usb_uicc:file rw_file_perms;
allow usb_uicc_daemon sysfs_usb_uicc:dir rw_dir_perms;
unix_socket_connect(usb_uicc_daemon, property, init)

View File

@@ -25,7 +25,5 @@ r_dir_file(usf, persist_file)
r_dir_file(usf, persist_usf_file)
# Properties
allow usf { ctl_default_prop usf_prop }:property_service set;
# Sockets
unix_socket_connect(usf, property, init);
set_prop(usf, ctl_default_prop)
set_prop(usf, usf_prop)

View File

@@ -41,7 +41,7 @@ allow wcnss_filter {
#wakelock policy
wakelock_use(wcnss_filter);
set_prop(wcnss_filter, bluetooth_prop);
set_prop(wcnss_filter, bluetooth_prop)
#For bluetooth firmware
r_dir_file(wcnss_filter, bt_firmware_file)
@@ -50,8 +50,8 @@ r_dir_file(wcnss_filter, bt_firmware_file)
allow wcnss_filter bluetooth_data_file:dir create_dir_perms;
allow wcnss_filter bluetooth_data_file:notdevfile_class_set create_file_perms;
allow wcnss_filter persist_bluetooth_file:dir r_dir_perms;
allow wcnss_filter persist_bluetooth_file:file r_file_perms;
allow wcnss_filter persist_bluetooth_file:dir r_dir_perms;
allow wcnss_filter persist_bluetooth_file:file r_file_perms;
allow wcnss_filter persist_file:dir r_dir_perms;
#diag

View File

@@ -4,7 +4,6 @@ type wcnss_service_exec, exec_type, file_type;
init_daemon_domain(wcnss_service)
net_domain(wcnss_service)
unix_socket_connect(wcnss_service, property, init)
allow wcnss_service wcnss_device:chr_file rw_file_perms;
qmux_socket(wcnss_service);
@@ -12,9 +11,8 @@ qmux_socket(wcnss_service);
allow wcnss_service wifi_data_file:dir w_dir_perms;
allow wcnss_service wifi_data_file:file create_file_perms;
allow wcnss_service system_prop:property_service set;
allow wcnss_service persist_file:dir r_dir_perms;
qmux_socket(wcnss_service);
set_prop(wcnss_service, system_prop)
allow wcnss_service persist_file:dir create_dir_perms;
allow wcnss_service self:socket create_socket_perms;
allow wcnss_service smem_log_device:chr_file rw_file_perms;
@@ -32,6 +30,7 @@ allow wcnss_service self:netlink_generic_socket create_socket_perms;
allow wcnss_service firmware_file:dir r_dir_perms;
allow wcnss_service firmware_file:file r_file_perms;
allow wcnss_service sysfs:file w_file_perms;
allow wcnss_service storage_file:dir search;
# allow access to netd
unix_socket_connect(wcnss_service, netd, netd)
@@ -41,9 +40,9 @@ allow wcnss_service fuse:dir create_dir_perms;
allow wcnss_service fuse:file create_file_perms;
allow wcnss_service vfat:dir create_dir_perms;
allow wcnss_service vfat:file create_file_perms;
# needed for wlan dynamic nv feature
allow wcnss_service persist_file:file { rw_file_perms setattr };
allow wcnss_service dynamic_nv_data_file:file r_file_perms;
allow wcnss_service dynamic_nv_data_file:dir r_dir_perms;
# This is needed for ptt_socket app to write logs file collected to sdcard
r_dir_file(wcnss_service, storage_file)
@@ -53,3 +52,5 @@ diag_use(wcnss_service)
binder_use(wcnss_service)
use_per_mgr(wcnss_service)
type_transition wcnss_service persist_file:file wifi_data_file ".genmac";

View File

@@ -42,9 +42,6 @@ allow wfdservice graphics_device:chr_file rw_file_perms;
#Allow access to encoder for YUV statistics
allow wfdservice gpu_device:chr_file rw_file_perms;
#Allow communication with init over property server
unix_socket_connect(wfdservice, property, init);
#Allow access to /dev/video/* devices for encoding/decoding
allow wfdservice video_device:chr_file rw_file_perms;
allow wfdservice video_device:dir r_dir_perms;

View File

@@ -31,6 +31,5 @@ init_daemon_domain(wifi_ftmd)
net_domain(wifi_ftmd)
set_prop(wifi_ftmd,wififtmd_prop);
set_prop(wifi_ftmd, wififtmd_prop)
allow wifi_ftmd self:capability net_admin;
allow wifi_ftmd wififtmd_prop:property_service set;

View File

@@ -27,6 +27,8 @@
###################################
# Primary storage device nodes
#
/dev/block/platform/msm_sdcc\.1/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
@@ -35,5 +37,6 @@
/dev/block/platform/msm_sdcc\.1/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/msm_sdcc\.1/by-name/cache u:object_r:cache_block_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0

View File

@@ -27,24 +27,27 @@
###################################
# Primary storage device nodes
#
/dev/block/platform/soc.0/7824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
# for wear we are still using soc not soc.0
/dev/block/platform/soc/7824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0

30
msm8909/idmap.te Normal file
View File

@@ -0,0 +1,30 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#for oemfs
allow idmap oemfs:file r_file_perms;
allow idmap oemfs:dir r_dir_perms;

29
msm8909/platform_app.te Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#for oemfs
allow platform_app oemfs:lnk_file { read getattr };

29
msm8909/priv_app.te Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#for oemfs
allow priv_app oemfs:lnk_file { read getattr };

29
msm8909/system_app.te Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#for oemfs
allow system_app oemfs:lnk_file { read getattr };

32
msm8909/untrusted_app.te Normal file
View File

@@ -0,0 +1,32 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# for oemfs
allow untrusted_app oemfs:lnk_file { read getattr };
#for regionalization data file
allow untrusted_app regionalization_data_file:file r_file_perms;

View File

@@ -29,3 +29,4 @@
allow zygote persist_file:dir r_dir_perms;
allow zygote regionalization_file:dir r_dir_perms;
allow zygote regionalization_file:file r_file_perms;
r_dir_file(zygote,oemfs);

View File

@@ -28,18 +28,19 @@
###################################
# Primary storage device nodes
#
/dev/block/platform/soc.0/7824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/cache u:object_r:cache_block_device:s0

View File

@@ -27,6 +27,4 @@
# media_codecs_eld_prop - to choose target specific media_codecs.xml
# media_settings_xml_prop - to choose target specific media_profiles.xml
allow qti_init_shell {
media_msm8939hw_prop
}:property_service set;
set_prop(qti_init_shell, media_msm8939hw_prop)

View File

@@ -32,24 +32,24 @@
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
#Using soc instead of soc.0 for 3.18 kernel
/dev/block/platform/soc/7824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0
#rawdump partition
/dev/block/platform/soc/7824900.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/sys/kernel/dload/emmc_dload u:object_r:sysfs_emmc_dload:s0

View File

@@ -28,3 +28,5 @@
# for oemfs
allow untrusted_app oemfs:lnk_file { read getattr };
#for regionalization data file
allow untrusted_app regionalization_data_file:file r_file_perms;

View File

@@ -28,31 +28,31 @@
###################################
# Primary storage device nodes
#
/dev/block/platform/soc.0/7824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc.0/7824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc\.0/7824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0
#Using soc instead of soc.0 to make it compatable with 3.18 kernel
/dev/block/platform/soc/7824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0

View File

@@ -28,11 +28,9 @@
# media_codecs_eld_prop - to choose target specific media_codecs.xml
# media_settings_xml_prop - to choose target specific media_profiles.xml
# media_msm8956_version_prop - to choose target version specific media_codecs.xml
allow qti_init_shell {
media_msm8956hw_prop
media_settings_xml_prop
media_msm8956_version_prop
}:property_service set;
set_prop(qti_init_shell, media_msm8956hw_prop)
set_prop(qti_init_shell, media_settings_xml_prop)
set_prop(qti_init_shell, media_msm8956_version_prop)
# For regionalization
allow qti_init_shell regionalization_file:dir r_dir_perms;

View File

@@ -25,6 +25,11 @@
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Allow access to /proc/PID
allow system_server appdomain:dir r_dir_perms;
allow system_server appdomain:file rw_file_perms;
# For Regionalization service
allow system_server regionalization_service:service_manager { add find };
allow system_server regionalization_file:file rw_file_perms;

29
msm8952/wfdservice.te Executable file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#Allow wfdservice to read media_msm8956hw property file
allow wfdservice media_msm8956hw_prop:file r_file_perms;

View File

@@ -32,22 +32,22 @@
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
#Using soc instead of soc.0 for 3.18 kernel
/dev/block/platform/soc/7824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/7824900.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/7824900.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/cache u:object_r:cache_block_device:s0
#rawdump partition
/dev/block/platform/soc/7824900.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/sys/kernel/dload/emmc_dload u:object_r:sysfs_emmc_dload:s0

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
# Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -25,6 +25,12 @@
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# media_codecs_eld_prop - to choose target specific media_codecs.xml
# media_settings_xml_prop - to choose target specific media_profiles.xml
# media_msm8956_version_prop - to choose target version specific media_codecs.xml
set_prop(qti_init_shell, media_settings_xml_prop)
set_prop(qti_init_shell, media_msm8953_version_prop)
# For regionalization
allow qti_init_shell regionalization_file:dir r_dir_perms;
allow qti_init_shell regionalization_file:file create_file_perms;

29
msm8953/mediaserver.te Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2017, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
allow mediaserver media_settings_xml_prop:file r_file_perms;
allow mediaserver media_msm8953_version_prop:file r_file_perms;

30
msm8953/property.te Normal file
View File

@@ -0,0 +1,30 @@
# Copyright (c) 2017, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#properites for init.qcom.sh script
type media_settings_xml_prop, property_type;
type media_msm8953_version_prop, property_type;

29
msm8953/property_contexts Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2017, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
media.settings.xml u:object_r:media_settings_xml_prop:s0
media.msm8953.version u:object_r:media_msm8953_version_prop:s0

View File

@@ -28,3 +28,5 @@
# for oemfs
allow untrusted_app oemfs:lnk_file { read getattr };
#for regionalization data file
allow untrusted_app regionalization_data_file:file r_file_perms;

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
# Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -31,3 +31,5 @@ allow zygote regionalization_file:dir r_dir_perms;
allow zygote regionalization_file:file r_file_perms;
allow zygote oemfs:dir r_dir_perms;
allow zygote oemfs:file r_file_perms;
allow zygote media_settings_xml_prop:file r_file_perms;

View File

@@ -5,22 +5,30 @@
/dev/msm_rotator u:object_r:graphics_device:s0
/dev/mdp_arb u:object_r:graphics_device:s0
/dev/mdm u:object_r:mdm_device:s0
/dev/block/bootdevice/by-name/m9kefs1 u:object_r:efs_boot_dev:s0
/dev/block/bootdevice/by-name/m9kefs2 u:object_r:efs_boot_dev:s0
/dev/block/bootdevice/by-name/m9kefs3 u:object_r:efs_boot_dev:s0
/dev/block/bootdevice/by-name/m9kefsc u:object_r:efs_boot_dev:s0
/dev/gss u:object_r:gss_device:s0
/dev/block/platform/msm_sdcc.1/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc.1/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc.1/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc.1/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/msm_sdcc.1/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/msm_sdcc.1/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/msm_sdcc.1/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/msm_sdcc.1/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/msm_sdcc.1/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
/dev/socket/mpdecision u:object_r:mpdecision_socket:s0
###################################
# Block devices
#
/dev/block/mmcblk0 u:object_r:root_block_device:s0
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/msm_sdcc\.1/by-name/m9kefs1 u:object_r:efs_boot_dev:s0
/dev/block/platform/msm_sdcc\.1/by-name/m9kefs2 u:object_r:efs_boot_dev:s0
/dev/block/platform/msm_sdcc\.1/by-name/m9kefs3 u:object_r:efs_boot_dev:s0
/dev/block/platform/msm_sdcc\.1/by-name/m9kefsc u:object_r:efs_boot_dev:s0
/dev/block/platform/msm_sdcc\.1/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/userdata u:object_r:userdata_block_device:s0
###################################
# System files
#
@@ -28,7 +36,6 @@
/system/bin/thermal-engine u:object_r:thermal-engine_exec:s0
/system/bin/qcks u:object_r:mdm_helper_exec:s0
/system/bin/efks u:object_r:mdm_helper_exec:s0
/system/bin/DR_AP_Service u:object_r:location_exec:s0
###################################
# Data files

View File

@@ -27,6 +27,4 @@
#For property starting with hw
#ctl_thermal-engine_prop - for access the thermal-engine
allow qti_init_shell {
ctl_thermal-engine_prop
}:property_service set;
set_prop(qti_init_shell, ctl_thermal-engine_prop)

View File

@@ -27,6 +27,8 @@
###################################
# Primary storage device nodes
#
/dev/block/platform/msm_sdcc\.1/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
@@ -35,5 +37,6 @@
/dev/block/platform/msm_sdcc\.1/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/msm_sdcc\.1/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/msm_sdcc\.1/by-name/cache u:object_r:cache_block_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0

View File

@@ -26,5 +26,5 @@
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#rawdump partition
/dev/block/platform/soc/7824900.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/dev/block/platform/soc/7824900\.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/sys/kernel/dload/emmc_dload u:object_r:sysfs_emmc_dload:s0

View File

@@ -27,17 +27,17 @@
###################################
# Dev block nodes
#
/dev/block/platform/soc.0/f9824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0

View File

@@ -32,30 +32,30 @@
/dev/block/mmcblk0 u:object_r:root_block_device:s0
# UFS devices
/dev/block/platform/soc.0/fc594000.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc.0/fc594000.ufshc/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc\.0/fc594000\.ufshc/by-name/logdump u:object_r:logdump_partition:s0
# eMMC devices
/dev/block/platform/soc.0/f9824900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/config u:object_r:frp_block_device:s0
/dev/block/platform/soc\.0/f9824900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0

View File

@@ -33,50 +33,50 @@
/dev/block/mmcblk0 u:object_r:root_block_device:s0
# UFS devices
/dev/block/platform/soc/624000.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/624000.ufshc/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/624000.ufshc/by-name/mdm1m9kefs1 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000.ufshc/by-name/mdm1m9kefs2 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000.ufshc/by-name/mdm1m9kefs3 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000.ufshc/by-name/mdm1m9kefsc u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000.ufshc/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/624000\.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/624000\.ufshc/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/624000\.ufshc/by-name/mdm1m9kefs1 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000\.ufshc/by-name/mdm1m9kefs2 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000\.ufshc/by-name/mdm1m9kefs3 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000\.ufshc/by-name/mdm1m9kefsc u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/624000\.ufshc/by-name/logdump u:object_r:logdump_partition:s0
# eMMC devices
/dev/block/platform/soc/7464900.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/7464900.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/7464900.sdhci/by-name/mdm1m9kefs1 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900.sdhci/by-name/mdm1m9kefs2 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900.sdhci/by-name/mdm1m9kefs3 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900.sdhci/by-name/mdm1m9kefsc u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/mdm1m9kefs1 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/mdm1m9kefs2 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/mdm1m9kefs3 u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/mdm1m9kefsc u:object_r:efs_boot_dev:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/logdump u:object_r:logdump_partition:s0
###################################
# Dev socket nodes
@@ -96,7 +96,7 @@
#
/sys/devices/virtual/graphics/fb([0-2])+/lineptr_value u:object_r:sysfs_graphics:s0
/sys/devices/soc/b00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpu_available_frequencies u:object_r:sysfs_kgsl:s0
/sys/devices/soc/b00000\.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpu_available_frequencies u:object_r:sysfs_kgsl:s0
###################################
# data files
@@ -106,5 +106,5 @@
/data/misc/qvr(/.*)? u:object_r:qvrd_data_file:s0
#rawdump partition
/dev/block/platform/soc/7464900.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/dev/block/platform/soc/7464900\.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
/sys/kernel/dload/emmc_dload u:object_r:sysfs_emmc_dload:s0

View File

@@ -25,4 +25,4 @@
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
allow qti_init_shell ctl_qvrd_prop:property_service set;
set_prop(qti_init_shell, ctl_qvrd_prop)

View File

@@ -28,26 +28,26 @@
# Dev block nodes
# UFS Devices
/dev/block/platform/soc/1da4000.ufshc/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/1da4000.ufshc/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/ssd u:object_r:ssd_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/dip u:object_r:dip_device:s0
#rawdump partition
/dev/block/platform/soc/1da4000.ufshc/by-name/rawdump u:object_r:rawdump_block_device:s0
/dev/block/platform/soc/1da4000\.ufshc/by-name/rawdump u:object_r:rawdump_block_device:s0
/sys/kernel/dload/emmc_dload u:object_r:sysfs_emmc_dload:s0
###################################

View File

@@ -30,4 +30,4 @@ allow qti_init_shell regionalization_file:dir r_dir_perms;
allow qti_init_shell regionalization_file:file create_file_perms;
# For VR
allow qti_init_shell ctl_qvrd_prop:property_service set;
set_prop(qti_init_shell, ctl_qvrd_prop)

View File

@@ -28,3 +28,5 @@
# for oemfs
allow untrusted_app oemfs:lnk_file { read getattr };
#for regionalization data file
allow untrusted_app regionalization_data_file:file r_file_perms;

9
sepolicy.mk Normal file
View File

@@ -0,0 +1,9 @@
# Board specific SELinux policy variable definitions
BOARD_SEPOLICY_DIRS := \
$(BOARD_SEPOLICY_DIRS) \
device/qcom/sepolicy \
device/qcom/sepolicy/common \
device/qcom/sepolicy/test \
device/qcom/sepolicy/$(TARGET_BOARD_PLATFORM)
-include vendor/cm/sepolicy/qcom/sepolicy.mk

View File

@@ -17,9 +17,6 @@ userdebug_or_eng(`
#Allow fido test daemons to be registered with service manager
allow fidotest fidotest_service:service_manager add;
# Allow communication with init over property server
unix_socket_connect(fidotest, property, init);
# Allow access to tee device
allow fidotest tee_device:chr_file rw_file_perms;

0
test/file_contexts Executable file → Normal file
View File

View File

@@ -45,9 +45,6 @@ userdebug_or_eng(`
#Allow test daemon to use system_server via binder to check caller identity
binder_call(qseeproxysample, system_server)
# Allow communication with init over property server
unix_socket_connect(qseeproxysample, property, init);
# Allow access to tee device
allow qseeproxysample tee_device:chr_file rw_file_perms;

View File

@@ -26,7 +26,9 @@
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
userdebug_or_eng(`
type qti-testscripts, domain, domain_deprecated, mlstrustedsubject;
# forward declaration is done in system/sepolicy to avoid neverallow issues
# type qti-testscripts, domain, domain_deprecated, mlstrustedsubject;
permissive qti-testscripts;
domain_trans(init, shell_exec, qti-testscripts)