Commit graph

700 commits

Author SHA1 Message Date
Jiyong Park
c4f84bcb37 Don't let ro.log.file_logger.path to be set
ro.log.file_logger.path is a system property that liblog uses to
determine if file_logger should be used (instead of logd) and what file
the logs should be emitted to. It is primarily meant for non-Android
environment like Microdroid, and doesn't need to be set in Android. In
fact, setting it to a wrong value can break the system logging
functionality. This change prevents such a problem by assigning a
dedicated property context (log_file_logger_prop) to the property and
making it non-writable. (Note that it still has to be readable because
liblog reads it and liblog can be loaded in any process)

Bug: 222592894
Test: try to set ro.log.file_logger.path

Change-Id: Ic6b527327f5bd4ca70a58b6e45f7be382e093318
2022-09-18 23:39:41 +09:00
Treehugger Robot
7c4f837e40 Merge "Microdroid: remove logd and logcat" 2022-09-17 13:03:08 +00:00
Jiyong Park
75e8c1f461 Microdroid: remove logd and logcat
Previously in Microdroid, processes send log messages to logd over
socket and then logcat ran to hand the message to the host side over the
serial console.

That has changed. Now, the liblog library which processes use to emit
logs directly sends the given message to the serial console. Liblog does
this by reading a new system property ro.log.file_logger.path. When this
is set, liblog doesn't use the logd logger, but opens the file that the
sysprop refers to and writes logs there.

This change implments sepolicy side of the story.

* logd and logcat types are removed since they no longer are needed.
* existing references to those types are removed as well.
* a new property type `log_prop` is introduced and the two system
  properties are labaled as log_prop
* all processes have read access to the system properties
* all processes have append access to /dev/hvc2

Bug: 222592894
Test: run microdroid, see log is still emitted.

Change-Id: I4c4f3f4fd0e7babeab28ddf39471e914445ef4da
2022-09-14 14:27:26 +00:00
Katherine Lai
e3398210b8 Add bluetooth LE inquiry scan parameters
Bug: 233119457
Tag: #floss
Test: Manual
Change-Id: I4d0b505b761ad49832ef1d5e5097f6aad7a472e7
2022-09-09 20:48:36 +00:00
Suren Baghdasaryan
9fdb29826f Add policies for ro.kernel.watermark_scale_factor property
New ro.kernel.watermark_scale_factor property is used to store the
original value read from /proc/sys/vm/watermark_scale_factor before
extra_free_kbytes.sh changes it. The original value is necessary to
use the same reference point in case the script is invoked multiple
times. The property is set by init the first time script is invoked
and should never be changed afterwards.

Bug: 242837506
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I7760484854a41394a2efda9445cff8cb61587514
2022-09-08 19:35:34 +00:00
Jooyung Han
ba80cd59a7 Merge changes from topics "apex-ready-prop", "apex-update-prop"
* changes:
  Modifed sepolicy for new apex ready prop
  Remove init.apex.<apex-name>.load/unload property
2022-09-02 06:46:54 +00:00
Deyao Ren
7848d3a437 Modifed sepolicy for new apex ready prop
Bug: 232172382
Test: atest ApexTestCases
Change-Id: I2947b2c9b1d983bdbc410e67509508f73efff1f4
2022-09-01 22:20:10 +00:00
Deyao Ren
3fab00fab2 Remove init.apex.<apex-name>.load/unload property
Bug: 240533726
Test: atest CtsInitTestCases ApexTestCases
Change-Id: Ibe4d1c199157397a747bb87918848917a24f0535
2022-09-01 16:24:55 +00:00
Paul Crowley
283aef2860 Add ro.keystore.boot_level_key.strategy
Bug: 241241178
Test: set property on Cuttlefish, check logs for strategy used.
Change-Id: Ifaaec811316c43fdae232f9a08c5d862011ccc71
2022-08-24 21:38:36 -07:00
Hongguang
9515559657 Add properties to configure whether the lazy tuner is enabled.
ro.tuner.lazyhal: system_vendor_config_prop to decide whether the lazy
tuner HAL is enabled.
tuner.server.enable: system_internal_prop to decide whether tuner server
should be enabled.

