32 Commits

Author SHA1 Message Date
Petri Gynther
906e91433b Adjust for QCOM BT HAL property name changes
Bug: 36513925
Test: Manual Bluetooth test
Change-Id: I492fde56b7f10395869ac32e8d6dd20268ce5230
2018-05-21 17:41:57 -07:00
TreeHugger Robot
ab5ad5f733 Merge changes from topic "oem_functions_for_wahoo" into pi-dev
* changes:
  set usb oem functions to diag,serial_cdev,rmnet_gsi by default
  Set VID/PID for diag functions
2018-03-27 16:48:58 +00:00
Badhri Jagan Sridharan
c5ec9e09d1 Set VID/PID for diag functions
persist.vendor.usb.config stores the vendor specific functions that are
enabled in the target when ro.bootmode is set to usbradio through
the adb command. Since its a persistent property, the oem functions
are persisted once enabled. Alternatively, store the oem functions
in vendor.usb.config. vendor.usb.config is not persisted though.
vendor.usb.config will also reflect the enabled oem functions.

Configurations supported in this CL:
1. diag
2. diag,serial_cdev,rmnet_gsi

This would work irrespective of when ADB is not or not.

Bug: 74603740
Test: Made sure the QXDM recognized wahoo when adb is enabled/
disabled for diag and diag,serial_cdev,rmnet_gsi
Change-Id: Icbbe177e3f8958efc36f67692b9ec935b718fb03
2018-03-23 17:07:46 -07:00
Jaekyun Seok
274196bca4 Namespace ramdump_prop with vendor prefix (2/7)
debug.ramdump.* and persist.sys.crash_rcu should be renamed to
vendor.debug.ramdump.* and persist.vendor.sys.crash_rcu repectively
because they are vendor-specific properties.

Bug: 74266614
Test: succeeded building and tested with taimen
Change-Id: I4d277207b68000160e101456e110656aa483eb83
2018-03-22 18:27:50 +09:00
Jie Song
6c5945b4b7 Correct diag_mdlog_start service name
Bug: 72732633
Test: Start logging
Change-Id: I4fe452829e77ae0e9fd1fa1629a18a9c40d804df
2018-02-02 13:18:31 -08:00
Badhri Jagan Sridharan
5e309b9248 Usb Gadget hal implementation for wahoo
(cherry-pick of commit: e9af4669659c306a9c9b1a1ae3a1313a7631357d)

Bug: 63669128
Test: Tested USB gadget configurations and verified
that they enumerated.
Change-Id: If0f98697488f6c7cfe335d4c292acebaaba6c20f
2018-01-26 22:23:05 +00:00
Mark Salyzyn
0d045dd2c4 STOPSHIP: move sys.vdso reflector to allow "user" builds
Modification of bb267fa16f to
remove restriction to userdebug and eng builds.  Rationalization
is the experiment will continue during public beta releases.

Test: manual, bionic-benchmarks --bionic_xml=vdso.xml
Bug: 70518189
Change-Id: I57e5cdc21569dd32377256d3962e1dc03385f7cb
2018-01-16 12:44:14 -08:00
Mark Salyzyn
bb267fa16f STOPSHIP: sys.vdso reflector for experiments
On userdebug or eng, permit vdso to be enabled or disabled at will to
manage performance experiments on the dogfood population.

ro.debuggable=1 -> permit sys.vdso to maintain an influence over vdso
sys.vdso=false  -> 32 and 64 bit vdso disabled
sys.vdso=32     -> 64 bit vdso disabled
sys.vdso=64     -> 32 bit vdso disabled
sys.vdso=       -> 32 and 64 bit vdso enabled

NB: sys.vdso set to any other value will default to vdso enabled.

