Commit Graph

134 Commits

Author SHA1 Message Date
Yi Jin
908c02f5c1 Add kernel version to incident report
Bug: 110230810
Test: atest incidentd_test
Change-Id: I502b34f23d61a7346d79ff0dc378add8461d2d27
2018-06-22 16:51:40 -07:00
Kevin Chyn
95d628ef86 1/n: Move fingerprint-service related code to biometrics/fingerprint
Bug: 109900227

Test: builds
Change-Id: I973c816d75c48ed838c1638c45d728b9df4d11ef
2018-06-19 16:09:06 -07:00
Kweku Adams
e04ef777c1 Treating all FileSection files as device specific.
Arc++ devices don't have the /d/wakeup_sources file. There's a chance
other device won't have it either, and there may be other files that we
thought were standard but are actually not, so it's safer to just assume
that not every file will be available on every device and not treat a
missing file as an error.

Bug: 110109543
Test: atest incidentd_test
Change-Id: Ief09427f08d18aee611d057ddafdb9a3466744db
2018-06-13 12:46:12 -07:00
TreeHugger Robot
4837c7c0c0 Merge "Remove ro.retaildemo.video_path from proto" 2018-05-17 01:08:35 +00:00
Kweku Adams
3d16091dd2 Adding batterystats history to proto dump.
It will only print out a dump for userdebug or eng builds.

