Commit graph

1660 commits

Author SHA1 Message Date
Thierry Strudel
49ef5dcf5e rename power_stats service to powerstats
Ignore-AOSP-First: powerstats service is new in Android S and not in AOSP
Tests: adb shell incident -b > incident_report.proto
Tests: dumpsys powerstats
Tests: atest FrameworksServicesTests:PowerStatsServiceTest
Bug: 159813106
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Change-Id: I25c9d5ea9af2e4768938342c977a6d888420de87
2021-03-15 16:58:13 -07:00
Nikita Ioffe
06f92ee834 Merge "Add apexd_config_prop type" am: 49505cdbc1 am: 59dad736f5 am: 34707241e9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1634621

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic0b0d8728f648f95a76aa04be6c806fec83c1097
2021-03-15 14:28:39 +00:00
Nikita Ioffe
49505cdbc1 Merge "Add apexd_config_prop type" 2021-03-15 13:04:50 +00:00
Aaron Huang
eaf9fa72c3 Merge "Add selinux policies for pac_proxy_service" am: 68e7eaf35d am: 14716bb880 am: 13e3769f74
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1553997

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4100b47e48094bfe86ca6ec43bc26c1a3efd55c7
2021-03-15 12:56:09 +00:00
Aaron Huang
68e7eaf35d Merge "Add selinux policies for pac_proxy_service" 2021-03-15 11:49:45 +00:00
Nikita Ioffe
360e0f91c3 Add apexd_config_prop type
This type is used for properties that provides per-device configuration
for apexd behaviour (so far - timeouts for creating/deleting dm device).

Test: builds
Bug: 182296338
Change-Id: Ib815f081d3ab94aa8c941ac68b57ebe661acedb9
2021-03-15 00:35:38 +00:00
Peter Collingbourne
01e58e0fe3 Add support for a hw_timeout_multiplier system property.
In order to test the platform in emulators that are orders of magnitude
slower than real hardware we need to be able to avoid hitting timeouts
that prevent it from coming up properly. For this purpose introduce
a system property, ro.hw_timeout_multiplier, which may be set to
an integer value that acts as a multiplier for various timeouts on
the system.

Bug: 178231152
Change-Id: I6d7710beed0c4c5b1720e74e7abe3a586778c678
Merged-In: I6d7710beed0c4c5b1720e74e7abe3a586778c678
2021-03-11 14:04:18 -08:00
Treehugger Robot
9b56cbc670 Merge "Keystore 2.0: Rename KeystoreUserManager to KeystoreMaintenance" am: 20a1a984ad am: 3a40fd261a am: 745e5fd871
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1622582

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifc82d58908c74fc2ae0f8807f9c99291cf5a8b93
2021-03-11 13:01:02 +00:00
Janis Danisevskis
f3fe4cfc06 Keystore 2.0: Rename KeystoreUserManager to KeystoreMaintenance
Test: N/A
Change-Id: I40c07e40cb0a852814058fe89d57c44ea85f1994
2021-03-09 14:35:16 -08:00
Peter Collingbourne
9821c8f29a Merge "Add support for a hw_timeout_multiplier system property." into sc-dev 2021-03-09 04:35:46 +00:00
Alexander Potapenko
04c4440990 Selinux policy for bootreceiver tracing instance am: 3d52817da4 am: 04747b9e76 am: 52eafe9ddb
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1614815

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I20f005c37f99fa69c94e8a4e903e3244f7b908e5
2021-03-05 14:49:18 +00:00
Alexander Potapenko
3d52817da4 Selinux policy for bootreceiver tracing instance
Create contexts for /sys/kernel/tracing/instances/bootreceiver
Allow read access to files in this dir for system_server.

Bug: 172316664
Bug: 181778620
Test: manual runs with KFENCE enabled
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I7021a9f32b1392b9afb77294a1fd0a1be232b1f2
2021-03-05 08:53:39 +01:00
Wonsik Kim
c29dc120d8 Merge "Revert "Selinux policy for bootreceiver tracing instance"" am: 89bd64cd0d am: b721684954 am: 48c1eea845
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1615474

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9f3bf80973ee7995f44948323e2aff15d8bbe204
2021-03-04 05:07:54 +00:00
Wonsik Kim
08a25e6709 Revert "Selinux policy for bootreceiver tracing instance"
Revert submission 1572240-kernel_bootreceiver

Reason for revert: DroidMonitor: Potential culprit for Bug 181778620 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
Ic1c49a695:init.rc: set up a tracing instance for BootReceive...
I828666ec3:Selinux policy for bootreceiver tracing instance

Change-Id: I9a8da7ae501a4b7c3d6cb5bf365458cfd1bef906
2021-03-03 22:47:02 +00:00
Aaron Huang
e2e39dfba3 Add selinux policies for pac_proxy_service
The policies allow system server to register a pac_proxy_service.

Bug: 177035719
Test: FrameworksNetTests

Change-Id: Idf64dc6e491f5bce66dcab2dbf15823c8d0c2403
2021-03-03 20:18:44 +08:00
Alexander Potapenko
ab3451b123 Selinux policy for bootreceiver tracing instance am: 31251aa6ec am: 34bc3c9383 am: 705ffe76c9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1572220

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17cc25e6c82dba83c9831a8dc58042b351773681
2021-03-02 23:27:34 +00:00
Alexander Potapenko
31251aa6ec Selinux policy for bootreceiver tracing instance
Create contexts for /sys/kernel/tracing/instances/bootreceiver
Allow read access to files in this dir for system_server.

Bug: 172316664
Test: manual runs with KFENCE enabled
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I828666ec3154aadf138cfa552832a66ad8f4a201
2021-03-02 16:53:12 +01:00
Janis Danisevskis
360bc8c4b3 Merge "Keystore 2.0: Add policy for vpnprofilestore" am: ffdbf4370a am: 99590f81c5 am: 9a04a6e84f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1569720

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I348a2761c8a65d57943c9531e4a1efd6711b61b0
2021-03-01 08:04:30 +00:00
Janis Danisevskis
ffdbf4370a Merge "Keystore 2.0: Add policy for vpnprofilestore" 2021-02-26 19:20:39 +00:00
Devin Moore
ca71e87f60 Merge "Add sepolicy for /proc/bootconfig" am: d966b6089f am: 73cd1a9c19 am: 3bc23d4d8b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1592198

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic3cd5a1be419ef1f0f2be055408e358abc0c32a4
2021-02-24 17:57:25 +00:00
Devin Moore
d966b6089f Merge "Add sepolicy for /proc/bootconfig" 2021-02-24 15:56:48 +00:00
Roman Kiryanov
f6afebf934 Move qemu.sf.lcd_density into system/sepolicy
qemu.sf.lcd_density is rerefenced by surfaceflinger
and zygote.

Bug: 178144237
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Iede75d1170aeac9d020d60a3a66a1f69cee46abf
Merged-In: Iede75d1170aeac9d020d60a3a66a1f69cee46abf
2021-02-23 20:15:33 -08:00
Roman Kiryanov
a2f1682878 Merge "Move qemu.sf.lcd_density into system/sepolicy" into rvc-qpr-dev-plus-aosp am: 463a30d150
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/13679257

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6b0add28f5dccc2e1be8a8d9ecb0db6f2508e8c2
2021-02-24 03:03:30 +00:00
Roman Kiryanov
34d3983860 Move qemu.sf.lcd_density into system/sepolicy
qemu.sf.lcd_density is rerefenced by surfaceflinger
and zygote.

Bug: 178144237
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Iede75d1170aeac9d020d60a3a66a1f69cee46abf
2021-02-23 15:08:56 -08:00
Janis Danisevskis
291bc98a36 Keystore 2.0: Add policy for vpnprofilestore
Test: N/A
Change-Id: Iba6ca7be95dfcead8ce8ee17d6a6d78a5441d58f
2021-02-23 13:24:52 -08:00
Devin Moore
840d4f3bf3 Add sepolicy for /proc/bootconfig
Vendor boot hal, init, and vold processes all require permission.

Test: build and boot aosp_cf_x86_64_phone
Bug: 173815685
Change-Id: I15692dcd39dfc9c3a3b7d8c12d03eff0a7c96f72
2021-02-23 07:42:06 -08:00
Kelvin Zhang
e493f85a1f Add necessary sepolicy for update_engine to reserve space on data am: a1e58814a8 am: 3e68a5bd66 am: 291d65480f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1564173

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I039269e9e838c8fe8b63a404cac461347499f474
2021-02-23 14:05:43 +00:00
Peter Collingbourne
6bb477408e Add support for a hw_timeout_multiplier system property.
In order to test the platform in emulators that are orders of magnitude
slower than real hardware we need to be able to avoid hitting timeouts
that prevent it from coming up properly. For this purpose introduce
a system property, ro.hw_timeout_multiplier, which may be set to
an integer value that acts as a multiplier for various timeouts on
the system.

Bug: 178231152
Change-Id: I6d7710beed0c4c5b1720e74e7abe3a586778c678
Ignore-AOSP-First: The frameworks/base part of this change conflicts with AOSP so we need to land it internally first
2021-02-19 15:36:15 -08:00
Treehugger Robot
5b413c6577 Merge "sepolicy: Add label to userdata file node" am: b8cc291268 am: 0322e361eb am: c85ec347f0
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1538632

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6b25c718e7ab2915a64170a34e57b221b2da99c6
2021-02-19 12:54:22 +00:00
Kelvin Zhang
a1e58814a8 Add necessary sepolicy for update_engine to reserve space on data
Test: serve an OTA, make sure /data/apex/reserved is present
Bug: 172911822

