83 Commits

Author SHA1 Message Date
Jianping Jiang
11f88203b8 [ALPS04255502] lbs_dbg: move lbs_dbg sepolicy to system
Move lbs_dbg sepolicy to system for System/vendor Layer decouple

MTK-Commit-Id: a4638ef15ca2020d8f7eba6ab2d053d7716d0ad4

Change-Id: I4ecfb1276b47ec75bab4c72ff04ebeb035d757b3
CR-Id: ALPS04255502
Feature: Location Aiding
2020-01-18 10:14:12 +08:00
dengwei.xu
c6ed642277 [ALPS04285435] EM hidl server sepolicy
Fix the EM hidl server sepllicy build errro

MTK-Commit-Id: 8b95a2baf6f04fd1c8ec5fa6548f78203a581e3d

Change-Id: Iac820d493352c5d37991c23cb10c01f9615ed888
CR-Id: ALPS04285435
Feature: Engineering Mode
2020-01-18 10:13:51 +08:00
mtk11285
a250fc423c [ALPS03806577] catch manual coredump fail
add some rules for aee_aedv/aee_aed to read /proc/*/exe

MTK-Commit-Id: a1ee357e85a32beded54046bb1b638eb8fe4b3c9

Change-Id: Ideeb8002a9d1b9b166709442195124cce8e4e427
CR-Id: ALPS03806577
Feature: Android Exception Engine(AEE)
2020-01-18 10:13:24 +08:00
mtk11285
0b7ed7df47 [ALPS03806577] add DropBoxReceiver feature
1. allow dropboxreceiver to receive dropbox message
2. allow aee_aed to read packages.list

MTK-Commit-Id: 03d7fff0159d697f13fd574b132503ba6063cfab

Change-Id: Id717233c2ade4b0b8c3d6a8319647ff6e783a60a
CR-Id: ALPS03806577
Feature: Android Exception Engine(AEE)
2020-01-18 10:13:14 +08:00
bo.shang
1aa4b07238 [ALPS04382560] Add selinux permission
Add map permission for kernel API dump error

MTK-Commit-Id: 07c68bea7a790c49b3870393bf046688a19b2e58

Change-Id: I01b3f39bcc365ccedb1fc029b92307e91bece05a
CR-Id: ALPS04382560
Feature: Network Log Tool
2020-01-18 10:11:31 +08:00
yuhui.zhang
03dda6b5df [ALPS04316338] EM: battery temperature settings
[Detail]
Add sepolicy rule to set battery temperature

MTK-Commit-Id: 9fcd042bd04632fa952af7ac51833695b8a50f7c

Change-Id: I82b8b6649849403a1b1cd8a2e5093a3664719bc2
CR-Id: ALPS04316338
Feature: Engineering Mode
2020-01-18 10:09:55 +08:00
Larry Liang
10cad58309 Merge "[ALPS04325589] AEE: remove unuse rules" into alps-trunk-q0.basic
Change-Id: Ia92a7b6be46762af09a64e2c7e92607a1c734858
MTK-Commit-Id: e98481807b7d50c68a8e5bd8926df0dcf4398017
2020-01-18 10:09:48 +08:00
mtk11285
85b3620577 [ALPS04325589] AEE: remove unuse rules
1. remove unuse rules
2. allow dumpstate to r/w /proc/msdc_debug
3. allow aee_core_forwarder to access hwservicemanager_prop
4. allow aee_core_forwarder to connect aee_aed socket

MTK-Commit-Id: a43676c734f74636df65e59cdcace017eca79706

Change-Id: I3c45ed83499c0079b38af34cf462dcd80fec501d
CR-Id: ALPS04325589
Feature: Android Exception Engine(AEE)
2020-01-18 10:09:44 +08:00
Shanshan Guo
427c135bd6 [ALPS04340791] SEPOLICY: workaround fix BASIC build error
[Detail]
Only BASIC Sepolicy need to be applyed for BASIC,
we separate basic/bsp sepolicy for BASIC.
This workaround is for fixing the build errors that
cause by the declarations were defined in bsp/ dir
and neverallow rules.

MTK-Commit-Id: f1ed54e84b85f73e20dcc8c2ac5f0c42fddedc77

Change-Id: I568873fcc272d04b018efc4be00924b751bb3775
CR-Id: ALPS04340791
Feature: [Android Default] SELinux, SEAndroid, and SE-MTK
2020-01-18 10:09:28 +08:00
bo.shang
aa52b35cf1 [ALPS04365111] Fix selinux error
Add socket map permission

MTK-Commit-Id: 5a8050e1faffde6adc067eea37fe99434a2f88a5

Change-Id: Ie3009b81bdae187422fb26644834bec2d145d491
CR-Id: ALPS04365111
Feature: Network Log Tool
2020-01-18 10:09:15 +08:00
Elvin Lin
9f2e49db1c [ALPS04324880] em_svr: add map permission for shell_exec
[Detail]
Add map permission for shell_exec to let Batterylog.java
can set command from shell.
Modify the permission list to rx_file_perms.

MTK-Commit-Id: d8f72393dddc2787c88bb2141594319bfe473e9a

Change-Id: I04b1b5c056223e30d5d8b6f8fe7a503afc28b521
CR-Id: ALPS04324880
Feature: Power Delivery
(cherry picked from commit 63fd26ecb2014b5a03db649b332858943a6893a9)
2020-01-18 10:08:19 +08:00
Po Hu
4f97064d35 [ALPS04209994] Android Q migration prepare
[Detail]
Fix build warning like:
WARNING unrecognized character at token ^M on line XXX:

[Solution]
Use dos2unix to update files

MTK-Commit-Id: 8285bcfe7a30349f3188c9b29e4b8da9ee2c1280

Change-Id: I7773e243028a2275d11782885b4bc299d5c5d043
CR-Id: ALPS04209994
Feature: build process
2020-01-18 10:08:11 +08:00
Juju Sung
12bc2025e2 [ALPS04239425] Sepolicy: fix undefined type declration
[Detail]
Unknown type:untrusted_v2_app,alarm_device,qtaguid_proc,mtd_device
Duplicated type:proc_slabinfo

MTK-Commit-Id: 11ccfcffb994452eb58a697e94a8da748ac73933

Change-Id: I2e847041d14d6b6613044cfaa98f242b7fd9381a
CR-Id: ALPS04239425
Feature: Build System
2020-01-18 10:08:05 +08:00
mtk16229
0016bf873f [ALPS04112420] add mota selinux limited
[Detail]add mota selinux linited

MTK-Commit-Id: 7762b88c2e81f42f95232f00c1c2cf0e81d47421

Change-Id: I5071ca451510cd14a8ccf53e8e77c3e77f50816b
Signed-off-by: mtk16229 <Heaven.Zhang@mediatek.com>
CR-Id: ALPS04112420
Feature: MOTA (Mediatek Over The Air)
2020-01-18 10:07:40 +08:00
mtk11515
4990fac4dd [ALPS04085854] make service auto run
[Solution] Make service auto run.

MTK-Commit-Id: 5e7859bac9dd91730634cfa9623936ee8f630fef

Change-Id: I6ae5c40a6d12d077bfe8093cdf7f4d9b32698a82
CR-Id: ALPS04085854
Feature: MTKLogger
(cherry picked from commit a8d2a91b7b056b3825e55dbbad4045dff361d08e)
2020-01-18 10:06:54 +08:00
mtk12101
f20ee5e7ab [ALPS04017619] SELinux policy rule optimization
Spending more bootup time after label kernel interface node
in file_contexts, there is another way to label kerner interface
node on genfs_contexts file. When move the label rule to
genfs_contexts file, the bootup time will speed more than 500ms.

MTK-Commit-Id: e237c9367e74f2953b843cc9224a98b4e7cfddbc

Change-Id: I1a1e369c3eaaf359c3bf7c051793a3ffba4c71fc
CR-Id: ALPS04017619
Feature: [Android Default] SELinux, SEAndroid, and SE-MTK
2020-01-18 10:06:36 +08:00
mtk11285
7f6df66a44 [ALPS04056497] cts testVendorTypeViolators case fail
[Detail] aee_aedv_exec is defined in system.img, and when AOSP system.img
is replaced, cts will fail if aee_aedv_exev is referenced in vendor.img.

MTK-Commit-Id: 178b71c788561cea1336d2c62b67dd324ecf6e8b

Change-Id: I200ff7cd55597de05d5412677b140809e941a192
CR-Id: ALPS04056497
Feature: Android Exception Engine(AEE)
2020-01-18 10:06:12 +08:00
mtk13858
d7105292b6 [ALPS04013134] CCCI:fix android p selinux issue v2
[Detail]
fix code defect to avoid vts fail

MTK-Commit-Id: 8910b5c642fd4ebb0910eda3f6b49c38f91f4483

Change-Id: I95cd0a11b4bc9d8145b7017ffbf4b171751ef32c
Signed-off-by: mtk13858 <derong.liu@mediatek.com>
CR-Id: ALPS04013134
Feature: Modem Interface Driver
2020-01-18 10:04:57 +08:00
mtk11515
1ac3d6456a [ALPS03992062] split .te file
[Solution] split .te file to non_plat,private,public folder.

MTK-Commit-Id: a044f6ece04b84ceaf8809076d3167700e351bbf

Change-Id: I6282abddb5f43008a724e34367963a16b3f1e4d4
CR-Id: ALPS03992062
Feature: MTKLogger
2020-01-18 10:04:53 +08:00
bo.shang
2c8ef11be1 [ALPS04007645] Modem log start fail in meta mode
Fix SELinux error

MTK-Commit-Id: 239b554dcd68299e2cb3ec58b39214e552136ac9

Change-Id: Ic4800bbce6b03c83563e5171a76e331859154b8d
CR-Id: ALPS04007645
Feature: Modem Log Tool
2020-01-18 10:04:33 +08:00
Juju Sung
1457d484c4 Merge "[ALPS03998186] Treble: Fix selinux issue for booting with GSI" into alps-trunk-p0.basic
Change-Id: I820b3784907771fec7f06ed07d771daf3de30c9e
MTK-Commit-Id: d1df5b415bc9376c099e38d7ccaa6db58bd64fdb
2020-01-18 10:04:14 +08:00
Sam-KY Lin
da660a3653 [ALPS03998186] Treble: Fix selinux issue for booting with GSI
[Detail]
SEPolicy rule that put in plat_private folder will be placed in system image.
So, It will be overwrited after flashing GSI.

[Solution]
Move MTK rules to non_plat folder instead which will be placed in
vendor image.

MTK-Commit-Id: 91e5023b67f0ce18e5e364adce5da5413c71fc69

Change-Id: I372b059e44c4bbfd6d4a92a790846b2228213b88
CR-Id: ALPS03998186
Feature: Treble
2020-01-18 10:04:12 +08:00
Yuhui Zhang
c7fd91bdb5 Merge "[ALPS03992559] EM HIDL - selinux" into alps-trunk-p0.basic
Change-Id: I4fd3bd2554bf61653f45af1c5aa73d58c35ef65e
MTK-Commit-Id: c2b6c5d2327253281e4dc125e045e6752b348fe4
2020-01-18 10:04:10 +08:00
dengwei.xu
12c8c8e1f4 [ALPS03992559] EM HIDL - selinux
Add selinux support for HIDL

MTK-Commit-Id: f58b6fd1c6c053780475ad44ac648f6231af0d94

Change-Id: I77a9bdffbcb8b837e78055ef8bfb9b9d328232b2
CR-Id: ALPS03992559
Feature: Engineering Mode
2020-01-18 10:04:08 +08:00
Larry Liang
e2b7fd0b00 Merge "[ALPS03997871] allow MobileLog exec logcat -L" into alps-trunk-p0.basic
Change-Id: I366928a1a654959932a1bc39a77530f3f5c7a8ce
MTK-Commit-Id: 9d2d735377baa0a913c902f58108a7af5c10e6a3
2020-01-18 10:04:06 +08:00
Yuxian Xu
000e69e1bc [ALPS03997871] allow MobileLog exec logcat -L
Mobile_log_d exec logcat -L to get last Android Log

MTK-Commit-Id: e51d67ff3d1024ec236d26f66d5286a1aed6fb75

Change-Id: Id2f2aceb501a5324ff642f34455080ccbd54bf34
CR-Id: ALPS03997871
Feature: Mobile Log Tool
2020-01-18 10:04:04 +08:00
Chaoran Zhang
c30a82525d [ALPS03872369] Add lbs_dbg selinux policy
[Detail]
Add lbs_dbg selinux policy

MTK-Commit-Id: c316e3908f5d5ddbf8f543ef08a4759159b798ba

Change-Id: Id6311f353df61ca0fa9a108c832d790b228a5bba
CR-Id: ALPS03872369
Feature: Location Chipset Capability
2020-01-18 10:03:58 +08:00
Eddie Hung
d51b584df5 Merge "[ALPS03974529] Add policy for audio hidl service" into alps-trunk-p0.basic
Change-Id: Ieff4f111e7304c7a4ca1d264dd3590dfc207e166
MTK-Commit-Id: efa57894f27833ba4d26a25d0e84b4f33e4ff29d
2020-01-18 10:03:32 +08:00
Eddie Hung
7970815eea [ALPS03974529] Add policy for audio hidl service
[Detail]
Allow mtk audio hidl service to read "ro.audio.usb.period_us"

MTK-Commit-Id: 5f794920af51f2f7900212f8a6ba7ecb3b64c919

Change-Id: I2ace425bb53190c10b397fca92420d35af764738
CR-Id: ALPS03974529
Feature: [Android Default] USB Audio
2020-01-18 10:03:30 +08:00
Lili Lin
56b7e390c4 [ALPS03959715] move audio-daemon to vendor
1. Per customer request, move audio-daemon to vendor partition.
2. Implement GetVolumeIndex

MTK-Commit-Id: 4f61171696528b80f9973cb1e3820c9f91116755

Change-Id: Id82b004a39b1217b543c42b9f66de72fb1f76a59
CR-Id: ALPS03959715
Feature: Audio Tuning Tool
2020-01-18 10:02:48 +08:00
mtk12101
722798a334 [ALPS03982747] Remove unused sepolicy rules
Some rules is no need any more, need to remove it.

MTK-Commit-Id: 49685f1299d990a7195a2d54b955517d8f2cc699

Change-Id: I4a590ad781589cf94989ce72c88751ac10b82eae
CR-Id: ALPS03982747
Feature: [Android Default] SELinux, SEAndroid, and SE-MTK
2020-01-18 10:02:25 +08:00
mtk13799
86ea78a67a [ALPS03886692] property rename for Android P
[Detail]property rename for Android P

MTK-Commit-Id: 8cc2c773156fcfa1757a261b960f88d7a8b9d4f6

Change-Id: I42fab46ce67a240d619e0a74cb7fa8834ac74bc6
Signed-off-by: mtk13799 <xin.huang@mediatek.com>
CR-Id: ALPS03886692
Feature: [Android Default]Dedicated APN for Tethering
2020-01-18 10:01:57 +08:00
Light Hsieh
f798441035 [ALPS03957630] Selinux: rules for meta_clr_emmc and mke2fs
[Detail]
Because Android P impose so many restrictions, it is difficult for
meta mode or factory mode to format partitions. A new design is
adopted as follows:
1. Meta mode or factory mode write all 0 to first 4KB of target
   partition.
2. When entering kernel booting, the partition mount process in the
   original init flow find that XXX partition is wiped and automatically
   format XXX partition.
In step-1 described above, selinux rules shall be added for meta_tst or
  factory.
In step-2 described above, selinux rules shall be added for mke2fs.

MTK-Commit-Id: 7e9bbd418ca6353ba89ecffdc016c78504583bf3

Change-Id: I3dd869c57107b0ebebf3134f69c50744df8f8ff9
CR-Id: ALPS03957630
Feature: SP META Tool
2020-01-18 10:00:04 +08:00
Chang-An Chen
862cd6725f [ALPS03869354] fix tpd auto test fail in factory mode
[Detail]
Fix tpd auto test fail in factory mode due to sysfs nodes
are not allowed to read directly.

[Solution]
update touch setting sysfs policy and add to factory mode

MTK-Commit-Id: d8733ca0938653098f5ec1f5462c1723d8f67894

Change-Id: I3fb6a46cfbf02fe050174501a2606404a53bb2ad
CR-Id: ALPS03869354
Feature: [Android Default] CapTouch
2020-01-18 09:59:45 +08:00
mtk11285
5c7942168d [ALPS03948310] add sepolicy
[Detail]
1. add sepolicy for aeev
2. add sepolicy for dumpstate hal service

[Solution]

MTK-Commit-Id: c9a341625f9f299341a0ba5ec02db3ffb2cf7edc

Change-Id: Ida4c75fc762293005b1f7942dd23efb9540d5e13
CR-Id: ALPS03948310
Feature: Android Exception Engine(AEE)
2020-01-18 09:59:28 +08:00
Juan Rong
4fef319c9b [ALPS03951067] EM: selinux for battery
[Detail]
allow EM access battery info

MTK-Commit-Id: cdcee8fe601a984182ded4522acadfe6b70dec66

Change-Id: Ic55a779d3d6883d1dd0828258ff3bf084c8d7706
CR-Id: ALPS03951067
Feature: Fuel Gauge
2020-01-18 09:58:35 +08:00
Chunlan Wang
c93290f067 [ALPS03932298] Factory Mode: move to vendor partition
[Solution]
Factory mode should build in vendor partiton, so move
factory from system partition to vendor partition

MTK-Commit-Id: c55354593a97aed3af9d0b2584037d03d3d2669c

Change-Id: I5a607b60f9ac974380c5e440a6fa0c51797d6b1b
CR-Id: ALPS03932298
Feature: Factory Mode
2020-01-18 09:58:07 +08:00
Dengwei Xu
e6294bbe3f Merge "[ALPS03914002] Add sepolicy rule for EM" into alps-trunk-p0.basic
Change-Id: I5c768f5071bb72fb6f9381e7bfada2d5560b010e
MTK-Commit-Id: 458bba642d58b96a046575e9e696a854e4599f77
2020-01-18 09:57:48 +08:00
yuhui.zhang
7952f3fc53 [ALPS03914002] Add sepolicy rule for EM
[Detail]
1. Add SEPolicy rule for battery log
2. Add SEPolicy rule for EM setting property

MTK-Commit-Id: e59cf4c98b75739a0e2e58f098174747951bda5d

Change-Id: Ic6cc12fe0a26d2fad5dd6196d598a21fd96b25cb
CR-Id: ALPS03914002
Feature: Engineering Mode
2020-01-18 09:57:40 +08:00
Denis Hsu
756781b45f Merge "[ALPS03943904] Act storagemanagerd as vold context" into alps-trunk-p0.basic
Change-Id: Iad441b1c1dae1037468921f9fb4ea0260abc0f67
MTK-Commit-Id: 773b91887f849e607c7a27d460eb8935e8e09c60
2020-01-18 09:57:27 +08:00
Denis Hsu
0b03f73f0c [ALPS03943904] Act storagemanagerd as vold context
[Detail]
In order to meet selinux limitation, storagemanagerd act as
vold context to mount storages

[Solution]
Add the following line in file_contexts.
/system/bin/storagemanagerd u:object_r:vold_exec:s0

MTK-Commit-Id: 0b309fd0afc84f3da0ea91a324dca6f824366537

Change-Id: I68e568b8e7d37d218ae88e82cdd509c32abaea66
CR-Id: ALPS03943904
Feature: Mobile Log Tool
2020-01-18 09:57:15 +08:00
Linger Lee
b4490de2ae [ALPS03946137] vibrator: fix selinux issue
[Detail]
Add new path for P0

MTK-Commit-Id: ea1afedcb6f95a885827b002df7f6f2ea5328c77

Change-Id: Iea0ba7fcafaac70c8ec3980fc0a4753b7cbbbc91
CR-Id: ALPS03946137
Feature: [Module]Vibrator
2020-01-18 09:56:52 +08:00
bo.shang
276c0764fc [ALPS03943443] Modem Log start USB logging fail
Fix SELinux errors:
   1. Set vendor property
   2. Set USB property

[Solution] Add permission

MTK-Commit-Id: f9bea7ca32b8ca70e6f015d786753a43491810aa

Change-Id: I3e7cfc80eb34c3430a059b57afa1474ee49e75b1
CR-Id: ALPS03943443
Feature: Modem Log Tool
2020-01-18 09:55:57 +08:00
Ji Zhang
3dd4f888c5 [ALPS03890586] add setgid for aee_core_forwarder
[Detail]
Add setgid selinux rule for aee_core_forwarder to make it can add
group to avoid dac_override

MTK-Commit-Id: e25e5ae4c8f3b760c112efd8c8809d5e9790b967

Change-Id: I90a4af9b3fe86d7699f1fa3adbd9f402c4de88ac
CR-Id: ALPS03890586
Feature: Android Exception Engine(AEE)
2020-01-18 09:55:08 +08:00
Bo Shang
2049228bfd [ALPS03938824] MTKLogger cant start modem log
revert code

MTK-Commit-Id: bd9f5e9d378074d75b691d9a7d1d6db913e0f743

Change-Id: I13df8d2f18bb34d3f6aac4a024dd3ce84b963c7b
CR-Id: ALPS03938824
Feature: Modem Log Tool
2020-01-18 09:53:42 +08:00
bo.shang
1228b041a5 [ALPS03938824] MTKLogger cant start modem log
SElinux opened and selinux error caused many fail

[Solution] Add permission for setpropty

MTK-Commit-Id: d866e6798a30826ae8fc2f163541f7701481c0d0

Change-Id: I8f1513896afb4a751d1838200e03e41be8763d1d
CR-Id: ALPS03938824
Feature: Modem Log Tool
2020-01-18 09:53:36 +08:00
bo.shang
06cc7d74f4 [ALPS03939119] MTKlogger start network log fail
Root cause: SElinux error

[Solution] Add permission

MTK-Commit-Id: 70e0e5269742da491f639e9fdb620c0824b0d97f

Change-Id: I13dd8542b51d36789c6d83c7eebfb8cec8105782
CR-Id: ALPS03939119
Feature: Network Log Tool
2020-01-18 09:53:33 +08:00
Guoyi Qu (曲国毅)
7c346aab63 Merge "[ALPS03921396] emdlogger SELinux error" into alps-trunk-p0.basic
Change-Id: I5e5f12436d4d6984d8725ce1fdd82da6840581f4
MTK-Commit-Id: b35204130c2bdd173178550fcd11c7c476e4115a
2020-01-18 09:53:12 +08:00
bo.shang
38ae679b9b [ALPS03921396] emdlogger SELinux error
1. Fix emdlogger selinux avc error on P

[Solution] Modify SELinux file

MTK-Commit-Id: dc981c59fc3c45b273ae31cb14269ada31ae668e

Change-Id: Iaaf4198be65ad728b95497e2767e1b4c254b18d2
CR-Id: ALPS03921396
Feature: Modem Log Tool
2020-01-18 09:53:08 +08:00
mtk11285
c058e72a5b [ALPS03841705] AEE porting on Android P about selinux
[Detail] add some rules

MTK-Commit-Id: 350fa2869fe9390bcb7ca562af5230a2ad711640

Change-Id: Ib4966ae42233270eb7a65ab036903791767b5ec8
CR-Id: ALPS03841705
Feature: Android Exception Engine(AEE)
2020-01-18 09:52:43 +08:00