Commit Graph

108 Commits

Author SHA1 Message Date
Hridya Valsaraju
761ce69a25 Move ro.boot.dynamic_partitions to vendor
VTS tests are run after flashing a GSI image on the device.
The properties ro.boot.dynamic_partitions and ro.boot.dynamic_partitions_retrofit
are currently placed in product partition and will be overwritten by the GSI image.
We need to move these properties to vendor partition so that they will be available
even after the device is flashed with GSI.

Bug: 132197773
Test: build and flash, adb getprop ro.boot.dynamic_partitions
Change-Id: Ib04896ef744d8d2daa5cb3feee2cbf45aae2ba51
2019-05-07 16:16:27 -07:00
Anton Hansson
c165185e05 Make new vendor properties settable by vendor_init
These properties were moved to /vendor as part of b/130025216.
Allow them to be set by vendor_init, too.

Bug: 130025216
Bug: 131066061
Test: no SELinux warnings for said props at boot
Change-Id: I5293831bedb89e9c8d3ddf13cf7babde26872f28
2019-05-01 13:21:17 +01:00
Tao Bao
2770de3bbc Move ro.build.ab_update to vendor property.
`ro.build.ab_update` is being moved from /system/build.prop to
/vendor/build.prop. This CL allows init to keep exposing the value as a
system property.

init: Do not have permissions to set 'ro.build.ab_update' to 'true' in property file '/vendor/build.prop': SELinux permission check failed

Bug: 130516531
Test: Build and flash crosshatch-userdebug. Check /system/build.prop,
      /vendor/build.prop and the runtime property.
Change-Id: I56803030a6bc0603f977ebc5fedbfc224a69d19e
2019-04-22 21:15:03 -07:00
Roshan Pius
d8790b66e1 wifi: Add a new property to indicate active wifi iface
Denial:
libc    : Unable to set property "wifi.active_interface" to "wlan0":
error code: 0x18

Bug: 129506593
Test: Verified that the denial is no longer seen in the logs
Change-Id: Ia345f5df1446e7ba3a44d6e8299bdc1f5f6ad9c8
2019-04-02 11:47:23 -07:00
Peiyong Lin
d50d36242c [sepolicy] Add sysprop for SurfaceFlinger GPU protected contents.
Not every device can support GPU protected contents, add a sysprop to allow
configuration.

BUG: 35315015
Test: N/A
Change-Id: I59f1b3ea81db742bc4d0b5a22e82de7385a726b7
2019-03-29 14:12:51 -07:00
Cheney Ni
e55a74bdff Add rules for accessing the related bluetooth_audio_hal_prop
This change allows those daemons of the audio and Bluetooth which
include HALs to access the bluetooth_audio_hal_prop. This property is
used to force disable the new BluetoothAudio HAL.
  - persist.bluetooth.bluetooth_audio_hal.disabled

Bug: 128825244
Test: audio HAL can access the property
Change-Id: I87a8ba57cfbcd7d3e4548aa96bc915d0cc6b2b74
2019-03-20 03:12:25 +00:00
Nicolas Geoffray
45963b59ae Allow init to set dalvik.vm.boot-image.
Test: m
Bug: 119800099
Change-Id: Idb4d4c6005e4ff271c1b5940bd39b655b674a0bb
2019-03-18 21:40:19 +00:00
Jack Yu
d8514fb33e Changed IWLAN operation mode system properties to enum
Changed the system properties to enum. The valid modes
are "default", "legacy", and "AP-assisted".

Test: Manual
Bug: 126218288

Change-Id: Ib70ed8606e845ca29453013a400b377647e15490
2019-03-13 10:15:39 -07:00
Inseob Kim
8669f52f79 Fix surface flinger property types
Third parameter of a property_context entry should be "exact" if the
entry is for a single property, not a prefix.

And the type of each entry should be the fourth parameter.

Bug: 112386364
Test: m -j
Change-Id: I2ed31c9fd7c7424e3a6a51d44b4e85413ae316b7
2019-03-12 22:38:36 +00:00
Jack Yu
bd534ed52b Fixed the inaccessable system properties
Moved the system properties from exported3_default
to exported_radio so that the service from vendor
partition can access that.

