Commit graph

19019 commits

Author SHA1 Message Date
Remi NGUYEN VAN
bd3ab0278b Add MAINLINE_SEPOLICY_DEV_CERTIFICATES to keys.conf
DEFAULT_SYSTEM_DEV_CERTIFICATE is not appropriate as some OEMs may need
to change only the certificates used to generate
plat_mac_permissions.xml for mainline modules.

Test: m, checked output plat_mac_permissions.xml
Bug: 138097611
Bug: 134995443
Change-Id: Ie19130a243db043f432039c54c379f06e60ab6c6
2019-08-07 18:23:47 +09:00
Yifan Hong
bfac74272a Merge "Allow update_engine to read virtual ab feature flag." 2019-08-07 01:01:14 +00:00
Jon Spivack
5fa2d8071b Merge "Allow servicemanager to start processes" 2019-08-06 21:12:07 +00:00
Yifan Hong
20010d199b Allow update_engine to read virtual ab feature flag.
Test: adb shell getprop -Z [the two flags]
Bug: 135752105

Change-Id: I3e0372e969ea0161787c32560a8c40fed2953619
2019-08-05 14:32:15 -07:00
Daniel Norman
95c9b61d3c Merge "Adds new policy for init_svc_debug_prop." 2019-08-02 21:51:17 +00:00
Tri Vo
1e5524eb30 Merge "system_suspend: remove /sys/power/wake_lock permissions" 2019-08-02 17:44:04 +00:00
Daniel Norman
4eca819483 Adds new policy for init_svc_debug_prop.
Used to restrict properties init.svc_debug_pid.*

Bug: 138114550
Test: getprop | grep init.svc_debug_pid  only shows results on root
Change-Id: I0c10699deec4c548a2463a934e96b897ddee1678
2019-08-02 10:27:15 -07:00
Treehugger Robot
2765c29bef Merge "Label /product/lib(64)/* as system_lib_file" 2019-08-02 07:01:39 +00:00
Jon Spivack
839e3db7c7 Allow servicemanager to start processes
Used to lazily start AIDL services.

