71a9531806d9d37f5482c4d242f95416c04715bf |
|
17-Apr-2018 |
Kweku Adams <kwekua@google.com> |
Adding batterystats history to proto dump. It will only print out a dump for userdebug or eng builds. Bug: 77727638 Test: flash device and check output of incident proto and 'dumpsys batterystats -c --history' Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74 Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
91d4330202c4c6ce005d3c56b230ee5ce376933d |
|
12-Apr-2018 |
Yi Jin <jinyithu@google.com> |
Reduce disk space limit for incident reports. Bug: 77963176 Test: atest incidentd_test and manual Change-Id: I8ad1d10fcd40ff556255ac27c049265e79c7d558
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
6cacbcbf436be744a34f7ea0d4f838ff97757446 |
|
30-Mar-2018 |
Yi Jin <jinyithu@google.com> |
Use modern c++ code style for incidentd. This cl does not contain code logic changes. Bug: 77333635 Test: manual and incidentd_test Change-Id: Iea0a402b1051defd45159ca267e6dd705f9ffa49
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
86dce413f808ca9ef160e8762f74deaafd7c23ae |
|
07-Mar-2018 |
Yi Jin <jinyithu@google.com> |
Optimize incidentd memory usage 1. Remove dependency of libprotobuf-cpp-lite, saves .so mmap ~200KB 2. Don't use auto except iterator for readability. Bug: 74254200 Test: adb shell dumpsys meminfo `pid incidentd` Change-Id: If6198521c3b80929d6ea3f7ed466b5195991ccfd
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
4e843106a6f510a7d77fedfbeaec8e95b57905b7 |
|
15-Feb-2018 |
Yi Jin <jinyithu@google.com> |
Throttler for incidentd based on size putting into dropbox. The incidentd will accumulate the total size put into dropbox and once it exceeds a threshold (currently 20MB) daily, it will stop further requests. It allows collection again 24 hours later. Bug: 64219725 Test: atest incidentd_test and manually flashed incidentd and test. Change-Id: Iea21fbae40d5d01108797b190231d73e74eff213
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
b592e3bc3169e39bd6b0bfce9f788631d5d22acd |
|
02-Feb-2018 |
Yi Jin <jinyithu@google.com> |
This cl formats incidentd and makes it easier for debugging. Bug: 72755317 Test: clang-format -type=file -i <files> Change-Id: Ide91227f26c6b1db6d2e5fe8117ca5cc4cf77fd3
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
329130b7e40d27f660aa275ef6905bd7ee91f64c |
|
10-Feb-2018 |
Yi Jin <jinyithu@google.com> |
Put metadata or stats into each dropbox incident report. Bug: 65451198 Test: atest incidentd_test Change-Id: Ib406b177ad7f1b4bda7fef2e606fc66a9836e060
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
3ec5cc792e932dc668bf9fb2cf5e6c6288a7f9b4 |
|
26-Jan-2018 |
Yi Jin <jinyithu@google.com> |
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
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
4bab3a191a70cbefac07c8fac90ec29081d91f89 |
|
11-Jan-2018 |
Yi Jin <jinyithu@google.com> |
Fix permissions problems of incidentd. Test: manual Change-Id: I4ee0d1f2349ee1a25a422cabf1b5b87c612710d2
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
22769e0123340f49370ea4748aff71a1b84dc863 |
|
16-Oct-2017 |
Yi Jin <jinyithu@google.com> |
Fixed several bugs found for incidentd 1. Add logging for proto can't be parsed by incident_report 2. Close opened file descriptor of incident report request! 3. Fix invalid syntax of auto-gen section_list.cpp Bug: 67849582 Test: manually run incident and checks /proc/<its pid>/fd Change-Id: I38e6ac28de09aca6243ad536ed41d8059e08ba24
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
a5c5e8a99b9dafd46b55ef98aa8b24162b56e259 |
|
28-Sep-2017 |
Yi Jin <jinyithu@google.com> |
Enable Diskstats Section Bug: 67019205 Test: manually tested in incident_report tool Change-Id: I291d4b0b0c01385e57c6ad83a12678c0f8d8746b
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
edfd5bb7888899976762623a4c940710026480ea |
|
07-Sep-2017 |
Yi Jin <jinyithu@google.com> |
Extract IncidentHeaderProto to a separated file for statsd to consume Create a HeaderSection to deal with header protos which is more testable Bug: 65422268 Test: unit tested Change-Id: Icdcbeded8bc963940a8f9e503cb65a9a247ca5b2
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
99c248feb2d1f863b864bdfd1e3b37af17f18732 |
|
26-Aug-2017 |
Yi Jin <jinyithu@google.com> |
Implement PII Stripper, part 2 Implement EncodedBuffer that strip pii based on given privacy request. The reason to implement another buffer is the length-delimited field's size could change when its submessage gets stripped. It also intends to keep the orignal data around for other requests to consume it. In addition, the section implementation has adapted EncodedBuffer so write out to each request's fd could be request-specific. The next step is allow requests to set its privacy spec. Notice the current design set the privacy spec of dropbox to AUTOMATIC, this behavior might change in the future. Bug: 64687253 Test: unit tests are writtern, see README.md for how to run unit tests. Change-Id: I7ac236b8265ba9289dc6e17a8a5bf7f67ffb6bf5
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
f32af48069f590a998f7dde188ea5afd3ffe2d96 |
|
12-Aug-2017 |
Yi Jin <jinyithu@google.com> |
Fix parsing enum types in incident report tool as well as adding some additional loggings Test: manually flashed to device and test calling IncidentManager.java functions Change-Id: I69610414edde865b20ba632837f037fbe43f99db
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
add11e9176f2a5a2e5193726b863d03c281a4edd |
|
31-Jul-2017 |
Yi Jin <jinyithu@google.com> |
Add tests for reporter class Test: Add test for Reporter class Change-Id: Ic1d87a26dd4b8271bab7b03374c7a1d4d7b87f92
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
b44f7d46b647e24d8ea4fdf45742bbcbbfb03113 |
|
21-Jul-2017 |
Yi Jin <jinyithu@google.com> |
This cl implements CommandSection and use it to add procrank.proto Section Bug: 63863444 Test: manual - create gtests for CommandSection and Procrank Parser following instructions in the README.md of incidentd and incident_helper on how to run them. Change-Id: I099808fd13bf9ed9a564b122f1126b1691a83291
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
0a3406fc4f8e9a8c8a9155fc7886a0496f692496 |
|
23-Jun-2017 |
Yi Jin <jinyithu@google.com> |
This cl does the following things: 0) Implements a skeleton of incident_helper 1) Implements FileSection class which calls incident_helper to parse file content to protobuf 2) Adds Kernel Wake Sources to incident.proto and makes it parsed by FileSection 3) Adds basic gtests to test FdBuffer, io_utils, FileSection implementation Bug: 62923266 Bug: 62926061 Test: manual - push incidentd, incident_helper and incident to my device and verify kernel wakeup sources file is able to be parsed. Change-Id: I2aa6b6158d962ce70e6fa6c8a9c42213a45ff41c
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|
1754d744a7a34731ffc07af1bc3dbfcb06864ab0 |
|
22-Nov-2016 |
Joe Onorato <joeo@google.com> |
First checkin of incident reporting. There are a few major pieces here: incidentd --------- This daemon (started by init) runs and accepts incoming requests to take incident reports. When prompted, it calls into various system services and fills in an IncidentProto data structure, and then writes the report into dropbox. The next steps for incidentd: - Security review of SELinux policies. These will be a subset of the dumpstate permissions. Until this is done, incidentd is not started at boot time. incident -------- This shell command calls into incidentd, and can initiate an incident report and either capture the output or leave for dropbox. incident_report --------------- This host side tool can call adb shell with the correct parameters and also format the incident report as text. This formatting code was left of the device on purpose. Right now it's pretty small, but as the number of fields increases, the metadata and code to do the formatting will start to grow. The incident_report command also contains a workaround to let it work before incidentd is turned on by default. Right now, it is implemented to call adb shell dumpsys <service> --proto directly, whereas in the future it will go through the full incidentd flow. incident_section_gen -------------------- A build-time tool that generates a stripped down set of information about the fields that are available. libincident ----------- This library contains the code to connect to incidentd, and the meta proto definitions that are used by the framework protos. The basics are here now, but they are not fully fleshed out yet. The privacy.proto file contains annotations that can go in the proto file that we will later use to filter which fields are uploaded, and which are used by local sources. For example, a device in a test lab is safe to upload much much more information than a real user. These will share the same mechanism, but the user's output will be filtered according to these annotations. frameworks/core/proto --------------------- These .proto files contain the definitions of the system's output. There is one master android.os.IncidentProto file that is the top level of an incident report, but some other services (notification, fingerprint, batterystats, etc) will have others that are used directly by the logging mechanism. Other files which are shared by several of the services also go here, such as ComponentName, Locale, Configuration, etc. There will be many more. There is also a first iplementation of a dump method handling --proto in the fingerprint service. IncidentManager --------------- The java API to trigger an incident report. Test: Not written yet Change-Id: I59568b115ac7fcf73af70c946c95752bf33ae67f
/frameworks/base/cmds/incidentd/src/Reporter.cpp
|