Test: Manual
Bug: 126218288
Change-Id: I055c1c26d1e25f5d12f2593b96eecf57be62d871
2019-03-07 21:36:47 +00:00
Jiyong Park
48d0793ec0 Add a new system-to-vendor sysprop ro.apex.updatable
The system property is for system to be able to identify vendor
implementation that is ready to support updatable APEXes. When this
sysprop is set to true, the init creates separate mount namespaces for
processes launched before apexd. When unset, default is false.

Bug: 122428178
Test: device boots to the UI
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I4ae1eac5eec5f5085d8d32ff58300dfa9967c29a
2019-03-05 16:31:23 +09:00
Sundong Ahn
88bb57ec88 Add ro.surface_flinger.display_primary*
The ro.surface_flinger.display_primary* properties are added to
property_contexts. Because these properties are located in vendor
partition, but surfaceflinger service which use these properties
is in the system partition.

Bug: 124531214
Test: m -j && boot test
Change-Id: If90c4bc75796d8966bbf3ee2e3bab39145395800
2019-02-21 09:54:13 +09:00
Peiyong Lin
4dfc59e5f4 Add persistent property for SurfaceFlinger color mode.
To enable devices to stay in a color mode all the time, add a persistent
property as part of per device configuration.

BUG: 124129486
Test: Build, flash and boot. Verify with internal patch
Change-Id: I45ce25e4f1317911e70a4276df6adc39e7455fed
2019-02-11 17:19:03 -08:00
Joel Fernandes
deef7f0afd Add permissions for sys.use_memfd property
Will be used to forcefully turn on memfd if device supports it.
Currently used only for debugging.

Change-Id: I46a1b7169677ea552d4b092e7501da587c42ba1a
Signed-off-by: Joel Fernandes <joelaf@google.com>
2019-02-06 15:16:16 -05:00
Sundong Ahn
b9796da741 Add ro.surface_flinger.* to property_contexts
The ro.surface_flinger.* properties are added to property_contexts.
Because these properties are located in vendor partition, but
surfaceflinger service which use these properties is in the system
partition.

Bug: 112386364
Test: m -j & boot test
Change-Id: I98d71d4c03297a2a3fe92ba17bfdcb428f763753
2019-01-22 11:00:14 +09:00
William Hester
5f486c74bf Add the testharness service to sepolicy rules
The testharness service will manage Test Harness Mode and provide a
command-line interface for users to enable Test Harness Mode; however it
does not directly provide a public API.

Bug: 80137798
Test: make
Test: flash crosshatch
Change-Id: Ie396e40fcea8914b4dd2247f2314e029b66ad84e
2019-01-17 13:10:37 -08:00
Tim Van Patten
3293abb67f Create System Property to Indicate ANGLE Support
Create the system property ro.gfx.angle.supported that indicates if the
device supports ANGLE.   The current planned use of this property is to
allow CTS to validate ANGLE functionality if the device indicates ANGLE
is supported.

Bug: 80239516
Test: Flash the build and verify the property is 'false' for marlin.
Test: Flash the build and verify the property is 'true' for walleye.
Change-Id: I00387db9ade34152f79d75453ea17d5ea7b063cd
2019-01-10 11:35:58 -07:00
Stan Iliev
7f19d841e4 Add a property used to enable Vulkan as default render pipeline
Test: Booted with Vulkan rendering
Change-Id: I00485c16e5a878321a699f35d28fb85834991255
2018-12-17 11:30:48 -05:00
Aalique Grahame
22cf8f7c1e sepolicy: add rule for offload minimum duration property
Add sepolicy rule to support audio system property
audio.offload.min.duration.secs

Bug: 120123518
Change-Id: Ie027eb9ef102caca13adb1924db3be11d02b25c7
2018-12-05 17:17:21 -08:00
Haibo Huang
544a0d5480 Add new cpu variant related rules to SELinux
I added ro.bionic.(2nd_)?_(arch|cpu_variant) to vendor system
properties. And have init to write them to files under dev/.

This change set SELinux rules for these properties and files.

For the system properties: vendor/default.prop will set them. init will
read them.
For the files /dev/cpu_variant:.*: init will write them. bionic libc
will read them. (Basically world readable).

This is to allow libc select the right optimized routine at runtime.
Like memcpy / strcmp etc.

Test: getprop to make sure the properties are set.
Test: ls -laZ to make sure /dev/cpu_variant:.* are correctly labeled.