Test: manual, bionic-benchmarks --bionic_xml=vdso.xml to confirm.
Bug: 70518189
Change-Id: I839feff206a1404f228a5bdf35fb0c392fd8974a
2018-01-10 19:53:27 +00:00
Jie Song
d78f9a1f87 Fix directory permission issue for modem logging
Bug: 71039120
Test: No permission issue after upgrade
Change-Id: Ide29dc94babc9db97bb85e7a5388954677c2aa10
2018-01-08 17:17:50 -08:00
Kumar Anand
245704da17 wifi: cnss_diag is disabled as default
Do not start cnss_diag as default. cnss_diag can be started to
collect additional logging by launching from Pixel Logger or
from command line (adb shell)

Bug: 70674448
Test: Manual Wifi Test
Change-Id: I351256a3f87ef7e33e5207e97d01de23463abef3
2017-12-14 11:14:39 -08:00
Oleg Matcovschi
a54d493853 wahoo: Change ramdump property names
Avoid using vendor names in properties.

Change-Id: I1d0bc294584daa6910fc778ada05631440d3e707
2017-11-22 09:50:53 -08:00
Petri Gynther
65b1d352b8 Merge "Auto enable/disable persist.service.bdroid.soclog" into oc-mr1-dev am: 97256a503b
am: cc8fa9cf0c

Change-Id: Ic13ef27cd7ca8ff728e40f1dcda530169262a39f
2017-09-27 20:55:11 +00:00
Petri Gynther
640d7d038a Auto enable/disable persist.service.bdroid.soclog
When user toggles the UI developer option:
Enable Bluetooth HCI snoop log
persist.bluetooth.btsnoopenable

also automatically toggle the Cherokee BT SoC debug option:
persist.service.bdroid.soclog

so that we get all necessary BT debug info into HCI logs.

Bug: 37298084
Test: Toggle HCI snoop log developer option, observe values with getprop
Change-Id: Ib0a7086175db8847463f483b9b926151fc09979a
2017-09-26 20:29:30 -07:00
Ecco Park
e3ea723c14 selinux: add the BT logging permission for Pixel logger [DO NOT MERGE]
Denial message:

09-13 18:55:11.249  7554  7577 W libc    : Unable to set property
"persist.service.bdroid.snooplog" to "true": error code: 0x18
09-13 18:55:11.250  7554  7577 E AndroidRuntime: FATAL EXCEPTION:
LoggingService
09-13 18:55:11.250  7554  7577 E AndroidRuntime: Process:
com.android.pixellogger, PID: 7554
09-13 18:55:11.250  7554  7577 E AndroidRuntime:
java.lang.RuntimeException: failed to set system property
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.SystemProperties.native_set(Native Method)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.SystemProperties.set(SystemProperties.java:171)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger$1.onStart(ModemLogger.java:79)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger.lambda$startLogging$0$ModemLogger(ModemLogger.java:186)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger$$Lambda$0.accept(Unknown
Source:6)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
java.util.HashMap.forEach(HashMap.java:1292)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger.startLogging(ModemLogger.java:183)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.service.logging.LoggingService$StartLoggingRunnable.run(LoggingService.java:458)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.Handler.handleCallback(Handler.java:790)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.Handler.dispatchMessage(Handler.java:99)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.Looper.loop(Looper.java:164)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.HandlerThread.run(HandlerThread.java:65)
09-13 18:55:11.251  1147  2530 W ActivityManager:   Force finishing
activity com.android.pixellogger/.ui.main.MainActivity
09-13 18:55:11.257  1147  1206 I ActivityManager: Showing crash dialog
for package com.android.pixellogger u0
09-13 21:38:45.198  2084  2084 W wcnss_filter: type=1400
audit(0.0:1174):
avc: denied { read } for name="timestamp_switch" dev="sysfs" ino=27539
scontext=u:r:wcnss_filter:s0
tcontext=u:object_r:sysfs_timestamp_switch:s0 tclass=file permissive=0

09-13 21:30:50.451  2031  2031 W wcnss_filter: type=1400
audit(0.0:1390): avc: denied { search } for name="diagchar" dev="sysfs"
ino=27213 scontext=u:r:wcnss_filter:s0 tcontext=u:object_r:sysfs_diag:s0
tclass=dir permissive=0

Bug: 37298084

