Commit graph

3995 commits

Author SHA1 Message Date
Nicolas Geoffray
ee0348e8d1 Merge "Allow installd to scan JARs in /vendor/framework." 2019-03-01 14:44:49 +00:00
David Anderson
753225ce9c Merge "Allow system_server and shell to start gsid on-demand." 2019-02-28 22:08:10 +00:00
David Anderson
64bbf05150 Allow system_server and shell to start gsid on-demand.
gsid is started lazily to reduce memory pressure. It can be started
either via gsi_tool (invoked by adb shell), or by DynamicAndroidService
via system_server.

Bug: 126622385
Test: no denials running "gsi_tool status"
Change-Id: I90a5f3f28fe4f294fb60e7c87a62e76716fbd5c0
2019-02-28 07:54:25 -08:00
Joel Galenson
a92753538f Fix CTS neverallow violation.
Fixes: 126604492
Test: Build userdebug and user.
Test: Test
android.cts.security.SELinuxNeverallowRulesTest#testNeverallowRules129
on userdebug.

Change-Id: I0716e566570114878842644339401331513bae22
2019-02-27 19:33:11 -08:00
Tri Vo
7eb9143e46 Merge "Neverallow app open access to /dev/ashmem" 2019-02-28 00:02:14 +00:00
Tri Vo
c67a1ff8d9 Merge "Decouple system_suspend from hal attributes." 2019-02-27 21:25:27 +00:00
Tri Vo
8b12ff5f21 Neverallow app open access to /dev/ashmem
Apps are no longer allowed open access to /dev/ashmem, unless they
target API level < Q.

Bug: 113362644
Test: device boots, Chrome, instant apps work
Change-Id: I1cff08f26159fbf48a42afa7cfa08eafa1936f42
2019-02-27 21:17:25 +00:00
Nicolas Geoffray
b6591f6652 Allow installd to scan JARs in /vendor/framework.
So it can dexopt these JARs.

Bug: 119800099
Test: DeviceBootTest.DeviceBootTest#SELinuxUncheckedDenialBootTest
Change-Id: I40b25319381654c607e17d6fc61e1a1c6fb0c1f1
2019-02-27 20:23:24 +00:00
Tri Vo
a532088e7f Decouple system_suspend from hal attributes.
System suspend service is not a HAL, so avoid using HAL-specific macros
and attributes.

Use system_suspend_server attribute for ISystemSuspend.hal permissions.
Use system_suspend type directly for internal .aidl interface
permissions.

Bug: 126259100
Test: m selinux_policy
Test: blueline boots; wakelocks can still be acquired; device suspends
if left alone.
Change-Id: Ie811e7da46023705c93ff4d76d15709a56706714
2019-02-26 18:10:28 -08:00
Andreas Gampe
6d5baca452 Sepolicy: Move dex2oat and postinstall_dexopt to private
In preparation for additions that should be private-only, move the
types to private. Both have to be moved as they are dependent.

Bug: 125474642
Test: m
Change-Id: I6a76eba41b036bc6fb83588adbe9d63767d3e159
2019-02-26 13:13:45 -08:00
Andreas Gampe
f77bcdcf57 Sepolicy: Move dac_override checks to private
In preparation for moving other components to private, so that
private-only components can stay private.

Bug: 125474642
Test: m
Change-Id: Iff1ecabc4f45051d06e062b3338a117c09b39ff9
2019-02-26 13:12:05 -08:00
Treehugger Robot
4108c665a1 Merge "Game Driver: allow statsd to ask gpuservice for stats" 2019-02-26 18:26:19 +00:00
Ray Essick
7438ec0497 Allow mediametrics to log records to statsd
to integrate mediametrics' upload scheme into statsd transport/mechanism.

Bug: 118782504
Test: statsd test harness
Change-Id: I95bf4d2a5c257e4b9001d832f775032f4daeb5bb
2019-02-25 20:09:54 -08:00
Hridya Valsaraju
da446bf952 Merge "Fastbootd must be able to erase logical partitions" 2019-02-25 21:54:45 +00:00
Yiwei Zhang
0b4b3e4d60 Game Driver: allow statsd to ask gpuservice for stats
Bug: 123529932
Test: adb shell cmd stats pull-source <GpuStats source ID>
Change-Id: Idbe34b598c611322468d5fe2162311a72175e574
2019-02-25 01:10:49 -08:00
Treehugger Robot
3e7ad0b081 Merge "Add ro.surface_flinger.display_primary*" 2019-02-25 01:02:34 +00:00
Andreas Gampe
4abfe60215 Sepolicy: Move some parts from public to private
Those should not have been public before, but were forced to by
old neverallow rules.

Test: m
Change-Id: If8430b9c8d42b7cbcd28bbfbc79d579c69067edd
2019-02-22 05:11:08 -08:00
Andreas Gampe
63c7b0fa18 Sepolicy: Move dalvik cache neverallow to private
In preparation for additions that should be private-only, move
the neverallows to domain's private part.

