Commit Graph

252 Commits

Author SHA1 Message Date
Amy
89b4bbd4d8 Tuner Hal 1.0 Enable ITuner service
Test: cuttlefish
Bug: 135708935
Change-Id: Ica063458860df45f0e2ab640a2ab35cd4da3da8e
2019-08-14 11:22:09 -07:00
Tomasz Wasilczyk
602b30302a SEPolicy rules for CAN bus HAL
Bug: 135918744
Test: VTS (separate new change)
Change-Id: Idd3ca882e3bd36b95a5412bdfbf6fe9d6e911ba9
2019-08-01 10:24:00 -07:00
Changyeon Jo
5ee628f0ce Update sepolicy for EVS v1.x
Modify vendor file context and hal_evs_server policy to enable EVS v1.1
service.

Change-Id: I1e717b3209200300005c3fa7f91423589505a41c
Signed-off-by: Changyeon Jo <changyeon@google.com>
2019-07-30 13:22:03 -07:00
Kevin Rocard
8fcd26e448 Rename audio hal service
The audio HAL service name previously contained the audio HAL version
of the first audio HAL it supported.
Nevertheless, the same service can and do host all audio HAL versions.

Aka there is only one audio HAL service, and the version in its name is
technical dept and should not be changed.

This caused many confusions during vendor HAL upgrade as the
service version number was erroneously updated leading to
device boot loop.

The new service name is:
android.hardware.audio.service
The old one was:
android.hardware.audio@2.0-service

Keeping both names valid as most phones will not rename
the service immediately.

