Commit graph

369 commits

Author SHA1 Message Date
Inseob Kim
d3dbcc1b82 Fix malformed property_contexts entry
Prefix entries should not have the suffix '*'.

Test: set property and invoke getprop -Z
Change-Id: I33dc7c6ac1bc05ecc1e3a7b331bc827717afa252
2020-12-14 13:24:14 +00:00
Treehugger Robot
c0d1040d58 Merge "Export ro.vendor.product.cpu.abilist*" 2020-12-10 09:01:40 +00:00
Chris Wailes
4540efcf73 Added permissions for new dexopt flags.
Bug: 173137187
Test: build
Merged-In: Iad1d23277915e1dbf655b0f2820320f15462ab33
Change-Id: Iad1d23277915e1dbf655b0f2820320f15462ab33
2020-12-07 16:15:24 -08:00
SzuWei Lin
4293743c23 Export ro.vendor.product.cpu.abilist*
Bug: 173452246
Test: Read these properties from system_server
Change-Id: I26b8bbe153d55a2761ecc304a490a03a27156667
2020-11-26 17:37:30 +08:00
Inseob Kim
5637aba56c Merge "Add ro.cpuvulkan.version to property_contexts" 2020-11-23 02:24:30 +00:00
Treehugger Robot
34211741dd Merge "Selinux changes for statsd flags" 2020-11-21 00:12:07 +00:00
Inseob Kim
f1a7f16bab Add ro.cpuvulkan.version to property_contexts
Bug: 173683489
Test: vts_treble_sys_prop_test
Test: VulkanTest
Change-Id: I4d78ed5de6640c4342c4f6c2362976577007a681
2020-11-20 17:28:08 +09: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
Tej Singh
dd0988fb9b Selinux changes for statsd flags
Test: manually verified statsd can get values using
GetServerConfigurableFlag
Bug: 172842175

Change-Id: I05cb2242dc758e32a22ddf30cb6f09088b70f5d4
2020-11-17 19:28:41 -08: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
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
8eae0aa1fb Merge "Add context for ro.product.property_source_order" 2020-11-13 00:49:15 +00: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
yawanng
895164f402 Added permissions for new dexopt flags on methods/classes percent change.
Bug: 172490638
Test: Make
Change-Id: Ia08895f9ccfba3b860e59d810ef67668f52c675e
2020-11-11 22:51:46 +00:00
Treehugger Robot
aa405a473a Merge "Added read only suspend hal properties" 2020-11-10 04:56:33 +00:00
Benjamin Schwartz
3e4d97b158 Added read only suspend hal properties
Bug: 170587692
Test: Inspected logs to confirm android.system.suspend can access the
properties

Change-Id: Ie6a84afe490df0d2b11ff4f06588c7bca68d9850
2020-11-09 15:47:12 -08: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
Inseob Kim
072e7c8bd2 Add missing build.prop related properties
ro.actionable_compatible_property.enabled and ro.treble.enabled are in
system/build.prop, so they are assigned as build_prop. The other added
properties are introduced by build/make/core/sysprop.mk.

Bug: 170590987
Test: boot and see default_prop
Change-Id: I2ec1df99985ca81d27e657750eb8895fe4b85b35
Merged-In: I2ec1df99985ca81d27e657750eb8895fe4b85b35
2020-11-04 00:52:09 +00:00
Janis Danisevskis
202e8636ac Add policy for property ro.android.security.keystore2.enable
Bug: 171563717
Bug: 171305684
Test: N/A
Change-Id: I323081fd2ce2fee80951c3d1e19b9935e4596705
2020-10-27 09:49:18 -07:00
Yi Kong
eeff15559c Sort device_config property context rules
Clean up, no functionality change.

Test: TreeHugger
Change-Id: I5069bb224f22a34bafc4040eaf60ff095f8c3ed6
2020-10-27 18:57:42 +08:00
Woody Lin
62ddcf0580 Merge "Add zygote.critical_window.minute property" 2020-10-27 08:22:14 +00: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
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
Woody Lin
1b2d790bc4 Merge "Add framework_watchdog_config_prop" 2020-10-15 06:44:52 +00:00
Marin Shalamanov
bf908d3be5 Rename the sysprop for updating device product info
Test: read the prop from SurfaceFlinger; test on device
Change-Id: Id80954d6ea426b90b6cea5f74aae4d6cc905fcc5
2020-10-12 22:01:54 +02: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
Marin Shalamanov
01dbd09c8c Add sysprop for updating device product info
Test: read the prop from SurfaceFlinger; test on device
Change-Id: I4cde2244a9991e7051b3a3d52882ed4430ed046f
2020-10-08 15:49:50 +02: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
Alan Stokes
fc0cab8d28 Allow vold to set MLS level on per-user directories.
We want to extend vold_prepare_subdirs to set the MLS level to the
correct per-user value for selected user-specific directories.

Grant vold_prepare_subdirs the access it needs to do this, and allow
vold to access the temporary property controlling this.

