Commit graph

183 commits

Author SHA1 Message Date
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
Ady Abraham
74395f1ff4 Merge "Add ro.surface_flinger.set_display_power_timer_ms to sepolicy" into qt-r1-dev 2019-07-16 22:40:52 +00:00
Daniel Rosenberg
eb1cf76b70 sepolicy: Adjust policy for migrate_legacy_obb_data.sh
Required to check if migration is necessary and migrate obb contents

Bug: 136199978
Test: make
Change-Id: I23890e4eeea1da7791e25ce5c9584b1abe94f440
(cherry picked from commit 793dc8f8da)
2019-07-16 02:55:25 +00:00
Daniel Rosenberg
0f6312f1d2 Merge "sepolicy: Adjust policy for migrate_legacy_obb_data.sh" into qt-dev am: a85c5360ab
am: 73c8c81d7e

Change-Id: I785f5c739ef9e96d0b8bc5d2939281fc5c7e8c18
2019-07-15 13:32:57 -07:00
Daniel Rosenberg
73c8c81d7e Merge "sepolicy: Adjust policy for migrate_legacy_obb_data.sh" into qt-dev
am: a85c5360ab

Change-Id: Id7800116e2ad5f2b4ce4a757b3c9c6bd61685c5e
2019-07-15 13:22:06 -07:00
Daniel Rosenberg
640ead1a51 Merge "sepolicy: Adjust policy for migrate_legacy_obb_data.sh" into qt-dev
am: a85c5360ab

Change-Id: I9cf4bf773a5c7d36922bb590f74e283c565673c8
2019-07-15 13:21:54 -07:00
Daniel Rosenberg
a85c5360ab Merge "sepolicy: Adjust policy for migrate_legacy_obb_data.sh" into qt-dev 2019-07-15 19:56:35 +00:00
Daniel Rosenberg
793dc8f8da sepolicy: Adjust policy for migrate_legacy_obb_data.sh
Required to check if migration is necessary and migrate obb contents

Bug: 136199978
Test: make
Change-Id: I23890e4eeea1da7791e25ce5c9584b1abe94f440
2019-07-12 16:35:20 -07:00
Ady Abraham
40909f65a6 Add ro.surface_flinger.set_display_power_timer_ms to sepolicy
Bug: 135550670
Test: Boot with SELinux enforcing
Change-Id: I61c30abc39909a263a2c402a5c0eb1de570748bb
2019-07-12 12:43:25 -07:00
Thierry Strudel
b8c28bdc96 Merge "SF: enable device-specific dataspace for color space agnostic surfaces" into qt-r1-dev
am: d519b1ca7c

Change-Id: I65664b9072278b2dd6d43ad564670a03defdaed7
2019-07-08 17:34:13 -07:00
Thierry Strudel
d519b1ca7c Merge "SF: enable device-specific dataspace for color space agnostic surfaces" into qt-r1-dev 2019-07-09 00:15:22 +00:00
Sidath Senanayake
0ea109059f Update API 29 prebuilts to include gpu_frequency tracepoint am: 31056ae11d am: 72883eff9c
am: b76450761a

Change-Id: I868cdaac753727f3ccaf92fceca00cbc8aabc2f1
2019-07-03 19:17:17 -07:00
Sidath Senanayake
72883eff9c Update API 29 prebuilts to include gpu_frequency tracepoint
am: 31056ae11d

Change-Id: I4ff4a43d337dff01e90fcea9d78e7eb241d4aaf5
2019-07-03 17:25:39 -07:00
Sidath Senanayake
31056ae11d Update API 29 prebuilts to include gpu_frequency tracepoint
Bug: 136289121
Change-Id: I2fb013d46ab72b29a83754b5199816d080bce534
2019-07-03 16:32:18 +01:00
Yichi Chen
39efa50184 SF: enable device-specific dataspace for color space agnostic surfaces
To reduce the DPU loading in color conversion, we enable device-specific
dataspace for color space agnostic surfaces. Since the type of surfaces
usually provide gray-level surfaces to users, it can be acceptable to
ignore the color conversion on them.

