Skip to content
Snippets Groups Projects
  1. May 15, 2018
    • Jerry Zhang's avatar
      Allow mediaprovider to search /mnt/media_rw · 31c4b4ea
      Jerry Zhang authored
      Mtp needs access to this path in order to
      change files on an sdcard.
      
      Fixes denial:
      
      05-14 17:40:58.803  3004  3004 W MtpServer: type=1400 audit(0.0:46):
      avc: denied { search } for name="media_rw" dev="tmpfs" ino=10113
      scontext=u:r:mediaprovider:s0:c512,c768
      tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0
      b/77925342 app=com.android.providers.media
      
      Bug: 77849654
      Test: no denials using mtp with emulated sdcard
      Change-Id: I27b5294fa211bb1eff6d011638b5fdc90334bc80
      31c4b4ea
  2. Apr 13, 2018
    • Wale Ogunwale's avatar
      Finalizing P SDK · 49b79029
      Wale Ogunwale authored
      Bug: 77588754
      Test: builds
      Change-Id: I61ceb438cd532584847ddd55c0eeaefebdcfa51c
      49b79029
  3. Mar 19, 2018
    • Chong Zhang's avatar
      allow mediaprovider to use media extractor · 9161b992
      Chong Zhang authored
      When extraction exif info, certain file formats may requires
      parsing the container. Allow mediaprovider to use extractor
      to do the parsing.
      
      bug: 73978990
      Test: manually test the scenario in b/73978990 and verify
            the Exif is extracted correctly.
      
      Change-Id: I1cd46d793ebc9c38b816a3b63f361967e551d046
      (cherry picked from commit 8e3fef3d)
      9161b992
  4. Jan 10, 2018
    • Jaekyun Seok's avatar
      Whitelist exported platform properties · e4971454
      Jaekyun Seok authored
      This CL lists all the exported platform properties in
      private/exported_property_contexts.
      
      Additionally accessing core_property_type from vendor components is
      restricted.
      Instead public_readable_property_type is used to allow vendor components
      to read exported platform properties, and accessibility from
      vendor_init is also specified explicitly.
      
      Note that whitelisting would be applied only if
      PRODUCT_COMPATIBLE_PROPERTY is set on.
      
      Bug: 38146102
      Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true
      Change-Id: I304ba428cc4ca82668fec2ddeb17c971e7ec065e
      e4971454
  5. Nov 09, 2017
    • Jeff Vander Stoep's avatar
      Suppress mediaprover access to certain cache dirs · 182dbeb6
      Jeff Vander Stoep authored
      avc: denied { getattr } for comm="sAsyncHandlerTh"
      path="/data/cache/recovery" dev="sda13" ino=7086082
      scontext=u:r:mediaprovider:s0:c512,c768
      tcontext=u:object_r:cache_recovery_file:s0 tclass=dir
      avc: denied { getattr } for path="/data/cache/backup"
      scontext=u:r:mediaprovider:s0:c512,c768
      tcontext=u:object_r:cache_private_backup_file:s0 tclass=dir
      
      Bug: 63038506
      Bug: 35197529
      Test: build police
      Change-Id: I51624c255e622bf712d41ca1bbf190ec3e4fefae
      (cherry picked from commit fcf1b2083935bd298a2ece8d6d0c18712865a04b)
      182dbeb6
    • Jeff Vander Stoep's avatar
      Allow vendor apps to use surfaceflinger_service · 63f46773
      Jeff Vander Stoep authored
      Vendor apps may only use servicemanager provided services
      marked as app_api_service. surfaceflinger_service should be
      available to vendor apps, so add this attribute and clean up
      duplicate grants.
      
      Addresses:
      avc:  denied  { find } scontext=u:r:qtelephony:s0
      tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager
      avc:  denied  { find } scontext=u:r:ssr_detector:s0
      tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager
      avc:  denied  { find } scontext=u:r:qcneservice:s0
      tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager
      
      Bug: 69064190
      Test: build
      Change-Id: I00fcf43b0a8bde232709aac1040a5d7f4792fa0f
      63f46773
  6. Sep 27, 2017
    • Dan Cashman's avatar
      Fix build. Split mediaprovider from priv_app. · 3e21c5f1
      Dan Cashman authored
      This CL was accidentally reverted a second time by commit:
      cb5129f9.  Submit it for the third,
      and final, time.
      
      (cherry-pick of 5637587d
      which was in AOSP and internal master but not stage-aosp-master)
      
      Bug: 62102757
      Test: Builds and boots.
      Change-Id: I0394907e808c737422e644aec452baa3e777cf6f
      3e21c5f1
  7. Jul 10, 2017
  8. Jun 08, 2017
    • Jerry Zhang's avatar
      Revert "Split mediaprovider from priv_app." · cb5129f9
      Jerry Zhang authored
      This reverts commit c147b592.
      
      The new domain changed neverallows, breaking CTS compatability.
      Revert the domain now, with the intention to re-add for the next
      release.
      
      Bug: 62102757
      Test: domain is set to priv_app
      Change-Id: I907ff7c513cd642a306e3eaed3937352ced90005
      cb5129f9
  9. Jun 07, 2017
  10. Jun 02, 2017
    • Jerry Zhang's avatar
      Revert "Split mediaprovider from priv_app." · c00c07c1
      Jerry Zhang authored
      This reverts commit c147b592.
      
      The new domain changed neverallows, breaking CTS compatability.
      Revert the domain now, with the intention to re-add for the next
      release.
      
      Bug: 62102757
      Test: domain is set to priv_app
      Change-Id: I907ff7c513cd642a306e3eaed3937352ced90005
      c00c07c1
  11. Apr 26, 2017
    • Jerry Zhang's avatar
      Add drm and kernel permissions to mediaprovider · 6f9ac6e4
      Jerry Zhang authored
      These were missing when the sepolicy was migrated.
      
      Addresses denials:
      
      E SELinux : avc:  denied  { find } for service=drm.drmManager pid=11769
      uid=10018 scontext=u:r:mediaprovider:s0:c512,c768
      tcontext=u:object_r:drmserver_service:s0 tclass=service_manager
      
      W kworker/u16:2: type=1400 audit(0.0:1667): avc: denied { use } for
      path="/storage/emulated/0/DCIM/Camera/IMG_20170425_124723.jpg"
      dev="sdcardfs" ino=1032250 scontext=u:r:kernel:s0
      tcontext=u:r:mediaprovider:s0:c512,c768 tclass=fd permissive=0
      
      Bug: 37685394
      Bug: 37686255
      Test: Sync files
      Test: Open downloaded file
      
      Change-Id: Ibb02d233720b8510c3eec0463b8909fcc5bbb73d
      6f9ac6e4
  12. Apr 17, 2017
    • Jerry Zhang's avatar
      Split mediaprovider from priv_app. · c147b592
      Jerry Zhang authored
      MediaProvider requires permissions that diverge from those
      of a typical priv_app. This create a new domain and removes
      Mtp related permissions from priv_app.
      
      Bug: 33574909
      Test: Connect with MTP, download apps and files, select ringtones
      Test: DownloadProvider instrument tests, CtsProviderTestCases
      
      Change-Id: I950dc11f21048c34af639cb3ab81873d2a6730a9
      c147b592
    • Jerry Zhang's avatar
      Split mediaprovider as a separate domain from priv_app · 9f152d98
      Jerry Zhang authored
      MediaProvider requires permissions that diverge from those
      of a typical priv_app. This create a new domain and removes
      Mtp related permissions from priv_app.
      
      Bug: 33574909
      Test: Connect with MTP, download apps and files, select ringtones
      Test: DownloadProvider instrument tests, CtsProviderTestCases
      
      Change-Id: I950dc11f21048c34af639cb3ab81873d2a6730a9
      9f152d98
  13. Dec 13, 2016
    • Jeff Sharkey's avatar
      Partially revert "mediaprovider" SELinux domain. · 52da39d9
      Jeff Sharkey authored
      The new domain wasn't fully tested, and it caused many regressions
      on the daily build.  Revert back to using "priv_app" domain until we
      can fully test and re-land the new domain.
      
      Temporarily add the USB functionfs capabilities to priv_app domain
      to keep remainder of MtpService changes working; 33574909 is tracking
      removing that from the priv_app domain.
      
      Test: builds, boots, verified UI and downloads
      Bug: 33569176, 33568261, 33574909
      Change-Id: I1bd0561d52870df0fe488e59ae8307b89978a9cb
      52da39d9
  14. Dec 12, 2016
    • Jerry Zhang's avatar
      Move MediaProvider to its own domain, add new MtpServer permissions · f921dd9c
      Jerry Zhang authored
      Also move necessary priv_app permissions into MediaProvider domain and
      remove MediaProvider specific permissions from priv_app.
      
      The new MtpServer permissions fix the following denials:
      
      avc: denied { write } for comm=6D747020666673206F70656E name="ep0" dev="functionfs" ino=12326 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:functionfs:s0 tclass=file permissive=1
      
      denial from setting property sys.usb.ffs.mtp.ready, context priv_app
      
      Bug: 30976142
      Test: Manual, verify permissions are allowed
      Change-Id: I4e66c5a8b36be21cdb726b5d00c1ec99c54a4aa4
      f921dd9c
Loading