61 Commits

Author SHA1 Message Date
Michael Bestas
0e0aebdeef dumpstate: Don't dump serial number
Change-Id: I575db41209d3a5f8088f7388089650a265107b65
2024-06-08 22:08:34 +08:00
Kelly Rossmoyer
dcbdedea88 dumpstate: add key timestamps to power dump
This change adds two key timestamps to the power stats section of
dumpstate_board.txt: the time at which the device was booted and the
current time immediately prior to capturing the power stats.  It also
refactors the lines of code for dumping power stats into a
self-contained function to improve code maintainability.

Currently, because the process of generating a bugreport takes several
minutes, there is significant uncertainty about the temporal
relationship between the bugreport timestamp and the time at which the
power stats were captured.  Also, boot time is reverse-engineered -
again, with an unhelpful degree of uncertainty - by combining the
bugreport timestamp with uptime.  Generating these two timestamps
immediately prior to capturing live power stats will allow
identification of the onset times of key subsystem-related power issues
with much more precision than is currently possible.

Bug: 143312304
Test: Built userdebug and user builds, installed and tested by
generating a bugreport and verifying the new content was present.

Change-Id: Ie92a6e1f8e6088939819738bcff8cd9a0106f5a8
2019-10-25 00:29:21 -07:00
Josh Hou
5f08124b04 Merge "Add OMADM logs to the bugreport" 2019-10-08 00:39:51 +00:00
Steven Moreland
9b959cb514 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iba2cd20b8b20fac3e7564de6b853b475fd4ebd2a
2019-10-02 12:49:15 -07:00
Josh Hou
d8e64d139e Add OMADM logs to the bugreport
Allow OMADM to access data/vendor/radio

Fix below avc denied errors

08-23 14:45:16.080   624   624 E SELinux : avc:  denied  { find } for service=isub pid=4274 uid=10156 scontext=u:r:omadm_app:s0:c156,c256,c512,c768 tcontext=u:object_r:radio_service:s0 tclass=service_manager permissive=0

08-23 14:58:13.443  6623  6623 I auditd  : type=1400 audit(0.0:26): avc: denied { create } for comm="ConnectivityThr" scontext=u:r:omadm_app:s0:c131,c256,c512,c768 tcontext=u:r:omadm_app:s0:c131,c256,c512,c768 tclass=udp_socket permissive=0 app=com.android.omadm.service

08-23 14:58:34.770  6623  6623 I auditd  : type=1400 audit(0.0:28): avc: denied { write } for comm="IntentService[D" name="dnsproxyd" dev="tmpfs" ino=25468 scontext=u:r:omadm_app:s0:c131,c256,c512,c768 tcontext=u:object_r:dnsproxyd_socket:s0 tclass=sock_file permissive=0 app=com.android.omadm.service

08-23 16:15:43.770  6742  6742 I auditd  : type=1400 audit(0.0:27): avc: denied { write } for comm="ConnectivityThr" name="fwmarkd" dev="tmpfs" ino=26777 scontext=u:r:omadm_app:s0:c123,c256,c512,c768 tcontext=u:object_r:fwmarkd_socket:s0 tclass=sock_file permissive=0 app=com.android.omadm.service

08-23 16:16:06.506  6742  6742 I auditd  : type=1400 audit(0.0:35): avc: denied { connectto } for comm="IntentService[D" path="/dev/socket/dnsproxyd" scontext=u:r:omadm_app:s0:c123,c256,c512,c768 tcontext=u:r:netd:s0 tclass=unix_stream_socket permissive=0 app=com.android.omadm.service

Bug: 119871368
Test: Verify OMADM log can be added to the bugreport and avc denied
issues were fixed

Change-Id: Ie043bd4b90da865a39624956324abd7b7c11cb5a
2019-09-18 21:09:49 +08:00
Benjamin Schwartz
cd8389676d Dumpstate: Improve IPC logging on Pixel 2
Dumpstate on the Pixel 2 currently does not output all of the IPC logs,
which are needed to debug some kernel wakelock issues.

dumpstate_board.txt will now contain the following new sections:
* ipc-servers - contains the contents of /d/msm_ipc_router/dump_servers
* ipc-logs - contains the contents of /d/ipc_logging/*_IPCRTR/log

Bug: 121033207
Test: Ran "adb bugreport" and visually inspected dumpstate_board.txt
Change-Id: Ic5c20e593634c5de7fe7887dbcc6c21e902ea12e
2018-12-19 10:05:17 -08:00
Jie Song
0878ca9d79 Collect mdlog trace and status in Bugreport
Bug: 72712518
Change-Id: Id6701ddc4fde18bade8acd6cbada1b116ee6455d
2018-11-08 20:13:40 -08:00
Minchan Kim
e11ea911bc dump mm_event trace into bugreport
This patch creates a pixel owned tracing instance apart from
main tracer(i.e., /d/tracing/instances/pixel-trace) so that
we will keep a certain mount of data without interference from
others(e.g., traceur, atrace and so on). It's important to not
lose the information to investigate problems at bugreport.

This CL also adds dumpstatez and bugreport property hooks to
stop/restart the trace during bugreport to keep more old trace.

Allow dumpstate read mm_event trace from /d/tracing/instances/
pixel-trace/trace. With that, it could dump the trace into
bugreport file.

Bug: 116825025
Test: confirm with adb bugreport/bugreport via power menu shortcut/
volume up/down/power key combination. They includes traces in
dumpstate_board.txt with kernel turns on CONFIG_MM_EVENT_STAT.
Signed-off-by: Minchan Kim <minchan@google.com>

Change-Id: I699f362089b61247b2937accbd331327563b1e0c
2018-10-31 04:53:59 +00:00
Steven Moreland
55a509b643 Make dumpstate HAL lazy.
Bug: 78509314
Test: HAL isn't running
Test: adb bugreport HAL runs
Test: HAL isn't running after bugreport finishes
Test: can adb bugreport again
Test: HAL isn't running after 2nd bugreport finishes
Test: manually inspect state using `lshal` and logs
    using `adb logcat | grep android.hardware.dump`
Change-Id: Ib4917807aea9b8359094bc83e972d559546f649b
2018-05-03 13:47:44 -07:00
Wei Wang
15730af3e9 dumpstate: add interface into rc file
Bug: 77489941
Test: Build
Change-Id: I614014b31e1f5301a42bf85573f9f7495626ac33
2018-04-23 17:24:10 -07:00
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