1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
option java_multiple_files = true;
import "frameworks/base/core/proto/android/os/backtrace.proto";
import "frameworks/base/core/proto/android/os/batterytype.proto";
import "frameworks/base/core/proto/android/os/cpufreq.proto";
import "frameworks/base/core/proto/android/os/cpuinfo.proto";
import "frameworks/base/core/proto/android/os/data.proto";
import "frameworks/base/core/proto/android/os/header.proto";
import "frameworks/base/core/proto/android/os/kernelwake.proto";
import "frameworks/base/core/proto/android/os/metadata.proto";
import "frameworks/base/core/proto/android/os/pagetypeinfo.proto";
import "frameworks/base/core/proto/android/os/procrank.proto";
import "frameworks/base/core/proto/android/os/ps.proto";
import "frameworks/base/core/proto/android/os/statsdata.proto";
import "frameworks/base/core/proto/android/os/system_properties.proto";
import "frameworks/base/core/proto/android/providers/settings.proto";
import "frameworks/base/core/proto/android/server/activitymanagerservice.proto";
import "frameworks/base/core/proto/android/server/alarmmanagerservice.proto";
import "frameworks/base/core/proto/android/server/fingerprint.proto";
import "frameworks/base/core/proto/android/server/jobscheduler.proto";
import "frameworks/base/core/proto/android/server/powermanagerservice.proto";
import "frameworks/base/core/proto/android/server/rolemanagerservice.proto";
import "frameworks/base/core/proto/android/server/windowmanagerservice.proto";
import "frameworks/base/core/proto/android/service/appwidget.proto";
import "frameworks/base/core/proto/android/service/battery.proto";
import "frameworks/base/core/proto/android/service/batterystats.proto";
import "frameworks/base/core/proto/android/service/diskstats.proto";
import "frameworks/base/core/proto/android/service/graphicsstats.proto";
import "frameworks/base/core/proto/android/service/netstats.proto";
import "frameworks/base/core/proto/android/service/notification.proto";
import "frameworks/base/core/proto/android/service/package.proto";
import "frameworks/base/core/proto/android/service/print.proto";
import "frameworks/base/core/proto/android/service/procstats.proto";
import "frameworks/base/core/proto/android/service/restricted_image.proto";
import "frameworks/base/core/proto/android/service/usb.proto";
import "frameworks/base/core/proto/android/util/event_log_tags.proto";
import "frameworks/base/core/proto/android/util/log.proto";
import "frameworks/base/core/proto/android/privacy.proto";
import "frameworks/base/core/proto/android/section.proto";
package android.os;
// Privacy tag can be marked to override UNSET messages so generic
// message type can be handled case by case, e.g. GZippedFileProto.
message IncidentProto {
reserved 1001;
// Incident header from callers
repeated IncidentHeaderProto header = 1;
// Internal metadata of incidentd
optional IncidentMetadata metadata = 2;
// Device information
optional SystemPropertiesProto system_properties = 1000 [
(section).type = SECTION_COMMAND,
(section).args = "getprop"
];
optional string kernel_version = 1002 [
(section).type = SECTION_FILE,
(section).args = "/proc/version",
(privacy).dest = DEST_AUTOMATIC
];
// Device Logs
optional android.util.EventLogTagMapProto event_log_tag_map = 1100 [
(section).type = SECTION_FILE,
(section).args = "/system/etc/event-log-tags"
];
optional android.util.LogProto main_logs = 1101 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_MAIN"
];
optional android.util.LogProto radio_logs = 1102 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_RADIO"
];
optional android.util.LogProto events_logs = 1103 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_EVENTS"
];
optional android.util.LogProto system_logs = 1104 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_SYSTEM"
];
optional android.util.LogProto crash_logs = 1105 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_CRASH"
];
optional android.util.LogProto stats_logs = 1106 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_STATS"
];
optional android.util.LogProto security_logs = 1107 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_SECURITY"
];
optional android.util.LogProto kernel_logs = 1108 [
(section).type = SECTION_LOG,
(section).args = "LOG_ID_KERNEL"
];
// Stack dumps
optional android.os.BackTraceProto native_traces = 1200 [
(section).type = SECTION_TOMBSTONE,
(section).args = "native"
];
optional android.os.BackTraceProto hal_traces = 1201 [
(section).type = SECTION_TOMBSTONE,
(section).args = "hal"
];
optional android.os.BackTraceProto java_traces = 1202 [
(section).type = SECTION_TOMBSTONE,
(section).args = "java"
];
// Linux services
optional ProcrankProto procrank = 2000 [
// Disable procrank for reasons below:
// 1. incidentd can't execute `procrank` because it don't have DAC perms
// since it is running as its own uid, no root access.
// 2. the same information is able to be accessed by meminfo dumpsys.
// 3. leave this one here to show case of how to disable a section
// (no removal allowed if you are familiar with PROTOBUF).
(section).type = SECTION_NONE,
(section).args = "procrank"
];
optional PageTypeInfoProto page_type_info = 2001 [
(section).type = SECTION_FILE,
(section).args = "/proc/pagetypeinfo"
];
optional KernelWakeSourcesProto kernel_wake_sources = 2002 [
(section).type = SECTION_FILE,
(section).args = "/d/wakeup_sources"
];
optional CpuInfoProto cpu_info = 2003 [
(section).type = SECTION_COMMAND,
(section).args = "top -b -n 1 -H -s 6 -o pid,tid,user,pr,ni,%cpu,s,virt,res,pcy,cmd,name"
];
optional CpuFreqProto cpu_freq = 2004 [
(section).type = SECTION_FILE,
(section).args = "/sys/devices/system/cpu/cpufreq/all_time_in_state"
];
optional PsProto processes_and_threads = 2005 [
(section).type = SECTION_COMMAND,
(section).args = "ps -A -T -Z -O pri,nice,rtprio,sched,pcy,time"
];
optional BatteryTypeProto battery_type = 2006 [
(section).type = SECTION_FILE,
(section).args = "/sys/class/power_supply/bms/battery_type"
];
optional GZippedFileProto last_kmsg = 2007 [
(section).type = SECTION_GZIP,
(section).args = "/sys/fs/pstore/console-ramoops /sys/fs/pstore/console-ramoops-0 /proc/last_kmsg",
(privacy).dest = DEST_EXPLICIT
];
// System Services
optional com.android.server.biometrics.fingerprint.FingerprintServiceDumpProto fingerprint = 3000 [
(section).type = SECTION_DUMPSYS,
(section).args = "fingerprint --proto --incident"
];
optional android.service.NetworkStatsServiceDumpProto netstats = 3001 [
(section).type = SECTION_DUMPSYS,
(section).args = "netstats --proto"
];
optional android.providers.settings.SettingsServiceDumpProto settings = 3002 [
(section).type = SECTION_DUMPSYS,
(section).args = "settings --proto"
];
optional android.service.appwidget.AppWidgetServiceDumpProto appwidget = 3003;
optional android.service.notification.NotificationServiceDumpProto notification = 3004 [
(section).type = SECTION_DUMPSYS,
(section).args = "notification --proto"
];
optional android.service.batterystats.BatteryStatsServiceDumpProto batterystats = 3005 [
(section).type = SECTION_DUMPSYS,
(section).args = "batterystats --proto"
];
optional android.service.battery.BatteryServiceDumpProto battery = 3006 [
(section).type = SECTION_DUMPSYS,
(section).args = "battery --proto"
];
optional android.service.diskstats.DiskStatsServiceDumpProto diskstats = 3007 [
(section).type = SECTION_DUMPSYS,
(section).args = "diskstats --proto"
];
optional android.service.pm.PackageServiceDumpProto package = 3008 [
(section).type = SECTION_DUMPSYS,
(section).args = "package --proto"
];
optional com.android.server.power.PowerManagerServiceDumpProto power = 3009 [
(section).type = SECTION_DUMPSYS,
(section).args = "power --proto"
];
optional android.service.print.PrintServiceDumpProto print = 3010 [
(section).type = SECTION_DUMPSYS,
(section).args = "print --proto"
];
optional android.service.procstats.ProcessStatsServiceDumpProto procstats = 3011 [
(section).type = SECTION_DUMPSYS,
(section).args = "procstats --proto"
];
optional com.android.server.am.ActivityManagerServiceDumpActivitiesProto activities = 3012 [
(section).type = SECTION_DUMPSYS,
(section).args = "activity --proto activities"
];
optional com.android.server.am.ActivityManagerServiceDumpBroadcastsProto broadcasts = 3013 [
(section).type = SECTION_DUMPSYS,
(section).args = "activity --proto broadcasts"
];
optional com.android.server.am.ActivityManagerServiceDumpServicesProto amservices = 3014 [
(section).type = SECTION_DUMPSYS,
(section).args = "activity --proto service"
];
optional com.android.server.am.ActivityManagerServiceDumpProcessesProto amprocesses = 3015 [
(section).type = SECTION_DUMPSYS,
(section).args = "activity --proto processes"
];
optional com.android.server.AlarmManagerServiceDumpProto alarm = 3016 [
(section).type = SECTION_DUMPSYS,
(section).args = "alarm --proto"
];
optional com.android.server.wm.WindowManagerServiceDumpProto window = 3017 [
(section).type = SECTION_DUMPSYS,
(section).args = "window --proto"
];
optional com.android.server.am.MemInfoDumpProto meminfo = 3018 [
(section).type = SECTION_DUMPSYS,
(section).args = "meminfo -a --proto"
];
optional android.service.GraphicsStatsServiceDumpProto graphicsstats = 3019 [
(section).type = SECTION_DUMPSYS,
(section).args = "graphicsstats --proto"
];
optional com.android.server.job.JobSchedulerServiceDumpProto jobscheduler = 3020 [
(section).type = SECTION_DUMPSYS,
(section).args = "jobscheduler --proto"
];
optional android.service.usb.UsbServiceDumpProto usb = 3021 [
(section).type = SECTION_DUMPSYS,
(section).args = "usb --proto"
];
// The history can be large and may cause issues in consumers, so put the
// history in a separate section to compensate.
optional android.service.batterystats.BatteryStatsServiceDumpHistoryProto battery_history = 3022 [
(section).type = SECTION_DUMPSYS,
(section).args = "batterystats --proto --history",
(section).userdebug_and_eng_only = true
];
optional android.os.StatsDataDumpProto stats_data = 3023 [
(section).type = SECTION_DUMPSYS,
(section).args = "stats --proto",
(section).userdebug_and_eng_only = true
];
optional com.android.server.role.RoleManagerServiceDumpProto role = 3024 [
(section).type = SECTION_DUMPSYS,
(section).args = "role --proto"
];
optional android.service.restricted_image.RestrictedImagesDumpProto restricted_images = 3025 [
(section).type = SECTION_DUMPSYS,
(section).userdebug_and_eng_only = true,
(section).args = "incidentcompanion --restricted_image"
];
// System trace as a serialized protobuf.
optional bytes system_trace = 3026 [
(section).type = SECTION_FILE,
(section).args = "/data/misc/perfetto-traces/incident-trace",
(privacy).dest = DEST_AUTOMATIC,
(section).userdebug_and_eng_only = true
];
// Reserved for OEMs.
extensions 50000 to 100000;
}
|