Commit Graph

1173 Commits

Author SHA1 Message Date
TreeHugger Robot
cb6458173f Merge "Allow sensors daemon to read hardware version files" into oc-dr1-dev 2017-07-22 01:10:38 +00:00
TreeHugger Robot
6e4663fc05 Merge "wahoo: add launch hint to atrace" into oc-dr1-dev 2017-07-21 21:52:04 +00:00
TreeHugger Robot
5cf711293d Merge "Run sensors daemon as system user instead of root" into oc-dr1-dev 2017-07-21 21:11:25 +00:00
TreeHugger Robot
6b071f8e13 Merge "init.hardware.rc: Fix file permissions in persist" into oc-dr1-dev 2017-07-21 19:41:57 +00:00
Brian Duddie
b5e50bed86 Allow sensors daemon to read hardware version files
Permit the sensors daemon to read files in /sys/devices/soc0, which is
used to identify the hardware revision it is running on, so it can
properly handle registry variations.

Addresses these denials (and more which would occur if only the blocked
operations were permitted):

type=1400 audit(2017551.030:4): avc: denied { getattr } for pid=805
comm="sensors.qcom" path="/sys/devices/soc0/hw_platform" dev="sysfs"
ino=50525 scontext=u:r:sensors:s0 tcontext=u:object_r:sysfs_soc:s0
tclass=file permissive=0

Bug: 63857630
Bug: 63901499
Test: confirm denials do not appear on boot, sanity check all sensors
provide data, run sensors CTS
Change-Id: I2ba59a21b22d09af03226d5993d80e1d868bf607
2017-07-21 11:49:52 -07:00
Brian Duddie
b04b13e976 Run sensors daemon as system user instead of root
Grant capabilities and change file permissions to allow the sensors.qcom
daemon to start up as the system user/group, rather than running as
root.

Fixes: 63775281
Test: monitor logcat after reboot, confirm no file open errors. Run
QSensorTest, confirm all sensors provide sane data. Confirm that
IMU calibration can read + write its saved settings. Run sensors CTS.
Change-Id: Ib80ea21900d6af6cd34c82c4a63f50c7e0ac18ff
2017-07-21 11:49:42 -07:00
TreeHugger Robot
220b681c4c Merge "tango_core.te: Allow shell data file access to tango" into oc-dr1-dev 2017-07-21 18:19:36 +00:00
TreeHugger Robot
144a1962a9 Merge "sensors: address selinux denial" into oc-dr1-dev 2017-07-21 18:02:42 +00:00
Tim Murray
bc778abc97 wahoo: add launch hint to atrace
Adds some tracing for the launch hint in the power HAL.

Test: extra trace data confirmed
bug 63913311

Change-Id: I6a207e4a0134650f9d339648a1058ddf5b2e7d9c
2017-07-21 10:37:51 -07:00
Jeff Vander Stoep
a7f3c18a08 init.hardware.rc: Fix file permissions in persist
The following files are new and need their permissions fixed up:
/persist/rfs/msm/slpi
/persist/rfs/mdm/slpi
/persist/rfs/mdm/tn

Addresses:
avc: denied { dac_override } for comm="tftp_server" capability=1
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_read_search } for comm="tftp_server" capability=2
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_override } for comm="tftp_server" capability=1
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_read_search } for comm="tftp_server" capability=2
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_override } for comm="tftp_server" capability=1
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability
avc: denied { dac_read_search } for comm="tftp_server" capability=2
scontext=u:r:rfs_access:s0 tcontext=u:r:rfs_access:s0 tclass=capability

Bug: 63921446
Test: Build and flash. Verify file permissions are correct now.
Change-Id: Id4cbafc345c9019530ce3c6fe4147186947c5c76
2017-07-21 10:32:53 -07:00
TreeHugger Robot
38f652ec50 Merge "Force off display state after doze states." into oc-dr1-dev 2017-07-21 14:53:40 +00:00
Michael Plass
ac26db3405 Merge "Adjust wifi RSSI thresholds for 2017 devices" into oc-dr1-dev 2017-07-21 04:48:28 +00:00
TreeHugger Robot
4e3275a9b7 Merge "init.hardware.rc: set ioprio to realtime for rmt_storage" into oc-dr1-dev 2017-07-21 03:49:40 +00:00
Ranjith Kagathi Ananda
6935ce7f07 tango_core.te: Allow shell data file access to tango
avc: denied { search } for name="tmp" dev="sda45" ino=6782978
scontext=u:r:tango_core:s0:c512,c768
tcontext=u:object_r:shell_data_file:s0 tclass=dir permissive=1

