Commit graph

220 commits

Author SHA1 Message Date
Inseob Kim
79bd33a8d5 Allow init.svc.statsd to be world readable
Instead of having hacky entry "init.svc." in vendor's sepolicy, this
adds init.svc.statsd explicitly which should be readable by CTS.

Bug: 161922998
Test: m selinux_policy
Change-Id: I3fd3bab40d2ccf2581bd7ab55894a693cdf446b2
Merged-In: I3fd3bab40d2ccf2581bd7ab55894a693cdf446b2
(cherry picked from commit 116190b004)
2020-07-23 12:37:33 +09:00
Inseob Kim
387fb44648 Fix init.svc. property contexts entry
It should be prefix, not exact

Bug: N/A
Test: see selinux contexts of init.svc. properties
Change-Id: I3fd71c80f752773b784ddb1d7bfa9ab1854d281f
2020-07-22 19:14:56 +09: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
e50027bc57 Merge "Add wifi_hal_prop and remove exported_wifi_prop" 2020-07-20 01:17:51 +00:00
Yifan Hong
8917f7996f Merge changes from topic "odm_dlkm"
* changes:
  Correct labels on files / props in odm_dlkm.
  Fix path for vendor_dlkm build prop.
2020-07-17 22:05:26 +00: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
98fe6847bd Merge "Add property contexts for vts props" 2020-07-16 10:24:08 +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
Yifan Hong
dc9c4561f5 Correct labels on files / props in odm_dlkm.
All files under odm_dlkm are tagged vendor_file.
All build props for odm_dlkm are mapped as build_vendor_prop.

Test: build and
    `ls /odm_dlkm -lZ`
    `adb shell getprop -Z | grep odm_dlkm`

Bug: 154633114

Change-Id: Ifca69d0b7a8da945910a9cb0fa907735cd866f12
2020-07-15 17:16:40 -07:00
Yifan Hong
850a231fa2 Fix path for vendor_dlkm build prop.
vendor_dlkm build props are loaded from /vendor_dlkm/etc/build.prop.
Test: none
Bug: 154633114

Change-Id: Ic96ebba2486c891fb05431265e477184353bd7d0
2020-07-15 17:16:40 -07:00
Tom Cherry
aed2a79fb5 Merge "add logd. as logd_prop" 2020-07-15 22:58:33 +00:00
Yifan Hong
f74fa29aed Merge "Correct labels on files / props in vendor_dlkm." 2020-07-14 19:15:13 +00:00
Tom Cherry
d45249e4a9 add logd. as logd_prop
We already have ro.logd. and persist.logd. as logd_prop, but not
logd. so this change adds it.  New properties should be read-write by
default so logd. should be preferred to ro.logd.

Test: set logd.buffer_type appropriately.
Change-Id: I51ed19f0093a0302709116944153f37067814d08
2020-07-14 11:08:32 -07:00
Inseob Kim
1ef68a4852 Merge "Add charger related property contexts" 2020-07-14 07:07:38 +00:00
Alexander Mishkovets
abe9923ef5 Merge "Define sepolicy for locale filter property" 2020-07-13 16:06:00 +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
Yifan Hong
85aba14765 Correct labels on files / props in vendor_dlkm.
All files under vendor_dlkm are tagged vendor_file.
All build props for vendor_dlkm are mapped as build_vendor_prop.

Test: build and
    `ls /vendor_dlkm -lZ`
    `adb shell getprop -Z | grep vendor_dlkm`

Bug: 154633114

Change-Id: Ie9dc26d948357767fec09aca645606310ad3425c
2020-07-09 15:02:00 -07:00
Alexander Mishkovets
f0be89be1d Define sepolicy for locale filter property
Bug: 154133013
Test: Manual
Change-Id: I28ae279e4fd47553fcf4ab9421944f552490b49f
2020-07-09 20:32:58 +02:00
Inseob Kim
881f8c6b2d Merge "Relabel media.recorder.show_manufacturer_and_model" 2020-07-08 08:18:48 +00:00
Inseob Kim
dddf6f561f Relabel media.recorder.show_manufacturer_and_model
To remove exported*_default_prop

Bug: 155844385
Test: capture video
Test: atest writerTest
Change-Id: I74223c8daa44acf0aba33bff31cfe21f6242f941
2020-07-08 15:32:57 +09:00
Inseob Kim
d702d3fae1 Merge "Add keyguard_config_prop for keyguard property" 2020-07-08 03:22:12 +00:00
Treehugger Robot
1786098e96 Merge "Add export of ro.hdmi.cec_device_types" 2020-07-07 21:51: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
Treehugger Robot
eed690476b Merge "Move ro.audio.* props to audio_config_prop" 2020-06-29 01:18:43 +00:00
Inseob Kim
ebde47c63f Move ro.audio.* props to audio_config_prop
Bug: 155844385
Test: boot, play sound and see no denials
Change-Id: If457a6a1fe083d77a3387051edcf40fb12a0624c
2020-06-23 23:52:55 +09: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
Treehugger Robot
7a5599ad92 Merge "Move ro.gfx.* properties to graphics_config_prop" 2020-06-23 03:03:42 +00:00
Inseob Kim
5d50daa96b Move ro.gfx.* properties to graphics_config_prop
To clean up bad context names exported*_prop.

Bug: 155844385
Test: boot and see no denials
Change-Id: Ie92e4293b8271bc137222a4c21637c740b06e156
2020-06-23 10:16:09 +09:00
Treehugger Robot
9fbb1cd36d Merge "Remove ro.statsd.enable property" 2020-06-22 13:31:09 +00: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
Inseob Kim
832e17b695 Relabel drm related props from exported*_prop
To clean up bad context name exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Change-Id: I9f9ddb0d44c4cea9bd1724df730bb7be9a6fb2d2
2020-06-19 10:52:10 +09:00
Inseob Kim
b85a74f3f0 Relabel minui properties as recovery_config_prop
To clean up bad context name exported[23]_default_prop