Change-Id: I41662493dce30eae6d41bf0985709045c44247d3
2018-11-19 18:29:36 +00:00
Felipe Leme
da54e5f2dd Added system property (dumpstate.unroot) to run dumpstate as shell.
This is useful to test how it would behave on devices with user builds.

Bug: 117980186
Test: adb shell setprop dumpstate.unroot true && \
      adb shell cmd activity bug-report --progress

Change-Id: If9094bbe0c29e8180f1b35d2b4ac95343a1bd0eb
2018-11-08 08:25:32 -08:00
Jiyong Park
b3b94614f7 apexd exports its status via sysprop
A sysprop apexd.status is set by apexd, to that other components (i.e.
init) can determine whether APEXs are all successfully mounted or no
(i.e., being mounted).

The sysprop is only writable by apexd.

Bug: 117403679
Test: adb shell getprop apexd.status returns 'ready'.
Change-Id: I81bcb96e6c5cb9d899f29ffa84f91eab3820be25
2018-11-02 12:23:42 +09:00
Minchan Kim
fac9bc0a62 export init.svc.bugreport
Vendor need to hook bugreport propery as well as dumpstatez.
This CL exports it.

Test: Confirmed verndor can get property trigger hook manually
Bug: 118718191
Change-Id: I64a0e38716fb863ccd8923c6c41a776ea341f2d1
Signed-off-by: Minchan Kim <minchan@google.com>
2018-11-01 09:32:33 +09:00
Jack Yu
b10f4eba61 Added a new system properties for IWLAN operation mode
Added a new flag to specify the IWLAN operation mode. Also
allowed this system properties for vendor native service to
access.

Test: Manual
Bug: 73659459
Change-Id: I23197e451557fae36a0cc5da4b50b3a00f9233dc
2018-10-24 10:48:12 -07:00
Tom Cherry
30dd711157 Combine vendor-init-actionable with vendor-init-readable
Historically, vendor-init-actionable was created since the various
property_contexts files were not yet available when init parses its
scripts.  Since then, the property_contexts files are now always
available when init parses its scripts, so we can collapse these two
categories.

Specifically, this change ensures that all of the properties in the
previous 'stable_properties.h' file in init, which contained the
vendor-init-actionable properties, are able to be read by init
according to SEPolicy.

Bug: 71814576
Test: vendor_init fails to use non-readable properties as a trigger
Test: vendor_init successfully uses readable properties as a trigger

Change-Id: Ic6d9919b6047f3076a1a19fc26295c6a77aca627
2018-10-24 01:58:32 +00:00
jinhee0207.jo
2b09698a80 Add sepolicy labeling of wifi.concurrent.interface property.
1. "Add sepolicy labeling of wifi.concurrent.interface" in property_contexts.
wlan1 interface is added first in Pie OS. And wlan1 interface has getIfaceName
by property_get in wifi_chip.cpp.
(/hardware/interface/wifi/1.2/default/wifi_chip.cpp)
But, there is no sepolicy about this interface. wlan0 and p2p0 is definitely specified.
So, if we try to use wlan1, native sepolicy violation occurs.
This is why this labeling is necessary.

2. wlan1: Property labeling same with wlan0 or p2p0.
wifi.interface u:object_r:exported_default_prop:s0 exact string

Test: Basic Sanity - Verified tethering by using wlan1
Bug: 117302656

Change-Id: I24194bca7176e1927164228e6571870531a9bc56
Signed-off-by: Jinhee Jo <jinhee0207.jo@lge.com>
2018-10-09 16:20:16 +00:00
Tri Vo
44005b4f2b Make persist.sys.locale public-readable.
Addresses this denial:
avc: denied { read } for comm="rild" name="u:object_r:system_prop:s0"
dev="tmpfs" ino=15811 scontext=u:r:rild:s0 tcontext=u:object_r:system_prop:s0
tclass=file permissive=0

Fixes: 77960261
Test: m selinux_policy
Change-Id: I341675a4cfc0acbb7ea98e2ed4bdb7f69afe09f7
2018-10-07 13:26:42 -07:00
Tri Vo
716d8bd849 Remove ro.com.google.clientidbase from exported prop list.
This property is GMS-specific. It should be set from either /system or /product.
After this change ro.com.google.clientidbase will have default_prop type and
will only be settable from an .rc file.