Bug: 138756857
Test: Manual (using mediaextractor as a test service)
Change-Id: Ia1f2c10072e42d8917985c38500be0955f98b8eb
2019-08-02 00:23:16 +00: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
Tri Vo
3d58603623 Label /product/lib(64)/* as system_lib_file
Bug: 138545724
Test: n/a
Change-Id: Ic707229a04c2484503154110c45f4acb5ff61bd5
2019-07-29 12:39:10 -07:00
Tri Vo
5a5266e74c system_suspend: remove /sys/power/wake_lock permissions
Now that our tools are routed to system_suspend, there is no reason for
system_suspend to write to /sys/power/wake_[un]lock.

Bug: 128923994
Bug: 115946999
Test: boot blueline, no denials from system_suspend
Change-Id: I1097d30c050ce7d88677e07f4aaef07ce78dc958
2019-07-26 11:13:05 -07:00
Greg Hartman
626114424f Allow vendor to configure lmkd properties
BUG: 138399045
Test: Boot cuttlefish. properties set
Change-Id: I3138048e9d13f8c0aee1ad3eb4e761809bafcf1d
2019-07-25 23:06:44 +00:00
Yifan Hong
aff273f672 Merge "Allow charger to read ro.charger.*" 2019-07-25 18:20:22 +00:00
Przemyslaw Szczepaniak
3f233287d5 Merge "Add file contexts for com.android.neuralnetworks APEX package." 2019-07-24 09:12:18 +00:00
Elliott Hughes
c807b3fd8a Merge "Remove perfprofd references." 2019-07-23 23:23:15 +00:00
Andrei-Valentin Onea
72211e36ad Merge "Add rule for platform_compat service" 2019-07-23 14:40:36 +00:00
Treehugger Robot
4fd03ba7b3 Merge "Enable Kernel log from linkerconfig" 2019-07-23 10:27:35 +00:00
Kiyoung Kim
2d5f2e242d Enable Kernel log from linkerconfig
LinkerConfig generator runs from early init, so if there is any warning
/ error then logs can be only found from kernel log. To enable kernel
logging from linkerconfig, specific policy should be added.

Test: m -j && Tested from Cuttlefish
Change-Id: I6c49d7693e0334ae8550891b72bcb04e37c16d89
2019-07-23 13:42:55 +09:00
Yifan Hong
1145be1fc3 Allow charger to read ro.charger.*
Allow charger to read system properties with this prefix
so that charger's behavior is controlled by runtime.

Test: run offline charging on walleye
Bug: 124118169
Change-Id: I4266b2d043a5323b4adbd1636ada46b7e08ca667
2019-07-22 14:32:03 -07:00
Treehugger Robot
386701db0a Merge "fix data/asan/product/lib(64) can't access by platform_app issue" 2019-07-19 23:02:40 +00:00
Wei Wang
0962dd9e91 Merge "Fix: dumpstate HAL service property context" 2019-07-19 19:46:55 +00:00
David Anderson
23ba03fc8d Merge "Allow gsid to create and access loop devices." 2019-07-19 19:35:26 +00:00
Elliott Hughes
132b081ee3 Remove perfprofd references.
perfprofd was never finished, and has been removed.

Test: treehugger
Change-Id: I4fc8aa9b737360a66d89c5be39651284ee2d6ffd
2019-07-19 11:15:12 -07:00
Tom Cherry
aa4af2c082 Merge "Allow domain access r_file_perms for passwd and group files" 2019-07-19 18:00:41 +00:00
Andrei Onea
2bbcc9db89 Add rule for platform_compat service
Bug: 137769727
Test: m
Change-Id: Ib6160a82597198f4a120592293f90ffe1ffb123b
2019-07-19 18:57:11 +01:00
Tom Cherry
da05f1d6b8 Allow domain access r_file_perms for passwd and group files
In b/73062966, we add new AID ranges for each partition that doesn't
yet have them (system, system_ext, odm, product).  We also add group
and passwd files to these partitions to be able to map these AIDs into
human readable user and group names, and vice versa.

All processes should be able to read all users and groups.  We divide
the ranges into non-overlapping regions for each partition and we
namespace the names with the partition name as a prefix.

Allow domain r_file_perms to
/(system|product|system_ext)/etc/(group|passwd).

Vendor and odm passwd and group files already have this access, since
/(vendor|odm)/etc/* is already domain readable.

Example contents:
blueline:/ $ cat /system/etc/passwd
system_tom::6050:6050::/:/bin/sh
blueline:/ $ cat /product/etc/passwd
product_tom::7013:7013::/:/bin/sh

Bug: 73062966
Test: tree-hugger selinux denial during boot test
Change-Id: Ib4dc31778e95e952174e1365497feaf93dca7156
2019-07-19 09:19:23 -07:00
Wei Wang
046c510402 Fix: dumpstate HAL service property context
http://aosp/678384 changed property format

Fixes: 137695210
Test: inject timeout and take BR see dumpstate restarted
Change-Id: Ie24e2d42e92410a935ca4c9364b476d72aa459f3
2019-07-19 15:04:44 +08:00
chunhui.li
233a193462 fix data/asan/product/lib(64) can't access by platform_app issue
FMRadio change from system image to product image, then FMRadio
can't launch
selinux denied log:
avc: denied { open } for path="/data/asan/product/lib64/libfmjni.so"
dev="mmcblk0p35" ino=18 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0
app=com.android.fmradio
solution: label data/asan/product/lib(64) to system_lib_file

Bug: 136974466
Test: launch FMRadio, it can work
Change-Id: Icdfc794cb077b81d550816d2e7779c763604e050
2019-07-19 03:23:47 +00:00
David Anderson
9859aa0a24 Merge "Add selinux labels for /metadata/ota." 2019-07-18 22:42:13 +00:00
Przemyslaw Szczepaniak
a88ea13c1b Add file contexts for com.android.neuralnetworks APEX package.
Test: -
Bug: 137320025
Change-Id: I13b3b86f8176a8fa3ce2ad8a625f991229d29ff9
2019-07-18 09:58:48 +00:00
David Anderson
c1bc87394d Add selinux labels for /metadata/ota.
/metadata/ota will store critical bits necessary to reify
system and vendor partition state during an OTA. It will be accessed
primarily by first-stage init, recovery/fastbootd, and update_engine.

Bug: 136678799
Test: manual test
Change-Id: Ib78cb96ac60ca11bb27d2b2fe011482e64ba0cf8
2019-07-16 13:38:10 -07:00
Roshan Pius
3aa1c1725e sepolicy: Permission changes for new wifi mainline module
Move wifi services out of system_server into a separate APK/process.

Changes:
a) Created sepolicy for the new wifi apk.
b) The new APK will run with network_stack uid (eventually will be moved
to the same process).

Used 'audit2allow' tool to gather list of permissions required.

Note: The existing wifi related permissions in system_server is left
behind to allow the module to be loaded into system_server or
network_stack process depending on device configuration.

Bug: 113174748
Test: Device boots up and able to make wifi connection.
Test: Tested hotspot functionality.
Test: Ran WifiManagerTest & WifiSoftApTest ACTS tests locally.
Test: Will send for wifi regression tests.
Change-Id: Id19643a235bf0c28238f2729926b893ac2025b97
(cherry-picked from c7aa90091e6bec70a31a643cc4519a9a86fb0b38)
2019-07-16 13:30:15 -07:00
Pirama Arumuga Nainar
2d16fef4ce Merge "Revert "Track usbd SELinux denial."" 2019-07-16 01:17:10 +00:00
Kiyoung Kim
8231ac82e5 Merge "Add linker config generator and output file to sepolicy" 2019-07-16 00:32:13 +00:00
Tom Cherry
4c52cedf22 Merge "Allow dumpstate to read /data/misc/logd always" 2019-07-15 23:28:23 +00:00
Treehugger Robot
b74402abe8 Merge "version_policy: avoid fclose a NULL file pointer" 2019-07-15 18:35:47 +00:00
Pirama Arumuga Nainar
98e320b6e0 Revert "Track usbd SELinux denial."
Bug: 72472544
This reverts commit 07efe37c5f.

Reason for revert: The selinux denial is no longer reproducible.

Test: Presubmit builds

Change-Id: I79d18743171315401401c1b06b3f97d837bf500f
2019-07-14 21:05:41 -07:00
David Anderson
17231129ce Merge "Allow fastbootd and update_engine to read from sysfs_dm." 2019-07-12 23:03:41 +00:00
Kiyoung Kim
affa6f323c Add linker config generator and output file to sepolicy
Sepolicy for linkerconfig generator and ld.config.txt file from
generator

Bug: 135004088
Test: m -j & tested from device
Change-Id: I2ea7653a33996dde67a84a2e7a0efa660886434a
2019-07-12 12:32:19 +09:00
David Anderson
53ea513bdf Allow gsid to create and access loop devices.
gsid creates loop devices when it cannot use device-mapper. This can
occur when images are split into multiple files (for example, FAT32) or
when a device is unencrypted, or FBE without metadata encryption. In
addition to accessing /dev/loop-control and loop devices, it also needs
LOOP_SET_DIRECT_IO and LOOP_SET_BLOCK_SIZE to optimize writes.

Bug: 134536978
Test: gsi_tool install works on crosshatch with metadata encryption
      disabled

Change-Id: I3f0aee1d0757e4b299deee74a8c1077846d56292
2019-07-11 16:36:25 -07:00
Brad Ebinger
243ef72edb Rename service from ircs to ircsmessage
ircs is not specific enough. There will be multiple services in the
future with ircsmessage used specificially for  message store.

Test: compile, tests
Change-Id: Ia7d57e6900c733408be26d6520aa46c512229248
2019-07-11 14:09:51 -07:00
Treehugger Robot
3f063ca932 Merge "Remove unused permissions in init." 2019-07-11 20:16:46 +00:00
Steven Moreland
587008a40b Remove unused permissions in init.
There was some plan to use binder from init, but it was abandoned. As
ServiceManager was recently re-written in C++, and as part of a
continued effort to reduce large dependencies in init and make sure it
is reliable, I'm removing these here.

Bug: 135768100
Test: N/A
Change-Id: I12b57709399c87ee25f689b601572b19abf7fb00
2019-07-10 10:23:52 -07:00
Mikael Pessa
25870c05c8 Merge "Give surfaceflinger permission to write perfetto traces" 2019-07-09 21:08:52 +00:00
Treehugger Robot
e4466e8ec7 Merge "Rename audio hal service" 2019-07-09 17:22:21 +00:00
Mikael Pessa
c97ea91e2f Give surfaceflinger permission to write perfetto traces
Test: Manual tests
Bug: 137050898
Change-Id: I00f67a666cbf265950aa9160d82e16bef2b2e423
2019-07-09 17:16:07 +00:00
Justin Yun
87b4b81190 Rename product_services to system_ext
Bug: 134359158
Test: build and check if system_ext.img is created
Change-Id: I395324d369d9467895471f5b62d327fd9b3381dc
2019-07-09 08:57:35 +00: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