Bug: 236002754
Test: Check tuner HAL and framework behavior
Change-Id: I6a2ebced0e0261f669e7bda466f46556dedca016
2022-08-23 07:01:05 +00:00
Kelvin Zhang
0a8d5697a6 Merge "Add sepolicy for fastboot io uring feature flag" 2022-08-19 16:37:07 +00:00
Alessandra Loro
50fa5cd9a0 Merge "Disallow untrusted apps to read ro.debuggable and ro.secure" 2022-08-17 12:34:24 +00:00
Richard Chang
6d5bb236da Merge "sepolicy: allow vendor system native boot experiments property" 2022-08-17 06:29:30 +00:00
Juan Yescas
bec405a7c2 Add ro.boot.ddr_size sysprop to sepolicy
srcs/android/sysprop/MemoryProperties.sysprop

This property is populated by property service from the kernel
command line parameter androidboot.ddr_size=XXXX. Vendors can set
this command line option from the bootloader.

Bug: 231718727
Test: n/a
Change-Id: I3fb8a18125081b1a30dee715831f5701964cb375
2022-08-16 19:45:35 +00:00
Xin Li
122f787b8a Merge "DO NOT MERGE - Merge Android 13" 2022-08-16 19:11:36 +00:00
Kelvin Zhang
aa7a9a4096 Add sepolicy for fastboot io uring feature flag
fastboot will read this prop to check if io uring is supported. Add
proper sepolicy.

Test: th
Bug: 31712568
Change-Id: I8990d8a31748534d4444a2ef25b58d629651dac7
2022-08-16 18:13:00 +00:00
Alessandra Loro
d0e108fbbe Disallow untrusted apps to read ro.debuggable and ro.secure
ro.secure and ro.debuggable system properties are not intended
to be visible via Android SDK. This change blocks untrusted
apps from reading these properties.

Test: android.security.SELinuxTargetSdkTest
Bug: 193912100
Change-Id: I40ac5d43da5778b5fa863b559c28e8d72961f831
2022-08-16 14:24:27 +00:00
Richard Chang
74334efa4b sepolicy: allow vendor system native boot experiments property
Grant system_server and flags_health_check permission to set the
properties that correspond to vendor system native boot experiments.

Bug: 241730607
Test: Build
Merged-In: Idc2334534c2d42a625b451cfce488d7d7a651036
Change-Id: I3e98f1b05058245cad345061d801ecd8de623109
2022-08-11 08:03:42 +00:00
Katherine Lai
e564c90cba Add bluetooth sniff and LE connection sysprops
Added new sysprops to configure sniff parameters (max interval,
min interval, attempt, timeout) and LE connection parameters
(min/max connection interval, latency, supervision timeout,
direct connection timeout, scan interval/window)

Bug: 233119719
Bug: 233119457
Tag: #floss
Test: Manual
Change-Id: I9663e05067800ef79528bfbc7b626c29cf5514de
2022-08-09 22:57:57 +00:00
Treehugger Robot
e558e909d4 Merge "Add sepolicy for bluetooth.core.gap.le.conn.min.limit sysprop" am: bc2ecffff5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2170423

Change-Id: Ifd6b084143f9ec0ab0fe5a4eabbb276977ca5d03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 19:32:04 +00:00
Steven Moreland
99d79a5737 Merge "servicemanager started property" am: 560a947de8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2161201

Change-Id: I37959f094a56b64a0e61141e8dca613a7294322d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 18:48:10 +00:00
Dorin Drimus
1c3cf830d9 Add sepolicy for bluetooth.core.gap.le.conn.min.limit sysprop
Bug: 240709612
Change-Id: I893f5ec04a8abb4ecf724e9e179d0295a681b82b
Test: N/A, CL only adds the sysprop API sepolicy
2022-07-29 18:45:52 +00:00
Steven Moreland
fd1eb68337 servicemanager started property
If something starts before servicemanager does,
intelligently wait for servicemanager to start rather
than sleeping for 1s.

Bug: 239382640
Test: boot
Change-Id: If0380c3a1fce937b0939cd6137fcb25f3e47d14c
2022-07-28 17:09:14 +00:00
Matt Buckley
110d394660 Merge "Add ro.surface_flinger.enable_adpf_cpu_hint sysprop to sepolicy" am: ae7e3756ba
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2161459

