Commit graph

13652 commits

Author SHA1 Message Date
Chong Zhang
8e3fef3d2c allow mediaprovider to use media extractor
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
2018-03-19 13:05:24 -07:00
Hector Dearman
6f2040f873 Allow system server to set persist.traced.enable
To enable/disable the traced and traced_probes deamons remotely we would
like system server to be able to set persist.traced.enable.
See also ag/3736001.

Denial:
selinux: avc: denied { set } for
property=persist.traced.enable
pid=1606 uid=1000 gid=1000
scontext=u:r:system_server:s0
tcontext=u:object_r:default_prop:s0 tclass=property_service
permissive=0\x0a

Run:
$ adb shell 'ps -A | grep traced'
Should see traced.
$ adb shell 'settings put global sys_traced 0'
$ adb shell 'ps -A | grep traced'
Should no longer see traced.

Test: See above.
Change-Id: I245b7df3853cabeb0e75db41fb4facaa178ab8f1
2018-03-19 15:48:50 +00:00
Treehugger Robot
8e0b882cd6 Merge "Allow dexopt to follow /odm/lib(64) symlinks." 2018-03-19 07:54:46 +00:00
Bowgo Tsai
88cd813fe2 Allow dexopt to follow /odm/lib(64) symlinks.
Several /odm/* symlinks are added in the following change, to fallback
to /vendor/odm/* when there is no /odm partition on the device.

  https://android-review.googlesource.com/#/c/platform/system/sepolicy/+/638159/

This change allows dexopt operations to 'getattr' those symlinks during
OTA.

Bug: 75287236
Test: boot a device
Change-Id: I2710ce5e2c47eb1a3432123ab49f1b6f3dcb4ffe
2018-03-19 13:29:06 +08:00
Treehugger Robot
c828802643 Merge "Allow only public-readable to ro.secure and ro.adb.secure" 2018-03-18 23:21:34 +00:00
Tri Vo
eecc0ed4eb Merge "netd: silence innocuous denials to /proc and /sys" 2018-03-18 19:50:48 +00:00
Tri Vo
569e22e86f netd: silence innocuous denials to /proc and /sys
Bug: 74586749
Test: build policy
Change-Id: I72a3b7c38eb9030ffac0d2dde23a9ff7c26fd70a
2018-03-16 16:08:34 -07:00
Bowgo Tsai
af7d85f83f Add /odm/etc/selinux/odm_mac_permissions.xml
Bug: 64240127
Test: normal boot a device
Change-Id: I276ba6bc88eabb0d5562e4e96d3860eedb76aed5
2018-03-16 15:45:02 +08:00
Bowgo Tsai
ad6231f546 Add /odm/etc/selinux/odm_hwservice_contexts
Bug: 64240127
Test: normal boot and recovery boot a device
Change-Id: I22d29e8476380d19aca1be359e0228ab6bbc3b0f
2018-03-16 15:44:55 +08:00
Bowgo Tsai
1f717b1001 Add /odm/etc/selinux/odm_property_contexts
Bug: 64240127
Test: normal boot and recovery boot a device
Change-Id: Ibd71219f60644e57370c0293decf11d82f1cb35c
2018-03-16 15:44:48 +08:00
Bowgo Tsai
ecf656b06f Add /odm/etc/selinux/odm_seapp_contexts
Bug: 64240127
Test: normal boot a device
Change-Id: I3626357237cc18a99511f1ebd9dd3ff5a7655963
2018-03-16 15:44:41 +08:00
Bowgo Tsai
bae1517a58 Add /odm/etc/selinux/odm_file_contexts
Bug: 64240127
Test: normal boot and recovery boot a device
Change-Id: I087292fb23d05fc17272778d668ac78a721b2593
2018-03-16 15:44:33 +08:00
Bowgo Tsai
45457e3a2b Add /odm/etc/selinux/odm_sepolicy.cil
This change adds the support of odm sepolicy customization, which can
be configured through the newly added build varaible:
    - BOARD_ODM_SEPOLICY_DIRS += device/${ODM_NAME}/${BOM_NAME}/sepolicy

Also moving precompiled sepolicy to /odm when BOARD_ODM_SEPOLICY_DIRS
is set. On a DUT, precompiled sepolicy on /odm will override the one in
/vendor. This is intentional because /odm is the hardware customization
for /vendor and both should be updated together if desired.

Bug: 64240127
Test: boot a device with /odm partition
Change-Id: Ia8f81a78c88cbfefb3ff19e2ccd2648da6284d09
2018-03-16 15:44:23 +08:00
Jaekyun Seok
62acbce4a2 Allow only public-readable to ro.secure and ro.adb.secure
Bug: 74866333
Test: succeeded building and tested with taimen
Change-Id: Id19fec168ab266e386ea4c710a4c5cedfc4df33c
2018-03-16 04:49:45 +00:00
Treehugger Robot
4eb10d809a Merge "Mark some odm properties as vendor-init-settable" 2018-03-16 01:31:47 +00:00
Treehugger Robot
b4090d79a8 Merge "Init: Enable init to relabel symlinks for recovery_block_device." 2018-03-16 00:41:12 +00:00
Treehugger Robot
e7ceb68a65 Merge "Grant create_file_perms to hal_usb_gadget_server" 2018-03-16 00:29:43 +00:00
padarshr
bc14ee3cd7 Init: Enable init to relabel symlinks for recovery_block_device.
Allow init the ability to relabel recovery block devices. In the case
where we have recovery as a chain partition, due to its presence in
early mount node, init, in first stage itself would require relabel
permissions for the restorecon operation on recovery block device.

Bug: 73642793
Test: On bootup, recovery partition gets the appropriate se-label.
      Perform OTA on non-A/B device with recovery as chain partition,
      now the recovery partition gets upgraded successfully, now that
      it has the correct se-label.

Change-Id: I370c510320e78ab78c9c55573073415b4983d0f6
2018-03-15 14:03:04 -07:00
Bowgo Tsai
a47a1c25af Mark some odm properties as vendor-init-settable
Bug: 64195575
Test: boot a device
Change-Id: I7f7deb5e2c5c6e0a75cf22eb610a7973b5be0d7e
2018-03-15 16:59:29 +08:00
Treehugger Robot
35f6654354 Merge "hal_camera: Allow writing dump info into pipes" 2018-03-15 02:42:38 +00:00
Max Bires
8966b8e53d Merge "Adding ability for priv apps to read traceur fd" 2018-03-14 20:31:26 +00:00
Jaekyun Seok
46bc518c69 Allow vendor-init-settable to ro.enable_boot_charger_mode
vendor-init-settable should be allowed to ro.enable_boot_charger_mode so
that SoC vendors can set its default value.

Bug: 74421250
Test: succeeded building and tested with taimen
Change-Id: I2859aab29fefb7882989413a089b0de55142d2f1
2018-03-13 22:16:55 +00:00
Max Bires
715e2ae383 Adding ability for priv apps to read traceur fd
Only untrusted apps had privilegs to read file descriptors passed in
from traceur, which was an oversight. This fixes the policy so that priv
apps can also access file descriptors from traceur in order to read
reports shared from traceur.

Bug: 74435522
Test: better bug has access to reports shared from traceur
Change-Id: I591872cdac31eec62edbc81d95f1220f1152427f
2018-03-13 21:50:04 +00:00
Treehugger Robot
529ce19708 Merge "Ensure taking a bugreport generates no denials." 2018-03-13 17:54:03 +00:00
Treehugger Robot
722bb479c4 Merge "Add ro.hardware.audio.hearing_aid" 2018-03-13 17:47:09 +00:00
Treehugger Robot
1fab9d8363 Merge changes from topic "bt-a2dp-offload-aosp"
* changes:
  sepolicy: Read access to audioserver for Bluetooth properties
  Bluetooth A2DP offload: Binder call to audio HAL
2018-03-13 02:50:51 +00:00
Treehugger Robot
49c4a4ee35 Merge "Revert "Revert "Move rild from public to vendor.""" 2018-03-12 22:44:38 +00:00
Aniket Kumar Lata
d3d7800469 sepolicy: Read access to audioserver for Bluetooth properties
Provide read/write access to audioserver for Bluetooth
properties used with A2DP offload.

Bug: 68824150
Test: Manual; TestTracker/148125
Change-Id: I40c932d085ac55bc45e6654f966b2c9d244263d0
(cherry picked from commit 041049bc7a)
2018-03-12 13:28:55 -07:00
Sunny Kapdi
bc0c88f37d Bluetooth A2DP offload: Binder call to audio HAL
Add rule to allow Binder call from Bluetooth process to Bluetooth
audio HIDL interface running in audio HAL service process.

Bug: 72242910
Test: Manual; TestTracker/148125
Change-Id: I1981a78bece10b8e516f218d3edde8b77943d130
(cherry picked from commit e8cfac90e8)
2018-03-12 13:28:43 -07:00
Treehugger Robot
1356a75fd5 Merge "Hide denial for wpa_supplicant writing to /data/misc/wifi." 2018-03-12 20:15:40 +00:00
Amit Mahajan
3007344dcd Revert "Revert "Move rild from public to vendor.""
This reverts commit 016f0a58a9.

Reason for revert: Was temporarily reverted, merging back in with fix.

Test: Basic telephony sanity, treehugger
Bug: 74486619
Bug: 36427227
Merged-in: Ide68726a90d5485c2758673079427407aee1e4f2
Change-Id: Ide68726a90d5485c2758673079427407aee1e4f2
(cherry picked from commit 312248ff72)
2018-03-12 13:13:39 -07:00
Jakub Pawlowski
a4b52dba6c Add ro.hardware.audio.hearing_aid
Bug: 69623109
Change-Id: I7d194a3489fc5ff278cef7bebe9bfe6c39d3b2b8
2018-03-12 19:11:09 +00:00
Treehugger Robot
0bbe19a4c6 Merge "Adding /odm support" 2018-03-12 19:00:25 +00:00
Treehugger Robot
463f8545d4 Merge "Revert "Move rild from public to vendor."" 2018-03-12 19:00:17 +00:00
Amit Mahajan
58758dc222 Revert "Move rild from public to vendor."
This reverts commit aed57d4e4d.

Reason for revert: This CL is expected to break pre-submit tests (b/74486619)

Merged-in: I103c3faa1604fddc27b3b4602b587f2d733827b1
Change-Id: I0eb7a744e0d43ab15fc490e7e7c870d0f44e1401
2018-03-12 17:35:17 +00:00
Treehugger Robot
b835b600ab Merge "Move rild from public to vendor." 2018-03-12 17:27:56 +00:00
Treehugger Robot
d4be470981 Merge "Use user policy when checking neverallow rules." 2018-03-12 16:28:20 +00:00
Bowgo Tsai
dd6efea232 Adding /odm support
/odm partition isn't mandatory and the following symlinks will exist on
a device without /odm partition.

  /odm/app ->/vendor/odm/app
  /odm/bin ->/vendor/odm/bin
  /odm/etc ->/vendor/odm/etc
  /odm/firmware ->/vendor/odm/firmware
  /odm/framework ->/vendor/odm/framework
  /odm/lib -> /vendor/odm/lib
  /odm/lib64 -> /vendor/odm/lib64
  /odm/overlay -> /vendor/odm/overlay
  /odm/priv-app -> /vendor/odm/priv-app

This CL allows all domains to access the symlinks, also removes the
Treble compliance neverallows on them because the actual restrictions
should apply to the real path directly.

Bug: 70678783
Test: boot a device
Change-Id: If1522780a13710d8a592272dc688685cbae29f52
2018-03-12 16:22:00 +00:00
Joel Galenson
cc9b30a1cd Hide denial for wpa_supplicant writing to /data/misc/wifi.
It should instead write to /data/vendor/wifi.

Bug: 36645291
Test: Built policy.
Change-Id: Ib7ba3477fbc03ebf07b886c60bcf4a64b954934a
2018-03-12 09:14:38 -07:00
Amit Mahajan
aed57d4e4d Move rild from public to vendor.
Also change the neverallow exceptions to be for hal_telephony_server
instead of rild.

Test: Basic telephony sanity, treehugger
Bug: 36427227
Merged-in: If892b28416d98ca1f9c241c5fcec70fbae35c82e
Change-Id: If892b28416d98ca1f9c241c5fcec70fbae35c82e
2018-03-10 00:10:16 +00:00
Jaekyun Seok
7ff848c5b3 Allow public-readable to persist.rcs.supported
Bug: 74266614
Test: succeeded building and tested on pixel
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true

Change-Id: I926eb4316c178a39693300fe983176acfb9cabec
Merged-In: I926eb4316c178a39693300fe983176acfb9cabec
(cherry picked from commit 9ddba296c8)
2018-03-09 16:49:40 +09:00
Joel Galenson
8c72eea5ff Use user policy when checking neverallow rules.
When building userdebug or eng builds, we still want to build the user
policy when checking neverallow rules so that we can catch compile
errors.

Commit c0713e86 split out a helper function but lost one instance of
using user instead of the real variant.  This restores that one and
adds it to the neverallow check.

Bug: 74344625
Test: Added a rule that referred to a type defined only
in userdebug and eng and ensure we throw a compile error when building
userdebug mode.

Change-Id: I1a6ffbb36dbeeb880852f9cbac880f923370c2ae
(cherry picked from commit 053cb34130)
2018-03-08 09:57:54 -08:00
Treehugger Robot
2dfe2e2937 Merge "/odm is another vendor partition other than /vendor" 2018-03-07 23:54:31 +00:00
Joel Galenson
fa793deab6 Track platform_app SELinux denial.
This should fix presubmit tests.

Bug: 74331887
Test: Built policy.
Change-Id: Ie9ef75a7f9eaebf1103e3d2f3b4521e9abaf2fe7
(cherry picked from commit 2995e996b9)
2018-03-07 20:56:23 +00:00
Treehugger Robot
d83fd93f25 Merge "Add secure_element_device" 2018-03-07 20:55:42 +00:00
Treehugger Robot
6caaf84fe3 Merge "Clean up bug_map." 2018-03-07 20:54:42 +00:00
Joel Galenson
e2bfdd329d Clean up bug_map.
Remove a fixed bug from bug_map.

Bug: 62140539
Test: Built policy.
Change-Id: I2ce9e48de92975b6e37ca4a3a4c53f9478b006ef
(cherry picked from commit f3f93eaf1d)
2018-03-07 10:56:34 -08:00
Jiyong Park
2f1015512d /odm is another vendor partition other than /vendor
Sub directories under /odm (or /vendor/odm when there isn't an odm
partition) are labeled so that artifacts under the sub directories are
treated the same as their counterpart in the vendor partition.

For example, /odm/app/* is labeled as vendor_app_file just like
/vendor/app/*.

Bug: 71366495
Test: m -j

Change-Id: I72a14fd55672cd2867edd88ced9828ea49726694
2018-03-08 03:32:45 +09:00
Treehugger Robot
eef90a3593 Merge "Enabling incidentd to get top and ps data." 2018-03-07 18:25:27 +00:00
Ruchi Kandoi
ea3cf0007e Add secure_element_device
Test: eSE initializes at boot
Bug: 64881253
Change-Id: Ib2388b7368c790c402c000adddf1488bee492cce
2018-03-07 16:37:24 +00:00