Commit Graph

51 Commits

Author SHA1 Message Date
TreeHugger Robot
6452bcd371 Merge "battery cycle counts: backup/restore + update dumpstate" into pi-dev 2018-04-04 19:45:24 +00:00
Thierry Strudel
fa1279bd6b battery cycle counts: backup/restore + update dumpstate
Tests:
  - pts-tradefed run pts -a arm64-v8a -m PtsHardwareInfoHostTestCases
  - adb bugreport
  - no "avc: denied" on health vendor service
  - cycle count stored in /persist/battery/qcom_cycle_counts_bins

Bug: 72776338
Bug: 77498107
Change-Id: Ia1a58441fff511c60278b5d97806655c34aec610
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2018-04-04 09:23:39 -07:00
Wei Wang
caf274c10e dumpstate: add vendor property dump and fix tzlog timeout
Bug: 77489941
Bug: 77277669
Test: take BR
Change-Id: I037c17ec6ce4f80f86e157ac9b9e0602fa8ecd68
2018-04-02 16:33:44 -07:00
Thierry Strudel
ab8d91f947 dumpstate: dump SRAM & power supply properties
Bug: 74954924
Change-Id: I4e2ba0efaf453d0f713d8859945e61e5f5d9ed8d
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2018-03-21 10:05:14 -07:00
TreeHugger Robot
fecb262b05 Merge "wahoo: dumpstate: dump cpuidle for all cores" into pi-dev 2018-03-20 17:41:33 +00:00
Wei Wang
f3002a2656 wahoo: dumpstate: dump cpuidle for all cores
Bug: 75974794
Test: take BR
Change-Id: Iefb52e369db72621554926e59725b5fa4dc74cd7
2018-03-19 23:14:01 -07:00
Andrew LeCain
8e42ca9426 Add qsee_log to dumpstate
Updating dumpstate to cat /d/tzdbg/qsee_log
Added debugfs_tzdbg selinux security context
Give hal_dumpstate_impl debugfs_tzdbg read permissions

Fixes: 74536221
Test: taimen: adb bugreport, qsee_log in dumpstate_device.txt

Change-Id: If80e665b789125d11a55d2812380aa4b906f10ab
2018-03-19 12:35:37 -07:00
Sooraj Sasindran
86815f4889 enable power anomaly detection
Move connectivity monitor sepolicies to specific policy file
Allow Power Anomaly detector to access  /data/vendor/radio

Fixes below errors

12-28 18:01:37.294 W/ectivitymonitor( 3619): type=1400 audit(0.0:13):
avc: denied { search } for name="radio" dev="sda13" ino=1835015
scontext=u:r:radio:s0 tcontext=u:object_r:radio_vendor_data_file:s0
tclass=dir permissive=0

12-28 18:15:03.838 W/ectivitymonitor( 3621): type=1400 audit(0.0:18):
avc: denied { read } for name="u:object_r:tel_mon_prop:s0" dev="tmpfs"
ino=9592 scontext=u:r:con_monitor_app:s0:c233,c259,c512,c768
tcontext=u:object_r:tel_mon_prop:s0 tclass=file permissive=0

01-10 19:38:17.399   939   939 W rild    : type=1400 audit(0.0:87): avc:
denied { read } for name="u:object_r:tel_mon_prop:s0" dev="tmpfs"
ino=17732 scontext=u:r:rild:s0 tcontext=u:object_r:tel_mon_prop:s0
tclass=file permissive=

add power_anomaly_data.txt to be picked up in bugreport

Test: tested by testing power anomaly detector and connectivity monitor
Bug: 67058502
Change-Id: I8ad45d5e9cedde8f498627f97b35db27dfd2ea28
2018-01-10 19:45:53 -08:00
Ajay Dudani
afebe7283e dumpstate: Add battery type to bugreport & fixup sepolicy am: 22f01a2fa0 am: 7164b2c4d4
am: 4abe1f8534

Change-Id: I2fe52705cdfafbbace79c1745134befd4b5d542a
2017-12-06 02:30:36 +00:00
Ajay Dudani
7164b2c4d4 dumpstate: Add battery type to bugreport & fixup sepolicy
am: 22f01a2fa0

Change-Id: Ic0fa85622c4f0cb0ec77e88a39d05b81fd3c1513
2017-12-06 02:18:19 +00:00
Ajay Dudani
22f01a2fa0 dumpstate: Add battery type to bugreport & fixup sepolicy
Add sepolicy for this operation, and update sepolicy to allow
collecting batteryinfo in bugreport for user builds.

