Commit graph

316 commits

Author SHA1 Message Date
Peiyong Lin
37dea070ce Update sepolicy for GPU profiling properties.
A device must indicate whether GPU profiling is supported or not through
setting these two properties properly. CTS needs to read these two
properties in order to run corresponding compliance tests. Hence need to
update sepolicy for these two properties.

Bug: b/157832445
Test: Test on Pixel 4
Change-Id: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
Merged-In: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
2020-06-05 12:03:29 -07:00
Mohammad Samiul Islam
476d616e43 Create sepolicy for allowing system_server rw in /metadata/staged-install
Bug: 146343545
Test: presubmit
Change-Id: I4a7a74ec4c5046d167741389a40da7f330d4c63d
Merged-In: I4a7a74ec4c5046d167741389a40da7f330d4c63d
(cherry picked from commit be5c4de29f)
2020-06-03 10:59:02 +01:00
Victor Hsieh
f6756b9fb3 Remove unused sepolicy by fsverity_init
Keystore access was reverted a while ago in ag/10598373.

Bug: 112038744
Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.ApkVerityInstallTest
Test: atest GtsPlayFsiTestCases GtsPlayFsiHostTestCases ApkVerityTest
Change-Id: Ic170624f5a718806adf54ab12e8f4b9f17c7775b
2020-05-28 17:58:16 -07:00
Inseob Kim
ace36abec5 Add 30.0 mapping files
Steps taken to produce the mapping files:

1. Add prebuilts/api/30.0/plat_pub_versioned.cil from the
/vendor/etc/selinux/plat_pub_versioned.cil file built on rvc-dev with
lunch target aosp_arm64-eng. Add prebuilts/api/30.0/vendor_sepolicy.cil
as an empty file.

2. Add new file private/compat/30.0/30.0.cil by doing the following:
- copy /system/etc/selinux/mapping/30.0.cil from rvc-dev aosp_arm64-eng
device to private/compat/30.0/30.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 30 sepolicy.
Find all such types using treble_sepolicy_tests_30.0 test.
- for all these types figure out where to map them by looking at
29.0.[ignore.]cil files and add approprite entries to 30.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_30.0 and installs
30.0.cil mapping file onto the device.

Bug: 153661471
Test: m treble_sepolicy_tests_30.0
Test: m 30.0_compat_test
Test: m selinux_policy
Change-Id: I6dfae41fbd5f245119ede540d2c321688d6e7929
2020-05-11 04:32:00 +00:00
Inseob Kim
5131ff6544 DO NOT MERGE Add fake 30.0 prebuilts
This prebuilt is based on the AOSP policy, but slightly manipulated so
that the set of types and attributes are identical with R policy.

Following types are removed.

boot_status_prop
dalvik_config_prop
gnss_device
surfaceflinger_color_prop
surfaceflinger_prop
systemsound_config_prop
vold_config_prop
vold_status_prop

Following type is renamed.

wificond_service -> wifinl80211_service

Bug: 153661471
Test: N/A
Change-Id: I018d5e43f53c2bf721db1d13f5f4be42b9782b29
2020-05-11 13:18:52 +09:00
Ioannis Ilkos
2e03e77f0a Enable tracing of the ion/ion_stat events
These events supersede the ion_heap_grow / ion_heap_shrink events on
4.19+ kernels.

Bug: 154302786
Test: build, run on cuttlefish with new kernel, ls -lZ /sys/kernel/tracing/events/ion/ion_stat/enable
Change-Id: I262d8c3269d4261701361ad4b1bdc322f1f03969
2020-04-24 10:10:35 +01:00
Collin Fijalkovich
2d1e4ce577 Allow Traceur record the mm_event trace event.
Bug: 150130660
Test: Took a trace with Traceur and verified mm_event records
were included when the memory category was enabled.

Change-Id: Iea39467d0d37d12a78fbde57b8d9649fad45b652
2020-03-30 16:23:32 -07:00
Pawin Vongmasa
76d7cf961e Allow XML file paths to be customized with sysprop
Three properties are declared as vendor-init-settable:
ro.media.xml_variant.codecs
ro.media.xml_variant.codecs_performance
ro.media.xml_variant.profiles

media_codecs.xml can now be named
media_codecs${ro.media.xml_variant.codecs}.xml