Bug: 125474642
Test: m
Change-Id: I7def500221701500956fc0b6948afc58aba5234e
2019-02-22 05:11:08 -08:00
Hridya Valsaraju
1912daf6a9 Fastbootd must be able to erase logical partitions
This CL adds permissions to allow fastbootd to erase
logical partitions.

[   33.423370] c5    587 audit: type=1400 audit(2073228.303:11): avc:  denied  { ioctl } for
pid=587 comm="fastbootd" path="/dev/block/dm-0" dev="tmpfs" ino=25433 ioctlcmd=0x127d
scontext=u:r:fastbootd:s0 tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=0^M
[   33.446927] c5    587 audit: type=1400 audit(2073228.326:12): avc:  denied  { ioctl }
for  pid=587 comm="fastbootd" path="/dev/block/dm-0" dev="tmpfs" ino=25433 ioctlcmd=0x1277
scontext=u:r:fastbootd:s0 tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=0^M

Test: fastboot erase system
Bug: 125391557

Change-Id: I0c99db123ed5357ceb7e16e192042e8e044e3557
2019-02-21 12:36:28 -08:00
Nick Chalko
4ccc8568ec Add sysfs_extcon for /sys/class/extcon
Bug: 124364409
Change-Id: Idc33732454674bbdc7f4ff6eda173acc24e318b3
Test: cherry picked to pi-tv-dr-dev and tested on JBL Link bar
2019-02-21 17:16:34 +00:00
Treehugger Robot
ba1be2c4bb Merge "Allow shell /proc/loadavg access" 2019-02-21 01:32:22 +00:00
Sundong Ahn
88bb57ec88 Add ro.surface_flinger.display_primary*
The ro.surface_flinger.display_primary* properties are added to
property_contexts. Because these properties are located in vendor
partition, but surfaceflinger service which use these properties
is in the system partition.

Bug: 124531214
Test: m -j && boot test
Change-Id: If90c4bc75796d8966bbf3ee2e3bab39145395800
2019-02-21 09:54:13 +09:00
Daniel Rosenberg
f63fe72142 Allow postinstall scripts to trigger F2FS GC
Test: Add checkpoint_gc to postinstall scripts
Bug: 123367711
Change-Id: I24a0bd1c2c2086545f1587765bb9814da24ec7f2
2019-02-20 22:40:53 +00:00
Daniel Rosenberg
46c50683d6 Add Label to f2fs sysfs files
Test: ls -lZ /sys/fs/f2fs
Bug: 123367711
Change-Id: I0035feb8409b7ec8e11510795fb7d8845992694e
2019-02-20 22:40:40 +00:00
Nick Kralevich
28e4b83ec7 Allow shell /proc/loadavg access
Needed for the bionic stdlib.getloadavg test.

Access to /proc/loadavg was inadvertantly removed when a new label was
assigned to that file in system/sepolicy commit
8c2323d3f9.

Addresses the following denial:

  CtsBionicTestCa: type=1400 audit(0.0:188192): avc: denied { read } for name="loadavg" dev="proc" ino=4026531959 scontext=u:r:shell:s0 tcontext=u:object_r:proc_loadavg:s0 tclass=file permissive=0

Bug: 124024827
Test: compiles
Change-Id: Iadb5c98cb96f69ddc9418a64720370adae1bb51f
2019-02-20 13:56:52 -08:00
David Anderson
8bcd43a33e Merge "Add sepolicy for gsid properties, and allow system_server to read them." 2019-02-20 19:49:01 +00:00
Xin Li
0e8a36f38f Merge "DO NOT MERGE - Merge PPRL.190205.001 into master" 2019-02-20 16:25:58 +00:00
Treehugger Robot
21eac99526 Merge "Add permissions required for flashing" 2019-02-20 09:43:23 +00:00
David Anderson
8fe3c74654 Add sepolicy for gsid properties, and allow system_server to read them.
Bug: 123777418
Test: manual test
Change-Id: I9f8c721dfd074e638573d85cf1d8045a69c3854e
2019-02-19 21:08:09 +00:00
Gavin Corkery
2db5015b4c Rename data/staging to data/pkg_staging.
Test: Build and flash, atest apex_e2e_tests
Fixes: 122999313
Change-Id: I2cfa49d8467d67edc470b1cade3746426fa86e37
Merged-In: I2cfa49d8467d67edc470b1cade3746426fa86e37
2019-02-19 15:51:14 +00:00
Hridya Valsaraju
e6c36ef12f Add permissions required for flashing
These are required to handle the following denials:

audit: type=1400 audit(96805.060:7): avc:  denied  { sys_admin } for
pid=517 comm="fastbootd" capability=21  scontext=u:r:fastbootd:s0 tcontext=u:r:fastbootd:s0
tclass=capability permissive=0␍␊

[14:14:36:606] [   11.196190] audit: type=1400 audit(103042.976:10): avc:  denied  { read } for
pid=520 comm="fastbootd" name="by-name" dev="tmpfs" ino=18500 scontext=u:r:fastbootd:s0
tcontext=u:object_r:block_device:s0 tclass=dir permissive=1

