Commit graph

320 commits

Author SHA1 Message Date
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
Inseob Kim
150355b1c3 Merge "Revert^2 "Make default_prop only readable from coredomain"" 2021-01-14 09:42:25 +00:00
Inseob Kim
5c011e57a5 Revert^2 "Make default_prop only readable from coredomain"
This reverts commit 32fbfbc016.

Reason for revert: Fixed breakages

Change-Id: I474ee7dd7b82b4f2e02353e8a3fb55e3c410941f
2021-01-14 04:08:16 +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
Jackal Guo
32fbfbc016 Revert "Make default_prop only readable from coredomain"
This reverts commit 082ced1951.

Reason for revert: b/176784961

Change-Id: Ia85667216d63084e9e23aefe1d3bfd7942d51a2a
2021-01-05 08:47:57 +00:00
Inseob Kim
082ced1951 Make default_prop only readable from coredomain
default_prop has been readable from coredomain and appdomain. It's too
broad, because default_prop is a context for properties which don't have
matching property_contexts entries.

From now on, only coredomain can read default_prop. It's still broad,
but at least random apps can't read default_prop anymore.

Bug: 170590987
Test: SELinux denial boot test for internal devices
Change-Id: Ieed7e60d7e4448705c70e4f1725b2290e4fbcb4a
2020-12-14 16:58:23 +09: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
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
Josh Gao
0cac6fd17a Let adbd set service.adb.tcp.port.
Commit 67c36884 changed the label of service.adb.tcp.port to allow
vendor init to set it, but accidentally prevented adbd from setting it,
which broke `adb tcpip`.

Bug: http://b/171280882
Test: `adb tcpip`
Change-Id: I154e2f43a4d3b72b27508ce02d66298673939738
2020-11-06 13:08:04 -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
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
Inseob Kim
574666cb4f Reland "Add vendor_property_type to vendor_default_prop"
This reverts commit 80d6227114.

Reason for revert: fixed build error

Bug: 131162102
Test: m selinux_policy sepolicy.recovery
Change-Id: Ic974f54acd3471bf7bf8c09d8392f2dd7a248f41
2020-10-14 20:54:05 +09: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
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
Jakub Pawlowski
80d6227114 Revert "Add vendor_property_type to vendor_default_prop"
This reverts commit d68d0ca0fc.

Reason for revert: broke build

Change-Id: I52905a143a31829d3825a2aa07bbf09b957240f0
2020-10-05 11:52:47 +00:00
Inseob Kim
d68d0ca0fc Add vendor_property_type to vendor_default_prop
Bug: 159097992
Test: m selinux_policy
Change-Id: Ic5fca5ff263584fe3e8b334003d671d706070cb8
2020-10-05 15:02:20 +09: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
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
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
Inseob Kim
96b9d86a0e Remove exported2_system_prop
It's not used anymore.

Bug: 161659925
Test: boot
Change-Id: I5b08bdace28a509d464759a66025c951178225c6
Merged-In: I5b08bdace28a509d464759a66025c951178225c6
(cherry picked from commit 7d96ddbfb0)
2020-08-06 12:52:32 +09:00
Inseob Kim
4ae7ec1915 Remove exported3_radio_prop
It's renamed to radio_control_prop

Bug: 162214733
Test: boot
Change-Id: Idede1a1ab471a354a6f5df12b6889abc7c1ad869
2020-08-03 09:23:39 +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
Hongguang Chen
67c3688497 Allow vendor_init to set service.adb.tcp.port
adbd and apps (SystemUI and CTS test apps) need to read it.

BUG: 162205386
Test: Connect to device which sets service.adb.tcp.port in vendor
      partition through TCP adb.

Change-Id: Ia37dd0dd3239381feb2a4484179a0c7847166b29
2020-07-28 02:13:03 +00:00
Inseob Kim
40c67b20f6 Remove exported2_default_prop
This cleans up remaining exported2_default_prop. Three properties are
changed.

- ro.arch
It becomes build_prop.

- hal.instrumentation.enable
It becomes hal_instrumentation_prop.