Change-Id: I9f7967c9047ae834eb55a48d56ffc34a7b37f5db
2021-02-19 11:30:50 +00:00
Janis Danisevskis
13de5cd5b2 Merge "Keystore 2.0: Add permissions and policy for user manager AIDL." am: 1aad552cfd am: 5d5296e396 am: 17a5923e03
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1560611

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I708bf1c7939df174daaa4908f0fb828c5de5d66a
2021-02-19 01:25:11 +00:00
Weilun Du
4375a4a58b Merge "Revert^2 "Add qemu.hw.mainkeys to system property_contexts"" am: e76978cef7 am: f91841b9e2 am: a5229156b9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1591659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ife95d876b308d5a47464143a36dca4e757396653
2021-02-18 23:51:19 +00:00
Randall Huang
10d42cec51 sepolicy: Add label to userdata file node
The userdata file node should be labeled to
avoid avc denied.

Bug: 171760673
Bug: 177364376
Test: build pass
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: I9ba89c75c120864c64ea278934b15edc3ba18a6c
2021-02-19 07:45:02 +08:00
Gavin Corkery
163bd70480 Merge "Add sepolicy for scheduling module data directories" am: 3bb3559e2e am: 682e05c63b am: e118d6bc62
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1588354

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I288ea4dabfd9dcf8502e009a35b5a2d5e57238ad
2021-02-18 23:38:36 +00:00
Janis Danisevskis
1aad552cfd Merge "Keystore 2.0: Add permissions and policy for user manager AIDL." 2021-02-18 23:00:29 +00:00
Weilun Du
e76978cef7 Merge "Revert^2 "Add qemu.hw.mainkeys to system property_contexts"" 2021-02-18 21:40:53 +00:00
Gavin Corkery
3bb3559e2e Merge "Add sepolicy for scheduling module data directories" 2021-02-18 20:51:51 +00:00
Treehugger Robot
46709ccb6a Merge "Add sepolicy swcodec native flag namespace." am: ad580990c4 am: 2c5521f535 am: d3e3c3a5cc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1584530

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie8ff009618acd492d442d4305b81ae67c2010499
2021-02-17 23:19:02 +00:00
Treehugger Robot
ad580990c4 Merge "Add sepolicy swcodec native flag namespace." 2021-02-17 21:30:16 +00:00
Weilun Du
e2a8a145ec Revert^2 "Add qemu.hw.mainkeys to system property_contexts"
509b35e5d9

Bug: 180412668
Merged-In: I4067bba36613fa41e3c7a085da76cda4784753ad
Change-Id: I4067bba36613fa41e3c7a085da76cda4784753ad
2021-02-17 18:29:59 +00:00
Hasini Gunasinghe
685ca0c888 Keystore 2.0: Add permissions and policy for user manager AIDL.
Bug: 176123105
Test: User can set a password and unlock the phone.
Change-Id: I96c033328eb360413e82e82c0c69210dea2ddac9
2021-02-17 08:55:31 -08:00
Treehugger Robot
5f5a9d836d Merge "Adding SEPolicy for IRemotelyProvisionedComponent" am: 5ace493461 am: d074d435c8 am: 621d0198c5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1569961

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9d998ef60d046c571f5803b750b1b0c38fc47987
2021-02-17 01:38:12 +00:00
Ram Muthiah
bc68a86a3a Merge "Revert "Add qemu.hw.mainkeys to system property_contexts"" am: 523a649401 am: fa10ab3955 am: 1bd5d71c18
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1590671

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I977fff256fe731c75d8343e205db689c806018ba
2021-02-16 20:43:11 +00:00
Ram Muthiah
523a649401 Merge "Revert "Add qemu.hw.mainkeys to system property_contexts"" 2021-02-16 19:05:10 +00:00
Ram Muthiah
509b35e5d9 Revert "Add qemu.hw.mainkeys to system property_contexts"
Revert submission 1582845-qemu-prop

Reason for revert: aosp_hawk-userdebug is broken on an RVC branch
Reverted Changes:
Idfc2bffa5:Add qemu.hw.mainkeys to system property_contexts
If013ff33f:Remove qemu.hw.mainkeys from vendor_qemu_prop
Bug: 180412668
Change-Id: I335afb931eaeb019f66e3feedea80b0c8888f7a3
2021-02-16 18:58:10 +00:00
Weilun Du
8bc8caff5f Merge "Add qemu.hw.mainkeys to system property_contexts" am: 23bb01756e am: baf97e40f9 am: 446906c8bf
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1582845

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icd940a7f307b31ff45692e9dff6e681f95fb7f0c
2021-02-16 18:19:27 +00:00
Nick Chalko
81a4dd40d6 Add sepolicy swcodec native flag namespace.
Test: add sepolicy, build, check GetServerConfigurableFlag function
Bug: 179286276
Change-Id: Ia16d110900251b3fb3e3959d73524c8814199270
2021-02-16 09:22:16 -08:00
Weilun Du
23bb01756e Merge "Add qemu.hw.mainkeys to system property_contexts" 2021-02-16 16:44:00 +00:00
Max Bires
d2a9e6e630 Adding SEPolicy for IRemotelyProvisionedComponent
This SEPolicy change allows the hal_keymint domain to add
hal_remotelyprovisionedcomponent_service to hwservice_manager.

Test: The Keymint HAL can successfully start an instance of
IRemotelyProvisionedComponent

Change-Id: I15f34daf319e8de5b656bfacb8d050950bf8f250
2021-02-15 20:48:45 -08:00
Gavin Corkery
cd3bb575ab Add sepolicy for scheduling module data directories
Test: Manually test writing and reading files
Bug: 161353402
Change-Id: Ifbc0e4db0ec51f6565a0f52df06b1d148577b788
2021-02-15 22:31:27 +00:00
Maciej Żenczykowski
b7ac018c06 Merge "apply 'fs_bpf_tethering' label to /sys/fs/bpf/tethering" am: c281113ea8 am: fd596bf799 am: 9f61b85eed
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1566557

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I29a237a3cde03a88531e6a26bcba948840d9d678
2021-02-15 13:49:09 +00:00
Maciej Żenczykowski
c281113ea8 Merge "apply 'fs_bpf_tethering' label to /sys/fs/bpf/tethering" 2021-02-15 12:21:54 +00:00
Treehugger Robot
6cc2899475 Merge "The SE Policies to incorporate ISecureClock and ISharedSecret services along with IKeyMintDevice service into default keymint HAL Server. Test: Rebuild, execute and run atest VtsAidlSharedSecretTargetTest and atest VtsAidlSecureClockTargetTest. Bug: b/171844725, b/168673523." am: 98e48ac6b4 am: cf5f18538e am: b4781f0eca
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1562770

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idea77691f9239721d3254c397563924db7eac4e8
2021-02-12 05:50:19 +00:00
Shubang Lu
7336caac0d Merge "Add SE policy for media_metrics" am: a19f9d2455 am: fd40534a40 am: 31cd19cb1e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1580990

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I914da5f2f5d9e4781db22823099de6df92653df8
2021-02-12 05:50:05 +00:00
Treehugger Robot
98e48ac6b4 Merge "The SE Policies to incorporate ISecureClock and ISharedSecret services along with IKeyMintDevice service into default keymint HAL Server. Test: Rebuild, execute and run atest VtsAidlSharedSecretTargetTest and atest VtsAidlSecureClockTargetTest. Bug: b/171844725, b/168673523." 2021-02-12 02:42:35 +00:00
Maciej Żenczykowski
d68cb48e90 apply 'fs_bpf_tethering' label to /sys/fs/bpf/tethering
We want to label /sys/fs/bpf/tethering/... with a new label distinct
from /sys/fs/bpf, as this will allow locking down the programs/maps
tighter then is currently possible with the existing system.

These programs and maps are provided via the tethering mainline module,
and as such their number, names, key/value types, etc. are all prone to
be changed by a tethering mainline module update.

Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifc4108d76a1106a936b941a3dda1abc5a65c05b0
2021-02-11 17:45:06 -08:00
shubang
2210767054 Add SE policy for media_metrics
Test: CTS;
Change-Id: Ib9382f2513d8fd0e6812d0157c710d0ad5817231
2021-02-11 18:38:07 +00:00
Vova Sharaienko
9a1fa1a5a5 Merge "Stats: new sepolicy for the AIDL service" am: e8d2732651 am: 28497aaed1 am: 5b1e49a609
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1570880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieb9cb60e84a824135efc824d8f4d13dcedc2bcc9
2021-02-11 04:44:52 +00:00
Weilun Du
180a277d67 Add qemu.hw.mainkeys to system property_contexts
Bug: 178143857

Signed-off-by: Weilun Du <wdu@google.com>
Change-Id: Idfc2bffa52016d1e880974bb193025400e90a538
2021-02-11 04:18:54 +00:00
Vova Sharaienko
e8d2732651 Merge "Stats: new sepolicy for the AIDL service" 2021-02-11 03:07:56 +00:00
Vova Sharaienko
c64a5b42aa Stats: new sepolicy for the AIDL service
Allows the AIDL IStats service to be exposed via ServiceManager
Defines IStats service client domain to be used by pixelstats_vendor

Bug: 178859845
Test: Build, flash, and aidl_stats_client
Change-Id: If41e50d0182993d0b7f8501e9147e0becf526689
2021-02-10 23:48:35 +00:00
Chirag Pathak
814e89a1b2 The SE Policies to incorporate ISecureClock and ISharedSecret services along with IKeyMintDevice service into default keymint HAL Server.
Test: Rebuild, execute and run atest VtsAidlSharedSecretTargetTest and atest VtsAidlSecureClockTargetTest.
Bug: b/171844725, b/168673523.