Change-Id: I793b6ee7d712208b3ae685e3c0de59fd2091b763
Signed-off-by: Ecco Park <eccopark@google.com>
2017-09-26 18:01:02 +00:00
TreeHugger Robot
0c7da9766b Merge "Add 'vendor.' prefix to a vendor daemon name" 2017-09-19 04:09:37 +00:00
Ecco Park
98a67963fb selinux: add the BT logging permission for Pixel logger
Denial message:

09-13 18:55:11.249  7554  7577 W libc    : Unable to set property
"persist.service.bdroid.snooplog" to "true": error code: 0x18
09-13 18:55:11.250  7554  7577 E AndroidRuntime: FATAL EXCEPTION:
LoggingService
09-13 18:55:11.250  7554  7577 E AndroidRuntime: Process:
com.android.pixellogger, PID: 7554
09-13 18:55:11.250  7554  7577 E AndroidRuntime:
java.lang.RuntimeException: failed to set system property
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.SystemProperties.native_set(Native Method)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.SystemProperties.set(SystemProperties.java:171)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger$1.onStart(ModemLogger.java:79)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger.lambda$startLogging$0$ModemLogger(ModemLogger.java:186)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger$$Lambda$0.accept(Unknown
Source:6)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
java.util.HashMap.forEach(HashMap.java:1292)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.data.logger.vendor.qct.ModemLogger.startLogging(ModemLogger.java:183)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
com.android.pixellogger.service.logging.LoggingService$StartLoggingRunnable.run(LoggingService.java:458)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.Handler.handleCallback(Handler.java:790)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.Handler.dispatchMessage(Handler.java:99)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.Looper.loop(Looper.java:164)
09-13 18:55:11.250  7554  7577 E AndroidRuntime: 	at
android.os.HandlerThread.run(HandlerThread.java:65)
09-13 18:55:11.251  1147  2530 W ActivityManager:   Force finishing
activity com.android.pixellogger/.ui.main.MainActivity
09-13 18:55:11.257  1147  1206 I ActivityManager: Showing crash dialog
for package com.android.pixellogger u0
09-13 21:38:45.198  2084  2084 W wcnss_filter: type=1400 audit(0.0:1174):
avc: denied { read } for name="timestamp_switch" dev="sysfs" ino=27539
scontext=u:r:wcnss_filter:s0 tcontext=u:object_r:sysfs_timestamp_switch:s0 tclass=file permissive=0


09-13 21:30:50.451  2031  2031 W wcnss_filter: type=1400
audit(0.0:1390): avc: denied { search } for name="diagchar" dev="sysfs"
ino=27213 scontext=u:r:wcnss_filter:s0 tcontext=u:object_r:sysfs_diag:s0
tclass=dir permissive=0

Change-Id: Ia05996c1b6e0969ef6df6ea142271f76445b90e1
Signed-off-by: Ecco Park <eccopark@google.com>
2017-09-14 23:14:51 +00:00
Jaekyun Seok
491d56144b Add 'vendor.' prefix to a vendor daemon name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I519603b13978567b51dbb2bcb866aa088a1646e4
2017-09-14 18:25:52 +09:00
Andrew Chant
dceb04a94f Enable ramdump on debug.htc.ramdump.crash
Enable ramdump on a live system by enabling the
property debug.htc.ramdump.crash.

This property is protected by selinux policy
with the label ramdump_prop.

Bug: 62437259
Test: forced ramdump from Ramdump Uploader app.
Change-Id: Ifa9b7cf22749c0686e7d01ca2a4fc10dbd4b729c
2017-07-06 17:43:43 -07:00
Jeff Vander Stoep
b06c4b445b Move chmod of /dev/diag earlier for sensors access
openat(AT_FDCWD, "/dev/diag", O_RDWR)   = -1 EACCES (Permission denied)

denied { dac_override } for pid=772 comm="sensors.qcom" capability=1
scontext=u:r:sensors:s0 tcontext=u:r:sensors:s0 tclass=capability