- ro.property_service.version
It becomes property_service_version_prop.

Bug: 155844385
Test: selinux denial test on Pixel devices
Change-Id: I7ee0bd8c522cc09ee82ef89e6a13bbbf65291291
2020-07-25 01:06:13 +09:00
Inseob Kim
8c34247c7f Add bootloader_prop for ro.boot. properties
ro.boot. properties assigned as "exported2_default_prop" are now
"bootloader_prop", to remove bad context name "exported2_default_prop".

Two things to clarify:

1) We have both the prefix entry and the exact entries. Although the
exact entries may be redundant, we may want to keep them. Vendors are
still allowed to have properties starting with "ro.boot." on
vendor_property_contexts file. The exact entries can prevent vendors
from modifying them to random contexts.

2) ro.boot. is special as it is originally for kernel command line
"androidboot.". But some ro.boot. properties are being used as if they
were normal. To avoid regression, ro.boot. properties having contexts
other than "exported2_default_prop" are not changed here. They will be
tracked later.

Bug: 155844385
Test: m selinux_policy
Change-Id: Ic0f4117ae68a828787304187457b5e1e105a52c7
Merged-In: Ic0f4117ae68a828787304187457b5e1e105a52c7
2020-07-24 00:15:23 +00:00
Inseob Kim
162b259fed Remove exported3_default_prop
Bug: 155844385
Test: m selinux_policy
Change-Id: Ib0dc95ca2a90545286583c157d3570225ae35602
2020-07-21 04:16:04 +00:00
Inseob Kim
c97a97cd3f Move more properties out of exported3_default_prop
This is to remove exported3_default_prop. Contexts of these properties
are changed.

- ro.boot.wificountrycode
This becomes wifi_config_prop

- ro.opengles.version
This becomes graphics_config_prop. Also it's read by various domains, so
graphics_config_prop is now readable from coredomain.

- persist.config.calibration_fac
This becomes camera_calibration_prop. It's only readable by appdomain.

Bug: 155844385
Test: no denials on Pixel devices
Test: connect wifi
Change-Id: If2b6c10fa124e29d1612a8f94ae18b223849e2a9
2020-07-21 13:11:57 +09:00
Inseob Kim
c80b024241 Relabel various exported3_default_prop
This removes bad context names "exported*_prop". Property contexts of
following properties are changed. All properties are settable only by
vendor-init.

- ro.config.per_app_memcg
This becomes lmkd_config_prop.

- ro.zygote
This becomes dalvik_config_prop.

- ro.oem_unlock_supported
This becomes oem_unlock_prop. It's readable by system_app which includes
Settings apps.

- ro.storage_manager.enabled
This becomes storagemanagr_config_prop. It's readable by coredomain.
Various domains in coredomain seem to read it.

- sendbug.preferred.domain
This bcomes sendbug_config_prop. It's readable by appdomain.

There are still 3 more exported3_default_prop, which are going to be
tracked individually.

Bug: 155844385
Test: selinux denial check on Pixel devices
Change-Id: I340c903ca7bda98a92d0f157c65f6833ed00df05
2020-07-20 16:11:58 +09:00
Inseob Kim
3dbf3d8ac8 Add wifi_hal_prop and remove exported_wifi_prop
To remove bad context names "exported*_prop"

Bug: 155844385
Test: boot and see no denials
Change-Id: Icd30be64355699618735d4012461835eca8cd651
Merged-In: Icd30be64355699618735d4012461835eca8cd651
(cherry picked from commit 37c2d4d0c9)
(cherry picked from commit 3b66e9b9f8)
2020-07-17 17:38:13 +09:00
Inseob Kim
3b66e9b9f8 Add wifi_hal_prop and remove exported_wifi_prop
To remove bad context names "exported*_prop"

Bug: 155844385
Test: boot and see no denials
Change-Id: Icd30be64355699618735d4012461835eca8cd651
Merged-In: Icd30be64355699618735d4012461835eca8cd651
(cherry picked from commit 37c2d4d0c9)
2020-07-17 14:01:17 +09:00
Inseob Kim
012f68a1e1 Merge "Add property contexts for vts props" am: 98fe6847bd am: 93d1139bdc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1361757