Bug: 141677108
Test: Manual, with and without property set.
Change-Id: I572462cfd9b8869381f2af5faa29165bb8373d4b
2020-10-02 13:39:59 +01:00
Yifan Hong
0299faf7cd Merge "Add gki.prevent_downgrade_*" 2020-09-23 23:25:35 +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
David Anderson
55967665b4 Add sepolicy for the new Virtual A/B feature flag.
ro.virtual_ab.compression.enabled is the flag gating Virtual A/B
compression-related features.

Bug: 168257347
Test: adb shell getprop
Change-Id: Ied0bda0f3ea963e9d4010adf36ed0dfaf0b97d1c
2020-09-22 13:02:00 -07:00
Treehugger Robot
9ce62543d8 Merge "Add ro.cdma.home.operator. properties" 2020-09-22 02:24:42 +00:00
Kelvin Zhang
84105de0ef Grant gmscore permission to read virtual ab properties
Bug: 168059475
Test: Serve an update over gmscore
Change-Id: Iefd88f4189b50ee68ee09bcb5a20556ba4ea3e1a
2020-09-21 10:27:20 -04:00
Inseob Kim
18cbb77b5c Add ro.cdma.home.operator. properties
vendor_init writes ro.cdma.home.operator. properties, and framework
codes reads the properties. This adds them to telephony_config_prop to
explicitly allow it.

Bug: 157958356
Test: boot
Change-Id: I3bd515bd7adcc01ec268e4d2b5a6a2f1fbca7deb
2020-09-21 12:59:11 +09: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
Marvin Ramin
30ab116b7f Add ro.hdmi.cec.source.set_menu_language.enabled context am: bc1fbf57fa
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1418592

Change-Id: I02fe54be0c62c7936934db3b733acd29e3cbeb7e
2020-09-03 14:18:52 +00:00
Marvin Ramin
bc1fbf57fa Add ro.hdmi.cec.source.set_menu_language.enabled context
Add ro.hdmi.cec.source.set_menu_language.enabled to hdmi_config_prop.

Test: make; flash
Bug: 158527048
2020-09-03 09:23:20 +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
Inseob Kim
46dd4be366 Reland "Add persist.dumpstate.verbose_logging.enabled to system/..."
This reverts commit 409c038d3c.

Reason for revert: fixed breakage

Bug: 163759751
Test: lunch sdk; m selinux_policy
Change-Id: I59d170cd3a764209d353d77372387fdc8719ea7f
2020-08-18 11:31:42 +09:00
Roman Kiryanov
409c038d3c Revert "Add persist.dumpstate.verbose_logging.enabled to system/..."
Revert submission 1401269-dumpstate-prop

Reason for revert: build break, "Failed to build policydb".
Reverted Changes:
I058100eac:Add persist.dumpstate.verbose_logging.enabled to s...
Ia0656a3cb:Move hal_dumpstate's property from goldfish

Change-Id: I3a49545d3ee69fdae54ad66e44ec28b6cbfb4b87
2020-08-18 01:41:13 +00:00
Roman Kiryanov
dc2f9a86f0 Add persist.dumpstate.verbose_logging.enabled to system/sepolicy
hardware/interfaces/dumpstate/1.1 refers to this property,
so it must be defined in system/sepolicy.

Bug: 163759751
Test: atest VtsHalDumpstateV1_1TargetTest
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I058100eacd05e32de56e0ff9de465625a2e71e9c
2020-08-17 16:45:47 -07:00
Evgenii Stepanov
cc782e4516 Property contexts for ro.sanitize.*
Bug: 142430632
Test: adb shell getprop ro.sanitize.hwaddress in hwasan build
Change-Id: I106ed955c7c0c73234e55d1b896b446b75a251cc
2020-08-06 23:30:07 +00:00
JaeMan
2e91219f9a Add ro.vendor.build.version.sdk to build_vendor_prop
At b/160209547, it is needed to read
ro.vendor.build.version.sdk prop to determine
whether skipping test or not based on vendor
image's release version. But
ro.vendor.build.version.sdk is not added to
property_contexts and failed to read that prop in
tests. So, added ro.vendor.build.version.sdk to
property_contexts for checking vendor image's
release version in test.

Bug: 160209547
Test: m selinux_policy
Change-Id: I86bcfa632de61c5805e42aea3a1f232ae4ad080e
(cherry picked from commit 65cecec142)
2020-08-05 05:33:28 +00:00
Tianjie Xu
2253b0fc93 Merge "Add secontext for ro.product.ab_ota_partitions" 2020-08-04 21:36:08 +00:00
Inseob Kim
acd02fc5e4 Rename exported3_radio_prop to radio_control_prop
The context name exported3_radio_prop is ambiguous and does not reflect
the usage and role of the properties. This changes its name to
radio_control_prop.

Some downstream branches are still using exported3_radio_prop, so
get_prop(domain, radio_control_prop) is added to avoid regression. It's
just a workaround and to be removed soon, after all exported3_radio_prop
are cleaned up.

Bug: 162214733
Test: boot a device with a sim and see basic functions work
Change-Id: If5fe3be7c64b36435c4ad0dc9a8089077295d502
Merged-In: If5fe3be7c64b36435c4ad0dc9a8089077295d502
2020-08-03 09:23:02 +00:00
Treehugger Robot
a9e195943c Merge "Allow vendor_init to set service.adb.tcp.port" 2020-07-31 04:54:38 +00:00