avc: denied { read } for name="includes.txt" dev="sda45" ino=6782980
scontext=u:r:tango_core:s0:c512,c768
tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1

avc: denied { open } for path="/data/local/tmp/ajur/includes.txt"
dev="sda45" ino=6782980 scontext=u:r:tango_core:s0:c512,c768
tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1

BUG=63124901
Test: Tested tango cts

Change-Id: Idb6f1f37070652922924f7f948e7c05d4609f010
2017-07-20 17:06:37 -07:00
Siqi Lin
fc754502a7 Merge changes Id97d7cdf,I8743a2bb into oc-dr1-dev
* changes:
  Allow init.power.sh to change printk console_suspend
  Remove no_console_suspend=1 from kernel command line
2017-07-20 22:37:00 +00:00
Jeff Vander Stoep
d209d46ba1 sensors: address selinux denial
avc: denied { search } for name="soc0" dev="sysfs" ino=49978
scontext=u:r:sensors:s0 tcontext=u:object_r:sysfs_soc:s0 tclass=dir
permissive=0

Bug: 63901499
Test: build and boot. Verify denial no longer occurs
Change-Id: I623b742ec68552921685d18f986ca32d71c090a8
2017-07-20 13:54:12 -07:00
TreeHugger Robot
de5bf7bd6f Merge "label persist partition and grant e2fsck access" into oc-dr1-dev 2017-07-20 20:14:55 +00:00
Siqi Lin
2e0ef591c3 Allow init.power.sh to change printk console_suspend
Bug: 63856769
Test: boot with serial console enabled / disabled
Change-Id: Id97d7cdf6e3093f2b6caaa2c7cd9bfa64a282a98
2017-07-20 13:05:21 -07:00
Siqi Lin
14983536bf Remove no_console_suspend=1 from kernel command line
console_suspend defaults to Y in the kernel and we want
to control it in an init script where we set
console_suspend = Y if serial console is enabled and
console_suspend = N if serial console is disabled.

Bug: 63857173
Test: boot with serial console enabled / disabled
Change-Id: I8743a2bbda0d09596d46b9376c901e854677a0e5
2017-07-20 13:05:21 -07:00
Michael Plass
b36ad11b48 Adjust wifi RSSI thresholds for 2017 devices
Use the same values as for the 2016 devices for now.

Bug: 63892929
Test: manual
Change-Id: Iffa21671249028ff51e114dae12deea77c16ffda
2017-07-20 11:22:56 -07:00
Jeff Vander Stoep
05c1a7083a label persist partition and grant e2fsck access
avc:  denied  { read write } for  p)9 cgLe=2bs`+" name<sda `V=
945(qcg text=u:r:Frck:s0tbkntdpt=u:lb

Bug: 63874026
Test: build and flash, verify no new denials
Change-Id: I4aba660643323f2401963addd73bf674509f8ee0
2017-07-20 10:47:03 -07:00
Michael Wright
2c45c171d8 Force off display state after doze states.
Bug: 63531607
Test: manual
Change-Id: I4f3a863709a970f0fc8682c0a0c3547886e1fd0f
2017-07-20 18:22:02 +01:00
Jeff Vander Stoep
64f5ed4100 init.hardware.rc: set ioprio to realtime for rmt_storage
Setting ioprio to realtime within rmt_stroage requires unnecessarily
granting CAP_SYS_ADMIN, which is a highly privileged superuser
capability.

Having init set ioprio at service launch removes the need for
granting this capability and keeps rmt_storage unprivileged.

Addresses the following errors:
07-20dd 14:21:03.867   824   824 W rmt_storage: type=1400 audit(0.0:4):
avc: denied { sys_admin } for capability=21 scontext=u:r:rmt_storage:s0
tcontext=u:r:rmt_storage:s0 tclass=capability permissive=0
07-20 14:21:03.874   824   824 E rmt_storage: Error setting io priority
to CLASS_RT (1)

Test 1 and 2 below verify that my change results in the intended
behavior. Test 3 is a sanity check to show the state without
granting CAP_SYS_ADMIN and to demonstrate that my change results
in the intended state.

Test: original code with CAP_SYS_ADMIN granted
    # ionice -p <rmt_storage pid>
    Realtime: prio 0
Test: ioprio_set moved to init.rc script
    # ionice -p <rmt_storage pid>
    Realtime: prio 0
Test: original code without CAP_SYS_ADMIN granted (sanity check)
    # ionice -p <rmt_storage pid>
    unknown: prio 0

Bug: 63074582
Change-Id: I9bc660aaca72f3df562e8010bc23c9731f648a9e
2017-07-20 08:17:34 -07:00
Jayachandran C
9882d1d7a6 AU293 drop rebase for IMS and radio related changes
1) Explicitly specify uid, gid and groups needed for cnd Add
CAP_BLOCK_SUSPEND
2) Move sys.ims properties to vendor.ims
3) Remove imscmservice from init as its not used on Pixel