This is the same change as the pi-dev one (http://ag/3909863), but due
to changes in master, that change has a merge conflict, so I have to
create a separate CL for master.

Bug: 77727638
Test: it builds
Change-Id: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
2018-05-07 17:57:42 -07:00
Yi Jin
3f3603587c Add a section flag to bypass failure if a specific path can't be found.
This is a temporary solution to bypass failure of reading cpu info or
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.

Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
2018-05-01 16:25:52 -07:00
Christine Franks
3732811822 Remove ro.retaildemo.video_path from proto
Bug: 78063111
Test: n/a
Change-Id: I1501959df58d4aab5b906b26738afc2e3bc5958f
2018-05-01 16:13:53 -07:00
Tej Singh
abdf6e8039 Merge "Enforce dump permission in stats service" into pi-dev 2018-04-17 01:34:47 +00:00
Tej Singh
dd83d70371 Enforce dump permission in stats service
Enforces the dump permission in stats service and fixes a typo in an
enum name.

Bug: b/77723108
Test: adb shell dumpsys stats as root and not root
Test: build success on marlin (and cts build success)
Change-Id: I131f97fe4fd370d50bc4ad369377f6adcca5f6ae
2018-04-16 15:04:28 -07:00
Kweku Adams
6d49896324 Merge "Setting stack traces to EXPLICIT." into pi-dev 2018-04-12 17:23:17 +00:00
TreeHugger Robot
4738c7d0ab Merge "Cleaning up frameworks protos." into pi-dev 2018-04-12 09:55:45 +00:00
TreeHugger Robot
4e0fc234d9 Merge "Turning print proto dump back on." into pi-dev 2018-04-12 01:02:17 +00:00
Kweku Adams
21b8d26084 Cleaning up frameworks protos.
Note: It is currently only safe to renumber the fields because we have
not started using them yet.

* animationadapter: added in http://ag/3709688, but was not following
the indentation policy or the unit naming policy. The durations that
have documentation in
frameworks/base/services/core/java/com/android/server/wm/ state that
they're in milliseconds. These durations didn't have documentation, but
I'm assuming they're in the same units.
* batterystats: was not following the indentation policy
* jobscheduler: AppIdleController was removed in http://ag/3699210 and
the proto was only partially updated
* powermanagerservice: BatterySaverStateMachineProto added in
http://ag/3763026 but was not privacy tagged and the indentation was off
* surfaceanimator: was not following the indentation policy
* remote_animation_target: was not following the indentation policy
* others: weren't following the indentation policy

Bug: 74975371
Test: flash device and run 'test CtsIncidentHostTestCases'
Change-Id: Id012f4690b1d58816fef096523e1a0ea2bccadb0
2018-04-11 16:55:33 -07:00
Kweku Adams
ef72895a48 Updating BatteryStats to account for Ambient Display sipper.
The sipper was added in http://ag/3667626 but BatteryStats wasn't
updated to properly output the data.

Bug: 77877717
Test: flash device and check batterystats output
Change-Id: Ibf98545a147f2d62dd29c57dd7efa14ed4c58aa6
2018-04-10 18:24:41 -07:00
TreeHugger Robot
e0dfebcce3 Merge "Turning on proto dumping for stack traces." into pi-dev 2018-04-06 20:41:01 +00:00
Yi Jin
ad3e6e5d5a This cl tries to fix cts tests IncidentdTest
1. Disable BatteryType section which is device-specific
2. Make timeout longer since meminfo section timedout in test
3. make some negative values sint
4. varint can be 64 bits, there is a bug implicitly convert it to 32
which loses values.
5. Found another bug which failed to read 64 bits varint, create a
native test to make sure it works.

Bug: 77291057
Test: atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdTest
Change-Id: I04cc730741f7901f37ac57a11af7777d57118a23
2018-04-04 16:29:55 -07:00
Kweku Adams
39cb92086f Turning on proto dumping for stack traces.
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: I009a2ef07a47431d4af1c0b59c49634946c96710
2018-04-03 18:29:40 -07:00
Kweku Adams
995db766b9 Turning print proto dump back on.
Bug: 72570451
Test: flash device
Change-Id: I605a49b2aad602e2bf7add5688cce40986547f7d
2018-04-03 17:12:51 -07:00
Kweku Adams
cee85f1b16 Setting stack traces to EXPLICIT.
After some discussion, we've decided to set these to EXPLICIT.
Bug: 72177715
Test: N/A

Change-Id: Ia118ce3ba4f8ec7e643f6759e99cd32721150756
2018-04-03 17:11:26 -07:00
Kweku Adams
03a73cd40f Disabling print dumping for now.
Also updating privacy tags.

Bug: 72570451
Bug: 74975371
Test: Android builds
Change-Id: Ia1e6a5d0f5e4f141154fc5346bff432149c9123e
2018-04-02 15:03:28 -07:00
TreeHugger Robot
75c4f589b9 Merge "Enable Last Kmsg, also fix the GZipSection test." into pi-dev 2018-03-30 14:54:55 +00:00
Yi Jin
c858e2781c Enable Last Kmsg, also fix the GZipSection test.
Bug: 73354384, 76208934
Test: atest incidentd_test and manual as well
Change-Id: I074027f4d972686ae3e9415b50e4d3967f6a2355
2018-03-29 18:44:54 -07:00
Yi Jin
e5e2a75e8e Add more privacy tags.
Bug: 74837756
Test: manual
Change-Id: I8993ae736df171f379aa6e24e865a6fbace9d091
2018-03-29 20:35:17 +00:00
Yi Jin
c36e91dd12 Found out it is not possible to exec procrank as non-root/shell.
But it is ok to disable procrank since the information can be obtain via
dumpsys meminfo

Optimize the code style a bit.

Bug: 72510307
Test: atest incidentd_test
Change-Id: If06201aa708461b569d9fb007f20d1e51342d5c2
2018-03-27 15:01:20 -07:00
TreeHugger Robot
dcccfd9742 Merge "ScheduledJobStateChanged: add stop reason" into pi-dev 2018-03-22 01:30:52 +00:00
TreeHugger Robot
32ca41d028 Merge "Remove am/wm.proto which is redundant. The naming convention is defined in core/proto/README.md" into pi-dev 2018-03-21 21:24:19 +00:00
Yi Jin
6c6e9cab42 Remove am/wm.proto which is redundant. The naming convention is defined
in core/proto/README.md

Bug: 72474563
Test: make sure the Android build
Change-Id: I2a90cbb6bb0b0c62fe4a0b81cb5bb3ea36381871
2018-03-20 17:39:32 -07:00
Yi Jin
3578634350 Disable app_stacks and last_kmsg until they get selinux permissions.
Bug: 73487276
Test: atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdIsolatedTest
and atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdTest

Change-Id: Ifc0813d59c243a1b4afa150bbcfa4b072a044ffc
2018-03-20 16:00:50 -07:00
Tej Singh
33a412b52d ScheduledJobStateChanged: add stop reason
Adds stop reason to scheduled job state changed

Bug: b/71755130
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testScheduledJobState
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.JobSchedulerIncidentTest
Change-Id: Ic29a5e9160ac258140a52d31bc6210300949545d
2018-03-20 11:20:58 -07:00
Tej Singh
eee317b7b6 Atoms: Mobile Connection
Atom definitions for MobileConnectionStateChanged and
MobileRadioTechnologyChanged

Also cleans up batterystats.

Bug: b/72320589
Test: verified logs appear in adb logcat -b stats
Change-Id: I9feb258cf6dd4a8c8bf1cffc9566b5d0a851a9fa
2018-03-19 09:48:22 -07:00
Yi Jin
163967fe8e Fix privacy tags based on PWG review meeting.
1. Remove unnecessary hex_hashs.
2. Make intent extras LOCAL
3. Make mnc EXPLICIT
4. Make diskstats error AUTO since it is only IOException.

It is safe to modify proto numbers since they are not used yet.

Bug: 74837756
Test: flash the changes and call incident -d, also updated go/irpf
Change-Id: Idee0e927515e737c9a42a1dc29cb3c05e6d91ca9
2018-03-15 18:31:36 -07:00
TreeHugger Robot
9d06b10205 Merge "Removing EXPLICT tag from Batterystats metric names." into pi-dev 2018-03-09 21:17:36 +00:00
TreeHugger Robot
df9737d286 Merge "Documenting some core proto style conventions." into pi-dev 2018-03-09 05:15:28 +00:00
Kweku Adams
89b3202d62 Documenting some core proto style conventions.
Bug: 74206433
Test: Android builds
Change-Id: I90ec796b9a06fdfd9cf1f6d69f217b636472c590
2018-03-08 17:26:47 -08:00
Kweku Adams
eadd123d68 Dumping stack traces to proto.
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: Id2a15e0fc62b66efe875949af97f0eb651c7e322
(cherry picked from commit 5c804e2b98)
2018-03-07 21:50:12 +00:00
Kweku Adams
bbfadc7234 Removing EXPLICT tag from Batterystats metric names.
Offline discussion says these should be kept as AUTO.

Bug: 74351260
Test: N/A
Change-Id: I5dd74b54da4582d31b610abb025558e819b60654
(cherry picked from commit 2a09222c8b)
2018-03-07 21:41:23 +00:00
Yi Jin
2b30f32212 Rename dumpsys protos to make platform proto names consistent.
All the other dumpsys use XXXServiceDumpProto or XXXDumpProto other
than ones modified here.

The name convention is if the proto describes the top level output of dumpsys,
it should contain `Dump`. This makes the consumer easy to understand the proto
is from dumpsys of a certain service, not data structure of
the service, e.g. WindowManagerServiceProto ->
WindowManagerServiceDumpProto.

Another change here is ActivityManagerService has 4 sub dump protos, so
the top level for each one should be a DumpProto instead of its internal
data struture, e.g. ActivityStackSupervisorProto will just be a field of
AmServiceDumpActivitiesProto, which `dumpsys --proto activities` used to
output ActivityStackSupervisorProto directly.

Bug: 72474563
Test: manual and CTS tests
Change-Id: I1e1ac032d27591083bb5b1b19aac82804215472a
2018-02-28 10:31:54 -08:00
TreeHugger Robot
ec98448f15 Merge "Implement a new section to attach LAST_KMSG to incident report This section simply gzip a large file and stores result in GZippedFileProto" 2018-02-28 03:02:16 +00:00
Yi Jin
1a11fa1097 Implement a new section to attach LAST_KMSG to incident report
This section simply gzip a large file and stores result in GZippedFileProto

This greatly improves the size, before gzip, the last kmsg size ~500KB,
after gzip the proto size is ~60KB.

Bug: 73354384
Test: atest incidentd_test and manual on device test
Change-Id: I9bfc2cf07384487671edbffb5f0bd8495608fea6
2018-02-27 11:36:29 -08:00
Tej Singh
4029831e36 Atom: TemperatureReported
Makes the temperature reported atom pulled, and adds CPU, GPU, and SKIN
temperatures. Pulls information from the thermal hal.

Test: CTS test on cl in this topic
Change-Id: I0a8e2d1135bdd77e1cc510f24ff5214ce9e14ead
2018-02-26 20:55:26 -08:00
TreeHugger Robot
5e589b7fec Merge "Add HighAtomic to pagetypeinfo, and don't fail if a header can't be found in proto definition." 2018-02-21 21:42:35 +00:00
Kweku Adams
b78430e107 Updating batterystats report version.
http://ag/3607190 changed the value of DATA_CONNECTION_OTHER, which
breaks parsing, so we need to update the report version.

Deferred job metrics added in http://ag/3628360.

Bug: 67013665
Bug: 70297451
Test: N/A
Change-Id: I3361733b10fb55b75d4ce618d8a87ab8c92e5836
2018-02-20 18:12:46 -08:00
Yi Jin
6bd2f25f19 Add HighAtomic to pagetypeinfo, and don't fail if a header can't be
found in proto definition.

Bug: 73656242
Test: atest incident_helper
Change-Id: Ib89b1a9189445a0598ec5da0c32046f75de3b0c5
2018-02-20 15:06:32 -08:00
TreeHugger Robot
9ed8ec9b49 Merge "Put metadata or stats into each dropbox incident report." 2018-02-15 20:42:00 +00:00
Yi Jin
329130b7e4 Put metadata or stats into each dropbox incident report.
Bug: 65451198
Test: atest incidentd_test
Change-Id: Ib406b177ad7f1b4bda7fef2e606fc66a9836e060
2018-02-14 16:12:57 -08:00
Yi Jin
51d4c54eba Make the platform proto naming consistent, Part 1
Change proto names in incident_helper

Bug: 72474563
Test: atest incident_helper_test
Change-Id: Ia416ef9726a19d247e62d7de1028874408ec53f1
2018-02-13 18:05:32 -08:00
Philip P. Moltmann
e26406bc52 Add privacy tags to print dumping
Test: incident_report print, dumpsys print
Change-Id: I96384c2540727b4e9853a4854107600605de3d74
2018-02-06 09:06:26 -08:00
Philip P. Moltmann
371a3b879b Dump usb as DualDump
This allows to dump the USB state as proto-buf. This in turn allows to
automatically process this data.

Test: adb shell dumpsys usb
      incident_report usb
      No automated test possible as no field is guaranteed to be set
Change-Id: Ifdf22bfaf9c78226c420b11c43278013ce69f849
2018-02-02 16:40:26 -08:00
Yi Jin
3ec5cc792e Modify SystemApi so it can be used by CTS to trigger incident report
Bug: 72502621
Test: Cts/Gts tests covered, see the cls from the same topic
Change-Id: Id0c1cc0fc0054e620de1349dab66513e554b1caa
2018-01-29 21:01:09 -08:00
TreeHugger Robot
4c32982039 Merge "Adding privacy tags for ps dump." 2018-01-27 00:01:42 +00:00