Test: fastboot flashall
Bug: 124410201
Change-Id: I80041a78a5b6df09c6526be6a4066eb771887265
2019-02-15 14:45:18 -08:00
Mark Salyzyn
2340f1017a fs_mgr: overlayfs support legacy devices (marlin) Part Deux
am: bd80e63e03

Change-Id: I62e00a260f7367222f9aed1cfd71777f0bdeef46
2019-02-15 13:47:22 -08:00
Mark Salyzyn
bd80e63e03 fs_mgr: overlayfs support legacy devices (marlin) Part Deux
On legacy devices system_<other> partition is blocked from
becoming the backing store under certain circumstances.

Test: system/core/fs_mgr/tests/adb-remount-test.sh
Bug: 120448575
Bug: 123079041
Change-Id: I1803f072ca21bc116554eee1d01a1dbd2c9ed0c9
2019-02-15 15:56:16 +00:00
Alan Stokes
b7d23bc285 Merge "Fix typo in file name."
am: 2379bb7603

Change-Id: I967eb883a468a6d3b9fb29c885254fc3f525b077
2019-02-14 20:21:44 -08:00
Treehugger Robot
2379bb7603 Merge "Fix typo in file name." 2019-02-15 04:16:44 +00:00
Tianjie Xu
79d234f469 Merge "Allow update engine to write to statsd socket"
am: 4dd5976170

Change-Id: I5a702f2c548678ad576c6ec63c7c88468a07dd09
2019-02-14 14:13:40 -08:00
Tianjie Xu
4dd5976170 Merge "Allow update engine to write to statsd socket" 2019-02-14 22:07:11 +00:00
Alan Stokes
9b8b422938 Fix typo in file name.
Test: Builds
Change-Id: I411f0c0f323565d951d4ba8031404171e3c9b364
2019-02-14 16:09:44 +00:00
Pierre Lee
58d87035dc Merge "add hal_bootctl to white-list of sys_rawio"
am: 8292117703

Change-Id: Iea654aedc4f858f025511fa4f6374e5726e6605d
2019-02-13 23:30:47 -08:00
Pierre Lee
30c77c1695 add hal_bootctl to white-list of sys_rawio
VtsHalBootV1_0Target test cases fail on a platform when executing boot control operation.
The cases fail because of hal_bootctl has no sys_rawio permission to do storage IOCTL to
switch boot slot.

Bug: 118011561
Test: VtsHalBootV1_0Target can pass
Change-Id: Idbbb9ea8b76fe62b2d4b71356cef7a07ad4de890
2019-02-13 12:38:22 +00:00
Jeff Vander Stoep
65108cec40 Merge "Radio: allow to read kernel command line."
am: d41721bc41

Change-Id: I3ae9ed53acacffa9db3433dee1b8cfb4e1d85435
2019-02-13 00:22:03 -08:00
Treehugger Robot
d41721bc41 Merge "Radio: allow to read kernel command line." 2019-02-13 08:15:33 +00:00
Paul Lawrence
2d682cf0c7 Merge "Allow restorecon to work on vold_data_files"
am: 07365ec1b4

Change-Id: Ibd769a20eb10241a5ceab05d1887b176f3312e8e
2019-02-12 19:29:18 -08:00
Treehugger Robot
07365ec1b4 Merge "Allow restorecon to work on vold_data_files" 2019-02-13 02:13:31 +00:00
Jeff Vander Stoep
8540c12bd9 Radio: allow to read kernel command line.
Used in:
frameworks/base/telephony/java/android/telephony/TelephonyManager.java file

Fixes: 124210464
Test: sepolicy tests
Change-Id: I239cfa2eabbb14653175b4eb655a78caeea553e3
2019-02-12 23:36:51 +00:00
Paul Lawrence
84e87b8753 Allow restorecon to work on vold_data_files
Bug: 119769411
Test: Compiles with rule needed to fix Wahoo
Change-Id: Ifad4c285815682a107013479850f2a63c894c855
2019-02-12 14:43:08 -08:00
Peiyong Lin
6cac784253 Merge "Add persistent property for SurfaceFlinger color mode."
am: e72b2328ae

Change-Id: Ib5ce919c95b47bc172fc730b7ab5a3cd67a8e4c0
2019-02-12 10:16:44 -08:00
Peiyong Lin
e72b2328ae Merge "Add persistent property for SurfaceFlinger color mode." 2019-02-12 17:58:45 +00:00
Peiyong Lin
4dfc59e5f4 Add persistent property for SurfaceFlinger color mode.
To enable devices to stay in a color mode all the time, add a persistent
property as part of per device configuration.

BUG: 124129486
Test: Build, flash and boot. Verify with internal patch
Change-Id: I45ce25e4f1317911e70a4276df6adc39e7455fed
2019-02-11 17:19:03 -08:00
Yiwei Zhang
30287cfbf1 Merge "Game Driver: sepolicy update for plumbing GpuStats into GpuService"
am: 64c8df4a54

Change-Id: I131d279b503c948d9d894ffcd99eedb0349d9f44
2019-02-11 10:10:09 -08:00