Change-Id: I8b81ec12c45566d31edcd117e41fd559df32c37d
2021-02-10 18:45:07 +00:00
Treehugger Robot
654695c91b Merge "SEPolicy for RemoteProvisioning App" am: e6654e8bfd am: 1018f58e44 am: a49cceb4a3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1536783

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0488fb9454347af8b93b55253f157757589733f7
2021-02-10 05:33:07 +00:00
Treehugger Robot
e6654e8bfd Merge "SEPolicy for RemoteProvisioning App" 2021-02-10 04:20:52 +00:00
Janis Danisevskis
43f0177636 Merge "Keystore 2.0: Add wifi namespace to sepolicy." am: 6691c9c411 am: 17c9463c6e am: 6801868da5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1570000

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic4100896224387d0459b13b42c2c341a15460d93
2021-02-09 22:12:07 +00:00
Janis Danisevskis
6691c9c411 Merge "Keystore 2.0: Add wifi namespace to sepolicy." 2021-02-09 18:27:16 +00:00
Janis Danisevskis
df31f20dfe Keystore 2.0: Add wifi namespace to sepolicy.
Add the wifi namespace to sepolicy and allow system_app (Settings) and
wifi_supplicant to manage/use the keys in that namespace

Test: N/A
Bug: 171305388
Change-Id: Ib6af8656b18288a1116c241c2e76d9aea421a889
2021-02-09 08:28:45 -08:00
Treehugger Robot
d2c4732350 Merge "Allow dumpsys to read total DMA-BUF heap pool size" am: efef83f745 am: 672b014e90 am: 58575e4faf
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1566386

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I19f54e60bc61a0575c0e041ebc60ae6ab247e5eb
2021-02-09 16:00:26 +00:00
Treehugger Robot
efef83f745 Merge "Allow dumpsys to read total DMA-BUF heap pool size" 2021-02-09 14:16:42 +00:00
Treehugger Robot
ad00e4b605 Merge "Fix service name for VPN_MANAGEMENT_SERVICE." am: 47d078e1d4 am: cdccadbb6c am: 21712f0049
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1579864

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If8a79459398dd325a500a3baf30057dd3ea8dfcf
2021-02-08 11:21:01 +00:00
Treehugger Robot
47d078e1d4 Merge "Fix service name for VPN_MANAGEMENT_SERVICE." 2021-02-08 09:42:34 +00:00
Max Bires
23f0f3b28a SEPolicy for RemoteProvisioning App
This change adds the SEPolicy changes required to support the remote
provisioning flow. The notable additions are specifically labeling the
remote provisioning app and giving it access to find the remote
provisioning service which is added in keystore. It also requires
network access in order to communicate to the provisioning servers.

This functionality is extremely narrow to the point that it seems worth
it to define a separate domain for this app, rather than add this in to
the priv_app or platform_app permission files. Since this app also
communicates with the network, it also seems advantageous to limit its
permissions only to what is absolutely necessary to perform its
function.

Test: No denials!
Change-Id: I602c12365a575d914afc91f55e6a9b6aa2e14189
2021-02-08 01:33:12 -08:00
Xiao Ma
32aa4f1c54 Merge "Allow connectivity namespace to enable native level access flags." am: bbd48ff311 am: c33060a868 am: 101dde3fe3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1570024

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9f7bb66c7cb36bfe0480de7054b0b3b85be476b5
2021-02-08 04:17:30 +00:00
Xiao Ma
bbd48ff311 Merge "Allow connectivity namespace to enable native level access flags." 2021-02-08 01:40:51 +00:00
Lorenzo Colitti
d7c9de4e31 Fix service name for VPN_MANAGEMENT_SERVICE.
aosp/1574082 added sepolicy for a "vpnmanager" system service
which is being introduced to move code from ConnectivityService
to a new VpnManagerService.

Unfortunately that CL missed the fact that "vpn_management" is
already a service name and present in the public API since R.
Instead of adding another service name, use the existing service
name to lessen confusion. It is difficult to avoid confusion
entirely because there was already a public class called
VpnService when the VpnManager class was added to the public API
surface.

Bug: 173331190
Test: builds, boots, "dumpsys vpn_management" throws no errors
Change-Id: I4ab188ef62592aac167ba1f7b586accc882815e8
2021-02-07 17:51:53 +09:00
Martijn Coenen
a768c47d69 Merge "SELinux policy for on-device signing binary." am: 9e794114b2 am: a6dfbb8ab2 am: d6b4ce712b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1512772

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8753a66a77ed53e19e2c73985681b208d6e5efa9
2021-02-05 13:26:15 +00:00
Martijn Coenen
9e794114b2 Merge "SELinux policy for on-device signing binary." 2021-02-05 11:22:37 +00:00
Lorenzo Colitti
5a90802341 Merge "Add sepolicy for the vpnmanager service." am: 9b20cadf4a am: 22ec4b2218 am: 0848d6eb43
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1574082

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8fd00cd9d0ad66bac09516403a9d68957aebcb49
2021-02-04 12:16:11 +00:00
Lorenzo Colitti
9b20cadf4a Merge "Add sepolicy for the vpnmanager service." 2021-02-04 10:04:10 +00:00
Hridya Valsaraju
2c3ef29ed5 Allow dumpsys to read total DMA-BUF heap pool size
These permissions are added to allow dumpsys to read
/sys/kernel/dma_heap/total_pools_kb.

Fixes the following sepolicy denials:
avc: denied { read } for name="total_pools_kb" dev="sysfs" ino=3252
scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
avc: denied { open } for path="/sys/kernel/dma_heap/total_pools_kb"
dev="sysfs" ino=3252 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=1
avc: denied { getattr } for path="/sys/kernel/dma_heap/total_pools_kb"
dev="sysfs" ino=3252 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=1

Bug: 167709539
Test: dumpsys meminfo
Change-Id: I1c15b41b067da84a7b629cafe27972f30c86ae27
2021-02-03 21:42:09 -08:00
Xiao Ma
2d6c9f0fe8 Allow connectivity namespace to enable native level access flags.
Follow the steps: go/android-native-flag-api-manual

Bug: 179099277
Test: m -j
Test: manually verify connection to wifi after flash
Change-Id: Ieb5355d40aec9ed7a42b7ae5b250b696fcf00810
2021-02-04 05:31:33 +00:00
Lorenzo Colitti
5ee34a0ed3 Add sepolicy for the vpnmanager service.
The system server code that backs VPN APIs such as VpnService and
VpnManager currently lives in ConnectivityService and is accessed
via IConnectivityManager.

In S, ConnectivityService is being moved to the tethering
mainline module, but the VPN code is not. So add an new
service (vpnmanager, IVpnManager, VpnManagerService) to support
these APIs.

Service implementation at http://r.android.com/1572982 . That CL
cannot be in a topic with this one because it will conflict in
master and sc-dev.

Bug: 173331190
Test: builds, boots, "dumpsys vpnmanager" throws no errors
Change-Id: Ic09c93cc454ec959a3beda2b09efa74b8db30c27
2021-02-04 13:01:09 +09:00
Treehugger Robot
b6aae57f54 Merge "Allow dumpstate to read DMA-BUF sysfs stats" am: 87153827e2 am: fe94d93e38 am: d05e1fe862
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1546360

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6af9a579d756b475b234f06e6f9451f11dbf198e
2021-02-04 02:12:17 +00:00
Martijn Coenen
6afdb72cbb SELinux policy for on-device signing binary.
Bug: 165630556
Test: no denials on boot
Change-Id: I9d75659fb1eaea562c626ff54521f6dfb02da6b3
2021-02-03 16:15:48 +01:00
Hridya Valsaraju
6217b6657d Allow dumpstate to read DMA-BUF sysfs stats
These permissions are required for dumpstate to read the DMA-BUF sysfs
stats present at /sys/kernel/dmabuf/buffers

Bug: 167709539
Test: adb shell am bug-report
Change-Id: I1c00843775452b7a7aa39b059e1d77d77aed1e9c
2021-02-02 13:28:18 -08:00
Treehugger Robot
6f0c816172 Merge "Add vendor_public_framework_file type to SEPolicy" am: 883de3cd2e am: 9a2af4a3ad am: 0460e14939
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1556299

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I676e9dc8b95fb1053d9a54c39cc1089c63fd8972
2021-01-28 13:15:42 +00:00
Treehugger Robot
883de3cd2e Merge "Add vendor_public_framework_file type to SEPolicy" 2021-01-28 11:41:00 +00:00
Oliver Woodman
f75919e65a Merge "Define SOC sysprop policy" am: bc41c14ffd am: c91a4aee7c am: de09776cae
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1560029

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib49c53100f9acb2ea11aa9ad0bc0bcca517dea23
2021-01-28 10:38:05 +00:00
Oliver Woodman
bc41c14ffd Merge "Define SOC sysprop policy" 2021-01-28 09:12:52 +00:00
Andrei-Valentin Onea
5f70e71b3d Merge "Add data directory for appcompat" am: ef796f6180 am: e539930082 am: 0f4b4dac06
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1535011

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2381b5ae3049a3dd70dd4269bafed9ba9fd4c17a
2021-01-27 22:16:01 +00:00
Andrei Onea
850842f77c Add data directory for appcompat
This directory is used to store override config, so that they can
persist across reboot.

Test: atest CompatConfigTest
Bug: 145509340
Change-Id: I5e8f2b3093daeccd6c95dff24a8c6c0ff31235ca
2021-01-27 15:04:31 +00:00
Oliver Woodman
164ba2bd39 Define SOC sysprop policy
BUG: 158284209
Test: atest android.os.cts.BuildTest
Change-Id: I7df7e575072c37ca379b97f60cc6c0850a02bcd1
2021-01-27 13:49:00 +00:00
Treehugger Robot
05c2ffa894 Merge "Add sepolicy for app hibernation system service" am: 4fb66f04d7 am: 50e905c408 am: 09276d791a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1544944

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5632c479121670e23c5c3878476643f85f8cfb69
2021-01-27 07:56:38 +00:00
Treehugger Robot
4fb66f04d7 Merge "Add sepolicy for app hibernation system service" 2021-01-26 22:23:13 +00:00
Kalesh Singh
ce3a38a049 Merge "Sepolicy for mm events trace instance" am: d37f2e9d65 am: aac3d3b5e8 am: 4e24eaa5bc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1553614

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2cff630eab019053a896edb6f94f6e54f4346b7c
2021-01-26 15:52:34 +00:00
Dorin Drimus
84cd7087d5 Add vendor_public_framework_file type to SEPolicy
And allow access from system apps to vendor libs public only for system.
These files should be marked individually by OEMs. Maintainance
ownership for these libraries is also OEM's responsability.
Similar with vendor_public_libs_file type, this allows for an explicit
labeling of OEM system apps that can access libs from vendor.

