Commit graph

23583 commits

Author SHA1 Message Date
Treehugger Robot
b2fa463c43 Merge "mediaserver, mediaextractor, drmserver: allow vendor_overlay_file" 2020-04-30 17:17:42 +00:00
Bob Badour
ffdc7e8415 Add METADATA to sepolicy: PublicDomain=UNENCUMBERED
Bug: 68860345
Bug: 69058154
Bug: 151953481

Test: no code changes
Change-Id: I88e8dcd0b23555f686b29781e545810efc5cafe7
2020-04-29 13:12:58 -07:00
Przemyslaw Szczepaniak
2ea9264ea3 Merge "Allow neuralnetworks hal service to read files from /sdcard" 2020-04-29 11:49:31 +00:00
Jeongik Cha
832a8a9389 mediaserver, mediaextractor, drmserver: allow vendor_overlay_file
MediaPlayer cannot load a video from RRO packages.
So, add allow rules which is necessary to play the video.

Bug: b/154795779
Test: check if MediaPlayer can load a video in RRO
Change-Id: I06eed146b6e70a548b6b4f4faf56ba2bccd68140
2020-04-29 11:52:45 +09:00
Vladimir Marko
ff21e32dd3 Merge "Add missing dalvik.vm properties." 2020-04-28 08:39:29 +00:00
Przemysław Szczepaniak
94be98073d Allow neuralnetworks hal service to read files from /sdcard
Bug: 138457453
Test: tflite nnapi benchmark app against /sdcard file
Change-Id: I368629f9177141d59eb5862cd29dd65da68d3ad7
2020-04-28 08:08:48 +00:00
Ioannis Ilkos
e597605e01 Merge "Enable tracing of the ion/ion_stat events" 2020-04-27 13:57:50 +00:00
Vladimir Marko
1062aa7d6c Add missing dalvik.vm properties.
Add missing properties identified by
  SRC=frameworks/native/cmds/installd/dexopt.cpp; \
  CTX=system/sepolicy/private/property_contexts; \
  for i in `grep -oE 'dalvik\.vm\.[^"]*' $SRC`; do \
    grep -qF "$i " $CTX || echo "$i"; \
  done

Test: aosp_taimen-userdebug boots.
Change-Id: I0678e0bfb1d50045ade37f504311ad39801f2135
2020-04-27 12:05:47 +01:00
Inseob Kim
4ed4737aaf Add boot_status_prop for boot completed props
Assigning a new context boot_status_prop for following two properties:
- sys.boot_completed
- dev.bootcomplete

Bug: 154885206
Test: boot cf_x86 and crosshatch, see no denials
Change-Id: Ieadabf90a9a1b54b52a1283bd648c11c95d558dd
Merged-In: Ieadabf90a9a1b54b52a1283bd648c11c95d558dd
(cherry picked from commit 2973c96055)
2020-04-27 15:34:53 +09:00
Ioannis Ilkos
2e03e77f0a Enable tracing of the ion/ion_stat events
These events supersede the ion_heap_grow / ion_heap_shrink events on
4.19+ kernels.

Bug: 154302786
Test: build, run on cuttlefish with new kernel, ls -lZ /sys/kernel/tracing/events/ion/ion_stat/enable
Change-Id: I262d8c3269d4261701361ad4b1bdc322f1f03969
2020-04-24 10:10:35 +01:00
Treehugger Robot
ca10be483b Merge "Add get_prop(domain, surfaceflinger_prop)" 2020-04-24 08:01:52 +00:00
Sundong Ahn
b2e82f4707 Add get_prop(domain, surfaceflinger_prop)
The ro.surface_flinger.* properties are using instead of configstore.
Add get_prop (domain, surfaceflinger_prop) to domain.te so that it can
be used on all systems in the same way as configstore.

Bug: 124531214
Test: read properties in java (ag/11226921)
Change-Id: Ifc8a53ea544c761d85e370e177913db91d8a33a2
2020-04-24 15:21:01 +09:00
Maciej Żenczykowski
7da6b5a351 Merge "property_contexts: Add ro.kernel.ebpf.supported" 2020-04-24 04:41:34 +00:00
Felix
0ee31c1aab property_contexts: Add ro.kernel.ebpf.supported
This prop allows vendors to specify whether their devices
have basic eBPF compatibility (ie. Linux kernel 4.9 with P VINTF).

Make it exported_default_prop because the shared library
libbpf_android is used in a lot of places.

See: https://r.android.com/1261922

Bug: 151753987
Signed-off-by: Felix <google@ix5.org>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifd9af558d84ea1619a6af7fce81b700fdfb22b9f
2020-04-24 01:34:28 +00:00
Jeffrey Vander Stoep
7bf9669a6c Merge "Revert "mediaprovider: fixed sharedUserId bug"" 2020-04-23 17:36:28 +00:00
Jeffrey Vander Stoep
3b9683ff53 Revert "mediaprovider: fixed sharedUserId bug"
This reverts commit 2498d1c46e.

Reason for revert: b/154825574

