Commit graph

31642 commits

Author SHA1 Message Date
Yi-Yo Chiang
0b240d0270 Add system_ext_userdebug_plat_sepolicy.cil for GSI
system_ext_userdebug_plat_sepolicy.cil is a copy of
userdebug_plat_sepolicy.cil (debug_ramdisk) that's installed in the
system_ext partition.
The build rule is gated by a BoardConfig variable, so products other
than GSI cannot accidentally install this module.

*Unclean cherry-pick* prebuilts/api/32.0/private/file_contexts is
updated in this change, which is not in the original change.

Bug: 188067818
Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash
  gsi_arm64-user from master, device can boot and `adb root` works
Change-Id: I43adc6adad5e08dcc8e106d18fdacef962310883
Merged-In: I43adc6adad5e08dcc8e106d18fdacef962310883
(cherry picked from commit 814f3deb94)
2021-11-24 14:43:03 +08:00
Inseob Kim
451eeed439 Add 31.0 mapping files
Steps taken to produce the mapping files:

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

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

This change also enables treble_sepolicy_tests_31.0 and installs
31.0.cil mapping file onto the device.

Bug: 189161483
Bug: 207344718
Test: m treble_sepolicy_tests_31.0
Test: m 31.0_compat_test
Test: m selinux_policy
Change-Id: I6264b9cf77b80543dfea93157b45b864157e2b14
Merged-In: I6264b9cf77b80543dfea93157b45b864157e2b14
(cherry picked from commit 4f20ff73ee)
2021-11-22 12:11:07 +00:00
Michael Wright
189f7f2eea Add SEPolicy prebuilts for Sv2 (API 32)
Bug: 204295952
Test: Build
Change-Id: Id5c21d8de931fb6be01c7d1f9f6fe19dc6977de7
Merged-In: Id5c21d8de931fb6be01c7d1f9f6fe19dc6977de7
2021-11-09 19:45:38 +00:00
Kelvin Zhang
7ee542530e Reland: Add ro.vendor.build.dont_use_vabc to property_contexts am: 6a70197dae am: 72a49cc20e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/16006752

Change-Id: Idfdcd2e801100b3124210e087473fabdc684d60e
2021-10-08 22:18:25 +00:00
Kelvin Zhang
72a49cc20e Reland: Add ro.vendor.build.dont_use_vabc to property_contexts am: 6a70197dae
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/16006752

Change-Id: Iadfcd16537ad92f90fcf1c920c1437d6c68edd46
2021-10-08 22:07:58 +00:00
Kelvin Zhang
6a70197dae Reland: Add ro.vendor.build.dont_use_vabc to property_contexts
Bug: 185400304
Buh: 201957239

Test: mm

This CL was merged to sc-dev, but reverted due to wrong Merged-In tag.
It resulted in mismatch between sc-dev and other branches like aosp,
internal main, etc. This change needs to reland on sc-dev.

Ignore-AOSP-First: already merged in AOSP; this is a reland

(cherry picked from commit 407b21b3cd)
Change-Id: I66703249de472bc6da16b147a69803ff141c54d3
2021-10-08 00:58:09 +00:00
Enrico Granata
ad4874479d Introduce ro.boot.hypervisor properties
In virtualized deployments of Android, it can be useful to have
access to a description of the hypervisor/host environment being
used to run the guest OS instance.

This is represented by means of a new system property
ro.boot.hypervisor.version, which is meant to convey a
free-form descriptor of the current host/hypervisor version

The property is meant to be provided to Android as androidboot.
by whatever host-specific means are used to supply other boot
properties to the target Android instance. Access could be later
opened to other vendor processes to set if needed for specific
setups where init is not a sufficiently-early stage for
host/guest communication. Such setups are not known at this time.

For a native Android incantation, the property defaults to
being missing

Other properties could later be added to this same namespace
and context if they turn out to be useful in specific scenarios.

Bug: 178749018
Test: build cuttlefish
Change-Id: Id721c14ef1958b525c2866a660dcae8fd176a79d
Merged-In: Id721c14ef1958b525c2866a660dcae8fd176a79d
2021-10-06 16:44:21 -06:00
Gregory Montoir
ac15c76a51 Allow adbd to access /proc/net/{tcp,tcp6,udp,udp6}
File accesses go through com.android.ddmlib.SyncService for CTS
ListeningPortsTest.

Bug: 193151739
Test: atest ListeningPortsTest
Change-Id: I0c66fb5e35cda3b1799cf003402e454d7a951e96
Merged-In: I0c66fb5e35cda3b1799cf003402e454d7a951e96
2021-10-05 16:19:03 -07:00
Jean-Michel Trivi
2abed0062f Spatial audio: add property for spatializer effect
Ignore-AOSP-First: confidential feature