Bug: 172526961
Test: build-only change, policy builds
Change-Id: I7d4c8232e0b52e73f373d3347170c87ab2dcce52
2021-01-26 15:59:37 +01:00
Kalesh Singh
d37f2e9d65 Merge "Sepolicy for mm events trace instance" 2021-01-26 14:33:39 +00:00
Alex Agranovich
6ffde9833f Merge "Change SELinux policy for texttospeech manager service." am: 93fcd51689 am: d46511ecfb am: a7d34e1d3e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1556238

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I45f42b4a61a6120c9a497cf0354652fd98cf9b69
2021-01-26 14:21:28 +00:00
Alex Agranovich
93fcd51689 Merge "Change SELinux policy for texttospeech manager service." 2021-01-26 12:26:31 +00:00
Winson Chiu
8dda08ba6c Add domain_verification_service am: f8ad8c08ea am: 8692160fed am: ea10a3292c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1519390

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibdb5aa52f4979b90dfc6153831b60f8f1eca5b8e
2021-01-25 23:27:37 +00:00
Winson Chiu
f8ad8c08ea Add domain_verification_service
For upcoming @SystemApi DomainVerificationManager.

Test: manual, accessing new manager from test app works

Change-Id: Ic73733dce3e9152af9c6f08fb7e460fa5a01ebdf
2021-01-25 19:09:50 +00:00
Kalesh Singh
aab7a73868 Sepolicy for mm events trace instance
Allow traced_probes read write access to configure
mm_events trace instance and poll trace_pipe_raw

Bug: 155928119
Test: No denials in logcat
Change-Id: Ib65ab2e7be8daa6b8c412ffea909072583db7002
2021-01-25 12:01:27 -05:00
Seigo Nonaka
276c5c1efb Merge "Add /data/fonts/files directory" am: 1237d422ef am: 551f758525 am: 85751d159f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1501158

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibfeafef5785a79e57f62fcf7ac889ba94c4b7062
2021-01-25 06:56:15 +00:00
Seigo Nonaka
1237d422ef Merge "Add /data/fonts/files directory" 2021-01-25 05:47:03 +00:00
Alex Agranovich
39ad3df3eb Change SELinux policy for texttospeech manager service.
Bug: 178112052
Test: Manual verification ($ adb shell service list)
Change-Id: Ibaf5d3f3c0565d9c61d03ffec62d8e222c9f5975
2021-01-24 16:18:28 +02:00
Linzhao Ye
9df7375fe0 Merge "Add SePolicy for system_server accessing sysfs uhid." am: bab989d315 am: cad97b3673 am: 88ef94ca04
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1507623

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic575ae93fa8aee21159ce163c9abc3630da91264
2021-01-23 18:21:05 +00:00
Linzhao Ye
bab989d315 Merge "Add SePolicy for system_server accessing sysfs uhid." 2021-01-23 17:08:47 +00:00
Seigo Nonaka
9c3707f76a Add /data/fonts/files directory
The updated font files will be stored to /data/fonts/files and
all application will read it for drawing text.
Thus, /data/fonts/files needs to be readable by apps and only writable
by system_server (and init).

Bug: 173517579
Test: atest CtsGraphicsTestCases
Test: Manually done
Change-Id: Ia76b109704f6214eb3f1798e8d21260343eda231
2021-01-22 11:58:55 -08:00
Alex Salo
9cca875e94 Merge "Add a new selinux policy for the resolver service" am: e2808169e5 am: 45547c27a8 am: 29e1576b77
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1557120

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I675f478b1c1eadc295d9b03c1e030cb3a43d0f41
2021-01-22 19:36:12 +00:00
Alex Salo
e2808169e5 Merge "Add a new selinux policy for the resolver service" 2021-01-22 18:20:23 +00:00
Chris Ye
c0e7206c73 Add SePolicy for system_server accessing sysfs uhid.
Add SePolicy to allow Android input manager accessing sysfs uhid folder.

Bug: 161633432
Test: dumpsys input and watch for input device battery status.
Change-Id: I6ed1ab45f1cff409982c36627e12e62667819f37
2021-01-22 17:56:45 +00:00
ChengYou Ho
58d19e3298 Add sepolicy for weaver aidl HAL service am: 291890a954 am: e8915e5719 am: b4f8f75537
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1554278

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I07d2ef12215a296c54d613708d0d8577392a794d
2021-01-22 07:44:06 +00:00
ChengYou Ho
291890a954 Add sepolicy for weaver aidl HAL service
Bug: 176107318
Change-Id: I9ca1a68e45b462c9b6ac912debb196b3a3ca45ba
2021-01-22 06:34:41 +00:00
Yi Jiang
7d7951bcbd Add a new selinux policy for the resolver service
Bug: 178151184
Test: manual
Change-Id: Ia44c50d24b3b5403b02ccc1b7873c7024b10e023
2021-01-21 16:55:49 -08:00
Kevin Han
4cead73a86 Add sepolicy for app hibernation system service
Add selinux policy so the app hibernation system service can be accessed
by other processes/apps.

Bug: 175829330
Test: builds
Change-Id: I96ea9dd977ec007bc11560601554547749b4df03
2021-01-21 13:22:27 -08:00
Yurii Zubrytskyi
844cecc03b Merge "IncFS: update SE policies for the new API" am: 314e6d9450 am: 8574adcfd2 am: 968bc53baa
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1554440

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic463a06015d4473820f35e7e32031c9ff073df67
2021-01-21 21:14:18 +00:00
Yurii Zubrytskyi
314e6d9450 Merge "IncFS: update SE policies for the new API" 2021-01-21 18:00:33 +00:00
Yifan Hong
1768704705 Merge "Add health storage AIDL service." am: 3f43fa8596 am: 848c9ef9b8 am: b5cf08f466
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1552650

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6058d58763dfe61827dbf84b023be731d45ccb46
2021-01-20 20:49:05 +00:00
Lev Proleev
a98a866d01 Merge "Add sepolicy for NNAPI AIDL HAL service" am: 2cb8a59de8 am: baa6274c1a am: cf8c0fe737
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1553603

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I00d7e2340155e99996c48d1015db3bc246c5a687
2021-01-20 20:47:33 +00:00
Treehugger Robot
016ab37eb0 Merge "Change SELinux policy for speech recognizer." am: c774ceacdd am: 4339266bbf am: e18b898854
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1553601

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id5eb43219da92673868ebb034df35a6fa0f21d31
2021-01-20 20:46:48 +00:00
Eva Chen
4126043d7b Merge "Add gnss_time_update_service selinux changes." 2021-01-20 20:17:21 +00:00
Yifan Hong
3f43fa8596 Merge "Add health storage AIDL service." 2021-01-20 19:45:15 +00:00
Lev Proleev
2cb8a59de8 Merge "Add sepolicy for NNAPI AIDL HAL service" 2021-01-20 19:37:01 +00:00
Lev Proleev
e4414bf228 Add sepolicy for NNAPI AIDL HAL service
This is a shared part that all NN HAL users otherwise would have to
define themselves.

Bug: 172922059
Test: m
Test: VtsHalNeuralnetworksTest on master (locally)
Change-Id: I3616d0afbb115bc0feaed00488855646633da915
2021-01-20 19:34:06 +00:00
Treehugger Robot
c774ceacdd Merge "Change SELinux policy for speech recognizer." 2021-01-20 18:31:26 +00:00
Yurii Zubrytskyi
80dfa06984 IncFS: update SE policies for the new API
IncFS in S adds a bunch of new ioctls, and requires the users
to read its features in sysfs directory. This change adds
all the features, maps them into the processes that need to
call into them, and allows any incfs user to query the features

Bug: 170231230
Test: incremental unit tests
Change-Id: Ieea6dca38ae9829230bc17d0c73f50c93c407d35
2021-01-19 12:57:15 -08:00
Treehugger Robot
706d5feee2 Merge "Add sepolicy for new system service: media_communication_service" 2021-01-19 18:02:59 +00:00
Gavin Corkery
bd6a8d0746 Merge "Add sepolicy for RebootReadinessDetector" 2021-01-19 09:54:24 +00:00
Orion Hodson
74b129b77c Merge "Permissions for odrefresh and /data/misc/apexdata/com.android.art" 2021-01-19 09:37:36 +00:00
Sergey Volnov
2a682a00d5 Change SELinux policy for speech recognizer.
Bug: 176578753
Test: manual verification ($ adb shell service list)
Change-Id: I3ebf6f5d45d65578b2eaf7efac073731afd10a58
2021-01-18 18:08:48 +00:00
Yifan Hong
06e4b8417a Add health storage AIDL service.
Test: adb shell sm idle-maint run
Bug: 177470478
Change-Id: Id7ee5af64e8d21eafd041c9e8fa1382f65a3958b
2021-01-15 18:23:01 -08:00
Treehugger Robot
0941c2022d Merge "Add policy for IKeystoreAuthorization AIDL service." 2021-01-15 19:53:16 +00:00
Hasini Gunasinghe
1a5c2f4ced Add policy for IKeystoreAuthorization AIDL service.
The interaface now provided by IKeystoreAuthorization AIDL interface was
previously provided by Keystore AIDL interface.

This CL adds policy to allow Keystore2 to register
IKeystoreAuthorization aidl service and to allow service manager to
look up and connect to the service.