Bug: 70094701, 70094083
Test: Take bugreport, verify battery type is present
Change-Id: Id67776301e2ed39a283a08483ac5eb8125aba96b
2017-12-05 14:36:30 -08:00
Ecco Park
2f79642331 Dumpstate: add the Data.msc in the dumpstate_board.txt
The file will be used to decode the wifi firmware in the bugreport
automatically in the wifi bugbot.

Bug: 69010177
Change-Id: I4db3b99fb704d0646ef3b0b8a31cd1592e165f16
Signed-off-by: Ecco Park <eccopark@google.com>
2017-11-15 01:30:44 +00:00
Wei Wang
4fa2c7c8b8 Add UFS health information into board specific dumpstate
Test: Take bugreport
Bug: 66967195
Change-Id: Id635b64f77d4a6fdc1ace2290f89adfdf86514a7
Merged-In: Id635b64f77d4a6fdc1ace2290f89adfdf86514a7
(cherry picked from commit 0db0037ca1)
2017-10-03 10:21:32 -07:00
Wei Wang
0db0037ca1 Add UFS health information into board specific dumpstate
Test: Take bugreport
Bug: 66967195
Change-Id: Id635b64f77d4a6fdc1ace2290f89adfdf86514a7
2017-10-02 15:32:44 -07:00
TreeHugger Robot
ae53047562 Merge "Collect most recent modem logs" 2017-09-27 18:41:29 +00:00
Jie Song
d303c1509b Collect most recent modem logs
Bug: 64329189
Test: Check number of log files in Bugreport
Change-Id: I71ebb1d2efda324c9de4adadabf4baac1529f202
2017-09-26 10:44:08 -07:00
Wei Wang
8fd5d9eb86 dumpstate: Add UFS debug output to dumpstate_board.txt
Bug: 65848498
Test: adb bugreport
Change-Id: I0df04fdabf085341ba679ffedf06dcdea407e322
(cherry picked from commit 383c58d861)
2017-09-19 15:41:15 +00:00
Wei Wang
383c58d861 dumpstate: Add UFS debug output to dumpstate_board.txt
Bug: 65848498
Test: adb bugreport
Change-Id: I0df04fdabf085341ba679ffedf06dcdea407e322
2017-09-18 22:01:43 -07:00
TreeHugger Robot
bb69407f19 Merge "Add 'vendor.' prefix to a vendor HAL service name" 2017-09-12 06:34:56 +00:00
Maggie White
0f1c9a667d Add easel debug output to dumpstate_board.txt
Bug: 64975902
Change-Id: I6354c1f19d38611cd2c2edf149d35355f6ce99a7
Test: adb bugreport
Signed-off-by: Maggie White <maggiewhite@google.com>
2017-09-01 15:03:24 -07:00
Jaekyun Seok
cc0d522669 Add 'vendor.' prefix to a vendor HAL service 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: Idc995c550657feca5e0f934444a31805bc3538f9
2017-08-31 12:51:25 +09:00
Wei Wang
557d1b3e07 dumpstate: add thermal limit
Also fix time-in-state and cpuidle for BIG core