Change-Id: I46f056fe3fb74d247e8bfb380bef486ebb5dde01
2020-07-16 12:04:22 +00:00
Inseob Kim
212e2b621a Add property contexts for vts props
vts_config_prop and vts_status_prop are added to remove exported*_prop.
ro.vts.coverage becomes vts_config_prop, and vts.native_server.on
becomes vts_status_prop.

Bug: 155844385
Test: Run some vts and then getprop, e.g. atest \
      VtsHalAudioEffectV4_0TargetTest && adb shell getprop
Test: ro.vts.coverage is read without denials
Change-Id: Ic3532ef0ae7083db8d619d80e2b73249f87981ce
2020-07-16 16:26:17 +09:00
Inseob Kim
d4be095328 Merge "Add charger related property contexts" am: 1ef68a4852 am: 6755a00ac2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1360138

Change-Id: I3bd5bc09f07e053d061a47367d6e1dcad5ec28f6
2020-07-14 07:38:39 +00:00
Inseob Kim
1ef68a4852 Merge "Add charger related property contexts" 2020-07-14 07:07:38 +00:00
Inseob Kim
09147311a8 Merge "Add tombstone_config_prop and move related prop" am: 00a87e48d1 am: ea1296c80e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1355673

Change-Id: Ifa17a49ce3a3ad5a1227f62cd83258b8507ebdf4
2020-07-10 12:15:13 +00:00
Inseob Kim
00a87e48d1 Merge "Add tombstone_config_prop and move related prop" 2020-07-10 11:48:05 +00:00
Inseob Kim
8ef4792f01 Add charger related property contexts
ro.enable_boot_charger_mode and sys.boot_from_charger_mode are moved to
new property contexts for charger props to remove exported*_prop.

Bug: 155844385
Test: boot device with ro.enable_boot_charger_mode
Change-Id: I17d195d3c9c002a42125d46a5efcdb890f1c2a5c
2020-07-10 14:15:15 +09:00
Inseob Kim
9a11060432 Merge "Add keyguard_config_prop for keyguard property" am: d702d3fae1 am: 703c99cfae
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1355669

Change-Id: I5c374c8f128e48cbdc1c9446332b901582c826d1
2020-07-08 03:47:53 +00:00
Inseob Kim
14a71fb162 Add tombstone_config_prop and move related prop
tombstoned.max_tombstone_coun becomes tombstone_config_prop to remove
exported*_default_prop

Bug: 155844385
Test: tombstoned is running and logcat shows no denials
Change-Id: I57bebb5766d790dc52d40a6d106f480e0e34fa4e
2020-07-07 14:17:40 +09:00
Inseob Kim
04f435ca52 Add keyguard_config_prop for keyguard property
keyguard.no_require_sim becomes keyguard_config_prop to remove
exported*_default_prop

Bug: 155844385
Test: boot and see no denials
Change-Id: Icffa88b650a1d35d8c1cd29f89daf0644a79ddd3
2020-07-07 12:46:24 +09:00
Inseob Kim
917c8489a5 Merge "Add aaudio_config_prop and move aaudio properties" am: a24f99f5bd am: 7def208449
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1347406

Change-Id: I54e08a0322c8f89307a2fe15b2995a9ec974e410
2020-06-26 02:11:21 +00:00
Inseob Kim
ac791a4621 Add aaudio_config_prop and move aaudio properties
To remove ambiguous context name exported_default_prop

Bug: 71814576
Test: boot and see no denials
Change-Id: I40eb92653fabc509419e07bb4bfa7301a8762352
2020-06-23 22:08:26 +09:00
Inseob Kim
6ffdf1b001 Add new context packagemanager_config_prop
To remove bad context names exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Change-Id: Ic4bbc8e45d810368a96f6985c2234798e73be82d
Merged-In: Ic4bbc8e45d810368a96f6985c2234798e73be82d
(cherry picked from commit 072b01438e)
2020-06-19 17:47:19 +09:00