Bug: 78516186
Test: boot & check the audio HAL is up with the old and new name
Change-Id: I2ce0182fd919af6eb8325d49682b4374be00344e
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-07-08 22:25:18 +00:00
Treehugger Robot
f4362c08c7 Merge "Revert "Allow hal_face to write to /data/vendor/camera_calibration/*."" 2019-06-19 23:44:27 +00:00
Matthias Kramm
ebcc08249b Revert "Allow hal_face to write to /data/vendor/camera_calibration/*."
This reverts commit 3a44b17897.

Reason for revert: Moved to downstream repo.

Change-Id: I7d3ad43335f71ed03e7a93bc5c96a8933785afd8
2019-06-19 20:15:50 +00:00
Matthias Kramm
9faeec71f2 Merge "Allow hal_face to write to /data/vendor/camera_calibration/*." 2019-06-17 19:31:50 +00:00
Valerie Hau
d3499df3cf Add IMapper2.1 same process hal permissions
Bug: 135166668
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: Iedc11b73d3e3ba54dcd622b128cb513adec11d69
2019-06-14 12:31:17 -07:00
Matthias Kramm
3a44b17897 Allow hal_face to write to /data/vendor/camera_calibration/*.
Also, allow hal_camera to read from there.

Bug: 133792720
Change-Id: Iedec8d7325b4424d166f8e4d09182e1f29808ef2
Test: Running presubmit.
2019-06-14 05:53:59 -07:00
Joel Galenson
0608ab5f9d Give hal_drm_server appdomain fd access.
Test: Build.
Change-Id: I29f68964f4ae2ad2c3a00c96f57f48448d8b6dfb
2019-06-05 10:12:28 -07:00
Tao Bao
42c05cfcc1 Add vendor_misc_writer.
The space between 2K and 16K in /misc is currently reserved for vendor's
use (as claimed in bootloader_message.h), but we don't allow vendor
module to access misc_block_device other than vendor_init.

The change in the topic adds a `misc_writer` tool as a vendor module,
which allows writing data to the vendor space to bridge the gap in the
short term. This CL adds matching labels to grant access.

Long term goal is to move /misc as vendor owned, then to provide HAL
access from core domain (b/132906936).

Bug: 132906936
Test: Build crosshatch that includes misc_writer module. Invoke
      /vendor/bin/misc_writer to write data to /misc.
Change-Id: I4c18d78171a839ae5497b3a61800193ef9e51b3b
2019-05-20 14:40:15 -07:00
Jack Yu
a5dde796b5 Add sepolicy for nfc hal v1.2
Bug: 130509605
Test: No avc denial log and NFC works with hal v1.2
Change-Id: If54884f76a32705d11f2085f66fe83b9e0354f79
2019-04-22 12:08:20 +00:00
Henry Fang
1f1e36069d Change sepolicy to allow cas@1.1 service
Modify sepolicy configure file, so that cas@1.1 service can run
Test: Manual
bug: 124016538

Change-Id: I0b160bc1c575aa18ffead7ff136509fc9dcfb472
Merged-In: I142a6cd66a81ad9e0c8b4d87da672fb8f5c181d6
2019-02-08 22:05:25 +00:00
Peter Kalauskas
2613456a36 Merge "Allow lazy wifi HAL to run" 2019-01-31 22:05:47 +00:00
Jeff Vander Stoep
9f5d0d90a3 Initial selinux policy support for memfd
Move all app tmpfs types to appdomain_tmpfs. These are still protected
by mls categories and DAC. TODO clean up other app tmpfs types in a
separate change.

Treble-ize tmpfs passing between graphics composer HAL and
surfaceflinger.

Bug: 122854450
Test: boot Blueline with memfd enabled.
Change-Id: Ib98aaba062f10972af6ae80fb85b7a0f60a32eee
2019-01-30 19:11:49 +00:00
Peter Kalauskas
03f43017b2 Allow lazy wifi HAL to run
Test: Manually check that lazy wifi HAL runs
Bug: 123307146
Change-Id: I22f9bc7a097056215d249b692b6f39a71b6b9811
2019-01-30 18:52:19 +00:00
Jeff Vander Stoep
41a2abfc0d Properly Treble-ize tmpfs access
This is being done in preparation for the migration from ashmem to
memfd. In order for tmpfs objects to be usable across the Treble
boundary, they need to be declared in public policy whereas, they're
currently all declared in private policy as part of the
tmpfs_domain() macro. Remove the type declaration from the
macro, and remove tmpfs_domain() from the init_daemon_domain() macro
to avoid having to declare the *_tmpfs types for all init launched
domains. tmpfs is mostly used by apps and the media frameworks.

Bug: 122854450
Test: Boot Taimen and blueline. Watch videos, make phone calls, browse
internet, send text, install angry birds...play angry birds, keep
playing angry birds...

Change-Id: I20a47d2bb22e61b16187015c7bc7ca10accf6358
Merged-In: I20a47d2bb22e61b16187015c7bc7ca10accf6358
(cherry picked from commit e16fb9109c)
2019-01-26 17:30:41 +00:00
Peter Kalauskas
b1bdbb58cf Allow lazy HAL to run
Test: Manual
Change-Id: Ic4c3fd5b2d8d709573f8cc6332a6340d28d3ba26
2019-01-23 15:29:05 -08:00
Brian Stack
b8baed8fa7 Add selinux policy for Sensors HAL 2.0
Bug: 122267378
Test: Builds, no dmesg errors when starting Sensors HAL 2.0
Change-Id: Ieb52449579f72421bf8f36fb6af0cb110d04bd1c
2019-01-22 21:02:21 +00:00
Marissa Wall
97f5383895 gralloc3: add sepolicy for allocator/mapper 3.0
IAllocator and IMappaer are being rev'd to 3.0. Update sepolicy to
allow them to be used.

Test: compile with allocator/mapper patches add boot the device
Bug: 120493579
Change-Id: Id241c6bd79c02ec93d8dd415539f90a18f733d03
2019-01-17 11:56:08 -08:00
Eino-Ville Talvala
579314c66a Camera HAL: Allow minor version changes to camera.provider
Test: Adding a camera.provider@2.5 to a device works correctly
Merged-In: I516698afedad1294c0af3f4efedb0aed0a141780
Change-Id: I516698afedad1294c0af3f4efedb0aed0a141780
2019-01-11 19:24:47 +00:00
Siarhei Vishniakou
41a871ba84 Permissions for InputClassifier HAL
Add the required permissions for the InputClassifier HAL.

Bug: 62940136
Test: no selinux denials in logcat when HAL is used inside input flinger.
Change-Id: Ibc9b115a83719421d56ecb4bca2fd196ec71fd76
2019-01-11 02:08:19 +00:00
Zachary Iqbal
893272d883 Added placeholder SELinux policy for the biometric face HAL.
Notes:
- Added face hal domain, context and file types for the default
  SELinux policy.
- Please see aosp/q/topic:"Face+Authentication"

Bug: 80155388
Test: Built successfully.
Change-Id: I2e02cf6df009c5ca476dfd842b493c6b76b7712a
2018-12-28 12:23:56 -08:00
Peiyong Lin
3a4b920de6 [SEPolicy] Add composer 2.3
Use regular expression for all composer service versions.

BUG: 115554640
Test: Build, flash and boot

Merged-In: Ie84ebb0a43c9eaad66829b15deaa8b3046bd7fe4
Change-Id: Ie84ebb0a43c9eaad66829b15deaa8b3046bd7fe4
2018-12-22 03:00:03 +00:00
Chong Zhang
404e40c6c1 Use hidl memory from allocator in CAS
Make mediaextractor use hidl memory allocated by
hidl allocator, instead of constructing hidl memory
from IMemory.

bug: 112766913
bug: 111407253
Change-Id: I7902f18768005c995925bc9a7947299e9988b68a
(Needed for internal commit I39e131718ea41f9cb23177c28213ddf7b7741338)
2018-12-17 22:49:18 +00:00
Peter Kalauskas
4cc196f48a Allow lazy cas service to run
Test: Run CtsMediaTestCases on aosp_marlin_svelte
Change-Id: Ie7d491fbc11ef5c24826a0d69e479bc03bd2ad08
2018-12-14 21:29:58 +00:00
Yu-Han Yang
63de8591e8 Add sepolicy for GNSS HAL 2.0 and 1.1
Bug: 112260995
Bug: 120277977
Test: atest VtsHalGnssV2_0TargetTest
Change-Id: I196d8506b2f7c2153e1f647ea5ba61b81bf3d881
2018-12-12 13:41:01 -08:00
Benjamin Schwartz
e7040eada0 Add power.stats HAL 1.0 sepolicy
Also giving statsd permission to access it. This change copies the internal sepolicy to AOSP.

Bug: 111185513
Bug: 120551881
Test: make
Change-Id: I7e0386777e05580299caf9b97cb7804459f1a9d0
2018-12-11 00:11:08 +00:00
Treehugger Robot
24e2b82446 Merge "Add input_device permission to hal_sensors_default" 2018-10-19 22:24:54 +00:00
Chong Zhang
bdbfff1b00 add mediaswcodec service
Set up a new service for sw media codec services.

Bug: 111407413

Test: cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
Change-Id: Ia1c6a9ef3f0c1d84b2be8756eb1853ffa0597f8e
2018-10-11 15:10:17 -07:00
Wei Wang
bc71a6109e Add atrace HAL 1.0 sepolicy
Bug: 111098596
Test: atrace/systrace

(cherry picked from commit 9ed5cf6e43)

Change-Id: I97772ff21754d03a0aea0d53b39e8da5312a17c0
2018-09-27 23:18:29 +00:00
Tri Vo
6816044271 Merge "More granular vendor access to /system files." 2018-09-22 01:30:25 +00:00
Yifan Hong
1cef6a94eb health.filesystem HAL renamed to health.storage
...to reflect that the HAL operates on storage devices,
not filesystem.

Bug: 111655771
Test: compiles
Change-Id: Ibb0572cb1878359e5944aa6711331f0c7993ba6e
Merged-In: Ibb0572cb1878359e5944aa6711331f0c7993ba6e
2018-09-20 04:12:45 +00:00
Tri Vo
5c1fe61eaa More granular vendor access to /system files.
This change limits global access to /system files down to:
/system/bin/linker*
/system/lib[64]/*
/system/etc/ld.config*
/system/etc/seccomp_policy/*
/system/etc/security/cacerts/*
/system/usr/share/zoneinfo/*

Bug: 111243627
Test: boot device, browse internet without denials to system_* types.
Test: VtsHalDrmV1_{1, 0}TargetTest without denials
Change-Id: I69894b29733979c2bc944ac80229e84de5d519f4
2018-09-20 03:07:50 +00:00
Joel Galenson
732e92b6fe Remove fixed bugs from bug_map.
Test: Build.
Change-Id: I5c02916dfa3b2e8d5ba2bc586d05a69bd1f1254f
Merged-In: I150bc74b13a77f00a7e8b31a6c2edf9654bdbe59
2018-09-17 08:42:55 -07:00
Andy Hung
544201ba67 hal_audio_default: allow audioserver fd for status dump
Test: USB device plug/unplug check for avc: denied
Test: AudioFlinger dumpsys
Bug: 115722843
Change-Id: I0c4186f97a46e41e9f2d75b3f324b6b85399e2b5
2018-09-14 13:50:44 -07:00
Kim Low
a42faff53f Add input_device permission to hal_sensors_default
This is done so that /dev/input/event* nodes can be read by
dynamic sensors framework.

Bug: 38511270
Change-Id: Ib017c5621a8b7e08ddfa088453d061a6537a2a1c
2018-08-21 18:20:54 +00:00
Yifan Hong
0814795c79 Add sepolicy for health filesystem HAL
Test: builds
Test: vts
Bug: 111655771
Change-Id: Iabad3d124bf476cb624addf7d7898e0c2894d550
2018-08-10 11:02:21 -07:00
Dmitry Shmidt
48bf5e998e Merge "btlinux: Move HAL definitions from system/bt"
am: 9214238418

Change-Id: Ib1a4c54dacb5e3999ffa130d170cdef04e383b57
2018-06-27 19:22:04 -07:00
Dmitry Shmidt
a0c3416b2a btlinux: Move HAL definitions from system/bt
Test: ls -laZ /vendor/bin/hw/android.hardware.bluetooth*
Change-Id: I394594ad041f87583ca6b5b44d836cfab5da8103
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Merged-In: I394594ad041f87583ca6b5b44d836cfab5da8103
2018-06-27 23:56:31 +00:00
Steven Moreland
d0c4d4e7db mediacodec->mediacodec+hal_omx{,_server,_client} am: 7baf725ea6
am: 6ad7e65447

Change-Id: I9b60e71be957d43f66605958915d3cfb45d42573
2018-05-30 13:51:23 -07:00
Steven Moreland
7baf725ea6 mediacodec->mediacodec+hal_omx{,_server,_client}
(breaks vendor blobs, will have to be regenerated
after this CL)

This moves mediacodec to vendor so it is replaced with
hal_omx_server. The main benefit of this is that someone
can create their own implementation of mediacodec without
having to alter the one in the tree. mediacodec is still
seccomp enforced by CTS tests.

Fixes: 36375899
Test: (sanity) YouTube
Test: (sanity) camera pics + video
Test: check for denials
Change-Id: I31f91b7ad6cd0a891a1681ff3b9af82ab400ce5e
2018-05-30 18:12:32 +00:00
Kourosh Derakshan
2054bb4e71 Allow 64bit version of Camera Provider to run
Test: camera operation
Bug: 73173997
Change-Id: I17668a2e4cc56499bc837920e2cdcfd96d608153
2018-05-12 02:06:19 +00:00
TreeHugger Robot
4031b265fd Merge "Adding ability for hal keymaster to read vendor SPL" into pi-dev 2018-05-11 22:15:46 +00:00
Max Bires
37fd4bd485 Adding ability for hal keymaster to read vendor SPL
Keymaster hal needs to be able to read the vendor SPL for purposes of
rollback protection.

Bug: 76428542
Test: Keymaster can access the hal_keymaster_default property
Change-Id: Ifa53adb23f6ab79346e9dd9616b34d8b24395a0a
2018-05-11 16:51:58 +00:00
android-build-prod (mdb)
81bb3c6e18 Merge "Adding ability for hal keymaster to read vendor SPL" 2018-05-08 18:36:58 +00:00
Max Bires
7332216811 Adding ability for hal keymaster to read vendor SPL
Keymaster hal needs to be able to read the vendor SPL for purposes of
rollback protection.

Test: Keymaster can access the hal_keymaster_default property
Change-Id: Ifa53adb23f6ab79346e9dd9616b34d8b24395a0a
2018-05-07 13:25:44 -07:00
Pavel Maltsev
43e172af66 Move automotive HALs sepolicy to system/
Bug: 70637118
Test: build, flash and boot automotive builds

Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef
Merged-In: I6db23258de30174d6db09d241e91b08aa5afedef
(cherry picked from commit 394dbe34a0)
2018-05-04 21:36:48 +00:00
Roshan Pius
d7b34a48ff sepolicy(hostapd): Add a HIDL interface for hostapd
* Note on cherry-pick: Some of the dependent changes are not in AOSP.
In order to keep hostapd running correctly in AOSP, I've modified this
change to only include policy additions.

Change sepolicy permissions to now classify hostapd as a HAL exposing
HIDL interface.

Sepolicy denial for accessing /data/vendor/misc/wifi/hostapd:
12-27 23:40:55.913  4952  4952 W hostapd : type=1400 audit(0.0:19): avc:
denied { write } for name="hostapd" dev="sda13" ino=4587601
scontext=u:r:hal_wifi_hostapd_default:s0
tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0

01-02 19:07:16.938  5791  5791 W hostapd : type=1400 audit(0.0:31): avc:
denied { search } for name="net" dev="sysfs" ino=30521
scontext=u:r:hal_wifi_hostapd_default:s0
tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0

Bug: 36646171
Test: Device boots up and able to turn on SoftAp.
Change-Id: Ibacfcc938deab40096b54b8d0e608d53ca91b947
Merged-In: Ibacfcc938deab40096b54b8d0e608d53ca91b947
(cherry picked from commit 5bca3e860d)
2018-05-04 21:36:24 +00:00
Alan Stokes
2818b902dc Allow wpa_supplicant to write to files in /proc/net.
This is needed for interface configuration - see e.g. nl80211_configure_data_frame_filters.

Bug: 77903086
Test: Device boots, denial not seen, wifi works

(cherry picked from commit 72ed615228)

Change-Id: Ia781e7c56f6e8e77e654cd28ca34de09180e2213
Merged-In: Ia55c4af1fcee75ada0e67a162fdb92ecc0089312
2018-05-03 15:28:48 +00:00