History log of /frameworks/base/tools/incident_section_gen/main.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
480a956521e6b9dede8f159014fceb5a5a6e196d 15-May-2018 Yi Jin <jinyithu@google.com> The argument type is bool, the current bug passes a "true" or "false"
string.

Bug: 79710844
Test: atest incidentd_test
Change-Id: I66fc086e4a194e68638311ccdc305a495ecf8da4
/frameworks/base/tools/incident_section_gen/main.cpp
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/tools/incident_section_gen/main.cpp
7fe3dee3ae1cc47b50c4001cbac56c4fefbcc57b 17-Apr-2018 Yi Jin <jinyithu@google.com> 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
Merged-In: I08ffcb21709efe5478d2ac46121deb5795af1024
/frameworks/base/tools/incident_section_gen/main.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/tools/incident_section_gen/main.cpp
934cc613fde11548e5b166cb51e3afb9c9943734 15-Mar-2018 Yi Jin <jinyithu@google.com> Fix bug to break switch cases.

Bug: 75001195
Test: N/A
Change-Id: I99274cbf34d191c25ad9ced08f999c59f922cb25
/frameworks/base/tools/incident_section_gen/main.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/tools/incident_section_gen/main.cpp
7d55509c199a624a5a4f7f0b4374edd1eb114d6f 03-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Modifying proto csv output to include privacy levels."
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/tools/incident_section_gen/main.cpp
ecf4bdb4477d5fcc469c1c4ea7418e16e71037b8 23-Feb-2018 Kweku Adams <kwekua@google.com> Modifying proto csv output to include privacy levels.

Bug: 73775471
Test: use new output in go/irpf
Change-Id: Ib9e836e350f8d664ef66ecfe2539d15d164953be
/frameworks/base/tools/incident_section_gen/main.cpp
3c034c987e1eeb49660fb62d3426c292a01412c9 23-Dec-2017 Yi Jin <jinyithu@google.com> Implement a new type of section which reads from logd and dumps proto.

And implement a file section which reads from event-log-tags for
decoding binary logs.

Bug: 70936599
Test: atest incidentd_test && atest incident_helper_test and flush on
device and test log sections and event_log_tag_map
Change-Id: Ib3d35e317f355de69f01ded012482486e9a43da6
/frameworks/base/tools/incident_section_gen/main.cpp
0f2599fbf0ba8128b2a2c4de4d40aa37ea6c3d10 17-Nov-2017 Yi Jin <jinyithu@google.com> Dump Proto to a csv

Bug: 69427323
Test: N/A
Change-Id: I1b89898afc30d5a0df6355ee1f6477df8d271f98
/frameworks/base/tools/incident_section_gen/main.cpp
bdf58942c86240070bacc25203177cf47f6a1577 15-Nov-2017 Yi Jin <jinyithu@google.com> 1. Implement Privacy Policy Tag Inheritance
2. Expose Dest values in IIncidentReportArgs.h

Please see bug for detail descriptions.

Bug: 67869340
Test: unit tested and on-device test. Ran command:
$ out/host/linux-x86/bin/incident-section-gen incidentd
to test various of privacy taggings.
Change-Id: I12af3d7da4c7c72bd63598893fe2c1f70b09baa4
/frameworks/base/tools/incident_section_gen/main.cpp
be6de3017b2045926424dcbc8b65ce63376963a2 24-Oct-2017 Yi Jin <jinyithu@google.com> Enable Window Dumpsys Section

Protobuf defines classes, which can have self recursive message
definitions and cause a bug in generating privacy flags.
Solve the problem here. The details is in incident_section_gen/main.cpp.
The logic is a bit complicated to address more than one level of self
recursion proto message definition.

Also solve a bug when PrivacyBuffer strips fields.
Modify PRIVACY_POLICY_LIST to be type Privacy** in order to allow
initialization by a method.

Bug: 68162512
Test: unit tested and on device tests
Change-Id: I1d0b79f6813e5fd66c4cf5823d0fa17efc57bb1d
/frameworks/base/tools/incident_section_gen/main.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/tools/incident_section_gen/main.cpp
7e0b4e5880d389e6af1af602373aefa5b0b04d34 13-Sep-2017 Yi Jin <jinyithu@google.com> Fixes regarding to comments in ag/2839267

1. use struct {} to instantiate privacy fields for efficiency reason
2. use vector<uint8_t>* instead of vector<uint8_t>& to indicate the
caller knows the value gets changed.
3. binary search privay policy for sections

Bug: 65595927
Test: unit test covers
Change-Id: Ic58c2f607465d1a7f10352b9a38c3d8b1a5cf352
/frameworks/base/tools/incident_section_gen/main.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/tools/incident_section_gen/main.cpp
3809bbf2566d01104c9a53b30fe5a72debce28ab 06-Sep-2017 Yunlian Jiang <yunlian@google.com> incident_section_gen: fix a memory leak warning.

This fixes the warning
frameworks/base/tools/incident_section_gen/main.cpp:170:48:
warning: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks]

Bug:None
Test: The warning is gone.
Change-Id: I48dbd51ff53b35aa3fcd0b6507485ec61c1a160c
/frameworks/base/tools/incident_section_gen/main.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/tools/incident_section_gen/main.cpp
f8601845997d994252daf3a429577fc81a8ec604 16-Aug-2017 Yi Jin <jinyithu@google.com> Automatically generate section_list.cpp file from incident.proto
with the SectionFlags field annotations

Bug: 64728679
Test: tested manually on device
Change-Id: I5b067b09cd6ccc3528f0845d7290cc9e2bc63a07
/frameworks/base/tools/incident_section_gen/main.cpp
7669012623a18855913c84ec0690066fbfd823ea 20-Dec-2016 Joe Onorato <joeo@google.com> Clean up file names for protos

Test: cts-tradefed run singleCommand cts -d --module CtsIncidentHostTestCases
Change-Id: Iea2fc81768082e8e01afa8df86e113665020e7f6
/frameworks/base/tools/incident_section_gen/main.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/tools/incident_section_gen/main.cpp