Commit graph

99 commits

Author SHA1 Message Date
Inseob Kim
d16612cd8a Remove 28.0 compat support
Treble doesn't support U system + P vendor, so removing P (28.0)
prebuilts and compat files.

Bug: 267692547
Test: build
Change-Id: I3734a3d331ba8071d00cc196a2545773ae6a7a60
2023-04-03 15:17:03 +09:00
Gregory Montoir
ce512a168f Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6} am: f7727ace66 am: 84f6646c7c am: 8bac0a5547 am: 796f6637e4 am: 8881759651 am: ee34c61f9d am: 90aa30a199
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/16602719

Change-Id: I76f6885db97541a29e407c37d4e3da11156eb9ce
2022-01-13 00:26:55 +00:00
Gregory Montoir
8881759651 Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6} am: f7727ace66 am: 84f6646c7c am: 8bac0a5547 am: 796f6637e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/16602719

Change-Id: I76bdaca952b528a9fea775e3a0276f3be592bf33
2022-01-12 23:44:25 +00:00
Gregory Montoir
8bac0a5547 Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6} am: f7727ace66 am: 84f6646c7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/16602719

Change-Id: I11fc36fbc3d65609a3215e9cecf5ce22fb06b97e
2022-01-12 23:14:44 +00:00
Gregory Montoir
84f6646c7c Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6} am: f7727ace66
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/16602719

Change-Id: I0f2729fc6ef1737965de0e38495a4908b76890d0
2022-01-12 23:02:17 +00:00
Gregory Montoir
f7727ace66 Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6}
File accesses go through com.android.ddmlib.SyncService for CTS
ListeningPortsTest.

Bug: 201645790
Test: atest ListeningPortsTest
Ignore-AOSP-First: Fix already in AOSP
Change-Id: I0c66fb5e35cda3b1799cf003402e454d7a951e96
2022-01-12 14:34:33 +00:00
Inseob Kim
9dc6d70044 Remove 26.0 and 27.0 compat support
Treble doesn't support T system + O vendor, so removing 26.0 (N) and
27.0 (O) prebuilts and compat files.

Bug: 207815515
Test: build
Change-Id: I98d5972221a8e77f3c45fc48ff50bb2b8eb94275
2021-12-02 10:22:10 +09:00
Jeff Sharkey
a0e7a6da28 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: I0caf39b349c48e44123775d98c52a773b0b504ff
2020-07-31 12:28:11 -06:00
Martijn Coenen
4c386e10c9 Don't give uid-based categories to app_zygote and isolated processes.
The mapping of UIDs to categories can only take 16 bits, yet isolated
processes start at UID 90000. Additionally, the main purpose of these
categories was to isolate app-private storage, but since isolated
processes don't have access to app-private storage anyway, removing them
doesn't hurt.

The upside is that this allows us to remove mIstrustedsubject from the
app_zygote domain, which prevents app code running in that context from
assigning itself arbitrary categories.

Bug: 157598026
Test: inspect categories of app_zygote and children; verify Chrome works
Merged-In: Idfa8625d939cf30f3683436949bb4f335851622a
Merged-In: I608a096cecffc1c1ff837611ca500a8da3cf1320
Change-Id: I608a096cecffc1c1ff837611ca500a8da3cf1320
2020-06-10 11:56:35 +00:00
Martijn Coenen
46e512ad46 Don't give uid-based categories to app_zygote and isolated processes.
The mapping of UIDs to categories can only take 16 bits, yet isolated
processes start at UID 90000. Additionally, the main purpose of these
categories was to isolate app-private storage, but since isolated
processes don't have access to app-private storage anyway, removing them
doesn't hurt.

The upside is that this allows us to remove mIstrustedsubject from the
app_zygote domain, which prevents app code running in that context from
assigning itself arbitrary categories.

Bug: 157598026
Test: inspect categories of app_zygote and children; verify Chrome works
Merged-In: Idfa8625d939cf30f3683436949bb4f335851622a
Merged-In: I608a096cecffc1c1ff837611ca500a8da3cf1320
Change-Id: I608a096cecffc1c1ff837611ca500a8da3cf1320
2020-06-10 07:10:59 +00:00
Ioannis Ilkos
d723f38fe9 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
Merged-In: I262d8c3269d4261701361ad4b1bdc322f1f03969
Change-Id: I262d8c3269d4261701361ad4b1bdc322f1f03969
2020-04-28 07:59:39 +01:00
Ioannis Ilkos
6d89f47641 Merge "Enable tracing of the ion/ion_stat events" am: e597605e01
Change-Id: I7364756d418c170570322e14221aa0a9692fc04c
2020-04-27 14:06:04 +00: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
c6c9229cfa 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.

Merged-In: I5e783fbbe91dbe330b49fb11cd7d32ac820e7a5c
Change-Id: I5e783fbbe91dbe330b49fb11cd7d32ac820e7a5c
(cherry picked from commit 45be3aa649)
2020-04-07 16:29:50 +00:00
Collin Fijalkovich
119d0a451a Merge "Allow Traceur record the mm_event trace event." am: 25e9ff9ddc
Change-Id: I72becf852437b269aab4bf70d14810175985f22c
2020-04-01 17:14:15 +00: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
Jeff Vander Stoep
a68dd136aa Prevent apps from causing presubmit failures
Apps can cause selinux denials by accessing CE storage
and/or external storage. In either case, the selinux denial is
not the cause of the failure, but just a symptom that
storage isn't ready. Many apps handle the failure appropriately.

These denials are not helpful, are not the cause of a problem,
spam the logs, and cause presubmit flakes. Suppress them.

Bug: 145267097
Bug: 151188413
Test: build

Merged-In: If87b9683e5694fced96a81747b1baf85ef6b2124
Change-Id: If87b9683e5694fced96a81747b1baf85ef6b2124
2020-03-12 08:38:05 +00:00
Automerger Merge Worker
daa110d022 Update Q sepolicy prebuilt am: 5f6290f3a9
Change-Id: Ie2970158c52e3675e17421ef4973cc926ddd4db5
2020-02-13 04:13:10 +00:00
Automerger Merge Worker
f4ccc4ba1a Update Q sepolicy prebuilt am: 1dd6321a00
Change-Id: I8caa160f6c9e7b86f6bab5848f9027a45c0a16c5
2020-02-12 12:18:45 +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
Alex Hong
1dd6321a00 Update Q sepolicy prebuilt
This updates 29.0 api for dumpstate restart control property contexts

Bug: 147730517
Change-Id: I0aa7450dc0fb34de321cf8d2ba357b2ecabbcf43
2020-02-11 13:53:22 +08:00
Automerger Merge Worker
4e77006163 system_server: TelephonyManager reads /proc/cmdline am: 2951b4859d
Change-Id: I37906d269428d5e691395a1908aed9f647c27e11
2020-01-16 17:03:55 +00:00
Jeff Vander Stoep
2951b4859d system_server: TelephonyManager reads /proc/cmdline
Bug: 124466646
Test: build
Change-Id: Ib4868826eb153543c65503bfb4d3623c4158ffae
(cherry picked from commit 29b76e2ceec2ab1e04715657a79b6544afdf09c9)
2020-01-15 13:43:33 -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
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
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
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
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
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
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
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
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
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