25 Commits

Author SHA1 Message Date
Ship Hsu
ea6f9e0d1c [ALPS04021455] Fix selinux policy config for meta_tst audio part
[Detail]
Fix selinux policy config for meta_tst audio part for android P

[Solution]
Fix selinux policy config for meta_tst audio part for android P

MTK-Commit-Id: c8ad0a5f7b240cd44ca8bd961418e0ceb9b8ad65

Change-Id: Ibac06bd6122256c5067046a660b8c4e7d9de1051
CR-Id: ALPS04021455
Feature: SP META Tool
2020-01-18 10:05:18 +08:00
Chaoran Zhang
c89dbaf882 [ALPS03872369] Fix factory/meta Selinux issue
[Detail]
Due to factory/meta move to vendor partition, add losing SELinux policy

MTK-Commit-Id: 2566c46843cbe71442f428c99e51a942650b4d6b

Change-Id: Ia0771adf630084a54b86e69c5d4030a81e6982ec
CR-Id: ALPS03872369
Feature: Location Chipset Capability
(cherry picked from commit 5b0441261a079bb6d234dc4079d9321f260886ed)
2020-01-18 10:04:50 +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
Black Chen
7748e0c1b1 [ALPS03969178] wlan: factory and meta move to vendor partition
In P version, process needs add net permission to access socket.

MTK-Commit-Id: 4cd65a5adf83ee597402220297cf8d7b727f3da0

Change-Id: I39fbeb59e146fc508cc721ddb299fedc15a70a6b
Signed-off-by: Black Chen <black-ch.chen@mediatek.com>
CR-Id: ALPS03969178
Feature: [Module]Wi-Fi Driver
(cherry picked from commit 1569bcd159fe2472597e2bf2b3c5016f44d7756d)
2020-01-18 10:01:23 +08:00
Dian Wang
0db5966ac0 [ALPS03888283] Power off usb status
[Detail] Power off after usb plug out

[Solution]
Modify meta_tst.te

MTK-Commit-Id: 65137c0258d35d8f2998f6269173f00b686ee29a

Change-Id: Ib876b440249f9d3b6e9d42c1d95ef15f6ca386ef
CR-Id: ALPS03888283
Feature: SP META Tool
2020-01-18 10:00:31 +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
Gang Wei
3eb53db80f Merge "[ALPS03888283] usb close and bootprof" into alps-trunk-p0.basic
Change-Id: I74272efa2fbc552fc3d17a858b1e2c0cd545d029
MTK-Commit-Id: e022b6ddc1bfe0c931d9f998e620e2a944832eac
2020-01-18 09:59:52 +08:00
Dian Wang
37801d6a65 [ALPS03888283] usb close and bootprof
[Detail] modify sepolicy

[Solution]
modify sepolicy for read and write system and proc/bootprof

MTK-Commit-Id: 2df7f3b055778e043c9cc2ad75a2c9a7abcb7ad6

Change-Id: I3c4f4dd2435a2b2dee72c54d60e9e1adf2ec671f
CR-Id: ALPS03888283
Feature: SP META Tool
2020-01-18 09:59:47 +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
Dian Wang
12ec9305c2 [ALPS03888283] Update meta sepolicy
[Detail] modify meta_tst.te and file.te

[Solution]
P Migration meta_tst get com port type/uart port info/boot mode/usb state/usb close

MTK-Commit-Id: 650d2e874dd8e73a5b79f911ba6bb6579c7819c1

Change-Id: Ie405027bcb4b567721c531a94a3a6247fa15689b
CR-Id: ALPS03888283
Feature: SP META Tool
2020-01-18 09:56:54 +08:00
Gang Wei
0180e0d953 Merge "[ALPS03940671] Fix failure in nvram editor" into alps-trunk-p0.basic
Change-Id: Ic1b17594cabfd52aaa705c907e6ba854dbc4b72a
MTK-Commit-Id: 4f59ae69d0bab555b4046b97764e1a9f2a345821
2020-01-18 09:54:35 +08:00
Denis Hsu
986ba166ed [ALPS03940671] Fix failure in nvram editor
[Detail]
The failure comes from selinux violation.

[Solution]
allow meta_tst nvram_agent_binder:binder call;

MTK-Commit-Id: a2271c526c008e8f009452953cfd5351ed51d31d

Change-Id: I10156c9954a8e7c46de302947b9c15905267aa8c
CR-Id: ALPS03940671
Feature: NVRAM Partition
2020-01-18 09:54:34 +08:00
Guowei Wang
c7143a9b62 [ALPS03938688] Add permission to write misc
[Detail]
Add permission to allow meta tst to write misc partition

MTK-Commit-Id: 30a74689b1cbcaa5cc7b4cf159b703f2d4c868da

Change-Id: I4e8258f4daef9d1b12a152b735f416ac6ede852c
CR-Id: ALPS03938688
Feature: SP META Tool
2020-01-18 09:54:29 +08:00
Gang Wei
02e754b7b6 Merge "[ALPS03909621] Move meta_tst" into alps-trunk-p0.basic
Change-Id: I28162c4b313d21df86b0bfda80b1337ea199c36c
MTK-Commit-Id: 58be940053deb6195b5a32c8b4bc142422077661
2020-01-18 09:54:02 +08:00
Dian Wang
604717a659 [ALPS03909621] Move meta_tst
[Detail] Move meta_tst from system to vendor

