sys_power access has been forbidden in Android P,
but only init/ueventd/vold damain can access
MTK-Commit-Id: e2be46ce6bae18ef7167bd3c07476e3748c3e483
Change-Id: Ic8dc8b5f9e0a5943a9837edd953b70e0170a0a00
CR-Id: ALPS04046220
Feature: Factory Mode
sys_leds access has been forbidden in Android P, but only
init/ueventd/vold damain can access
MTK-Commit-Id: 1fcd7afabaa608f6434144f16837d43a5c218df7
Change-Id: I837708bf32e95a037787ac2f23d7f58b41722735
CR-Id: ALPS04046220
Feature: Factory Mode
[Detail]
Add sepolicy for Storage item in factory mode so that factory can
access /sys/class/block/mmcblk0/.
MTK-Commit-Id: b3e289e9ea36a4d2581365a73ecae798c4fc60e0
Change-Id: I14222cef75b5e0516cb7a767cdb3487d38dbd95b
CR-Id: ALPS04046768
Feature: Factory Mode
revise selinux policy of OTG test item,
align AOSP method due to the same requirement.
(search/read USB devices)
MTK-Commit-Id: a0aed0eede4032d7ed56b7b94297a36366624d52
Change-Id: Iee584b5421069f4159879d7b5c1f4c6ee18082ae
CR-Id: ALPS04017296
Feature: Factory Mode
(cherry picked from commit ea3f52167e7e983843639b4b63b3f1b08290cbad)
[Solution]
Factory Mode needs the permission to save test report in
data/vendor, so add it
MTK-Commit-Id: 1daeb3669ade3f8213b893ae903733ca13bb9b93
Change-Id: I8005207d25fdc2bcab06dd193a3d7f7d2b521f23
CR-Id: ALPS03997985
Feature: Factory Mode
(cherry picked from commit 981cd097e413fd52a3cae2d5b8203150e9c1b45f)
(cherry picked from commit d49fb6cec0ea53e47ab72bcd5f2cbfa0dcf4eb34)
[Detail]
Add power_supply and switch permission
to get online and otg status.
MTK-Commit-Id: dad1b84ca11f7cb5dfe70f03a05b80d6250bfc7a
Change-Id: I349d8313fbf567a3289a8be54b81487cd13fa36f
CR-Id: ALPS03893656
Feature: Charger
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
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)
[Solution]
New Android not allow system process modify vendor
properties, factory mode move to vendor partition,
so remove the workaround
MTK-Commit-Id: bac8727b1a70a637eb7386213b7bf2bee2096b22
Change-Id: I360a493f770fae96f94199ae436d5e29bf752f70
CR-Id: ALPS03932298
Feature: Factory Mode
[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
[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
[Detail]
1. Backlight level test in factory mode fail due to no sepolicy
applied, and sysfs_leds is not allow to add to factory.te.
2. Vibrator test fail due to no corresponding selinux policy.
[Solution]
1. Using hidl for backlight in factory mode.
2. Add vibrator policy.
MTK-Commit-Id: 9470dca00da2fecfb373af94aae3502714d31ea3
Change-Id: I42cd45951054a267449e79f559b3761fce34d497
CR-Id: ALPS03869354
Feature: [Android Default] Backlight
[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
[Solution]
Factory mode need to get com type is USB or UART, so add the
permission in factory.te
MTK-Commit-Id: aff8a941116fde70abd5c492fa084e74d927629e
Change-Id: I0b9206bda110b9dde77168db73a8378c4a571851
CR-Id: ALPS03928691
Feature: Factory Mode
[Detail]
1. Change type name from sysfs_boot to sysfs_boot_mode
2. Add type name sysfs_boot_type
MTK-Commit-Id: 54d5bb31fc8ad1d9ac2e931fe5dc01ef4c1083cf
Change-Id: I445ecdf5a5e334a49ccc1d747daa87f6be351d20
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
CR-Id: ALPS03901606
Feature: UFS Booting
[Detail]
data_between_core_and_vendor_violators is used temporarily. We should
follow Android P SELinux rule to write sepolicy.
[Solution]
Remove data_between_core_and_vendor_violators from files which already
fix SELinux build errors
MTK-Commit-Id: 6a75842a96d8997bca10caf6ca4d5b4e7e8f68a4
Change-Id: I5e840fdf6b61d44860429a7e5c7e24c9a48a9c75
CR-Id: ALPS03800946
Feature: Treble
[Solution]
There are some build errors in factory.te, so fix
MTK-Commit-Id: db2e842e2fa353e987baa282d5c2026ae8395a61
Change-Id: I07d3906e8a934ae0e36b7c384208f2cfc8506a23
CR-Id: ALPS03788916
Feature: Factory Mode
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