Bug: 63850865
Bug: 63804057
Change-Id: Ie8f0eefa96a21605a63ae5a73e59270866704ed7
2017-07-19 23:49:55 -07:00
Nick Desaulniers
fd52eb310c Revert "init: restart qseecomd once /data is mounted"
This reverts commit 134f509da1.

I'm not sure if the start time of qseecomd has been moving around, but
it seems that this is no longer necessary.

Bug: 37589340
Test: enroll new fingerprints and authenticate with them. FDR should not
  have problems upon reboot.
Change-Id: I0b817143de5f3aa13ac5baabfe3c8a59f0341710
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2017-07-20 06:31:43 +00:00
TreeHugger Robot
4e102dfdcb Merge "THERMAL HAL API 1.0 impl for Wahoo" into oc-dr1-dev 2017-07-20 01:47:09 +00:00
TreeHugger Robot
9f50e56a0d Merge "usb: add idVendor value for configfs" into oc-dr1-dev 2017-07-20 01:38:53 +00:00
Wei Wang
a81f5612fe THERMAL HAL API 1.0 impl for Wahoo
Thermal HAL 1.0 implementation for wahoo

Bug: 36458508
Test: VtsHalThermalV1_0TargetTest pass
Test: Check thermalHAL log
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I88831aec5c388269cb78f8cbd966ecae55f1cff2
2017-07-19 12:44:17 -07:00
Brian Duddie
27efdfcceb Run CHRE daemon as system user instead of root
Bug: 63818298
Test: confirm CHRE starts up, and HAL can communicate with it via
monitoring logcat and running lshal debug
Change-Id: I72f74d66f98266ba1bcd417e5ec61ace4ddb780c
2017-07-18 16:24:14 -07:00
Jie Song
c088662d68 Merge "Add SELinux rules for MDS app" into oc-dr1-dev 2017-07-18 21:41:11 +00:00
Yueyao Zhu
ffb13f69f0 Move AB_OTA_PARTITION vendor to vendor makefiles
Bug: 63802619
Change-Id: Ic67a9c02f6343d0154b7f95cbe7dd5b909ebe25d
2017-07-18 11:36:55 -07:00
Jie Song
b05fb1bb1e Add SELinux rules for MDS app
Bug: 63147021
Test: Verify app can run and access diag interface
Change-Id: I6aaadd5af6508aee8229968636e4f76c8c957d5e
(cherry picked from commit a48092ad06)
2017-07-18 17:00:50 +00:00
TreeHugger Robot
ac31ae9116 Merge "add atfwd service and related policy." into oc-dr1-dev 2017-07-18 14:54:03 +00:00
TreeHugger Robot
d16dc52f4c Merge "Enable console suspend if UART is not enabled" into oc-dr1-dev 2017-07-17 23:35:42 +00:00
TreeHugger Robot
b415efa7a0 Merge "usb: disable L1 LPM" into oc-dr1-dev 2017-07-17 22:30:34 +00:00
seokjeong.hong
19bb7891bf usb: add idVendor value for configfs
From a qualcomm diag composition has idVendor 0x05c6,
the other Google USB composition change does not work properly
That's because this configfs.rc file change only idProduct.

Add Google's vendor id 0x18d1 to each composition.

Bug: 63056085