Bug: 62955057
Test: build and flash. Denial no longer occurs
Change-Id: I960ff4eeb5afe194751541958a4af33f487e3d3c
2017-06-30 09:50:35 -07:00
Jie Song
b29da9d492 Increase stop timer for modem logging
1. sys.modem.diag.mdlog to start/stop for this boot
2. sys.modem.diag.mdlog_on for status
3. Increase timer of stop logging

Bug: 62489031
Test: Verify with Pixel Logger and Bugreport
Change-Id: I02a230ad29d23c4a302660ceeb7764ccfcba7cc8
2017-06-17 01:24:02 +00:00
Jie Song
9e66aa35d6 Revert "Stop always on logging when external logging enabled"
This reverts commit 7def19e4be.
2017-06-12 18:43:42 -07:00
Shawn Yang
7def19e4be Stop always on logging when external logging enabled
Bug:36691005

Turn off persist.sys.modem.diag.mdlog according the usb.sys.config
state

Test: Manually set usb.sys.config status and check for AOL status

Change-Id: Ia97956cc860173419b264951909890d9e8e60db8
2017-05-19 15:36:19 -07:00
Jie Song
18aecb7cb8 Adding init script and SELinux support for qlogd
Bug: 37115787
Change-Id: I64988953513cd0a7c2e861b5cad5fa6c1c7b9557
2017-05-10 09:27:57 -07:00
Badhri Jagan Sridharan
c595b65d20 Keep sys.usb.state in sync with sys.usb.config
Userspace code expects the same value to be set on sys.usb.state
as sys.usb.config.

Bug: 37491031
Test: verified that the same props are set.
Change-Id: I62246df765d96a3da5529a40fa4a4cff7a5a56ce
2017-05-08 18:04:03 +00:00
Ecco Park
6eaee489a7 Wifi: enable decode mode for cnss_diag local buffer
Currently There is no way to decode firmware offline.
So, it makes sense to enable decode mode for local bufffer by default

Change-Id: I9d3659debd23ff8f214a94aff7fe15ca7ca7c33e
Signed-off-by: Ecco Park <eccopark@google.com>
2017-04-17 09:40:07 -07:00
Ecco Park
9570fb16c7 Enable local_buffer mode of cnss_diag
Bug: 32248316

Change-Id: I0d05425d234d397a3c1fb1c65ba741259d5fb407
Signed-off-by: Ecco Park <eccopark@google.com>
2017-04-11 15:54:14 -07:00
Jie Song
33e42325ff Move logging folder from data to data/vendor
diag_logs
cnss_diag
ramdump

Bug: 36734870
Test: Capture logs and check no SELinux denial
Change-Id: Iff035c2074d54a454ddd1b9e3c025ddbcf7ae40d
2017-04-10 17:25:14 -07:00
TreeHugger Robot
265e0dd79a Merge "Add new type and domain for vendor radio" 2017-04-06 04:29:44 +00:00
Jie Song
21ec03152e Add new type and domain for vendor radio
1. Add radio_vendor_data_file type
2. Add logger_app domain

Bug: 36859102
Test: Verify no security denial
Change-Id: I6c9236a3b2e0b459bf16b2861e7ddfebca3ed9c6
2017-04-05 10:49:30 -07:00
Vineeta Srivastava
93e84f9caf Start port-bridge service when serial_cdev is enabled
Change-Id: I3113c45483893629ea417579b8b04446d2f52808
2017-04-04 00:33:36 +00:00
Badhri Jagan Sridharan
f5d7ba5d43 set_os_desc use to 1 for functions where diag is enabled
Test: Manually verify modem overlay functions for usbradio bootmode
Bug: 31947358
Change-Id: I433ca7a574b9535fc0fe470f7d4a5dec169ba683
2017-03-24 15:45:14 -07:00
Thierry Strudel
4e18dc435b Import common file from device specific directory
Test: boot, basic functionality
Change-Id: I9c07718b481730c3388f99c5e1eff17c9fd75a7b
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-03-04 23:34:45 -08:00