Change-Id: I20ad5efc26fe076fb98503f59673892c491a1293
2020-04-23 17:33:55 +00:00
Petri Gynther
6866e41bc5 Merge "Allow adb shell user to collect vmstat" 2020-04-23 16:55:08 +00:00
Yiming Jing
b9c331e5ca Merge "Remove duplicate neverallow for hal_audio_server" 2020-04-23 15:37:37 +00:00
Jeffrey Vander Stoep
1705c1e9fa Merge "mediaprovider: fixed sharedUserId bug" 2020-04-23 12:03:15 +00:00
Petri Gynther
d517773b28 Allow adb shell user to collect vmstat
Test: adb shell vmstat 2 5
Change-Id: I6e93c4b5b29f38549f49f7f1ed0bd505613d648f
2020-04-22 20:46:01 -07:00
Treehugger Robot
e69064de52 Merge "Adding file group for vts_treble_sys_prop_test." 2020-04-23 02:59:56 +00:00
Ashwini Oruganti
efc3bdb255 Fix typo: s/com.google.android.gfs/com.google.android.gsf
Bug: 154597032
Test: TH
Change-Id: Ia8de313a9573649c456568abb3a8190dc2960bc3
2020-04-22 10:22:45 -07:00
Jeff Vander Stoep
2498d1c46e mediaprovider: fixed sharedUserId bug
All apps signed with the media key share a UID. However,
some run in the priv_app selinux context, and others run
in the mediaprovider context. That's a bug. Apps which share
a UID should always share an selinux domain. Assign all apps
with the seinfo=media to the mediaprovider selinux domain.

This moves the following packages from the priv_app to the
mediaprovider domain:
com.android.providers.downloads
com.android.providers.downloads.ui
com.android.mtp
com.android.soundpicker

Bug: 154614768
Test: atest CtsDownloadManagerApi28
Change-Id: I6f96142ef03101568abed670a0e32f952515a590
2020-04-22 15:47:27 +02:00
yangbill
3e3453776f Adding file group for vts_treble_sys_prop_test.
Bug: 147720376
Test: m vts_treble_sys_prop_test
Change-Id: I81a0e21a989dd89f8c37adf5a5c739ca0bdfbac0
2020-04-22 12:43:22 +08:00
Inseob Kim
0476c0a680 Merge "Rename exported_dalvik_prop to dalvik_config_prop" 2020-04-22 00:56:35 +00:00
Ashwini Oruganti
4a1630133d Route com.google.android.gsf to gmscore_app
com.google.android.gms and com.google.android.gsf have a sharedUserId
but were being routed to two different domains:

com.google.android.gms 10145 0 /data/user/0/com.google.android.gms google:privapp:targetSdkVersion=10000
com.google.android.gsf 10145 0 /data/user/0/com.google.android.gsf google:privapp:targetSdkVersion=10000

This change routes them to the same domain: gmscore_app

Bug: 154597032
Test: TH
Change-Id: I0a309a687eb8608604cabf65b58763a1a3262153
2020-04-21 09:29:08 -07:00
Yiming Jing
6067b53d4f Remove duplicate neverallow for hal_audio_server
A vendor has an audio HAL implementation for Android Automotive that
controls amplifiers with tcp sockets. This violates a neverallow rule
in 'public/hal_audio.te':

neverallow hal_audio_server domain:{ tcp_socket udp_socket rawip_socket
} *;

This rule prevents any audio HAL server from accessing sockets; But
public/hal_neverallows.te, line 19 exempts HAL servers on automotive
devices; because in a car it is common to have external modules
accessible over in-vehicle networks.

Therefore, the existing neverallow rule in hal_audio.te is a duplicate;
and this CL removes this rule.

Vendors on automotive devices should refer to 'vendor/hal_audio_default.te',
by (1) creating a new type; (2) associating the type with the
'hal_automotive_socket_exemption' attribute.

Bug: 150400684
Test: tested with the following rules in 'vendor/hal_audio_default.te'
Test: type harmon_amplifier, domain;
Test: typeattribute hal_audio_default hal_automotive_socket_exemption;
Test: allow hal_audio_default harmon_amplifier:tcp_socket connect;
Test: m -j should compile sepolicy without complaints
Change-Id: I517b050d0582d08f94f35ba815a030121385f319
2020-04-20 15:25:51 -07:00
Inseob Kim
d8c39d9e56 Rename exported_dalvik_prop to dalvik_config_prop
This is to clean up bad name "exported_dalvik_prop"

Bug: 154465224
Test: sepolicy_tests
Test: treble_sepolicy_tests 26.0 ~ 29.0
Change-Id: Ie5e738b5985c1db1bca7a857971d8490a7980b5b
2020-04-20 19:37:34 +09:00
David Sehr
a1d78f908e Merge "Control use of dex2oat64 by device property" 2020-04-20 04:08:26 +00:00
David Sehr
80a1403c62 Control use of dex2oat64 by device property
Gate use of dex2oat64 by a device property.

