Skip to content
Snippets Groups Projects
  1. Apr 13, 2018
    • Jaekyun Seok's avatar
      Whitelist vendor-init-settable bluetooth_prop and wifi_prop · a11b16c9
      Jaekyun Seok authored
      Values of the following properties are set by SoC vendors on some
      devices including Pixels.
      - persist.bluetooth.a2dp_offload.cap
      - persist.bluetooth.a2dp_offload.enable
      - persist.vendor.bluetooth.a2dp_offload.enable
      - ro.bt.bdaddr_path
      - wlan.driver.status
      
      So they should be whitelisted for compatibility.
      
      Bug: 77633703
      Test: succeeded building and tested with Pixels
      Change-Id: Ib2b81bcc1fd70ddd571dc7fb2b923b576d62b7d5
      Merged-In: Ib2b81bcc1fd70ddd571dc7fb2b923b576d62b7d5
      (cherry picked from commit 224921d1)
      a11b16c9
  2. Mar 12, 2018
    • Sunny Kapdi's avatar
      Bluetooth A2DP offload: Binder call to audio HAL · 863a4efa
      Sunny Kapdi authored
      Add rule to allow Binder call from Bluetooth process to Bluetooth
      audio HIDL interface running in audio HAL service process.
      
      Bug: 63932139
      Bug: 72242910
      Test: Manual; TestTracker/148125
      Change-Id: I1981a78bece10b8e516f218d3edde8b77943d130
      (cherry picked from commit e8cfac90e8bf14466b6431a21bc5ccd4bf6ca3ea)
      863a4efa
  3. Feb 28, 2018
  4. Nov 22, 2017
    • Jeff Vander Stoep's avatar
      Fix CTS regressions · 6a28b68d
      Jeff Vander Stoep authored
      Commit 7688161c "hal_*_(client|server) => hal(client|server)domain"
      added neverallow rules on hal_*_client attributes while simultaneously
      expanding these attribute which causes them to fail CTS neverallow
      tests. Remove these neverallow rules as they do not impose specific
      security properties that we want to enforce.
      
      Modify Other neverallow failures which were imposed on hal_foo
      attributes and should have been enforced on hal_foo_server attributes
      instead.
      
      Bug: 69566734
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          CtsSecurityHostTestCases completed in 7s. 627 passed, 1 failed
          remaining failure appears to be caused by b/68133473
      Test: build taimen-user/userdebug
      
      Change-Id: I619e71529e078235ed30dc06c60e6e448310fdbc
      6a28b68d
  5. Nov 21, 2017
    • Jeffrey Vander Stoep's avatar
      Revert "Fix CTS regressions" · cd69bebf
      Jeffrey Vander Stoep authored
      This reverts commit ed876a5e.
      
      Fixes user builds.
      libsepol.report_failure: neverallow on line 513 of system/sepolicy/public/domain.te (or line 9149 of policy.conf) violated by allow update_verifier misc_block_device:blk_file { ioctl read write lock append open }; 
      libsepol.check_assertions: 1 neverallow failures occurred 
      Error while expanding policy
      Bug: 69566734
      Test: build taimen-user
      Change-Id: I969b7539dce547f020918ddc3e17208fc98385c4
      cd69bebf
    • Jeff Vander Stoep's avatar
      Fix CTS regressions · ed876a5e
      Jeff Vander Stoep authored
      Commit 7688161c "hal_*_(client|server) => hal(client|server)domain"
      added neverallow rules on hal_*_client attributes while simultaneously
      expanding these attribute which causes them to fail CTS neverallow
      tests. Remove these neverallow rules as they do not impose specific
      security properties that we want to enforce.
      
      Modify Other neverallow failures which were imposed on hal_foo
      attributes and should have been enforced on hal_foo_server attributes
      instead.
      
      Bug: 69566734
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          CtsSecurityHostTestCases completed in 7s. 627 passed, 1 failed
          remaining failure appears to be caused by b/68133473
      Change-Id: I83dcb33c3a057f126428f88a90b95f3f129d9f0e
      ed876a5e
  6. Oct 21, 2017
    • Jeff Vander Stoep's avatar
      hal_audio: remove access to audiohal_data_file · b1a921e2
      Jeff Vander Stoep authored
      This is no longer used and violates Treble data separation.
      
      Bug: 68057930
      Test: verify on Sailfish that /data/misc/audiohal doesn't exist
          This dir appears to be Qualcomm specific and should not have
          been defined in core policy.
      
      Change-Id: I55fba7564203a7f8a1d8612abd36ec1f89dc869d
      b1a921e2
  7. Oct 18, 2017
  8. Oct 16, 2017
    • Tri Vo's avatar
      Remove proc access from hal_audio. · 5cccb249
      Tri Vo authored
      As a consequence, hal_audio_default (and any domain with hal_audio attribute)
      loses access to proc label.
      
      Bug: 65643247
      Test: sailfish boots, can play sound through speakers and headset
      (3.5mm, usb, and bluetooth) without denials from hal_audio to proc.
      Test: VtsHalAudioEffectV2_0Target
      Test: VtsHalAudioV2_0Target
      
      Change-Id: I3eead5a26ef36b8840d31c5e078f006b0c2266a3
      5cccb249
  9. Oct 06, 2017
    • Tri Vo's avatar
      Extend access to proc/asound/* · 464f59ae
      Tri Vo authored
      Renamed this type:
      proc_asound_cards -> proc_asound
      
      Labeled /proc/asound/devices as proc_asound.
      
      We now use proc_asound type to label files under /proc/asound which we
      want to expose to system components.
      
      Bug: 66988327
      Test: Pixel 2 boots, can play sound with or without headphones, and
      selinux denials to proc_asound are not seen.
      
      Change-Id: I453d9bfdd70eb80931ec9e80f17c8fd0629db3d0
      464f59ae
  10. Sep 28, 2017
  11. Sep 26, 2017
  12. Sep 19, 2017
    • Tri Vo's avatar
      Explicitly label system_server's dependencies in /proc · 8c2323d3
      Tri Vo authored
      Labeled:
      /proc/asound/cards -> proc_asound_cards
      /proc/loadavg -> proc_loadavg
      /proc/pagetypeinfo -> proc_pagetypeinfo
      /proc/version -> proc_version
      /proc/vmallocinfo -> proc_vmallocinfo
      
      system_server: added access to all new types  and removed access to proc label.
      init: added access to proc_version.
      dumpstate: added access to proc_pagetypeinfo, proc_version,
      proc_vmallocinfo.
      hal_audio: added access to proc_asound_cards.
      all_untrusted_apps: extended neverallow rule to include new labels.
      
      Bug: 65980789
      Test: device boots without selinux denials to the newly introduced
      labels.
      Test: "adb shell dumpstate" throws no violations to new labels.
      Change-Id: Ic60facd3d4776e38d5e3ba003d06ada4e52c7dca
      8c2323d3
  13. May 08, 2017
    • Mikhail Naganov's avatar
      hal_audio: Allow writing dump info into pipes when capturing BR · 7fa260ab
      Mikhail Naganov authored
      The following HAL methods use file descriptors to write dump
      info comprising audioflinger debug dump:
      
      IDevice.debugDump
      IEffectsFactory.debugDump
      IStream.debugDump
      
      Bug: 37993476
      Test: check contents of media.audio_flinger section in
            a bugreport captured on Pixel device
      Merged-In: I77d347c019ac93c3ba0d54ce50f0fdc243b04685
      
      Change-Id: Ia0531f715ae5f8b2599153e54a11e9eb4ee47d4b
      7fa260ab
  14. May 04, 2017
    • Mikhail Naganov's avatar
      hal_audio: Allow writing dump info into pipes when capturing BR · 9686cbcd
      Mikhail Naganov authored
      The following HAL methods use file descriptors to write dump
      info comprising audioflinger debug dump:
      
      IDevice.debugDump
      IEffectsFactory.debugDump
      IStream.debugDump
      
      Bug: 37993476
      Test: check contents of media.audio_flinger section in
            a bugreport captured on Pixel device
      
      Change-Id: I77d347c019ac93c3ba0d54ce50f0fdc243b04685
      9686cbcd
  15. Apr 28, 2017
  16. Apr 21, 2017
    • Alex Klyubin's avatar
      Restrict access to hwservicemanager · 53656c17
      Alex Klyubin authored
      This adds fine-grained policy about who can register and find which
      HwBinder services in hwservicemanager.
      
      Test: Play movie in Netflix and Google Play Movies
      Test: Play video in YouTube app and YouTube web page
      Test: In Google Camera app, take photo (HDR+ and conventional),
            record video (slow motion and normal), and check that photos
            look fine and videos play back with sound.
      Test: Cast screen to a Google Cast device
      Test: Get location fix in Google Maps
      Test: Make and receive a phone call, check that sound works both ways
            and that disconnecting the call frome either end works fine.
      Test: Run RsHelloCompute RenderScript demo app
      Test: Run fast subset of media CTS tests:
            make and install CtsMediaTestCases.apk
            adb shell am instrument -e size small \
                -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
      Test: Play music using Google Play music
      Test: Adjust screen brightness via the slider in Quick Settings
      Test: adb bugreport
      Test: Enroll in fingerprint screen unlock, unlock screen using
            fingerprint
      Test: Apply OTA update:
            Make some visible change, e.g., rename Settings app.
            make otatools && \
            make dist
            Ensure device has network connectivity
            ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip
            Confirm the change is now live on the device
      Bug: 34454312
      (cherry picked from commit 632bc494)
      Merged-In: Iecf74000e6c68f01299667486f3c767912c076d3
      Change-Id: I7a9a487beaf6f30c52ce08e04d415624da49dd31
      53656c17
  17. Apr 20, 2017
    • Alex Klyubin's avatar
      Restrict access to hwservicemanager · 632bc494
      Alex Klyubin authored
      This adds fine-grained policy about who can register and find which
      HwBinder services in hwservicemanager.
      
      Test: Play movie in Netflix and Google Play Movies
      Test: Play video in YouTube app and YouTube web page
      Test: In Google Camera app, take photo (HDR+ and conventional),
            record video (slow motion and normal), and check that photos
            look fine and videos play back with sound.
      Test: Cast screen to a Google Cast device
      Test: Get location fix in Google Maps
      Test: Make and receive a phone call, check that sound works both ways
            and that disconnecting the call frome either end works fine.
      Test: Run RsHelloCompute RenderScript demo app
      Test: Run fast subset of media CTS tests:
            make and install CtsMediaTestCases.apk
            adb shell am instrument -e size small \
                -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
      Test: Play music using Google Play music
      Test: Adjust screen brightness via the slider in Quick Settings
      Test: adb bugreport
      Test: Enroll in fingerprint screen unlock, unlock screen using
            fingerprint
      Test: Apply OTA update:
            Make some visible change, e.g., rename Settings app.
            make otatools && \
            make dist
            Ensure device has network connectivity
            ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip
            Confirm the change is now live on the device
      Bug: 34454312
      Change-Id: Iecf74000e6c68f01299667486f3c767912c076d3
      632bc494
  18. 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
  19. Mar 14, 2017
    • Jeff Vander Stoep's avatar
      Enforce separation of privilege for HAL driver access · 7fa59c81
      Jeff Vander Stoep authored
      Only audio HAL may access audio driver.
      Only camera HAL may access camera driver.
      
      Test: aosp_marlin and aosp_bullhead policy builds. Note: neverallow
            rules are compile time assertions and do not change the
            on-device policy.
      Bug: 36185625
      Change-Id: I1c9edf528080374f5f0d90d3c14d6c3b162484a3
      7fa59c81
  20. Mar 09, 2017
    • Mikhail Naganov's avatar
      hal_audio: Allow writing dump info into pipes · d7c88ddf
      Mikhail Naganov authored
      The following HAL methods use file descriptors to write dump
      info comprising audioflinger debug dump:
      
      IDevice.debugDump
      IEffectsFactory.debugDump
      IStream.debugDump
      
      Bug: 36074936
      Test: check contents of 'adb shell dumpsys media.audio_flinger'
            on -userdebug builds
      
      Change-Id: Ie2bec95c6b73c6f10941e2b0a95a25d6a7a6e4c1
      d7c88ddf
  21. 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
  22. Jan 18, 2017
  23. Jan 17, 2017
  24. Dec 22, 2016
  25. Dec 15, 2016
  26. Dec 14, 2016
  27. Oct 26, 2016
Loading