Change-Id: I2e45fe2176ad4601b23b33edeb5d6dbee5111242
Signed-off-by: seokjeong.hong <seokjeong.hong@lge.com>
2017-07-17 15:20:54 -07:00
Patrick Tjin
f594698be6 Enable console suspend if UART is not enabled
Test: walleye with console enabled -> console_suspend = N
Change-Id: Iea28573dd953408b78787ea17841a80fbdbe9657
2017-07-17 21:28:41 +00:00
Annie Chin
d11be48a17 Merge "Pre-grant READ_EXTERNAL_STORAGE for soundpicker" into oc-dr1-dev 2017-07-17 21:20:34 +00:00
Badhri Jagan Sridharan
82880d2bc2 usb: disable L1 LPM
NAK'ed OUT transfers never complete once the usb controller enters
L1 LPM. The issue was rootcaused to the usb controller not performing
remote wakeup when it enters L1 and a trasaction is queued.
Since, this is entirely controlled by controller's hardware,
disable L1 lpm to prevent transfer failure.

Also, init already has the required sepolicy to write to sysfs nodes.

Bug: 62038982
Test: Transfers happen with Broadwell chromebooks
Change-Id: Ibb13b5b79e1aa6a5d35ddcaffece4ef4942920b7
2017-07-17 20:17:11 +00:00
TreeHugger Robot
cd3b139506 Merge "manifest.xml(wahoo): Add wifi 1.1 package" into oc-dr1-dev 2017-07-17 20:10:45 +00:00
TreeHugger Robot
096c529776 Merge "Restore Camera to perfd communication" into oc-dr1-dev 2017-07-17 19:21:30 +00:00
Roshan Pius
af15698f96 manifest.xml(wahoo): Add wifi 1.1 package
Bug: 63129484
Test: Devices boots up and connects to wifi networks.
Change-Id: I53fc4c52d8c7faff8c9f80c6bf0ba29501597ef6
2017-07-17 11:14:39 -07:00
Annie Chin
06e79629d6 Pre-grant READ_EXTERNAL_STORAGE for soundpicker
Bug: 63355851
Test: N/A
Change-Id: I50b4a41186b5d9cc5e0509b0f968029233392514
2017-07-14 15:29:00 -07:00
Wei Wang
6871dd4a7d Restore Camera to perfd communication
Bug: 63633407
Test: Build
Change-Id: I395e487d1fe0463cfa6034cf7194ffdeb4ad31ca
2017-07-14 13:41:09 -07:00
Philip Cuadra
8d99d9fce3 Merge "Add powerHintAsync functionality" into oc-dr1-dev 2017-07-14 17:02:21 +00:00
Sunny Kapdi
0c2b5e803d Bluetooth: Allow wakelock access to wcnss_filter
Bluetooth driver needs to hold a wakelock while receiving
packets from the UART to make sure that no bytes are lost.

Test: Bluetooth on/off
Bug: 63628397
Change-Id: I8cd6a13921cdc2777c64b0624f544a9548292522
2017-07-13 15:53:04 -07:00
TreeHugger Robot
2e5de1e053 Merge "init.hardware.rc: boost UFS during boot" into oc-dr1-dev 2017-07-13 22:30:03 +00:00
Wei Wang
26b8c377a6 init.hardware.rc: boost UFS during boot
Before:
SystemServer_start            : 4.963   0.14877
SystemUi_start                : 6.4789  0.17614
system_server_ready           : 6.8311  0.17777

After:
SystemServer_start            : 4.8848  0.13089
SystemUi_start                : 6.2907  0.14558
system_server_ready           : 6.6286  0.14705

Bug: 63644084
Test: 50 boot with packages/services/Car/tools/bootanalyze/bootanalyze.py
Change-Id: Icebc7a2e5b223c4749adb6575c52a99ef6c5faa0
2017-07-13 10:19:20 -07:00
Thierry Strudel
c09b928dd2 add atfwd service and related policy.
Bug: 37168913
Test: No more atfwd errors at boot
Change-Id: I8b05bbc33c8d393a9dcaabf4fd554fdfab126989
Signed-off-by: Thierry Strudel <tstrudel@google.com>
(cherry picked from commit a75d65362c8baef5c66e97c79d2840b00ce21bfe)
2017-07-13 15:39:30 +02:00
Adrian Roos
8b6d1c00f3 Merge "wahoo: Enable long-press on AOD to launch Assistant" into oc-dr1-dev 2017-07-13 12:01:45 +00:00