Bug: 153380900
Test: atest -c  installd_dexopt_test
Change-Id: I640085b5cd744cdc4563f565f8a914f9b1adc3ab
2020-04-19 12:09:38 -07:00
Treehugger Robot
a545e89f75 Merge "Enable incidentd access to ro.boot.bootreason" 2020-04-17 22:34:44 +00:00
Treehugger Robot
0785c93fef Merge "Escape '.' in com.android.permission" 2020-04-17 20:50:46 +00:00
Rambo Wang
018214dd8e Merge "Add policy to allow EmergencyAffordanceService to dump state" 2020-04-17 15:19:54 +00:00
Martijn Coenen
c3917f0ea9 Merge "Add external_storage properties." 2020-04-16 08:06:53 +00:00
Treehugger Robot
68598f7ff4 Merge "sepolicy: clean up redundant rules around gpuservice" 2020-04-15 18:10:04 +00:00
Treehugger Robot
359cc52f32 Merge "sepolicy: allow app to access gpuservice" 2020-04-15 17:10:19 +00:00
Yiwei Zhang
3db5a3140f sepolicy: clean up redundant rules around gpuservice
Test: m selinux_policy
Change-Id: I67389253aa3c6071a553e123fa9883cbdb331614
2020-04-15 09:24:16 -07:00
Martijn Coenen
01234d371e Add external_storage properties.
Since these need to be set from a vendor context.

Bug: 152170470
Bug: 153525566
Test: N/A
Change-Id: I2e90ad08fa0a5bd2b4759d92f95d35cec2b316df
2020-04-15 17:30:41 +02:00
Treehugger Robot
e12775e350 Merge "sepolicy: Add a new property for aware iface" 2020-04-15 14:03:53 +00:00
Yiwei Zhang
f3adf2eaaf sepolicy: allow app to access gpuservice
Previously we have allowed many kinds of app processes to access
gpuservice. However, upon sharing files through bluetooth, bluetooth
process starts an activity to handle this task. At the meanwhile, any
processes with an activity launched shall access gpuservice for stats
purpose. This change amends the rules so that we don't miss anything.

Bug: 153472854
Test: use bluetooth to share a photo and check logcat
Change-Id: I3d620b703d3afe92ac1f61cfb2a2f343352ddd4d
2020-04-15 05:36:23 -07:00
Zim
85d87cfa6e Grant MediaProvider read file access on /mnt/pass_through
It already has read dir access, but was missing file access which
would allow it read /sdcard symlink (/mnt/pass_through/0/self/primary)

Test: adb shell am broadcast -a
android.intent.action.MEDIA_SCANNER_SCAN_FILE
--receiver-include-background -d file:///sdcard
Bug: 153151011

Change-Id: If4d3fa3d96de6dd9672c0c3aa25fb25f196fe295
2020-04-15 09:13:09 +01:00
Roshan Pius
49ff30da83 sepolicy: Add a new property for aware iface
Bug: 153852667
Test: Compiles
Change-Id: I696cd9334ecf5e947e0459910de258bf904eb520
2020-04-14 22:00:59 -07:00
Rambo Wang
25e527634a Add policy to allow EmergencyAffordanceService to dump state
Bug: 152506122
Test: adb shell dumpsys emergency_affordance
Change-Id: I4dcc227ba949a02a0393999c8065f8bd8b981959
2020-04-14 14:54:52 -07:00
Treehugger Robot
951106b990 Merge "Allow traced to create files within /data/misc/perfetto-traces" 2020-04-14 13:34:05 +00:00
Robert Shih
b60b51d352 Merge "Allow drm hals to access allocator hal" 2020-04-13 22:27:18 +00:00
Nikita Ioffe
bbdf8e4d95 Merge "Add init.userspace_reboot.started.timeoutmillis property" 2020-04-13 19:14:56 +00:00
Robert Shih
0ade37909c Allow drm hals to access allocator hal
Bug: 150468341
Test: atest VtsHalDrmV1_3TargetTest
Change-Id: Iea8934567cda343dedf17f75cb0807a68742764d
2020-04-13 17:30:18 +00:00
Nikita Ioffe
7947d580e3 Add init.userspace_reboot.started.timeoutmillis property
This property controls how much userspace reboot watchdog will wait for
userspace reboot to start before falling back to hard reboot.

Test: builds
Bug: 152803929
Change-Id: I6955e8c94708e7e4161e4f334b03c052d42c0f9f
2020-04-11 02:00:01 +01:00
Ytai Ben-Tsvi
d107a05402 Allow system_server to set audio properties
Defined a new signal intended to allow the system to reboot
the audio/soundtrigger HAL process.

Fixes: 153461865
Test: See main change in topic
Change-Id: I1e4a770670bb1274fa6a23cd0641f2554d4679f7
2020-04-10 15:58:51 -07:00
Luca Stefani
ddcbbd7644 Escape '.' in com.android.permission
Change-Id: I83d7f81855b0facee3a07ad6fd2068e5e114db30
2020-04-10 19:22:50 +00:00