Bug: 134783740
Bug: 135140940
Test: Check ScreenDecorOverlays in expected dataspace
Test: Play HDR video on C2 and check dataspace
Change-Id: Ief32f0ff3867b2e154fecd6c9ebd6610b0e6ed11
2019-07-03 20:24:42 +08:00
Sidath Senanayake
b1d6eb979e Allow perfetto to access gpu_frequency tracepoint in user
am: 9bfaa1c4dd

Change-Id: Ie0ec9a00dab4c2d8aea365fb95b708aee8ef09d0
2019-07-02 13:00:52 -07:00
Sidath Senanayake
9bfaa1c4dd Allow perfetto to access gpu_frequency tracepoint in user
This will allow Perfetto to capture GPU frequency changes
on the target, which is useful to graphics developers
using Perfetto to profile graphics HW usage.

This change also updates the private prebuilt at version
29.0 to match the update.

Bug: 136062452
Merged-In: Idb7870b2f674f1359ef3b4487dbeff190b394248
Change-Id: Ib98ba10d96caa199d7030be3a17148045576a80c
2019-06-28 20:13:05 +01:00
Todd Kennedy
efc2dbb26e Allow rule to let settings access apex files
am: 9067699d9d

Change-Id: Id3541133ffa48e7685f8e8195f5c585ea8fe9630
2019-06-28 10:32:32 -07:00
Andrew Sapperstein
ea1bd922f6 Merge "Revert "Revert "Allow rule to let settings access apex files""" am: 6eaf8a2d62 am: 48353bf0af
am: 41ca891c57

Change-Id: Idf332f592d50734b9751b145c237f2c9d29e34fe
2019-06-28 10:06:56 -07:00
Cosmo Hsieh
1d84c81370 Merge "Revert "Allow rule to let settings access apex files"" am: 71e1c36956 am: be678acc85
am: 7f1dd65024

Change-Id: Ie1ca6f6bf2e1b7d956583a7eaa32ebbe7c04a89e
2019-06-28 09:39:54 -07:00
Andrew Sapperstein
41ca891c57 Merge "Revert "Revert "Allow rule to let settings access apex files""" am: 6eaf8a2d62
am: 48353bf0af

Change-Id: I91b9edc07fbc1cbefae611017c409a9bfd27bf0e
2019-06-28 09:30:18 -07:00
Cosmo Hsieh
7f1dd65024 Merge "Revert "Allow rule to let settings access apex files"" am: 71e1c36956
am: be678acc85

Change-Id: I29ea36768d5b129777eb41cd3275f25b14f8edf0
2019-06-28 09:16:02 -07:00
Andrew Sapperstein
a8b6c0f0bf Merge "Allow rule to let settings access apex files" am: bfe6fdedba am: f7c9b8a1fc
am: 9b6ad1d5b0

Change-Id: I8384127510e8e45821ea4ec9785e4e784135e506
2019-06-28 09:13:29 -07:00
Andrew Sapperstein
9b6ad1d5b0 Merge "Allow rule to let settings access apex files" am: bfe6fdedba
am: f7c9b8a1fc

Change-Id: Ie8a88d458f234477d2311a6a8f0f9fde3533de5c
2019-06-28 09:03:26 -07:00
Andrew Sapperstein
544a9b1c51 Revert "Revert "Allow rule to let settings access apex files""
This reverts commit e47d2365a8.

Reason for revert: Original CL was not the cause of the breakage. It went green before this revert landed. https://android-build.googleplex.com/builds/branches/aosp-master/grid?

Original CL went in 5695273.
Went green in 5695399.
Revert went in 5695588.

Change-Id: Ie4d7065fe7d3c58cdff99c2b7d76b50b941895bb
2019-06-28 15:28:28 +00:00
Cosmo Hsieh
e47d2365a8 Revert "Allow rule to let settings access apex files"
This reverts commit 0c0ba46192.

Reason for revert: <Broken build 5695273 on aosp-master on aosp_x86_64-eng>