This property now must be set from system or product images. In case of a
system-only OTA, the old vendor.img might attempt set this property. This will
trigger a denial which is innocuous since the new system.img will correctly set
the property.

Bug: 117348096
Test: walleye can still set ro.com.google.clientidbase
Change-Id: Id0873baecacb4168415b1598c35af1ecbb411e17
2018-10-05 17:58:41 -07:00
Tri Vo
260a275836 Make dalvik.vm.boot-dex2oat-threads vendor-init-settable.
Bug: 115741899
Test: m selinux_policy
Change-Id: I5d80a1d9bd5500a82ebf282fb02f0db3a0b0a4c1
2018-09-20 11:05:12 -07:00
Chong Zhang
8248d9b262 add a property to allow thumbnailer to use hw codecs
bug: 113609172
Change-Id: Ifff91630c3622661139ff27f25932258802cb082
2018-09-12 10:13:56 -07:00
Tao Bao
703acc6acd Whitelist minui properties to be overridden by /vendor/default.prop.
These values will be read by platform module (/sbin/charger), and need
to be configurable by vendor init.

Bug: 113567255
Test: Build along with other CLs in the topic (for Makefile and
      libminui changes). Boot into charger mode.
Test: Boot into recovery. Run graphics test.
Change-Id: I5b272f345e2a5a255c2f660c59c1da3245aa1e03
2018-09-11 21:12:20 +00:00
Tri Vo
fe72cb70d7 ro.crypto.{allow_encrypt_override filenames_mode} vendor-init-settable.
Bug: 114017832
Test: m selinux_policy
Change-Id: I1dcb09c76b3e49888d278a154d79add6c6a6c977
2018-09-08 14:42:51 -07:00
Shibin George
af1741d3eb Whitelist some more properties that go into /vendor/build.prop
Whitelisting some more properties that are to be set by vendor-init
but are not vendor specific.

Test: After whitelisting, these properties are now correctly
      set on Go devices by vendor-init, in selinux "enforcing" mode.

BUG: 111738816
Change-Id: I3fcc09719fc9e77919a1a9f99453037ca15f25a7
2018-08-13 15:23:26 +00:00
Shibin George
d27b8612df Add missing pm.* properties in property_contexts
Certain pm.* properties, which are especially needed for
Go-targets, are not listed in property_contexts.
Init will not be able to set these properties on bootup
without the correct selinux contexts assigned to the
properties.

BUG: 111738816

Test: In selinux-enforcing mode, on bootup, these
      properties are now correctly set by init.

Change-Id: I6ea0fb229c93725e2987b1e021d5804a132d093d
2018-08-08 17:07:56 +00:00
Steven Moreland
c8ba909117 Fix type of ro.kernel.qemu: int -> bool
Bug: N/A
Test: boot
Change-Id: I67e3554383977c3fb5e89f236838a9cb39fb257e
2018-08-07 14:03:56 -07:00
Aalique Grahame
5626ee67a9 Merge "sepolicy: create rules for system properties"
am: 280c6afab2

Change-Id: I879d46d8e004a4ea63c1b131cdb5348e90adca0d
2018-07-10 21:40:58 -07:00
Aalique Grahame
2fc89a71f7 sepolicy: create rules for system properties
Add new sepolicy rules to support audio system properties

Bug: 110564278
Change-Id: If774a40b50e56f9e83bcb4ab8a84581dc03058ad
2018-07-03 08:54:04 -07:00
Jian Yu
fa61f45047 Fix issue that ro.telephony.default_network can't be read per slot
am: bbb439e76a

Change-Id: I5e7036e4ad9c19229835d9b7b36cc77bb476ef9c
2018-06-26 17:10:52 -07:00
Jian Yu
bbb439e76a Fix issue that ro.telephony.default_network can't be read per slot
"ro.telephony.default_network" can define as comma-separated Sting per
slot for multi SIM device. However, it cannot be read correctly due to
it defined as Int in property_contexts file.

Bug: 110626665
Test: manual - Checked the ro.telephony.default_network can be read per
slot for multi SIM device.
Change-Id: I900620e46c819c14bf339751f00a1db1473fd45f
2018-06-26 21:26:37 +00:00
Eino-Ville Talvala
67bd625c19 Make system property audio.camerasound.force a vendor-writable property,
am: 3ac71f8d82