Bug: 159475191
Test: Needs to be tested in runtime
Change-Id: I56829a8764e0efe55efdc92b75d7a3d918a20dae
2021-01-15 09:43:22 -08:00
Gavin Corkery
e92af1c283 Add sepolicy for RebootReadinessDetector
Test: Builds
Bug: 161353402
Change-Id: I3778e00ee249f5ab1904737196b282de1d315846
2021-01-15 10:56:26 +00:00
Eva Chen
3fddbaad35 Add gnss_time_update_service selinux changes.
GnssTimeUpdateService is a new service that is being added to System
Server. It will periodically get and suggest GNSS time for time detection on
Android.

Ignore-AOSP-First: Service relies on location APIs that are only in
internal right now.
Bug: 157265008
Test: Build only

Change-Id: Iedb2783b2f34ac71f665663b9db719e8ed4d35dc
2021-01-14 22:57:18 -08:00
Shashwat Razdan
fbe18136fe Merge "Changes in SELinux Policy for smartspace API" 2021-01-15 01:13:32 +00:00
Shashwat Razdan
c97620be76 Changes in SELinux Policy for smartspace API
Bug: 176851064
Test: manual verification ($ adb shell service list)
Change-Id: I2bfa765a7b04f46b22836d295613e629348afbc6
2021-01-14 20:54:03 +00:00
Primiano Tucci
9dd873d725 Merge "Allow dumpstate to snapshot traces and attach them to bug reports" 2021-01-14 18:59:40 +00:00
Mitch Phillips
e0bab54ba6 Merge "[MTE] Add memtag sysprop sepolicy." 2021-01-13 18:07:36 +00:00
Orion Hodson
8f75f76fbd Permissions for odrefresh and /data/misc/apexdata/com.android.art
odrefresh is the process responsible for checking and creating ART
compilation artifacts that live in the ART APEX data
directory (/data/misc/apexdata/com.android.art).

There are two types of change here:

1) enabling odrefresh to run dex2oat and write updated boot class path
   and system server AOT artifacts into the ART APEX data directory.

2) enabling the zygote and assorted diagnostic tools to use the
   updated AOT artifacts.

odrefresh uses two file contexts: apex_art_data_file and
apex_art_staging_data_file. When odrefresh invokes dex2oat, the
generated files have the apex_art_staging_data_file label (which allows
writing). odrefresh then moves these files from the staging area to
their installation area and gives them the apex_art_data_file label.

Bug: 160683548
Test: adb root && adb shell /apex/com.android.art/bin/odrefresh
Change-Id: I9fa290e0c9c1b7b82be4dacb9f2f8cb8c11e4895
2021-01-13 10:38:22 +00:00
Marco Ballesio
3eabc1d541 sepolicy: allow system_server to read /proc/locks
Access to /proc/locks is necessary to activity manager to determine
wheter a process holds a lock or not prior freezing it.

Test: verified access of /proc/locks while testing other CLs in the same
topic.
Bug: 176928302

Change-Id: I14a65da126ff26c6528edae137d3ee85d3611509
2021-01-12 10:47:58 -08:00
Primiano Tucci
2f99809c43 Allow dumpstate to snapshot traces and attach them to bug reports
Feature description: if a background trace is happening at the
time dumpstate is invoked, the tracing daemon will snapshot
the trace into a fixed path (/data/misc/perfetto-traces/bugreport/).
Dumpstate will attach the trace, if present, to the bugreport.
From a SELinux viewpoint this involves the following permissions:
- Allow dumpstate to exec+trans perfetto --save-for-bugreport
  (this will just send an IPC to traced, which will save the trace).
- Allow dumpstate to list, read and unlink the trace file.
- Create a dedicated label for bugreport traces, to prevent that
  dumpstate gets access to other traces not meant for bug reporting.

Note that this does NOT allow dumpstate to serialze arbitary traces.
Traces must be marked as "eligible for bugreport" upfront in the
trace config (which is not under dumpstate control), by
setting bugreport_score > 0.

Design doc: go/perfetto-betterbug

Bug: 170334305
Test: manual:
      1. start a perfetto trace with bugreport_score > 0
      2. adb shell dumpstate
      3. check that the bugreport zip contains the trace

Change-Id: I259c3ee9d5be08d6b22c796b32875d7de703a230
2021-01-12 14:06:24 +00:00
Joanne Chung
8327dc1fb1 Merge "Add rule for new system service" 2021-01-12 11:54:53 +00:00
Joanne Chung
993aeab1c7 Add rule for new system service
- Update policy for new system service, used for AiAi/Apps to
  present data in their UI.

Bug: 173243538
Bug: 176208267
Test: manual. Can boot to home and get manager successfully.
Change-Id: Ie88c6fa7ed80c0d695daaa7a9c92e11ce0fed229
2021-01-12 18:00:17 +08:00
ChengYou Ho
f4f75d088a Add sepolicy for authsecret AIDL HAL
Bug: 176107318
Change-Id: I49bc68fb5a92bcbc2f1d2c78f0741f8eff97fc06
2021-01-12 06:01:22 +00:00
Mitch Phillips
eaf1404d8a [MTE] Add memtag sysprop sepolicy.
These flags should be writeable to the shell for both root and non-root
users. They should be readable everywhere, as they're read in libc
during initialization (and there's nothing secret to hide). We just
don't want to allow apps to set these properties.

These properties are non-persistent, are for local developer debugging
only.

Bug: 135772972
Bug: 172365548
Test: `adb shell setprop memtag.123 0` in non-root shell succeeds.
Change-Id: If9ad7123829b0be27c29050f10081d2aecdef670
2021-01-11 08:35:58 -08:00
ChengYou Ho
553afe7242 Add sepolicy for oemlock aidl HAL
Bug: 176107318
Change-Id: I26f8926401b15136f0aca79b3d5964ab3b59fbdd
2021-01-11 05:57:17 +00:00
Gavin Corkery
b46e956d97 Merge "Add sepolicy for /metadata/watchdog" 2021-01-08 08:20:45 +00:00
Hyundo Moon
8b0456720a Add sepolicy for new system service: media_communication_service
Bug: 175511943
Test: Manaully (in internal master)
Change-Id: Ic2b6f2634c0e82348482b246cddae42da606591c
2021-01-08 17:18:30 +09:00
Gavin Corkery
b0aae28b41 Add sepolicy for /metadata/watchdog
See go/rescue-party-reboot for more context.

One integer will be stored in a file in this
directory, which will be read and then deleted at the
next boot. No userdata is stored.

Test: Write and read from file from PackageWatchdog
Bug: 171951174

Change-Id: I18f59bd9ad324a0513b1184b2f4fe78c592640db
2021-01-07 19:42:56 +00:00
Shubang Lu
ba4e6b89aa Merge "SE policy for tuner service." 2021-01-07 18:34:36 +00:00
Peiyong Lin
30b809bd97 Merge "Add SEPolicy rules for game service." 2020-12-29 22:18:24 +00:00
Chiachang Wang
bd15e9ac63 Merge "Add new selinux type for radio process" 2020-12-29 00:24:12 +00:00
Peiyong Lin
9449176122 Add SEPolicy rules for game service.
Bug: b/174956354
Test: manual
Change-Id: Ife1aac3435427f89f5701e4ead0763839f01d61b
2020-12-24 18:46:25 -08:00
Chiachang Wang
813c25fc91 Add new selinux type for radio process
ConnectivityService is going to become mainline and can not
access hidden APIs. Telephony and Settings were both accessing
the hidden API ConnectivityManager#getMobileProvisioningUrl.
Moving #getMobileProvisioningUrl method into telephony means
that there is one less access to a hidden API within the overall
framework since the Connectivity stack never needed this value.
Thus, move getMobileProvisioningUrl parsing to telephony surface
and provide the corresponding sepolicy permission for its access.

The exsting radio_data_file is an app data type and may allow
more permission than necessary. Thus create a new type and give
the necessary read access only.

Bug: 175177794
Test: verify that the radio process could read
      /data/misc/radio/provisioning_urls.xml successfully
Change-Id: I191261a57667dc7936c22786d75da971f94710ef
2020-12-24 15:11:15 +08:00
Kalesh Singh
24ada7dbee Reland: Memtrack HAL stable aidl sepolicy
Bug: 175021432
Test: Check logcat for denials
Change-Id: Id92fc543791072d8682e3a89cbf08370007108bf
2020-12-22 16:08:53 -05:00
Treehugger Robot
831fddd794 Merge "Allow coredomain access to only approved categories of vendor heaps" 2020-12-21 20:34:06 +00:00
Hridya Valsaraju
8c9cf62edb Allow coredomain access to only approved categories of vendor heaps
One of the advantages of the DMA-BUF heaps framework over
ION is that each heap is a separate char device and hence
it is possible to create separate sepolicy permissions to restrict
access to each heap.
In the case of ION, allocation in every heap had to be done through
/dev/ion which meant that there was no away to restrict allocations in
a specific heap.

This patch intends to restrict coredomain access to only approved
categories of vendor heaps. Currently, the only identified category
as per partner feedback is the system-secure heap which is defined
as a heap that allocates from protected memory.

Test: Build, video playback works on CF with ION disabled and
without sepolicy denials
Bug: 175697666

Change-Id: I923d2931c631d05d569e97f6e49145ef71324f3b
2020-12-16 10:08:54 -08:00
Joel Galenson
1c7eb3c3bd Clean up keymint service policy.
Test: VtsAidlKeyMintTargetTest
Change-Id: Id6e83d63ffb1de7c48dbdf435fd9988e9174cfe2
2020-12-16 08:59:09 -08:00
shubang
f8ab3eb1bb SE policy for tuner service.
Test: make; acloud;  tuner sample input
Change-Id: I651632ec7f4ba79d94738c11c343f63510e59aa6
2020-12-16 06:05:04 +00:00
Janis Danisevskis
de98dd9726 Merge changes Icb1f60b3,I935f2383
* changes:
  Allow keystore to talk to keymint
  Add policy for the security compatibility hal service.
2020-12-16 01:24:33 +00:00
Kalesh Singh
3619437561 Merge "Revert "Memtrack HAL stable aidl sepolicy"" 2020-12-16 00:48:06 +00:00
Kalesh Singh
5db6857fe1 Revert "Memtrack HAL stable aidl sepolicy"
Revert "Add android.hardware.memtrack-unstable-ndk_platform"

Revert submission 1518702-memtrack-aidl

Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy

Change-Id: I0c55ee100c7fd8d09a5b188a39b17c95c8a43c39
2020-12-16 00:19:38 +00:00
Janis Danisevskis
191940036b Add policy for the security compatibility hal service.
This service manager is registered by Keystore 2.0 to lookup legacy
wrapper services.

Keystore 2.0 is now written in rust. We have AIDL binding for rust but
no HIDL binding. Keystore 2.0 has to support legacy HIDL based
interfaces. So we implement the AIDL KeyMint interface in terms of the
legacy HIDL Keymaster <=  V4.1 devices in C++. This wrapper is linked
into the Keystore 2.0 process but it cannot be called directly but must
be treated like a remote binder instead. However, we cannot register
these wrappers directly, because a) we are not a vendor component, and
b) it would conflict with genuine KeyMint devices on newer devices. So
Instead we register Keystore 2.0 itself as a legacy service provider.
Which it can query itself for the legacy wrappers if it does not find
a genuine KeyMint implementation to connect to.

