Commit graph

4911 commits

Author SHA1 Message Date
Treehugger Robot
0785c93fef Merge "Escape '.' in com.android.permission" 2020-04-17 20:50:46 +00:00
Rambo Wang
018214dd8e Merge "Add policy to allow EmergencyAffordanceService to dump state" 2020-04-17 15:19:54 +00:00
Martijn Coenen
c3917f0ea9 Merge "Add external_storage properties." 2020-04-16 08:06:53 +00:00
Treehugger Robot
68598f7ff4 Merge "sepolicy: clean up redundant rules around gpuservice" 2020-04-15 18:10:04 +00:00
Yiwei Zhang
3db5a3140f sepolicy: clean up redundant rules around gpuservice
Test: m selinux_policy
Change-Id: I67389253aa3c6071a553e123fa9883cbdb331614
2020-04-15 09:24:16 -07:00
Martijn Coenen
01234d371e Add external_storage properties.
Since these need to be set from a vendor context.

Bug: 152170470
Bug: 153525566
Test: N/A
Change-Id: I2e90ad08fa0a5bd2b4759d92f95d35cec2b316df
2020-04-15 17:30:41 +02:00
Treehugger Robot
e12775e350 Merge "sepolicy: Add a new property for aware iface" 2020-04-15 14:03:53 +00:00
Zim
85d87cfa6e Grant MediaProvider read file access on /mnt/pass_through
It already has read dir access, but was missing file access which
would allow it read /sdcard symlink (/mnt/pass_through/0/self/primary)

Test: adb shell am broadcast -a
android.intent.action.MEDIA_SCANNER_SCAN_FILE
--receiver-include-background -d file:///sdcard
Bug: 153151011

Change-Id: If4d3fa3d96de6dd9672c0c3aa25fb25f196fe295
2020-04-15 09:13:09 +01:00
Roshan Pius
49ff30da83 sepolicy: Add a new property for aware iface
Bug: 153852667
Test: Compiles
Change-Id: I696cd9334ecf5e947e0459910de258bf904eb520
2020-04-14 22:00:59 -07:00
Rambo Wang
25e527634a Add policy to allow EmergencyAffordanceService to dump state
Bug: 152506122
Test: adb shell dumpsys emergency_affordance
Change-Id: I4dcc227ba949a02a0393999c8065f8bd8b981959
2020-04-14 14:54:52 -07:00
Treehugger Robot
951106b990 Merge "Allow traced to create files within /data/misc/perfetto-traces" 2020-04-14 13:34:05 +00:00
Nikita Ioffe
bbdf8e4d95 Merge "Add init.userspace_reboot.started.timeoutmillis property" 2020-04-13 19:14:56 +00:00
Nikita Ioffe
7947d580e3 Add init.userspace_reboot.started.timeoutmillis property
This property controls how much userspace reboot watchdog will wait for
userspace reboot to start before falling back to hard reboot.

Test: builds
Bug: 152803929
Change-Id: I6955e8c94708e7e4161e4f334b03c052d42c0f9f
2020-04-11 02:00:01 +01:00
Ytai Ben-Tsvi
d107a05402 Allow system_server to set audio properties
Defined a new signal intended to allow the system to reboot
the audio/soundtrigger HAL process.