After CL:
------ cpu0-3 time-in-state (/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state) ------
------ cpu0-3 cpuidle (/vendor/bin/sh -c for d in $(ls -d /sys/devices/system/cpu/cpu0/cpuidle/state*); do echo "$d: `cat $d/name`
------ cpu4-7 time-in-state (/sys/devices/system/cpu/cpu4/cpufreq/stats/time_in_state) ------
------ cpu4-7 cpuidle (/vendor/bin/sh -c for d in $(ls -d /sys/devices/system/cpu/cpu4/cpuidle/sta
------ cpu0-3 thermal limit (/sys/devices/virtual/thermal/cooling_device0/cur_state) ------
------ cpu4-7 thermal limit (/sys/devices/virtual/thermal/cooling_device1/cur_state) ------

Bug: 64406500
Test: Take BR
Change-Id: Id24462c32928f10d18019b33812f6103b4284cf4
2017-08-09 18:08:14 +00:00
Steve Pfetsch
fee56b7311 wahoo: toggle special touch mode when VR mode is active
Bug: 37515573
Change-Id: I5b741323f97f7d4713636a1688f50c9459d2764f
2017-08-02 02:02:32 -07:00
Steve Pfetsch
d668697f69 wahoo: dumpstate: disable dumping of touch sensor data
The ftm4 driver's sysfs command interface is currently too fragile
to read from reliably.

Bug: 64146878
Bug: 63854271
Change-Id: If4a82db1aefc8e1b81e5057ce1e8c187a29ec2af
2017-07-31 17:00:46 +00:00
TreeHugger Robot
6149ab3aea Merge "dumpstate: Add battery cycle count to bugreport" into oc-dr1-dev 2017-07-26 04:37:23 +00:00
Ajay Dudani
38ef8d7082 dumpstate: Add battery cycle count to bugreport
Bug: 63841211
Test: Verify cycle count metrics are present in bugreport
Change-Id: I7c6a3af3ef687c99f88de5ee1c4d7433b618772e
2017-07-25 19:20:13 -07:00
Steve Pfetsch
71dc781941 Add touch sensor readings to Dumpstate
Bug: 63854271
Change-Id: Ibaa42bd977acdd0e68e4fc76db77a0c6023dc2a9
2017-07-24 15:18:59 -07:00
TreeHugger Robot
cc44df863d Merge "Add WiFi Statistics to Bugreport to Wahoo" into oc-dr1-dev 2017-06-22 17:22:23 +00:00
Jayachandran C
86b6fcc8a6 Move /data/misc/radio to /data/vendor/radio as per treble rules
1) Modify the sepolicy to use /data/vendor partition to hold
   vendor radio data.
2) Modify Dumpstate to access /data/vendor for logging.

Test: Basic telephony sanity with radio enforce mode

Bug: 36736902
Bug: 36717606
Change-Id: I1f8f1026189c1262cfe0af251451e0efcc98c7f7
2017-06-21 05:55:21 +00:00
TreeHugger Robot
e32de9dba5 Merge changes from topic 'mdlog_improve_1' into oc-dr1-dev
* changes:
  Increase stop timer for modem logging
  Revert "Stop always on logging when external logging enabled"
2017-06-21 02:02:46 +00:00
TreeHugger Robot
4bad23b439 Merge "Write modem log to the 2nd fd from dumpstate" into oc-dr1-dev 2017-06-21 01:49:25 +00:00
Ahmed ElArabawy
841c4ad431 Add WiFi Statistics to Bugreport to Wahoo
This commit adds some statistics from debugfs to bugreport
this includes the files:
/d/wlan0/power_stats
/d/wlan0/ll_stats
/d/icnss/stats

Bug: 62290986
Test: adb bugreport and inspect the required statistics
Merged-In: Ib65b98935a043542283a645f9760e02ff6935db3

Change-Id: Ib65b98935a043542283a645f9760e02ff6935db3
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2017-06-20 20:50:30 +00:00
Andrew Chant
3b19e99148 Add USB device descriptors to bug report.
Reports product, version, and first 48 bytes of
descriptors.

Test: Took bugreports with and without USB device attached.
With no USB Device:
------ USB Device Descriptors (/vendor/bin/sh -c cd
/sys/bus/usb/devices/1-1 && cat product && cat bcdDevice; cat
descriptors | od -t x1 -w16 -N96) ------
0000000

With USB Device:
------ USB Device Descriptors (/vendor/bin/sh -c cd
/sys/bus/usb/devices/1-1 && cat product && cat bcdDevice; cat
descriptors | od -t x1 -w16 -N96) ------
Mir
0200
0000000 12 01 00 02 00 00 00 40 d1 18 25 50 00 02 03 01
0000020 02 01 09 02 1f 01 04 01 04 a0 32 09 04 00 00 01
0000040 01 01 00 05 0a 24 01 00 01 83 00 02 01 02 0c 24
0000060 02 01 01 02 00 02 03 00 00 00 0d 24 06 03 01 02
0000100 01 00 02 00 02 00 00 09 24 03 02 01 01 01 04 00
0000120 0c 24 02 22 01 02 00 02 03 00 00 18 0d 24 06 23
0000140

Bug: 38327094
Change-Id: I05cb5f6f3895b43b55ab4b1f434bb5b206b3bf4c
Merged-In: I05cb5f6f3895b43b55ab4b1f434bb5b206b3bf4c
2017-06-20 10:09:15 -07:00
Jie Song
a9cb65d25c Write modem log to the 2nd fd from dumpstate
Bug: 33820081
Test: Verify modem logs from bugreport
Change-Id: I0cd0ce8c1a4b2cc3e8a2eeda65b0aa8e1a983fd1
2017-06-19 18:08:38 -07:00
Steve Pfetsch
321cee7e61 wahoo: dumpstate: add touch firmware versions to dumpstate
Bug: 38207199
Change-Id: I2b21f92f64847286a34d7d52a932bd1f825fe000
2017-06-19 10:44:15 -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
Jayachandran C
7723ec091e Move netmgr logging path to /data/vendor as per treble rules
Netmgr logging path changed from /data/misc to /data/vendor

Test: Verified bugreport collecting netmgr logs

Bug: 62504502
Change-Id: Iba7f585597e30d8dfedae5bb2a73a759aeb0c737
2017-06-13 01:30:42 +00:00
Naseer Ahmed
1b59b229c5 wahoo: Add support for display debug data
* Saves display debugfs data in /data/vendor/display
* Update the dumpstate xlog to print the saved data

Bug: 38496103
Change-Id: Ibc3bd97657b9faa74894ad50b01f373403871c94

 Author:    Naseer Ahmed <naseer@codeaurora.org>
 Date:      Tue May 30 17:51:24 2017 -0400
2017-06-07 10:59:14 -07:00
TreeHugger Robot
df94ed1014 Merge "Add soc serial number to bugreport" 2017-06-07 06:35:39 +00:00
Jayachandran C
6030720f1e Fix radio logs not included in bugreport
Made hal_dumpstate_impl to use vendor executables as per treble guidelines

Test: Bugreport and verified radio logs included and no new denials

Bug: 62291820
Change-Id: I4f9f46cd76600e4b083ee6de5c52d495cc17729b
2017-06-02 19:56:36 -07:00
Ajay Dudani
132939e579 Add soc serial number to bugreport
Test: Verified serial number is present in bugreport
Bug: 62305405
Change-Id: Ie06f1a93af1fd3006d57a46c9e6e5fad85433fe1
2017-06-02 19:30:53 -07:00
Steven Moreland
6e8f5ea639 Check handle for nullptr
Test: pass
Bug: 37662706
Change-Id: Ie3ad92a5dc71eeea9aa9a26f0a6f94ae7aca3433
2017-05-23 16:12:32 -07:00
Vinay Kalia
1228761954 Add IPC wakelock information to bugreport
This will help associate local port IDs to service IDs
and cumulative traffic to each port.

BUG: 36859850
Test: Collected bugreport and verified that this information is
      present in dumpstate-board.txt

Change-Id: I07e137b31b7ec158ea38aa6171565dabcd91a52e
2017-05-15 10:02:36 -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
46891afa28 Collect usb type-c logs
This CL makes bugreports to contain logs related to USB port
configuration.

Bug: 36178613
Test: ran adb bugreport and noticed the logs to be dumped.
Change-Id: I1f57cb2f481c7bb1bd108812dfa716f7db04ef1d
2017-04-21 18:29:17 +00:00
Jie Song
df248b7c4c Remove QShrink database file from bugreport
Bug: 37463985
Test: No qdb file in bugreport
Change-Id: If3d6cd8a580b096b8ac321151363e3d49ef3e0d4
2017-04-19 18:07:08 +00:00
Jie Song
a8cc3ddf43 Collect modem always on log
Bug: 36820568
Test: Trigger bugreport when always on is enabled
Change-Id: I6d61a7284b5a5035c68398fad629628e4ad3216c
2017-04-06 15:55:11 +00:00
Jie Song
7c99eaed4a Add QShrink database file in bugreport
Bug: 36779903
Test: Trigger bugreport and check qdb file
Change-Id: Ic3d120c5a6b7bdd5c4e7ec38b327d4368cb615e2
2017-03-31 14:04:05 -07:00
Jie Song
58d80579d9 Add wahoo dumpstate and sepolicy with smlog
Bug: 33820081

Test: Verify dumpstate service running
Change-Id: I2dffdb063aa3291b1c9ee95df903977d6a928d1e
2017-03-30 02:53:48 +00:00
Shawn Yang
136ac6be8d dumpstate clean up
Change-Id: I9983b3ddcca6c6ee954620aefe1358ba1a540b2e
2017-03-14 16:58:38 -07:00