Bug: 171351607
Test: Keystore 2.0 can register this Service and lookup legacy wrapper
      services.
Change-Id: I935f23837721ce126531236f4920dba469a47be4
2020-12-15 08:23:52 -08:00
Alan Stokes
63d875612f Merge "Split user_profile_data_file label." 2020-12-15 14:25:51 +00:00
Treehugger Robot
772d6b425a Merge "Add policy for the android protected confirmation service." 2020-12-15 05:26:17 +00:00
Treehugger Robot
6d560dee90 Merge "Memtrack HAL stable aidl sepolicy" 2020-12-14 18:36:10 +00:00
Hyunyoung Song
9f198f1c68 Merge "New system service: search_ui_service" 2020-12-14 16:36:02 +00:00
Shawn Willden
b41f4985a9 Revert^2 "Move keymint to android.hardware.security."
16d61d0383


Bug: 175345910
Bug: 171429297
Exempt-From-Owner-Approval: re-landing topic with no changes in this CL.
Change-Id: I1352c6b46b007dba3448b3c9cbdf454d7862a176
2020-12-11 20:36:53 +00:00
Alan Stokes
7aa40413ae Split user_profile_data_file label.
user_profile_data_file is mlstrustedobject. And it needs to be,
because we want untrusted apps to be able to write to their profile
files, but they do not have levels.

But now we want to apply levels in the parent directories that have
the same label, and we want them to work so they need to not be
MLS-exempt. To resolve that we introduce a new label,
user_profile_root_file, which is applied to those directories (but no
files). We grant mostly the same access to the new label as
directories with the existing label.

Apart from appdomain, almost every domain which accesses
user_profile_data_file, and now user_profile_root_file, is already
mlstrustedsubject and so can't be affected by this change. The
exception is postinstall_dexopt which we now make mlstrustedobject.

Bug: 141677108
Bug: 175311045
Test: Manual: flash with wipe
Test: Manual: flash on top of older version
Test: Manual: install & uninstall apps
Test: Manual: create & remove user
Test: Presubmits.
Change-Id: I4e0def3d513b129d6c292f7edb076db341b4a2b3
2020-12-11 17:35:06 +00:00
Orion Hodson
16d61d0383 Revert "Move keymint to android.hardware.security."
Revert submission 1522123-move_keymint

Reason for revert: Build breakage
Bug: 175345910
Bug: 171429297
Reverted Changes:
Ief0e9884a:Keystore 2.0: Move keymint spec to security namesp...
Idb54e8846:Keystore 2.0: Move keymint spec to security namesp...
I9f70db0e4:Remove references to keymint1
I2b4ce3349:Keystore 2.0 SPI: Move keymint spec to security na...
I2498073aa:Move keymint to android.hardware.security.
I098711e7d:Move keymint to android.hardware.security.
I3ec8d70fe:Configure CF to start KeyMint service by default.
Icbb373c50:Move keymint to android.hardware.security.
I86bccf40e:Move keymint to android.hardware.security.

Change-Id: Ib5591c2379bbd2fd6dde0558ba0e68f39d27fbaf
2020-12-11 10:45:43 +00:00
Selene Huang
2c3bdb28de Move keymint to android.hardware.security.
Test: VtsAidlKeyMintTargetTest
Change-Id: I098711e7ddbcac0fc761801a1bf582a71a8f9baa
2020-12-10 19:12:29 +00:00
Janis Danisevskis
d5ad76b0c4 Add policy for the android protected confirmation service.
This is the service offered by Keystore 2.0 to provide APC service to
application. It was formerly part of the IKeystoreService interface.
Not it is an interface in ints own right.

Test: Keystore 2.0 can register the apc service interface.
      Apps can lookup and call this interface.
Bug: 159341464
Change-Id: I058adf0021d9b89f4eac7534e366c29071f0f98b
2020-12-10 10:58:11 -08:00
Hyunyoung Song
9b5f691ed1 New system service: search_ui_service
- Update policy for new system service, used for Launcher/Apps to
fetch and render search results in their UI.

Bug: 162234997
Test: manual verification ($ adb shell service list)


Reference CL: aosp/831251

Change-Id: If3ae22aa2ad1d13aeac3dfefc5244db4b1734d96
2020-12-08 15:55:01 -08:00
Kalesh Singh
545c5bfe47 Memtrack HAL stable aidl sepolicy
Bug: 175021432
Test: Check logcat for denials
Change-Id: I5e1d0e006d86a65552acb78c23b421155881555b
2020-12-08 14:09:09 -05:00
Hai Zhang
04db97a72d Add SELinux policy for legacy permission service.
The updatable and non-updatable permission manager cannot share one
AIDL, so we need to create a new system service for the non-updatable
legacy one, and add the SELinux policy for it.

Bug: 158736025
Test: presubmit
Change-Id: Ief8da6335e5bfb17d915d707cf48f4a43332f6ae
2020-12-04 14:43:33 -08:00
Suren Baghdasaryan
37f1a137b6 Add rules for per-API level task profiles and cgroup description files
Define access rights to new per-API level task profiles and cgroup
description files under /etc/task_profiles/.

Bug: 172066799
Test: boot with per-API task profiles
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I04c9929fdffe33a9fc82d431a53f47630f9dcfc3
2020-11-23 09:30:26 -08:00
Alan Stokes
689f91f9ed Add a TODO to remove mlsvendorcompat.
One day we won't need this mechanism any more & can remove all traces
of it.

Bug: 141677108
Test: builds
Change-Id: I95525a163ab4f19d8ca411c02a3c06498c6777ef
2020-11-23 12:28:21 +00:00
Alan Stokes
7e5f37fd6f Merge "Exempt older vendor images from recent mls changes." 2020-11-23 11:09:58 +00:00
David Anderson
09bb944221 Add sepolicy for starting the snapuserd daemon through init.
Restrict access to controlling snapuserd via ctl properties. Allow
update_engine to control snapuserd, and connect/write to its socket.

update_engine needs this access so it can create the appropriate dm-user
device (which sends queries to snapuserd), which is then used to build
the update snapshot.

This also fixes a bug where /dev/dm-user was not properly labelled. As a
result, snapuserd and update_engine have been granted r_dir_perms to
dm_user_device.

Bug: 168554689
Test: full ota with VABC enabled
Change-Id: I1f65ba9f16a83fe3e8ed41a594421939a256aec0
2020-11-19 21:03:30 +00:00
Inseob Kim
0cef0fe5ac Add contexts for sqlite debug properties
These are read by some apps, but don't have any corresponding property
contexts. This adds a new context as we're going to remove default_prop
access.

Bug: 173360450
Test: no sepolicy denials
Change-Id: I9be28d8e641eb6380d080150bee785a3cc304ef4
2020-11-18 12:14:20 +09:00
Alan Stokes
8bf8a262e5 Exempt older vendor images from recent mls changes.
We no longer allow apps with mlstrustedsubject access to app_data_file
or privapp_data_file. For compatibility we grant access to all apps on
vendor images for SDK <= 30, whether mlstrustedsubject or not. (The
ones that are not already have access, but that is harmless.)

Additionally we have started adding categories to system_data_file
etc. We treat these older vendor apps as trusted for those types only.

The result is that apps on older vendor images still have all the
access they used to but no new access.

We add a neverallow to prevent the compatibility attribute being
abused.

Test: builds
Change-Id: I10a885b6a122292f1163961b4a3cf3ddcf6230ad
2020-11-17 17:30:10 +00:00
Roshan Pius
e97cb76018 Merge "sepolicy(hal_wifi): Allow wifi HAL to access persist.vendor.debug properties" 2020-11-13 08:11:40 +00:00
Roshan Pius
a5a81002c8 sepolicy(hal_wifi): Allow wifi HAL to access persist.vendor.debug properties
We want to tweak some device params at runtime via shell (alleviates the
need to recompile HAL for changing device configuration). This will help
us test/teamfood couple of new features under development.

Bug: 173044646
Test: Wifi HAL can read persist.vendor.debug.wifi properties.
Change-Id: Iabd07e72aa5f0d97519a37d0ebb1e0a3458b6d06
2020-11-12 18:22:47 -08:00
Inseob Kim
9985566221 Add context for ro.product.property_source_order
Any partitions should be able to write this property with build.prop.
This adds a new context for ro.product.property_source_order so it can
be set from any build.prop, e.g. vendor/build.prop, product/build.prop,
etc.