media_codecs_performance.xml can now be named
media_codecs_performance${ro.media.xml_variant.codecs_performance}.xml

media_profiles_V1_0 can now be named
media_profiles${ro.media.xml_variant.profiles}.xml

Test: Rename "media_codecs.xml" to "media_codecs_test.xml",
set ro.media.xml_variant.codecs to "_test", then
call "stagefright -i".

Test: Rename "media_codecs_performance.xml" to
"media_codecs_performance_test.xml",
set ro.media.xml_variant.codecs_performance to "_test", then
run android.media.cts.VideoDecoderPerfTest.

Test: Rename "media_profiles_V1_0.xml" to "media_profiles_test.xml",
set ro.media.xml_variant.profiles to "_test", then
run vts_mediaProfiles_validate_test.

Bug: 142102953
Change-Id: I407a0a327fcc8e799bb4079b11048a497565be48
2020-03-18 06:02:55 -07:00
Automerger Merge Worker
daa110d022 Update Q sepolicy prebuilt am: 5f6290f3a9
Change-Id: Ie2970158c52e3675e17421ef4973cc926ddd4db5
2020-02-13 04:13:10 +00:00
Alex Hong
5f6290f3a9 Update Q sepolicy prebuilt
This updates 29.0 api for dumpstate restart control property contexts