Fixes: 153461865
Test: See main change in topic
Change-Id: I1e4a770670bb1274fa6a23cd0641f2554d4679f7
2020-04-10 15:58:51 -07:00
Luca Stefani
ddcbbd7644 Escape '.' in com.android.permission
Change-Id: I83d7f81855b0facee3a07ad6fd2068e5e114db30
2020-04-10 19:22:50 +00:00
Primiano Tucci
386d95b15f Allow traced to create files within /data/misc/perfetto-traces
Together with aosp/1282157 this change allows the service to
create trace files in the /data/misc/perfetto-traces folder.
Before this change they needed to be created by the perfetto
cmdline client and pass the FD.
This doesn't work for host tools like Android GPU Inspector
(https://gpuinspector.dev/) which talk to the UNIX socket
over adb forward and cannot pass a FD from the host.

Bug: 153519149
Test: manual: adb shell perfetto --txt -c -
  buffers { size_kb: 65536 }
  data_sources {
    config {
      name: "linux.ftrace"
      ftrace_config { ftrace_events: "sched_switch" }
    }
  }
  duration_ms: 5000
  write_into_file: true
  output_path: "/data/misc/perfetto-traces/ttt"

Change-Id: I184329805741654983843e6a29c1fac19a836f59
2020-04-08 19:44:53 +00:00
Inseob Kim
3f5a7d247a Rename exported and exported2 vold prop
This is a subtask to clean up bad context names "exported*_prop".

Bug: 152469526
Test: m
Change-Id: Ie2d4046732e9d6562294fa664dcd7f019aa7c229
2020-04-07 12:56:23 +09:00
Paul Crowley
b9021fcd80 Merge "Vendors may choose dm-default-key options format" 2020-04-07 03:23:57 +00:00
Florian Mayer
6549757914 Merge "Refactor sepolicy to support central mode on user." 2020-04-06 18:39:31 +00:00
Paul Crowley
c115da5968 Vendors may choose dm-default-key options format
Bug: 150761030
Test: setting to 1 in device/google/cuttlefish/shared/device.mk
    causes "default-key: Not enough arguments" as expected.
Change-Id: I73262efff0be15f0295d23168049ed9e3721a7f7
2020-04-06 08:46:08 -07:00
Florian Mayer
356b98d552 Refactor sepolicy to support central mode on user.
Functionally this is a no-op change.

Bug: 152976928
Change-Id: If4c0c6c74e60cc84f4adedfd430b385795cd15eb
2020-04-06 12:33:43 +00:00
Treehugger Robot
15ac2abfd7 Merge "Create surfaceflinger_prop and migrate props" 2020-04-02 22:38:42 +00:00
Robin Lee
e58b2d4cae Allow blank_screen to make binder calls to the servicemanager
blank_screen can not find and use the lights HAL if it cannot use the servicemanager. This
broke turning off the display during shutdown.

Change-Id: I6aff1cb71f805637abc79493ba2574143c5cf7cf
Test: adb root; adb shell setenforce 1; adb shell setprop ctl.start blank_screen
Test: adb logcat -b all | grep 'denied'
Bug: 151363454
2020-04-02 18:40:11 +02:00
Treehugger Robot
fcdb7145c1 Merge "Reduce graphics logspam" 2020-04-02 13:06:35 +00:00
Jeff Vander Stoep
67896eef07 Reduce graphics logspam
There is no change in behavior. These denials were already
being blocked.

Bug: 79617173
Test: build
Change-Id: Iffd1e5ba42854615eeea9490fe9150678ac98796
2020-04-02 13:43:26 +02:00
Inseob Kim
94bae860a9 Create surfaceflinger_prop and migrate props
This is a subtask of removing exported*_prop.

Bug: 152468529
Test: m && boot crosshatch
Change-Id: I9d6ec7ade96a3a53288f23d155cc829c2107bb6f
2020-04-02 11:21:14 +00:00
Jeff Vander Stoep
8c9826ec21 Track another instance of b/77870037
Bug: 77870037
Test: build
Change-Id: I77f5888aaf0fedd07635e301dbc642e3f8749688
2020-04-02 10:17:22 +02:00
Treehugger Robot
cb4138129a Merge "Rename exported2_config_prop to systemsound_config_prop" 2020-04-02 00:24:28 +00:00
Collin Fijalkovich
25e9ff9ddc Merge "Allow Traceur record the mm_event trace event." 2020-04-01 16:57:09 +00:00
Inseob Kim
fd2d6ec3bc Rename exported2_config_prop to systemsound_config_prop
Fixing bad names (exported*_prop) on property contexts.

Bug: 152468650
Test: m sepolicy_tests
Change-Id: Ie98212ee0fa89966e70faa83322b65b613f3b3f5
2020-04-01 18:23:39 +09:00
Florian Mayer
487bf1c5ff Allow incidentd to attach perfetto traces on user.
Bug: 151140716
Change-Id: I821d1a504e6ffcea3a52e2c76bf2290e7b382a48
2020-04-01 10:41:14 +02:00
Treehugger Robot
cdc1a840ea Merge "Ignore the denial when system_other is erased" 2020-03-31 11:52:32 +00:00
Bowgo Tsai
35c2f102f2 Ignore the denial when system_other is erased
This CL addresses the following denial, when the system_other
partition is erased. This happens when 1) the device gets an
OTA update and 2) factory reset to wipe userdata partition.

Note that the system_other partition will be mounted under
/postinstall only in the first boot after factory reset.
Also, system_other.img is only included in the factory ROM and
is absent in the OTA package. When it is absent and userdata
is wiped, the mount will fail and triggers the following denials
when both cppreopts.sh and preloads_copy.sh access /postinstall dir.

SELinux denials to address:
  avc: denied { search } for comm="find" name="postinstall" dev="dm-5"
  ino=44 scontext=u:r:preloads_copy:s0
  tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=0

  avc: denied { search } for comm="cppreopts.sh" name="postinstall" dev="dm-5"
  ino=44 scontext=u:r:cppreopts:s0
  tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=0

Bug: 152453231
Test: fastboot erase system_other (e.g., system_b) and fastboot -w
Change-Id: Ie67f02467d5da51b0caba6e8fda56bc2c6bbc944
2020-03-31 13:58:11 +08:00
Collin Fijalkovich
2d1e4ce577 Allow Traceur record the mm_event trace event.
Bug: 150130660
Test: Took a trace with Traceur and verified mm_event records
were included when the memory category was enabled.