Change-Id: I763f19aa5b72f2e1aaebbc78bb8ab3020c3d2a7b
2019-06-28 09:51:28 +00:00
Todd Kennedy
0c0ba46192 Allow rule to let settings access apex files
In order to show licensing information, we need to read it from
an asset stored in the .apex file.

Bug: 135183006
Test: Manual; settings can access apex files stored on /data
Change-Id: I71fbde6e295d9c890c9b9b0449e5150834a6680e
2019-06-27 18:34:25 +00:00
Todd Kennedy
9067699d9d Allow rule to let settings access apex files
In order to show licensing information, we need to read it from
an asset stored in the .apex file.

Bug: 135183006
Test: Manual; settings can access apex files stored on /data
Change-Id: I71fbde6e295d9c890c9b9b0449e5150834a6680e
Merged-In: I71fbde6e295d9c890c9b9b0449e5150834a6680e
2019-06-27 11:32:49 -07:00
Oliver Nguyen
bf513525a4 Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev am: 72a75ffe19
am: 75f2c87c8a

Change-Id: Iae83e01bc56d5bc0c631251be18f7395a6d1bd87
2019-06-20 16:17:04 -07:00
Oliver Nguyen
0012d6574c Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev
am: 72a75ffe19

Change-Id: I93de590b94ce57c8ad87361ddb3b6188552854c7
2019-06-20 15:42:32 -07:00
Oliver Nguyen
75f2c87c8a Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev
am: 72a75ffe19

Change-Id: I86d660a7402876aa9bfad72ef6c6e75771f376cd
2019-06-20 15:38:24 -07:00
Oliver Nguyen
72a75ffe19 Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev 2019-06-20 19:07:41 +00:00
Kevin Chyn
741f8214cb Add rules to dump hal traces am: 6d976f4d5d
am: 20ca587019

Change-Id: Ia6bd656a5cfaf4f408178352a5c164e979ad4c74
2019-06-19 19:59:58 -07:00
Kevin Chyn
15ff564438 Add rules to dump hal traces
am: 6d976f4d5d

Change-Id: Ia0e7b39d215b9306b724135f7d888593f3c76aae
2019-06-19 19:06:04 -07:00
Kevin Chyn
20ca587019 Add rules to dump hal traces
am: 6d976f4d5d

Change-Id: I7077ceb75ff9e5c4d13acebbffe03089b9952a99
2019-06-19 18:39:21 -07:00
Pirama Arumuga Nainar
b65824642b In native coverage builds, allow all domains to access /data/misc/trace
Bug: http://b/135139675

Coverage files are written to /data/misc/trace (governed by the
method_trace_data_file selinux type).  Allow all domains to access
(create directories, access files) this directory when native coverage
is enabled (by setting NATIVE_COVERAGE to true) in an userdebug or eng
build.

Also relax neverallow constraints to allow access to
method_trace_data_file for native coverage builds.

Test: Build 32-bit cuttlefish with coverage:
          m NATIVE_COVERAGE=true COVERAGE_PATHS="*"
      and verify that there are no selinux denials in kernel log and
      logcat.

Change-Id: I3fe7c77612854b9de7de7a0ddd5cbf44a2f5c21e
(cherry picked from commit ce9c0c5a5f)
2019-06-19 16:27:17 -07:00
Kevin Chyn
6d976f4d5d Add rules to dump hal traces
Test: manual
Bug: 126802513

Change-Id: If037483f305e161a158e30f6322d5e25b7770952
2019-06-19 19:55:14 +00:00
Benjamin Schwartz
f324a869a7 Merge "Add power stats HAL to ANR list" into qt-r1-dev
am: 9af52722db

Change-Id: I94fb6bd5122593180359df4437689ab912e12f9c
2019-06-19 12:07:36 -07:00
TreeHugger Robot
9af52722db Merge "Add power stats HAL to ANR list" into qt-r1-dev 2019-06-19 18:53:05 +00:00
Benjamin Schwartz
8273f1915f Add power stats HAL to ANR list
Bug: 135111122
Test: Ran "adb shell am hang" and verified that power.stats HAL
information is in /data/anr/<anr_file>
Change-Id: I60a6191626a20c737124033e8ad453fa91425e39
2019-06-19 15:36:22 +00:00
Tao Bao
1520895967 Merge "Add persist.sys.theme." into qt-dev
am: 890dba4999