Bug: 147730517
Change-Id: I0aa7450dc0fb34de321cf8d2ba357b2ecabbcf43
2020-02-12 12:07:43 +08:00
Automerger Merge Worker
5872ab6c4b Merge "Allow adb forward to traced consumer socket" into qt-qpr1-dev am: 49807a6c26
Change-Id: I74e1c98fa883a287139a714b1e263ad85c5e8bf0
2020-01-11 00:45:21 +00:00
TreeHugger Robot
49807a6c26 Merge "Allow adb forward to traced consumer socket" into qt-qpr1-dev 2020-01-11 00:32:36 +00:00
Hector Dearman
c0bad7b98f Allow adb forward to traced consumer socket
Currently shell can connect to the traced_consumer_socket allowing it to
configure/start/stop and collect traces. This allows a host tool (e.g. Android Studio or
https://ui.perfetto.dev) to connect to the device via adb and collect traces. It would
be better if rather than executing shell commands the host tool could directly communicate
with the consumer socket. This is possible using adb forward:

adb forward tcp:9903 localfilesystem:/dev/socket/traced_consumer

However in this case adbd is connecting to the socket - not shell.

This CL allows adbd to connect to the socket which allows host tools to collect
traces without having to do everything though shell commands.

Note that this patch also has additional change on prebuilts in order to
backport.

Denial:
08-30 11:28:05.809 10254 10254 W adbd    : type=1400 audit(0.0:1129): avc: denied { write } for name="traced_consumer" dev="tmpfs" ino=6719 scontext=u:r:adbd:s0 tcontext=u:object_r:traced_consumer_socket:s0 tclass=sock_file permissive=0

Test: Cherry pick CL to master, make, flash
adb logcat | grep denied
adb forward tcp:9903 localfilesystem:/dev/socket/traced_consumer

Bug: b/139536756
Change-Id: Ie08e687c0b06d0e1121009e8cd70319a8f907ae2
(cherry-picked from commit b56a49d979)
2020-01-10 09:17:27 -08:00
Automerger Merge Worker
ffbc6ab3ad Revert "Revert "Allow dumpstate to dumpsys gpu"" am: b5c47df035
Change-Id: Ic486302dbcf93e2987fe250ef87bc23b4e9d5897
2020-01-10 08:15:48 +00:00
Yiwei Zhang
b5c47df035 Revert "Revert "Allow dumpstate to dumpsys gpu""
This reverts commit 6daec46264.

Reason for revert: b/147458874

Bug: 132402890
Test: build passes on coral-userdebug

Change-Id: Ibcbc06e99561be424aa953e62985abb5b5864c56
2020-01-09 18:51:24 -08:00
Automerger Merge Worker
c188e2deca Merge "Create new system property type for Factory OTA could write system property" am: a75fa8058c am: 150bdab002
Change-Id: I092b89446bf37e9fa23163519835491c5e4cb07c
2019-12-15 19:38:22 +00:00
Treehugger Robot
a75fa8058c Merge "Create new system property type for Factory OTA could write system property" 2019-12-15 19:26:39 +00:00
Henry Tung
6d57b494c0 Create new system property type for Factory OTA could write system property
Due to Factory OTA client install in product partition but it also declare coredomian in
its sepolicy setting. That will let Factory OTA unable to find a property type could write system property.
But now Factory OTA have a restore NFC wake function need to write system property for communicate with bootloader.
So we need to create a new property type in system framework which could allow Factory OTA client to write system property.

Bug: 145178094
Test: Manual
Change-Id: Ic549cc939893ec67a46bf28a23ebeb9f9b81bd0b
2019-12-13 09:39:19 +00:00
Automerger Merge Worker
2225c5ea6e Allow vendor_init to modify pm.dexopt.disable_bg_dexopt am: 4c06707b5e
Change-Id: I7cded22281ade995b060641209ae84d37c55a583
2019-12-11 21:55:50 +00:00
Jaegeuk Kim
aec7c5fed4 Merge "block: allow init.rc to tune max discard size" 2019-12-06 21:59:19 +00:00
Eric Jeong
4c06707b5e Allow vendor_init to modify pm.dexopt.disable_bg_dexopt
- Android Auto has disabled background dexopt (b/142753051).
- The modification is in car_base.mk which is included by vendor device
file.
- So, vendor_init needs to be able to modify
pm.dexopt.disable_bg_dexopt property.

Bug: 145348176
Test: Check pm.dexopt.disable_bg_dexopt is set to true in Android Auto
device.

Cherry-Picked-From: 03b1992d0bf363e438b0fd7efca1e2a1d7249320
Change-Id: I84d19ea62f1abe1bf9206a60ca103614616e312b
2019-12-06 10:40:12 -08:00
Jaegeuk Kim
a47abdbe16 block: allow init.rc to tune max discard size
Init.rc requires to limit max discard to avoid long latencies.

Change-Id: Idf3b295ac15efd5edf979ca896fdf826b9fc3c99
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-12-04 12:26:19 -08:00
Florian Mayer
d77fec4796 Allow shell to unlink perfetto_traces_data_file.
Bug: 141704436
Test:
blueline:/ $ ls -lZa /data/misc/perfetto-traces
total 186
drwxrwx-wx  2 root   shell u:object_r:perfetto_traces_data_file:s0    3488 2019-09-30 14:12 .
drwxrwx--t 46 system misc  u:object_r:system_data_file:s0             3488 2019-09-30 14:08 ..
-rw-------  1 shell  shell u:object_r:perfetto_traces_data_file:s0  180467 2019-09-30 14:12 profile-shell
blueline:/ $ rm /data/misc/perfetto-traces/profile-shell
rm ro /data/misc/perfetto-traces/profile-shell (y/N):y
blueline:/ $ ls -lZa /data/misc/perfetto-traces
total 6
drwxrwx-wx  2 root   shell u:object_r:perfetto_traces_data_file:s0  3488 2019-09-30 14:13 .
drwxrwx--t 46 system misc  u:object_r:system_data_file:s0           3488 2019-09-30 14:08 ..
blueline:/ $

Cherry pick of c069bc134e

Change-Id: Ia710068c3cca53a415347fb0a7064740e500d15d
Merged-In: Ia710068c3cca53a415347fb0a7064740e500d15d
2019-10-29 10:32:35 +00:00
Xin Li
7883f6b3c1 DO NOT MERGE - Merge QD1A.190821.011 into stage-aosp-master
Bug: 141248619
Change-Id: I3186316d366cc7c9fee29cef5d2cd6ef37ff3926
2019-10-14 22:53:21 +00:00
Pierre-Hugues Husson
03f2bb6792 Merge "Mark mediacodec_2{6,7,8} as hal_omx_server" am: cc3f943436 am: 0608b6cdfb
am: 95dbe16e99

Change-Id: Ied2eaa4c259bec3460926d4ad892514bd6e6e5e7
2019-10-01 19:22:00 -07:00
Pierre-Hugues Husson
95dbe16e99 Merge "Mark mediacodec_2{6,7,8} as hal_omx_server" am: cc3f943436
am: 0608b6cdfb

Change-Id: I0d3e5a2becbe1f94f91aafa1defb7f63fe9af14e
2019-10-01 19:15:58 -07:00
Pierre-Hugues Husson
0608b6cdfb Merge "Mark mediacodec_2{6,7,8} as hal_omx_server"
am: cc3f943436

Change-Id: Ie70d97c980afe0d830344c011408eb9110f73752
2019-10-01 19:09:57 -07:00
Pierre-Hugues Husson
1019870fba Mark mediacodec_2{6,7,8} as hal_omx_server
The commit 7baf725ea6 broke OMX on O/O-MR1(/P?) vendors.
Previous to this commit, all OMX codecs had to use "mediacodec" type,
after this commit, omx codecs just had to get hal_omx_server attribute.
This commit left to the vendor the charge of adding "hal_omx_server"
attribute to mediacodec.

However this can't work on non-Q vendors.

On P vendor, versioned_plat_pub contains the appdomain <=> mediacodec
allows, so OMX isn't technically broken on those devices.
But to ensure it won't break in the future, mark 28's mediacodec as
hal_omx_server as well

This fixes broken OMX decoding on O/O-MR1 vendors, failing with the
following denial:
avc: denied { call } for comm=4E444B204D65646961436F6465635F scontext=u:r:platform_app:s0:c512,c768 tcontext=u:r:mediacodec:s0 tclass=binder permissive=0

Bug: 141186440

Change-Id: I018f8d9aabc77e7ea86ca14734b1ab2edfdf8ed1
2019-10-01 20:48:01 +00:00
Paul Crowley
908a9c6f16 Merge "Export vold FDE algorithm properties" am: 8cb6460058 am: fa2cc0539e
am: fb0c7a23e2

Change-Id: I853eda4a989719d6112ffb2d14d64c54c32c3709
2019-09-25 10:16:17 -07:00
Paul Crowley
fb0c7a23e2 Merge "Export vold FDE algorithm properties" am: 8cb6460058
am: fa2cc0539e

Change-Id: I72c5085569b8a8e9fd9ea8777979d1ddf44de0f2
2019-09-25 10:09:38 -07:00
Paul Crowley
fa2cc0539e Merge "Export vold FDE algorithm properties"
am: 8cb6460058

Change-Id: I912cca35978e934dfc1458cee946f0f0c24760f5
2019-09-25 10:02:47 -07:00
yuguoxu
a894a1aa66 Export vold FDE algorithm properties
ro.crypto.fde_algorithm
ro.crypto.fde_sector_size
ro.crypto.volume.contents_mode

These properties were not added to sepolicy export2vold. vold can't access
crypto algorithm type when flashing a GSI image and when the properties are in
/vendor/build.prop. This prevents FDE from working.

Bug: 141518844
Change-Id: I234bda439f6be7a2211a194856baf75800396232
Signed-off-by: yuguoxu <yuguoxu@allwinnertech.corp-partner.google.com>
2019-09-25 16:29:54 +00:00
Paul Crowley
859f9211d8 Allow toolbox to rm -rf /data/per_boot
Bug: 140882488
Test: create files and dirs in /data/per_boot, check they're removed.
Cherry-Picked-From: 2367ba358f
Merged-In: Idf0ba09cbe51cbff6a7b2a464c4651a1f7fcf343
Change-Id: Idf0ba09cbe51cbff6a7b2a464c4651a1f7fcf343
2019-09-17 18:44:13 +00:00
Roland Levillain
695e2c15bb Allow dexoptanalyzer to mmap files with Linux 4.14+ that it can already access.
am: d8a9a493c5

Change-Id: I016d5846fc9bc21c46882c16ff17de535fa5974e
2019-09-13 12:30:17 -07:00
Roland Levillain
d8a9a493c5 Allow dexoptanalyzer to mmap files with Linux 4.14+ that it can already access.
SELinux has a separate file mmap permission in 4.14+ kernels. Add this
to dexoptanalyzer(d) in cases where it could already access files (in
particular, secondary dex files).

Addresses denials of the form:

  avc: denied { map } for […] path="/data/data/[…]" […]
  scontext=u:r:dexoptanalyzer:s0 tcontext=u:object_r:app_data_file:s0

(cherry picked from commit c72b7d1731)

Test: Reproduce steps in bug 138683603 on a device with a 4.14+ kernel
      and check the absence of SELinux denials
Bug: 138683603

Change-Id: Ieba53eb431c0ba3914dcb5e5abdae667bd063555
2019-09-13 13:45:40 +01:00
Xin Li
36edee480d Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: Ie43761a96540ce489b65d9ba467ebdfa2dfe6066
Merged-In: I87a1ce741a77f5bd3a4ea81f1c519f7c1955a3c6
2019-09-08 13:07:03 -07:00
Paul Lawrence
9f38ee2021 Merge "Fix ext4/metadata/udc problem" am: 4d40aefa4b am: 31e6fa2075
am: 8134966f21

Change-Id: Ifdb5da049d4c1cd60e68d684b7e96ddf6c287500
2019-08-27 09:09:59 -07:00
Paul Lawrence
31e6fa2075 Merge "Fix ext4/metadata/udc problem"
am: 4d40aefa4b

Change-Id: I6d445070b533d3353a714fb043102c0be00cc883
2019-08-27 08:44:48 -07:00
Paul Lawrence
4d40aefa4b Merge "Fix ext4/metadata/udc problem" 2019-08-27 15:21:58 +00:00
Daniel Solomon
8e65285ec5 selinux: Update Q sepolicy prebuilt
am: 3248182855

Change-Id: I35a78cd9208439c9fc89c20ea546081fb5d4b4f2
2019-08-26 23:44:02 -07:00
Xin Li
65227a4be7 DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I4a36357883efe369754e3ec08541e05f847b28ce
2019-08-23 06:45:27 +00:00
Daniel Solomon
732de6c2da selinux: Update Q sepolicy prebuilt
am: 3248182855

Change-Id: I0bb332cbb95c64d67c62527c5b34ff0298102e3d
2019-08-21 20:05:23 -07:00
Daniel Solomon
3248182855 selinux: Update Q sepolicy prebuilt
Tag gpu_service as app_api_service. This is the corresponding api 29.0
change to the public service.te from commit aosp/1105058
(I30a951cd712b0ae4aacd2c4d6d42e74fac5c0707).

Bug: 139685237
Test: m selinux_policy
Change-Id: Ia23cdd5f59b40a3e99cae424d9cf41d5e7442631
2019-08-21 17:10:37 -07:00
Carmen Jackson
afac97a16d Allow Traceur to record the suspend_resume trace event
This should be available in user and userdebug builds.

Bug: 137289935
Test: Alongside atrace changes, recorded a trace using Traceur and
verified that the tracepoints were included in the recorded trace in
both user and userdebug builds.

Change-Id: I6131557bdd0a298be9e75b39759599b189b9b988
Merged-In: I6131557bdd0a298be9e75b39759599b189b9b988
2019-08-13 17:13:00 +00:00
Carmen Jackson
dc43a0049b Allow Traceur to record the suspend_resume trace event am: 1e414b5355 am: 5860205f67
am: e46d7c3ce4

Change-Id: Icc034caa25d2cc57ff2988e7a89e33a8f5aa0dec
2019-08-13 01:35:36 -07:00
Carmen Jackson
e46d7c3ce4 Allow Traceur to record the suspend_resume trace event am: 1e414b5355
am: 5860205f67

Change-Id: I3881e0a4acac844f93822e9a28fe052d199c5c40
2019-08-13 01:28:53 -07:00
Carmen Jackson
5860205f67 Allow Traceur to record the suspend_resume trace event
am: 1e414b5355

Change-Id: I32de6f61520474f1cb9895e416ba409847082e6d
2019-08-13 01:13:23 -07:00
Carmen Jackson
1e414b5355 Allow Traceur to record the suspend_resume trace event
This should be available in user and userdebug builds.

Bug: 137289935
Test: Alongside atrace changes, recorded a trace using Traceur and
verified that the tracepoints were included in the recorded trace in
both user and userdebug builds.

Change-Id: I6131557bdd0a298be9e75b39759599b189b9b988
2019-08-09 10:56:15 -07:00
Paul Lawrence
37739146b6 Fix ext4/metadata/udc problem
Test: Cannot currently test since no device supports this combo
Bug: 137924328
Change-Id: Ie59e6c37e293c983e99618eacda9fd09c2ce01ed
2019-08-08 08:55:29 -07:00
Ady Abraham
f8aebbaa5d Merge "Add ro.surface_flinger.set_display_power_timer_ms to sepolicy" into qt-r1-dev
am: 74395f1ff4

Change-Id: I2abb139843bc425d276145d27d00c0f3acf5d30a
2019-07-16 15:54:52 -07:00