Change-Id: Iea39467d0d37d12a78fbde57b8d9649fad45b652
2020-03-30 16:23:32 -07:00
Peter Collingbourne
e432c093b7 Merge "Update sepolicy to account for crash_dump move." 2020-03-30 19:03:42 +00:00
Howard Chen
c79439f729 Merge "Allow developer settings to query gsid status" 2020-03-27 08:07:12 +00:00
Ram Muthiah
14f1a7f47e Update core sepolicy with neuralnetwork hal
Bug: 152338071
Bug: 145388549
Test: Forrest
Change-Id: I8224c04806db829ef20156d656755f7fc5874e3e
2020-03-26 13:21:46 -07:00
Nikita Ioffe
df8e2672f0 Merge "Use properties for various userspace reboot timeouts" 2020-03-25 20:02:05 +00:00
Zimuzo Ezeozue
c63e10d83c Merge "Grant MediaProvider access to /mnt/media_rw" 2020-03-25 18:40:00 +00:00
Nikita Ioffe
9e6588dc95 Use properties for various userspace reboot timeouts
Test: adb reboot userspace
Bug: 146560409
Change-Id: I62408f0e59622c2dab1245897c3057d02c5716a9
2020-03-25 17:46:45 +00:00
Steven Moreland
91acf22c62 Merge "Add rules for hidl_lazy_test*" 2020-03-25 17:34:50 +00:00
Zim
64011ac697 Grant MediaProvider access to /mnt/media_rw
Copied access from the old mediaprovider.te to the new
mediaprovider_app.te.

Test: MediaProvider can create dirs on /mnt/media_rw/<uuid>
Bug: 151981237
Change-Id: Icdb260d2e76a05a15512a5dd00e08f8ae861dce6
2020-03-25 13:36:06 +00:00
Steven Moreland
e4f0ccf29c Add rules for hidl_lazy_test*
eng/userdebug rules added for integration testing of hidl_lazy_test,
similar to aidl_lazy_test.

This is required in sepolicy since the test requires defining a service
in an init.rc file, and so there needs to be sepolicy for init to start
this service.

Bug: 148114689
Test: hidl_lazy_test
Change-Id: Id6549cbb89b62d3f6de1ae2690ce95c3e8656f66
2020-03-24 18:34:58 -07:00
Ryan Savitski
5f1f1b6a7a perfetto: minor quality of life tweaks
Change 1: when running the "perfetto" binary via "adb shell
perfetto...", ctrl-Cing the host process doesn't propagate the teardown
to the on-device process (which normally should stop the tracing session
immediately). Allow signals adbd->perfetto to resolve.

Change 2: don't print audit logs for a harmless isatty() check on adb
sockets when they're the stderr of a "perfetto" process.

Example denials from the isatty() check (ioctl is TCGETS):

avc: denied { getattr } for path="socket:[244990]" dev="sockfs"
ino=244990 scontext=u:r:perfetto:s0 tcontext=u:r:adbd:s0
tclass=unix_stream_socket permissive=0
avc: denied { ioctl } for path="socket:[244992]" dev="sockfs" ino=244992
ioctlcmd=0x5401 scontext=u:r:perfetto:s0 tcontext=u:r:adbd:s0
tclass=unix_stream_socket permissive=0

Example denial from ctrl-c'ing "adb shell perfetto ...":

avc: denied { signal } for comm=7368656C6C20737663203134343537
scontext=u:r:adbd:s0 tcontext=u:r:perfetto:s0 tclass=process
permissive=0

Tested: patched onto an internal branch, then verified that denials are
        gone on a flashed crosshatch-userdebug.
Change-Id: I1dbe00ea91e3c3377d6e5eab05ad99620e02b965
2020-03-24 21:39:41 +00:00
rickywai
41fffbeefb Merge "Ignore errors that zygote tries to setattr media_rw_data_file dir" 2020-03-24 15:07:27 +00:00
Inseob Kim
27f7af81c3 Fix mismatched types with sysprop_library
Bug: 151879375
Test: m
Change-Id: If962b5c4494117deb2a40acec5ae454a39eb2a92
2020-03-24 00:37:35 +00:00
Alistair Delva
d5a222d75a Merge "Add gnss_device dev_type" 2020-03-23 18:58:59 +00:00
Ricky Wai
037e11b86e Ignore errors that zygote tries to setattr media_rw_data_file dir
Bug: 152043945
Test: No selinux error in boot
Change-Id: Id01377e6b8c7be9103bd1dec3283cf720e6f6af9
2020-03-23 17:13:00 +00:00
Treehugger Robot
7fcb96b7cb Merge "Update core sepolicy with gnss hal" 2020-03-23 09:44:19 +00:00
Sasha Kuznetsov
8d22f9337c Update core sepolicy with gnss hal
Test: n/a
Bug: 152028150
Change-Id: I41989392b3b03a2036fc8c1dbfc87207f9af73ad
2020-03-20 17:55:49 -07:00