Add a property to be read by system_server's AudioService that
indicates whether a spatializer effect is available on the device.
If true, spatialization functionality will be initialized.

Bug: 188502620
Test: adb shell dumpsys audio | grep -A 4 Spatial
Change-Id: I759e2fb32087b6e8e2a578b6ec804fb7c4f1d4f1
2021-09-21 23:16:11 -07:00
Suren Baghdasaryan
17ffc49ef1 sepolicy updates for adding native flag namespace for lmkd am: 0e0d0ad652
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15786441

Change-Id: I858b8b4b6471f5ff8c1bc3d053ef6cd163c2ecef
2021-09-15 23:19:17 +00:00
Changyeon Jo
2e3a4b20ec Allow automotive_display_service to use EGL files
Bug: 199739880
Test: m -j selinux_policy and run evs_app
Change-Id: If0df74ad4708b00f213c42516eb404b98873cf4f
Merged-In: If0df74ad4708b00f213c42516eb404b98873cf4f
2021-09-13 17:58:39 -07:00
Ytai Ben-tsvi
9a62cce4e2 Merge "Allow audioserver to access sensorservice" into sc-v2-dev 2021-09-09 20:56:34 +00:00
Ytai Ben-Tsvi
17ad5ac371 Allow audioserver to access sensorservice
This is required for getting head-tracking data for Immersive Audio.

Bug: 188502620
Test: log-based verification of sensor data coming through.
Change-Id: I183ce5106401ae7853096e80a8650cc7919e6221
Merged-In: I183ce5106401ae7853096e80a8650cc7919e6221
2021-09-09 18:48:08 +00:00
Suren Baghdasaryan
0e0d0ad652 sepolicy updates for adding native flag namespace for lmkd
sepolicy updates for running lmkd experiments.

Bug: 194316048
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I21df3b76cce925639385111bd23adf419f026a65
Merged-In: I21df3b76cce925639385111bd23adf419f026a65
2021-09-08 21:12:09 +00:00
TreeHugger Robot
6cd4a4ed14 Merge "Revert "Reland: Add ro.vendor.build.dont_use_vabc to property_contexts"" into sc-dev am: 842d75a7e6 am: 4212480957
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15694312

Change-Id: I25a9c1c15f8c54260a9f58627b14c627ff0d7c08
2021-08-31 17:51:21 +00:00
TreeHugger Robot
4212480957 Merge "Revert "Reland: Add ro.vendor.build.dont_use_vabc to property_contexts"" into sc-dev am: 842d75a7e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15694312

Change-Id: Ie010ffef7581f9be23bb9b0c870bd684afcb857b
2021-08-31 17:37:44 +00:00
TreeHugger Robot
842d75a7e6 Merge "Revert "Reland: Add ro.vendor.build.dont_use_vabc to property_contexts"" into sc-dev 2021-08-31 17:22:23 +00:00
Kelvin Zhang
e52b7716cb Revert "Reland: Add ro.vendor.build.dont_use_vabc to property_contexts"
This reverts commit 2e7abeb570.

Reason for revert: b/197917451

Bug: 197917451

Change-Id: I570fe494976b3676074a9b8794859db75b827120
2021-08-30 16:26:48 +00:00
Kelvin Zhang
d03ee76b3a Reland: Add ro.vendor.build.dont_use_vabc to property_contexts
Bug: 185400304
Test: mm


Mergged-In: I7d06d0c1d137471a0d7b78678a372b29158f1be7

Ignore-AOSP-First: Already landed in AOSP
Bug: 197917451

Change-Id: Iae58ef223073f7d4c3135f7387fc28d813291be6
2021-08-27 16:12:31 +00:00
Orion Hodson
fb7a946b06 odrefresh: add permission to sigkill child processes am: 86477d7933 am: 851dac17cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15612002

Change-Id: I378ad0eaecb74ef837964483574d4e297370f7ba
2021-08-19 10:43:55 +00:00
Orion Hodson
851dac17cc odrefresh: add permission to sigkill child processes am: 86477d7933
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15612002

Change-Id: I29ad69445853fc3f6c88a2b6920a2f049378c5d7
2021-08-19 10:29:23 +00:00
Orion Hodson
86477d7933 odrefresh: add permission to sigkill child processes
(cherry picked from commit 522bcbe9e6)
Ignore-AOSP-First: cherry-pick from aosp
Bug: 177432913
Bug: 196969404
Test: manually decrease odrefresh compilation timeout, no avc denied
Change-Id: I7dec0a3d82c82b5dea4b5f3f38d9170bb1f40840
2021-08-19 10:13:43 +00:00
Rick Yiu
7743ee84fe Merge "Move mediaprovider_app to common code" into sc-v2-dev 2021-08-18 03:46:01 +00:00
Eric Biggers
6be42a1190 Restore permission for shell to list /sys/class/block am: ff53c4d16e am: c225ddc528
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15591821