Change-Id: I3e088f0c56907c6829f18ac9af6f61a7e42102bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 05:35:27 +00:00
Matt Buckley
1b23789dfe Add ro.surface_flinger.enable_adpf_cpu_hint sysprop to sepolicy
Add new sysprop to control adpf cpu hints for surfaceflinger

Bug: b/195990840
Test: n/a
Change-Id: I5460e4668a2d69af194649ec076489de22caa348
2022-07-21 23:00:15 +00:00
Katherine Lai
45ce880b05 Merge "Add bluetooth classic sysprops" am: 963596866a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2154517

Change-Id: I58363adb52d3cfa93fb86ef8ee24f95e41b55d60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 20:56:52 +00:00
Katherine Lai
9bddb0d32f Add bluetooth classic sysprops
Added new sysprops to configure classic link supervision timeout,
page/inquiry scan activity, and page timeout

Bug: 233119719
Tag: #floss
Tag: #feature
Test: Manual
Change-Id: I92c598f97ca37486c208c7e37ad0d194f6f0b8b2
2022-07-18 20:55:20 +00:00
Nikita Ioffe
fb3df6dc4a Merge "Add apexd.config.loop_wait.attempts sysprop to sepolicy" am: 5dd9e3a320
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2152793

Change-Id: I6161cbd8f80aa3a2cb17c2af364ee6df9d5354f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 10:34:05 +00:00
Nikita Ioffe
0fd6e24297 Add apexd.config.loop_wait.attempts sysprop to sepolicy
Also mark all apexd.config. properties to be apexd_config_prop

Bug: 237955261
Test: m
Change-Id: I93a9e1b450426ebe7cd11c87a9586697dc76a70e
2022-07-13 12:31:18 +01:00
Treehugger Robot
c383817add Merge "Added properties for rebootless apex install" am: be031287e4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2147819

Change-Id: Iac6f20e59f2924248892657c74525034ce1b3c95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 04:20:59 +00:00
Jooyung Han
ccfb0ef146 Added properties for rebootless apex install
When apexd installs an apex without reboot, init also need to do some
work around the installation (e.g. terminating services from the apex
and remove data read from the apex and updating linker configuration
etc)

Apexd sets control properties to unload and load apex and init notifies
the completion with state properties.

These new properties are supposed to be used by apexd/init interaction.

Bug: 232114573
Bug: 232173613
Test: CtsStagedInstallHostTestCases
Test: CtsInitTestCases
Change-Id: I5af6b36310f3c81f1cd55537473e54756541d347
2022-07-08 12:12:45 +09:00
Xin Li
03efcb5695 Merge "Merge tm-dev-plus-aosp-without-vendor@8763363" into stage-aosp-master 2022-06-29 21:21:45 +00:00
Mitch Phillips
add13f0783 Add persistent gwp-asan sysprops
Like the non-persistent variants, should be settable by shell without
root to allow external developer use on locked bootloaders.

Bug: 236738714
Test: atest bionic-unit-tests
Change-Id: Id9fc4abe491f560134267b06dd53c2dacca9422d
2022-06-23 11:11:35 -07:00
Treehugger Robot
d1e6ba9a7b Merge "SELinux configuration for memory safety device configs." am: 13b939a91a am: c0866fe311
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2120412

Change-Id: If4a0b99f14d37155a840c997cd36da4ecd334b2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 07:10:04 +00:00
Florian Mayer
7564cb1833 Merge "Add property for MTE permissive mode." am: 981f5581f6 am: 255cbf108a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2101776

Change-Id: If09152789586c662abfa9cbabeecde200f786a0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 17:36:53 +00:00
Florian Mayer
5b3a8333af SELinux configuration for memory safety device configs.
These will get read by system libraries in arbitrary processes, so it's
a public property with read access by `domain`.

Bug: 235129567
Change-Id: I1ab880626e4efa2affe90165ce94a404b918849d
2022-06-15 10:34:54 -07:00
Florian Mayer
56af9a268a Add property for MTE permissive mode.
Bug: 202037138
Change-Id: I272996f124ca8391f9312150d1d8757751fe6acb
2022-06-14 10:21:25 -07:00
Yi-yo Chiang
290546b504 Merge "Label ro.force.debuggable as build_prop" am: c85ac2ea3a am: fcbd51b544
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2122376