Bug: 172459064
Test: PRODUCT_VENDOR_PROPERTIES can set this property
Change-Id: Ibf85a4ad02d8454f621428b271e8e298067aa126
2020-11-12 22:21:51 +09:00
Treehugger Robot
406a391077 Merge "Add entries for some properties in default_prop" 2020-11-10 00:24:04 +00:00
Michael Sun
dd92be8271 Merge "Update to support splitted SystemSuspend AIDL interfaces" 2020-11-06 17:35:58 +00:00
Inseob Kim
d5a0448a53 Add entries for some properties in default_prop
Currently default_prop is readable by coredomain and appdomain. That's
too broad, and we are going to restrict the access so every property
should be added to property_contexts.

This adds some missing properties to property_contexts. Newly added
property contexts are:

- wrap.*: used by zygote to give arguments. It's assigned as
zygote_wrap_prop, and will be readable from coredomain.

- partition.{mount_name}.verified: used by dm-verity. It's assigned as
vertiy_status_prop, and will only be accessible from init.

- (ro.)?setupwizard.*: used by setup wizard. It's assigned as
setupwizard_prop, and will be readable from coredomain.

Other properties, such as ro.gfx.*, media.stagefright.*,
ro.storage_manager.* are also added to existing contexts.

Bug: 170590987
Test: boot crosshatch and see no denials
Change-Id: Ife9d69a62ee8bd7395a70cd104271898c8a72540
2020-11-06 14:02:34 +09:00
Florian Mayer
12376168b4 New type for printk_formats, allow traced_probes.
Test: ls -lZ /sys/kernel/tracing/printk_formats
      [...] u:object_r:debugfs_tracing_printk_formats:s0 [...]

Test: setenforce 0;
      runcon u:r:system_server:s0 cat /sys/kernel/tracing/printk_formats
      logcat complains about /sys/kernel/tracing/printk_formats

Test: setenforce 0;
      runcon u:r:traced_probes:s0 cat /sys/kernel/tracing/printk_formats
      logcat does not complain about /sys/kernel/tracing/printk_formats

(need to setenforce 0, because otherwise the exec of ls is denied).

Bug: 70292203
Change-Id: I15ddef686f979c59daaba5263fa99aca3cd139e5
2020-11-05 12:55:50 +00:00
Michael Sun
6445f190e8 Update to support splitted SystemSuspend AIDL interfaces
The suspend_control_aidl_interface is updated, renamed, and splitted
into android.system.suspend.control and
android.system.suspend.control.internal. This resulted in two suspend
services, update sepolicy to support this change.

Test: m
Bug: 171598743
Change-Id: I695bde405672af834fe662242347e62079f2e25f
2020-11-02 23:54:21 +00:00
Hayden Gomes
bf08517f2c Adding support for AIDL AudioControl HAL
Bug: 170335834
Test: built and ran without sepolicy issues
Change-Id: Ia25b82aaf676fd2bd37e60bc0d2960f398fa3c90
2020-10-29 10:56:23 -07:00
David Anderson
45ac6e8400 Merge "Add sepolicy for dm-user devices and the snapuserd daemon." 2020-10-27 16:39:14 +00:00
Woody Lin
62ddcf0580 Merge "Add zygote.critical_window.minute property" 2020-10-27 08:22:14 +00:00
David Anderson
fe30369efb Add sepolicy for dm-user devices and the snapuserd daemon.
dm-user is a new device-mapper module, providing a FUSE-like service for
block devices. It creates control nodes as misc devices under
/dev/dm-user/. Make sure these nodes get a unique selabel.

snapuserd is a daemon for servicing requests from dm-user. It is a
low-level component of Virtual A/B updates, and provides the bridge
betewen dm-snapshot and the new COW format. For this reason it needs
read/write access to device-mapper devices.

Bug: 168259959
Test: ctl.start snapuserd, no denials
      vts_libsnapshot_test, no denials
Change-Id: I36858a23941767f6127d6fbb9e6755c68b91ad31
2020-10-26 23:23:01 -07:00
Yi Kong
0ac00727c3 Configs for profcollect system properties
Test: build
Bug: 79161490
Change-Id: I83362b2089a54c4dcbf8da5a7720da8529ba1e34
2020-10-27 03:46:31 +08:00
Woody Lin
8633462d85 Add zygote.critical_window.minute property
This property controls the minimal timing window that triggers init
process fatal abort, when the zygote service crashes repeatedly in it.

Bug: 146818493
Change-Id: Ibd371be0daf6510df8b4d1a1f12f0aab8d6392c7
2020-10-27 01:33:49 +08:00
Primiano Tucci
cd452300a7 Allow tracing service to access kallsyms on userdebug
This CL allows the traced_probes service to temporarily
lower kptr_restrict and read /proc/kallsyms.
This is allowed only on userdebug/eng builds.
The lowering of kptr_restrict is done via an init
property because the kernel checks that the kptr_restrict
writer is CAP_SYS_ADMIN, regardless of the /proc file ACLs [1].

[1] 4cbffc461e/kernel/sysctl.c (L2254)

Bug: 136133013
Design doc: go/perfetto-kallsyms
Test: perfetto_integrationtests --gtest_filter=PerfettoTest.KernelAddressSymbolization in r.android.com/1454882

Change-Id: Ic06e7a9a74c0f3e42fa63f7f41decc385c9fea2c
2020-10-23 14:03:08 +01:00
Treehugger Robot
cc9cfa92c1 Merge "Add SEpolicy for VcnManagementService" 2020-10-21 00:54:35 +00:00
Felipe Leme
e418956ae3 Added system_server_dumper service.
It will be used to dump system_server data that is not associated
with any service.

Test: adb shell dumpsys system_server
Bug: 163921395

Change-Id: I5719f7cd3a9022dc0ab12a3b3b22487e2b4866e0
2020-10-19 21:27:06 -07:00
Treehugger Robot
b178fe826c Merge changes from topic "ramdisk_timestamp_runtime_load"
* changes:
  Add ro.bootimage.* property contexts
  Add /second_stage_resources tmpfs.
2020-10-16 19:23:08 +00:00
Jack Yu
dd5c5d7960 Merge "Add sepolicy to allow read/write nfc snoop log data" 2020-10-16 07:56:10 +00:00
Woody Lin
1b2d790bc4 Merge "Add framework_watchdog_config_prop" 2020-10-15 06:44:52 +00:00
Primiano Tucci
ce31e4ba0e Merge "Keep AOSP sepolicy up to date with internal master" 2020-10-14 08:33:09 +00:00
Darryl Johnson
c80aa39c93 Merge "Add device_state_service to SEPolicy." 2020-10-13 20:46:46 +00:00
Primiano Tucci
5d026b3152 Keep AOSP sepolicy up to date with internal master
This re-alignes aosp and internal master to avoid
conflicts when uploading CLs upstream.

Bug: 170126760
Change-Id: I9c087e70998cd529b71dec7428641c4bfef10d31
2020-10-13 18:52:25 +00:00
Darryl L Johnson
d6cc359691 Add device_state_service to SEPolicy.
This is to support the addition of the device state manager service and
its associated binder service.

Test: Manual - Modify policy and verify binder service can be published.
Fixes: 170034199
Change-Id: Id63cb1db3ee80ec699e98443457c113d6be809fe
2020-10-13 07:48:56 -07:00
Benedict Wong
93069c0373 Add SEpolicy for VcnManagementService
This patch adds the requisite permissions for the VcnManagementService.

Bug: 163431877
Test: Compiles, boots, FrameworksNetTests passes
Change-Id: I6e03ee798027b28f67d60c6e4280fb3410ec94c4
2020-10-12 18:50:18 -07:00
Woody Lin
e005432482 Add framework_watchdog_config_prop
The framework_watchdog_config_prop properties control framework watchdog
configurations to handle watchdog timeout loop. The properties are
written only by vendor_init.

More details and background: go/break-sys-watchdog-loop

Bug: 141948707
Change-Id: I6c0da5fdafba8165e79d0f04e0a82874f605a06d
2020-10-12 16:44:13 +00:00
Yifan Hong
271ba1c3ff Merge "Revert "Add /boot files as ramdisk_boot_file."" 2020-10-08 22:28:43 +00:00
Yifan Hong
f5f4c1207a Revert "Add /boot files as ramdisk_boot_file."
This reverts commit 2576a2fc30.

Reason for revert: conflict with device-specific sepolicy

Bug: 170411692
Change-Id: Ie5fde9dd91b603f155cee7a9d7ef432a05dc6827
Test: pass
2020-10-08 22:13:44 +00:00
Yifan Hong
02b3681931 Merge "Add /boot files as ramdisk_boot_file." 2020-10-08 16:30:28 +00:00
Yifan Hong
2576a2fc30 Add /boot files as ramdisk_boot_file.
/boot/etc/build.prop is a file available at first_stage_init to
be moved into /second_stage_resources.

The file is only read by first_stage_init before SELinux is
initialized. No other domains are allowed to read it.

Test: build aosp_hawk
Test: boot and getprop
Bug: 170364317
Change-Id: I0f8e3acc3cbe6d0bae639d2372e1423acfc683c7
2020-10-08 07:55:12 -07:00
Yifan Hong
6bb5a76d29 Add ro.bootimage.* property contexts
In addition, allow shell to read this property.

Test: getprop -Z
Test: cts-tradefed run cts -m CtsGestureTestCases
      and check /sdcard/device-info-files/PropertyDeviceInfo.deviceinfo.json

Bug: 169169031
Change-Id: Ib71b01bac326354696e159129f9dea4c2e918c51
2020-10-07 11:55:20 -07:00
Lais Andrade
ac2da76606 Add sepolicy for vibrator manager
This will allow SystemServer to add the new vibrator manager service.

