Skip to content
Snippets Groups Projects
  1. Apr 04, 2017
    • Alex Klyubin's avatar
      tee no longer violates the socket comms ban · 645abead
      Alex Klyubin authored
      SELinux policy no longer has allow rules which permit core/non-vendor
      domains to communicate with tee domain over sockets. This commit thus
      removes tee from the list of temporary exceptions for the socket
      communications prohibition.
      
      Test: mmm system/sepolicy
      Bug: 36714625
      Bug: 36715266
      Change-Id: Iccbd9ea0555b0c9f1cb6c5e0f5a6c0d3f8730b4d
      645abead
  2. Apr 03, 2017
    • Martijn Coenen's avatar
      Add target for vndservice_contexts. · 6676c234
      Martijn Coenen authored
      So we can limit vndservicemanager access to
      just vndservice_contexts.
      
      Bug: 36052864
      Test: servicemanager,vndservicemanager work
      Change-Id: I7b132d4f616ba1edd0daf7be750d4b7174c4e188
      6676c234
    • Alex Klyubin's avatar
      Move TEE rules to vendor image · 304d6536
      Alex Klyubin authored
      "tee" domain is a vendor domain. Hence its rules should live on the
      vendor image.
      
      What's left as public API is that:
      1. tee domain exists and that it is permitted to sys_rawio capability,
      2. tee_device type exists and apps are not permitted to access
         character devices labeled tee_device.
      
      If you were relying on system/sepolicy automatically labeling
      /dev/tf_driver as tee_device or labeling /system/bin/tf_daemon as
      tee_exec, then you need to add these rules to your device-specific
      file_contexts.
      
      Test: mmm system/sepolicy
      Test: bullhead, angler, and sailfish boot up without new denials
      Bug: 36714625
      Bug: 36714625
      Bug: 36720355
      Change-Id: Ie21619ff3c44ef58675c369061b4afdd7e8501c6
      304d6536
  3. Mar 31, 2017
    • Shubang's avatar
      Add sepolicy for tv.input · c76e158c
      Shubang authored
      Test: build, flash; adb shell lshal
      Bug: 36562029
      Change-Id: If8f6d8dbd99d31e6627fa4b7c1fd4faea3b75cf2
      c76e158c
    • Alex Klyubin's avatar
      Tighten restrictions on core <-> vendor socket comms · 2f6151ea
      Alex Klyubin authored
      This futher restricts neverallows for sockets which may be exposed as
      filesystem nodes. This is achieved by labelling all such sockets
      created by core/non-vendor domains using the new coredomain_socket
      attribute, and then adding neverallow rules targeting that attribute.
      
      This has now effect on what domains are permitted to do. This only
      changes neverallow rules.
      
      Test: mmm system/sepolicy
      Bug: 36577153
      
      (cherry picked from commit cf2ffdf0)
      
      Change-Id: Iffeee571a2ff61fb9515fa6849d060649636524e
      2f6151ea
  4. Mar 30, 2017
    • Myles Watson's avatar
      Disallow HAL access to Bluetooth data files · 1317b4ca
      Myles Watson authored
      Devices that store their BT MAC address in /data/misc/bluedroid/ need
      to find another place for that file.
      
      Bug: 36602160
      Test: Restart Bluetooth, check for selinux denials/files in /data/misc
      Change-Id: Ib8d610f201a8c35f95b464c24857c6639205bc66
      1317b4ca
    • Jiyong Park's avatar
      Annotate rild with socket_between_core_and_vendor_violators · 57e9946f
      Jiyong Park authored
      Full treble targets cannot have sockets between framework and vendor
      processes. In theory, this should not affect aosp_arm64_ab where only
      framework binaries are built. However, /system/sepolicy has rild.te
      which is now vendor binary and this causes neverallow conflict when
      building aosp_arm64_ab.
      
      So, we just temporarily annotate the rild with
      socket_between_core_and_vendor_violators so that the neverallow conflict
      can be avoided.
      
      Test: choosecombo 1 aosp_arm64_ab userdebug; m -j 80 The build should
      not break.
      
      Change-Id: I260757cde96857cc3f539d5f82ca69c50653f8c7
      57e9946f
  5. Mar 29, 2017
    • Roshan Pius's avatar
      sepolicy: Add new wifi keystore HAL · 9af7c95f
      Roshan Pius authored
      Moving the wpa_supplicant interaction from the binder keystore service
      to the new wifi keystore HAL.
      
      Denials addressed:
      03-29 00:04:52.075   734   734 E SELinux : avc:  denied  { get } for
      pid=638 uid=1010 scontext=u:r:hal_wifi_keystore_default:s0
      tcontext=u:r:keystore:s0 tclass=keystore_key
      
      Bug: 34603782
      Test: Able to connect to wifi passpoint networks. Denials no longer
      seen.
      Change-Id: I97eb9a4aa9968056a2f1fcc7ce5509ceb62fd41e
      9af7c95f
    • Alex Klyubin's avatar
      tee domain is a vendor domain · 0f6c047d
      Alex Klyubin authored
      As a result, Keymaster and DRM HALs are permitted to talk to tee domain
      over sockets. Unfortunately, the tee domain needs to remain on the
      exemptions list because drmserver, mediaserver, and surfaceflinger are
      currently permitted to talk to this domain over sockets.
      
      We need to figure out why global policy even defines a TEE domain...
      
      Test: mmm system/sepolicy
      Bug: 36601092
      Bug: 36601602
      Bug: 36714625
      Bug: 36715266
      Change-Id: I0b95e23361204bd046ae5ad22f9f953c810c1895
      0f6c047d
  6. Mar 28, 2017
    • Jeff Vander Stoep's avatar
      Ban vendor components access to core data types · 4a478c47
      Jeff Vander Stoep authored
      Vendor and system components are only allowed to share files by
      passing open FDs over HIDL. Ban all directory access and all file
      accesses other than what can be applied to an open file:
      stat/read/write/append.
      
      This commit marks core data types as core_data_file_type and bans
      access to non-core domains with an exemption for apps. A temporary
      exemption is also granted to domains that currently rely on
      access with TODOs and bug number for each exemption.
      
      Bug: 34980020
      Test: Build and boot Marlin. Make phone call, watch youtube video.
            No new denials observed.
      Change-Id: I320dd30f9f0a5bf2f9bb218776b4bccdb529b197
      4a478c47
  7. Mar 27, 2017
    • Alex Klyubin's avatar
      Ban socket connections between core and vendor · 2746ae68
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (coredomain) and
      vendor domain are not permitted to connect to each other's sockets.
      There are two main exceptions: (1) apps are permitted to talk to other
      apps over Unix domain sockets (this is public API in Android
      framework), and (2) domains with network access (netdomain) are
      permitted to connect to netd.
      
      This commit thus:
      * adds neverallow rules restricting socket connection establishment,
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "socket_between_core_and_vendor_violators" attribute. The attribute
        is needed because the types corresponding to violators are not
        exposed to the public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Bug: 36613996
      Change-Id: I458f5a09a964b06ad2bddb52538ec3a15758b003
      2746ae68
  8. Mar 25, 2017
  9. Mar 24, 2017
    • Alex Klyubin's avatar
      Mark all clients of Allocator HAL · 7cda44f4
      Alex Klyubin authored
      This change associates all domains which are clients of Allocator HAL
      with hal_allocator_client and the, required for all HAL client
      domains, halclientdomain.
      
      This enables this commit to remove the now unnecessary hwallocator_use
      macro because its binder_call(..., hal_allocator_server) is covered by
      binder_call(hal_allocator_client, hal_allocator_server) added in this
      commit.
      
      Unfortunately apps, except isolated app, are clients of Allocator HAL
      as well. This makes it hard to use the hal_client_domain(...,
      hal_allocator) macro because it translates into "typeattribute" which
      currently does not support being provided with a set of types, such as
      { appdomain -isolated_app }. As a workaround, hopefully until
      typeattribute is improved, this commit expresses the necessary
      association operation in CIL. private/technical_debt.cil introduced by
      this commit is appended into the platform policy CIL file, thus
      ensuring that the hack has effect on the final monolithic policy.
      
      P. S. This change also removes Allocator HAL access from isolated_app.
      Isolated app shouldn't have access to this HAL anyway.
      
      Test: Google Play Music plays back radios
      Test: Google Camera records video with sound and that video is then
            successfully played back with sound
      Test: YouTube app plays back clips with sound
      Test: YouTube in Chrome plays back clips with sound
      Bug: 34170079
      Change-Id: Id00bba6fde83e7cf04fb58bc1c353c2f66333f92
      7cda44f4
    • Alex Klyubin's avatar
      Vendor domains must not use Binder · f5446eb1
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
      apps) are not permitted to use Binder. This commit thus:
      * groups non-vendor domains using the new "coredomain" attribute,
      * adds neverallow rules restricting Binder use to coredomain and
        appdomain only, and
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "binder_in_vendor_violators" attribute. The attribute is needed
        because the types corresponding to violators are not exposed to the
        public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: In Chrome, navigate to ip6.me, play a YouTube video
      Test: YouTube: play a video
      Test: Netflix: play a movie
      Test: Google Camera: take a photo, take an HDR+ photo, record video with
            sound, record slow motion video with sound. Confirm videos play
            back fine and with sound.
      Bug: 35870313
      Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
      f5446eb1
  10. Mar 23, 2017
    • Martijn Coenen's avatar
      Initial sepolicy for vndservicemanager. · e7d8f4c3
      Martijn Coenen authored
      vndservicemanager is the context manager for binder services
      that are solely registered and accessed from vendor processes.
      
      Bug: 36052864
      Test: vendorservicemanager runs
      Merged-In: Ifbf536932678d0ff13d019635fe6347e185ef387
      Change-Id: I430f1762eb83825f6cd4be939a69d46a8ddc80ff
      e7d8f4c3
  11. Mar 22, 2017
    • Martijn Coenen's avatar
      Initial sepolicy for vndservicemanager. · cba70be7
      Martijn Coenen authored
      vndservicemanager is the context manager for binder services
      that are solely registered and accessed from vendor processes.
      
      Bug: 36052864
      Test: vendorservicemanager runs
      Change-Id: Ifbf536932678d0ff13d019635fe6347e185ef387
      cba70be7
  12. Mar 21, 2017
  13. Mar 18, 2017
    • Alex Klyubin's avatar
      Switch Boot Control HAL policy to _client/_server · 09d13e73
      Alex Klyubin authored
      This switches Boot Control HAL policy to the design which enables us
      to conditionally remove unnecessary rules from domains which are
      clients of Boot Control HAL.
      
      Domains which are clients of Boot Control HAL, such as update_server,
      are granted rules targeting hal_bootctl only when the Boot Control HAL
      runs in passthrough mode (i.e., inside the client's process). When the
      HAL runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting
      hal_bootctl are not granted to client domains.
      
      Domains which offer a binderized implementation of Boot Control HAL,
      such as hal_bootctl_default domain, are always granted rules targeting
      hal_bootctl.
      
      P. S. This commit removes direct access to Boot Control HAL from
      system_server because system_server is not a client of this HAL. This
      commit also removes bootctrl_block_device type which is no longer
      used. Finally, boot_control_hal attribute is removed because it is now
      covered by the hal_bootctl attribute.
      
      Test: Device boots up, no new denials
      Test: Reboot into recovery, sideload OTA update succeeds
      Test: Apply OTA update via update_engine:
            1. make dist
            2. Ensure device has network connectivity
            3. ota_call.py -s <serial here> out/dist/sailfish-ota-*.zip
      Bug: 34170079
      Change-Id: I9c410c092069e431a3852b66c04c4d2a9f1a25cf
      09d13e73
  14. Mar 17, 2017
    • Alex Klyubin's avatar
      Annotate most remaining HALs with _client/_server · 9e6b24c6
      Alex Klyubin authored
      This switches most remaining HALs to the _client/_server approach.
      To unblock efforts blocked on majority of HALs having to use this
      model, this change does not remove unnecessary rules from clients of
      these HALs. That work will be performed in follow-up commits. This
      commit only adds allow rules and thus does not break existing
      functionality.
      
      The HALs not yet on the _client/_server model after this commit are:
      * Allocator HAL, because it's non-trivial to declare all apps except
        isolated apps as clients of this HAL, which they are.
      * Boot HAL, because it's still on the non-attributized model and I'm
        waiting for update_engine folks to answer a couple of questions
        which will let me refactor the policy of this HAL.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: Device boots in recovery mode, no new denials
      Bug: 34170079
      Change-Id: I03e6bcec2fa02f14bdf17d11f7367b62c68a14b9
      9e6b24c6
  15. Mar 14, 2017
    • Alex Klyubin's avatar
      Switch Sensors HAL policy to _client/_server · 41518bec
      Alex Klyubin authored
      This switches Sensors HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Sensors HAL.
      
      Domains which are clients of Sensors HAL, such as system_server, are
      granted rules targeting hal_sensors only when the Sensors HAL runs in
      passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with clients
      talking to the HAL over HwBinder IPC), rules targeting hal_sensors are
      not granted to client domains.
      
      Domains which offer a binderized implementation of Sensors HAL, such
      as hal_sensors_default domain, are always granted rules targeting
      hal_sensors.
      
      P. S. This commit also removes
        allow system_server sensors_device:chr_file rw_file_perms
      because this is device-specific and thus not needed in device-agnostic
      policy. The device-specific policy of the affected devices already has
      this rule.
      
      Test: Device boots, no new denials
      Test: adb shell dumpsys sensorservice
            lists tons of sensors
      Test: Proprietary sensors test app indicates that there are sensors
            and that the app can register to listen for updates for sensors
            and that such updates arrive to the app.
      Bug: 34170079
      Change-Id: I61bf779070eabcb64ae73724d62b6e837319a668
      41518bec
  16. Mar 09, 2017
    • Po-Chien Hsueh's avatar
      sepolicy: Move hostapd to vendor · 9a293013
      Po-Chien Hsueh authored
      Move hostapd to vendor/bin/ because it's only used by WIFI HAL.
      This commit is for sepolicy corresponding changes.
      
      Bug: 34236942
      Bug: 34237659
      Test: Hotspot works fine. Integration test.
      
      Change-Id: I2ee165970a20f4015d5d62fc590d448e9acb92c1
      9a293013
  17. Mar 07, 2017
    • Roshan Pius's avatar
      sepolicy: Make wpa_supplicant a HIDL service · a976e64d
      Roshan Pius authored
      Note: The existing rules allowing socket communication will be removed
      once we  migrate over to HIDL completely.
      
      (cherry-pick of 2a9595ed) 
      Bug: 34603782
      Test: Able to connect to wifi networks.
      Test: Will be sending for full wifi integration tests
      (go/wifi-test-request)
      Change-Id: I9ee238fd0017ec330f6eb67ef9049211f7bd4615
      a976e64d
  18. Feb 28, 2017
  19. Feb 27, 2017
  20. Feb 24, 2017
    • Roshan Pius's avatar
      sepolicy: Make wpa_supplicant a HIDL service · 2a9595ed
      Roshan Pius authored
      Note: The existing rules allowing socket communication will be removed
      once we  migrate over to HIDL completely.
      
      Bug: 34603782
      Test: Able to connect to wifi networks.
      Test: Will be sending for full wifi integration tests
      (go/wifi-test-request)
      Change-Id: I9ee238fd0017ec330f6eb67ef9049211f7bd4615
      2a9595ed
    • Amit Mahajan's avatar
      Move rild to vendor partition. · f7bed71a
      Amit Mahajan authored
      Test: Basic telephony sanity
      Bug: 35672432
      Change-Id: I7d17cc7efda9902013c21d508cefc77baccc06a8
      f7bed71a
  21. Feb 23, 2017
    • Alex Klyubin's avatar
      Switch Keymaster HAL policy to _client/_server · f7543d27
      Alex Klyubin authored
      This switches Keymaster HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Keymaster HAL.
      
      Domains which are clients of Keymaster HAL, such as keystore and vold
      domains, are granted rules targeting hal_keymaster only when the
      Keymaster HAL runs in passthrough mode (i.e., inside the client's
      process). When the HAL runs in binderized mode (i.e., in another
      process/domain, with clients talking to the HAL over HwBinder IPC),
      rules targeting hal_keymaster are not granted to client domains.
      
      Domains which offer a binderized implementation of Keymaster HAL, such
      as hal_keymaster_default domain, are always granted rules targeting
      hal_keymaster.
      
      Test: Password-protected sailfish boots up and lock screen unlocks --
            this exercises vold -> Keymaster HAL interaction
      Test: All Android Keystore CTS tests pass -- this exercises keystore ->
            Keymaster HAL interaction:
            make cts cts-tradefed
            cts-tradefed run singleCommand cts --skip-device-info \
            --skip-preconditions --skip-connectivity-check --abi arm64-v8a \
            --module CtsKeystoreTestCases
      Bug: 34170079
      
      Change-Id: I2254d0fdee72145721654d6c9e6e8d3331920ec7
      f7543d27
  22. Feb 22, 2017
    • Alex Klyubin's avatar
      Switch Wi-Fi HAL policy to _client/_server · 1d2a1476
      Alex Klyubin authored
      This switches Wi-Fi HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Wi-Fi HAL.
      
      Domains which are clients of Wi-Fi HAL, such as system_server domain,
      are granted rules targeting hal_wifi only when the Wi-Fi HAL runs in
      passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with clients
      talking to the HAL over HwBinder IPC), rules targeting hal_wifi are
      not granted to client domains.
      
      Domains which offer a binderized implementation of Wi-Fi HAL, such as
      hal_wifi_default domain, are always granted rules targeting hal_wifi.
      
      Test: Setup Wizard (incl. adding a Google Account) completes fine with
            Wi-Fi connectivity only
      Test: Toggle Wi-Fi off, on, off, on
      Test: Use System UI to see list of WLANs and connect to one which does
            not require a password, and to one which requries a PSK
      Test: ip6.me loads fine in Chrome over Wi-Fi
      Bug: 34170079
      
      Change-Id: I7a216a06727c88b7f2c23d529f67307e83bed17f
      1d2a1476
    • Alex Klyubin's avatar
      Switch Dumpstate HAL policy to _client/_server · aa60f9a8
      Alex Klyubin authored
      This switches Dumpstate HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Dumpstate HAL.
      
      Domains which are clients of Dumpstate HAL, such as dumpstate domain,
      are granted rules targeting hal_dumpstate only when the Dumpstate HAL
      runs in passthrough mode (i.e., inside the client's process). When the
      HAL runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting
      hal_dumpstate are not granted to client domains.
      
      Domains which offer a binderized implementation of Dumpstate HAL, such
      as hal_dumpstate_default domain, are always granted rules targeting
      hal_dumpstate.
      
      Test: adb bugreport
      Test: Take bugreport through system UI
      Bug: 34170079
      
      (cherry picked from commit 47174e3b)
      
      Change-Id: I3e827534af03cdfa876921c5fa4af3a53025ba27
      aa60f9a8
    • Alex Klyubin's avatar
      Switch Dumpstate HAL policy to _client/_server · 47174e3b
      Alex Klyubin authored
      This switches Dumpstate HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Dumpstate HAL.
      
      Domains which are clients of Dumpstate HAL, such as dumpstate domain,
      are granted rules targeting hal_dumpstate only when the Dumpstate HAL
      runs in passthrough mode (i.e., inside the client's process). When the
      HAL runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting
      hal_dumpstate are not granted to client domains.
      
      Domains which offer a binderized implementation of Dumpstate HAL, such
      as hal_dumpstate_default domain, are always granted rules targeting
      hal_dumpstate.
      
      Test: adb bugreport
      Test: Take bugreport through system UI
      Bug: 34170079
      Change-Id: I3e827534af03cdfa876921c5fa4af3a53025ba27
      47174e3b
    • Alex Klyubin's avatar
      Switch Fingerprint HAL policy to _client/_server · f98650e4
      Alex Klyubin authored
      This switches Fingerprint HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Bluetooth HAL.
      
      Domains which are clients of Fingerprint HAL, such as system_server
      domain, are granted rules targeting hal_fingerprint only when the
      Fingerprint HAL runs in passthrough mode (i.e., inside the client's
      process). When the HAL runs in binderized mode (i.e., in another
      process/domain, with clients talking to the HAL over HwBinder IPC),
      rules targeting hal_fingerprint are not granted to client domains.
      
      Domains which offer a binderized implementation of Fingerprint HAL,
      such as hal_fingerprint_default domain, are always granted rules
      targeting hal_fingerprint.
      
      NOTE: This commit also removes unnecessary allow rules from
      Fingerprint HAL, such access to servicemanager (not hwservicemanager)
      and access to keystore daemon over Binder IPC. Fingerprint HAL does
      not use this functionality anyway and shouldn't use it either.
      
      Test: Enable fingerprint + PIN secure lock screen, confirm it unlocks
            with fingerprint or PIN
      Test: Disable PIN (and thus fingerprint) secure lock screen
      Test: make FingerprintDialog, install, make a fake purchase
      Test: Add fingerprint_hidl_hal_test to device.mk, build & add to device,
            adb shell stop,
            adb shell /data/nativetest64/fingerprint_hidl_hal_test/fingerprint_hidl_hal_test -- all tests pass
      Bug: 34170079
      
      Change-Id: I6951c0f0640194c743ff7049357c77f5f21b71a1
      f98650e4
  23. Feb 17, 2017
    • Alex Klyubin's avatar
      Switch DRM HAL policy to _client/_server · 9b718c40
      Alex Klyubin authored
      This switches DRM HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of DRM HAL.
      
      Domains which are clients of DRM HAL, such as mediadrmserver domain,
      are granted rules targeting hal_drm only when the DRM HAL runs in
      passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting hal_drm
      are not granted to client domains.
      
      Domains which offer a binderized implementation of DRM HAL, such as
      hal_drm_default domain, are always granted rules targeting hal_drm.
      
      Test: Play movie using Google Play Movies
      Test: Play movie using Netflix
      Bug: 34170079
      Change-Id: I3ab0e84818ccd61e54b90f7ade3509b7dbf86fb9
      9b718c40
    • Alex Klyubin's avatar
      Switch Camera HAL policy to _client/_server · 3a8426bf
      Alex Klyubin authored
      This switches Camera HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Camera HAL.
      
      Domains which are clients of Camera HAL, such as cameraserver domain,
      are granted rules targeting hal_camera only when the Camera HAL runs
      in passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with clients
      talking to the HAL over HwBinder IPC), rules targeting hal_camera are
      not granted to client domains.
      
      Domains which offer a binderized implementation of Camera HAL, such
      as hal_camera_default domain, are always granted rules targeting
      hal_camera.
      
      Test: Take non-HDR photo using Google Camera app
      Test: Take HDR photo using Google Camera app
      Test: Record video using Google Camera app
      Bug: 34170079
      Change-Id: I463646cf79fede57f11ccd4ec2cbc37a4fff141e
      3a8426bf
  24. Feb 16, 2017
    • Alex Klyubin's avatar
      Label /vendor/bin/hw on devices without vendor partition · 3001d5a3
      Alex Klyubin authored
      SELinux labeling of filesystem files ignores symlinks. Unfortunately,
      /vendor is a symlink on devices without vendor partition
      (e.g., hikey). Thus, policy in directories which are used both for
      devices with vendor partition and for devices without vendor partition
      must be adjusted to match both /vendor and /system/vendor. It is
      assumed that the /vendor symlink, if it exists at all, always points
      to /system/vendor.
      
      The alternative solution of adjusting vendor policy file labelling
      rules at vendor policy build time, when the actual on-device paths are
      known, was considered to make it harder to see how files are labelled
      by looking solely at the source tree.
      
      Test: Files under /vendor/bin/hw correctly labelled on sailfish,
            angler, and a device which uses the /vendor symlink.
      Bug: 35431549
      Change-Id: If6ccb2c9cb85b0589db03ab86de8071e15d5366f
      3001d5a3
  25. Feb 15, 2017
    • Alex Klyubin's avatar
      Use _client and _server for Audio HAL policy · ac2b4cd2
      Alex Klyubin authored
      This starts the switch for HAL policy to the approach where:
      * domains which are clients of Foo HAL are associated with
        hal_foo_client attribute,
      * domains which offer the Foo HAL service over HwBinder are
        associated with hal_foo_server attribute,
      * policy needed by the implementation of Foo HAL service is written
        against the hal_foo attribute. This policy is granted to domains
        which offer the Foo HAL service over HwBinder and, if Foo HAL runs
        in the so-called passthrough mode (inside the process of each
        client), also granted to all domains which are clients of Foo HAL.
        hal_foo is there to avoid duplicating the rules for hal_foo_client
        and hal_foo_server to cover the passthrough/in-process Foo HAL and
        binderized/out-of-process Foo HAL cases.
      
      A benefit of associating all domains which are clients of Foo HAL with
      hal_foo (when Foo HAL is in passthrough mode) is that this removes the
      need for device-specific policy to be able to reference these domains
      directly (in order to add device-specific allow rules). Instead,
      device-specific policy only needs to reference hal_foo and should no
      longer need to care which particular domains on the device are clients
      of Foo HAL. This can be seen in simplification of the rules for
      audioserver domain which is a client of Audio HAL whose policy is
      being restructured in this commit.
      
      This commit uses Audio HAL as an example to illustrate the approach.
      Once this commit lands, other HALs will also be switched to this
      approach.
      
      Test: Google Play Music plays back radios
      Test: Google Camera records video with sound and that video is then
            successfully played back with sound
      Test: YouTube app plays back clips with sound
      Test: YouTube in Chrome plays back clips with sound
      Bug: 34170079
      Change-Id: I2597a046753edef06123f0476c2ee6889fc17f20
      ac2b4cd2
    • Alex Klyubin's avatar
      Move hal_*_default policy to vendor image · ac1a6d44
      Alex Klyubin authored
      hal_*_default daemons whose policy is in common/device-agnostic policy
      are provided by the vendor image (see vendor/file_contexts). Thus,
      their policy should also reside in the vendor image, rather than in
      the system image. This means their policy should live in the vendor
      subdirectory of this project.
      
      Test: Device boots and appears to work
      Bug: 34135607
      Bug: 34170079
      Change-Id: I6613e43733e03d4a3d4726f849732d903e024016
      ac1a6d44
  26. Feb 13, 2017
  27. Feb 06, 2017
Loading