Change-Id: Ia747bf55b5275a8b05a3dbb971c82747b4292807
2019-06-18 20:25:32 -07:00
Tao Bao
a999e39423 Add persist.sys.theme.
This property will be set by system_server (to indicate the currently
selected theme for device), and can be accessed by vendor init.rc.

avc:  denied  { read } for property=persist.sys.theme pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:theme_prop:s0 tclass=file

Bug: 113028175
Test: Set a vendor init trigger that waits on `persist.sys.theme`. Check
      that the trigger fires without denial.
Change-Id: Ia85b1a8dfc118efdbb9337ca017c8fb7958dc386
Merged-In: Ibb4e392d5059b76059f36f7d11ba82cd65cbe970
(cherry picked from commit 75182a1ea6)
2019-06-18 17:36:21 -07:00
Tao Bao
890dba4999 Merge "Add persist.sys.theme." into qt-dev 2019-06-19 00:36:03 +00:00
Hridya Valsaraju
351f85a4ee Add permission required by libdm_test
am: 9bb71537ac

Change-Id: I18326abc7713f95ee027e476a96ce32905a9525f
2019-06-17 21:15:34 -07:00
Hridya Valsaraju
9bb71537ac Add permission required by libdm_test
This CL fixes the following denials during libdm_test
that is part of VTS.

avc: denied { read } for comm="loop1" path=2F6D656D66643A66696C655F32202864656C6574656429
dev="tmpfs" ino=97742 scontext=u:r:kernel:s0 tcontext=u:object_r:appdomain_tmpfs:s0
tclass=file permissive=0
W loop1   : type=1400 audit(0.0:371): avc: denied { read } for
path=2F6D656D66643A66696C655F32202864656C6574656429 dev="tmpfs" ino=97742 scontext=u:r:kernel:s0
tcontext=u:object_r:appdomain_tmpfs:s0 tclass=file permissive=0

Bug: 135004816
Test: adb shell libdm_test
Change-Id: Ifb6d58ee6f032cdf3952a05667aa8696d6e2a2fa
2019-06-17 22:46:03 +00:00
Tao Bao
75182a1ea6 Add persist.sys.theme.
This property will be set by system_server (to indicate the currently
selected theme for device), and can be accessed by vendor init.rc.

avc:  denied  { read } for property=persist.sys.theme pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:theme_prop:s0 tclass=file

Bug: 113028175
Test: Set a vendor init trigger that waits on `persist.sys.theme`. Check
      that the trigger fires without denial.
Change-Id: Ibb4e392d5059b76059f36f7d11ba82cd65cbe970
2019-06-17 10:48:21 -07:00
Jeff Vander Stoep
b4ad398ca9 Merge "system_server_startup: allow SIGCHLD to zygote" into qt-dev
am: 6dc831d2fb

Change-Id: I1f83d7940955d3c20bc025f106cd9580a5811d7f
2019-06-15 17:45:03 -07:00
TreeHugger Robot
6dc831d2fb Merge "system_server_startup: allow SIGCHLD to zygote" into qt-dev 2019-06-16 00:29:00 +00:00
Jeff Vander Stoep
e0d9e50c96 system_server_startup: allow SIGCHLD to zygote
avc: denied { sigchld } for comm="main"
scontext=u:r:system_server_startup:s0 tcontext=u:r:zygote:s0
tclass=process permissive=0

Test: build
Bug: 134496658
Change-Id: I98c106b17ba1740f953c3108bd0fc927c150096f
(cherry picked from commit 67dc274f87)
2019-06-14 16:56:05 -07:00
Ryan Savitski
72f247f5ff userdebug: support perfetto traces as a section in incident reports
This set of patches adds a way for the perfetto command line client to
save a trace to a hardcoded location,
/data/misc/perfetto-traces/incident-trace, and call into incidentd to
start a report, which will include said trace in a new section.