Bug: 166586119
Test: manually build and install on test device
Change-Id: I496f46e2f5482aaa7bfba31d6c6b2967486941cc
2020-10-07 13:17:58 +00:00
Ilya Matyukhin
d2acfb0f9c Merge "Add sepolicy for IFace" 2020-09-29 20:20:00 +00:00
Ilya Matyukhin
9bd164241e Add sepolicy for IFace
Bug: 168730443
Test: run on cuttlefish
Change-Id: Ie3cf791e7aac090788c7213d23487ae9f50b0690
2020-09-28 15:57:59 -07:00
Treehugger Robot
e1cff8b763 Merge "Add GNSS AIDL interfaces (system/sepolicy)" 2020-09-24 20:49:07 +00:00
Yu-Han Yang
bbd0ecedbb Add GNSS AIDL interfaces (system/sepolicy)
Bug: 159467682
Test: built and run on cuttlefish
Change-Id: I071e8427ea0251139661aa8123376c56e0839390
2020-09-24 12:03:30 -07:00
Jack Yu
dd64813204 Add sepolicy to allow read/write nfc snoop log data
Bug: 153704838
Test: nfc snoop log could be accessed
Change-Id: I694426ddb776114e5028b9e33455dd98fb502f0a
2020-09-24 17:36:07 +08:00
Yifan Hong
0299faf7cd Merge "Add gki.prevent_downgrade_*" 2020-09-23 23:25:35 +00:00
Nick Moukhine
75568c5540 Merge "Add sepolicy for music recognition service." 2020-09-23 13:26:52 +00:00
Nick Moukhine
affe2399b5 Add sepolicy for music recognition service.
Denial when not listed in priv_app.te:
E SELinux : avc:  denied  { find } for pid=3213 uid=10170 name=music_recognition scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:music_recognition_service:s0 tclass=service_manager permissive=0


Bug: 158194857
Test: patched and tested on internal master
Change-Id: I30e9ea79a57d9c353b732b629bd5a829c89bbcb0
2020-09-23 10:57:19 +00:00
Yu-Han Yang
9f1836ce1a Merge "Revert "Add GNSS AIDL interfaces (system/sepolicy)"" 2020-09-22 23:31:14 +00:00
Yifan Hong
cb23ab4618 Add gki.prevent_downgrade_*
Add ro.build.ab_update.gki.prevent_downgrade_{version,spl} for
update_engine to determine whether downgrade in kernel version or SPL is
considered an error or not.

Bug: 162623577
Test: update_engine_unittest
Test: apply OTA

Change-Id: If602924d50a2d5cfb3c256b82491c413a9d39f9d
2020-09-22 14:09:49 -07:00
Aleks Rozman
a1ba5a9f5a Revert "Add GNSS AIDL interfaces (system/sepolicy)"
This reverts commit d5f59b1b77.

Reason for revert: b/169150373

Change-Id: I3d5e20400ea8ee0e9ae439497245c09a13aaa716
2020-09-22 18:25:48 +00:00
Yu-Han Yang
7c7b41715e Merge "Add GNSS AIDL interfaces (system/sepolicy)" 2020-09-21 20:24:37 +00:00
Treehugger Robot
714e134b25 Merge changes If936c556,Ief48165c
* changes:
  Add permissions required for new DMA-BUF heap allocator
  Define a new selinux label for DMABUF system heap
2020-09-21 17:59:16 +00:00
Yu-Han Yang
d5f59b1b77 Add GNSS AIDL interfaces (system/sepolicy)
Bug: 159467682
Test: on cuttlefish
Change-Id: Iae7ceefe985096bcf9140e2a3592aade7ad70407
2020-09-17 13:31:29 -07:00
Steven Moreland
9a4c8d3043 Merge "Remove thermalcallback_hwservice." 2020-09-17 00:37:28 +00:00
Yifan Hong
b8e0f11986 Merge "Revert "Add modules partition"" 2020-09-16 22:45:55 +00:00
Steven Moreland
19deb1f856 Remove thermalcallback_hwservice.
There is no need for this type to be declared because it is never
registered with hwservicemanager.

This has been removed in the past but it seems it didn't automerge.

Bug: 109802374
Test: N/A
Change-Id: Id9bbc5762b6dcc8066c8543cb93db937cc4fc858
2020-09-16 21:57:05 +00:00
Yifan Hong
38a901df56 Revert "Add modules partition"
Revert submission 1413808-modules_partition

Reason for revert: modules partition no longer needed
Reverted Changes:
Iceafebd85:Add modules partition
I2fa96199a:rootdir: Add modules directory
Ie397b9ec6:Add modules partition.
I4200d0cf5:fastboot: add modules partition

Bug: 163543381

Change-Id: I613d4efa346b217e0131b14424bc340ad643e1d6
2020-09-15 19:08:24 +00:00
Benjamin Schwartz
dc505c51ea Merge "Create Power Stats AIDL interface" 2020-09-15 16:39:36 +00:00
Neil Fuller
dbc1ccac14 Add location_time_zone_manager_service
The LocationTimeZoneManagerService is being added as a "true" service so
that it can be invoked by a shell command (i.e. adb shell cmd). This
also means it will be dumped as part of dumpsys.

Test: Build only
Bug: 149014708
Change-Id: Ie60c4bea3af27a89b88ed753f9cf6e74aab04cd3
2020-09-14 15:19:02 +01:00
Hridya Valsaraju
a7cd26e664 Define a new selinux label for DMABUF system heap
Define the label dmabuf_system_heap_device for /dev/dma_heap/system.
This the default DMA-BUF heap that Codec2 will use one ION is
deprecated.
Test: video playback without denials with DMA-BUF heaps enabled
Bug: 168333162

Change-Id: Ief48165cd804bde00e1881a693b5eb44a45b633b
2020-09-11 14:27:41 -07:00
Benjamin Schwartz
af8b21a6d2 Create Power Stats AIDL interface
Bug: 162472196
Test: m
Merged-In: I948ef2959b25d776d3b01985fea5eb695fd4fc1e
Change-Id: I12dc33ce055c7275559cce33142cfb2aacc5471f
2020-09-10 22:34:49 -07:00
Dmitri Plotnikov
b08351fa4f Define power.battery_input.suspended property
Bug: 167636754

Test: on a device that has triggers configured for this property
Test: adb shell setprop power.battery_input.suspended true to disable charging
Test: adb shell setprop power.battery_input.suspended false to reenable charging

Merged-In: I79209530d5355a59a1cb7a61c629339cd62f8eb1
Merged-In: I4692d84d5c137d11c6f648d15083614e707fdd07
Change-Id: I7a20c0d561a21fa958cf71c499604d70efdbe979
2020-09-10 22:33:24 -07:00
Dmitri Plotnikov
8cad90e5f9 Define power.battery_input.suspended property
Bug: 167636754

Test: on a device that has triggers configured for this property
Test: adb shell setprop power.battery_input.suspended true to disable charging
Test: adb shell setprop power.battery_input.suspended false to reenable charging

Merged-In: I79209530d5355a59a1cb7a61c629339cd62f8eb1
Merged-In: I4692d84d5c137d11c6f648d15083614e707fdd07
Change-Id: I4692d84d5c137d11c6f648d15083614e707fdd07
2020-09-10 18:52:30 -07:00
Treehugger Robot
fd735237e4 Merge "Add sepolicy for IFingerprint" 2020-09-11 01:11:03 +00:00
Yifan Hong
bf40692c20 Merge "Add modules partition" 2020-09-11 00:25:24 +00:00
Ilya Matyukhin
c71c2993e9 Add sepolicy for IFingerprint
Bug: 152416783
Test: run on cuttlefish
Change-Id: I58d7c3bc9c81612b03bab3b9da938c091c02e3c1
2020-09-10 16:50:19 -07:00
Yifan Hong
1fea7a2712 Reorder 30.0.ignore.cil am: 99f6010820
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1421853

Change-Id: I0b680ac97ee447483de5b99ffa30a9b8d5c02d41
2020-09-09 07:35:23 +00:00
Yifan Hong
648d956cc0 Add modules partition
Add updateable_module_file that describes all files under /modules. If
more directories (e.g. /modules/apex etc.) are added in the future,
separate labels should be applied to them.

Bug: 163543381
Test: on CF check /proc/mounts

Change-Id: Iceafebd85a2ffa47a73dce70d268d8a6fb5a5103
2020-09-08 16:35:51 -07:00
Yifan Hong
99f6010820 Reorder 30.0.ignore.cil
Test: pass
Change-Id: Ib6e55348641db3eeb26eaa74423ccd62724ec7ed
2020-09-08 16:35:51 -07:00
Treehugger Robot
61d4da7602 Merge "Add shell_test_data_file for /data/local/tests" am: d482ae77d1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1416433

Change-Id: I71009bfcae1753f0cf46042a41e567e543f02322
2020-09-03 03:07:05 +00:00
Xin Li
bcbd2f8916 Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master 2020-09-01 20:03:58 +00:00
Colin Cross
da4e51b71f Add shell_test_data_file for /data/local/tests
Add a domain for /data/local/tests which will be used by atest
to execute tests on devices as shell or root.

Bug: 138450837
Test: atest binderVendorDoubleLoadTest memunreachable_unit_test memunreachable_binder_test
Change-Id: Ia34314bd9430e21c8b3304ac079e3d9b5705e19c
2020-09-01 11:17:19 -07:00
Yi Kong
cdacc620b7 Add file context type for /sys/devices/cs_etm
This is the cs_etm (Coresight ETM) sysfs directory.

Bug: 79161490
Test: build
Change-Id: I9a66bb4b2684ef8637106a36f7d490d8f805cabf
2020-08-31 08:28:12 +00:00
Xin Li
11da9e6792 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I6d0b1be1a46288fff42c3689dbef2f7443efebcc
Change-Id: I133180d20457b9f805f3da0915e2cf6e48229132
2020-08-29 01:45:24 -07:00
Treehugger Robot
4c5220c2bc Merge "Support GKI updates" 2020-08-28 21:24:34 +00:00