Change-Id: I28c54af35917a64b2b288b5d97e09074470cc797
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 06:59:12 +00:00
Yi-yo Chiang
c85ac2ea3a Merge "Label ro.force.debuggable as build_prop" 2022-06-13 06:17:47 +00:00
Yi-Yo Chiang
598d079de7 Label ro.force.debuggable as build_prop
It was default_prop. Label it build_prop for good code hygiene.

Bug: 223517900
Test: Boot with and without debug boot image
Change-Id: I4e00d301eb526a0fc9e29657cbcedda8dd0fc7b1
2022-06-10 14:52:38 +08:00
Steven Terrell
879f41c5f2 Add System Property Controlling Animators
Adding a new system property that will act as a toggle
enabling/disabling the framework changes that were submitted to prevent
leaked animators.

Bug: 233391022

Test: manual.

Merged-In: I57225feb50a3f3b4ac8c39998c47f263ae211b66
Change-Id: Ifc339efc1c3a5e19920b77d1f24bef19c39d5f44
2022-06-07 20:22:10 +00:00
Steven Terrell
399f831f56 Merge "Add System Property Controlling Animators" into tm-dev am: 6eb7171c4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/18565495

Change-Id: I0f8e5c4b1f876545c192812851b5d18c8897acfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 19:57:37 +00:00
Steven Terrell
bc844c5c2b Add System Property Controlling Animators
Adding a new system property that will act as a toggle
enabling/disabling the framework changes that were submitted to prevent
leaked animators.

Bug: 233391022

Test: manual.
Ignore-AOSP-First: planning to commit to tm-dev then cherry-pick over to
                   AOSP later.
Change-Id: I57225feb50a3f3b4ac8c39998c47f263ae211b66
2022-05-27 20:00:37 +00:00
Joshua Mccloskey
4d7110412c Merge "Add sysprops for virtual Fingerprint/Face HAL" am: 3fda68d6ca am: e0ae396b92
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2089003

Change-Id: I8621db1c764ae9bd99a373aaf9a280b6a40a5874
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-16 17:08:08 +00:00
Joshua McCloskey
f42a5c953b Add sysprops for virtual Fingerprint/Face HAL
Test: Manually verified virtual Fingerprint/Face HAL could set/get props
Bug: 230514750
Change-Id: I7ab5ff81d128b486ef181824c67cfa0ded230e08
2022-05-13 22:52:50 +00:00
Jean-Michel Trivi
b3cd0a0baf Spatial audio: add property for headtracking am: ad4a63a5aa am: c62ce77d7a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2085743

Change-Id: I3c7217910e324b7355b3ff52ff5bdaa37e9d66d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 17:53:56 +00:00
Jean-Michel Trivi
ad4a63a5aa Spatial audio: add property for headtracking
Add a property to be read by system_server's AudioService that
indicates whether the spatializer effect can use head tracking.
If true, head tracking functionality will be initialized and
the corresponding APIs will be active.

Bug: 226474336
Test: atest android.media.audio.cts.SpatializerTest
Change-Id: Id8f574ecd2303034a29da58615018586b68bf55d
2022-05-03 15:16:52 +00:00
Treehugger Robot
26a1ecf3c4 Merge "Add "ro.hardware.egl_legacy" for ANGLE system driver" am: fe1ad47b3b am: 4a0b80879a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2078298

Change-Id: I8f3a24dfef0715a5a9ea7b86a9ca4928850c78b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 19:25:09 +00:00
Treehugger Robot
fe1ad47b3b Merge "Add "ro.hardware.egl_legacy" for ANGLE system driver" 2022-05-02 18:41:39 +00:00
Ian Elliott
92251f5d15 Add "ro.hardware.egl_legacy" for ANGLE system driver
This supports the ability to switch between ANGLE and a legacy GLES
driver in cases when transitioning from a legacy GLES driver to ANGLE
as the system driver.  With ANGLE as the GLES system driver, the
platform needs a way to identify the legacy GLES driver, so that it
can be used for particular applications.

Test: CtsAngleDeveloperOptionHostTest
Bug: 224558229
Change-Id: I359b37daa96eb6f8424bde530bb1ac79affd1b04
2022-04-29 18:35:16 -06:00