Change-Id: I31aeec99aa091195ffdd402fe84c66d8f7734961
2021-08-17 21:21:29 +00:00
Eric Biggers
c225ddc528 Restore permission for shell to list /sys/class/block am: ff53c4d16e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15591821

Change-Id: If260f9208196270947ddc53bf6314a63295985b4
2021-08-17 21:03:26 +00:00
Eric Biggers
ff53c4d16e Restore permission for shell to list /sys/class/block
As a side effect, commit ec50aa5180 ("Allow the init and apexd
processes to read all block device properties") removed permission for
the shell context to list the /sys/class/block directory.  There is a
CTS test that relies on this (CtsNativeEncryptionTestCases), so grant
permission to do this again.

Bug: 196521739
Bug: 194450129
Test: Before this change, 'adb shell ls /sys/class/block' fails.
      After this change, 'adb shell ls /sys/class/block' succeeds.
Change-Id: I87cb90880f927db1385887b35c84f4dd7f95021b
Merged-In: I87cb90880f927db1385887b35c84f4dd7f95021b
2021-08-17 13:38:41 -07:00
Rick Yiu
e7d24d42a1 Move mediaprovider_app to common code
The policy under device folder will be removed for GSI, so move the
policy to common code.

Bug: 196326750
Test: build pass
Change-Id: I9544db1771ba7b94a98913bf892386f95cf919be
Merged-In: I9544db1771ba7b94a98913bf892386f95cf919be
2021-08-17 21:03:26 +08:00
Xin Li
65eea2c956 [automerger skipped] Merge "Merge stage-aosp-sc-ts-dev before making it an upstream" into sc-dev am: dc023642a7 -s ours am: 3819a3de89 -s ours
am skip reason: Merged-In Ia7ca93a3390b2f59e894ca7ebce4cae9c0f83d28 with SHA-1 ee495b312c is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15550183

Change-Id: Iebb0d16526afd26b0f7950d5368351c574fd90e2
2021-08-13 21:20:29 +00:00
Xin Li
3819a3de89 [automerger skipped] Merge "Merge stage-aosp-sc-ts-dev before making it an upstream" into sc-dev am: dc023642a7 -s ours
am skip reason: Merged-In Ia7ca93a3390b2f59e894ca7ebce4cae9c0f83d28 with SHA-1 ee495b312c is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15550183

Change-Id: Ic067a57e767f712830047c8b28cdd109998c52bb
2021-08-13 20:53:33 +00:00
Xin Li
dc023642a7 Merge "Merge stage-aosp-sc-ts-dev before making it an upstream" into sc-dev 2021-08-13 20:38:32 +00:00
The Android Open Source Project
40dfafd5fe [automerger skipped] Merge ab/7633965 am: 50da921941 -s ours
am skip reason: Merged-In I2fb0e94db9d35c1f19ca7acb2f541cfb13c23524 with SHA-1 4a664e8d5d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15547068

Change-Id: I560d546e0ae6d5ef7ae7c13409cb0b96d8c8dc85
2021-08-13 19:33:46 +00:00
Xin Li
8f0ed948cd Merge stage-aosp-sc-ts-dev before making it an upstream
Bug: 169893837
Merged-In: Ia7ca93a3390b2f59e894ca7ebce4cae9c0f83d28
Change-Id: I0e24283919d90a8cae59df3b2a43f6f240f25dfb
2021-08-13 18:29:50 +00:00
Paul Crowley
29f3d47b70 Merge "Revert^2 "Allow vold to deleteAllKeys in Keystore"" into sc-dev am: f87e5bafb5 am: be75810100
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15547742

Change-Id: I07ecb09691acf812737222a81c691fdea164213f
2021-08-13 03:01:43 +00:00
Paul Crowley
be75810100 Merge "Revert^2 "Allow vold to deleteAllKeys in Keystore"" into sc-dev am: f87e5bafb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15547742

Change-Id: Ic94a52122a3b4f83d0fda09baaafdbbc1da44991
2021-08-13 02:46:44 +00:00
Paul Crowley
f87e5bafb5 Merge "Revert^2 "Allow vold to deleteAllKeys in Keystore"" into sc-dev 2021-08-13 02:33:43 +00:00
Paul Crowley
449a6e1351 Revert^2 "Allow vold to deleteAllKeys in Keystore"
Revert submission 15536724-revert-15521094-vold-deleteAllKeys-GDJSMLXRVZ

Reason for revert: Underlying KM problem fixed
Reverted Changes:
I8e2621bef:Revert "Detect factory reset and deleteAllKeys"
I546b980bb:Revert "Add deleteAllKeys to IKeystoreMaintenance"...
I1ed68dd9e:Revert "Allow vold to deleteAllKeys in Keystore"

Bug: 187105270
Test: booted Cuttlefish twice
Change-Id: I6a9981ace72b133082d1d600f8e45b55bdb34b44
2021-08-13 01:44:22 +00:00
The Android Open Source Project
50da921941 Merge ab/7633965
Bug: 169893837
Merged-In: I2fb0e94db9d35c1f19ca7acb2f541cfb13c23524
Change-Id: I07f5519f066bb06c094fbe8b2f2229093cabe8a5
2021-08-12 22:21:31 +00:00
TreeHugger Robot
4a1ad72cae Merge "sepolicy: Add supporting for property name with phone id" into sc-dev am: b7d0820dcf am: 978a4f445e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15529323

Change-Id: Icf8a219a5aa020ff7120b1183c50b03d34c1ba8b
2021-08-12 07:58:25 +00:00
TreeHugger Robot
978a4f445e Merge "sepolicy: Add supporting for property name with phone id" into sc-dev am: b7d0820dcf
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15529323

Change-Id: I80901d9d4a42421a782b1798044107350856b04c
2021-08-12 07:36:25 +00:00
TreeHugger Robot
b7d0820dcf Merge "sepolicy: Add supporting for property name with phone id" into sc-dev 2021-08-12 07:24:24 +00:00
Shawn Willden
e0dec2c372 Merge "Revert "Allow vold to deleteAllKeys in Keystore"" into sc-dev am: 9de6c0e94c am: e752bb5937
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15536475

Change-Id: I6d3ea4b89d17cae81e528ab2d6663ae1ff7b8054
2021-08-12 01:57:03 +00:00
Shawn Willden
e752bb5937 Merge "Revert "Allow vold to deleteAllKeys in Keystore"" into sc-dev am: 9de6c0e94c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15536475

Change-Id: I967bc18be23df6a3d08465cee202731b8c8b29ca
2021-08-12 01:33:01 +00:00
Shawn Willden
9de6c0e94c Merge "Revert "Allow vold to deleteAllKeys in Keystore"" into sc-dev 2021-08-12 01:17:13 +00:00
Shawn Willden
4b8112473d Revert "Allow vold to deleteAllKeys in Keystore"
Revert submission 15521094-vold-deleteAllKeys

Reason for revert: Causes infinite loop in Trusty KeyMint
Reverted Changes:
I9c5c54714:Detect factory reset and deleteAllKeys
I2fb0e94db:Allow vold to deleteAllKeys in Keystore
Id23f25c69:Add deleteAllKeys to IKeystoreMaintenance
Ife779307d:Enable deleteAllKeys from vold
I4312b9a11:Enable deleteAllKeys from vold

Bug: 187105270
Change-Id: I1ed68dd9ee9a6f14152307d610af0b16dd3219ac
2021-08-12 01:08:37 +00:00
Paul Crowley
acb6e5d152 Merge "Allow vold to deleteAllKeys in Keystore" into sc-dev am: c0cae7496e am: 80bf9219ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15521094

Change-Id: I3ce58d3959a7e36befc6a86b92ae1476b1ea9ed9
2021-08-11 22:16:59 +00:00
Paul Crowley
80bf9219ec Merge "Allow vold to deleteAllKeys in Keystore" into sc-dev am: c0cae7496e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15521094

Change-Id: I9f0abebd334edcfb1f0b7c8dce475c933ecd5c5e
2021-08-11 22:01:51 +00:00
Paul Crowley
c0cae7496e Merge "Allow vold to deleteAllKeys in Keystore" into sc-dev 2021-08-11 21:41:17 +00:00
Bart Van Assche
69c18c284b Allow the init and apexd processes to read all block device properties am: db5e6c2424 am: afea3cbde5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15515665

Change-Id: I700d68a00fb962eafee0cc91a13bc30e0dc7e167
2021-08-11 17:23:40 +00:00
Bart Van Assche
d5ea1d4d87 init.te: Allow init to modify the properties of loop devices am: 052995e65e am: b282e92e78
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15515664

Change-Id: I5d203f60728fc714237706e69991da2eeb4ed241
2021-08-11 17:23:33 +00:00
Paul Crowley
4a664e8d5d Allow vold to deleteAllKeys in Keystore
Add deleteAllKeys to IKeystoreMaintenance and allow vold to call it.
Allow vold to read the property
`ro.crypto.metadata_init_delete_all_keys.enabled`

Bug: 187105270
Test: booted twice on Cuttlefish
Ignore-AOSP-First: no merge path to this branch from AOSP.
Merged-In: I2fb0e94db9d35c1f19ca7acb2f541cfb13c23524
Change-Id: I2fb0e94db9d35c1f19ca7acb2f541cfb13c23524
2021-08-11 10:16:28 -07:00