This is not a long-term solution, and is structured to minimize changes
to perfetto and incidentd. The latter is currently architected in a way
where it can only pull pre-defined information out of the system, so
we're resorting to persisting the intermediate results in a hardcoded
location.

This will introduce at most two more linked files at the same time.

Bug: 130543265
Bug: 134706389
Tested: manually on crosshatch-userdebug
Merged-In: I2aa27e25f0209b3a5cdf5d550d0312693932b808
Change-Id: I2aa27e25f0209b3a5cdf5d550d0312693932b808
(cherry picked from commit ce3a33ff18)
2019-06-07 16:59:49 +01:00
Tri Vo
6cbe828e13 Reland "Add 29.0 mapping files" am: 50aa029f4b
am: 5d1701a3ee

Change-Id: Ibdfcb99c0a49eca4107ea19e06e480d9a893a34a
2019-06-02 18:14:46 -07:00
Tri Vo
50aa029f4b Reland "Add 29.0 mapping files"
Steps taken to produce the mapping files:

1. Add prebuilts/api/29.0/[plat_pub_versioned.cil|vendor_sepolicy.cil]
plat_pub_versioned.cil contains all public attributes and types from Q
Leave vendor_sepolicy.cil is empty.

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

This change also enables treble_sepolicy_tests_29.0 and installs
29.0.cil mapping file onto the device.

Bug: 133155528
Bug: 133196056
Test: m treble_sepolicy_tests_29.0
Test: m 29.0_compat_test
Test: m selinux_policy
Change-Id: I9e83e9bf118c8b8f8fcf84d5c0dcb6eb588e0d55
2019-06-01 17:20:34 -07:00
Tri Vo
336d0fed4e Reland "Fake 29.0 sepolicy prebuilts"
I took current AOSP policy as base, then removed sepolicy so that the
set of type and attributes was a subset of types and attributes in Q
sepolicy, with exception of those that have not yet been cleand up in
current AOSP:

mediaswcodec_server
netd_socket
mediaextractor_update_service
thermalserviced
thermalserviced_exec

Bug: 133196056
Test: n/a
Change-Id: I863429d61d3fad0272c1d3f1e429cd997513a74a
Merged-In: I3e091652fa8d1757b1f71f7559186d5b32f000d5
2019-06-01 17:20:18 -07:00
Tri Vo
9c253a7a5a Merge "Revert "Add 29.0 mapping files"" am: 6d47c27458
am: a0f8c64834

Change-Id: Ia077642a42c86a970335e97b4129b637ce2c9a9f
2019-05-28 18:29:16 -07:00
Tri Vo
6d47c27458 Merge "Revert "Add 29.0 mapping files"" 2019-05-29 01:12:15 +00:00
Tri Vo
bf5ef59e10 Merge "Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts"" 2019-05-29 01:12:15 +00:00
Tri Vo
8043136f7f Revert "Add 29.0 mapping files"
This reverts commit 5702e9d758.

Reason for revert: breaks build

Change-Id: I2a1772545ec4aae8723ecce93c9bf9d49e905986
2019-05-29 01:10:07 +00:00
Tri Vo
9ea0af1e9a Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts"
This reverts commit bc8dc3aa9d.

Reason for revert: breaks build

Change-Id: I4163392f3a0f56add59d0d2a1d2695cee09cc32e
2019-05-29 01:09:16 +00:00
Tri Vo
f8433484fa Merge changes from topic "29_mapping" am: da3fbc60cc
am: c00dd3a1ea

Change-Id: Ia075ae7e61a73d244ab03678238240cd5617b556
2019-05-28 17:17:57 -07:00
Tri Vo
c00dd3a1ea Merge changes from topic "29_mapping"
am: da3fbc60cc

Change-Id: I4bc844582f8825496b92b9adc7477c21bf460905
2019-05-28 17:13:58 -07:00
David Anderson
51fae66027 Allow init to mkdir inside /data/gsi.
Bug: 133435561
Test: adb shell gsi_tool install
Change-Id: Iaa610c72d8098e157bb89e321624369f86f4ea19
Merged-In: Iaa610c72d8098e157bb89e321624369f86f4ea19
2019-05-28 13:42:42 -07:00