ea31cbea935a20d9d290453c2ba2f8b8670e45ca |
|
02-Apr-2018 |
Yi Jin <jinyithu@google.com> |
Remove some letters of verbose log Bug: 77333635 Test: N/A Change-Id: I94b288d070dfb372edf345d369d75bb3255f631b
/frameworks/base/cmds/incidentd/src/FdBuffer.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/FdBuffer.cpp
|
e3dab2d906ee45954e58826b11cce9219c005cc5 |
|
23-Mar-2018 |
Yi Jin <jinyithu@google.com> |
Use unique_fd with the clear ownership. FdBuffer won't take ownership of the `main` fd. It only enforces transfer ownership in readProcessedDataInStream. Bug: 74021345 Test: atest incidentd_test Change-Id: I6182730241c81c34b3be865b827a2d3e8c10c21c
/frameworks/base/cmds/incidentd/src/FdBuffer.cpp
|
6355d2f3ab5febbd25331a72671eea47ef5f43ac |
|
14-Mar-2018 |
Yi Jin <jinyithu@google.com> |
Wrap fd with unique_fd so it won't leak. Bug: 74021345 Test: manual and atest incidentd_test Change-Id: Ib1000bfe6917c3d5cae7b9edce5b67d50897e10d
/frameworks/base/cmds/incidentd/src/FdBuffer.cpp
|
eadd123d68850cb27aa6d030ade6190e30991b19 |
|
06-Feb-2018 |
Kweku Adams <kwekua@google.com> |
Dumping stack traces to proto. Bug: 72177715 Test: flash device and check incident.proto output Change-Id: Id2a15e0fc62b66efe875949af97f0eb651c7e322 (cherry picked from commit 5c804e2b9893c7892900148229cf19fa6268e7dc)
/frameworks/base/cmds/incidentd/src/FdBuffer.cpp
|
1a11fa10977ee1e2645d400844ff4d472b8f5f02 |
|
23-Feb-2018 |
Yi Jin <jinyithu@google.com> |
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
/frameworks/base/cmds/incidentd/src/FdBuffer.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/FdBuffer.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/FdBuffer.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/FdBuffer.cpp
|
0eb223496c3dee6bd0a33ea4fa664fb92ef557cc |
|
07-Nov-2017 |
Yi Jin <jinyithu@google.com> |
Implement Cpu Freq Section When poll from sysfs, revents return POLLERR by default, handles this edge case in this cl. Bug: 68774444 Test: unit tested + on device tests Change-Id: I23540299c026d3e7676497f56690e9f8646a47bd
/frameworks/base/cmds/incidentd/src/FdBuffer.cpp
|
c23fad2f9079f678eae15338f5e57e2a6bf7e391 |
|
16-Sep-2017 |
Yi Jin <jinyithu@google.com> |
Implement c++ native lib for streaming proto, part 1 Extract protobuf class out and creates EncodedBuffer class which holds protobuf data. Next step is to create a ProtoOutputStream and let incident helper adapt the change as well. please see frameworks/base/core/java/android/util/proto Bug: 65641021 Test: unit tested Change-Id: I0dd343b2e62d60f091c8f857fae3452ec8da6b96
/frameworks/base/cmds/incidentd/src/FdBuffer.cpp
|
0f0471623e91c202fb7381a050cc331572fb439f |
|
05-Sep-2017 |
Yi Jin <jinyithu@google.com> |
Implement Pii Stripper Part 3 The incident request args sets privacy spec. Strip action is optimized to run once for each type of spec and ready for flush multiple times. Incident command is updated to take -p option to specify privacy spec. Bug: 64687253 Test: unit tests written, manually run incident command to test as well Change-Id: I6753df117f76dc1a5f4d2152baa3fbbf56b490e4
/frameworks/base/cmds/incidentd/src/FdBuffer.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/FdBuffer.cpp
|
0ed9b68a3fa8f6eab536a93cb18ce75d7d22b757 |
|
18-Aug-2017 |
Yi Jin <jinyithu@google.com> |
Implement PII stripper in incidentd, part 1 1. automatically parse privacy options and generate lookup table 2. create FdBuffer iterator API in order to remove dependency on Reporter.h Bug: 64687253 Test: Unit test for iterator API, and manually tested lookup table Change-Id: I1ea376a4481fc4afc7bdf447936f767b63690fd3
/frameworks/base/cmds/incidentd/src/FdBuffer.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/FdBuffer.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/FdBuffer.cpp
|