| /* |
| * 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; |
| option java_outer_classname = "IncidentProtoMetadata"; |
| |
| 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/kernelwake.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/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/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/util/event_log_tags.proto"; |
| import "frameworks/base/core/proto/android/util/log.proto"; |
| import "frameworks/base/libs/incident/proto/android/os/header.proto"; |
| import "frameworks/base/libs/incident/proto/android/privacy.proto"; |
| import "frameworks/base/libs/incident/proto/android/section.proto"; |
| |
| package android.os; |
| |
| // This field contains internal metadata associated with an incident report, |
| // such as the section ids and privacy policy specs from caller as well as how long |
| // and how many bytes a section takes, etc. |
| message IncidentMetadata { |
| |
| } |
| |
| // privacy field options must not be set at this level because all |
| // the sections are able to be controlled and configured by section ids. |
| // Instead privacy field options need to be configured in each section proto message. |
| 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" |
| ]; |
| |
| // 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" |
| ]; |
| |
| // Linux services |
| optional Procrank procrank = 2000 [ |
| (section).type = SECTION_COMMAND, |
| (section).args = "/system/xbin/procrank" |
| ]; |
| |
| optional PageTypeInfo page_type_info = 2001 [ |
| (section).type = SECTION_FILE, |
| (section).args = "/proc/pagetypeinfo" |
| ]; |
| |
| optional KernelWakeSources kernel_wake_sources = 2002 [ |
| (section).type = SECTION_FILE, |
| (section).args = "/d/wakeup_sources" |
| ]; |
| |
| optional CpuInfo 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 CpuFreq cpu_freq = 2004 [ |
| (section).type = SECTION_FILE, |
| (section).args = "/sys/devices/system/cpu/cpufreq/all_time_in_state" |
| ]; |
| |
| optional PsDumpProto 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" |
| ]; |
| |
| // System Services |
| optional com.android.server.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; |
| |
| optional android.service.procstats.ProcessStatsServiceDumpProto procstats = 3011 [ |
| (section).type = SECTION_DUMPSYS, |
| (section).args = "procstats --proto" |
| ]; |
| |
| optional com.android.server.am.proto.ActivityStackSupervisorProto activities = 3012 [ |
| (section).type = SECTION_DUMPSYS, |
| (section).args = "activity --proto activities" |
| ]; |
| |
| optional com.android.server.am.proto.BroadcastProto broadcasts = 3013 [ |
| (section).type = SECTION_DUMPSYS, |
| (section).args = "activity --proto broadcasts" |
| ]; |
| |
| optional com.android.server.am.proto.ActiveServicesProto amservices = 3014 [ |
| (section).type = SECTION_DUMPSYS, |
| (section).args = "activity --proto service" |
| ]; |
| |
| optional com.android.server.am.proto.ProcessProto amprocesses = 3015; |
| |
| optional com.android.server.AlarmManagerServiceProto alarm = 3016 [ |
| (section).type = SECTION_DUMPSYS, |
| (section).args = "alarm --proto" |
| ]; |
| |
| optional com.android.server.wm.proto.WindowManagerServiceProto window = 3017 [ |
| (section).type = SECTION_DUMPSYS, |
| (section).args = "window --proto" |
| ]; |
| |
| optional com.android.server.am.proto.MemInfoProto 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" |
| ]; |
| } |