[Solution]
mark not allowed sepolicy

MTK-Commit-Id: c577af5726938689d27f3f9cf94dbdd3d49037e4

Change-Id: I5f4e682abeeb0b84dfd938e697234c36edac4ae3
CR-Id: ALPS03909621
Feature: SP META Tool
2020-01-18 09:53:55 +08:00
Gang Wei
7329e46829 Merge "[ALPS03909621] Move Meta_tst" into alps-trunk-p0.basic
Change-Id: Ibfa3d0a31255ba9b169240a03a76da62745bbfe9
MTK-Commit-Id: 76130225cb40ea0864147ec339a75163409f8c79
2020-01-18 09:53:01 +08:00
Dian Wang
0fce80f644 [ALPS03909621] Move Meta_tst
[Detail] Move meta_tst from system to vendor

[Solution]
modify sepolicy

MTK-Commit-Id: 8c8bd1670f4a1ef1bce11e8791d6561acb50bf56

Change-Id: Ia003185b640bf1113323095ac86178ef0658f142
CR-Id: ALPS03909621
Feature: SP META Tool
2020-01-18 09:52:54 +08:00
Denis Hsu
aa4849e450 [ALPS03841839] Allow meta to use nvram hal
[Detail]
Allow meta to use nvram hal for accessing nvram

[Solution]
Add policy:
allow meta_tst nvram_agent_binder_hwservice:hwservice_manager find;

MTK-Commit-Id: 991c9043c122fe1d7944e3646169ce36bc2cb8b9

Change-Id: Iaa9aef7a4e7355d668b9222fad3c999d3b24d4d4
CR-Id: ALPS03841839
Feature: NVRAM Partition
2020-01-18 09:52:34 +08:00
Dian Wang
b84e8c94d9 [ALPS03909621] Move meta_tst
[Detail] Move meta_tst from system to vendor

[Solution]
modify sepolicy/basic

MTK-Commit-Id: 4bac131e38e71904dfc6f69a0b1ec15f46a08881

Change-Id: I571edd67cf3f59c293aa2aa674292380b86fcf38
CR-Id: ALPS03909621
Feature: SP META Tool
2020-01-18 09:50:34 +08:00
ZH Chen
ce3a0f44e7 [ALPS03614388] Sepolicy: Add ttyS to sepolicy
[Detail]
Add ttyS to sepolicy

MTK-Commit-Id: f51e0700ff76c53befa5c15f1bfa6d1726905fed

Change-Id: I88aaa49b470ff98fcbd0d3720c641b74ca42bdeb
CR-Id: ALPS03614388
Feature: Headset Cable/Button Detection and Reaction
(cherry picked from commit 7e314d2dbea64a05f626115e5beccce53bb2a07f)
2020-01-18 09:46:05 +08:00
Dian Wang
73695bfcce [ALPS03888283] Modify meta_tst.te
[Detail] Modify meta_tst.te for Android P

[Solution]
Add comport type and uart info sepolicy

MTK-Commit-Id: b2f1a2b46f1bc8135b98dd306ff4353b3ba5383f

Change-Id: Ib40eb5e5a9512d7d33b25b191e04eab9684fe121
CR-Id: ALPS03888283
Feature: SP META Tool
2020-01-18 09:37:36 +08:00
ming-pei.hsu
9fcff12f5c [ALPS03875603] Relabel telephony switch property
Relabel global telephony configuration properties.

MTK-Commit-Id: 2666cdeb888a5c7c0e87358766d60857cd3dc896

Change-Id: I317dd786e6ea32087a6866adeb415e35bc5017e1
CR-Id: ALPS03875603
Feature: Telephony feature switch dynamically
2020-01-18 09:34:04 +08:00
Bo Ye
3ace839be3 [ALPS03825066] Mark file context to fix build fails
Restore the policies accessing files labeled
    as proc_xxx or sysfs_xxx, but there are some
    exceptions for coredomain process, such as
    meta_tst,dump_state,kpoc_charger

MTK-Commit-Id: 7953b5203bb3cac099c3326d330643b4cd73746d

Change-Id: I4b16c09c352891783e837bea370c264966ca6d13
CR-Id: ALPS03825066
Feature: [Android Default] SELinux, SEAndroid, and SE-MTK
2020-01-18 09:29:41 +08:00
Bo Ye
5849c224e3 [ALPS03825066] P migration selinux build failed fix
1. Mark polices which accessing proc/sysfs file system
    2. Add violator attribute to modules violate vendor/system rule.

MTK-Commit-Id: 3954cad7a1428cda694d8428c2235a78aa6e7cc8

Change-Id: I401ae5b87eb9a03f324bef83c6678149606b15a8
CR-Id: ALPS03825066
Feature: [Android Default] SELinux, SEAndroid, and SE-MTK
2020-01-18 09:29:36 +08:00
Chunyan Zhang
37e0caa36e import from mediatek/master to mediatek/alps-mp-o1.mp1
Change-Id: Ic78db8195c5c51f85c9c6fd3ef8333489afd6e79
MTK-Commit-Id: 848bf57127be9d01fd1df4aab95737855456afee
2020-01-18 09:29:32 +08:00