Change-Id: Ia0db4d6a305d7f815f38a119475ebb346e873249
2018-06-25 22:00:50 -07:00
Eino-Ville Talvala
3ac71f8d82 Make system property audio.camerasound.force a vendor-writable property,
This property is read by the audio service in system server to toggle
camera shutter sound enforcement on a device-specific basis.

Test: Camera shutter sound enforcement works when audio.camerasound.force is set
Bug: 110126976
Change-Id: I2720d3c699c4712d1a328f59dde0b16bbf1016f3
2018-06-25 22:50:14 +00:00
Steven Moreland
d47b09f1d9 Add context for ro.boot.product.hardware.sku.
This was defined, but it had no users in the Android tree.
Because of this, ODM manifests required extra sepolicy to be applied
in vendor. Before this, there was no policy split, so that was okay,
but now it is impossible.

Bug: 91735839
Test: add an odm manifest for SE conditional on
    a system property (ro.boot.product.hardware.sku)
    and make sure it is read into the manifest (using
    the vintf tool) and also that a client can get the
$ lshal | grep secure
Y android.hardware.secure_element@1.0::ISecureElement/SIM1                                  0/2        881    2262 567

Change-Id: I94a2928943be6a17416b8bbd78106809c0c21198
Merged-In: I94a2928943be6a17416b8bbd78106809c0c21198
2018-06-04 12:38:52 -07:00
Steven Moreland
1c6d0b2eb1 Merge "Add context for ro.boot.product.hardware.sku." into pi-dev
am: ce944f0294

Change-Id: I0ae38bc922a057ae0a49d4b228cb280961c0b956
2018-06-04 11:04:27 -07:00
TreeHugger Robot
ce944f0294 Merge "Add context for ro.boot.product.hardware.sku." into pi-dev 2018-06-04 17:26:58 +00:00
huans
3265c6efb2 emulator: Whitelist ro.kernel.qemu. parameters
am: 66b55782b8

Change-Id: I1315d4150230ef4e2b513c582f824bca97600d30
2018-06-04 10:14:50 -07:00
Steven Moreland
5516acc6ab Add context for ro.boot.product.hardware.sku.
This was defined, but it had no users in the Android tree.
Because of this, ODM manifests required extra sepolicy to be applied
in vendor. Before this, there was no policy split, so that was okay,
but now it is impossible.

Bug: 91735839
Test: add an odm manifest for SE conditional on
    a system property (ro.boot.product.hardware.sku)
    and make sure it is read into the manifest (using
    the vintf tool) and also that a client can get the
$ lshal | grep secure
Y android.hardware.secure_element@1.0::ISecureElement/SIM1                                  0/2        881    2262 567

Change-Id: I94a2928943be6a17416b8bbd78106809c0c21198
2018-06-01 18:23:55 -07:00
huans
66b55782b8 emulator: Whitelist ro.kernel.qemu. parameters
And ro.kernel.android.bootanim (used to en/disable boot-anim)

Bug: 79941736
Test: Manual
Change-Id: Ib486903dec92df88b4d33bad6262cbcfc2aa1c4c
2018-06-01 10:48:31 -07:00
Frank Salim
956b93623a Merge "Add ro.hardware.keystore_desede" into pi-dev
am: a0f9509908

Change-Id: I8fed87b5514516d2dcb8d1796ee42ca081ee490d
2018-05-18 16:04:36 -07:00
Frank Salim
6fe4ef7e8c Add ro.hardware.keystore_desede
This allows Android Keystore to statically register support for 3DES
during zygote initialization based on the device's support for hardware
backed 3DES keys.

Bug: b/79986680
Test: keystore CTS
Change-Id: Ic9a6653cdd623a3ab10e0efbcdb37c437e6c59b9
2018-05-18 18:25:44 +00:00
Logan Chien
2e6e72208f Add ro.vndk.lite to property_contexts
Bug: 78605339
Test: aosp_walleye-userdebug builds
Change-Id: I37c84e20f2284d50cbe29bfa1b7597dd2c01fb4b
Merged-In: I37c84e20f2284d50cbe29bfa1b7597dd2c01fb4b
(cherry picked from commit 9f55f3455f)
2018-05-17 14:32:40 +08:00