Bug: 155844385
Test: m selinux_policy
Test: enter recovery mode
Change-Id: I312b6fa911a90dfc069a973c7916c67d92b7baa5
2020-06-16 19:18:24 +09:00
Peiyong Lin
37dea070ce Update sepolicy for GPU profiling properties.
A device must indicate whether GPU profiling is supported or not through
setting these two properties properly. CTS needs to read these two
properties in order to run corresponding compliance tests. Hence need to
update sepolicy for these two properties.

Bug: b/157832445
Test: Test on Pixel 4
Change-Id: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
Merged-In: I6f400ecbbd5e78b645bb620fa24747e9367c2ff3
2020-06-05 12:03:29 -07:00
Inseob Kim
ad6317018c Add contexts for exported telephony props
To remove bad context names, two contexts are added.

- telephony_config_prop
- telephony_status_prop

exported_radio_prop, exported2_radio_prop are removed. Cleaning up
exported3_radio_prop will be a follow-up task.

Exempt-From-Owner-Approval: cherry-pick

Bug: 152471138
Bug: 155844385
Test: boot and see no denials
Test: usim works on blueline
Change-Id: Iff9a4635c709f3ebe266cd811df3a1b4d3a242c2
Merged-In: Iff9a4635c709f3ebe266cd811df3a1b4d3a242c2
(cherry picked from commit 4d36eae8af)
2020-06-04 16:10:44 +09:00
Inseob Kim
86e5d481c4 Merge "Export missing audio volume properties" 2020-06-01 11:55:14 +00:00
Ruchir Rastogi
fb2cbb2b9b Remove ro.statsd.enable property
statsd is enabled on all devices now, so this flag is no longer needed.

Test: m
Bug: 157082130
Change-Id: I3e4bffcb067690229ec6b5cd4769bd0f9d158e21
2020-06-01 01:14:29 -07:00
Jiyong Park
de758291f0 Merge "Remove ro.bootimage.* sysprops" 2020-05-29 01:01:52 +00:00
Alistair Delva
5557cbbed3 Merge "Add sepolicy for ro.boot.fstab_suffix" 2020-05-28 00:04:02 +00:00
Jiyong Park
3553eabaa7 Remove ro.bootimage.* sysprops
ro.bootimage.build.date.* are not used anywhere.
ro.bootimage.build.fingerprint was used in the recovery mode, which has
now been switched to ro.build.fingerprint.

Bug: 117892318
Test: m
Change-Id: Ie920c5eee20baf61676b1b8b16b7f281e1dc2901
2020-05-25 18:36:42 +09:00
Inseob Kim
5c8c93e33d Remove ro.retaildemo.video_path
Bug: 155844385
Test: N/A
Change-Id: Ifef6eca1b5b40bc76ec9e9f04fa018d4fabb4888
2020-05-25 15:07:51 +09:00
Alistair Delva
7a05afebcc Add sepolicy for ro.boot.fstab_suffix
The fstab_suffix can be passed as 'androidboot.fstab_suffix=' on the
kernel command line, or as an Android DT node. It specifies an
override suffix for the fsmgr fstab search:

/odm/etc/fstab.${fstab_suffix}
/vendor/etc/fstab.${fstab_suffix}
/fstab.${fstab_suffix}

Bug: 142424832
Change-Id: I9c0acf7a5ae3cdba505460247decf2de9997cac1
2020-05-21 10:23:05 -07:00
Treehugger Robot
ff42a49df2 Merge "Refine build.prop related properties" 2020-05-20 14:17:56 +00:00
Inseob Kim
fc688b3a7f Refine build.prop related properties
1) build_odm_prop and build_vendor_prop are added

These contexts will contain world-readable properties from
/odm/build.prop and /vendor/build.prop, respectively.

2) move more properties to build_prop

Following properties are set by /system/build.prop and now assigned as
build_prop:

- ro.adb.secure
- ro.build.type
- ro.product.cpu.abi
- ro.product.cpu.abilist
- ro.product.cpu.abilist32
- ro.product.cpu.abilist64
- ro.secure

Following properties are set by init/property_service.cpp and now
assigned as build_prop:

- ro.product.brand
- ro.product.device
- ro.product.manufacturer
- ro.product.model
- ro.product.name

Bug: 71814576
Bug: 155844385
Test: boot device and see no denials
Change-Id: Idd4f81de4d2d0fc4bdec2d7ecb08bb8e078dab58
2020-05-20 07:55:13 +00:00
Inseob Kim
15e5e0a470 Add contexts for init.svc.* props
To remove bad context names "exported*_prop". Other init.svc.*
properties explicitly become system internal prop.

Bug: 155844385
Test: boot and see no denials
Change-Id: I7a3b4103a4cea77035a6e831e3b6a49a45f15a35
2020-05-20 12:08:02 +09:00
Daniel Rosenberg
5f1fe1eaac Merge "Add sdcardfs variable to storage_config_props" 2020-05-19 09:55:01 +00:00
Daniel Rosenberg
afede84ad5 Add sdcardfs variable to storage_config_props
This property allows us to disable sdcardfs if it is present. The old
property ended up getting repurposed, so a new one was needed.
Mediaprovider will also need to access this to determine what actions it
needs to take.

Test: builds
Bug: 155222498
Change-Id: I66ac106613cbb374f54659601e4ba3f61eaecd2f
2020-05-19 00:30:52 -07:00
Treehugger Robot
b8b4a62ded Merge "Move props out of exported3_system_prop" 2020-05-19 03:32:45 +00:00