blob: 200fcd2a30b3b180f25fe3d8082fd250c07ad109 [file] [log] [blame]
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -07001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -070018
19package android.os.statsd;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -070020option java_package = "com.android.os";
Stefan Lafonae2df012017-11-14 09:17:21 -080021option java_outer_classname = "AtomsProto";
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -070022
Yao Chen9c1debe2018-02-19 14:39:19 -080023import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
Bookatzdb026a22018-01-10 19:01:56 -080024import "frameworks/base/core/proto/android/app/enums.proto";
Tej Singh33a412b2018-03-16 18:43:59 -070025import "frameworks/base/core/proto/android/app/job/enums.proto";
Ben Blount763a5d52019-04-10 11:48:58 -070026import "frameworks/base/core/proto/android/app/settings_enums.proto";
Jack Hec27040a2019-01-09 20:54:41 -080027import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto";
Tej Singh5d991e12018-03-09 19:48:11 -080028import "frameworks/base/core/proto/android/bluetooth/enums.proto";
Jack Heab86dbd22018-12-18 15:43:27 -080029import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto";
Jack Hed9837c82019-01-09 01:19:13 -080030import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto";
Jack He1021a612019-01-20 21:22:46 -080031import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto";
Michael Groover9e7b06e2018-12-28 19:55:51 -080032import "frameworks/base/core/proto/android/debug/enums.proto";
Kevin Chyn1741a072019-01-17 11:54:40 -080033import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto";
joshmccloskey8c3322e2019-01-09 18:25:57 -080034import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto";
Chiachang Wangf6bedc22019-01-14 11:54:32 +080035import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
Bookatz1a1b0462018-01-12 11:47:03 -080036import "frameworks/base/core/proto/android/os/enums.proto";
Chiachang Wangf6bedc22019-01-14 11:54:32 +080037import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto";
Bookatz8bdae8d2018-01-16 11:24:30 -080038import "frameworks/base/core/proto/android/server/enums.proto";
Kweku Adams8845d012018-12-11 20:06:45 -080039import "frameworks/base/core/proto/android/server/job/enums.proto";
Bookatz48d362e2018-11-06 15:49:08 -080040import "frameworks/base/core/proto/android/server/location/enums.proto";
Yangsteraf9aee72018-10-12 09:26:16 -070041import "frameworks/base/core/proto/android/service/procstats_enum.proto";
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -080042import "frameworks/base/core/proto/android/service/usb.proto";
Chiachang Wang0e88ebf2019-03-21 10:18:07 +080043import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto";
lifr1f74b052019-04-16 22:16:30 +080044import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto";
Bookatz11257ca2018-12-05 18:22:39 -080045import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
46import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
Ben Blount763a5d52019-04-10 11:48:58 -070047import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
48import "frameworks/base/core/proto/android/stats/enums.proto";
49import "frameworks/base/core/proto/android/stats/intelligence/enums.proto";
Yao Chen8c433862018-10-24 14:09:20 -070050import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
Hongyi Zhang700137e2019-05-23 21:19:36 -070051import "frameworks/base/core/proto/android/stats/location/location_enums.proto";
Ray Essick8ab04df2019-02-15 11:01:02 -080052import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto";
Jeff Sharkey6bd21572019-11-15 20:45:33 -070053import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto";
Carmen Agimof6688a352019-01-30 19:36:04 +000054import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
Hyunyoung Song80adf6be2019-01-30 09:59:30 -080055import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
Will Brockman079fdaa2020-01-12 16:45:03 -050056import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto";
Tej Singhc477d9c2018-02-05 18:31:39 -080057import "frameworks/base/core/proto/android/telecomm/enums.proto";
Bookatz1a1b0462018-01-12 11:47:03 -080058import "frameworks/base/core/proto/android/telephony/enums.proto";
59import "frameworks/base/core/proto/android/view/enums.proto";
Bookatz11257ca2018-12-05 18:22:39 -080060import "frameworks/base/core/proto/android/wifi/enums.proto";
Tony Make2b1b672019-07-29 16:59:47 +010061import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto";
Tianjie Xu167c3db2019-07-22 14:25:14 -070062import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto";
Joe Onorato62c220b2017-11-18 20:32:56 -080063
Yao Chend54f9dd2017-10-17 17:37:48 +000064/**
Stefan Lafonae2df012017-11-14 09:17:21 -080065 * The master atom class. This message defines all of the available
Yao Chend54f9dd2017-10-17 17:37:48 +000066 * raw stats log events from the Android system, also known as "atoms."
67 *
68 * This field contains a single oneof with all of the available messages.
69 * The stats-log-api-gen tool runs as part of the Android build and
70 * generates the android.util.StatsLog class, which contains the constants
71 * and methods that Android uses to log.
72 *
Stefan Lafonae2df012017-11-14 09:17:21 -080073 * This Atom class is not actually built into the Android system.
Yao Chend54f9dd2017-10-17 17:37:48 +000074 * Instead, statsd on Android constructs these messages synthetically,
75 * in the format defined here and in stats_log.proto.
76 */
Stefan Lafonae2df012017-11-14 09:17:21 -080077message Atom {
78 // Pushed atoms start at 2.
David Chenc8a43242017-10-17 16:23:28 -070079 oneof pushed {
Bookatzc1a050a2017-10-10 15:49:28 -070080 // For StatsLog reasons, 1 is illegal and will not work. Must start at 2.
Muhammad Qureshi100d2b62020-01-23 10:30:41 -080081 BleScanStateChanged ble_scan_state_changed = 2 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -080082 ProcessStateChanged process_state_changed = 3 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -080083 BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -080084 SensorStateChanged sensor_state_changed = 5 [(module) = "framework"];
85 GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"];
86 SyncStateChanged sync_state_changed = 7 [(module) = "framework"];
87 ScheduledJobStateChanged scheduled_job_state_changed = 8 [(module) = "framework"];
88 ScreenBrightnessChanged screen_brightness_changed = 9 [(module) = "framework"];
89 WakelockStateChanged wakelock_state_changed = 10 [(module) = "framework"];
90 LongPartialWakelockStateChanged long_partial_wakelock_state_changed =
91 11 [(module) = "framework"];
92 MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12 [(module) = "framework"];
93 WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"];
94 ActivityManagerSleepStateChanged activity_manager_sleep_state_changed =
95 14 [(module) = "framework"];
96 MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"];
97 ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"];
98 CachedKillReported cached_kill_reported = 17 [(module) = "framework"];
99 ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800100 LauncherUIChanged launcher_event = 19 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800101 BatterySaverModeStateChanged battery_saver_mode_state_changed = 20 [(module) = "framework"];
102 DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"];
103 DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"];
104 AudioStateChanged audio_state_changed = 23 [(module) = "framework"];
105 MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"];
106 CameraStateChanged camera_state_changed = 25 [(module) = "framework"];
107 FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"];
108 UidProcessStateChanged uid_process_state_changed = 27 [(module) = "framework"];
109 ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28 [(module) = "framework"];
110 ScreenStateChanged screen_state_changed = 29 [(module) = "framework"];
111 BatteryLevelChanged battery_level_changed = 30 [(module) = "framework"];
112 ChargingStateChanged charging_state_changed = 31 [(module) = "framework"];
113 PluggedStateChanged plugged_state_changed = 32 [(module) = "framework"];
114 InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"];
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -0800115 TouchEventReported touch_event_reported = 34;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800116 WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"];
117 KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800118 WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"];
119 WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"];
120 WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800121 PhoneSignalStrengthChanged phone_signal_strength_changed = 40 [(module) = "framework"];
122 SettingChanged setting_changed = 41 [(module) = "framework"];
123 ActivityForegroundStateChanged activity_foreground_state_changed =
124 42 [(module) = "framework"];
125 IsolatedUidChanged isolated_uid_changed = 43 [(module) = "framework"];
126 PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"];
127 WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"];
Bookatz8fcd09a2017-12-18 13:01:10 -0800128 AnomalyDetected anomaly_detected = 46;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800129 AppBreadcrumbReported app_breadcrumb_reported =
130 47 [(allow_from_any_uid) = true, (module) = "framework"];
131 AppStartOccurred app_start_occurred = 48 [(module) = "framework"];
132 AppStartCanceled app_start_canceled = 49 [(module) = "framework"];
133 AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"];
Muhammad Qureshi79f068c2019-12-20 06:55:57 -0800134 LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800135 PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800136 WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"];
Muhammad Qureshi79f068c2019-12-20 06:55:57 -0800137 LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800138 AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"];
139 ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"];
Tej Singh6483ea42018-01-25 17:45:49 -0800140 BootSequenceReported boot_sequence_reported = 57;
Andrei Oneada01ea52019-01-30 15:28:36 +0000141 DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800142 OverlayStateChanged overlay_state_changed = 59 [(module) = "framework"];
143 ForegroundServiceStateChanged foreground_service_state_changed
144 = 60 [(module) = "framework"];
Muhammad Qureshidbe9e812020-01-25 07:41:39 -0800145 CallStateChanged call_state_changed = 61 [(module) = "telecom"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800146 KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
147 KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
148 KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800149 AppDied app_died = 65 [(module) = "framework"];
150 ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"];
151 BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800152 BluetoothConnectionStateChanged bluetooth_connection_state_changed =
153 68 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800154 GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"];
155 UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"];
Andrew Chant28d627e2018-02-22 15:17:05 -0800156 SpeakerImpedanceReported speaker_impedance_reported = 71;
157 HardwareFailed hardware_failed = 72;
158 PhysicalDropDetected physical_drop_detected = 73;
159 ChargeCyclesReported charge_cycles_reported = 74;
Muhammad Qureshia4efed82020-01-23 13:53:51 -0800160 MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"];
161 MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800162 UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"];
163 AppCrashOccurred app_crash_occurred = 78 [(module) = "framework"];
164 ANROccurred anr_occurred = 79 [(module) = "framework"];
165 WTFOccurred wtf_occurred = 80 [(module) = "framework"];
166 LowMemReported low_mem_reported = 81 [(module) = "framework"];
Howard Rocb767f62018-06-19 19:58:05 -0700167 GenericAtom generic_atom = 82;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800168 KeyValuePairsAtom key_value_pairs_atom =
169 83 [(allow_from_any_uid) = true, (module) = "framework"];
170 VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"];
171 DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"];
Tej Singha72344992019-04-17 18:55:08 -0700172 ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800173 BiometricAcquired biometric_acquired = 87 [(module) = "framework"];
174 BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"];
175 BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"];
176 UiEventReported ui_event_reported = 90 [(module) = "framework"];
Howard Roa46b6582018-09-18 16:45:02 -0700177 BatteryHealthSnapshot battery_health_snapshot = 91;
178 SlowIo slow_io = 92;
179 BatteryCausedShutdown battery_caused_shutdown = 93;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800180 PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"];
181 PhoneStateChanged phone_state_changed = 95 [(module) = "framework"];
arangelovd5db50e2018-10-12 20:24:39 +0100182 UserRestrictionChanged user_restriction_changed = 96;
Muhammad Qureshi9afad812020-01-23 15:04:59 -0800183 SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800184 ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"];
Chenjie Yu75b3c492018-10-06 21:45:19 -0700185 // TODO: service state change is very noisy shortly after boot, as well
186 // as at other transitions - coming out of doze, device plugged in, etc.
187 // Consider removing this if it becomes a problem
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800188 ServiceStateChanged service_state_changed = 99 [(module) = "framework"];
189 ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"];
190 FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"];
191 BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "framework"];
192 DevicePolicyEvent device_policy_event = 103 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800193 DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"];
194 DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported =
195 105 [(module) = "docsui"];
196 DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"];
197 DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"];
198 DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request =
199 108 [(module) = "docsui"];
200 DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"];
201 DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"];
202 DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"];
203 DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800204 WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"];
205 WifiRunningStateChanged wifi_running_state_changed = 114 [(module) = "framework"];
206 AppCompacted app_compacted = 115 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800207 NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"];
shawnlin9a1392a2019-04-09 16:21:17 +0800208 DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported =
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800209 117 [(module) = "docsui"];
210 DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"];
211 DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"];
212 DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"];
213 DataStallEvent data_stall_event = 121 [(module) = "network_stack"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800214 RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"];
215 SignedConfigReported signed_config_reported = 123 [(module) = "framework"];
216 GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800217 BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event =
218 125 [(module) = "bluetooth"];
219 BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed =
220 126 [(module) = "bluetooth"];
221 BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed =
222 127 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800223 AppDowngraded app_downgraded = 128 [(module) = "framework"];
Felix Lopez Luisd95346a2018-12-12 10:32:32 +0000224 AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800225 LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"];
226 GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"];
227 GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"];
Maggie Whitefc1aa592018-11-28 21:55:23 -0800228 UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
Muhammad Qureshif9a5ab02020-01-25 19:43:27 -0800229 NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"];
230 NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"];
231 NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"];
232 NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"];
233 NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"];
234 NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"];
Muhammad Qureshi70dfeb42020-01-24 20:11:44 -0800235 SeStateChanged se_state_changed = 140 [(module) = "secure_element"];
236 SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800237 BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported =
238 142 [(module) = "framework"];
239 AttentionManagerServiceResultReported attention_manager_service_result_reported =
240 143 [(module) = "framework"];
241 AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"];
Carter Hsub8fd1e92019-01-11 15:24:45 +0800242 SpeechDspStatReported speech_dsp_stat_reported = 145;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800243 UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"];
244 WatchdogRollbackOccurred watchdog_rollback_occurred = 147 [(module) = "framework"];
245 BiometricSystemHealthIssueDetected biometric_system_health_issue_detected =
246 148 [(module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800247 BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800248 ScheduledJobConstraintChanged scheduled_job_constraint_changed =
249 150 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800250 BluetoothActiveDeviceChanged bluetooth_active_device_changed =
251 151 [(module) = "bluetooth"];
252 BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed =
253 152 [(module) = "bluetooth"];
254 BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed =
255 153 [(module) = "bluetooth"];
256 BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed =
257 154 [(module) = "bluetooth"];
258 BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported =
259 155 [(module) = "bluetooth"];
260 BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported =
261 156 [(module) = "bluetooth"];
262 BluetoothDeviceRssiReported bluetooth_device_rssi_reported =
263 157 [(module) = "bluetooth"];
264 BluetoothDeviceFailedContactCounterReported
265 bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"];
266 BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported =
267 159 [(module) = "bluetooth"];
268 BluetoothHciTimeoutReported bluetooth_hci_timeout_reported =
269 160 [(module) = "bluetooth"];
270 BluetoothQualityReportReported bluetooth_quality_report_reported =
271 161 [(module) = "bluetooth"];
272 BluetoothDeviceInfoReported bluetooth_device_info_reported =
273 162 [(module) = "bluetooth"];
274 BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported =
275 163 [(module) = "bluetooth"];
276 BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported =
277 164 [(module) = "bluetooth"];
278 BluetoothBondStateChanged bluetooth_bond_state_changed =
279 165 [(module) = "bluetooth"];
280 BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported =
281 166 [(module) = "bluetooth"];
282 BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported =
283 167 [(module) = "bluetooth"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800284 ScreenTimeoutExtensionReported screen_timeout_extension_reported =
285 168 [(module) = "framework"];
286 ProcessStartTime process_start_time = 169 [(module) = "framework"];
Philip P. Moltmannb2f0c772019-04-11 14:41:21 -0700287 PermissionGrantRequestResultReported permission_grant_request_result_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800288 170 [(module) = "permissioncontroller"];
Jack He815cdba2019-01-30 17:24:55 -0800289 BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
Muhammad Qureshied8bca02020-01-24 16:07:49 -0800290 DeviceIdentifierAccessDenied device_identifier_access_denied =
291 172 [(module) = "telephony_common"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800292 BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"];
Muhammad Qureshi76b25242020-01-25 19:02:08 -0800293 AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"];
294 AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"];
295 AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800296 TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"];
297 HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true, (module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800298 StyleUIChanged style_ui_changed = 179 [(module) = "sysui"];
Joel Galenson6f41b1062019-04-16 12:22:41 -0700299 PrivacyIndicatorsInteracted privacy_indicators_interacted =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800300 180 [(module) = "permissioncontroller"];
301 AppInstallOnExternalStorageReported app_install_on_external_storage_reported =
302 181 [(module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800303 NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800304 AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"];
305 BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"];
306 SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"];
307 TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"];
Muhammad Qureshi100d2b62020-01-23 10:30:41 -0800308 BluetoothClassOfDeviceReported bluetooth_class_of_device_reported =
309 187 [(module) = "bluetooth"];
Ben Blount763a5d52019-04-10 11:48:58 -0700310 IntelligenceEventReported intelligence_event_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800311 188 [(module) = "intelligence"];
312 ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed =
313 189 [(module) = "framework"];
Hai Zhang5d3328d2019-04-13 21:25:06 +0800314 RoleRequestResultReported role_request_result_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800315 190 [(module) = "permissioncontroller"];
Ray Essick8ab04df2019-02-15 11:01:02 -0800316 MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191;
317 MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192;
318 MediametricsAudiothreadReported mediametrics_audiothread_reported = 193;
319 MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194;
320 MediametricsCodecReported mediametrics_codec_reported = 195;
321 MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196;
322 MediametricsExtractorReported mediametrics_extractor_reported = 197;
323 MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
324 MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
325 MediametricsRecorderReported mediametrics_recorder_reported = 200;
Robert Shiha4beed32019-08-19 14:15:23 -0700326 MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201;
Muhammad Qureshi4ba4bac2020-01-25 23:48:53 -0800327 CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"];
328 GarageModeInfo garage_mode_info = 204 [(module) = "car"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800329 TestAtomReported test_atom_reported = 205 [(module) = "cts"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800330 ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported =
331 206 [(module) = "framework"];
332 ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"];
333 ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"];
334 ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"];
335 LocationManagerApiUsageReported location_manager_api_usage_reported =
336 210 [(module) = "framework"];
Stanislav Zholninbdf620b2019-06-06 22:38:33 +0100337 ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800338 211 [(module) = "permissioncontroller"];
Stanislav Zholnin247d1b72019-06-06 21:28:44 +0100339 RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800340 212 [(module) = "permissioncontroller"];
Stanislav Zholninbdf620b2019-06-06 22:38:33 +0100341 GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800342 213 [(module) = "permissioncontroller"];
Stanislav Zholnin375e2ab2019-05-29 13:07:35 +0100343 LocationAccessCheckNotificationAction location_access_check_notification_action =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800344 214 [(module) = "permissioncontroller"];
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +0100345 AppPermissionFragmentActionReported app_permission_fragment_action_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800346 215 [(module) = "permissioncontroller"];
Stanislav Zholninc9dda9e2019-06-02 20:50:13 +0100347 AppPermissionFragmentViewed app_permission_fragment_viewed =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800348 216 [(module) = "permissioncontroller"];
Stanislav Zholnindc3e2b32019-06-06 18:10:14 +0100349 AppPermissionsFragmentViewed app_permissions_fragment_viewed =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800350 217 [(module) = "permissioncontroller"];
Stanislav Zholnin32a89c12019-06-04 14:59:21 +0100351 PermissionAppsFragmentViewed permission_apps_fragment_viewed =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800352 218 [(module) = "permissioncontroller"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800353 TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"];
354 TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"];
355 ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"];
356 LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800357 ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"];
Muhammad Qureshi9bced7d2020-01-16 15:22:12 -0800358 BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"];
Tianjie Xu167c3db2019-07-22 14:25:14 -0700359 UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225;
360 UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800361 CameraActionEvent camera_action_event = 227 [(module) = "framework"];
atrost01a20932019-08-28 15:40:37 +0100362 AppCompatibilityChangeReported app_compatibility_change_reported =
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800363 228 [(allow_from_any_uid) = true, (module) = "framework"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800364 PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
Muhammad Qureshi4ba4bac2020-01-25 23:48:53 -0800365 VmsClientConnectionStateChanged vms_client_connection_state_changed =
366 230 [(module) = "car"];
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800367 MediaProviderScanEvent media_provider_scan_event = 233 [(module) = "mediaprovider"];
368 MediaProviderDeletionEvent media_provider_deletion_event = 234 [(module) = "mediaprovider"];
Jeff Sharkey6bd21572019-11-15 20:45:33 -0700369 MediaProviderPermissionEvent media_provider_permission_event =
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800370 235 [(module) = "mediaprovider"];
371 MediaProviderSchemaChange media_provider_schema_change = 236 [(module) = "mediaprovider"];
Jeff Sharkey6bd21572019-11-15 20:45:33 -0700372 MediaProviderIdleMaintenance media_provider_idle_maintenance =
Muhammad Qureshibcf66062019-12-23 17:55:48 -0800373 237 [(module) = "mediaprovider"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800374 RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"];
375 BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"];
376 BootTimeEventElapsedTime boot_time_event_elapsed_time_reported =
377 240 [(module) = "framework"];
Keun young Park3e033cb2019-12-18 11:27:35 -0800378 BootTimeEventUtcTime boot_time_event_utc_time_reported = 241;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800379 BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"];
Nikita Ioffe41dd57e2020-01-10 16:05:08 +0000380 UserspaceRebootReported userspace_reboot_reported = 243;
Muhammad Qureshi550b84c2020-02-03 14:17:59 -0800381 NotificationReported notification_reported = 244 [(module) = "framework"];
Will Brockman079fdaa2020-01-12 16:45:03 -0500382 NotificationPanelReported notification_panel_reported = 245;
383 NotificationChannelModified notification_panel_modified = 246;
Muhammad Qureshie2b24322020-01-28 10:54:17 -0800384 IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"];
385 IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"];
Jordan Liubedfa702019-12-20 15:08:45 -0800386 CellBroadcastMessageReported cb_message_reported =
387 249 [(module) = "cellbroadcast"];
388 CellBroadcastMessageError cb_message_error =
389 250 [(module) = "cellbroadcast"];
xshu2c3d9e42019-09-26 17:54:02 -0700390 WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"];
391 WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"];
392 WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"];
Yao Chend54f9dd2017-10-17 17:37:48 +0000393 }
David Chenc8a43242017-10-17 16:23:28 -0700394
David Chen6e3e6cb2018-01-03 16:14:06 -0800395 // Pulled events will start at field 10000.
Rafal Slawikbdd5a502020-01-14 14:14:29 +0000396 // Next: 10071
David Chenc8a43242017-10-17 16:23:28 -0700397 oneof pulled {
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800398 WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
399 WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
400 MobileBytesTransfer mobile_bytes_transfer = 10002 [(module) = "framework"];
401 MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003 [(module) = "framework"];
402 BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"];
403 KernelWakelock kernel_wakelock = 10004 [(module) = "framework"];
Chenjie Yuc8b7f222018-01-11 23:25:57 -0800404 SubsystemSleepState subsystem_sleep_state = 10005;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800405 CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"];
406 CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework"];
407 CpuTimePerUidFreq cpu_time_per_uid_freq = 10010 [(module) = "framework"];
408 WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"];
409 ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"];
410 BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"];
411 ProcessMemoryState process_memory_state = 10013 [(module) = "framework"];
412 SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"];
413 SystemUptime system_uptime = 10015 [(module) = "framework"];
414 CpuActiveTime cpu_active_time = 10016 [(module) = "framework"];
415 CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"];
Tej Singh86dc9db2018-09-06 00:39:57 +0000416 DiskSpace disk_space = 10018 [deprecated=true];
Jeffrey Huang43f4d262020-01-30 14:03:31 -0800417 RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"];
418 FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800419 Temperature temperature = 10021 [(module) = "framework"];
420 BinderCalls binder_calls = 10022 [(module) = "framework"];
421 BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"];
422 LooperStats looper_stats = 10024 [(module) = "framework"];
423 DiskStats disk_stats = 10025 [(module) = "framework"];
424 DirectoryUsage directory_usage = 10026 [(module) = "framework"];
425 AppSize app_size = 10027 [(module) = "framework"];
426 CategorySize category_size = 10028 [(module) = "framework"];
427 ProcStats proc_stats = 10029 [(module) = "framework"];
Jeffrey Huang43f4d262020-01-30 14:03:31 -0800428 BatteryVoltage battery_voltage = 10030 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800429 NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"];
430 DiskIo disk_io = 10032 [(module) = "framework"];
431 PowerProfile power_profile = 10033 [(module) = "framework"];
432 ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"];
433 ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"];
434 CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"];
Bookatz92da2832018-11-01 18:10:03 -0700435 OnDevicePowerMeasurement on_device_power_measurement = 10038;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800436 DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"];
437 DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid =
438 10040 [(module) = "framework"];
439 DeviceCalculatedPowerBlameOther device_calculated_power_blame_other =
440 10041 [(module) = "framework"];
441 ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"];
Jeffrey Huang9a3c1b62020-01-27 17:33:13 -0800442 BatteryLevel battery_level = 10043 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800443 BuildInformation build_information = 10044 [(module) = "framework"];
Jeffrey Huang43f4d262020-01-30 14:03:31 -0800444 BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800445 DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"];
446 DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"];
447 NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"];
448 RoleHolder role_holder = 10049 [(module) = "framework"];
449 DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"];
Chenjie Yue13f44a2019-02-07 17:51:38 -0800450 TrainInfo train_info = 10051;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800451 TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"];
452 ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"];
Yiwei Zhang5c81b632019-03-01 15:39:46 -0800453 GpuStatsGlobalInfo gpu_stats_global_info = 10054;
454 GpuStatsAppInfo gpu_stats_app_info = 10055;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800455 SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"];
456 AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"];
457 FaceSettings face_settings = 10058 [(module) = "framework"];
458 CoolingDevice cooling_device = 10059 [(module) = "framework"];
459 AppOps app_ops = 10060 [(module) = "framework"];
460 ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"];
Alec Mourie088e762019-07-02 13:10:55 -0700461 SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062;
462 SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063;
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800463 ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"];
Muhammad Qureshi4ba4bac2020-01-25 23:48:53 -0800464 VmsClientStats vms_client_stats = 10065 [(module) = "car"];
Muhammad Qureshi1f6dc942020-01-27 16:36:45 -0800465 NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"];
466 DangerousPermissionStateSampled dangerous_permission_state_sampled =
467 10067 [(module) = "framework"];
Stan Iliev637ba5e2019-08-16 13:43:08 -0400468 GraphicsStats graphics_stats = 10068;
Stanislav Zholnin88c6f322020-01-29 14:48:11 +0000469 RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"];
Kenny Root6c218db2020-02-02 17:43:44 +0000470 IonHeapSize ion_heap_size = 10070 [(module) = "framework"];
David Chenc8a43242017-10-17 16:23:28 -0700471 }
yroa1fe77c2018-02-26 14:22:54 -0800472
Bookatz76aafcf2018-09-17 16:17:10 -0700473 // DO NOT USE field numbers above 100,000 in AOSP.
474 // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
475 // Field numbers 200,000 and above are reserved for future use; do not use them at all.
Rafal Slawik203c3db2019-09-25 19:53:01 +0100476
477 reserved 10036;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700478}
479
Yao Chend54f9dd2017-10-17 17:37:48 +0000480/**
Yangster-mac20877162017-12-22 17:19:39 -0800481 * This proto represents a node of an attribution chain.
482 * Note: All attribution chains are represented as a repeated field of type
483 * AttributionNode. It is understood that in such arrays, the order is that
484 * of calls, that is [A, B, C] if A calls B that calls C.
Yao Chend54f9dd2017-10-17 17:37:48 +0000485 */
Yangster-mac20877162017-12-22 17:19:39 -0800486message AttributionNode {
487 // The uid for a given element in the attribution chain.
Yangster-mac7604aea2017-12-11 22:55:49 -0800488 optional int32 uid = 1;
Yangster-mac7604aea2017-12-11 22:55:49 -0800489
Yangster-mac20877162017-12-22 17:19:39 -0800490 // The (optional) string tag for an element in the attribution chain. If the
491 // element has no tag, it is encoded as an empty string.
492 optional string tag = 2;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700493}
494
Yangster-mac48b3d622018-08-18 12:38:11 -0700495message KeyValuePair {
496 optional int32 key = 1;
497 oneof value {
Howard Ro4078dd42018-09-27 17:41:08 -0700498 int32 value_int = 2;
499 int64 value_long = 3;
500 string value_str = 4;
501 float value_float = 5;
Yangster-mac48b3d622018-08-18 12:38:11 -0700502 }
503}
504
505message KeyValuePairsAtom {
506 optional int32 uid = 1;
507 repeated KeyValuePair pairs = 2;
508}
509
Yao Chend54f9dd2017-10-17 17:37:48 +0000510/*
511 * *****************************************************************************
yrode4ca102017-11-15 22:57:24 -0800512 * Below are all of the individual atoms that are logged by Android via statsd.
Yao Chend54f9dd2017-10-17 17:37:48 +0000513 *
514 * RULES:
515 * - The field ids for each atom must start at 1, and count upwards by 1.
516 * Skipping field ids is not allowed.
517 * - These form an API, so renaming, renumbering or removing fields is
518 * not allowed between android releases. (This is not currently enforced,
519 * but there will be a tool to enforce this restriction).
520 * - The types must be built-in protocol buffer types, namely, no sub-messages
521 * are allowed (yet). The bytes type is also not allowed.
522 * - The CamelCase name of the message type should match the
Stefan Lafonae2df012017-11-14 09:17:21 -0800523 * underscore_separated name as defined in Atom.
Yao Chend54f9dd2017-10-17 17:37:48 +0000524 * - If an atom represents work that can be attributed to an app, there can
Yangster-mac7604aea2017-12-11 22:55:49 -0800525 * be exactly one AttributionChain field. It must be field number 1.
Yao Chend54f9dd2017-10-17 17:37:48 +0000526 * - A field that is a uid should be a string field, tagged with the [xxx]
527 * annotation. The generated code on android will be represented by UIDs,
528 * and those UIDs will be translated in xxx to those strings.
529 *
530 * CONVENTIONS:
Bookatzc1a050a2017-10-10 15:49:28 -0700531 * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange.
Yao Chend54f9dd2017-10-17 17:37:48 +0000532 * - If there is a UID, it goes first. Think in an object-oriented fashion.
533 * *****************************************************************************
534 */
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700535
Yao Chend54f9dd2017-10-17 17:37:48 +0000536/**
Tej Singha72344992019-04-17 18:55:08 -0700537 * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged.
Yangster-mace16189a2018-08-26 12:20:16 -0700538 * Logs when the Thermal service HAL notifies the throttling start/stop events.
539 *
540 * Logged from:
541 * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
542 */
543message ThermalThrottlingStateChanged {
Maggie White442b6312019-04-05 16:26:44 -0700544 // The type of temperature being reported (CPU, GPU, SKIN, etc)
Yangster-mace16189a2018-08-26 12:20:16 -0700545 optional android.os.TemperatureTypeEnum sensor_type = 1;
546
Maggie White442b6312019-04-05 16:26:44 -0700547 // Throttling state, this field is DEPRECATED
Yangster-mace16189a2018-08-26 12:20:16 -0700548 enum State {
549 UNKNOWN = 0;
Maggie White442b6312019-04-05 16:26:44 -0700550 START = 1; // START indicated that throttling was triggered.
551 STOP = 2; // STOP indicates that throttling was cleared.
Yangster-mace16189a2018-08-26 12:20:16 -0700552 }
Yangster-mace16189a2018-08-26 12:20:16 -0700553 optional State state = 2;
554
555 optional float temperature = 3;
556}
557
558/**
Yao Chend54f9dd2017-10-17 17:37:48 +0000559 * Logs when the screen state changes.
560 *
561 * Logged from:
562 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
563 */
564message ScreenStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -0800565 // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
tsaichristine5adc7e02020-01-14 17:07:39 -0800566 optional android.view.DisplayStateEnum state = 1
567 [(state_field_option).option = EXCLUSIVE_STATE, (state_field_option).nested = false];
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700568}
Yao Chend54f9dd2017-10-17 17:37:48 +0000569
570/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700571 * Logs that the process state of the uid, as determined by ActivityManager
572 * (i.e. the highest process state of that uid's processes) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +0000573 *
574 * Logged from:
575 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
576 */
Bookatzc1a050a2017-10-10 15:49:28 -0700577message UidProcessStateChanged {
tsaichristine5adc7e02020-01-14 17:07:39 -0800578 optional int32 uid = 1 [(state_field_option).option = PRIMARY_FIELD, (is_uid) = true];
Yao Chend54f9dd2017-10-17 17:37:48 +0000579
Bookatzdb026a22018-01-10 19:01:56 -0800580 // The state, from frameworks/base/core/proto/android/app/enums.proto.
tsaichristine5adc7e02020-01-14 17:07:39 -0800581 optional android.app.ProcessStateEnum state = 2
582 [(state_field_option).option = EXCLUSIVE_STATE, (state_field_option).nested = false];
Yao Chend54f9dd2017-10-17 17:37:48 +0000583}
584
585/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700586 * Logs process state change of a process, as per the activity manager.
587 *
588 * Logged from:
589 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
590 */
591message ProcessStateChanged {
592 optional int32 uid = 1;
593 optional string process_name = 2;
594 optional string package_name = 3;
595 // TODO: remove this when validation is done
596 optional int64 version = 5;
597 // The state, from frameworks/base/core/proto/android/app/enums.proto.
598 optional android.app.ProcessStateEnum state = 4;
599}
600
601/**
602 * Logs when ActivityManagerService sleep state is changed.
603 *
604 * Logged from:
605 * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java
606 */
607message ActivityManagerSleepStateChanged {
608 // TODO: import frameworks proto
609 enum State {
610 UNKNOWN = 0;
611 ASLEEP = 1;
612 AWAKE = 2;
613 }
tsaichristine5adc7e02020-01-14 17:07:39 -0800614 optional State state = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700615}
616
617/**
618 * Logs when system memory state changes.
619 *
620 * Logged from:
621 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
622 */
623message MemoryFactorStateChanged {
624 // TODO: import frameworks proto
625 enum State {
626 MEMORY_UNKNOWN = 0;
627 NORMAL = 1; // normal.
628 MODERATE = 2; // moderate memory pressure.
629 LOW = 3; // low memory.
630 CRITICAL = 4; // critical memory.
631
632 }
tsaichristine5adc7e02020-01-14 17:07:39 -0800633 optional State factor = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700634}
635
636/**
637 * Logs when app is using too much cpu, according to ActivityManagerService.
638 *
639 * Logged from:
640 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
641 */
642message ExcessiveCpuUsageReported {
643 optional int32 uid = 1;
644 optional string process_name = 2;
645 optional string package_name = 3;
646 // package version. TODO: remove this when validation is done
647 optional int64 version = 4;
648}
649
650/**
651 * Logs when a cached process is killed, along with its pss.
652 *
653 * Logged from:
654 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
655 */
656message CachedKillReported {
657 optional int32 uid = 1;
658 optional string process_name = 2;
659 optional string package_name = 3;
660 // TODO: remove this when validation is done
661 optional int64 version = 5;
662 optional int64 pss = 4;
663}
664
665/**
xshu2c3d9e42019-09-26 17:54:02 -0700666 * Logs the change in wifi health.
667 *
668 * Logged from:
669 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java
670 */
671message WifiHealthStatReported {
672 // duration this stat is obtained over in milliseconds
673 optional int32 duration_millis = 1;
674 // whether wifi is classified as sufficient for the user's data traffic, determined
675 // by whether the calculated throughput exceeds the average demand within |duration_millis|
676 optional bool is_sufficient = 2;
677 // whether the calculated throughput is exceeds the minimum required for typical usage
678 optional bool is_throughput_good = 3;
679 // whether cellular data is available
680 optional bool is_cell_data_available = 4;
681 // the WLAN channel the connected network is on (ie. 2412)
682 optional int32 frequency = 5;
683}
684
685/**
686 * Logged when wifi detects a significant change in connection failure rate.
687 *
688 * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java
689 *
690 */
691message WifiFailureStatReported {
692 enum AbnormalityType {
693 UNKNOWN = 0;
694 SIGNIFICANT_INCREASE = 1;
695 SIGNIFICANT_DECREASE = 2;
696 SIMPLY_HIGH = 3;
697 }
698 enum FailureType {
699 FAILURE_UNKNOWN = 0;
700 FAILURE_CONNECTION = 1;
701 FAILURE_ASSOCIATION_REJECTION = 2;
702 FAILURE_ASSOCIATION_TIMEOUT = 3;
703 FAILURE_AUTHENTICATION = 4;
704 FAILURE_NON_LOCAL_DISCONNECTION = 5;
705 FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6;
706 }
707 // Reason for uploading this stat
708 optional AbnormalityType abnormality_type = 1;
709 // The particular type of failure
710 optional FailureType failure_type = 2;
711 // How many times we have encountered this combination of AbnormalityType and FailureType
712 optional int32 failure_count = 3;
713}
714
715/**
716 * Logs whether a wifi connection is successful and reasons for failure if it isn't.
717 *
718 * Logged from:
719 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
720 */
721message WifiConnectionResultReported {
722 enum FailureCode {
723 FAILURE_UNKNOWN = 0;
724 FAILURE_ASSOCIATION_TIMEOUT = 1;
725 FAILURE_ASSOCIATION_REJECTION = 2;
726 FAILURE_AUTHENTICATION_GENERAL = 3;
727 FAILURE_AUTHENTICATION_EAP = 4;
728 FAILURE_DHCP = 5;
729 FAILURE_NETWORK_DISCONNECTION = 6;
730 FAILURE_ROAM_TIMEOUT = 7;
731 }
732 // true represents a successful connection
733 optional bool connection_result = 1;
734 // reason for the connection failure
735 optional FailureCode failure_code = 2;
736 // scan rssi before the connection attempt
737 optional int32 rssi = 3;
738}
739
740/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700741 * Logs when memory stats of a process is reported.
742 *
743 * Logged from:
744 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
745 */
746message ProcessMemoryStatReported {
747 optional int32 uid = 1;
748 optional string process_name = 2;
749 optional string package_name = 3;
750 //TODO: remove this when validation is done
751 optional int64 version = 9;
752 optional int64 pss = 4;
753 optional int64 uss = 5;
754 optional int64 rss = 6;
755 enum Type {
756 ADD_PSS_INTERNAL_SINGLE = 0;
757 ADD_PSS_INTERNAL_ALL_MEM = 1;
758 ADD_PSS_INTERNAL_ALL_POLL = 2;
759 ADD_PSS_EXTERNAL = 3;
760 ADD_PSS_EXTERNAL_SLOW = 4;
761 }
762 optional Type type = 7;
Muhammad Qureshidda73202019-03-07 13:54:20 -0800763 optional int64 duration_millis = 8;
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700764}
765
766/**
Bookatzc1a050a2017-10-10 15:49:28 -0700767 * Logs that a process started, finished, crashed, or ANRed.
768 *
769 * Logged from:
770 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
771 */
772message ProcessLifeCycleStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -0700773 optional int32 uid = 1 [(is_uid) = true];
Bookatzc1a050a2017-10-10 15:49:28 -0700774
David Chen0b5c90c2018-01-25 16:51:49 -0800775 // The process name (usually same as the app name).
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800776 optional string process_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700777
Bookatzddccf0a2017-11-28 16:48:14 -0800778 // What lifecycle state the process changed to.
779 // This enum is specific to atoms.proto.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800780 enum State {
781 FINISHED = 0;
782 STARTED = 1;
783 CRASHED = 2;
Bookatzddccf0a2017-11-28 16:48:14 -0800784 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800785 optional State state = 3;
Bookatzc1a050a2017-10-10 15:49:28 -0700786}
787
Bookatzc1a050a2017-10-10 15:49:28 -0700788/**
789 * Logs when the ble scan state changes.
790 *
791 * Logged from:
Bookatz17a879d2018-03-28 15:05:28 -0700792 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700793 */
794message BleScanStateChanged {
tsaichristine5adc7e02020-01-14 17:07:39 -0800795 repeated AttributionNode attribution_node = 1
796 [(state_field_option).option = PRIMARY_FIELD_FIRST_UID];
Bookatzc1a050a2017-10-10 15:49:28 -0700797
798 enum State {
799 OFF = 0;
800 ON = 1;
Bookatze5ec0b42018-03-26 13:34:56 -0700801 // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
802 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700803 }
tsaichristine5adc7e02020-01-14 17:07:39 -0800804 optional State state = 2 [
805 (state_field_option).option = EXCLUSIVE_STATE,
806 (state_field_option).default_state_value = 0 /* State.OFF */,
807 (state_field_option).reset_state_value = 2 /* State.RESET */,
808 (state_field_option).nested = true
809 ];
Bookatzc1a050a2017-10-10 15:49:28 -0700810
Bookatze5ec0b42018-03-26 13:34:56 -0700811 // Does the scan have a filter.
tsaichristine5adc7e02020-01-14 17:07:39 -0800812 optional bool is_filtered = 3 [(state_field_option).option = PRIMARY_FIELD];
Bookatze5ec0b42018-03-26 13:34:56 -0700813 // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
tsaichristine5adc7e02020-01-14 17:07:39 -0800814 optional bool is_first_match = 4 [(state_field_option).option = PRIMARY_FIELD];
Bookatze5ec0b42018-03-26 13:34:56 -0700815 // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
tsaichristine5adc7e02020-01-14 17:07:39 -0800816 optional bool is_opportunistic = 5 [(state_field_option).option = PRIMARY_FIELD];
Bookatzc1a050a2017-10-10 15:49:28 -0700817}
818
819/**
820 * Logs reporting of a ble scan finding results.
821 *
822 * Logged from:
Bookatzae6738e2018-09-13 11:38:56 -0700823 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700824 */
Bookatzae6738e2018-09-13 11:38:56 -0700825// TODO: Consider also tracking per-scanner-id.
Bookatzc1a050a2017-10-10 15:49:28 -0700826message BleScanResultReceived {
Yangster-macafad8c62018-01-05 22:30:49 -0800827 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700828
829 // Number of ble scan results returned.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800830 optional int32 num_results = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700831}
832
833/**
834 * Logs when a sensor state changes.
835 *
836 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700837 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700838 */
839message SensorStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800840 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700841
Bookatzc1a050a2017-10-10 15:49:28 -0700842 // The id (int) of the sensor.
843 optional int32 sensor_id = 2;
844
845 enum State {
846 OFF = 0;
847 ON = 1;
848 }
849 optional State state = 3;
850}
851
Bookatzc1a050a2017-10-10 15:49:28 -0700852/**
853 * Logs when GPS state changes.
854 *
855 * Logged from:
856 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
857 */
858message GpsScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800859 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700860
861 enum State {
862 OFF = 0;
863 ON = 1;
864 }
865 optional State state = 2;
866}
867
Bookatz48d362e2018-11-06 15:49:08 -0800868/**
869 * Logs when GPS signal quality.
870 *
871 * Logged from:
872 * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
873 */
874message GpsSignalQualityChanged {
875 optional android.server.location.GpsSignalQualityEnum level = 1;
876}
877
Bookatzc1a050a2017-10-10 15:49:28 -0700878
879/**
880 * Logs when a sync manager sync state changes.
881 *
882 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700883 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700884 */
885message SyncStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800886 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700887
David Chen0b5c90c2018-01-25 16:51:49 -0800888 // Name of the sync (as named in the app). Can be chosen at run-time.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800889 optional string sync_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700890
891 enum State {
892 OFF = 0;
893 ON = 1;
894 }
895 optional State state = 3;
896}
897
Yangster-mac96353002018-09-05 11:18:55 -0700898/*
899 * Deferred job stats.
900 *
901 * Logged from:
902 * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
903*/
904message DeferredJobStatsReported {
905 repeated AttributionNode attribution_node = 1;
906
907 // Number of jobs deferred.
908 optional int32 num_jobs_deferred = 2;
909
910 // Time since the last job runs.
911 optional int64 time_since_last_job_millis = 3;
912}
913
Bookatzc1a050a2017-10-10 15:49:28 -0700914/**
915 * Logs when a job scheduler job state changes.
916 *
917 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700918 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700919 */
920message ScheduledJobStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800921 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700922
923 // Name of the job (as named in the app)
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800924 optional string job_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700925
926 enum State {
Tej Singhd5747a62018-01-08 20:57:35 -0800927 FINISHED = 0;
928 STARTED = 1;
929 SCHEDULED = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700930 }
931 optional State state = 3;
932
Tej Singh33a412b2018-03-16 18:43:59 -0700933 // The reason a job has stopped.
934 // This is only applicable when the state is FINISHED.
Bookatz235343d2018-03-26 13:03:50 -0700935 // The default value is STOP_REASON_UNKNOWN.
Tej Singh33a412b2018-03-16 18:43:59 -0700936 optional android.app.job.StopReasonEnum stop_reason = 4;
Ben Murdoch741e3352019-05-09 11:27:28 +0100937
938 // The standby bucket of the app that scheduled the job. These match the framework constants
939 // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is
940 // already assigned 0.
941 enum Bucket {
942 UNKNOWN = -1;
943 ACTIVE = 0;
944 WORKING_SET = 1;
945 FREQUENT = 2;
946 RARE = 3;
947 NEVER = 4;
Kweku Adamsae9d6be2020-01-14 16:10:14 -0800948 RESTRICTED = 5;
Ben Murdoch741e3352019-05-09 11:27:28 +0100949 }
950 optional Bucket standby_bucket = 5 [default = UNKNOWN];
951
952 // The job id (as assigned by the app).
953 optional int32 job_id = 6;
Bookatzc1a050a2017-10-10 15:49:28 -0700954}
955
956/**
957 * Logs when the audio state changes.
958 *
959 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700960 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700961 */
962message AudioStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800963 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700964
965 enum State {
966 OFF = 0;
967 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700968 // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
969 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700970 }
971 optional State state = 2;
972}
973
974/**
975 * Logs when the video codec state changes.
976 *
977 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700978 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700979 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800980message MediaCodecStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800981 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700982
983 enum State {
984 OFF = 0;
985 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700986 // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes).
987 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700988 }
989 optional State state = 2;
990}
991
992/**
993 * Logs when the flashlight state changes.
994 *
995 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700996 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700997 */
998message FlashlightStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800999 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001000
1001 enum State {
1002 OFF = 0;
1003 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -07001004 // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes).
1005 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -07001006 }
1007 optional State state = 2;
1008}
1009
1010/**
1011 * Logs when the camera state changes.
1012 *
1013 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -07001014 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -07001015 */
1016message CameraStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001017 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001018
1019 enum State {
1020 OFF = 0;
1021 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -07001022 // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes).
1023 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -07001024 }
1025 optional State state = 2;
1026}
1027
1028/**
1029 * Logs that the state of a wakelock (per app and per wakelock name) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +00001030 *
1031 * Logged from:
1032 * TODO
1033 */
Bookatzd6746242017-10-24 18:39:35 -07001034message WakelockStateChanged {
tsaichristineed615642020-01-02 12:53:41 -08001035 repeated AttributionNode attribution_node = 1
1036 [(state_field_option).option = PRIMARY_FIELD_FIRST_UID];
Yao Chend54f9dd2017-10-17 17:37:48 +00001037
Bookatz1a1b0462018-01-12 11:47:03 -08001038 // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
1039 // From frameworks/base/core/proto/android/os/enums.proto.
tsaichristine5adc7e02020-01-14 17:07:39 -08001040 optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).option = PRIMARY_FIELD];
tsaichristineed615642020-01-02 12:53:41 -08001041 ;
Bookatzc1a050a2017-10-10 15:49:28 -07001042
1043 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
tsaichristine5adc7e02020-01-14 17:07:39 -08001044 optional string tag = 3 [(state_field_option).option = PRIMARY_FIELD];
Bookatzc1a050a2017-10-10 15:49:28 -07001045
1046 enum State {
Yangster-maccfdf3a42017-12-06 13:42:38 -08001047 RELEASE = 0;
1048 ACQUIRE = 1;
1049 CHANGE_RELEASE = 2;
1050 CHANGE_ACQUIRE = 3;
Bookatzc1a050a2017-10-10 15:49:28 -07001051 }
tsaichristine5adc7e02020-01-14 17:07:39 -08001052 optional State state = 4 [
1053 (state_field_option).option = EXCLUSIVE_STATE,
1054 (state_field_option).default_state_value = 0,
1055 (state_field_option).nested = true
1056 ];
Bookatzc1a050a2017-10-10 15:49:28 -07001057}
1058
1059/**
Bookatzc1a050a2017-10-10 15:49:28 -07001060 * Logs when a partial wakelock is considered 'long' (over 1 min).
1061 *
1062 * Logged from:
1063 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
1064 */
1065message LongPartialWakelockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001066 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001067
Yao Chend54f9dd2017-10-17 17:37:48 +00001068 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
1069 optional string tag = 2;
1070
Bookatzc1a050a2017-10-10 15:49:28 -07001071 // TODO: I have no idea what this is.
1072 optional string history_tag = 3;
1073
1074 enum State {
1075 OFF = 0;
1076 ON = 1;
1077 }
1078 optional State state = 4;
Yao Chend54f9dd2017-10-17 17:37:48 +00001079}
1080
Bookatzc1a050a2017-10-10 15:49:28 -07001081/**
Bookatza66083f2018-09-20 17:24:00 -07001082 * Logs when the device is interactive, according to the PowerManager Notifier.
1083 *
1084 * Logged from:
1085 * frameworks/base/services/core/java/com/android/server/power/Notifier.java
1086 */
1087message InteractiveStateChanged {
1088 enum State {
1089 OFF = 0;
1090 ON = 1;
1091 }
1092 optional State state = 1;
1093}
1094
1095/**
Bookatzc1a050a2017-10-10 15:49:28 -07001096 * Logs Battery Saver state change.
1097 *
1098 * Logged from:
1099 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
1100 */
1101message BatterySaverModeStateChanged {
1102 enum State {
1103 OFF = 0;
1104 ON = 1;
1105 }
1106 optional State state = 1;
1107}
1108
1109/**
1110 * Logs Doze mode state change.
1111 *
1112 * Logged from:
Bookatzddccf0a2017-11-28 16:48:14 -08001113 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatzc1a050a2017-10-10 15:49:28 -07001114 */
1115message DeviceIdleModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -08001116 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001117}
1118
1119
1120/**
1121 * Logs state change of Doze mode including maintenance windows.
1122 *
1123 * Logged from:
1124 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
1125 */
1126message DeviceIdlingModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -08001127 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzc1a050a2017-10-10 15:49:28 -07001128}
1129
1130/**
1131 * Logs screen brightness level.
1132 *
1133 * Logged from:
1134 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1135 */
1136message ScreenBrightnessChanged {
1137 // Screen brightness level. Should be in [-1, 255] according to PowerManager.java.
1138 optional int32 level = 1;
Bookatz8c6571b2017-10-24 15:04:41 -07001139}
1140
1141/**
1142 * Logs battery level (percent full, from 0 to 100).
1143 *
1144 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001145 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001146 */
1147message BatteryLevelChanged {
1148 // Battery level. Should be in [0, 100].
1149 optional int32 battery_level = 1;
1150}
1151
1152/**
1153 * Logs change in charging status of the device.
1154 *
1155 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001156 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001157 */
1158message ChargingStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001159 // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
1160 optional android.os.BatteryStatusEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -07001161}
1162
1163/**
1164 * Logs whether the device is plugged in, and what power source it is using.
1165 *
1166 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001167 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001168 */
1169message PluggedStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001170 // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
1171 optional android.os.BatteryPluggedStateEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -07001172}
1173
Bookatz8c6571b2017-10-24 15:04:41 -07001174/**
1175 * Logs when an app's wakeup alarm fires.
1176 *
1177 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001178 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
Bookatz8c6571b2017-10-24 15:04:41 -07001179 */
1180message WakeupAlarmOccurred {
Yangster-macafad8c62018-01-05 22:30:49 -08001181 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001182
1183 // Name of the wakeup alarm.
1184 optional string tag = 2;
Bookatzcaf2293e2018-09-23 13:07:43 -07001185
1186 // Name of source package (for historical reasons, since BatteryStats tracked it).
1187 optional string package_name = 3;
Ben Murdoch3389f1522019-05-21 15:05:34 +01001188
1189 // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java.
1190 enum Bucket {
1191 UNKNOWN = 0;
1192 EXEMPTED = 5;
1193 ACTIVE = 10;
1194 WORKING_SET = 20;
1195 FREQUENT = 30;
1196 RARE = 40;
1197 NEVER = 50;
1198 }
1199 // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired.
1200 optional Bucket app_standby_bucket = 4;
Bookatzddccf0a2017-11-28 16:48:14 -08001201}
1202
1203/**
1204 * Logs when an an app causes the mobile radio to change state.
1205 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio.
1206 *
1207 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -07001208 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -08001209 */
1210message MobileRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08001211 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001212
Bookatz1a1b0462018-01-12 11:47:03 -08001213 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
1214 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatzddccf0a2017-11-28 16:48:14 -08001215}
1216
1217/**
1218 * Logs when an an app causes the wifi radio to change state.
1219 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio.
1220 *
1221 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -07001222 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -08001223 */
1224message WifiRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08001225 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001226
Bookatz1a1b0462018-01-12 11:47:03 -08001227 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
1228 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatz8c6571b2017-10-24 15:04:41 -07001229}
1230
1231/**
1232 * Logs kernel wakeup reasons and aborts.
1233 *
1234 * Logged from:
Bookatz56585ca2018-09-07 11:38:45 -07001235 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001236 */
1237message KernelWakeupReported {
1238 // Name of the kernel wakeup reason (or abort).
1239 optional string wakeup_reason_name = 1;
1240
1241 // Duration (in microseconds) for the wake-up interrupt to be serviced.
David Chen0b5c90c2018-01-25 16:51:49 -08001242 optional int64 duration_micros = 2;
Bookatze5885242017-10-24 20:10:31 -07001243}
1244
1245/**
Bookatzda1798c2018-12-13 14:16:00 -08001246 * Logs when Wifi is toggled on/off.
Bookatza0a1f8a2018-12-17 12:28:32 -08001247 * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled.
Bookatzda1798c2018-12-13 14:16:00 -08001248 *
1249 * Logged from:
1250 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1251 */
1252message WifiEnabledStateChanged {
1253 enum State {
1254 OFF = 0;
1255 ON = 1;
1256 }
1257 optional State state = 1;
1258}
1259
1260/**
1261 * Logs when an app causes Wifi to run. In this context, 'to run' means to use Wifi Client Mode.
Bookatza0a1f8a2018-12-17 12:28:32 -08001262 * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'.
1263 * Note that Wifi Scanning is monitored separately in WifiScanStateChanged.
Bookatzda1798c2018-12-13 14:16:00 -08001264 *
1265 * Logged from:
1266 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1267 */
1268message WifiRunningStateChanged {
1269 repeated AttributionNode attribution_node = 1;
1270
1271 enum State {
1272 OFF = 0;
1273 ON = 1;
1274 }
1275 optional State state = 2;
1276}
1277
1278/**
Bookatze5885242017-10-24 20:10:31 -07001279 * Logs wifi locks held by an app.
1280 *
1281 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001282 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07001283 */
1284message WifiLockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001285 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001286
1287 enum State {
1288 OFF = 0;
1289 ON = 1;
1290 }
1291 optional State state = 2;
Bookatz11257ca2018-12-05 18:22:39 -08001292
1293 // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto.
1294 optional android.net.wifi.WifiModeEnum mode = 3;
Bookatze5885242017-10-24 20:10:31 -07001295}
1296
1297/**
1298 * Logs wifi signal strength changes.
1299 *
1300 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001301 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
Bookatze5885242017-10-24 20:10:31 -07001302 */
1303message WifiSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001304 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
1305 optional android.telephony.SignalStrengthEnum signal_strength = 1;
Bookatze5885242017-10-24 20:10:31 -07001306}
1307
1308/**
1309 * Logs wifi scans performed by an app.
1310 *
1311 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001312 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
Bookatze5885242017-10-24 20:10:31 -07001313 */
1314message WifiScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001315 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001316
1317 enum State {
1318 OFF = 0;
1319 ON = 1;
1320 }
1321 optional State state = 2;
1322}
1323
1324/**
Tej Singh4503e102018-01-04 14:35:01 -08001325 * Logs wifi multicast locks held by an app
1326 *
1327 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001328 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java
Tej Singh4503e102018-01-04 14:35:01 -08001329 */
1330message WifiMulticastLockStateChanged {
1331 repeated AttributionNode attribution_node = 1;
1332
1333 enum State {
1334 OFF = 0;
1335 ON = 1;
1336 }
1337 optional State state = 2;
Bookatz819ea832018-11-28 16:53:31 -08001338
1339 optional string tag = 3;
Tej Singh4503e102018-01-04 14:35:01 -08001340}
1341
1342/**
Tej Singh1ea42892018-01-19 09:27:00 -08001343 * Logs shutdown reason and duration on next boot.
1344 *
1345 * Logged from:
1346 * frameworks/base/core/java/com/android/server/BootReceiver.java
1347 */
1348message ShutdownSequenceReported {
1349 // True if shutdown is for a reboot. Default: false if we do not know.
1350 optional bool reboot = 1;
1351
1352 // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>".
1353 optional string reason = 2;
1354
1355 // Beginning of shutdown time in ms using wall clock time since unix epoch.
1356 // Default: 0 if no start time received.
David Chen0b5c90c2018-01-25 16:51:49 -08001357 optional int64 start_time_millis = 3;
Tej Singh1ea42892018-01-19 09:27:00 -08001358
1359 // Duration of shutdown in ms. Default: 0 if no duration received.
David Chen0b5c90c2018-01-25 16:51:49 -08001360 optional int64 duration_millis = 4;
Tej Singh1ea42892018-01-19 09:27:00 -08001361}
1362
Tej Singh6483ea42018-01-25 17:45:49 -08001363
1364/**
1365 * Logs boot reason and duration.
1366 *
1367 * Logged from:
1368 * system/core/bootstat/bootstat.cpp
1369 */
1370message BootSequenceReported {
1371 // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list
1372 // Default: "<EMPTY>" if not available.
1373 optional string bootloader_reason = 1;
1374
1375 // Reason for system boot. Eg. bootloader, reboot,userrequested
1376 // Default: "<EMPTY>" if not available.
1377 optional string system_reason = 2;
1378
1379 // End of boot time in ms from unix epoch using system wall clock.
David Chen0b5c90c2018-01-25 16:51:49 -08001380 optional int64 end_time_millis = 3;
Tej Singh6483ea42018-01-25 17:45:49 -08001381
1382 // Total boot duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001383 optional int64 total_duration_millis = 4;
Tej Singh6483ea42018-01-25 17:45:49 -08001384
1385 // Bootloader duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001386 optional int64 bootloader_duration_millis = 5;
Tej Singh6483ea42018-01-25 17:45:49 -08001387
1388 // Time since last boot in ms. Default: 0 if not available.
1389 optional int64 time_since_last_boot = 6;
1390}
1391
Tej Singhc477d9c2018-02-05 18:31:39 -08001392
1393/**
1394 * Logs call state and disconnect cause (if applicable).
1395 *
1396 * Logged from:
1397 * packages/services/Telecomm/src/com/android/server/telecom/Call.java
1398 */
1399message CallStateChanged {
1400 // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED.
1401 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1402 optional android.telecom.CallStateEnum call_state = 1;
1403
1404 // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY.
1405 // This value is only applicable when the call_state is DISCONNECTED, and
1406 // should always be UNKNOWN if the call_state is not DISCONNECTED.
1407 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1408 optional android.telecom.DisconnectCauseEnum disconnect_cause = 2;
1409
1410 // True if the call is self-managed, which are apps that use the
1411 // telecom infrastructure to make their own calls.
1412 optional bool self_managed = 3;
1413
1414 // True if call is external. External calls are calls on connected Wear
1415 // devices but show up in Telecom so the user can pull them onto the device.
1416 optional bool external_call = 4;
1417}
1418
Tej Singh1ea42892018-01-19 09:27:00 -08001419/**
Tej Singhdd7bd352018-02-09 19:33:15 -08001420 * Logs keyguard state. The keyguard is the lock screen.
1421 *
1422 * Logged from:
1423 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
1424 */
1425message KeyguardStateChanged {
1426 enum State {
1427 UNKNOWN = 0;
1428 // The keyguard is hidden when the phone is unlocked.
1429 HIDDEN = 1;
1430 // The keyguard is shown when the phone is locked (screen turns off).
1431 SHOWN= 2;
1432 // The keyguard is occluded when something is overlaying the keyguard.
1433 // Eg. Opening the camera while on the lock screen.
1434 OCCLUDED = 3;
1435 }
1436 optional State state = 1;
1437}
1438
1439/**
1440 * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and
1441 * prompts the user to enter a password (pattern, pin, etc).
1442 *
1443 * Logged from:
1444 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
1445 */
1446
1447message KeyguardBouncerStateChanged {
1448 enum State {
1449 UNKNOWN = 0;
1450 // Bouncer is hidden, either as a result of successfully entering the
1451 // password, screen timing out, or user going back to lock screen.
1452 HIDDEN = 1;
1453 // This is when the user is being prompted to enter the password.
1454 SHOWN = 2;
1455 }
1456 optional State state = 1;
1457}
1458
1459/**
1460 * Logs the result of entering a password into the keyguard bouncer.
1461 *
1462 * Logged from:
1463 * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
1464 */
1465message KeyguardBouncerPasswordEntered {
1466 enum BouncerResult {
1467 UNKNOWN = 0;
1468 // The password entered was incorrect.
1469 FAILURE = 1;
1470 // The password entered was correct.
1471 SUCCESS = 2;
1472 }
1473 optional BouncerResult result = 1;
1474}
1475
Tej Singha883b372018-02-15 11:30:01 -08001476/*
1477 * Logs changes to the configuration of the device. The configuration is defined
1478 * in frameworks/base/core/java/android/content/res/Configuration.java
1479 * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html
1480 * Please go there to interpret the possible values each field can be.
1481 *
1482 * Logged from:
1483 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
1484 */
1485message ResourceConfigurationChanged {
1486 // Bit mask of color capabilities of the screen.
1487 // Contains information about the color gamut and hdr mode of the screen.
1488 // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode
Yangster-maca8a30442018-10-13 23:46:34 -07001489 optional int32 color_mode = 1;
Tej Singha883b372018-02-15 11:30:01 -08001490
1491 // The target screen density being rendered to.
1492 // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi
Yangster-maca8a30442018-10-13 23:46:34 -07001493 optional int32 density_dpi = 2;
Tej Singha883b372018-02-15 11:30:01 -08001494
1495 // Current user preference for the scaling factor for fonts,
1496 // relative to the base density scaling.
1497 // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale
Yangster-maca8a30442018-10-13 23:46:34 -07001498 optional float font_scale = 3;
Tej Singha883b372018-02-15 11:30:01 -08001499
1500 // Flag indicating whether the hard keyboard is hidden.
1501 // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001502 optional int32 hard_keyboard_hidden = 4;
Tej Singha883b372018-02-15 11:30:01 -08001503
1504 // The type of keyboard attached to the device.
1505 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard
1506 optional int32 keyboard = 5;
1507
1508 // Flag indicating whether any keyboard is available. Takes soft keyboards into account.
1509 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001510 optional int32 keyboard_hidden = 6;
Tej Singha883b372018-02-15 11:30:01 -08001511
1512 // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier.
1513 // 0 if undefined.
1514 // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc
1515 optional int32 mcc = 7;
1516
1517 // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier.
1518 // 0 if undefined. Note: the actual MNC may be 0, to check for this use the
1519 // MNC_ZERO symbol defined in Configuration.java.
1520 // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc
1521 optional int32 mnc = 8;
1522
1523 // The kind of navigation available on the device.
1524 // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation
1525 optional int32 navigation = 9;
1526
1527 // Flag indicating whether the navigation is available.
1528 // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001529 optional int32 navigation_hidden = 10;
Tej Singha883b372018-02-15 11:30:01 -08001530
1531 // Overall orientation of the screen.
1532 // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation
1533 optional int32 orientation = 11;
1534
1535 // The current height of the available screen space, in dp units.
1536 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp
Yangster-maca8a30442018-10-13 23:46:34 -07001537 optional int32 screen_height_dp = 12;
Tej Singha883b372018-02-15 11:30:01 -08001538
1539 // Bit mask of overall layout of the screen.
1540 // Contains information about screen size, whether the screen is wider/taller
1541 // than normal, whether the screen layout is right-tl-left or left-to-right,
1542 // and whether the screen has a rounded shape.
1543 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout
Yangster-maca8a30442018-10-13 23:46:34 -07001544 optional int32 screen_layout = 13;
Tej Singha883b372018-02-15 11:30:01 -08001545
1546 // Current width of the available screen space, in dp units.
1547 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001548 optional int32 screen_width_dp = 14;
Tej Singha883b372018-02-15 11:30:01 -08001549
1550 // The smallest screen size an application will see in normal operation.
1551 // This is the smallest value of both screenWidthDp and screenHeightDp
1552 // in portrait and landscape.
1553 // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001554 optional int32 smallest_screen_width_dp = 15;
Tej Singha883b372018-02-15 11:30:01 -08001555
1556 // The type of touch screen attached to the device.
1557 // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen
1558 optional int32 touchscreen = 16;
1559
1560 // Bit mask of the ui mode.
1561 // Contains information about the overall ui mode of the device.
1562 // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET
1563 // Also contains information about whether the device is in night mode.
1564 // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode
Yangster-maca8a30442018-10-13 23:46:34 -07001565 optional int32 ui_mode = 17;
Tej Singha883b372018-02-15 11:30:01 -08001566}
1567
Tej Singheee317b2018-03-07 19:28:05 -08001568
1569/**
1570 * Logs changes in the connection state of the mobile radio.
1571 *
1572 * Logged from:
1573 * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
1574 */
1575message MobileConnectionStateChanged {
1576 // States are from the state machine DataConnection.java.
1577 enum State {
1578 UNKNOWN = 0;
1579 // The connection is inactive, or disconnected.
1580 INACTIVE = 1;
1581 // The connection is being activated, or connecting.
1582 ACTIVATING = 2;
1583 // The connection is active, or connected.
1584 ACTIVE = 3;
1585 // The connection is disconnecting.
1586 DISCONNECTING = 4;
1587 // The connection is disconnecting after creating a connection.
1588 DISCONNECTION_ERROR_CREATING_CONNECTION = 5;
1589 }
1590 optional State state = 1;
1591 // For multi-sim phones, this distinguishes between the sim cards.
1592 optional int32 sim_slot_index = 2;
1593 // Used to identify the connection. Starts at 0 and increments by 1 for
1594 // every new network created. Resets whenever the device reboots.
1595 optional int32 data_connection_id = 3;
1596 // A bitmask for the capabilities of this connection.
1597 // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS.
1598 // Default value (if we have no information): 0
1599 optional int64 capabilities = 4;
1600 // If this connection has internet.
1601 // This just checks if the DEFAULT bit of capabilities is set.
1602 optional bool has_internet = 5;
1603}
1604
1605/**
1606 * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA.
1607 *
1608 * Logged from:
1609 * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
1610 */
1611message MobileRadioTechnologyChanged {
1612 optional android.telephony.NetworkTypeEnum state = 1;
1613 // For multi-sim phones, this distinguishes between the sim cards.
1614 optional int32 sim_slot_index = 2;
1615}
1616
Andrew Chantb56388b2018-03-22 21:07:33 -07001617/**
1618 * Logs the VID and PID of any connected USB devices.
1619 *
1620 * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present.
1621 *
1622 * Logged by Vendor.
1623 */
1624message UsbDeviceAttached {
1625 optional int32 vid = 1;
1626 optional int32 pid = 2;
1627 optional bool has_audio = 3;
1628 optional bool has_hid = 4;
1629 optional bool has_storage = 5;
Badhri Jagan Sridharan5ec629f2018-11-16 15:39:22 -08001630 enum State {
1631 STATE_DISCONNECTED = 0;
1632 STATE_CONNECTED = 1;
1633 }
1634 optional State state = 6;
Badhri Jagan Sridharanc2c54a22018-12-14 14:41:26 -08001635 optional int64 last_connect_duration_millis = 7;
Andrew Chantb56388b2018-03-22 21:07:33 -07001636}
1637
Tej Singheee317b2018-03-07 19:28:05 -08001638
Tej Singhdd7bd352018-02-09 19:33:15 -08001639/**
Tej Singh5d991e12018-03-09 19:48:11 -08001640 * Logs when Bluetooth is enabled and disabled.
1641 *
1642 * Logged from:
1643 * services/core/java/com/android/server/BluetoothManagerService.java
1644 */
1645message BluetoothEnabledStateChanged {
1646 repeated AttributionNode attribution_node = 1;
1647 // Whether or not bluetooth is enabled on the device.
1648 enum State {
1649 UNKNOWN = 0;
1650 ENABLED = 1;
1651 DISABLED = 2;
1652 }
1653 optional State state = 2;
1654 // The reason for being enabled/disabled.
1655 // Eg. Airplane mode, crash, application request.
1656 optional android.bluetooth.EnableDisableReasonEnum reason = 3;
1657 // If the reason is an application request, this will be the package name.
Yangster-maca8a30442018-10-13 23:46:34 -07001658 optional string pkg_name = 4;
Tej Singh5d991e12018-03-09 19:48:11 -08001659}
1660
1661/**
Jack Hed9837c82019-01-09 01:19:13 -08001662 * Logs when profiles on a Bluetooth device connects and disconnects.
Tej Singh5d991e12018-03-09 19:48:11 -08001663 *
1664 * Logged from:
Jack Hed9837c82019-01-09 01:19:13 -08001665 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
1666 *
1667 * Next Tag: 5
Tej Singh5d991e12018-03-09 19:48:11 -08001668 */
1669message BluetoothConnectionStateChanged {
1670 // The state of the connection.
1671 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1672 optional android.bluetooth.ConnectionStateEnum state = 1;
1673 // An identifier that can be used to match connect and disconnect events.
1674 // Currently is last two bytes of a hash of a device level ID and
1675 // the mac address of the bluetooth device that is connected.
Jack Hed9837c82019-01-09 01:19:13 -08001676 // Deprecated: use obfuscated_id instead, this one is always 0 for Q+
Jack Heac33c992019-04-03 16:08:21 -07001677 optional int32 obfuscated_id = 2 [deprecated = true];
Tej Singh5d991e12018-03-09 19:48:11 -08001678 // The profile that is connected. Eg. GATT, A2DP, HEADSET.
1679 // From android.bluetooth.BluetoothAdapter.java
Jack Hed9837c82019-01-09 01:19:13 -08001680 // Default: 0 when not used
Tej Singh5d991e12018-03-09 19:48:11 -08001681 optional int32 bt_profile = 3;
Jack Hed9837c82019-01-09 01:19:13 -08001682 // An identifier that can be used to match events for this device.
1683 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1684 // Salt: Randomly generated 256 bit value
1685 // Hash algorithm: HMAC-SHA256
1686 // Size: 32 byte
1687 // Default: null or empty if the device identifier is not known
Jack Heac33c992019-04-03 16:08:21 -07001688 optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
Jack Hed9837c82019-01-09 01:19:13 -08001689}
1690
1691/**
1692 * Logs when a Bluetooth device connects and disconnects over ACL
1693 *
1694 * Logged from:
1695 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
1696 *
1697 * Next Tag: 3
1698 */
1699message BluetoothAclConnectionStateChanged {
1700 // An identifier that can be used to match events for this device.
1701 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1702 // Salt: Randomly generated 256 bit value
1703 // Hash algorithm: HMAC-SHA256
1704 // Size: 32 byte
1705 // Default: null or empty if the device identifier is not known
1706 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1707 // The state of the connection.
1708 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1709 optional android.bluetooth.ConnectionStateEnum state = 2;
1710}
1711
1712/**
1713 * Logs when a Bluetooth device connects and disconnects over SCO
1714 *
1715 * Logged from:
1716 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
1717 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java
1718 *
1719 * Next Tag: 4
1720 */
1721message BluetoothScoConnectionStateChanged {
1722 // An identifier that can be used to match events for this device.
1723 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1724 // Salt: Randomly generated 256 bit value
1725 // Hash algorithm: HMAC-SHA256
1726 // Size: 32 byte
1727 // Default: null or empty if the device identifier is not known
1728 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1729 // The state of the connection.
1730 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1731 optional android.bluetooth.ConnectionStateEnum state = 2;
1732 // Codec used for this SCO connection
1733 // Default: UNKNOWN
1734 optional android.bluetooth.hfp.ScoCodec codec = 3;
Tej Singh5d991e12018-03-09 19:48:11 -08001735}
1736
Jack Hec27040a2019-01-09 20:54:41 -08001737/**
1738 * Logged when active device of a profile changes
1739 *
1740 * Logged from:
1741 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1742 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java
1743 * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java
1744 */
1745message BluetoothActiveDeviceChanged {
1746 // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID
1747 // From android.bluetooth.BluetoothProfile
1748 optional int32 bt_profile = 1;
1749 // An identifier that can be used to match events for this new active device.
1750 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1751 // Salt: Randomly generated 256 bit value
1752 // Hash algorithm: HMAC-SHA256
1753 // Size: 32 byte
1754 // Default: null or empty if there is no active device for this profile
1755 optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
1756}
1757
Jack Heab86dbd22018-12-18 15:43:27 -08001758// Logs when there is an event affecting Bluetooth device's link layer connection.
1759// - This event is triggered when there is a related HCI command or event
1760// - Users of this metrics can deduce Bluetooth device's connection state from these events
1761// - HCI commands are logged before the command is sent, after receiving command status, and after
1762// receiving command complete
1763// - HCI events are logged when they arrive
1764//
1765// Low level log from system/bt
1766//
1767// Bluetooth classic commands:
1768// - CMD_CREATE_CONNECTION
1769// - CMD_DISCONNECT
1770// - CMD_CREATE_CONNECTION_CANCEL
1771// - CMD_ACCEPT_CONNECTION_REQUEST
1772// - CMD_REJECT_CONNECTION_REQUEST
1773// - CMD_SETUP_ESCO_CONNECTION
1774// - CMD_ACCEPT_ESCO_CONNECTION
1775// - CMD_REJECT_ESCO_CONNECTION
1776// - CMD_ENH_SETUP_ESCO_CONNECTION
1777// - CMD_ENH_ACCEPT_ESCO_CONNECTION
1778//
1779// Bluetooth low energy commands:
1780// - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00]
1781// - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
1782// - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
1783// - CMD_BLE_CLEAR_WHITE_LIST
1784// - CMD_BLE_ADD_WHITE_LIST
1785// - CMD_BLE_REMOVE_WHITE_LIST
1786//
1787// Bluetooth classic events:
1788// - EVT_CONNECTION_COMP
1789// - EVT_CONNECTION_REQUEST
1790// - EVT_DISCONNECTION_COMP
1791// - EVT_ESCO_CONNECTION_COMP
1792// - EVT_ESCO_CONNECTION_CHANGED
1793//
1794// Bluetooth low energy meta events:
1795// - BLE_EVT_CONN_COMPLETE_EVT
1796// - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT
1797//
1798// Next tag: 10
1799message BluetoothLinkLayerConnectionEvent {
1800 // An identifier that can be used to match events for this device.
1801 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1802 // Salt: Randomly generated 256 bit value
1803 // Hash algorithm: HMAC-SHA256
1804 // Size: 32 byte
1805 // Default: null or empty if the device identifier is not known
1806 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1807 // Connection handle of this connection if available
1808 // Range: 0x0000 - 0x0EFF (12 bits)
1809 // Default: 0xFFFF if the handle is unknown
1810 optional int32 connection_handle = 2;
1811 // Direction of the link
1812 // Default: DIRECTION_UNKNOWN
1813 optional android.bluetooth.DirectionEnum direction = 3;
1814 // Type of this link
1815 // Default: LINK_TYPE_UNKNOWN
1816 optional android.bluetooth.LinkTypeEnum type = 4;
1817
1818 // Reason metadata for this link layer connection event, rules for interpretation:
1819 // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or
1820 // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case
1821 // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is
1822 // set and valid, ignore hci_ble_event
1823
1824 // HCI command associated with this event
1825 // Default: CMD_UNKNOWN
1826 optional android.bluetooth.hci.CommandEnum hci_cmd = 5;
1827 // HCI event associated with this event
1828 // Default: EVT_UNKNOWN
1829 optional android.bluetooth.hci.EventEnum hci_event = 6;
1830 // HCI BLE meta event associated with this event
1831 // Default: BLE_EVT_UNKNOWN
1832 optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7;
1833 // HCI command status code if this is triggerred by hci_cmd
1834 // Default: STATUS_UNKNOWN
1835 optional android.bluetooth.hci.StatusEnum cmd_status = 8;
1836 // HCI reason code associated with this event
1837 // Default: STATUS_UNKNOWN
1838 optional android.bluetooth.hci.StatusEnum reason_code = 9;
1839}
1840
Howard Roe103fe22019-01-17 16:52:16 -08001841/**
1842 * Logs when a module is rolled back by Watchdog.
1843 *
1844 * Logged from: Rollback Manager
1845 */
1846message WatchdogRollbackOccurred {
1847 enum RollbackType {
1848 UNKNOWN = 0;
1849 ROLLBACK_INITIATE = 1;
1850 ROLLBACK_SUCCESS = 2;
1851 ROLLBACK_FAILURE = 3;
Howard Roe4d6fed2019-03-04 16:54:19 -08001852 ROLLBACK_BOOT_TRIGGERED = 4;
Howard Roe103fe22019-01-17 16:52:16 -08001853 }
1854 optional RollbackType rollback_type = 1;
1855
1856 optional string package_name = 2;
1857
1858 optional int32 package_version_code = 3;
Gavin Corkerydd1daba2019-11-27 19:11:13 +00001859
1860 enum RollbackReasonType {
1861 REASON_UNKNOWN = 0;
1862 REASON_NATIVE_CRASH = 1;
1863 REASON_EXPLICIT_HEALTH_CHECK = 2;
1864 REASON_APP_CRASH = 3;
1865 REASON_APP_NOT_RESPONDING = 4;
Gavin Corkery3285d222020-01-17 19:24:22 +00001866 REASON_NATIVE_CRASH_DURING_BOOT = 5;
Gavin Corkerydd1daba2019-11-27 19:11:13 +00001867 }
1868 optional RollbackReasonType rollback_reason = 4;
1869
1870 // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback
1871 // is initiated. Empty if the package is unknown.
1872 optional string failing_package_name = 5;
Howard Roe103fe22019-01-17 16:52:16 -08001873}
1874
Jack Hec27040a2019-01-09 20:54:41 -08001875/**
1876 * Logs when there is a change in Bluetooth A2DP playback state
1877 *
1878 * Logged from:
1879 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1880 */
1881message BluetoothA2dpPlaybackStateChanged {
1882 // An identifier that can be used to match events for this device.
1883 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1884 // Salt: Randomly generated 256 bit value
1885 // Hash algorithm: HMAC-SHA256
1886 // Size: 32 byte
1887 // Default: null or empty if the device identifier is not known
1888 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1889 // Current playback state
1890 // Default: PLAYBACK_STATE_UNKNOWN
1891 optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2;
1892 // Current audio coding mode
1893 // Default: AUDIO_CODING_MODE_UNKNOWN
1894 optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3;
1895}
1896
1897/**
1898 * Logs when there is a change in A2DP codec config for a particular remote device
1899 *
1900 * Logged from:
1901 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1902 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1903 */
1904message BluetoothA2dpCodecConfigChanged {
1905 // An identifier that can be used to match events for this device.
1906 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1907 // Salt: Randomly generated 256 bit value
1908 // Hash algorithm: HMAC-SHA256
1909 // Size: 32 byte
1910 // Default: null or empty if the device identifier is not known
1911 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1912 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1913 // Default SOURCE_CODEC_TYPE_INVALID
1914 optional int32 codec_type = 2;
1915 // Codec priroity, the higher the more preferred, -1 for disabled
1916 // Default: CODEC_PRIORITY_DEFAULT
1917 optional int32 codec_priority = 3;
1918 // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig
1919 // Default: SAMPLE_RATE_NONE
1920 optional int32 sample_rate = 4;
1921 // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig
1922 // Default: BITS_PER_SAMPLE_NONE
1923 optional int32 bits_per_sample = 5;
1924 // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig
1925 // Default: CHANNEL_MODE_NONE
1926 optional int32 channel_mode = 6;
1927 // Codec specific values
1928 // Default 0
1929 optional int64 codec_specific_1 = 7;
1930 optional int64 codec_specific_2 = 8;
1931 optional int64 codec_specific_3 = 9;
1932 optional int64 codec_specific_4 = 10;
1933}
1934
1935/**
1936 * Logs when there is a change in selectable A2DP codec capability for a paricular remote device
1937 * Each codec's capability is logged separately due to statsd restriction
1938 *
1939 * Logged from:
1940 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1941 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1942 */
1943message BluetoothA2dpCodecCapabilityChanged {
1944 // An identifier that can be used to match events for this device.
1945 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1946 // Salt: Randomly generated 256 bit value
1947 // Hash algorithm: HMAC-SHA256
1948 // Size: 32 byte
1949 // Default: null or empty if the device identifier is not known
1950 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1951 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1952 // Default SOURCE_CODEC_TYPE_INVALID
1953 optional int32 codec_type = 2;
1954 // Codec priroity, the higher the more preferred, -1 for disabled
1955 // Default: CODEC_PRIORITY_DEFAULT
1956 optional int32 codec_priority = 3;
1957 // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants
1958 // in BluetoothCodecConfig
1959 // Default: empty and SAMPLE_RATE_NONE for individual item
1960 optional int32 sample_rate = 4;
1961 // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants
1962 // in BluetoothCodecConfig
1963 // Default: empty and BITS_PER_SAMPLE_NONE for individual item
1964 optional int32 bits_per_sample = 5;
1965 // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in
1966 // BluetoothCodecConfig
1967 // Default: empty and CHANNEL_MODE_NONE for individual item
1968 optional int32 channel_mode = 6;
1969 // Codec specific values
1970 // Default 0
1971 optional int64 codec_specific_1 = 7;
1972 optional int64 codec_specific_2 = 8;
1973 optional int64 codec_specific_3 = 9;
1974 optional int64 codec_specific_4 = 10;
1975}
1976
1977/**
1978 * Logs when A2DP failed to read from PCM source.
1979 * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding.
1980 *
1981 * Logged from:
1982 * system/bt
1983 */
1984message BluetoothA2dpAudioUnderrunReported {
1985 // An identifier that can be used to match events for this device.
1986 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1987 // Salt: Randomly generated 256 bit value
1988 // Hash algorithm: HMAC-SHA256
1989 // Size: 32 byte
1990 // Default: null or empty if the device identifier is not known
1991 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1992 // Encoding interval in nanoseconds
1993 // Default: 0
1994 optional int64 encoding_interval_nanos = 2;
1995 // Number of bytes of PCM data that could not be read from the source
1996 // Default: 0
1997 optional int32 num_missing_pcm_bytes = 3;
1998}
1999
2000/**
2001 * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit
2002 * buffer queue is full and we have to drop data
2003 *
2004 * Logged from:
2005 * system/bt
2006 */
2007message BluetoothA2dpAudioOverrunReported {
2008 // An identifier that can be used to match events for this device.
2009 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2010 // Salt: Randomly generated 256 bit value
2011 // Hash algorithm: HMAC-SHA256
2012 // Size: 32 byte
2013 // Default: null or empty if the device identifier is not known
2014 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2015 // Encoding interval in nanoseconds
2016 // Default: 0
2017 optional int64 encoding_interval_nanos = 2;
2018 // Number of buffers dropped in this event
2019 // Each buffer is encoded in one encoding interval and consists of multiple encoded frames
2020 // Default: 0
2021 optional int32 num_dropped_buffers = 3;
2022 // Number of encoded buffers dropped in this event
2023 // Default 0
2024 optional int32 num_dropped_encoded_frames = 4;
2025 // Number of encoded bytes dropped in this event
2026 // Default: 0
2027 optional int32 num_dropped_encoded_bytes = 5;
2028}
2029
2030/**
2031 * Logs when we receive reports regarding a device's RSSI value
2032 *
2033 * Logged from:
2034 * system/bt
2035 */
2036message BluetoothDeviceRssiReported {
2037 // An identifier that can be used to match events for this device.
2038 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2039 // Salt: Randomly generated 256 bit value
2040 // Hash algorithm: HMAC-SHA256
2041 // Size: 32 byte
2042 // Default: null or empty if the device identifier is not known
2043 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2044 // Connection handle of this connection if available
2045 // Range: 0x0000 - 0x0EFF (12 bits)
2046 // Default: 0xFFFF if the handle is unknown
2047 optional int32 connection_handle = 2;
2048 // HCI command status code if this is triggerred by hci_cmd
2049 // Default: STATUS_UNKNOWN
2050 optional android.bluetooth.hci.StatusEnum hci_status = 3;
2051 // BR/EDR
2052 // Range: -128 ≤ N ≤ 127 (signed integer)
2053 // Units: dB
2054 // LE:
2055 // Range: -127 to 20, 127 (signed integer)
2056 // Units: dBm
2057 // Invalid when an out of range value is reported
2058 optional int32 rssi = 4;
2059}
2060
2061/**
2062 * Logs when we receive reports regarding how many consecutive failed contacts for a connection
2063 *
2064 * Logged from:
2065 * system/bt
2066 */
2067message BluetoothDeviceFailedContactCounterReported {
2068 // An identifier that can be used to match events for this device.
2069 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2070 // Salt: Randomly generated 256 bit value
2071 // Hash algorithm: HMAC-SHA256
2072 // Size: 32 byte
2073 // Default: null or empty if the device identifier is not known
2074 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2075 // Connection handle of this connection if available
2076 // Range: 0x0000 - 0x0EFF (12 bits)
2077 // Default: 0xFFFF if the handle is unknown
2078 optional int32 connection_handle = 2;
2079 // HCI command status code if this is triggerred by hci_cmd
2080 // Default: STATUS_UNKNOWN
2081 optional android.bluetooth.hci.StatusEnum cmd_status = 3;
2082 // Number of consecutive failed contacts for a connection corresponding to the Handle
2083 // Range: uint16_t, 0-0xFFFF
2084 // Default: 0xFFFFF
2085 optional int32 failed_contact_counter = 4;
2086}
2087
2088/**
2089 * Logs when we receive reports regarding the tranmit power level used for a specific connection
2090 *
2091 * Logged from:
2092 * system/bt
2093 */
2094message BluetoothDeviceTxPowerLevelReported {
2095 // An identifier that can be used to match events for this device.
2096 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2097 // Salt: Randomly generated 256 bit value
2098 // Hash algorithm: HMAC-SHA256
2099 // Size: 32 byte
2100 // Default: null or empty if the device identifier is not known
2101 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2102 // Connection handle of this connection if available
2103 // Range: 0x0000 - 0x0EFF (12 bits)
2104 // Default: 0xFFFF if the handle is unknown
2105 optional int32 connection_handle = 2;
Jack He1021a612019-01-20 21:22:46 -08002106 // HCI command status code if this is triggered by hci_cmd
Jack Hec27040a2019-01-09 20:54:41 -08002107 // Default: STATUS_UNKNOWN
2108 optional android.bluetooth.hci.StatusEnum hci_status = 3;
2109 // Range: -30 ≤ N ≤ 20
2110 // Units: dBm
2111 // Invalid when an out of range value is reported
2112 optional int32 transmit_power_level = 4;
2113}
Jack Heab86dbd22018-12-18 15:43:27 -08002114
Tej Singh5d991e12018-03-09 19:48:11 -08002115/**
Jack He1021a612019-01-20 21:22:46 -08002116 * Logs when Bluetooth controller failed to reply with command status within a timeout period after
2117 * receiving an HCI command from the host
2118 *
2119 * Logged from: system/bt
2120 */
2121message BluetoothHciTimeoutReported {
2122 // HCI command associated with this event
2123 // Default: CMD_UNKNOWN
2124 optional android.bluetooth.hci.CommandEnum hci_command = 1;
2125}
2126
2127/**
2128 * Logs when we receive Bluetooth Link Quality Report event from the controller
2129 * See Android Bluetooth HCI specification for more details
2130 *
2131 * Note: all count and bytes field are counted since last event
2132 *
2133 * Logged from: system/bt
2134 */
2135message BluetoothQualityReportReported {
2136 // Quality report ID
2137 // Original type: uint8_t
2138 // Default: BQR_ID_UNKNOWN
2139 optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1;
2140 // Packet type of the connection
2141 // Original type: uint8_t
2142 // Default: BQR_PACKET_TYPE_UNKNOWN
2143 optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2;
2144 // Connection handle of the connection
2145 // Original type: uint16_t
2146 optional int32 connection_handle = 3;
2147 // Performing Role for the connection
2148 // Original type: uint8_t
2149 optional int32 connection_role = 4;
2150 // Current Transmit Power Level for the connection. This value is the same as the controller's
2151 // response to the HCI_Read_Transmit_Power_Level HCI command
2152 // Original type: uint8_t
2153 optional int32 tx_power_level = 5;
2154 // Received Signal Strength Indication (RSSI) value for the connection. This value is an
2155 // absolute receiver signal strength value
2156 // Original type: int8_t
2157 optional int32 rssi = 6;
2158 // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the
2159 // channels used by the link currently
2160 // Original type: uint8_t
2161 optional int32 snr = 7;
2162 // Indicates the number of unused channels in AFH_channel_map
2163 // Original type: uint8_t
2164 optional int32 unused_afh_channel_count = 8;
2165 // Indicates the number of the channels which are interfered and quality is bad but are still
2166 // selected for AFH
2167 // Original type: uint8_t
2168 optional int32 afh_select_unideal_channel_count = 9;
2169 // Current Link Supervision Timeout Setting
2170 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2171 // Original type: uint16_t
2172 optional int32 lsto = 10;
2173 // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's
2174 // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of
2175 // 0x01 (Piconet Clock)
2176 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2177 // Original type: uint32_t
2178 optional int64 connection_piconet_clock = 11;
2179 // The count of retransmission
2180 // Original type: uint32_t
2181 optional int64 retransmission_count = 12;
2182 // The count of no RX
2183 // Original type: uint32_t
2184 optional int64 no_rx_count = 13;
2185 // The count of NAK (Negative Acknowledge)
2186 // Original type: uint32_t
2187 optional int64 nak_count = 14;
2188 // Controller timestamp of last TX ACK
2189 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2190 // Original type: uint32_t
2191 optional int64 last_tx_ack_timestamp = 15;
2192 // The count of Flow-off (STOP)
2193 // Original type: uint32_t
2194 optional int64 flow_off_count = 16;
2195 // Controller timestamp of last Flow-on (GO)
2196 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2197 // Original type: uint32_t
2198 optional int64 last_flow_on_timestamp = 17;
2199 // Buffer overflow count (how many bytes of TX data are dropped) since the last event
2200 // Original type: uint32_t
2201 optional int64 buffer_overflow_bytes = 18;
2202 // Buffer underflow count (in byte) since last event
2203 // Original type: uint32_t
2204 optional int64 buffer_underflow_bytes = 19;
2205}
2206
2207/**
2208 * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack
2209 *
2210 * Notes:
2211 * - Each event can be partially filled as we might learn different pieces of device
2212 * information at different time
2213 * - Multiple device info events can be combined to give more complete picture
2214 * - When multiple device info events tries to describe the same information, the
2215 * later one wins
2216 *
2217 * Logged from:
2218 * packages/apps/Bluetooth
2219 */
Jack Heaea26982019-04-04 11:19:48 -07002220message BluetoothDeviceInfoReported {
Jack He1021a612019-01-20 21:22:46 -08002221 // An identifier that can be used to match events for this device.
2222 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2223 // Salt: Randomly generated 256 bit value
2224 // Hash algorithm: HMAC-SHA256
2225 // Size: 32 byte
2226 // Default: null or empty if the device identifier is not known
2227 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2228 // Where is this device info obtained from
2229 optional android.bluetooth.DeviceInfoSrcEnum source_type = 2;
2230 // Name of the data source
2231 // For EXTERNAL: package name of the data source
2232 // For INTERNAL: null for general case, component name otherwise
2233 optional string source_name = 3;
2234 // Name of the manufacturer of this device
2235 optional string manufacturer = 4;
2236 // Model of this device
2237 optional string model = 5;
2238 // Hardware version of this device
2239 optional string hardware_version = 6;
2240 // Software version of this device
2241 optional string software_version = 7;
2242}
2243
2244/**
2245 * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote
2246 * device, as documented by the Bluetooth Core HCI specification
2247 * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification
2248 * Vol 2, Part E, Page 1118
2249 *
2250 * Logged from:
2251 * system/bt
2252 */
2253message BluetoothRemoteVersionInfoReported {
2254 // Connection handle of the connection
2255 // Original type: uint16_t
2256 optional int32 connection_handle = 1;
2257 // HCI command status code
2258 // Default: STATUS_UNKNOWN
2259 optional android.bluetooth.hci.StatusEnum hci_status = 2;
2260 // 1 byte Version of current LMP in the remote controller
2261 optional int32 lmp_version = 3;
2262 // 2 bytes LMP manufacturer code of the remote controller
2263 // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
2264 optional int32 lmp_manufacturer_code = 4;
2265 // 4 bytes subversion of the LMP in the remote controller
2266 optional int32 lmp_subversion = 5;
2267}
2268
2269/**
2270 * Logs when certain Bluetooth SDP attributes are discovered
2271 * Constant definitions are from:
2272 * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
2273 *
2274 * Current logged attributes:
2275 * - BluetoothProfileDescriptorList
2276 * - Supported Features Bitmask
2277 *
2278 * Logged from:
2279 * system/bt
2280 */
2281message BluetoothSdpAttributeReported {
2282 // An identifier that can be used to match events for this device.
2283 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2284 // Salt: Randomly generated 256 bit value
2285 // Hash algorithm: HMAC-SHA256
2286 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2287 // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes
2288 // Original type: uint16_t
2289 optional int32 protocol_uuid = 2;
2290 // Short form UUIDs used to identify Bluetooth SDP attribute types
2291 // Original type: uint16_t
2292 optional int32 attribute_id = 3;
2293 // Attribute value for the particular attribute
2294 optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
2295}
2296
2297/**
2298 * Logs when bond state of a Bluetooth device changes
2299 *
2300 * Logged from:
2301 * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
2302 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
2303 */
2304message BluetoothBondStateChanged {
2305 // An identifier that can be used to match events for this device.
2306 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2307 // Salt: Randomly generated 256 bit value
2308 // Hash algorithm: HMAC-SHA256
2309 // Size: 32 byte
2310 // Default: null or empty if the device identifier is not known
2311 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2312 // Preferred transport type to remote dual mode device
2313 // Default: TRANSPORT_AUTO means no preference
2314 optional android.bluetooth.TransportTypeEnum transport = 2;
2315 // The type of this Bluetooth device (Classic, LE, or Dual mode)
2316 // Default: UNKNOWN
2317 optional android.bluetooth.DeviceTypeEnum type = 3;
2318 // Current bond state (NONE, BONDING, BONDED)
2319 // Default: BOND_STATE_UNKNOWN
2320 optional android.bluetooth.BondStateEnum bond_state = 4;
2321 // Bonding sub state
2322 // Default: BOND_SUB_STATE_UNKNOWN
2323 optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5;
2324 // Unbond Reason
2325 // Default: UNBOND_REASON_UNKNOWN
2326 optional android.bluetooth.UnbondReasonEnum unbond_reason = 6;
2327}
2328
2329/**
2330 * Logs there is an event related Bluetooth classic pairing
2331 *
2332 * Logged from:
2333 * system/bt
2334 */
2335message BluetoothClassicPairingEventReported {
2336 // An identifier that can be used to match events for this device.
2337 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2338 // Salt: Randomly generated 256 bit value
2339 // Hash algorithm: HMAC-SHA256
2340 // Size: 32 byte
2341 // Default: null or empty if the device identifier is not known
2342 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2343 // Connection handle of this connection if available
2344 // Range: 0x0000 - 0x0EFF (12 bits)
2345 // Default: 0xFFFF if the handle is unknown
2346 optional int32 connection_handle = 2;
2347 // HCI command associated with this event
2348 // Default: CMD_UNKNOWN
2349 optional android.bluetooth.hci.CommandEnum hci_cmd = 3;
2350 // HCI event associated with this event
2351 // Default: EVT_UNKNOWN
2352 optional android.bluetooth.hci.EventEnum hci_event = 4;
2353 // HCI command status code if this is triggerred by hci_cmd
2354 // Default: STATUS_UNKNOWN
2355 optional android.bluetooth.hci.StatusEnum cmd_status = 5;
2356 // HCI reason code associated with this event
2357 // Default: STATUS_UNKNOWN
2358 optional android.bluetooth.hci.StatusEnum reason_code = 6;
Jack He3b259832019-03-20 03:47:29 -07002359 // A status value related to this specific event
2360 // Default: 0
2361 optional int64 event_value = 7;
Jack He1021a612019-01-20 21:22:46 -08002362}
2363
2364/**
2365 * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP)
2366 *
2367 * Logged from:
2368 * system/bt
2369 */
2370message BluetoothSmpPairingEventReported {
2371 // An identifier that can be used to match events for this device.
2372 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2373 // Salt: Randomly generated 256 bit value
2374 // Hash algorithm: HMAC-SHA256
2375 // Size: 32 byte
2376 // Default: null or empty if the device identifier is not known
2377 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2378 // SMP command sent or received over L2CAP
2379 // Default: CMD_UNKNOWN
2380 optional android.bluetooth.smp.CommandEnum smp_command = 2;
2381 // Whether this command is sent or received
2382 // Default: DIRECTION_UNKNOWN
2383 optional android.bluetooth.DirectionEnum direction = 3;
2384 // SMP failure reason code
2385 // Default: PAIRING_FAIL_REASON_DEFAULT
2386 optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4;
2387}
2388
2389/**
Jack He815cdba2019-01-30 17:24:55 -08002390 * Logs when a Bluetooth socket’s connection state changed
2391 *
2392 * Logged from:
2393 * system/bt
2394 */
2395message BluetoothSocketConnectionStateChanged {
2396 // An identifier that can be used to match events for this device.
2397 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2398 // Salt: Randomly generated 256 bit value
2399 // Hash algorithm: HMAC-SHA256
2400 // Size: 32 byte
Jack Hee4ae0e72019-02-07 13:52:45 -08002401 // Default: null or empty if this is a server listener socket
Jack He815cdba2019-01-30 17:24:55 -08002402 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
Jack Hee4ae0e72019-02-07 13:52:45 -08002403 // Temporary port of this socket for the current connection or session only
Jack He815cdba2019-01-30 17:24:55 -08002404 // Default 0 when unknown or don't care
2405 optional int32 port = 2;
2406 // Socket type as mentioned in
2407 // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
2408 // Default: SOCKET_TYPE_UNKNOWN
2409 optional android.bluetooth.SocketTypeEnum type = 3;
2410 // Socket connection state
2411 // Default: SOCKET_CONNECTION_STATE_UNKNOWN
2412 optional android.bluetooth.SocketConnectionstateEnum state = 4;
2413 // Number of bytes sent to remote device during this connection
2414 optional int64 tx_bytes = 5;
2415 // Number of bytes received from remote device during this connection
2416 optional int64 rx_bytes = 6;
Jack Hee4ae0e72019-02-07 13:52:45 -08002417 // Socket owner's UID
2418 optional int32 uid = 7 [(is_uid) = true];
2419 // Server port of this socket, if any. When both |server_port| and |port| fields are populated,
2420 // |port| must be spawned by |server_port|
2421 // Default 0 when unknown or don't care
2422 optional int32 server_port = 8;
2423 // Whether this is a server listener socket
2424 optional android.bluetooth.SocketRoleEnum is_server = 9;
Jack He815cdba2019-01-30 17:24:55 -08002425}
2426
2427/**
Jack He71426802019-04-02 13:32:52 -07002428 * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection
2429 *
2430 * Logged from:
2431 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
2432 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
2433 *
2434 */
2435message BluetoothClassOfDeviceReported {
2436 // An identifier that can be used to match events for this device.
2437 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2438 // Salt: Randomly generated 256 bit value
2439 // Hash algorithm: HMAC-SHA256
2440 // Size: 32 byte
2441 // Default: null or empty if this is a server listener socket
2442 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2443 // Class of Device (CoD) value including both Major, Minor device class and service class
2444 // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband
2445 // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass
2446 // Default: 0
2447 optional int32 class_of_device = 2;
2448}
2449
2450/**
Andrew Chant28d627e2018-02-22 15:17:05 -08002451 * Logs when something is plugged into or removed from the USB-C connector.
2452 *
2453 * Logged from:
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002454 * UsbService
Andrew Chant28d627e2018-02-22 15:17:05 -08002455 */
2456message UsbConnectorStateChanged {
2457 enum State {
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002458 STATE_DISCONNECTED = 0;
2459 STATE_CONNECTED = 1;
Andrew Chant28d627e2018-02-22 15:17:05 -08002460 }
2461 optional State state = 1;
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002462 optional string id = 2;
Badhri Jagan Sridharanfaf62072018-11-16 17:17:03 -08002463 // Last active session in ms.
2464 // 0 when the port is in connected state.
2465 optional int64 last_connect_duration_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002466}
2467
2468/**
2469 * Logs the reported speaker impedance.
2470 *
2471 * Logged from:
2472 * Vendor audio implementation.
2473 */
2474message SpeakerImpedanceReported {
2475 optional int32 speaker_location = 1;
2476 optional int32 impedance = 2;
2477}
2478
2479/**
2480 * Logs the report of a failed hardware.
2481 *
2482 * Logged from:
2483 * Vendor HALs.
2484 *
2485 */
2486message HardwareFailed {
2487 enum HardwareType {
2488 HARDWARE_FAILED_UNKNOWN = 0;
2489 HARDWARE_FAILED_MICROPHONE = 1;
2490 HARDWARE_FAILED_CODEC = 2;
2491 HARDWARE_FAILED_SPEAKER = 3;
2492 HARDWARE_FAILED_FINGERPRINT = 4;
2493 }
2494 optional HardwareType hardware_type = 1;
2495
Maggie White6dcd8572019-01-31 14:11:50 -08002496 /**
2497 * hardware_location allows vendors to differentiate between multiple instances of
Andrew Chant28d627e2018-02-22 15:17:05 -08002498 * the same hardware_type. The specific locations are vendor defined integers,
2499 * referring to board-specific numbering schemes.
2500 */
2501 optional int32 hardware_location = 2;
2502
Maggie White6dcd8572019-01-31 14:11:50 -08002503 /**
2504 * failure_code is specific to the HardwareType of the failed hardware.
2505 * It should use one of the enum values defined below.
Andrew Chant28d627e2018-02-22 15:17:05 -08002506 */
Maggie White6dcd8572019-01-31 14:11:50 -08002507 enum HardwareErrorCode {
2508 UNKNOWN = 0;
2509 COMPLETE = 1;
2510 SPEAKER_HIGH_Z = 2;
2511 SPEAKER_SHORT = 3;
2512 FINGERPRINT_SENSOR_BROKEN = 4;
2513 FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5;
Maggie Whiteb76cebc2019-02-05 15:21:29 -08002514 DEGRADE = 6;
Andrew Chant28d627e2018-02-22 15:17:05 -08002515 }
2516 optional int32 failure_code = 3;
2517}
2518
2519/**
2520 * Log an event when the device has been physically dropped.
2521 * Reported from the /vendor partition.
2522 */
2523message PhysicalDropDetected {
2524 // Confidence that the event was actually a drop, 0 -> 100
2525 optional int32 confidence_pctg = 1;
2526 // Peak acceleration of the drop, in 1/1000s of a g.
2527 optional int32 accel_peak_thousandths_g = 2;
Andrew Chantb56388b2018-03-22 21:07:33 -07002528 // Duration of freefall in ms
2529 optional int32 freefall_time_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002530}
2531
2532/**
2533 * Log bucketed battery charge cycles.
2534 *
2535 * Each bucket represents cycles of the battery past
Maggie White38c9d322018-11-20 10:07:52 -08002536 * a given charge point. For example, if 10 cycle buckets are
2537 * initialized, bucket 1 is the lowest 1/10th of the battery,
2538 * and bucket 10 is 100%.
Andrew Chant28d627e2018-02-22 15:17:05 -08002539 *
2540 * Logged from:
2541 * /sys/class/power_supply/bms/cycle_count, via Vendor.
2542 */
2543message ChargeCyclesReported {
2544 optional int32 cycle_bucket_1 = 1;
2545 optional int32 cycle_bucket_2 = 2;
2546 optional int32 cycle_bucket_3 = 3;
2547 optional int32 cycle_bucket_4 = 4;
2548 optional int32 cycle_bucket_5 = 5;
2549 optional int32 cycle_bucket_6 = 6;
2550 optional int32 cycle_bucket_7 = 7;
2551 optional int32 cycle_bucket_8 = 8;
Maggie White38c9d322018-11-20 10:07:52 -08002552 optional int32 cycle_bucket_9 = 9;
2553 optional int32 cycle_bucket_10 = 10;
Andrew Chant28d627e2018-02-22 15:17:05 -08002554}
2555
2556/**
Howard Roa46b6582018-09-18 16:45:02 -07002557 * Log battery health snapshot.
2558 *
2559 * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level
2560 * are snapshotted periodically over 24hrs.
2561 */
2562message BatteryHealthSnapshot {
2563 enum BatterySnapshotType {
2564 UNKNOWN = 0;
2565 MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs.
2566 MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs.
2567 MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs.
2568 MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs.
2569 MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs.
2570 MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs.
2571 MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs.
2572 MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs.
2573 MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs.
2574 MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs.
2575 AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs.
2576 }
2577 optional BatterySnapshotType type = 1;
2578 // Temperature, in 1/10ths of degree C.
Yangster-maca8a30442018-10-13 23:46:34 -07002579 optional int32 temperature_deci_celsius = 2;
Howard Roa46b6582018-09-18 16:45:02 -07002580 // Voltage Battery Voltage, in microVolts.
2581 optional int32 voltage_micro_volt = 3;
2582 // Current Battery current, in microAmps.
2583 optional int32 current_micro_amps = 4;
2584 // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts.
2585 optional int32 open_circuit_micro_volt = 5;
2586 // Resistance Battery Resistance, in microOhms.
2587 optional int32 resistance_micro_ohm = 6;
2588 // Level Battery Level, as % of full.
2589 optional int32 level_percent = 7;
2590}
2591
2592/**
2593 * Log slow I/O operations on the primary storage.
2594 */
2595message SlowIo {
2596 // Classifications of IO Operations.
2597 enum IoOperation {
2598 UNKNOWN = 0;
2599 READ = 1;
2600 WRITE = 2;
2601 UNMAP = 3;
2602 SYNC = 4;
2603 }
2604 optional IoOperation operation = 1;
2605
2606 // The number of slow IO operations of this type over 24 hours.
2607 optional int32 count = 2;
2608}
2609
2610/**
2611 * Log battery caused shutdown with the last recorded voltage.
2612 */
2613message BatteryCausedShutdown {
2614 // The last recorded battery voltage prior to shutdown.
2615 optional int32 last_recorded_micro_volt = 1;
2616}
2617
2618/**
Tej Singha72344992019-04-17 18:55:08 -07002619 * Logs when ThermalService receives throttling events.
2620 *
2621 * Logged from:
2622 * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
2623 */
2624message ThermalThrottlingSeverityStateChanged {
2625 // The type of temperature being reported (CPU, GPU, SKIN, etc)
2626 optional android.os.TemperatureTypeEnum sensor_type = 1;
2627
2628 // The name of the temperature source. Eg. CPU0
2629 optional string sensor_name = 2;
2630
2631 // Temperature in tenths of a degree C.
2632 // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
2633 optional int32 temperature_deci_celsius = 3;
2634
2635 // Relative severity of the throttling, see enum definition.
2636 optional android.os.ThrottlingSeverityEnum severity = 4;
2637}
2638
2639/**
Tej Singhbb8554a2018-01-26 11:59:14 -08002640 * Logs the duration of a davey (jank of >=700ms) when it occurs
2641 *
2642 * Logged from:
2643 * frameworks/base/libs/hwui/JankTracker.cpp
2644 */
2645message DaveyOccurred {
David Chen77ef6712018-02-23 18:23:42 -08002646 // The UID that logged this atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07002647 optional int32 uid = 1 [(is_uid) = true];
David Chen77ef6712018-02-23 18:23:42 -08002648
Tej Singhbb8554a2018-01-26 11:59:14 -08002649 // Amount of time it took to render the frame. Should be >=700ms.
David Chen77ef6712018-02-23 18:23:42 -08002650 optional int64 jank_duration_millis = 2;
Tej Singhbb8554a2018-01-26 11:59:14 -08002651}
2652
2653/**
Bookatze5885242017-10-24 20:10:31 -07002654 * Logs phone signal strength changes.
2655 *
2656 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07002657 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07002658 */
2659message PhoneSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08002660 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
2661 optional android.telephony.SignalStrengthEnum signal_strength = 1;
David Chenc28b2bb2017-10-24 12:52:52 -07002662}
2663
Yangster4ccebea2018-10-09 17:09:02 -07002664
2665/**
2666 * Logs when the phone state, sim state or signal strength changes
2667 *
2668 * Logged from:
2669 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
2670 */
2671message PhoneServiceStateChanged {
2672 optional android.telephony.ServiceStateEnum state = 1;
2673 optional android.telephony.SimStateEnum sim_state = 2;
2674 optional android.telephony.SignalStrengthEnum signal_strength = 3;
2675}
2676
2677/**
2678 * Logs when the phone becomes on or off.
2679 *
2680 * Logged from:
2681 * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java
2682 */
2683message PhoneStateChanged {
2684 enum State {
2685 OFF = 0;
2686 ON = 1;
2687 }
2688 optional State state = 1;
2689}
2690
Hyunyoung Song2ecb8862019-07-09 09:19:25 -07002691message BackGesture {
2692 enum BackType {
2693 DEFAULT_BACK_TYPE = 0;
2694 COMPLETED = 1;
2695 COMPLETED_REJECTED = 2; // successful because coming from rejected area
2696 INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
2697 INCOMPLETE = 4;
2698 }
2699 optional BackType type = 1;
2700
2701 optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event
2702 enum WindowHorizontalLocation {
2703 DEFAULT_LOCATION = 0;
2704 LEFT = 1;
2705 RIGHT = 2;
2706 }
2707 optional WindowHorizontalLocation x_location = 3;
2708}
2709
2710message ExclusionRectStateChanged {
2711 optional string component_name = 1; // if not available, simply packageName
2712 optional int32 requested_height = 2; // px
2713 optional int32 rejected_height = 3; // px
2714
2715 enum WindowHorizontalLocation {
2716 DEFAULT_LOCATION = 0;
2717 LEFT = 1;
2718 RIGHT = 2;
2719 }
2720 optional WindowHorizontalLocation x_location = 4;
2721 optional bool landscape = 5;
2722 optional bool splitscreen = 6;
2723 optional int32 duration_millis = 7;
2724}
2725
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002726message LauncherUIChanged {
Yao Chen8c433862018-10-24 14:09:20 -07002727 optional android.stats.launcher.LauncherAction action = 1;
2728 optional android.stats.launcher.LauncherState src_state = 2;
2729 optional android.stats.launcher.LauncherState dst_state = 3;
2730 optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES];
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002731 optional bool is_swipe_up_enabled = 5;
2732}
2733
Hyunyoung Song80adf6be2019-01-30 09:59:30 -08002734message StyleUIChanged {
2735 optional android.stats.style.Action action = 1;
2736 optional int32 color_package_hash = 2;
2737 optional int32 font_package_hash = 3;
2738 optional int32 shape_package_hash = 4;
2739 optional int32 clock_package_hash = 5;
2740 optional int32 launcher_grid = 6;
2741 optional int32 wallpaper_category_hash = 7;
2742 optional int32 wallpaper_id_hash = 8;
Kunhung Li286c52f2019-05-21 20:10:43 +08002743 optional int32 color_preference = 9;
2744 optional android.stats.style.LocationPreference location_preference = 10;
Hyunyoung Song80adf6be2019-01-30 09:59:30 -08002745}
2746
David Chenc28b2bb2017-10-24 12:52:52 -07002747/**
Fan Zhang916c13b2018-10-16 22:49:45 -07002748 * Logs when Settings UI has changed.
2749 *
2750 * Logged from:
2751 * packages/apps/Settings
2752 */
2753message SettingsUIChanged {
2754 /**
Fan Zhang916c13b2018-10-16 22:49:45 -07002755 * Where this SettingsUIChange event comes from. For example, if
2756 * it's a PAGE_VISIBLE event, where the page is opened from.
2757 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002758 optional android.app.settings.PageId attribution = 1;
Fan Zhang916c13b2018-10-16 22:49:45 -07002759
2760 /**
2761 * What the UI action is.
2762 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002763 optional android.app.settings.Action action = 2;
Fan Zhang916c13b2018-10-16 22:49:45 -07002764
2765 /**
2766 * Where the action is happening
2767 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002768 optional android.app.settings.PageId page_id = 3;
Fan Zhang916c13b2018-10-16 22:49:45 -07002769
2770 /**
2771 * What preference changed in this event.
2772 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002773 optional string changed_preference_key = 4;
Fan Zhang916c13b2018-10-16 22:49:45 -07002774
2775 /**
2776 * The new value of the changed preference.
2777 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002778 optional int64 changed_preference_int_value = 5;
Fan Zhang916c13b2018-10-16 22:49:45 -07002779}
2780
2781/**
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002782 * Logs basic timing information about touch events.
2783 * Reported at most every 5 minutes while device is being interacted with.
2784 *
2785 * Logged from:
2786 * frameworks/native/services/inputflinger
2787 */
2788message TouchEventReported {
2789 /**
2790 * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
Siarhei Vishniakou20d23c02019-08-15 19:32:34 -05002791 * and the standard deviation of the time spent processing touchscreen events
2792 * in the kernel and inputflinger. The units are microseconds.
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002793 *
Siarhei Vishniakou20d23c02019-08-15 19:32:34 -05002794 * On supported devices, the starting point is taken during the hard interrupt inside the
2795 * kernel touch driver. On all other devices, the starting point is taken inside
2796 * the kernel's input event subsystem upon receipt of the input event.
2797 * The ending point is taken inside InputDispatcher, just after the input event
2798 * is sent to the app.
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002799 */
2800 // Minimum value
2801 optional float latency_min_micros = 1;
2802 // Maximum value
2803 optional float latency_max_micros = 2;
2804 // Average value
2805 optional float latency_mean_micros = 3;
2806 // Standard deviation
2807 optional float latency_stdev_micros = 4;
Siarhei Vishniakouca954f92019-03-22 16:41:14 -07002808 // Number of touch events (input_event) in this report
2809 optional int32 count = 5;
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002810}
2811
2812/**
Philip Quinn0eded622019-01-29 12:46:28 -08002813 * Logs gesture classification and timing information for touch events.
2814 *
2815 * Logged from:
2816 * frameworks/base/core/java/android/view/GestureDetector.java
2817 * frameworks/base/core/java/android/view/View.java
2818 */
2819message TouchGestureClassified {
2820 // The source of the classification (e.g. Java class name).
2821 optional string source = 1;
2822
2823 enum Classification {
2824 UNKNOWN_CLASSIFICATION = 0;
2825 SINGLE_TAP = 1;
2826 DOUBLE_TAP = 2;
2827 LONG_PRESS = 3;
2828 DEEP_PRESS = 4;
2829 SCROLL = 5;
2830 }
2831 // The classification of the gesture.
2832 optional Classification classification = 2;
2833
2834 // The interval from the start of a touch event stream until the
2835 // classification was made.
2836 optional int32 latency_millis = 3;
2837
2838 // The distance from the location of the first touch event to the
2839 // location of the touch event when the classification was made.
2840 optional float displacement_px = 4;
2841}
2842
2843/**
David Chenc28b2bb2017-10-24 12:52:52 -07002844 * Logs that a setting was updated.
2845 * Logged from:
David Chenbd789912018-03-16 17:19:55 -07002846 * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
David Chenc28b2bb2017-10-24 12:52:52 -07002847 * The tag and is_default allow resetting of settings to default values based on the specified
2848 * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details.
2849 */
2850message SettingChanged {
2851 // The name of the setting.
2852 optional string setting = 1;
2853
2854 // The change being imposed on this setting. May represent a number, eg "3".
2855 optional string value = 2;
2856
2857 // The new value of this setting. For most settings, this is same as value. For some settings,
2858 // value is +X or -X where X represents an element in a set. For example, if the previous value
2859 // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C.
2860 // The +/- feature is currently only used for location_providers_allowed.
2861 optional string new_value = 3;
2862
2863 // The previous value of this setting.
2864 optional string prev_value = 4;
2865
2866 // The tag used with the is_default for resetting sets of settings. This is generally null.
2867 optional string tag = 5;
2868
Bookatz90867622018-01-31 15:05:57 -08002869 // True if this setting with tag should be resettable.
2870 optional bool is_default = 6;
David Chenc28b2bb2017-10-24 12:52:52 -07002871
David Chenbd789912018-03-16 17:19:55 -07002872 // The associated user (for multi-user feature). Defined in android/os/UserHandle.java
David Chenc28b2bb2017-10-24 12:52:52 -07002873 optional int32 user = 7;
David Chenbd789912018-03-16 17:19:55 -07002874
2875 enum ChangeReason {
2876 UPDATED = 1; // Updated can be an insertion or an update.
2877 DELETED = 2;
2878 }
2879 optional ChangeReason reason = 8;
David Chenc28b2bb2017-10-24 12:52:52 -07002880}
Chenjie Yub3dda412017-10-24 13:41:59 -07002881
Chenjie Yu05013b32017-11-21 10:21:41 -08002882/**
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002883 * Logs activity going to foreground or background
2884 *
2885 * Logged from:
2886 * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
2887 */
2888message ActivityForegroundStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07002889 optional int32 uid = 1 [(is_uid) = true];
Yangster-mac20877162017-12-22 17:19:39 -08002890 optional string pkg_name = 2;
2891 optional string class_name = 3;
2892
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002893 enum State {
2894 BACKGROUND = 0;
2895 FOREGROUND = 1;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002896 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002897 optional State state = 4;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002898}
David Chenc8a43242017-10-17 16:23:28 -07002899
2900/**
Felix Lopez Luisd95346a2018-12-12 10:32:32 +00002901 * Logs when a volume entered low Storage state.
2902 * Logged from:
2903 * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
2904 */
2905message LowStorageStateChanged {
2906 // Volume that ran out of storage.
2907 optional string volume_description = 1;
2908
2909 enum State {
2910 UNKNOWN = 0;
2911 OFF = 1;
2912 ON = 2;
2913 }
2914 optional State state = 2;
2915}
2916
2917/**
2918 * Logs when an app is downgraded.
2919 * Logged from:
2920 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2921 */
2922message AppDowngraded {
2923 optional string package_name = 1;
2924 // Size of the package (all data) before being downgraded.
2925 optional int64 size_in_bytes_before = 2;
2926 // Size of the package (all data) after being downgraded.
2927 optional int64 size_in_bytes_after = 3;
2928
2929 optional bool aggressive = 4;
2930}
2931
2932/**
2933 * Logs when an app is optimized after being downgraded.
2934 * Logged from:
2935 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2936 */
2937message AppOptimizedAfterDowngraded {
2938 optional string package_name = 1;
2939}
2940
2941/**
Carmen Agimof6688a352019-01-30 19:36:04 +00002942 * Logs whenever an app is installed on external storage.
2943 * Logged from:
2944 frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
2945 */
2946message AppInstallOnExternalStorageReported {
2947 // The type of external storage.
2948 optional android.stats.storage.ExternalStorageType storage_type = 1;
2949 // The name of the package that is installed on the sd card.
2950 optional string package_name = 2;
2951}
2952
2953/**
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002954 * Logs when an app crashes.
David Chen9e3808c2017-11-20 17:25:34 -08002955 * Logged from:
2956 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2957 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002958message AppCrashOccurred {
Yao Chenc40a19d2018-03-15 16:48:25 -07002959 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002960
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002961 optional string event_type = 2;
David Chen9e3808c2017-11-20 17:25:34 -08002962
2963 // The name of the process.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002964 // system_server if it is not by an app
David Chen9e3808c2017-11-20 17:25:34 -08002965 optional string process_name = 3;
2966
2967 // The pid if available. -1 means not available.
David Chen6e3e6cb2018-01-03 16:14:06 -08002968 optional sint32 pid = 4;
Chenjie Yuf17bf62f2018-04-02 14:22:19 -07002969
2970 optional string package_name = 5;
2971
2972 enum InstantApp {
2973 UNAVAILABLE = 0;
2974 FALSE = 1;
2975 TRUE = 2;
2976 }
2977 optional InstantApp is_instant_app = 6;
2978
2979 enum ForegroundState {
2980 UNKNOWN = 0;
2981 BACKGROUND = 1;
2982 FOREGROUND = 2;
2983 }
2984 optional ForegroundState foreground_state = 7;
Yang Lu732d6382018-11-05 07:53:12 -08002985
2986 optional android.server.ErrorSource error_source = 8;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002987}
David Chen9e3808c2017-11-20 17:25:34 -08002988
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002989/**
2990 * Logs when a WTF (What a Terrible Failure) happened.
2991 * Logged from:
2992 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2993 */
2994message WTFOccurred {
2995 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002996
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002997 optional string tag = 2;
David Chen9e3808c2017-11-20 17:25:34 -08002998
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002999 // The name of the process.
3000 // system_server if it is not by an app
3001 optional string process_name = 3;
David Chen6e3e6cb2018-01-03 16:14:06 -08003002
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003003 // The pid if available. -1 means not available.
3004 optional sint32 pid = 4;
Yang Lu732d6382018-11-05 07:53:12 -08003005
3006 optional android.server.ErrorSource error_source = 5;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003007}
3008
3009/**
3010 * Logs when system server reports low memory.
3011 * Logged from:
3012 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3013 */
3014message LowMemReported {
3015}
3016
3017/**
3018 * Logs when an app ANR (App Not Responding) occurs.
3019 * Logged from:
3020 * frameworks/base/services/core/java/com/android/server/am/AppErrors.java
3021 */
3022message ANROccurred {
3023 optional int32 uid = 1 [(is_uid) = true];
3024
3025 optional string process_name = 2;
3026
3027 optional string short_component_name = 3;
3028
3029 optional string reason = 4;
Chenjie Yuf17bf62f2018-04-02 14:22:19 -07003030
3031 enum InstantApp {
3032 UNAVAILABLE = 0;
3033 FALSE = 1;
3034 TRUE = 2;
3035 }
3036 optional InstantApp is_instant_app = 5;
3037
3038 enum ForegroundState {
3039 UNKNOWN = 0;
3040 BACKGROUND = 1;
3041 FOREGROUND = 2;
3042 }
3043 optional ForegroundState foreground_state = 6;
Yang Lu732d6382018-11-05 07:53:12 -08003044
3045 optional android.server.ErrorSource error_source = 7;
3046
3047 optional string package_name = 8;
David Chen9e3808c2017-11-20 17:25:34 -08003048}
3049
Bookatza7020bd2018-08-28 16:29:35 -07003050/**
3051 * Logs when the vibrator state changes.
3052 * Logged from:
3053 * frameworks/base/services/core/java/com/android/server/VibratorService.java
3054 */
3055message VibratorStateChanged {
3056 repeated AttributionNode attribution_node = 1;
3057
3058 enum State {
3059 OFF = 0;
3060 ON = 1;
3061 }
3062 optional State state = 2;
3063
3064 // Duration (in milliseconds) requested to keep the vibrator on.
3065 // Only applicable for State == ON.
3066 optional int64 duration_millis = 3;
3067}
3068
David Chen0a368b22017-12-06 16:28:16 -08003069/*
3070 * Allows other apps to push events into statsd.
3071 * Logged from:
3072 * frameworks/base/core/java/android/util/StatsLog.java
3073 */
David Chen0b5c90c2018-01-25 16:51:49 -08003074message AppBreadcrumbReported {
David Chen0a368b22017-12-06 16:28:16 -08003075 // The uid of the application that sent this custom atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07003076 optional int32 uid = 1 [(is_uid) = true];
David Chen0a368b22017-12-06 16:28:16 -08003077
3078 // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16).
3079 optional int32 label = 2;
3080
3081 // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom
3082 // predicates for the metrics).
3083 enum State {
3084 UNKNOWN = 0;
3085 UNSPECIFIED = 1; // For events that are known to not represent START/STOP.
3086 STOP = 2;
3087 START = 3;
3088 }
3089 optional State state = 3;
3090}
3091
David Chen9e3808c2017-11-20 17:25:34 -08003092/**
Bookatz7948c872018-09-04 12:58:33 -07003093 * Logs the wall-clock time when a significant wall-clock time shift occurs.
3094 * For example, this could be due to the user manually changing the time.
3095 *
3096 * Logged from:
3097 * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
3098 */
3099message WallClockTimeShifted {
3100 // New wall-clock time in milliseconds, according to System.currentTimeMillis().
3101 optional int64 wall_clock_timestamp_millis = 1;
3102}
3103
3104/**
Bookatz8fcd09a2017-12-18 13:01:10 -08003105 * Logs when statsd detects an anomaly.
3106 *
3107 * Logged from:
3108 * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp
3109 */
3110message AnomalyDetected {
3111 // Uid that owns the config whose anomaly detection alert fired.
Yao Chenc40a19d2018-03-15 16:48:25 -07003112 optional int32 config_uid = 1 [(is_uid) = true];
Bookatz8fcd09a2017-12-18 13:01:10 -08003113
Yangster-mac94e197c2018-01-02 16:03:03 -08003114 // Id of the config whose anomaly detection alert fired.
3115 optional int64 config_id = 2;
Bookatz8fcd09a2017-12-18 13:01:10 -08003116
Yangster-mac94e197c2018-01-02 16:03:03 -08003117 // Id of the alert (i.e. name of the anomaly that was detected).
3118 optional int64 alert_id = 3;
Bookatz8fcd09a2017-12-18 13:01:10 -08003119}
3120
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003121message AppStartOccurred {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003122 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003123 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003124
3125 // The app package name.
3126 optional string pkg_name = 2;
3127
3128 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003129 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003130 WARM = 1;
3131 HOT = 2;
3132 COLD = 3;
3133 }
3134 // The transition type.
3135 optional TransitionType type = 3;
3136
3137 // The activity name.
3138 optional string activity_name = 4;
3139
3140 // The name of the calling app. Empty if not set.
3141 optional string calling_pkg_name = 5;
3142
3143 // Whether the app is an instant app.
3144 optional bool is_instant_app = 6;
3145
3146 // Device uptime when activity started.
David Chen0b5c90c2018-01-25 16:51:49 -08003147 optional int64 activity_start_millis = 7;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003148
Bookatz80d11a02018-01-16 10:46:35 -08003149 optional android.app.AppTransitionReasonEnum reason = 8;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003150
David Chen0b5c90c2018-01-25 16:51:49 -08003151 optional int32 transition_delay_millis = 9;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003152 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08003153 optional int32 starting_window_delay_millis = 10;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003154 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08003155 optional int32 bind_application_delay_millis = 11;
3156 optional int32 windows_drawn_delay_millis = 12;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003157
3158 // Empty if not set.
3159 optional string launch_token = 13;
3160
Calin Juravle759fbda2018-02-20 19:52:30 +00003161 // The compiler filter used when when the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07003162 optional int32 package_optimization_compilation_filter = 14;
Calin Juravle759fbda2018-02-20 19:52:30 +00003163
3164 // The reason why the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07003165 optional int32 package_optimization_compilation_reason = 15;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003166}
3167
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003168message AppStartCanceled {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003169 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003170 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003171
3172 // The app package name.
3173 optional string pkg_name = 2;
3174
3175 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003176 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003177 WARM = 1;
3178 HOT = 2;
3179 COLD = 3;
3180 }
3181 // The transition type.
3182 optional TransitionType type = 3;
3183
3184 // The activity name.
3185 optional string activity_name = 4;
3186}
3187
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003188message AppStartFullyDrawn {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003189 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003190 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003191
3192 // The app package name.
3193 optional string pkg_name = 2;
3194
3195 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003196 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003197 WITH_BUNDLE = 1;
3198 WITHOUT_BUNDLE = 2;
3199 }
3200 // The transition type.
3201 optional TransitionType type = 3;
3202
3203 // The activity name.
3204 optional string activity_name = 4;
3205
3206 optional bool transition_process_running = 5;
3207
3208 // App startup time (until call to Activity#reportFullyDrawn()).
David Chen0b5c90c2018-01-25 16:51:49 -08003209 optional int64 app_startup_time_millis = 6;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003210}
3211
Bookatz8fcd09a2017-12-18 13:01:10 -08003212/**
Chenjie Yu52cacc62017-12-08 18:11:45 -08003213 * Logs a picture-in-picture action
3214 * Logged from:
3215 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3216 * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java
3217 * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
3218 */
3219message PictureInPictureStateChanged {
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003220 // -1 if it is not available
Yao Chenc40a19d2018-03-15 16:48:25 -07003221 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu52cacc62017-12-08 18:11:45 -08003222
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003223 optional string short_name = 2;
Chenjie Yu52cacc62017-12-08 18:11:45 -08003224
Chenjie Yu52cacc62017-12-08 18:11:45 -08003225 enum State {
3226 ENTERED = 1;
3227 EXPANDED_TO_FULL_SCREEN = 2;
3228 MINIMIZED = 3;
3229 DISMISSED = 4;
3230 }
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003231 optional State state = 3;
Chenjie Yu52cacc62017-12-08 18:11:45 -08003232}
3233
3234/**
Chenjie Yue8904192017-12-08 19:12:57 -08003235 * Logs overlay action
3236 * Logged from:
3237 * services/core/java/com/android/server/wm/Session.java
3238 */
3239message OverlayStateChanged {
tsaichristine5adc7e02020-01-14 17:07:39 -08003240 optional int32 uid = 1 [(state_field_option).option = PRIMARY_FIELD, (is_uid) = true];
Chenjie Yue8904192017-12-08 19:12:57 -08003241
tsaichristine5adc7e02020-01-14 17:07:39 -08003242 optional string package_name = 2 [(state_field_option).option = PRIMARY_FIELD];
Chenjie Yue8904192017-12-08 19:12:57 -08003243
3244 optional bool using_alert_window = 3;
3245
3246 enum State {
3247 ENTERED = 1;
3248 EXITED = 2;
3249 }
tsaichristine5adc7e02020-01-14 17:07:39 -08003250 optional State state = 4 [
3251 (state_field_option).option = EXCLUSIVE_STATE,
3252 (state_field_option).nested = false,
3253 (state_field_option).default_state_value = 2
3254 ];
Chenjie Yue8904192017-12-08 19:12:57 -08003255}
3256
Chenjie Yuccfe6452018-01-30 11:33:21 -08003257/*
3258 * Logs foreground service starts and stops.
3259 * Note that this is not when a service starts or stops, but when it is
3260 * considered foreground.
3261 * Logged from
3262 * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
3263 */
3264message ForegroundServiceStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07003265 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuccfe6452018-01-30 11:33:21 -08003266 // package_name + "/" + class_name
3267 optional string short_name = 2;
3268
3269 enum State {
3270 ENTER = 1;
3271 EXIT = 2;
3272 }
3273 optional State state = 3;
3274}
3275
Chenjie Yue8904192017-12-08 19:12:57 -08003276/**
Chenjie Yubbcbc602018-02-05 16:51:52 -08003277 * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky
3278 * behavior in its own uid. However, the metrics of these isolated uid's almost always should be
3279 * attributed back to the parent (host) uid. One example is Chrome.
3280 *
3281 * Logged from:
3282 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
3283 */
3284message IsolatedUidChanged {
3285 // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003286 // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd.
Bookatz3c648862018-05-25 13:32:43 -07003287 // This field is ignored when event == REMOVED.
Chenjie Yubbcbc602018-02-05 16:51:52 -08003288 optional int32 parent_uid = 1;
3289
3290 optional int32 isolated_uid = 2;
3291
3292 // We expect an isolated uid to be removed before if it's used for another parent uid.
3293 enum Event {
3294 REMOVED = 0;
3295 CREATED = 1;
3296 }
3297 optional Event event = 3;
3298}
3299
3300/*
3301 * Logs the reception of an incoming network packet causing the main system to wake up for
3302 * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd
3303 * and processed by WakeupController.cpp.
3304 */
3305message PacketWakeupOccurred {
3306 // The uid owning the socket into which the packet was delivered, or -1 if the packet was
3307 // delivered nowhere.
Yao Chenc40a19d2018-03-15 16:48:25 -07003308 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003309 // The interface name on which the packet was received.
3310 optional string iface = 2;
3311 // The ethertype value of the packet.
3312 optional int32 ethertype = 3;
3313 // String representation of the destination MAC address of the packet.
3314 optional string destination_hardware_address = 4;
3315 // String representation of the source address of the packet if this was an IP packet.
3316 optional string source_ip = 5;
3317 // String representation of the destination address of the packet if this was an IP packet.
3318 optional string destination_ip = 6;
3319 // The value of the protocol field if this was an IPv4 packet or the value of the Next Header
3320 // field if this was an IPv6 packet. The range of possible values is the same for both IP
3321 // families.
3322 optional int32 ip_next_header = 7;
3323 // The source port if this was a TCP or UDP packet.
3324 optional int32 source_port = 8;
3325 // The destination port if this was a TCP or UDP packet.
3326 optional int32 destination_port = 9;
3327}
3328
3329/*
3330 * Logs the memory stats for an app on startup.
3331 * Logged from:
3332 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3333 */
3334message AppStartMemoryStateCaptured {
3335 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003336 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003337
3338 // The process name.
3339 optional string process_name = 2;
3340
3341 // The activity name.
3342 optional string activity_name = 3;
3343
3344 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003345 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003346
3347 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003348 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003349
3350 // RSS
3351 optional int64 rss_in_bytes = 6;
3352
3353 // CACHE
3354 optional int64 cache_in_bytes = 7;
3355
3356 // SWAP
3357 optional int64 swap_in_bytes = 8;
3358}
3359
3360/*
3361 * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries
3362 * for LMK event.
3363 * Logged from:
3364 * system/core/lmkd/lmkd.c
3365 */
3366message LmkStateChanged {
3367 enum State {
3368 UNKNOWN = 0;
3369 START = 1;
3370 STOP = 2;
3371 }
3372 optional State state = 1;
3373}
3374
3375/*
3376 * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure.
3377 * Logged from:
3378 * system/core/lmkd/lmkd.c
3379 */
3380message LmkKillOccurred {
3381 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003382 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003383
3384 // The process name.
3385 optional string process_name = 2;
3386
3387 // oom adj score.
Yangster-maca8a30442018-10-13 23:46:34 -07003388 optional int32 oom_adj_score = 3;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003389
3390 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003391 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003392
3393 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003394 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003395
3396 // RSS
3397 optional int64 rss_in_bytes = 6;
3398
3399 // CACHE
3400 optional int64 cache_in_bytes = 7;
3401
3402 // SWAP
3403 optional int64 swap_in_bytes = 8;
Jim Blackler8593d1f2018-11-21 15:24:48 +00003404
3405 // The elapsed real time of start of the process.
3406 optional int64 process_start_time_nanos = 9;
Suren Baghdasaryan1fbaa1f2019-03-04 11:09:31 -08003407
3408 // Min oom adj score considered by lmkd.
3409 optional int32 min_oom_score = 10;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003410}
3411
Rajeev Kumar51b54602018-03-01 12:18:26 -08003412/*
3413 * Logs when the ActivityManagerService detects that an app died.
3414 *
3415 * Logged from:
3416 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3417 */
3418message AppDied {
3419 // timestamp(elapsedRealtime) of record creation
tsaichristine5adc7e02020-01-14 17:07:39 -08003420 optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Rajeev Kumar51b54602018-03-01 12:18:26 -08003421}
3422
Howard Ro21a039c2018-08-06 14:55:47 -07003423/**
3424 * An atom for generic metrics logging. Available from Android Q.
3425 */
3426message GenericAtom {
3427 // The uid of the application that sent this custom atom.
3428 optional int32 uid = 1 [(is_uid) = true];
3429
3430 // An event_id indicates the type of event.
Howard Ro9a862de2018-10-11 16:03:33 -07003431 optional android.stats.EventType event_id = 2;
Howard Ro21a039c2018-08-06 14:55:47 -07003432}
3433
Tej Singhd6d6d772018-09-05 17:41:25 -07003434/**
Will Brockmanfbaa7912019-10-24 15:15:09 -04003435 * Atom for simple logging of user interaction and impression events, such as "the user touched
3436 * this button" or "this dialog was displayed".
3437 * Keep the UI event stream clean: don't use for system or background events.
3438 * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly.
Will Brockman079fdaa2020-01-12 16:45:03 -05003439 *
3440 * Logged from:
3441 * frameworks/base/services/core/java/com/android/server/
3442 * frameworks/base/packages/SystemUI/src/com/android/systemui/
Will Brockmanfbaa7912019-10-24 15:15:09 -04003443 */
3444message UiEventReported {
3445 // The event_id.
3446 optional int32 event_id = 1;
3447 // The event's source or target uid and package, if applicable.
3448 // For example, the package posting a notification, or the destination package of a share.
3449 optional int32 uid = 2 [(is_uid) = true];
3450 optional string package_name = 3;
Will Brockman12282ac2019-12-20 09:37:42 -05003451 // An identifier used to disambiguate which logs refer to a particular instance of some
3452 // UI element. Useful when there might be multiple instances simultaneously active.
3453 optional int32 instance_id = 4;
Will Brockmanfbaa7912019-10-24 15:15:09 -04003454}
3455
3456/**
Will Brockman079fdaa2020-01-12 16:45:03 -05003457 * Reports a notification was created or updated.
3458 *
3459 * Logged from:
3460 * frameworks/base/services/core/java/com/android/server/notification/
3461 */
3462message NotificationReported {
3463 // The event_id (as for UiEventReported).
3464 optional int32 event_id = 1;
3465 // The notifying app's uid and package.
3466 optional int32 uid = 2 [(is_uid) = true];
3467 optional string package_name = 3;
3468 // A small system-assigned identifier for the notification.
3469 // Locally probably-unique, but expect collisions across users and/or days.
3470 optional int32 instance_id = 4;
3471 // The app-assigned notification ID and tag
3472 optional int32 notification_id = 5;
3473 optional string notification_tag = 6;
3474 optional string channel_id = 7; // App-assigned channel ID
3475
3476 // Grouping information
3477 optional string group_id = 8; // Group the notification currently belongs to
3478 optional int32 group_instance_id = 9; // Instance_id of the group-summary notification
3479 optional bool is_group_summary = 10; // Tags the group-summary notification
3480
3481 // Attributes
3482 optional string category = 11; // App-assigned notification category (API-defined strings)
3483 optional int32 style = 12; // App-assigned notification style
3484 optional int32 num_people = 13; // Number of Person records attached to the notification
3485
3486 // Ordering, importance and interruptiveness
3487
3488 optional int32 position = 14; // Position in NotificationManager's list
3489
3490 optional android.stats.sysui.NotificationImportance importance = 15;
3491 optional int32 alerting = 16; // Bitfield, 1=buzz 2=beep 4=blink
3492
3493 enum NotificationImportanceExplanation {
3494 IMPORTANCE_EXPLANATION_UNKNOWN = 0;
3495 IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance.
3496 IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance.
3497 IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override.
3498 IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override.
3499 // Like _APP, but based on pre-channels priority signal.
3500 IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5;
3501 }
3502
3503 optional NotificationImportanceExplanation importance_source = 17;
3504 optional android.stats.sysui.NotificationImportance importance_initial = 18;
3505 optional NotificationImportanceExplanation importance_initial_source = 19;
3506 optional android.stats.sysui.NotificationImportance importance_asst = 20;
3507 optional int32 assistant_hash = 21;
3508 optional float assistant_ranking_score = 22;
3509}
3510
3511message Notification {
3512 // The notifying app's uid and package.
3513 optional int32 uid = 1 [(is_uid) = true];
3514 optional string package_name = 2;
3515 // A small system-assigned identifier for the notification.
3516 optional int32 instance_id = 3;
3517
3518 // Grouping information.
3519 optional int32 group_instance_id = 4;
3520 optional bool is_group_summary = 5;
3521
3522 // The section of the shade that the notification is in.
3523 // See NotificationSectionsManager.PriorityBucket.
3524 enum NotificationSection {
3525 SECTION_UNKNOWN = 0;
3526 SECTION_PEOPLE = 1;
3527 SECTION_ALERTING = 2;
3528 SECTION_SILENT = 3;
3529 }
3530 optional NotificationSection section = 6;
3531}
3532
3533message NotificationList {
3534 repeated Notification notifications = 1; // An ordered sequence of notifications.
3535}
3536
3537/**
3538 * Reports a notification panel was displayed, e.g. from the lockscreen or status bar.
3539 *
3540 * Logged from:
3541 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
3542 */
3543message NotificationPanelReported {
3544 // The event_id (as for UiEventReported).
3545 optional int32 event_id = 1;
3546 optional int32 num_notifications = 2;
3547 // The notifications in the panel, in the order that they appear there.
3548 optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES];
3549}
3550
3551/**
3552 * Reports a notification channel, or channel group, was created, updated, or deleted.
3553 *
3554 * Logged from:
3555 * frameworks/base/services/core/java/com/android/server/notification/
3556 */
3557message NotificationChannelModified {
3558 // The event_id (as for UiEventReported).
3559 optional int32 event_id = 1;
3560 // The notifying app's uid and package.
3561 optional int32 uid = 2 [(is_uid) = true];
3562 optional string package_name = 3;
3563 // App-assigned notification channel ID or channel-group ID
3564 optional string channel_id = 4;
3565 // Previous importance setting, if applicable
3566 optional android.stats.sysui.NotificationImportance old_importance = 5;
3567 // New importance setting
3568 optional android.stats.sysui.NotificationImportance importance = 6;
3569}
3570
3571
3572/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003573 * Logs when a biometric acquire event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003574 *
3575 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003576 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003577 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003578message BiometricAcquired {
3579 // Biometric modality that was acquired.
3580 optional android.hardware.biometrics.ModalityEnum modality = 1;
3581 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java.
3582 optional int32 user = 2;
3583 // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage.
3584 optional bool is_crypto = 3;
3585 // Action that the device is performing. Acquired messages are only expected for enroll and
3586 // authenticate. Other actions may indicate an error.
3587 optional android.hardware.biometrics.ActionEnum action = 4;
3588 // The client that this acquisition was received for.
3589 optional android.hardware.biometrics.ClientEnum client = 5;
3590 // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager.
3591 optional int32 acquire_info = 6;
3592 // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
3593 optional int32 acquire_info_vendor = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003594 // Dictates if this message should trigger additional debugging.
3595 optional bool debug = 8;
Tej Singhd6d6d772018-09-05 17:41:25 -07003596}
3597
3598/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003599 * Logs when a biometric authentication event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003600 *
3601 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003602 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003603 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003604message BiometricAuthenticated {
3605 // Biometric modality that was used.
3606 optional android.hardware.biometrics.ModalityEnum modality = 1;
3607 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3608 optional int32 user = 2;
3609 // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password
3610 // storage.
3611 optional bool is_crypto = 3;
3612 // The client that this acquisition was received for.
3613 optional android.hardware.biometrics.ClientEnum client = 4;
Kevin Chyndb77e132019-01-29 13:30:41 -08003614 // If authentication requires user confirmation. See BiometricPrompt's
3615 // setRequireConfirmation(bool) method.
3616 optional bool require_confirmation = 5;
Tej Singhd6d6d772018-09-05 17:41:25 -07003617
Kevin Chyn1741a072019-01-17 11:54:40 -08003618 enum State {
Tej Singhd6d6d772018-09-05 17:41:25 -07003619 UNKNOWN = 0;
Kevin Chyn1741a072019-01-17 11:54:40 -08003620 REJECTED = 1;
3621 PENDING_CONFIRMATION = 2;
3622 CONFIRMED = 3;
Tej Singhd6d6d772018-09-05 17:41:25 -07003623 }
Kevin Chyn1741a072019-01-17 11:54:40 -08003624
3625 // State of the current auth attempt.
Kevin Chyndb77e132019-01-29 13:30:41 -08003626 optional State state = 6;
Kevin Chyn1741a072019-01-17 11:54:40 -08003627 // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is
3628 // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to
3629 // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
3630 // CONFIRMED.
Kevin Chyndb77e132019-01-29 13:30:41 -08003631 optional int64 latency_millis = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003632 // Dictates if this message should trigger additional debugging.
3633 optional bool debug = 8;
Kevin Chyn1741a072019-01-17 11:54:40 -08003634}
3635
3636/**
3637 * Logs when a biometric error occurs.
3638 *
3639 * Logged from:
3640 * frameworks/base/services/core/java/com/android/server/biometrics
3641 */
3642message BiometricErrorOccurred {
3643 // Biometric modality that was used.
3644 optional android.hardware.biometrics.ModalityEnum modality = 1;
3645 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3646 optional int32 user = 2;
3647 // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage.
3648 optional bool is_crypto = 3;
3649 // Action that the device is performing.
3650 optional android.hardware.biometrics.ActionEnum action = 4;
3651 // The client that this acquisition was received for.
3652 optional android.hardware.biometrics.ClientEnum client = 5;
3653 // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors
3654 // are unique to modality.
3655 optional int32 error_info = 6;
3656 // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
3657 // by the vendor and not specified by the HIDL interface.
3658 optional int32 error_info_vendor = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003659 // Dictates if this message should trigger additional debugging.
3660 optional bool debug = 8;
Kevin Chyn7fca2362019-06-20 17:20:42 -07003661 // Time spent during the authentication attempt.
3662 optional int64 latency_millis = 9;
Kevin Chyn1741a072019-01-17 11:54:40 -08003663}
3664
3665/**
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003666 * Logs when a system health issue is detected.
Kevin Chyn1741a072019-01-17 11:54:40 -08003667 * Logged from:
3668 * frameworks/base/services/core/java/com/android/server/biometrics
3669 */
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003670message BiometricSystemHealthIssueDetected {
Kevin Chyn1741a072019-01-17 11:54:40 -08003671 // Biometric modality.
3672 optional android.hardware.biometrics.ModalityEnum modality = 1;
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003673 // Type of issue detected.
3674 optional android.hardware.biometrics.IssueEnum issue = 2;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003675 // Dictates if this message should trigger additional debugging.
3676 optional bool debug = 3;
Tej Singhd6d6d772018-09-05 17:41:25 -07003677}
Howard Ro688ae182018-09-25 00:09:36 -07003678
joshmccloskey6f952b22019-03-25 20:59:35 -07003679/**
3680 * Logs when a biometric enrollment occurs.
3681 *
3682 * Logged from:
3683 * frameworks/base/services/core/java/com/android/server/biometrics
3684 */
3685message BiometricEnrolled {
3686 // Biometric modality that was used.
3687 optional android.hardware.biometrics.ModalityEnum modality = 1;
3688 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3689 optional int32 user = 2;
3690 // The amount of time the enrollment took in milliseconds.
3691 optional int64 latency_millis = 3;
3692 // Whether or not the enrollment was successful.
3693 optional bool success = 4;
3694}
3695
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003696/*
Tej Singh0d176952019-01-16 19:10:54 -08003697 * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips.
Yangster-macb89807e2018-11-15 21:10:57 -08003698 */
Tej Singh0d176952019-01-16 19:10:54 -08003699message FlagFlipUpdateOccurred {
3700 // If the event is from a flag config package, specify the package name.
3701 optional string flag_flip_package_name = 1;
3702
3703 // The order id of the package
3704 optional int64 order_id = 2;
Yangster-macb89807e2018-11-15 21:10:57 -08003705}
3706
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003707/**
3708 * Potential experiment ids that goes with a train install.
3709 */
3710message TrainExperimentIds {
3711 repeated int64 experiment_id = 1;
3712}
3713
Yangster-macb89807e2018-11-15 21:10:57 -08003714/*
3715 * Logs when a binary push state changes.
Chenjie Yu8366c712019-01-16 20:48:30 -08003716 * Logged by the installer via public api.
Yangster-macb89807e2018-11-15 21:10:57 -08003717 */
3718message BinaryPushStateChanged {
Chenjie Yu8366c712019-01-16 20:48:30 -08003719 // Name of the train.
3720 optional string train_name = 1;
3721 // Version code for a "train" of packages that need to be installed atomically
3722 optional int64 train_version_code = 2;
3723 // After installation of this package, device requires a restart.
3724 optional bool requires_staging = 3;
3725 // Rollback should be enabled for this install.
3726 optional bool rollback_enabled = 4;
3727 // Requires low latency monitoring if possible.
3728 optional bool requires_low_latency_monitor = 5;
3729
Yangster-macb89807e2018-11-15 21:10:57 -08003730 enum State {
Chenjie Yu8366c712019-01-16 20:48:30 -08003731 UNKNOWN = 0;
3732 INSTALL_REQUESTED = 1;
3733 INSTALL_STARTED = 2;
3734 INSTALL_STAGED_NOT_READY = 3;
3735 INSTALL_STAGED_READY = 4;
3736 INSTALL_SUCCESS = 5;
Tej Singh403fe472019-04-30 12:54:21 -07003737 // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
3738 // and INSTALL_FAILURE_COMMIT.
3739 INSTALL_FAILURE = 6 [deprecated = true];
3740 // This enum is for installs that are manually cancelled via the Manual Update UI.
Chenjie Yu8366c712019-01-16 20:48:30 -08003741 INSTALL_CANCELLED = 7;
3742 INSTALLER_ROLLBACK_REQUESTED = 8;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08003743 INSTALLER_ROLLBACK_INITIATED = 9;
3744 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
3745 INSTALLER_ROLLBACK_STAGED = 11;
3746 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
3747 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
3748 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
3749 INSTALLER_ROLLBACK_SUCCESS = 15;
3750 INSTALLER_ROLLBACK_FAILURE = 16;
Howard Ro174ed562019-04-07 22:17:58 -07003751 INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
3752 INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
3753 INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
3754 INSTALL_STAGED_CANCEL_REQUESTED = 20;
3755 INSTALL_STAGED_CANCEL_SUCCESS = 21;
3756 INSTALL_STAGED_CANCEL_FAILURE = 22;
Tej Singh403fe472019-04-30 12:54:21 -07003757 INSTALL_FAILURE_DOWNLOAD = 23;
3758 INSTALL_FAILURE_STATE_MISMATCH = 24;
3759 INSTALL_FAILURE_COMMIT = 25;
Jonathan Nguyen5886a712020-01-16 10:34:21 -08003760 REBOOT_TRIGGERED = 26;
Yangster-macb89807e2018-11-15 21:10:57 -08003761 }
Chenjie Yu8366c712019-01-16 20:48:30 -08003762 optional State state = 6;
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003763 // Possible experiment ids for monitoring this push.
3764 optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
3765 // user id
3766 optional int32 user_id = 8;
Jonathan Nguyen5886a712020-01-16 10:34:21 -08003767 optional int32 reason = 9;
Yangster-macb89807e2018-11-15 21:10:57 -08003768}
3769
Tej Singhc9203082019-05-03 13:42:23 -07003770/* Test atom, is not logged anywhere */
3771message TestAtomReported {
3772 repeated AttributionNode attribution_node = 1;
3773 optional int32 int_field = 2;
3774 optional int64 long_field = 3;
3775 optional float float_field = 4;
3776 optional string string_field = 5;
3777 optional bool boolean_field = 6;
3778 enum State {
3779 UNKNOWN = 0;
3780 OFF = 1;
3781 ON = 2;
3782 }
3783 optional State state = 7;
3784 optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES];
3785}
3786
Maggie Whitefc1aa592018-11-28 21:55:23 -08003787/** Represents USB port overheat event. */
3788message UsbPortOverheatEvent {
3789 /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */
3790 optional int32 plug_temperature_deci_c = 1;
3791
3792 /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */
3793 optional int32 max_temperature_deci_c = 2;
3794
3795 /* Time between USB plug event and overheat threshold trip, in seconds. */
3796 optional int32 time_to_overheat_secs = 3;
3797
3798 /* Time between overheat threshold trip and hysteresis, in seconds. */
3799 optional int32 time_to_hysteresis_secs = 4;
3800
3801 /* Time between hysteresis and active mitigation ending, in seconds. */
3802 optional int32 time_to_inactive_secs = 5;
3803};
3804
Maggie White8735b852019-01-18 11:40:49 -08003805/**
3806 * Logs total effective full charge and discharge cycles on a battery.
3807 * Here are some examples of one effective cycle:
3808 * 1) the battery charges from 0% to 100% and drains back to 0%,
3809 * 2) charging from 50% to 100% and draining back to 50% twice.
3810 * Pulled from:
3811 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
3812 */
3813message BatteryCycleCount {
3814 /* Number of total charge and discharge cycles on the system battery. */
3815 optional int32 cycle_count = 1;
3816}
3817
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003818/**
Carmen Agimof12dec122019-03-06 16:14:38 +00003819 * Logs that external storage is mounted and information about it, the storage type (sd card/usb/
3820 * others), its type (public or private) and the size in bytes.
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003821 * Pulled from:
3822 * StatsCompanionService
3823 */
3824
Carmen Agimof12dec122019-03-06 16:14:38 +00003825message ExternalStorageInfo {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003826
Carmen Agimof12dec122019-03-06 16:14:38 +00003827 enum VolumeType {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003828 UNKNOWN = 0;
Carmen Agimof12dec122019-03-06 16:14:38 +00003829 PUBLIC = 1;
3830 PRIVATE = 2;
3831 OTHER = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003832 }
3833
Carmen Agimof12dec122019-03-06 16:14:38 +00003834 // The type of external storage.
3835 optional android.stats.storage.ExternalStorageType storage_type = 1;
3836 // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal.
3837 optional VolumeType volume_type = 2;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003838 // Total size of the sd card in bytes.
Carmen Agimof12dec122019-03-06 16:14:38 +00003839 optional int64 size_bytes = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003840}
3841
Yangster-macb89807e2018-11-15 21:10:57 -08003842/*
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003843 * Logs when a connection becomes available and lost.
3844 * Logged in StatsCompanionService.java
3845 */
3846message ConnectivityStateChanged {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003847 // Id of the network.
3848 optional int32 net_id = 1;
3849
3850 enum State {
3851 UNKNOWN = 0;
3852 CONNECTED = 1;
3853 DISCONNECTED = 2;
3854 }
3855 // Connected state of a network.
3856 optional State state = 2;
3857}
3858
3859/**
3860 * Logs when a service starts and stops.
3861 * Logged from:
3862 * services/core/java/com/android/server/am/ActiveServices.java
3863 */
3864message ServiceStateChanged {
3865
3866 optional int32 uid = 1 [(is_uid) = true];
3867
3868 optional string package_name = 2;
3869
3870 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003871
3872 enum State {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003873 START = 1;
3874 STOP = 2;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003875 }
Chenjie Yu75b3c492018-10-06 21:45:19 -07003876
3877 optional State state = 4;
3878}
3879
3880/**
3881 * Logs when a service is launched.
3882 * Logged from:
3883 * services/core/java/com/android/server/am/ActiveServices.java
3884 */
3885message ServiceLaunchReported {
3886
3887 optional int32 uid = 1 [(is_uid) = true];
3888
3889 optional string package_name = 2;
3890
3891 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003892}
Howard Ro688ae182018-09-25 00:09:36 -07003893
Andrei Onea4ad6d0c2019-02-08 13:54:12 +00003894/**
3895 * Logs when a hidden API is used.
3896 *
3897 * Logged from:
3898 * libcore/libart/src/main/java/dalvik/system/VMRuntime.java
3899 */
3900message HiddenApiUsed {
3901 // The uid of the app making the hidden access.
3902 optional int32 uid = 1 [(is_uid) = true];
3903
3904 // Signature of the method or field accessed.
3905 optional string signature = 2;
3906
3907 enum AccessMethod {
3908 NONE = 0;
3909 REFLECTION = 1;
3910 JNI = 2;
3911 LINKING = 3;
3912 }
3913
3914 // Type of access.
3915 optional AccessMethod access_method = 3;
3916
3917 // Whether the access was prevented or not.
3918 optional bool access_denied = 4;
3919}
3920
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003921/**
3922 * Logs user interaction with the Privacy Indicators added in Q. In particular:
3923 * - When user sees privacy chip
3924 * - When user clicks privacy chip
3925 * - How does the user exit the Privacy Dialog
3926 * Logged from:
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003927 * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
3928 */
3929message PrivacyIndicatorsInteracted {
3930
3931 enum Type {
3932 UNKNOWN = 0;
3933 CHIP_VIEWED = 1;
3934 CHIP_CLICKED = 2;
3935 DIALOG_PRIVACY_SETTINGS = 3;
3936 DIALOG_DISMISS = 4;
3937 DIALOG_LINE_ITEM = 5;
3938 }
3939
tsaichristine5adc7e02020-01-14 17:07:39 -08003940 optional Type type = 1 [(state_field_option).option = EXCLUSIVE_STATE];
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003941
3942 // Used if the type is LINE_ITEM
3943 optional string package_name = 2;
3944}
3945
Carmen Agimof6dcc5032019-03-01 16:20:09 +00003946/**
3947 * Logs information about a package that is moved from the internal to external storage and vice
3948 * versa.
3949 * It logs the package name, the type of the external storage where the package is installed
3950 * (if moved to external storage, or UNKNOWN if moved to internal storage),
3951 * and the move type: if it's from internal to external or the other way around.
3952 *
3953 * Logged from:
3954 frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
3955 */
3956message AppMovedStorageReported {
3957 enum MoveType {
3958 UNKNOWN = 0;
3959 TO_EXTERNAL = 1;
3960 TO_INTERNAL = 2;
3961 }
3962 // The type of the external storage.
3963 optional android.stats.storage.ExternalStorageType external_storage_type = 1;
3964 // The type of move.
3965 optional MoveType move_type = 2;
3966 // The name of the package that was moved.
3967 optional string package_name = 3;
3968}
3969
jianjin8f2dee02019-03-29 14:03:08 -07003970/**
3971 * Logs when system server watchdog occurs.
3972 * Logged from:
3973 * frameworks/base/services/core/java/com/android/server/Watchdog.java
3974 */
3975message SystemServerWatchdogOccurred {
3976 optional string subject = 1;
3977}
3978
3979/**
3980 * Logs when new file added to tombstones.
3981 * Logged from:
3982 * frameworks/base/core/java/com/android/server/BootReceiver.java
3983 */
3984message TombStoneOccurred {
3985}
3986
Hai Zhang5d3328d2019-04-13 21:25:06 +08003987/*
3988 * Information about a role request
3989 *
3990 * Logged from:
3991 * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java
3992 */
3993message RoleRequestResultReported {
3994 // UID of application requesting the role
3995 optional int32 requesting_uid = 1;
3996
3997 // Package name of application requesting the role
3998 optional string requesting_package_name = 2;
3999
4000 // The role to be granted
4001 optional string role_name = 3;
4002
4003 // The count of applications qualifying for the role
4004 optional int32 qualifying_count = 4;
4005
4006 // UID of application current granted the role
4007 optional int32 current_uid = 5;
4008
4009 // Package name of application current granted the role
4010 optional string current_package_name = 6;
4011
4012 // UID of another application that user chose to grant the role to, instead of the requesting
4013 // application
4014 optional int32 granted_another_uid = 7;
4015
4016 // Package name of another application that user chose to grant the role to, instead of the
4017 // requesting application
4018 optional string granted_another_package_name = 8;
4019
4020 enum Result {
4021 UNDEFINED = 0;
4022 // role request was ignored
4023 IGNORED = 1;
4024 // role request was ignored because it's already granted
4025 IGNORED_ALREADY_GRANTED = 2;
4026 // role request was ignored because the application isn't qualified
4027 IGNORED_NOT_QUALIFIED = 3;
4028 // role request was ignored because user said it should be always denied
4029 IGNORED_USER_ALWAYS_DENIED = 4;
4030 // role was granted by user action
4031 USER_GRANTED = 5;
4032 // role was denied by user action
4033 USER_DENIED = 6;
4034 // role was denied by user granting another application the role
4035 USER_DENIED_GRANTED_ANOTHER = 7;
4036 // role was denied and set to be always denied by the user
4037 USER_DENIED_WITH_ALWAYS = 8;
4038 }
4039 // The result of the role request
4040 optional Result result = 9;
4041}
4042
Mark Tabrya824a642019-11-05 12:26:12 -08004043/**
4044 * Logs when a Vehicle Maps Service client's connection state has changed
4045 *
4046 * Logged from:
4047 * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java
4048 */
4049message VmsClientConnectionStateChanged {
4050 // The UID of the VMS client app
4051 optional int32 uid = 1 [(is_uid) = true];
4052
4053 enum State {
4054 UNKNOWN = 0;
4055 // Attempting to connect to the client
4056 CONNECTING = 1;
4057 // Client connection established
4058 CONNECTED = 2;
4059 // Client connection closed unexpectedly
4060 DISCONNECTED = 3;
4061 // Client connection closed by VMS
4062 TERMINATED = 4;
4063 // Error establishing the client connection
4064 CONNECTION_ERROR = 5;
4065 }
4066
4067 optional State state = 2;
4068}
4069
Jeff Sharkey6bd21572019-11-15 20:45:33 -07004070/**
4071 * Logs when MediaProvider has successfully finished scanning a storage volume.
4072 *
4073 * Logged from:
4074 * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java
4075 */
4076message MediaProviderScanEvent {
4077 enum Reason {
4078 // Scan triggered due to unknown reason
4079 UNKNOWN = 0;
4080 // Scan triggered due to storage volume being mounted
4081 MOUNTED = 1;
4082 // Scan triggered due to explicit user action or app request
4083 DEMAND = 2;
4084 // Scan triggered due to idle maintenance
4085 IDLE = 3;
4086 }
4087
4088 // Volume type that this event pertains to
4089 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4090 // Reason why this scan was triggered
4091 optional Reason reason = 2;
4092 // Total number of files scanned
4093 optional int64 item_count = 3;
4094 // Duration of scan, normalized per file
4095 optional float normalized_duration_millis = 4;
4096 // Number of database inserts, normalized per file
4097 optional float normalized_insert_count = 5;
4098 // Number of database updates, normalized per file
4099 optional float normalized_update_count = 6;
4100 // Number of database deletes, normalized per file
4101 optional float normalized_delete_count = 7;
4102}
4103
4104/**
4105 * Logs when an app has asked MediaProvider to delete media belonging to the user.
4106 *
4107 * Logged from:
4108 * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
4109 */
4110message MediaProviderDeletionEvent {
4111 // Volume type that this event pertains to
4112 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4113 // Device timestamp when this deletion event occurred
4114 optional int64 timestamp_millis = 2;
4115 // App that requested deletion
4116 optional string package_name = 3;
4117 // Number of items that were deleted
4118 optional int32 item_count = 4;
4119}
4120
4121/**
4122 * Logs when an app has asked MediaProvider to grant them access to media belonging to the user.
4123 *
4124 * Logged from:
4125 * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java
4126 */
4127message MediaProviderPermissionEvent {
4128 enum Result {
4129 UNKNOWN = 0;
4130 USER_GRANTED = 1;
4131 AUTO_GRANTED = 2;
4132 USER_DENIED = 3;
4133 USER_DENIED_WITH_PREJUDICE = 4;
4134 AUTO_DENIED = 5;
4135 }
4136
4137 // Volume type that this event pertains to
4138 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4139 // Device timestamp when this permission event occurred
4140 optional int64 timestamp_millis = 2;
4141 // App that requested permission
4142 optional string package_name = 3;
4143 // Number of items that were requested
4144 optional int32 item_count = 4;
4145 // Result of this request
4146 optional Result result = 5;
4147}
4148
4149/**
4150 * Logs when MediaProvider has finished upgrading or downgrading its database schema.
4151 *
4152 * Logged from:
4153 * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java
4154 */
4155message MediaProviderSchemaChange {
4156 // Volume type that this event pertains to
4157 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4158 // Old database version code
4159 optional int32 version_from = 2;
4160 // New database version code
4161 optional int32 version_to = 3;
4162 // Total number of files in database
4163 optional int64 item_count = 4;
4164 // Duration of schema change, normalized per file
4165 optional float normalized_duration_millis = 5;
4166}
4167
4168/**
4169 * Logs when MediaProvider has finished an idle maintenance job.
4170 *
4171 * Logged from:
4172 * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java
4173 */
4174message MediaProviderIdleMaintenance {
4175 // Volume type that this event pertains to
4176 optional android.stats.mediaprovider.VolumeType volume_type = 1;
4177
4178 // Total number of files in database
4179 optional int64 item_count = 2;
4180 // Duration of idle maintenance, normalized per file
4181 optional float normalized_duration_millis = 3;
4182 // Number of thumbnails found to be stale, normalized per file
4183 optional float normalized_stale_thumbnails = 4;
4184 // Number of items found to be expired, normalized per file
4185 optional float normalized_expired_media = 5;
4186}
4187
Keun young Park3e033cb2019-12-18 11:27:35 -08004188/**
4189 * Represents boot time event with duration in ms.
4190 *
4191 * Logged from: bootstat and various system server components. Check each enums for details.
4192 */
4193message BootTimeEventDuration {
4194 enum DurationEvent {
4195 UNKNOWN = 0;
4196 // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat.
4197 ABSOLUTE_BOOT_TIME = 1;
4198 // Bootloader's 1st stage execution time.
4199 // Logged from bootstat.
4200 BOOTLOADER_FIRST_STAGE_EXEC = 2;
4201 // Bootloader's 1st stage loading time.
4202 // Logged from bootstat.
4203 BOOTLOADER_FIRST_STAGE_LOAD = 3;
4204 // Bootloader's kernel loading time.
4205 // Logged from bootstat.
4206 BOOTLOADER_KERNEL_LOAD = 4;
4207 // Bootloader's 2nd stage execution time.
4208 // Logged from bootstat.
4209 BOOTLOADER_SECOND_STAGE_EXEC = 5;
4210 // Bootloader's 2nd stage loading time.
4211 // Logged from bootstat.
4212 BOOTLOADER_SECOND_STAGE_LOAD = 6;
4213 // Duration for Bootloader to show unlocked device's warning UI. This should not happen
4214 // for locked device.
4215 // Logged from bootstat.
4216 BOOTLOADER_UI_WAIT = 7;
4217 // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above.
4218 // Logged from bootstat.
4219 BOOTLOADER_TOTAL = 8;
4220 // Shutdown duration inside init for the reboot before the current boot up.
4221 // Logged from f/b/services/.../BootReceiver.java.
4222 SHUTDOWN_DURATION = 9;
4223 // Total time for mounting of disk devices during bootup.
4224 // Logged from f/b/services/.../BootReceiver.java.
4225 MOUNT_DEFAULT_DURATION = 10;
4226 // Total time for early stage mounting of disk devices during bootup.
4227 // Logged from f/b/services/.../BootReceiver.java.
4228 MOUNT_EARLY_DURATION = 11;
4229 // Total time for late stage mounting of disk devices during bootup.
4230 // Logged from f/b/services/.../BootReceiver.java.
4231 MOUNT_LATE_DURATION = 12;
4232 // Average time to scan non-system app after OTA
4233 // Logged from f/b/services/.../PackageManagerService.java
4234 OTA_PACKAGE_MANAGER_INIT_TIME = 13;
4235 // Time to initialize Package manager after OTA
4236 // Logged from f/b/services/.../PackageManagerService.java
4237 OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14;
4238 // Time to scan all system app from Package manager after OTA
4239 // Logged from f/b/services/.../PackageManagerService.java
4240 OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15;
4241 // Init's total time for cold boot stage.
4242 // Logged from bootstat.
4243 COLDBOOT_WAIT = 16;
4244 // Init's total time for initializing selinux.
4245 // Logged from bootstat.
4246 SELINUX_INIT = 17;
4247 // Time since last factory reset.
4248 // Logged from bootstat.
4249 FACTORY_RESET_TIME_SINCE_RESET = 18;
Keun young Parka5a696a2020-02-03 09:42:36 -08004250 // Init's total time spent for completing the 1st stage.
4251 // Logged from bootstat.
4252 ANDROID_INIT_STAGE_1 = 19;
Keun young Park3e033cb2019-12-18 11:27:35 -08004253 }
4254
4255 // Type of the event.
4256 optional DurationEvent event = 1;
4257 // Duration of the event in ms.
4258 optional int64 duration_millis = 2;
4259}
4260
4261/**
4262 * Represents the start of specific boot time event during bootup in ms. This is usually a time
4263 * since boot-up.
4264 *
4265 * Logged from: bootstat and various system server components. Check each enums for details.
4266 */
4267message BootTimeEventElapsedTime {
4268 enum ElapsedTimeEvent {
4269 UNKNOWN = 0;
4270 // Time when init starts 1st stage. Logged from bootstat.
4271 ANDROID_INIT_STAGE_1 = 1;
4272 // Time when sys.boot_completed prop is set.
4273 // Logged from bootstat.
4274 BOOT_COMPLETE = 2;
4275 // BOOT_COMPLETE for encrypted device.
4276 BOOT_COMPLETE_ENCRYPTION = 3;
4277 // BOOT_COMPLETE for device with no encryption.
4278 BOOT_COMPLETE_NO_ENCRYPTION = 4;
4279 // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time.
Keun young Parka5a696a2020-02-03 09:42:36 -08004280 BOOT_COMPLETE_POST_DECRYPT = 5;
Keun young Park3e033cb2019-12-18 11:27:35 -08004281 // BOOT_COMPLETE after factory reset.
4282 FACTORY_RESET_BOOT_COMPLETE = 6;
4283 // BOOT_COMPLETE_NO_ENCRYPTION after factory reset.
4284 FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7;
Keun young Parka5a696a2020-02-03 09:42:36 -08004285 // BOOT_COMPLETE_POST_DECRYPT after factory reset.
4286 FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8;
Keun young Park3e033cb2019-12-18 11:27:35 -08004287 // BOOT_COMPLETE after OTA.
4288 OTA_BOOT_COMPLETE = 9;
4289 // BOOT_COMPLETE_NO_ENCRYPTION after OTA.
4290 OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10;
Keun young Parka5a696a2020-02-03 09:42:36 -08004291 // BOOT_COMPLETE_POST_DECRYPT after OTA.
4292 OTA_BOOT_COMPLETE_POST_DECRYPT = 11;
Keun young Park3e033cb2019-12-18 11:27:35 -08004293 // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast.
4294 // Logged from f/b/services/.../UserController.java
4295 FRAMEWORK_LOCKED_BOOT_COMPLETED = 12;
4296 // Time when the system starts sending BOOT_COMPLETED broadcast.
4297 // Logged from f/b/services/.../UserController.java
4298 FRAMEWORK_BOOT_COMPLETED = 13;
4299 // Time when the package manager starts init.
4300 // Logged from f/b/services/.../SystemServer.java
4301 PACKAGE_MANAGER_INIT_START = 14;
4302 // Time when package manager is ready
4303 // Logged from f/b/services/.../SystemServer.java
4304 PACKAGE_MANAGER_INIT_READY = 15;
4305 // Represents the time when user has entered unlock credential for system with user pin.
4306 // Logged from bootstat.
4307 POST_DECRYPT = 16;
4308 // Represents the start of zygote's init.
4309 // Logged from zygote itself.
4310 ZYGOTE_INIT_START = 17;
4311 // Represents the start of secondary zygote's init.
4312 // TODO: add logging to zygote
4313 SECONDARY_ZYGOTE_INIT_START = 18;
4314 // Represents the start of system server's init.
4315 // Logged from f/b/services/.../SystemServer.java
4316 SYSTEM_SERVER_INIT_START = 19;
4317 // Represents the completion of system server's init.
4318 // Logged from f/b/services/.../SystemServer.java
4319 SYSTEM_SERVER_READY = 20;
4320 // Represents the start of launcher during boot-up.
4321 // TODO: add logging
4322 LAUNCHER_START = 21;
4323 // Represents the completion of launcher's initial rendering. User can use other apps from
4324 // launcher from this point.
4325 // TODO: add logging
4326 LAUNCHER_SHOWN = 22;
4327 }
4328
4329 // Type of the event.
4330 optional ElapsedTimeEvent event = 1;
4331 // Time since bootup for the event.
4332 // It should be acquired from SystemClock elapsedRealtime() call or equivalent.
4333 optional int64 time_millis = 2;
4334}
4335
4336/**
4337 * Boot time events with UTC time.
4338 *
4339 * Logged from: bootstat and various system server components. Check each enums for details.
4340 */
4341message BootTimeEventUtcTime {
4342 enum UtcTimeEvent {
4343 UNKNOWN = 0;
4344 // Time of the bootstat's marking of 1st boot after the last factory reset.
4345 // Logged from bootstat.
4346 FACTORY_RESET_RESET_TIME = 1;
4347 // The time when bootstat records FACTORY_RESET_* events. This is close to
4348 // BOOT_COMPLETE time for the current bootup.
4349 // Logged from bootstat.
4350 FACTORY_RESET_CURRENT_TIME = 2;
4351 // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose.
4352 // Logged from bootstat.
4353 FACTORY_RESET_RECORD_VALUE = 3;
4354 }
4355
4356 // Type of the event.
4357 optional UtcTimeEvent event = 1;
4358 // UTC time for the event.
4359 optional int64 utc_time_secs = 2;
4360}
4361
4362/**
4363 * Boot time events representing specific error code during bootup.
4364 * Meaning of error code can be different per each event type.
4365 *
4366 * Logged from: bootstat and various system server components. Check each enums for details.
4367 */
4368message BootTimeEventErrorCode {
4369 enum ErrorCodeEvent {
4370 UNKNOWN = 0;
4371 // Linux error code for time() call to get the current UTC time.
4372 // Logged from bootstat.
4373 FACTORY_RESET_CURRENT_TIME_FAILURE = 1;
4374 // Represents UmountStat before the reboot for the current boot up. Error codes defined
4375 // as UMOUNT_STAT_* from init/reboot.cpp.
4376 // Logged from f/b/services/.../BootReceiver.java.
4377 SHUTDOWN_UMOUNT_STAT = 2;
Keun young Parkdf1534d2020-01-13 18:55:31 -08004378 // Reprepsents fie system mounting error code of /data partition for the current boot.
4379 // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp.
Keun young Park3e033cb2019-12-18 11:27:35 -08004380 // Logged from f/b/services/.../BootReceiver.java.
Keun young Parkdf1534d2020-01-13 18:55:31 -08004381 FS_MGR_FS_STAT_DATA_PARTITION = 3;
Keun young Park3e033cb2019-12-18 11:27:35 -08004382 }
4383
4384 // Type of the event.
4385 optional ErrorCodeEvent event = 1;
4386 // error code defined per each event type.
4387 // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of
4388 // FS_MGR_FS_STAT.
4389 optional int32 error_code = 2;
4390}
4391
Chenjie Yubbcbc602018-02-05 16:51:52 -08004392//////////////////////////////////////////////////////////////////////
4393// Pulled atoms below this line //
4394//////////////////////////////////////////////////////////////////////
4395
4396/**
David Chenc8a43242017-10-17 16:23:28 -07004397 * Pulls bytes transferred via wifi (Sum of foreground and background usage).
4398 *
4399 * Pulled from:
4400 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
4401 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004402message WifiBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07004403 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004404
4405 optional int64 rx_bytes = 2;
4406
4407 optional int64 rx_packets = 3;
4408
4409 optional int64 tx_bytes = 4;
4410
4411 optional int64 tx_packets = 5;
4412}
4413
4414/**
4415 * Pulls bytes transferred via wifi (separated by foreground and background usage).
4416 *
4417 * Pulled from:
4418 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
4419 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004420message WifiBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07004421 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004422
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08004423 // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats.
4424 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07004425
4426 optional int64 rx_bytes = 3;
4427
4428 optional int64 rx_packets = 4;
4429
4430 optional int64 tx_bytes = 5;
4431
4432 optional int64 tx_packets = 6;
4433}
4434
4435/**
4436 * Pulls bytes transferred via mobile networks (Sum of foreground and background usage).
4437 *
4438 * Pulled from:
4439 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
4440 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004441message MobileBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07004442 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004443
4444 optional int64 rx_bytes = 2;
4445
4446 optional int64 rx_packets = 3;
4447
4448 optional int64 tx_bytes = 4;
4449
4450 optional int64 tx_packets = 5;
4451}
4452
4453/**
4454 * Pulls bytes transferred via mobile networks (separated by foreground and background usage).
4455 *
4456 * Pulled from:
4457 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
4458 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004459message MobileBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07004460 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07004461
Yao Chenc40a19d2018-03-15 16:48:25 -07004462 // 1 denotes foreground and 0 denotes background. This is called Set in
4463 // NetworkStats.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08004464 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07004465
4466 optional int64 rx_bytes = 3;
4467
4468 optional int64 rx_packets = 4;
4469
4470 optional int64 tx_bytes = 5;
4471
4472 optional int64 tx_packets = 6;
4473}
4474
4475/**
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004476 * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
4477 *
4478 * Pulled from:
4479 * StatsCompanionService
4480 */
4481message BluetoothBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07004482 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004483
4484 optional int64 rx_bytes = 2;
4485
4486 optional int64 tx_bytes = 3;
4487}
4488
4489/**
David Chenc8a43242017-10-17 16:23:28 -07004490 * Pulls the kernel wakelock durations. This atom is adapted from
4491 * android/internal/os/KernelWakelockStats.java
4492 *
4493 * Pulled from:
4494 * StatsCompanionService using KernelWakelockReader.
4495 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004496message KernelWakelock {
David Chenc8a43242017-10-17 16:23:28 -07004497 optional string name = 1;
4498
4499 optional int32 count = 2;
4500
4501 optional int32 version = 3;
4502
Yangster-maca8a30442018-10-13 23:46:34 -07004503 optional int64 time_micros = 4;
David Chenc8a43242017-10-17 16:23:28 -07004504}
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004505
Chenjie Yu05013b32017-11-21 10:21:41 -08004506/**
Benjamin Schwartz51329b72018-12-06 10:48:03 -08004507 * Pulls low power state information. If power.stats HAL is not available, this
4508 * includes platform and subsystem sleep state information,
4509 * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState
4510 * as defined in:
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004511 * hardware/interfaces/power/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004512 * hardware/interfaces/power/1.1/types.hal
Benjamin Schwartz51329b72018-12-06 10:48:03 -08004513 * If power.stats HAL is available, this includes PowerEntityStateResidencyResult
4514 * as defined in:
4515 * hardware/interfaces/power/stats/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07004516 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004517message SubsystemSleepState {
Chenjie Yubbcbc602018-02-05 16:51:52 -08004518 // Subsystem name
4519 optional string subsystem_name = 1;
4520 // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty.
4521 // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name.
Benjamin Schwartz51329b72018-12-06 10:48:03 -08004522 // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the
4523 // powerEntityStateName from the corresponding PowerEntityStateInfo.
Chenjie Yubbcbc602018-02-05 16:51:52 -08004524 optional string subname = 2;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08004525 // The number of times it entered, or voted for entering the sleep state
Chenjie Yubbcbc602018-02-05 16:51:52 -08004526 optional uint64 count = 3;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08004527 // The length of time spent in, or spent voting for, the sleep state
David Chen0b5c90c2018-01-25 16:51:49 -08004528 optional uint64 time_millis = 4;
David Chen21582962017-11-01 17:32:46 -07004529}
Chenjie Yu7f8def92017-11-03 09:33:15 -07004530
Chenjie Yu05013b32017-11-21 10:21:41 -08004531/**
Bookatz92da2832018-11-01 18:10:03 -07004532 * Pulls on-device power measurement information.
4533 * Data defined by hardware/interfaces/power/stats/1.0/types.hal.
4534 * Pulled from:
4535 * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp
4536 */
4537message OnDevicePowerMeasurement {
4538 // Name of the subsystem (to which the rail belongs).
4539 optional string subsystem_name = 1;
4540
4541 // Rail name. The rail lies within the subsystem.
4542 optional string rail_name = 2;
4543
4544 // Time (in ms since boot) at which the rail energy value was measured.
4545 // This may differ slightly from the time that statsd logs this information.
4546 optional uint64 measurement_timestamp_millis = 3;
4547
4548 // Accumulated energy used via the rail since device boot in uWs.
4549 optional uint64 energy_microwatt_secs = 4;
4550}
4551
4552/**
Chenjie Yu7f8def92017-11-03 09:33:15 -07004553 * Pulls Cpu time per frequency.
Chenjie Yu1ee9b742018-01-10 16:02:57 -08004554 * Pulls the time the cpu spend on the frequency index. Frequency index
4555 * starts from highest to lowest. The value should be monotonically
4556 * increasing since boot. However, if there is a cpu
4557 * hotplug event, the value would be reset as well.
Chenjie Yu7f8def92017-11-03 09:33:15 -07004558 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004559message CpuTimePerFreq {
Chenjie Yu7f8def92017-11-03 09:33:15 -07004560 optional uint32 cluster = 1;
4561 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08004562 optional uint64 time_millis = 3;
Chenjie Yu7f8def92017-11-03 09:33:15 -07004563}
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004564
Chenjie Yu05013b32017-11-21 10:21:41 -08004565/**
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004566 * Pulls Cpu Time Per Uid.
4567 * Note that isolated process uid time should be attributed to host uids.
4568 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004569message CpuTimePerUid {
Yao Chenc40a19d2018-03-15 16:48:25 -07004570 optional int32 uid = 1 [(is_uid) = true];
Misha Wagner6bc6c912018-11-16 13:19:54 +00004571 optional uint64 user_time_micros = 2;
4572 optional uint64 sys_time_micros = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004573}
4574
4575/**
4576 * Pulls Cpu Time Per Uid per frequency.
4577 * Note that isolated process uid time should be attributed to host uids.
4578 * For each uid, we order the time by descending frequencies.
4579 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004580message CpuTimePerUidFreq {
Yao Chenc40a19d2018-03-15 16:48:25 -07004581 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004582 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08004583 optional uint64 time_millis = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08004584}
Hugo Benichi884970e2017-11-14 22:42:46 +09004585
Chenjie Yu05013b32017-11-21 10:21:41 -08004586/**
4587 * Pulls Wifi Controller Activity Energy Info
4588 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08004589message WifiActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08004590 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08004591 optional uint64 timestamp_millis = 1;
Chenjie Yu05013b32017-11-21 10:21:41 -08004592 // stack reported state
4593 // TODO: replace this with proto enum
4594 optional int32 stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07004595 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004596 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07004597 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004598 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07004599 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004600 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08004601 // product of current(mA), voltage(V) and time(ms)
4602 optional uint64 controller_energy_used = 6;
4603}
4604
4605/**
4606 * Pulls Modem Activity Energy Info
4607 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08004608message ModemActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08004609 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08004610 optional uint64 timestamp_millis = 1;
Yangster-maca8a30442018-10-13 23:46:34 -07004611 // sleep time in millis.
David Chen0b5c90c2018-01-25 16:51:49 -08004612 optional uint64 sleep_time_millis = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07004613 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004614 optional uint64 controller_idle_time_millis = 3;
Chenjie Yu05013b32017-11-21 10:21:41 -08004615 /**
4616 * Tx power index
4617 * index 0 = tx_power < 0dBm
4618 * index 1 = 0dBm < tx_power < 5dBm
4619 * index 2 = 5dBm < tx_power < 15dBm
4620 * index 3 = 15dBm < tx_power < 20dBm
4621 * index 4 = tx_power > 20dBm
4622 */
4623 // tx time in ms at power level 0
David Chen0b5c90c2018-01-25 16:51:49 -08004624 optional uint64 controller_tx_time_pl0_millis = 4;
Chenjie Yu05013b32017-11-21 10:21:41 -08004625 // tx time in ms at power level 1
David Chen0b5c90c2018-01-25 16:51:49 -08004626 optional uint64 controller_tx_time_pl1_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08004627 // tx time in ms at power level 2
David Chen0b5c90c2018-01-25 16:51:49 -08004628 optional uint64 controller_tx_time_pl2_millis = 6;
Chenjie Yu05013b32017-11-21 10:21:41 -08004629 // tx time in ms at power level 3
David Chen0b5c90c2018-01-25 16:51:49 -08004630 optional uint64 controller_tx_time_pl3_millis = 7;
Chenjie Yu05013b32017-11-21 10:21:41 -08004631 // tx time in ms at power level 4
David Chen0b5c90c2018-01-25 16:51:49 -08004632 optional uint64 controller_tx_time_pl4_millis = 8;
Chenjie Yu05013b32017-11-21 10:21:41 -08004633 // rx time in ms at power level 5
David Chen0b5c90c2018-01-25 16:51:49 -08004634 optional uint64 controller_rx_time_millis = 9;
Chenjie Yu05013b32017-11-21 10:21:41 -08004635 // product of current(mA), voltage(V) and time(ms)
Chen Xu7322e4a2019-09-07 15:51:22 -07004636 optional uint64 energy_used = 10 [deprecated=true];
Joe Onorato62c220b2017-11-18 20:32:56 -08004637}
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08004638
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004639/**
4640 * Pulls Bluetooth Activity Energy Info
4641 * Note: BluetoothBytesTransfer is pulled at the same time from the controller.
4642 */
4643message BluetoothActivityInfo {
4644 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08004645 optional uint64 timestamp_millis = 1;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004646 // bluetooth stack state
4647 optional int32 bluetooth_stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07004648 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004649 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07004650 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004651 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07004652 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08004653 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004654 // product of current(mA), voltage(V) and time(ms)
4655 optional uint64 energy_used = 6;
4656}
4657
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08004658/*
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004659 * Logs the memory stats for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00004660 *
4661 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService).
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004662 */
4663message ProcessMemoryState {
4664 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07004665 optional int32 uid = 1 [(is_uid) = true];
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004666
4667 // The process name.
Rafal Slawikda51b932018-12-13 16:31:33 +00004668 // Usually package name, "system" for system server.
4669 // Provided by ActivityManagerService.
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004670 optional string process_name = 2;
4671
Rafal Slawikda51b932018-12-13 16:31:33 +00004672 // Current OOM score adjustment. Value read from ProcessRecord.
Yangster-maca8a30442018-10-13 23:46:34 -07004673 optional int32 oom_adj_score = 3;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004674
4675 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07004676 optional int64 page_fault = 4;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004677
4678 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07004679 optional int64 page_major_fault = 5;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004680
Rajeev Kumar90235992018-01-29 11:06:48 -08004681 // RSS
Rafal Slawik203c3db2019-09-25 19:53:01 +01004682 // Value is read from memory.stat, field total_rss if per-app memory
4683 // cgroups are enabled. Otherwise, value from /proc/pid/stat.
Rajeev Kumar90235992018-01-29 11:06:48 -08004684 optional int64 rss_in_bytes = 6;
4685
4686 // CACHE
Rafal Slawikda51b932018-12-13 16:31:33 +00004687 // Value is read from memory.stat, field total_cache if per-app memory
4688 // cgroups are enabled. Otherwise, 0.
Rajeev Kumar90235992018-01-29 11:06:48 -08004689 optional int64 cache_in_bytes = 7;
4690
4691 // SWAP
Rafal Slawikda51b932018-12-13 16:31:33 +00004692 // Value is read from memory.stat, field total_swap if per-app memory
Rafal Slawik203c3db2019-09-25 19:53:01 +01004693 // cgroups are enabled. Otherwise, 0.
Rajeev Kumar90235992018-01-29 11:06:48 -08004694 optional int64 swap_in_bytes = 8;
Rafal Slawikaaf60892018-09-12 13:04:30 +01004695
Rafal Slawik203c3db2019-09-25 19:53:01 +01004696 // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004697 optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true];
Rafal Slawik272a8162018-11-01 15:12:28 +00004698
Rafal Slawik203c3db2019-09-25 19:53:01 +01004699 // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
4700 optional int64 start_time_nanos = 10 [deprecated = true];
Ioannis Ilkos466ad6c2019-06-18 17:42:00 +01004701
Rafal Slawik203c3db2019-09-25 19:53:01 +01004702 // Deprecated: use ProcessMemorySnapshot atom instead. Always -1.
4703 optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true];
Rafal Slawik08621582018-10-15 14:53:07 +01004704}
4705
4706/*
Rafal Slawik3bea8952018-11-15 12:39:33 +00004707 * Logs the memory high-water mark for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00004708 *
4709 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie)
4710 * and for selected native processes.
Rafal Slawik44b88142018-12-15 16:48:09 +00004711 *
4712 * Pulling this atom resets high-water mark counters for all processes.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004713 */
4714message ProcessMemoryHighWaterMark {
4715 // The uid if available. -1 means not available.
4716 optional int32 uid = 1 [(is_uid) = true];
4717
Rafal Slawikda51b932018-12-13 16:31:33 +00004718 // The process name.
4719 // Usually package name or process cmdline.
4720 // Provided by ActivityManagerService or read from /proc/PID/cmdline.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004721 optional string process_name = 2;
4722
Rafal Slawik239b6802019-09-09 18:46:01 +01004723 // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is
4724 // computed by converting kilobytes to bytes.
4725 optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true];
4726
Rafal Slawik3bea8952018-11-15 12:39:33 +00004727 // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
4728 // /proc/PID/status.
Rafal Slawik239b6802019-09-09 18:46:01 +01004729 optional int32 rss_high_water_mark_in_kilobytes = 4;
Rafal Slawik3bea8952018-11-15 12:39:33 +00004730}
4731
4732/*
Rafal Slawik7efcefb2019-09-20 11:16:20 +01004733 * Logs the memory stats for a process.
4734 *
4735 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService)
4736 * and for selected native processes.
4737 */
4738message ProcessMemorySnapshot {
4739 // The uid if available. -1 means not available.
4740 optional int32 uid = 1 [(is_uid) = true];
4741
4742 // The process name.
4743 // Usually package name or process cmdline.
4744 // Provided by ActivityManagerService or read from /proc/PID/cmdline.
4745 optional string process_name = 2;
4746
4747 // The pid of the process.
4748 // Allows to disambiguate instances of the process.
4749 optional int32 pid = 3;
4750
4751 // The current OOM score adjustment value.
4752 // Read from ProcessRecord for managed processes.
4753 // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones.
4754 optional int32 oom_score_adj = 4;
4755
4756 // The current RSS of the process.
4757 // VmRSS from /proc/pid/status.
4758 optional int32 rss_in_kilobytes = 5;
4759
4760 // The current anon RSS of the process.
4761 // RssAnon from /proc/pid/status.
4762 optional int32 anon_rss_in_kilobytes = 6;
4763
4764 // The current swap size of the process.
4765 // VmSwap from /proc/pid/status.
4766 optional int32 swap_in_kilobytes = 7;
4767
4768 // The sum of rss_in_kilobytes and swap_in_kilobytes.
4769 optional int32 anon_rss_and_swap_in_kilobytes = 8;
4770}
4771
4772/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004773 * Elapsed real time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08004774 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004775message SystemElapsedRealtime {
David Chen0b5c90c2018-01-25 16:51:49 -08004776 optional uint64 time_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004777}
4778
4779/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004780 * Up time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08004781 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004782message SystemUptime {
4783 // Milliseconds since the system was booted.
4784 // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
4785 // for external input).
4786 // It is not affected by clock scaling, idle, or other power saving mechanisms.
David Chen0b5c90c2018-01-25 16:51:49 -08004787 optional uint64 uptime_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004788}
4789
4790/*
4791 * Reads from /proc/uid_concurrent_active_time which has the format:
4792 * active: X (X is # cores)
4793 * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores)
4794 * [uid1]: [time-0] [time-1] [time-2] ... ...
4795 * ...
4796 * Time-N means the CPU time a UID spent running concurrently with N other processes.
4797 * The file contains a monotonically increasing count of time for a single boot.
4798 */
4799message CpuActiveTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07004800 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004801 optional uint64 time_millis = 2;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004802}
4803
4804/**
4805 * Reads from /proc/uid_concurrent_policy_time which has the format:
4806 * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4)
4807 * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
4808 * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
4809 * ...
4810 * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes.
4811 * The file contains a monotonically increasing count of time for a single boot.
4812 */
4813message CpuClusterTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07004814 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004815 optional int32 cluster_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08004816 optional uint64 time_millis = 3;
Chenjie Yu937d7422018-01-10 16:37:53 -08004817}
4818
4819/*
4820 * Pulls free disk space, for data, system partition and temporary directory.
4821 */
4822message DiskSpace {
4823 // available bytes in data partition
4824 optional uint64 data_available_bytes = 1;
4825 // available bytes in system partition
4826 optional uint64 system_available_bytes = 2;
4827 // available bytes in download cache or temp directories
4828 optional uint64 temp_available_bytes = 3;
4829}
Tej Singhbf972d92018-01-10 20:51:13 -08004830
4831/**
4832 * Pulls battery coulomb counter, which is the remaining battery charge in uAh.
Tej Singh9876a3b2019-01-11 14:28:35 -08004833 *
4834 * Pulled from StatsCompanionService.java
Tej Singhbf972d92018-01-10 20:51:13 -08004835 */
4836message RemainingBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07004837 optional int32 charge_micro_ampere_hour = 1;
Tej Singhbf972d92018-01-10 20:51:13 -08004838}
4839
4840/**
4841 * Pulls battery capacity, which is the battery capacity when full in uAh.
Tej Singh40298312018-02-16 00:15:09 -08004842 * Pulled from:
4843 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
Tej Singhbf972d92018-01-10 20:51:13 -08004844 */
4845message FullBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07004846 optional int32 capacity_micro_ampere_hour = 1;
Tej Singh40298312018-02-16 00:15:09 -08004847}
4848
4849/**
Bookatz17f0d8a2018-09-13 12:56:32 -07004850 * Pulls battery voltage.
4851 * Pulled from:
4852 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
4853 */
4854message BatteryVoltage {
4855 // The voltage of the battery, in millivolts.
Yangster-maca8a30442018-10-13 23:46:34 -07004856 optional int32 voltage_millivolt = 1;
Bookatz17f0d8a2018-09-13 12:56:32 -07004857}
4858
4859/**
Tej Singhb1dbc8b2018-11-19 15:49:47 -08004860 * Pulls battery level (percent full, from 0 to 100).
4861 *
4862 * Pulled from:
4863 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
4864 */
4865message BatteryLevel {
4866 // Battery level. Should be in [0, 100].
4867 optional int32 battery_level = 1;
4868}
4869
4870/**
Tej Singhd89137e2018-03-26 14:51:40 -07004871 * Pulls the temperature of various parts of the device.
4872 * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303.
Tej Singh40298312018-02-16 00:15:09 -08004873 *
Maggie White442b6312019-04-05 16:26:44 -07004874 * Pulled from StatsCompanionService.java
Tej Singh40298312018-02-16 00:15:09 -08004875 */
4876message Temperature {
Tej Singhb6070b92018-12-19 19:00:12 -08004877 // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_.
Tej Singh40298312018-02-16 00:15:09 -08004878 optional android.os.TemperatureTypeEnum sensor_location = 1;
4879
4880 // The name of the temperature source. Eg. CPU0
4881 optional string sensor_name = 2;
4882
Tej Singhd89137e2018-03-26 14:51:40 -07004883 // Temperature in tenths of a degree C.
Tej Singhb6070b92018-12-19 19:00:12 -08004884 // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
Yangster-maca8a30442018-10-13 23:46:34 -07004885 optional int32 temperature_deci_celsius = 3;
Maggie White442b6312019-04-05 16:26:44 -07004886
4887 // Relative severity of the throttling, see enum definition.
4888 optional android.os.ThrottlingSeverityEnum severity = 4;
yroa1fe77c2018-02-26 14:22:54 -08004889}
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004890
4891/**
4892 * Pulls the statistics of calls to Binder.
4893 *
Olivier Gaillardd25f7a82018-09-12 14:28:48 +01004894 * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one
4895 * config on the device.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004896 *
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004897 * Next tag: 15
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004898 */
4899message BinderCalls {
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004900 // UID of the process responsible for the binder transaction. It will be set if the process
4901 // executing the binder transaction attribute the transaction to another uid using
4902 // Binder.setThreadWorkSource().
4903 //
4904 // If not set, the value will be -1.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004905 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004906 // UID of the process executing the binder transaction.
4907 optional int32 direct_caller_uid = 14;
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004908 // Fully qualified class name of the API call.
4909 //
4910 // This is a system server class name.
4911 //
4912 // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid
4913 // gets recycled and we have isolated uids, we might attribute the data incorrectly.
4914 // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less
4915 // commonly used APIs.
4916 optional string service_class_name = 2;
4917 // Method name of the API call. It can also be a transaction code if we cannot
4918 // resolve it to a name. See Binder#getTransactionName.
4919 //
4920 // This is a system server method name.
4921 optional string service_method_name = 3;
4922 // Total number of API calls.
4923 optional int64 call_count = 4;
4924 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
4925 optional bool screen_interactive = 13;
4926 // Total number of API calls we have data recorded for. If we collected data for all the calls,
4927 // call_count will be equal to recorded_call_count.
4928 //
4929 // If recorded_call_count is different than call_count, it means data collection has been
4930 // sampled. All the fields below will be sampled in this case.
4931 optional int64 recorded_call_count = 12;
4932 // Number of exceptions thrown by the API.
4933 optional int64 recorded_exception_count = 5;
4934 // Total latency of all API calls.
4935 // Average can be computed using total_latency_micros / recorded_call_count.
4936 optional int64 recorded_total_latency_micros = 6;
4937 // Maximum latency of one API call.
4938 optional int64 recorded_max_latency_micros = 7;
4939 // Total CPU usage of all API calls.
4940 // Average can be computed using total_cpu_micros / recorded_call_count.
4941 // Total can be computed using total_cpu_micros / recorded_call_count * call_count.
4942 optional int64 recorded_total_cpu_micros = 8;
4943 // Maximum CPU usage of one API call.
4944 optional int64 recorded_max_cpu_micros = 9;
4945 // Maximum parcel reply size of one API call.
4946 optional int64 recorded_max_reply_size_bytes = 10;
4947 // Maximum parcel request size of one API call.
4948 optional int64 recorded_max_request_size_bytes = 11;
4949}
4950
4951/**
4952 * Pulls the statistics of exceptions during calls to Binder.
4953 *
4954 * Binder stats are cumulative from boot unless somebody reset the data using
4955 * > adb shell dumpsys binder_calls_stats --reset
4956 */
4957message BinderCallsExceptions {
4958 // Exception class name, e.g. java.lang.IllegalArgumentException.
4959 //
4960 // This is an exception class name thrown by the system server.
4961 optional string exception_class_name = 1;
4962 // Total number of exceptions.
4963 optional int64 exception_count = 2;
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004964}
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004965
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004966/**
4967 * Pulls the statistics of message dispatching on HandlerThreads.
4968 *
4969 * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one
4970 * config on the device.
4971 *
4972 * Next tag: 11
4973 */
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004974message LooperStats {
Marcin Oczeretkoec758722018-09-12 12:53:47 +01004975 // The uid that made a call to the System Server and caused the message to be enqueued.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004976 optional int32 uid = 1 [(is_uid) = true];
4977
4978 // Fully qualified class name of the handler target class.
4979 //
4980 // This field does not contain PII. This is a system server class name.
4981 optional string handler_class_name = 2;
4982
4983 // The name of the thread that runs the Looper.
4984 //
4985 // This field does not contain PII. This is a system server thread name.
4986 optional string looper_thread_name = 3;
4987
4988 // The name of the dispatched message.
4989 //
4990 // This field does not contain PII. This is a system server constant or class
4991 // name.
4992 optional string message_name = 4;
4993
4994 // Total number of successfully dispatched messages.
4995 optional int64 message_count = 5;
4996
4997 // Total number of messages that failed dispatching.
4998 optional int64 exception_count = 6;
4999
5000 // Total number of processed messages we have data recorded for. If we
5001 // collected data for all the messages, message_count will be equal to
5002 // recorded_message_count.
5003 //
5004 // If recorded_message_count is different than message_count, it means data
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01005005 // collection has been sampled. The fields below will be sampled in this case.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01005006 optional int64 recorded_message_count = 7;
5007
5008 // Total latency of all processed messages.
5009 // Average can be computed using recorded_total_latency_micros /
5010 // recorded_message_count.
5011 optional int64 recorded_total_latency_micros = 8;
5012
5013 // Total CPU usage of all processed message.
5014 // Average can be computed using recorded_total_cpu_micros /
5015 // recorded_message_count. Total can be computed using
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01005016 // recorded_total_cpu_micros / recorded_message_count * message_count.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01005017 optional int64 recorded_total_cpu_micros = 9;
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01005018
5019 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
5020 optional bool screen_interactive = 10;
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01005021
5022 // Max recorded CPU usage of all processed messages.
5023 optional int64 recorded_max_cpu_micros = 11;
5024
5025 // Max recorded latency of all processed messages.
5026 optional int64 recorded_max_latency_micros = 12;
5027
5028 // Total number of messages we tracked the dispatching delay for. If we
5029 // collected data for all the messages, message_count will be equal to
5030 // recorded_delay_message_count.
5031 //
5032 // If recorded_delay_message_count is different than message_count, it means data
5033 // collection has been sampled or/and not all messages specified the target dispatch time.
5034 // The fields below will be sampled in this case.
5035 optional int64 recorded_delay_message_count = 13;
5036
5037 // Total dispatching delay of all processed messages.
5038 // Calculated as a difference between the target dispatching time (Message.when)
5039 // and the actual dispatching time.
5040 // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count.
5041 optional int64 recorded_total_delay_millis = 14;
5042
5043 // Max dispatching delay of all processed messages.
5044 // Calculated as a difference between the target dispatching time (Message.when)
5045 // and the actual dispatching time.
5046 optional int64 recorded_max_delay_millis = 15;
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01005047}
Tej Singh86dc9db2018-09-06 00:39:57 +00005048
5049/**
5050 * Pulls disk information, such as write speed and latency.
5051 */
5052message DiskStats {
5053 // Time taken to open, write 512B to, and close a file.
5054 // -1 if error performing the check.
5055 optional int64 data_write_latency_millis = 1;
5056
5057 optional bool file_based_encryption = 2;
5058
5059 // Recent disk write speed in kB/s.
5060 // -1 if error querying storageed.
5061 // 0 if data is unavailable.
5062 optional int32 recent_disk_write_speed = 3;
5063}
5064
5065
5066/**
5067 * Free and total bytes of the Data, Cache, and System partition.
5068 */
5069message DirectoryUsage {
5070 enum Directory {
5071 UNKNOWN = 0;
5072 DATA = 1;
5073 CACHE = 2;
5074 SYSTEM = 3;
5075 }
5076 optional Directory directory = 1;
5077 optional int64 free_bytes = 2;
5078 optional int64 total_bytes = 3;
5079}
5080
5081
5082/**
5083 * Size of an application: apk size, data size, and cache size.
5084 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
5085 * Information is only reported for apps with the primary user (user 0).
5086 * Sizes are aggregated by package name.
5087 */
5088message AppSize {
5089 // Including uids will involve modifying diskstats logic.
5090 optional string package_name = 1;
5091 // App size in bytes. -1 if unavailable.
5092 optional int64 app_size_bytes = 2;
5093 // App data size in bytes. -1 if unavailable.
5094 optional int64 app_data_size_bytes = 3;
5095 // App cache size in bytes. -1 if unavailable.
5096 optional int64 app_cache_size_bytes = 4;
5097 // Time that the cache file was produced.
5098 // Uses System.currentTimeMillis(), which is wall clock time.
5099 optional int64 cache_time_millis = 5;
5100}
5101
5102
5103/**
5104 * Size of a particular category. Eg: photos, videos.
5105 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
5106 */
5107message CategorySize {
5108 enum Category {
5109 UNKNOWN = 0;
5110 APP_SIZE = 1;
5111 APP_DATA_SIZE = 2;
5112 APP_CACHE_SIZE = 3;
5113 PHOTOS = 4;
5114 VIDEOS = 5;
5115 AUDIO = 6;
5116 DOWNLOADS = 7;
5117 SYSTEM = 8;
5118 OTHER = 9;
5119 }
5120 optional Category category = 1;
5121 // Category size in bytes.
5122 optional int64 size_bytes = 2;
5123 // Time that the cache file was produced.
5124 // Uses System.currentTimeMillis(), which is wall clock time.
5125 optional int64 cache_time_millis = 3;
5126}
Tej Singhd6d6d772018-09-05 17:41:25 -07005127
5128/**
Tej Singhe7726dc2018-09-21 11:42:12 -07005129 * Pulls per uid I/O stats. The stats are cumulative since boot.
5130 *
5131 * Read/write bytes are I/O events from a storage device
5132 * Read/write chars are data requested by read/write syscalls, and can be
5133 * satisfied by caching.
5134 *
5135 * Pulled from StatsCompanionService, which reads proc/uid_io/stats.
5136 */
5137message DiskIo {
5138 optional int32 uid = 1 [(is_uid) = true];
5139 optional int64 fg_chars_read = 2;
5140 optional int64 fg_chars_write = 3;
5141 optional int64 fg_bytes_read = 4;
5142 optional int64 fg_bytes_write = 5;
5143 optional int64 bg_chars_read = 6;
5144 optional int64 bg_chars_write = 7;
5145 optional int64 bg_bytes_read = 8;
5146 optional int64 bg_bytes_write = 9;
5147 optional int64 fg_fsync = 10;
5148 optional int64 bg_fsync= 11;
5149}
5150
5151
5152/**
Tej Singhd6d6d772018-09-05 17:41:25 -07005153 * Pulls the number of fingerprints for each user.
5154 *
Kevin Chyn1741a072019-01-17 11:54:40 -08005155 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
Tej Singhd6d6d772018-09-05 17:41:25 -07005156 */
joshmccloskey5dcb4082019-02-26 15:28:37 -08005157message NumFingerprintsEnrolled {
Tej Singhd6d6d772018-09-05 17:41:25 -07005158 // The associated user. Eg: 0 for owners, 10+ for others.
5159 // Defined in android/os/UserHandle.java
5160 optional int32 user = 1;
5161 // Number of fingerprints registered to that user.
joshmccloskey5dcb4082019-02-26 15:28:37 -08005162 optional int32 num_fingerprints_enrolled = 2;
Tej Singhd6d6d772018-09-05 17:41:25 -07005163}
Chenjie Yu12e5e672018-09-14 15:54:59 -07005164
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08005165/**
joshmccloskey5dcb4082019-02-26 15:28:37 -08005166 * Pulls the number of faces for each user.
5167 *
5168 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
5169 */
5170message NumFacesEnrolled {
5171 // The associated user. Eg: 0 for owners, 10+ for others.
5172 // Defined in android/os/UserHandle.java
5173 optional int32 user = 1;
5174 // Number of faces registered to that user.
5175 optional int32 num_faces_enrolled = 2;
5176}
5177/**
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08005178 * A mapping of role holder -> role
5179 */
5180message RoleHolder {
5181 // uid of the role holder
5182 optional int32 uid = 1 [(is_uid) = true];
5183
5184 // package name of the role holder
5185 optional string package_name = 2;
5186
5187 // the role held
5188 optional string role = 3;
5189}
5190
Yangsteraf9aee72018-10-12 09:26:16 -07005191message AggStats {
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005192 // These are all in byte resolution.
5193 optional int64 min = 1 [deprecated = true];
5194 optional int64 average = 2 [deprecated = true];
5195 optional int64 max = 3 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005196
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005197 // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above
5198 // int64 fields.
5199 optional int32 mean_kb = 4;
5200 optional int32 max_kb = 5;
Yangsteraf9aee72018-10-12 09:26:16 -07005201}
5202
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005203// A reduced subset of process states; reducing the number of possible states allows more
5204// aggressive device-side aggregation of statistics and hence reduces metric upload size.
5205enum ProcessStateAggregated {
5206 PROCESS_STATE_UNKNOWN = 0;
5207 // Persistent system process.
5208 PROCESS_STATE_PERSISTENT = 1;
5209 // Top activity; actually any visible activity.
5210 PROCESS_STATE_TOP = 2;
5211 // Process binding to top or a foreground service.
5212 PROCESS_STATE_BOUND_TOP_OR_FGS = 3;
5213 // Processing running a foreground service.
5214 PROCESS_STATE_FGS = 4;
5215 // Important foreground process (ime, wallpaper, etc).
5216 PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
5217 // Important background process.
5218 PROCESS_STATE_BACKGROUND = 6;
5219 // Process running a receiver.
5220 PROCESS_STATE_RECEIVER = 7;
5221 // All kinds of cached processes.
5222 PROCESS_STATE_CACHED = 8;
5223}
5224
5225// Next tag: 13
Yangsteraf9aee72018-10-12 09:26:16 -07005226message ProcessStatsStateProto {
5227 optional android.service.procstats.ScreenState screen_state = 1;
5228
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005229 optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005230
5231 // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
5232 // and not frameworks/base/core/java/android/app/ActivityManager.java
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005233 optional android.service.procstats.ProcessState process_state = 3 [deprecated = true];
5234
5235 optional ProcessStateAggregated process_state_aggregated = 10;
Yangsteraf9aee72018-10-12 09:26:16 -07005236
5237 // Millisecond uptime duration spent in this state
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005238 optional int64 duration_millis = 4 [deprecated = true];
5239 // Same as above, but with minute resolution so it fits into an int32.
5240 optional int32 duration_minutes = 11;
Yangsteraf9aee72018-10-12 09:26:16 -07005241
5242 // Millisecond elapsed realtime duration spent in this state
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005243 optional int64 realtime_duration_millis = 9 [deprecated = true];
5244 // Same as above, but with minute resolution so it fits into an int32.
5245 optional int32 realtime_duration_minutes = 12;
Yangsteraf9aee72018-10-12 09:26:16 -07005246
5247 // # of samples taken
5248 optional int32 sample_size = 5;
5249
5250 // PSS is memory reserved for this process
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005251 optional AggStats pss = 6 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005252
5253 // USS is memory shared between processes, divided evenly for accounting
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005254 optional AggStats uss = 7 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005255
5256 // RSS is memory resident for this process
5257 optional AggStats rss = 8;
5258}
5259
5260// Next Tag: 7
5261message ProcessStatsProto {
5262 // Name of process.
5263 optional string process = 1;
5264
5265 // Uid of the process.
5266 optional int32 uid = 2;
5267
5268 // Information about how often kills occurred
5269 message Kill {
5270 // Count of excessive CPU kills
5271 optional int32 cpu = 1;
5272
5273 // Count of kills when cached
5274 optional int32 cached = 2;
5275
5276 // PSS stats during cached kill
5277 optional AggStats cached_pss = 3;
5278 }
Richard Gaywooda8fe1b42019-12-05 11:31:02 +00005279 optional Kill kill = 3 [deprecated = true];
Yangsteraf9aee72018-10-12 09:26:16 -07005280
5281 // Time and memory spent in various states.
5282 repeated ProcessStatsStateProto states = 5;
5283
5284 // Total time process has been running... screen_state, memory_state, and process_state
5285 // will not be set.
5286 optional ProcessStatsStateProto total_running_state = 6;
5287}
5288
5289message PackageServiceOperationStatsProto {
5290 // Operate enum: Started, Foreground, Bound, Executing
5291 optional android.service.procstats.ServiceOperationState operation = 1;
5292
5293 // Number of times the service was in this operation.
5294 optional int32 count = 2;
5295
5296 // Information about a state the service can be in.
5297 message StateStats {
5298 // Screen state enum.
5299 optional android.service.procstats.ScreenState screen_state = 1;
5300 // Memory state enum.
5301 optional android.service.procstats.MemoryState memory_state = 2;
5302
5303 // duration in milliseconds.
Yangster-maca8a30442018-10-13 23:46:34 -07005304 optional int64 duration_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07005305 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07005306 optional int64 realtime_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07005307 }
5308 repeated StateStats state_stats = 3;
5309}
5310
5311message PackageServiceStatsProto {
5312 // Name of service component.
5313 optional string service_name = 1;
5314
5315 // The operation stats.
5316 // The package_name, package_uid, package_version, service_name will not be set to save space.
5317 repeated PackageServiceOperationStatsProto operation_stats = 2;
5318}
5319
5320message PackageAssociationSourceProcessStatsProto {
5321 // Uid of the process.
5322 optional int32 process_uid = 1;
5323 // Process name.
5324 optional string process_name = 2;
Chenjie Yub2ecc792019-01-17 10:27:26 -08005325 // Package name.
5326 optional string package_name = 7;
Yangsteraf9aee72018-10-12 09:26:16 -07005327 // Total count of the times this association appeared.
5328 optional int32 total_count = 3;
5329
5330 // Millisecond uptime total duration this association was around.
Yangster-maca8a30442018-10-13 23:46:34 -07005331 optional int64 total_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07005332
5333 // Total count of the times this association became actively impacting its target process.
5334 optional int32 active_count = 5;
5335
5336 // Information on one source in this association.
5337 message StateStats {
5338 // Process state enum.
5339 optional android.service.procstats.ProcessState process_state = 1;
5340 // Millisecond uptime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07005341 optional int64 duration_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07005342 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07005343 optional int64 realtime_duration_mmillis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07005344 }
5345 repeated StateStats active_state_stats = 6;
5346}
5347
5348message PackageAssociationProcessStatsProto {
5349 // Name of the target component.
5350 optional string component_name = 1;
5351 // Information on one source in this association.
5352 repeated PackageAssociationSourceProcessStatsProto sources = 2;
5353}
5354
5355
5356message ProcessStatsPackageProto {
5357 // Name of package.
5358 optional string package = 1;
5359
5360 // Uid of the package.
5361 optional int32 uid = 2;
5362
5363 // Version of the package.
5364 optional int64 version = 3;
5365
5366 // Stats for each process running with the package loaded in to it.
5367 repeated ProcessStatsProto process_stats = 4;
5368
5369 // Stats for each of the package's services.
5370 repeated PackageServiceStatsProto service_stats = 5;
5371
5372 // Stats for each association with the package.
5373 repeated PackageAssociationProcessStatsProto association_stats = 6;
5374}
5375
5376message ProcessStatsSectionProto {
5377 // Elapsed realtime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005378 optional int64 start_realtime_millis = 1;
Yangsteraf9aee72018-10-12 09:26:16 -07005379
5380 // Elapsed realtime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005381 optional int64 end_realtime_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07005382
5383 // CPU uptime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005384 optional int64 start_uptime_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07005385
5386 // CPU uptime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07005387 optional int64 end_uptime_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07005388
5389 // System runtime library. e.g. "libdvm.so", "libart.so".
5390 optional string runtime = 5;
5391
5392 // whether kernel reports swapped pss.
5393 optional bool has_swapped_pss = 6;
5394
5395 // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops".
5396 enum Status {
5397 STATUS_UNKNOWN = 0;
5398 STATUS_COMPLETE = 1;
5399 STATUS_PARTIAL = 2;
5400 STATUS_SHUTDOWN = 3;
5401 STATUS_SYSPROPS = 4;
5402 }
5403 repeated Status status = 7;
5404
Chenjie Yub2ecc792019-01-17 10:27:26 -08005405 // Number of pages available of various types and sizes, representation fragmentation.
5406 repeated ProcessStatsAvailablePagesProto available_pages = 10;
5407
Yangsteraf9aee72018-10-12 09:26:16 -07005408 // Stats for each process.
5409 repeated ProcessStatsProto process_stats = 8;
5410
5411 // Stats for each package.
5412 repeated ProcessStatsPackageProto package_stats = 9;
5413}
5414
Chenjie Yub2ecc792019-01-17 10:27:26 -08005415message ProcessStatsAvailablePagesProto {
5416 // Node these pages are in (as per /proc/pagetypeinfo)
5417 optional int32 node = 1;
5418
5419 // Zone these pages are in (as per /proc/pagetypeinfo)
5420 optional string zone = 2;
5421
5422 // Label for the type of these pages (as per /proc/pagetypeinfo)
5423 optional string label = 3;
5424
5425 // Distribution of number of pages available by order size. First entry in array is
5426 // order 0, second is order 1, etc. Each order increase is a doubling of page size.
5427 repeated int32 pages_per_order = 4;
5428}
5429
Chenjie Yu12e5e672018-09-14 15:54:59 -07005430/**
5431 * Pulled from ProcessStatsService.java
5432 */
5433message ProcStats {
Yangsteraf9aee72018-10-12 09:26:16 -07005434 optional ProcessStatsSectionProto proc_stats_section = 1;
5435}
5436
Chenjie Yuf910b7802019-01-11 16:08:20 -08005437/**
5438 * Pulled from ProcessStatsService.java
5439 */
5440message ProcStatsPkgProc {
5441 optional ProcessStatsSectionProto proc_stats_section = 1;
5442}
5443
Chris Wrencdea3b72019-11-22 16:58:17 -05005444// Next Tag: 2
5445message PackageRemoteViewInfoProto {
5446 optional string package_name = 1;
5447 // add per-package additional info here (like channels)
5448}
5449
5450// Next Tag: 2
5451message NotificationRemoteViewsProto {
5452 repeated PackageRemoteViewInfoProto package_remote_view_info = 1;
5453}
5454
5455/**
5456 * Pulled from NotificationManagerService.java
5457 */
5458message NotificationRemoteViews {
5459 optional NotificationRemoteViewsProto notification_remote_views = 1;
5460}
5461
Yangsteraf9aee72018-10-12 09:26:16 -07005462message PowerProfileProto {
5463 optional double cpu_suspend = 1;
5464
5465 optional double cpu_idle = 2;
5466
5467 optional double cpu_active = 3;
5468
5469 message CpuCluster {
5470 optional int32 id = 1;
5471 optional double cluster_power = 2;
5472 optional int32 cores = 3;
5473 repeated int64 speed = 4;
5474 repeated double core_power = 5;
5475 }
5476
5477 repeated CpuCluster cpu_cluster = 40;
5478
5479 optional double wifi_scan = 4;
5480
5481 optional double wifi_on = 5;
5482
5483 optional double wifi_active = 6;
5484
5485 optional double wifi_controller_idle = 7;
5486
5487 optional double wifi_controller_rx = 8;
5488
5489 optional double wifi_controller_tx = 9;
5490
5491 repeated double wifi_controller_tx_levels = 10;
5492
5493 optional double wifi_controller_operating_voltage = 11;
5494
5495 optional double bluetooth_controller_idle = 12;
5496
5497 optional double bluetooth_controller_rx = 13;
5498
5499 optional double bluetooth_controller_tx = 14;
5500
5501 optional double bluetooth_controller_operating_voltage = 15;
5502
5503 optional double modem_controller_sleep = 16;
5504
5505 optional double modem_controller_idle = 17;
5506
5507 optional double modem_controller_rx = 18;
5508
5509 repeated double modem_controller_tx = 19;
5510
5511 optional double modem_controller_operating_voltage = 20;
5512
5513 optional double gps_on = 21;
5514
5515 repeated double gps_signal_quality_based = 22;
5516
5517 optional double gps_operating_voltage = 23;
5518
5519 optional double bluetooth_on = 24;
5520
5521 optional double bluetooth_active = 25;
5522
5523 optional double bluetooth_at_cmd = 26;
5524
5525 optional double ambient_display = 27;
5526
5527 optional double screen_on = 28;
5528
5529 optional double radio_on = 29;
5530
5531 optional double radio_scanning = 30;
5532
5533 optional double radio_active = 31;
5534
5535 optional double screen_full = 32;
5536
5537 optional double audio = 33;
5538
5539 optional double video = 34;
5540
5541 optional double flashlight = 35;
5542
5543 optional double memory = 36;
5544
5545 optional double camera = 37;
5546
5547 optional double wifi_batched_scan = 38;
5548
5549 optional double battery_capacity = 39;
Chenjie Yu12e5e672018-09-14 15:54:59 -07005550}
Chenjie Yuab530202018-09-26 12:39:20 -07005551
5552/**
5553 * power_profile.xml and other constants for power model calculations.
5554 * Pulled from PowerProfile.java
5555 */
5556message PowerProfile {
Yangsteraf9aee72018-10-12 09:26:16 -07005557 optional PowerProfileProto power_profile = 1;
Howard Ro9a862de2018-10-11 16:03:33 -07005558}
Chenjie Yub35b5f72018-10-13 23:25:11 -07005559
5560/**
arangelovd5db50e2018-10-12 20:24:39 +01005561 * Logs when a user restriction was added or removed.
5562 *
5563 * Logged from:
5564 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
5565 */
5566message UserRestrictionChanged {
5567 // The raw string of the user restriction as defined in UserManager.
5568 // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS.
5569 optional string restriction = 1;
5570 // Whether the restriction is enabled or disabled.
5571 optional bool enabled = 2;
Howard Ro183c2bd2018-10-18 13:52:10 -07005572}
Yangster-mac308ea0c2018-10-22 13:10:25 -07005573
5574/**
5575 * Pulls process user time and system time. Puller takes a snapshot of all pids
5576 * in the system and returns cpu stats for those that are working at the time.
5577 * Dead pids will be dropped. Kernel processes are excluded.
5578 * Min cool-down is 5 sec.
5579 */
5580message ProcessCpuTime {
5581 optional int32 uid = 1 [(is_uid) = true];
5582
5583 optional string process_name = 2;
5584 // Process cpu time in user space, cumulative from boot/process start
5585 optional int64 user_time_millis = 3;
5586 // Process cpu time in system space, cumulative from boot/process start
5587 optional int64 system_time_millis = 4;
Rafal Slawikbf67d072018-10-23 11:07:54 +01005588}
Misha Wagner5a51e002018-10-03 15:04:09 +01005589
5590/**
5591 * Pulls the CPU usage for each thread.
5592 *
5593 * Read from /proc/$PID/task/$TID/time_in_state files.
5594 *
5595 * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and
5596 * time_in_state files not being present on some phones, have not been addressed. These should be
5597 * considered before a public release.
5598 */
5599message CpuTimePerThreadFreq {
5600 // UID that owns the process.
5601 optional int32 uid = 1 [(is_uid) = true];
5602 // ID of the process.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00005603 optional int32 process_id = 2;
Misha Wagner5a51e002018-10-03 15:04:09 +01005604 // ID of the thread.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00005605 optional int32 thread_id = 3;
Misha Wagner5a51e002018-10-03 15:04:09 +01005606 // Name of the process taken from `/proc/$PID/cmdline`.
5607 optional string process_name = 4;
5608 // Name of the thread taken from `/proc/$PID/task/$TID/comm`
5609 optional string thread_name = 5;
Misha Wagnerfde69582018-11-28 13:26:32 +00005610
5611 // Report eight different frequencies, and how much time is spent in each frequency. Frequencies
5612 // are given in KHz, and time is given in milliseconds since the thread started. All eight
5613 // frequencies are given here as the alternative is sending eight separate atoms. This method
5614 // significantly reduces the amount of data created
5615 optional int32 frequency1_khz = 6;
5616 optional int32 time1_millis = 7;
5617 optional int32 frequency2_khz = 8;
5618 optional int32 time2_millis = 9;
5619 optional int32 frequency3_khz = 10;
5620 optional int32 time3_millis = 11;
5621 optional int32 frequency4_khz = 12;
5622 optional int32 time4_millis = 13;
5623 optional int32 frequency5_khz = 14;
5624 optional int32 time5_millis = 15;
5625 optional int32 frequency6_khz = 16;
5626 optional int32 time6_millis = 17;
5627 optional int32 frequency7_khz = 18;
5628 optional int32 time7_millis = 19;
5629 optional int32 frequency8_khz = 20;
5630 optional int32 time8_millis = 21;
Misha Wagner5a51e002018-10-03 15:04:09 +01005631}
Bookatz75ee60422018-11-09 12:27:37 -08005632
5633/**
Bookatz366a4432018-11-20 09:42:33 -08005634 * Pulls information about the device's build.
5635 */
5636message BuildInformation {
5637 // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse.
5638 // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags.
5639 optional string fingerprint = 1;
5640
5641 // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated.
5642 optional string brand = 2;
5643
5644 // Build.PRODUCT. The name of the overall product.
5645 optional string product = 3;
5646
5647 // Build.DEVICE. The name of the industrial design.
5648 optional string device = 4;
5649
5650 // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas".
5651 optional string version_release = 5;
5652
5653 // Build.ID. E.g. a label like "M4-rc20".
5654 optional string id = 6;
5655
5656 // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to
5657 // represent this build.
5658 optional string version_incremental = 7;
5659
5660 // Build.TYPE. The type of build, like "user" or "eng".
5661 optional string type = 8;
5662
5663 // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug".
5664 optional string tags = 9;
5665}
5666
5667/**
Adam He420947c2019-01-23 15:59:09 -08005668 * Logs information about mismatched caller for content capture.
5669 *
5670 * Logged from:
5671 * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java
5672 */
5673message ContentCaptureCallerMismatchReported {
5674 optional string intended_package = 1;
5675 optional string calling_package = 2;
5676}
5677
5678/**
5679 * Logs information about content capture service events.
5680 *
5681 * Logged from:
5682 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
5683 */
5684message ContentCaptureServiceEvents {
5685 // The type of event.
5686 enum Event {
5687 UNKNOWN = 0;
5688 ON_CONNECTED = 1;
5689 ON_DISCONNECTED = 2;
5690 SET_WHITELIST = 3;
5691 SET_DISABLED = 4;
5692 ON_USER_DATA_REMOVED = 5;
5693 }
5694 optional Event event = 1;
5695 // component/package of content capture service.
5696 optional string service_info = 2;
5697 // component/package of target.
5698 // it's a concatenated list of component/package for SET_WHITELIST event
5699 // separated by " ".
5700 optional string target_info = 3;
5701}
5702
5703/**
5704 * Logs information about content capture session events.
5705 *
5706 * Logged from:
5707 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
5708 */
5709message ContentCaptureSessionEvents {
5710 // The type of event.
5711 enum Event {
5712 UNKNOWN = 0;
5713 ON_SESSION_STARTED = 1;
5714 ON_SESSION_FINISHED = 2;
5715 SESSION_NOT_CREATED = 3;
5716 }
5717 optional int32 session_id = 1;
5718 optional Event event = 2;
5719 // (n/a on session finished)
5720 optional int32 state_flags = 3;
5721 // component/package of content capture service.
5722 optional string service_info = 4;
5723 // component/package of app.
5724 // (n/a on session finished)
5725 optional string app_info = 5;
5726 optional bool is_child_session = 6;
5727}
5728
5729/**
5730 * Logs information about session being flushed.
5731 *
5732 * Logged from:
5733 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
5734 */
5735message ContentCaptureFlushed {
5736 optional int32 session_id = 1;
5737 // component/package of content capture service.
5738 optional string service_info = 2;
5739 // component/package of app.
5740 optional string app_info = 3;
5741 // session start/finish events
5742 optional int32 child_session_started = 4;
5743 optional int32 child_session_finished = 5;
5744 // count of view events.
5745 optional int32 view_appeared_count = 6;
5746 optional int32 view_disappeared_count = 7;
5747 optional int32 view_text_changed_count = 8;
5748
5749 // Flush stats.
5750 optional int32 max_events = 9;
5751 optional int32 idle_flush_freq = 10;
5752 optional int32 text_flush_freq = 11;
5753 optional int32 flush_reason = 12;
5754}
5755
5756/**
Bookatz75ee60422018-11-09 12:27:37 -08005757 * Pulls on-device BatteryStats power use calculations for the overall device.
5758 */
5759message DeviceCalculatedPowerUse {
Bookatz3dbc13a2018-12-21 12:16:51 -08005760 // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5761 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5762 // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()).
5763 optional int64 computed_power_nano_amp_secs = 1;
Bookatz75ee60422018-11-09 12:27:37 -08005764}
5765
5766/**
5767 * Pulls on-device BatteryStats power use calculations broken down by uid.
5768 * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use
5769 * that is attributed to non-uid items. They must all be included to get the total power use.
5770 */
5771message DeviceCalculatedPowerBlameUid {
5772 // Uid being blamed. Note: isolated uids have already been mapped to host uid.
5773 optional int32 uid = 1 [(is_uid) = true];
5774
Bookatz3dbc13a2018-12-21 12:16:51 -08005775 // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5776 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5777 optional int64 power_nano_amp_secs = 2;
Bookatz75ee60422018-11-09 12:27:37 -08005778}
5779
5780/**
5781 * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by
5782 * drain type.
5783 * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that
5784 * is attributed uids. They must all be included to get the total power use.
5785 */
5786message DeviceCalculatedPowerBlameOther {
5787 // The type of item whose power use is being reported.
5788 enum DrainType {
5789 AMBIENT_DISPLAY = 0;
5790 // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid.
5791 BLUETOOTH = 2;
5792 CAMERA = 3;
5793 // Cell-standby
5794 CELL = 4;
5795 FLASHLIGHT = 5;
5796 IDLE = 6;
5797 MEMORY = 7;
5798 // Amount that total computed drain exceeded the drain estimated using the
5799 // battery level changes and capacity.
5800 OVERCOUNTED = 8;
5801 PHONE = 9;
5802 SCREEN = 10;
5803 // Amount that total computed drain was below the drain estimated using the
5804 // battery level changes and capacity.
5805 UNACCOUNTED = 11;
5806 // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported.
5807 WIFI = 13;
5808 }
5809 optional DrainType drain_type = 1;
5810
Bookatz3dbc13a2018-12-21 12:16:51 -08005811 // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5812 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5813 optional int64 power_nano_amp_secs = 2;
Rafal Slawik3bea8952018-11-15 12:39:33 +00005814}
arangelov4e994062018-11-13 16:12:38 +00005815
5816/**
5817 * Logs device policy features.
5818 *
5819 * Logged from:
5820 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
5821 * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
5822 */
5823message DevicePolicyEvent {
5824 // The event id - unique for each event.
5825 optional android.stats.devicepolicy.EventId event_id = 1;
5826 // The admin package name.
5827 optional string admin_package_name = 2;
5828 // A generic integer parameter.
5829 optional int32 integer_value = 3;
5830 // A generic boolean parameter.
5831 optional bool boolean_value = 4;
5832 // A parameter specifying a time period in milliseconds.
5833 optional uint64 time_period_millis = 5;
5834 // A parameter specifying a list of package names, bundle extras or string parameters.
5835 optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES];
5836}
shawnlinea5b66b2018-11-13 15:05:29 +08005837
5838/**
5839 * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up.
5840 *
5841 * Logged from:
5842 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5843 */
5844message DocsUILaunchReported {
5845 optional android.stats.docsui.LaunchAction launch_action = 1;
5846 optional bool has_initial_uri = 2;
5847 optional android.stats.docsui.MimeType mime_type = 3;
5848 optional android.stats.docsui.Root initial_root = 4;
5849}
5850
5851/**
5852 * Logs root/app visited event in file managers/picker. Call this when the user
5853 * taps on root/app in hamburger menu.
5854 *
5855 * Logged from:
5856 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5857 */
5858message DocsUIRootVisitedReported {
5859 optional android.stats.docsui.ContextScope scope = 1;
5860 optional android.stats.docsui.Root root = 2;
5861}
5862
5863/**
5864 * Logs file operation stats. Call this when a file operation has completed.
5865 *
5866 * Logged from:
5867 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5868 */
5869message DocsUIFileOperationReported {
5870 optional android.stats.docsui.Provider provider = 1;
5871 optional android.stats.docsui.FileOperation file_op = 2;
5872}
5873
5874/**
5875 * Logs file operation stats. Call this when a copy/move operation has completed with a specific
5876 * mode.
5877 *
5878 * Logged from:
5879 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5880 */
5881message DocsUIFileOperationCopyMoveModeReported {
5882 optional android.stats.docsui.FileOperation file_op = 1;
5883 optional android.stats.docsui.CopyMoveOpMode mode = 2;
5884}
5885
5886
5887/**
5888 * Logs file sub operation stats. Call this when a file operation has failed.
5889 *
5890 * Logged from:
5891 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5892 */
5893message DocsUIFileOperationFailureReported {
5894 optional android.stats.docsui.Authority authority = 1;
5895 optional android.stats.docsui.SubFileOperation sub_op = 2;
5896}
5897
5898/**
5899* Logs the cancellation of a file operation. Call this when a job is canceled
5900*
5901* Logged from:
5902* package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5903*/
5904message DocsUIFileOperationCanceledReported {
5905 optional android.stats.docsui.FileOperation file_op = 1;
5906}
5907
5908/**
5909 * Logs startup time in milliseconds.
5910 *
5911 * Logged from:
5912 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5913 */
5914message DocsUIStartupMsReported {
5915 optional int32 startup_millis = 1;
5916}
5917
5918/**
5919 * Logs the action that was started by user.
5920 *
5921 * Logged from:
5922 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5923 */
5924message DocsUIUserActionReported {
5925 optional android.stats.docsui.UserAction action = 1;
5926}
5927
5928/**
5929 * Logs the invalid type when invalid scoped access is requested.
5930 *
5931 * Logged from:
5932 * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java
5933 */
5934message DocsUIInvalidScopedAccessRequestReported {
5935 optional android.stats.docsui.InvalidScopedAccess type = 1;
Rafal Slawikda51b932018-12-13 16:31:33 +00005936}
Ben Murdochbab399f62018-12-06 11:01:38 +00005937
5938/**
shawnlina75e82d2019-01-07 10:31:12 +08005939 * Logs the package name that launches docsui picker mode.
5940 *
5941 * Logged from:
5942 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5943 */
5944message DocsUIPickerLaunchedFromReported {
5945 optional string package_name = 1;
5946}
5947
5948/**
5949 * Logs the search type.
5950 *
5951 * Logged from:
5952 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5953 */
5954message DocsUISearchTypeReported {
5955 optional android.stats.docsui.SearchType search_type = 1;
5956}
5957
5958/**
5959 * Logs the search mode.
5960 *
5961 * Logged from:
5962 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5963 */
5964message DocsUISearchModeReported {
5965 optional android.stats.docsui.SearchMode search_mode = 1;
5966}
5967
5968/**
5969 * Logs the pick result information.
5970 *
5971 * Logged from:
5972 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5973 */
5974message DocsUIPickResultReported {
5975 optional int32 total_action_count = 1;
5976 optional int64 duration_millis = 2;
5977 optional int32 file_count= 3;
5978 optional bool is_searching = 4;
5979 optional android.stats.docsui.Root picked_from = 5;
5980 optional android.stats.docsui.MimeType mime_type = 6;
5981 optional int32 repeatedly_pick_times = 7;
5982}
5983
5984/**
Ben Murdochbab399f62018-12-06 11:01:38 +00005985 * Logs when an app's memory is compacted.
5986 *
5987 * Logged from:
5988 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
5989 */
5990message AppCompacted {
5991 // The pid of the process being compacted.
5992 optional int32 pid = 1;
5993
5994 // The name of the process being compacted.
5995 optional string process_name = 2;
5996
5997 // The type of compaction.
5998 enum Action {
5999 UNKNOWN = 0;
6000 SOME = 1;
6001 FULL = 2;
Ben Murdoch35c14202019-04-09 11:00:53 +01006002 PERSISTENT = 3;
6003 BFGS = 4;
Ben Murdochbab399f62018-12-06 11:01:38 +00006004 }
Ben Murdoch01720b82018-12-19 18:03:44 +00006005 optional Action action = 3;
Ben Murdochbab399f62018-12-06 11:01:38 +00006006
6007 // Total RSS in kilobytes consumed by the process prior to compaction.
6008 optional int64 before_rss_total_kilobytes = 4;
6009
6010 // File RSS in kilobytes consumed by the process prior to compaction.
6011 optional int64 before_rss_file_kilobytes = 5;
6012
6013 // Anonymous RSS in kilobytes consumed by the process prior to compaction.
6014 optional int64 before_rss_anon_kilobytes = 6;
6015
6016 // Swap in kilobytes consumed by the process prior to compaction.
6017 optional int64 before_swap_kilobytes = 7;
6018
6019 // Total RSS in kilobytes consumed by the process after compaction.
6020 optional int64 after_rss_total_kilobytes = 8;
6021
6022 // File RSS in kilobytes consumed by the process after compaction.
6023 optional int64 after_rss_file_kilobytes = 9;
6024
6025 // Anonymous RSS in kilobytes consumed by the process after compaction.
6026 optional int64 after_rss_anon_kilobytes = 10;
6027
6028 // Swap in kilobytes consumed by the process after compaction.
6029 optional int64 after_swap_kilobytes = 11;
6030
6031 // The time taken to perform compaction in milliseconds.
6032 optional int64 time_to_compact_millis = 12;
6033
6034 // The last compaction action performed for this app.
6035 optional Action last_action = 13;
6036
Ben Murdoch01720b82018-12-19 18:03:44 +00006037 // The last time that compaction was attempted on this process in milliseconds
6038 // since boot, not including sleep (see SystemClock.uptimeMillis()).
6039 optional int64 last_compact_timestamp_ms_since_boot = 14;
Ben Murdochbab399f62018-12-06 11:01:38 +00006040
Ben Murdoch885c21b2019-03-15 18:02:04 +00006041 // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction.
Ben Murdoch01720b82018-12-19 18:03:44 +00006042 optional int32 oom_score_adj = 15;
Ben Murdochbab399f62018-12-06 11:01:38 +00006043
6044 // The process state at the time of compaction.
6045 optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN];
Ben Murdochfdc55932019-01-30 10:43:15 +00006046
6047 // Free ZRAM in kilobytes before compaction.
6048 optional int64 before_zram_free_kilobytes = 17;
6049
6050 // Free ZRAM in kilobytes after compaction.
6051 optional int64 after_zram_free_kilobytes = 18;
Ben Murdochbab399f62018-12-06 11:01:38 +00006052}
lifr157fc552018-12-12 16:38:04 +08006053
6054/**
lifrb6b90b62019-03-29 00:40:17 +08006055 * Logs a DNS lookup operation initiated by the system resolver on behalf of an application
6056 * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName().
6057 *
lifr1f74b052019-04-16 22:16:30 +08006058 * The NetworkDnsEventReported message represents the entire lookup operation, which may
6059 * result one or more queries to the recursive DNS resolvers. Those are individually logged
6060 * in DnsQueryEvents to enable computing error rates and network latency and timeouts
6061 * broken up by query type, transport, network interface, etc.
lifr157fc552018-12-12 16:38:04 +08006062 */
6063message NetworkDnsEventReported {
lifr1f74b052019-04-16 22:16:30 +08006064 optional android.stats.dnsresolver.EventType event_type = 1;
lifr157fc552018-12-12 16:38:04 +08006065
lifr1f74b052019-04-16 22:16:30 +08006066 optional android.stats.dnsresolver.ReturnCode return_code = 2;
lifrb6b90b62019-03-29 00:40:17 +08006067
6068 // The latency in microseconds of the entire DNS lookup operation.
lifr157fc552018-12-12 16:38:04 +08006069 optional int32 latency_micros = 3;
lifrb6b90b62019-03-29 00:40:17 +08006070
lifr1f74b052019-04-16 22:16:30 +08006071 // Only valid for event_type = EVENT_GETADDRINFO.
6072 optional int32 hints_ai_flags = 4;
lifrb6b90b62019-03-29 00:40:17 +08006073
lifr1f74b052019-04-16 22:16:30 +08006074 // Flags passed to android_res_nsend() defined in multinetwork.h
6075 // Only valid for event_type = EVENT_RESNSEND.
6076 optional int32 res_nsend_flags = 5;
lifrb6b90b62019-03-29 00:40:17 +08006077
lifrad9becc2019-05-20 11:04:41 +08006078 optional android.stats.dnsresolver.NetworkType network_type = 6;
lifrb6b90b62019-03-29 00:40:17 +08006079
6080 // The DNS over TLS mode on a specific netId.
lifr1f74b052019-04-16 22:16:30 +08006081 optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7;
lifrb6b90b62019-03-29 00:40:17 +08006082
6083 // Additional pass-through fields opaque to statsd.
6084 // The DNS resolver Mainline module can add new fields here without requiring an OS update.
lifr1f74b052019-04-16 22:16:30 +08006085 optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES];
lifr2b9fab72019-07-20 15:28:28 +08006086
6087 // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom.
6088 optional int32 sampling_rate_denom = 9;
lifr157fc552018-12-12 16:38:04 +08006089}
Chiachang Wangf6bedc22019-01-14 11:54:32 +08006090
6091/**
6092 * Logs when a data stall event occurs.
6093 *
6094 * Log from:
6095 * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
6096 */
6097message DataStallEvent {
6098 // Data stall evaluation type.
6099 // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
6100 // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*.
6101 optional int32 evaluation_type = 1;
6102 // See definition in data_stall_event.proto.
6103 optional com.android.server.connectivity.ProbeResult validation_result = 2;
6104 // See definition in data_stall_event.proto.
6105 optional android.net.NetworkCapabilitiesProto.Transport network_type = 3;
6106 // See definition in data_stall_event.proto.
6107 optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES];
6108 // See definition in data_stall_event.proto.
6109 optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES];
6110 // See definition in data_stall_event.proto.
6111 optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES];
6112}
Christian Brunschenf86039e2018-12-21 12:26:14 +00006113
6114/*
6115 * Logs when RescueParty resets some set of experiment flags.
6116 *
6117 * Logged from:
6118 * frameworks/base/services/core/java/com/android/server/RescueParty.java
6119 */
6120message RescuePartyResetReported {
6121 // The rescue level of this reset. A value of 0 indicates missing or unknown level information.
6122 optional int32 rescue_level = 1;
6123}
Mathew Inwoodb375be52019-01-04 11:36:25 +00006124
6125/**
6126 * Logs when signed config is received from an APK, and if that config was applied successfully.
6127 * Logged from:
6128 * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java
6129 */
6130message SignedConfigReported {
6131 enum Type {
6132 UNKNOWN_TYPE = 0;
6133 GLOBAL_SETTINGS = 1;
6134 }
6135 optional Type type = 1;
6136
6137 // The final status of the signed config received.
6138 enum Status {
6139 UNKNOWN_STATUS = 0;
6140 APPLIED = 1;
6141 BASE64_FAILURE_CONFIG = 2;
6142 BASE64_FAILURE_SIGNATURE = 3;
6143 SECURITY_EXCEPTION = 4;
6144 INVALID_CONFIG = 5;
6145 OLD_CONFIG = 6;
6146 SIGNATURE_CHECK_FAILED = 7;
6147 NOT_APPLICABLE = 8;
Mathew Inwood610d0962019-01-15 11:50:28 +00006148 SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9;
Mathew Inwoodb375be52019-01-04 11:36:25 +00006149 }
6150 optional Status status = 2;
6151
6152 // The version of the signed config processed.
6153 optional int32 version = 3;
6154
6155 // The package name that the config was extracted from.
6156 optional string from_package = 4;
6157
6158 enum Key {
6159 NO_KEY = 0;
6160 DEBUG = 1;
6161 PRODUCTION = 2;
6162 }
6163 // Which key was used to verify the config.
6164 optional Key verified_with = 5;
6165}
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006166
6167/*
6168 * Logs GNSS Network-Initiated (NI) location events.
6169 *
6170 * Logged from:
6171 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
6172 */
6173message GnssNiEventReported {
6174 // The type of GnssNiEvent.
6175 enum EventType {
6176 UNKNOWN = 0;
6177 NI_REQUEST = 1;
6178 NI_RESPONSE = 2;
6179 }
6180 optional EventType event_type = 1;
6181
6182 // An ID generated by HAL to associate NI notifications and UI responses.
6183 optional int32 notification_id = 2;
6184
6185 // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006186 optional android.server.location.GnssNiType ni_type = 3;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006187
6188 // NI requires notification.
6189 optional bool need_notify = 4;
6190
6191 // NI requires verification.
6192 optional bool need_verify = 5;
6193
6194 // NI requires privacy override, no notification/minimal trace.
6195 optional bool privacy_override = 6;
6196
6197 // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in
6198 // seconds.
6199 optional int32 timeout = 7;
6200
6201 // Default response when timeout.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006202 optional android.server.location.GnssUserResponseType default_response = 8;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006203
6204 // String representing the requester of the network inititated location request.
6205 optional string requestor_id = 9;
6206
6207 // Notification message text string representing the service(for eg. SUPL-service) who sent the
6208 // network initiated location request.
6209 optional string text = 10;
6210
6211 // requestorId decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006212 optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006213
6214 // Notification message text decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006215 optional android.server.location.GnssNiEncodingType text_encoding = 12;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006216
6217 // True if SUPL ES is enabled.
6218 optional bool is_supl_es_enabled = 13;
6219
6220 // True if GNSS location is enabled.
6221 optional bool is_location_enabled = 14;
6222
6223 // GNSS NI responses which define the response in NI structures.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08006224 optional android.server.location.GnssUserResponseType user_response = 15;
6225}
6226
6227/**
6228 * Logs GNSS non-framework (NFW) location notification.
6229 *
6230 * Logged from:
6231 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
6232 */
6233message GnssNfwNotificationReported {
6234 // Package name of the Android proxy application representing the non-framework entity that
6235 // requested location. Set to empty string if unknown.
6236 optional string proxy_app_package_name = 1;
6237
6238 // Protocol stack that initiated the non-framework location request.
6239 optional android.server.location.NfwProtocolStack protocol_stack = 2;
6240
6241 // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise,
6242 // set to empty string. This field is opaque to the framework and used for logging purposes.
6243 optional string other_protocol_stack_name = 3;
6244
6245 // Source initiating/receiving the location information.
6246 optional android.server.location.NfwRequestor requestor = 4;
6247
6248 // Identity of the endpoint receiving the location information. For example, carrier name, OEM
6249 // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework
6250 // and used for logging purposes.
6251 optional string requestor_id = 5;
6252
6253 // Indicates whether location information was provided for this request.
6254 optional android.server.location.NfwResponseType response_type = 6;
6255
6256 // True if the device is in user initiated emergency session.
6257 optional bool in_emergency_mode = 7;
6258
6259 // True if cached location is provided.
6260 optional bool is_cached_location = 8;
6261
6262 // True if proxy app permission mismatch between framework and GNSS HAL.
6263 optional bool is_permission_mismatched = 9;
6264}
6265
6266/**
6267 * Logs GNSS configuration as defined in IGnssConfiguration.hal.
6268 *
6269 * Logged from:
6270 * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java
6271 */
6272message GnssConfigurationReported {
6273 // SUPL host name.
6274 optional string supl_host = 1;
6275
6276 // SUPL port number.
6277 optional int32 supl_port = 2;
6278
6279 // C2K host name.
6280 optional string c2k_host = 3;
6281
6282 // C2K port number.
6283 optional int32 c2k_port = 4;
6284
6285 // The SUPL version requested by Carrier.
6286 optional int32 supl_ver = 5;
6287
6288 // The SUPL mode.
6289 optional android.server.location.SuplMode supl_mode = 6;
6290
6291 // True if NI emergency SUPL restrictions is enabled.
6292 optional bool supl_es = 7;
6293
6294 // LTE Positioning Profile settings
6295 optional android.server.location.LppProfile lpp_profile = 8;
6296
6297 // Positioning protocol on A-Glonass system.
6298 optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9;
6299
6300 // True if emergency PDN is used. Otherwise, regular PDN is used.
6301 optional bool use_emergency_pdn_for_emergency_supl= 10;
6302
6303 // Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
6304 optional android.server.location.GpsLock gps_lock = 11;
6305
6306 // Number of seconds to extend the emergency session duration post emergency call.
6307 optional int32 es_extension_sec = 12;
6308
6309 // The full list of package names of proxy Android applications representing the non-framework
6310 // location access entities (on/off the device) for which the framework user has granted
6311 // non-framework location access permission. The package names are concatenated in one string
6312 // with spaces as separators.
6313 optional string enabled_proxy_app_package_name_list = 13;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08006314}
Jack Yu95b64f32018-12-13 18:26:11 +08006315
6316/**
6317 * Logs when a NFC device's error occurred.
6318 * Logged from:
6319 * system/nfc/src/nfc/nfc/nfc_ncif.cc
6320 * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java
6321 */
6322message NfcErrorOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006323 enum Type {
6324 UNKNOWN = 0;
6325 CMD_TIMEOUT = 1;
6326 ERROR_NOTIFICATION = 2;
6327 AID_OVERFLOW = 3;
6328 }
6329 optional Type type = 1;
6330 // If it's nci cmd timeout, log the timeout command.
6331 optional uint32 nci_cmd = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08006332
Alex Salod7c3eef2019-01-25 14:43:27 -08006333 optional uint32 error_ntf_status_code = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08006334}
6335
6336/**
6337 * Logs when a NFC device's state changed event
6338 * Logged from:
6339 * packages/apps/Nfc/src/com/android/nfc/NfcService.java
6340 */
6341message NfcStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08006342 enum State {
6343 UNKNOWN = 0;
6344 OFF = 1;
6345 ON = 2;
6346 ON_LOCKED = 3; // Secure Nfc enabled.
6347 CRASH_RESTART = 4; // NfcService watchdog timeout restart.
6348 }
6349 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006350}
6351
6352/**
6353 * Logs when a NFC Beam Transaction occurred.
6354 * Logged from:
6355 * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
6356 */
6357message NfcBeamOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006358 enum Operation {
6359 UNKNOWN = 0;
6360 SEND = 1;
6361 RECEIVE = 2;
6362 }
6363 optional Operation operation = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006364}
6365
6366/**
6367 * Logs when a NFC Card Emulation Transaction occurred.
6368 * Logged from:
6369 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java
6370 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java
6371 */
6372message NfcCardemulationOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006373 enum Category {
6374 UNKNOWN = 0;
6375 HCE_PAYMENT = 1;
6376 HCE_OTHER = 2;
6377 OFFHOST = 3;
6378 }
6379 // Transaction belongs to HCE payment or HCE other category, or offhost.
6380 optional Category category = 1;
6381 // SeName from transaction: SIMx, eSEx, HCE, HCEF.
6382 optional string se_name = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08006383}
6384
6385/**
6386 * Logs when a NFC Tag event occurred.
6387 * Logged from:
6388 * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java
6389 */
6390message NfcTagOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08006391 enum Type {
6392 UNKNOWN = 0;
6393 URL = 1;
6394 BT_PAIRING = 2;
6395 PROVISION = 3;
6396 WIFI_CONNECT = 4;
6397 APP_LAUNCH = 5;
6398 OTHERS = 6;
6399 }
6400 optional Type type = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006401}
6402
6403/**
6404 * Logs when Hce transaction triggered
6405 * Logged from:
6406 * system/nfc/src/nfc/nfc/nfc_ncif.cc
6407 */
6408message NfcHceTransactionOccurred {
6409 // The latency period(in microseconds) it took for the first HCE data
6410 // exchange.
6411 optional uint32 latency_micros = 1;
6412}
6413
6414/**
6415 * Logs when SecureElement state event changed
6416 * Logged from:
6417 * packages/apps/SecureElement/src/com/android/se/Terminal.java
6418 */
6419message SeStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08006420 enum State {
6421 UNKNOWN = 0;
6422 INITIALIZED = 1;
6423 DISCONNECTED = 2;
6424 CONNECTED = 3;
6425 HALCRASH = 4;
6426 }
6427 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08006428
Alex Salod7c3eef2019-01-25 14:43:27 -08006429 optional string state_change_reason = 2;
6430 // SIMx or eSEx.
6431 optional string terminal = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08006432}
6433
6434/**
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006435 * Information about a permission grant request
6436 */
6437message PermissionGrantRequestResultReported {
6438 // unique value identifying an API call. A API call might result in multiple of these atoms
6439 optional int64 request_id = 1;
6440
6441 // UID of package requesting the permission grant
Stanislav Zholnine8d073b2019-11-25 17:49:21 +00006442 optional int32 uid = 2 [(is_uid) = true];
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006443
6444 // Name of package requesting the permission grant
Stanislav Zholnine8d073b2019-11-25 17:49:21 +00006445 optional string package_name = 3;
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006446
6447 // The permission to be granted
6448 optional string permission_name = 4;
6449
6450 // If the permission was explicitly requested via the API or added by the system
6451 optional bool is_implicit = 5;
6452
6453 enum Result {
6454 UNDEFINED = 0;
6455 // permission request was ignored
6456 IGNORED = 1;
6457 // permission request was ignored because it was user fixed
6458 IGNORED_USER_FIXED = 2;
6459 // permission request was ignored because it was policy fixed
6460 IGNORED_POLICY_FIXED = 3;
6461 // permission was granted by user action
6462 USER_GRANTED = 4;
6463 // permission was automatically granted
6464 AUTO_GRANTED = 5;
6465 // permission was denied by user action
6466 USER_DENIED = 6;
6467 // permission was denied with prejudice by the user
6468 USER_DENIED_WITH_PREJUDICE = 7;
6469 // permission was automatically denied
6470 AUTO_DENIED = 8;
Svet Ganovd8eb8b22019-04-05 18:52:08 -07006471 // permission request was ignored because permission is restricted
6472 IGNORED_RESTRICTED_PERMISSION = 9;
Stanislav Zholnin066aefb2019-10-17 18:40:33 +01006473 // one time permission was granted by user action
6474 USER_GRANTED_ONE_TIME = 10;
Stanislav Zholnin8fde4fb2019-12-06 19:06:08 +00006475 // user ignored request by leaving the request screen without choosing any option
6476 USER_IGNORED = 11;
Evan Severson7c1cc8a2019-12-17 14:36:17 -08006477 // user granted the permission after being linked to settings
6478 USER_GRANTED_IN_SETTINGS = 12;
6479 // user denied the permission after being linked to settings
6480 USER_DENIED_IN_SETTINGS = 13;
6481 // user denied the permission with prejudice after being linked to settings
6482 USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14;
6483 // permission was automatically revoked after one-time permission expired
6484 AUTO_ONE_TIME_PERMISSION_REVOKED = 15;
Eugene Susla6db4be52020-01-09 11:02:09 -08006485 // permission was automatically revoked for unused app
6486 AUTO_UNUSED_APP_PERMISSION_REVOKED = 16;
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08006487 }
6488 // The result of the permission grant
6489 optional Result result = 6;
6490}
6491
6492/**
Jack Yu95b64f32018-12-13 18:26:11 +08006493 * Logs when Omapi API used
6494 * Logged from:
6495 * packages/apps/SecureElement/src/com/android/se/Terminal.java
6496 */
6497message SeOmapiReported {
Alex Salod7c3eef2019-01-25 14:43:27 -08006498 enum Operation {
6499 UNKNOWN = 0;
6500 OPEN_CHANNEL = 1;
6501 }
6502 optional Operation operation = 1;
6503 // SIMx or eSEx.
6504 optional string terminal = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08006505
Alex Salod7c3eef2019-01-25 14:43:27 -08006506 optional string package_name = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08006507}
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08006508
6509/**
Alex Saloa060aee2019-01-21 14:36:41 -08006510 * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED.
6511 * The dispatch latency is the dispatchClockTime - enqueueClockTime.
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08006512 * Logged from:
6513 * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
6514 */
6515message BroadcastDispatchLatencyReported {
Alex Saloa060aee2019-01-21 14:36:41 -08006516 optional int64 dispatch_latency_millis = 1;
6517}
6518
6519/**
6520 * Logs AttentionManagerService attention check result.
6521 *
6522 * Logged from:
6523 * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java
6524 */
6525message AttentionManagerServiceResultReported {
6526 // See core/java/android/service/attention/AttentionService.java
6527 enum AttentionCheckResult {
6528 UNKNOWN = 20;
6529 ATTENTION_SUCCESS_ABSENT = 0;
6530 ATTENTION_SUCCESS_PRESENT = 1;
Alex Salodd028ba2019-04-17 13:33:49 -07006531 ATTENTION_FAILURE_UNKNOWN = 2;
6532 ATTENTION_FAILURE_CANCELLED = 3;
6533 ATTENTION_FAILURE_PREEMPTED = 4;
6534 ATTENTION_FAILURE_TIMED_OUT = 5;
6535 ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6;
Alex Saloa060aee2019-01-21 14:36:41 -08006536 }
6537 optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN];
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08006538}
Michael Groover9e7b06e2018-12-28 19:55:51 -08006539
6540/**
6541 * Logs when an adb connection changes state.
6542 *
6543 * Logged from:
6544 * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java
6545 */
6546message AdbConnectionChanged {
6547 // The last time this system connected via adb, or 0 if the 'always allow' option was not
6548 // previously selected for this system.
6549 optional int64 last_connection_time_millis = 1;
6550
6551 // The time in ms within which a subsequent connection from an 'always allow' system is allowed
6552 // to reconnect via adb without user interaction.
6553 optional int64 auth_window_millis = 2;
6554
6555 // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto.
6556 optional android.debug.AdbConnectionStateEnum state = 3;
6557
6558 // True if the 'always allow' option was selected for this system.
6559 optional bool always_allow = 4;
6560}
Carter Hsub8fd1e92019-01-11 15:24:45 +08006561
6562/*
6563 * Logs the reported speech DSP status.
6564 *
6565 * Logged from:
6566 * Vendor audio implementation.
6567 */
6568message SpeechDspStatReported {
6569 // The total Speech DSP uptime in milliseconds.
6570 optional int32 total_uptime_millis = 1;
6571 // The total Speech DSP downtime in milliseconds.
6572 optional int32 total_downtime_millis = 2;
6573 optional int32 total_crash_count = 3;
6574 optional int32 total_recover_count = 4;
6575}
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -08006576
6577/**
6578 * Logs USB connector contaminant status.
6579 *
6580 * Logged from: USB Service.
6581 */
6582message UsbContaminantReported {
6583 optional string id = 1;
6584 optional android.service.usb.ContaminantPresenceStatus status = 2;
6585}
Olivier Gaillard18d452202019-01-22 15:03:41 +00006586
6587/**
6588 * This atom is for debugging purpose.
6589 */
6590message DebugElapsedClock {
6591 // Monotically increasing value for each pull.
6592 optional int64 pull_count = 1;
6593 // Time from System.elapsedRealtime.
6594 optional int64 elapsed_clock_millis = 2;
6595 // Time from System.elapsedRealtime.
6596 optional int64 same_elapsed_clock_millis = 3;
6597 // Diff between current elapsed time and elapsed time from previous pull.
6598 optional int64 elapsed_clock_diff_millis = 4;
6599
6600 enum Type {
6601 TYPE_UNKNOWN = 0;
6602 ALWAYS_PRESENT = 1;
6603 PRESENT_ON_ODD_PULLS = 2;
6604 }
6605 // Type of behavior for the pulled data.
6606 optional Type type = 5;
6607}
6608
6609/**
6610 * This atom is for debugging purpose.
6611 */
6612message DebugFailingElapsedClock {
6613 // Monotically increasing value for each pull.
6614 optional int64 pull_count = 1;
6615 // Time from System.elapsedRealtime.
6616 optional int64 elapsed_clock_millis = 2;
6617 // Time from System.elapsedRealtime.
6618 optional int64 same_elapsed_clock_millis = 3;
6619 // Diff between current elapsed time and elapsed time from previous pull.
6620 optional int64 elapsed_clock_diff_millis = 4;
6621}
Steven Wuacef6bb2019-01-23 14:21:17 -05006622
6623/** Logs System UI bubbles event changed.
6624 *
6625 * Logged from:
6626 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles
6627 */
6628message BubbleUIChanged {
6629
6630 // The app package that is posting the bubble.
6631 optional string package_name = 1;
6632
6633 // The notification channel that is posting the bubble.
6634 optional string notification_channel = 2;
6635
6636 // The notification id associated with the posted bubble.
6637 optional int32 notification_id = 3;
6638
6639 // The position of the bubble within the bubble stack.
6640 optional int32 position = 4;
6641
6642 // The total number of bubbles within the bubble stack.
6643 optional int32 total_number = 5;
6644
6645 // User interactions with the bubble.
6646 enum Action {
6647 UNKNOWN = 0;
6648 POSTED = 1;
6649 UPDATED = 2;
6650 EXPANDED = 3;
6651 COLLAPSED = 4;
6652 DISMISSED = 5;
6653 STACK_DISMISSED = 6;
6654 STACK_MOVED = 7;
6655 HEADER_GO_TO_APP = 8;
6656 HEADER_GO_TO_SETTINGS = 9;
6657 PERMISSION_OPT_IN = 10;
6658 PERMISSION_OPT_OUT = 11;
Steven Wua62cb6a2019-02-15 17:12:51 -05006659 PERMISSION_DIALOG_SHOWN = 12;
Steven Wuacef6bb2019-01-23 14:21:17 -05006660 SWIPE_LEFT = 13;
6661 SWIPE_RIGHT = 14;
Steven Wua254dab2019-01-29 11:30:39 -05006662 STACK_EXPANDED = 15;
Steven Wu1684f2d52019-04-11 14:10:42 -04006663 FLYOUT = 16;
Steven Wuacef6bb2019-01-23 14:21:17 -05006664 }
6665 optional Action action = 6;
6666
6667 // Normalized screen position of the bubble stack. The range is between 0 and 1.
6668 optional float normalized_x_position = 7;
6669 optional float normalized_y_position = 8;
Steven Wu45e38ae2019-03-25 16:16:59 -04006670
6671 // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon.
6672 optional bool is_unread = 9;
Steven Wu8ba8ca92019-04-11 10:47:42 -04006673
6674 // Whether the bubble is an on-going one.
6675 optional bool is_ongoing = 10;
6676
6677 // Whether the bubble is produced by an app running in foreground.
Mady Mellordaa0a662019-06-24 16:42:35 -07006678 // This is deprecated and the value should be ignored.
6679 optional bool is_foreground = 11 [deprecated = true];
Steven Wuacef6bb2019-01-23 14:21:17 -05006680}
Kweku Adams8845d012018-12-11 20:06:45 -08006681
6682/**
Steven Wu552f63f2019-02-05 13:41:36 -05006683 * Logs System UI bubbles developer errors.
6684 *
6685 * Logged from:
6686 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
6687 */
6688message BubbleDeveloperErrorReported {
6689
6690 // The app package that is posting the bubble.
6691 optional string package_name = 1;
6692
6693 // Bubble developer error type enums.
6694 enum Error {
6695 UNKNOWN = 0;
6696 ACTIVITY_INFO_MISSING = 1;
6697 ACTIVITY_INFO_NOT_RESIZABLE = 2;
6698 DOCUMENT_LAUNCH_NOT_ALWAYS = 3;
6699 }
6700 optional Error error = 2 [default = UNKNOWN];
6701}
6702
6703/**
Kweku Adams8845d012018-12-11 20:06:45 -08006704 * Logs that a constraint for a scheduled job has changed.
6705 *
6706 * Logged from:
6707 * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
6708 */
6709message ScheduledJobConstraintChanged {
6710 repeated AttributionNode attribution_node = 1;
6711
6712 // Name of the job.
6713 optional string job_name = 2;
6714
6715 optional com.android.server.job.ConstraintEnum constraint = 3;
6716
6717 enum State {
Kweku Adamse8db3ab2019-02-27 14:30:34 -08006718 UNKNOWN = 0;
6719 UNSATISFIED = 1;
6720 SATISFIED = 2;
Kweku Adams8845d012018-12-11 20:06:45 -08006721 }
6722 optional State state = 4;
6723}
Alex Salod7c3eef2019-01-25 14:43:27 -08006724
6725/**
6726 * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check
6727 * returns true.
6728 *
6729 * Logged from:
6730 * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
6731 */
6732message ScreenTimeoutExtensionReported {
6733 // Describes how many times in a row did the power manager reset the screen off timeout.
6734 optional uint32 consecutive_timeout_extended_count = 1;
6735}
Hui Yu885aca12019-01-10 17:11:34 -08006736
6737/*
6738* Logs number of milliseconds it takes to start a process.
6739* The definition of app process start time is from the app launch time to
6740* the time that Zygote finished forking the app process and loaded the
6741* application package's java classes.
6742
6743* This metric is different from AppStartOccurred which is for foreground
6744* activity only.
6745
6746* ProcessStartTime can report all processes (both foreground and background)
6747* start time.
6748*
6749* Logged from:
6750* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
6751*/
6752message ProcessStartTime {
6753 // The uid of the ProcessRecord.
6754 optional int32 uid = 1 [(is_uid) = true];
6755
6756 // The process pid.
6757 optional int32 pid = 2;
6758
6759 // The process name.
6760 // Usually package name, "system" for system server.
6761 // Provided by ActivityManagerService.
6762 optional string process_name = 3;
6763
6764 enum StartType {
6765 UNKNOWN = 0;
6766 WARM = 1;
6767 HOT = 2;
6768 COLD = 3;
6769 }
6770
6771 // The start type.
6772 optional StartType type = 4;
6773
6774 // The elapsed realtime at the start of the process.
6775 optional int64 process_start_time_millis = 5;
6776
6777 // Number of milliseconds it takes to reach bind application.
6778 optional int32 bind_application_delay_millis = 6;
6779
6780 // Number of milliseconds it takes to finish start of the process.
6781 optional int32 process_start_delay_millis = 7;
6782
6783 // hostingType field in ProcessRecord, the component type such as "activity",
6784 // "service", "content provider", "broadcast" or other strings.
6785 optional string hosting_type = 8;
6786
6787 // hostingNameStr field in ProcessRecord. The component class name that runs
6788 // in this process.
6789 optional string hosting_name = 9;
6790}
6791
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006792/**
Ray Essick8ab04df2019-02-15 11:01:02 -08006793 * Track Media Codec usage
6794 * Logged from:
6795 * frameworks/av/media/libstagefright/MediaCodec.cpp
6796 * frameworks/av/services/mediaanalytics/statsd_codec.cpp
6797 */
6798message MediametricsCodecReported {
6799 optional int64 timestamp_nanos = 1;
6800 optional string package_name = 2;
6801 optional int64 package_version_code = 3;
6802 optional int64 media_apex_version = 4;
6803
6804 optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6805}
6806
6807/**
6808 * Track Media Extractor (pulling video/audio streams out of containers) usage
6809 * Logged from:
6810 * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp
6811 * frameworks/av/services/mediaanalytics/statsd_extractor.cpp
6812 */
6813message MediametricsExtractorReported {
6814 optional int64 timestamp_nanos = 1;
6815 optional string package_name = 2;
6816 optional int64 package_version_code = 3;
6817 optional int64 media_apex_version = 4;
6818
6819 optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6820}
6821
6822/**
6823 * Track how we arbitrate between microphone/input requests.
6824 * Logged from
6825 * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
6826 * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp
6827 */
6828message MediametricsAudiopolicyReported {
6829 optional int64 timestamp_nanos = 1;
6830 optional string package_name = 2;
6831 optional int64 package_version_code = 3;
6832 optional int64 media_apex_version = 4;
6833
6834 optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6835}
6836
6837/**
6838 * Track how we arbitrate between microphone requests.
6839 * Logged from
6840 * frameworks/av/media/libaudioclient/AudioRecord.cpp
6841 * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp
6842 */
6843message MediametricsAudiorecordReported {
6844 optional int64 timestamp_nanos = 1;
6845 optional string package_name = 2;
6846 optional int64 package_version_code = 3;
6847 optional int64 media_apex_version = 4;
6848
6849 optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6850}
6851
6852/**
6853 * Track how we arbitrate between microphone/input requests.
6854 * Logged from
6855 * frameworks/av/media/libnblog/ReportPerformance.cpp
6856 * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp
6857 */
6858message MediametricsAudiothreadReported {
6859 optional int64 timestamp_nanos = 1;
6860 optional string package_name = 2;
6861 optional int64 package_version_code = 3;
6862 optional int64 media_apex_version = 4;
6863
6864 optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6865}
6866
6867/**
6868 * Track how we arbitrate between microphone/input requests.
6869 * Logged from
6870 * frameworks/av/media/libaudioclient/AudioTrack.cpp
6871 * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp
6872 */
6873message MediametricsAudiotrackReported {
6874 optional int64 timestamp_nanos = 1;
6875 optional string package_name = 2;
6876 optional int64 package_version_code = 3;
6877 optional int64 media_apex_version = 4;
6878
6879 optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6880}
6881
6882/**
6883 * Track information about DRM framework performance
6884 * Logged from
6885 * frameworks/av/drm/libmediadrm/DrmHal.cpp
6886 * frameworks/av/services/mediaanalytics/statsd_drm.cpp
6887 */
6888message MediametricsMediadrmReported {
6889 optional int64 timestamp_nanos = 1;
6890 optional string package_name = 2;
6891 optional int64 package_version_code = 3;
6892 optional int64 media_apex_version = 4;
6893
6894 // vendor+description tell about which DRM plugin is in use on this device
6895 optional string vendor = 5;
6896 optional string description = 6;
6897 // from frameworks/av/drm/libmediadrm/protos/metrics.proto
6898 optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES];
6899}
6900
6901/**
6902 * Track information about the widevine DRM plugin performance
6903 * Logged from
6904 * vendor/widevine/libwvdrmengine/cdm/metrics
6905 * frameworks/av/services/mediaanalytics/statsd_drm.cpp
6906 */
6907message MediametricsDrmWidevineReported {
6908 optional int64 timestamp_nanos = 1;
6909 optional string package_name = 2;
6910 optional int64 package_version_code = 3;
6911 optional int64 media_apex_version = 4;
6912
6913 optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6914}
6915
6916/**
6917 * Track information about recordings (e.g. camcorder)
6918 * Logged from
6919 * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp
6920 * frameworks/av/services/mediaanalytics/statsd_recorder.cpp
6921 */
6922message MediametricsRecorderReported {
6923 optional int64 timestamp_nanos = 1;
6924 optional string package_name = 2;
6925 optional int64 package_version_code = 3;
6926 optional int64 media_apex_version = 4;
6927
6928 optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6929}
6930
6931/**
6932 * Track Media Player usage
6933 * Logged from:
6934 * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
6935 * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp
6936 */
6937message MediametricsNuPlayerReported {
6938 optional int64 timestamp_nanos = 1;
6939 optional string package_name = 2;
6940 optional int64 package_version_code = 3;
6941 optional int64 media_apex_version = 4;
6942
6943 optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6944}
6945
6946/**
Robert Shiha4beed32019-08-19 14:15:23 -07006947 * Track Legacy DRM usage
6948 * Logged from
6949 * frameworks/av/drm/drmserver/DrmManager.cpp
6950 */
6951message MediametricsDrmManagerReported {
6952 optional int64 timestamp_nanos = 1;
6953 optional string package_name = 2;
6954 optional int64 package_version_code = 3;
6955 optional int64 media_apex_version = 4;
6956
6957 enum Method {
6958 METHOD_NOT_FOUND = -1;
6959 GET_CONSTRAINTS = 0;
6960 GET_METADATA = 1;
6961 CAN_HANDLE = 2;
6962 PROCESS_DRM_INFO = 3;
6963 ACQUIRE_DRM_INFO = 4;
6964 SAVE_RIGHTS = 5;
6965 GET_ORIGINAL_MIME_TYPE = 6;
6966 GET_DRM_OBJECT_TYPE = 7;
6967 CHECK_RIGHTS_STATUS = 8;
6968 REMOVE_RIGHTS = 9;
6969 REMOVE_ALL_RIGHTS = 10;
6970 OPEN_CONVERT_SESSION = 11;
6971 OPEN_DECRYPT_SESSION = 12;
6972 }
6973
6974 // plugin_id+description inform which Legacy DRM plugins are still in use on device
6975 optional string plugin_id = 5;
6976 optional string description = 6;
6977 optional Method method = 7;
6978 optional string mime_types = 8;
6979}
6980
6981/**
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006982 * State of a dangerous permission requested by a package
Stanislav Zholninccb82e42019-11-29 18:59:49 +00006983 * Pulled from: StatsCompanionService
6984*/
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006985message DangerousPermissionState {
6986 // Name of the permission
6987 optional string permission_name = 1;
6988
6989 // Uid of the package
6990 optional int32 uid = 2 [(is_uid) = true];
6991
6992 // Package requesting the permission
6993 optional string package_name = 3;
6994
6995 // If the permission is granted to the uid
6996 optional bool is_granted = 4;
Stanislav Zholnin75c3fd12019-05-21 13:10:51 +01006997
6998 // Permission flags as per android.content.pm.PermissionFlags
6999 optional int32 permission_flags = 5;
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08007000}
7001
Michael Groover4a0ca942019-01-24 17:41:25 -08007002/**
7003 * Logs when a package is denied access to a device identifier based on the new access requirements.
7004 *
7005 * Logged from:
7006 * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
7007 */
7008message DeviceIdentifierAccessDenied {
7009 // The name of the package denied access to the requested device identifier.
7010 optional string package_name = 1;
7011
7012 // The name of the device identifier method the package attempted to invoke.
7013 optional string method_name = 2;
7014
7015 // True if the package is preinstalled.
Meng Wange8953ae2020-01-29 10:38:58 -08007016 // Starting from Android 11, this boolean is not set and will always be false.
7017 optional bool is_preinstalled = 3 [deprecated = true];
Michael Groover4a0ca942019-01-24 17:41:25 -08007018
7019 // True if the package is privileged.
Sooraj Sasindran22b53f42019-11-27 15:57:33 -08007020 // Starting from Android 11, this boolean is not set and will always be false.
7021 optional bool is_priv_app = 4 [deprecated = true];
Michael Groover4a0ca942019-01-24 17:41:25 -08007022}
Chenjie Yue13f44a2019-02-07 17:51:38 -08007023
7024/**
Chenjie Yue13f44a2019-02-07 17:51:38 -08007025 * Pulls the ongoing mainline install train version code.
7026 * Pulled from StatsCompanionService
7027 */
7028message TrainInfo {
7029 optional int64 train_version_code = 1;
7030
7031 optional TrainExperimentIds train_experiment_id = 2;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08007032
7033 optional string train_name = 3;
7034
7035 enum Status {
7036 UNKNOWN = 0;
7037 INSTALL_REQUESTED = 1;
7038 INSTALL_STARTED = 2;
7039 INSTALL_STAGED_NOT_READY = 3;
7040 INSTALL_STAGED_READY = 4;
7041 INSTALL_SUCCESS = 5;
Tej Singh403fe472019-04-30 12:54:21 -07007042 // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
7043 // and INSTALL_FAILURE_COMMIT.
7044 INSTALL_FAILURE = 6 [deprecated = true];
7045 // This enum is for installs that are manually cancelled via the Manual Update UI.
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08007046 INSTALL_CANCELLED = 7;
7047 INSTALLER_ROLLBACK_REQUESTED = 8;
7048 INSTALLER_ROLLBACK_INITIATED = 9;
7049 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
7050 INSTALLER_ROLLBACK_STAGED = 11;
7051 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
7052 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
7053 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
7054 INSTALLER_ROLLBACK_SUCCESS = 15;
7055 INSTALLER_ROLLBACK_FAILURE = 16;
Howard Ro174ed562019-04-07 22:17:58 -07007056 INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
7057 INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
7058 INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
7059 INSTALL_STAGED_CANCEL_REQUESTED = 20;
7060 INSTALL_STAGED_CANCEL_SUCCESS = 21;
7061 INSTALL_STAGED_CANCEL_FAILURE = 22;
Tej Singh403fe472019-04-30 12:54:21 -07007062 INSTALL_FAILURE_DOWNLOAD = 23;
7063 INSTALL_FAILURE_STATE_MISMATCH = 24;
7064 INSTALL_FAILURE_COMMIT = 25;
Jonathan Nguyen5886a712020-01-16 10:34:21 -08007065 REBOOT_TRIGGERED = 26;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08007066 }
7067 optional Status status = 4;
Chenjie Yue13f44a2019-02-07 17:51:38 -08007068}
joshmccloskey8c3322e2019-01-09 18:25:57 -08007069
7070/**
7071 * Logs the gesture stage changed event.
7072 *
7073 * Logged from:
7074 * frameworks/base/packages/SystemUI/
7075 */
7076message AssistGestureStageReported {
joshmccloskey99f39012019-02-20 14:45:08 -08007077 optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08007078}
7079
7080/**
7081 * Logs the feedback type.
7082 *
7083 * Logged from:
7084 * frameworks/base/packages/SystemUI/
7085 */
7086message AssistGestureFeedbackReported {
joshmccloskey99f39012019-02-20 14:45:08 -08007087 // Whether or not the gesture was used.
7088 optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08007089}
7090
7091/**
7092 * Logs the progress.
7093 *
7094 * Logged from:
7095 * frameworks/base/packages/SystemUI/
7096 */
7097message AssistGestureProgressReported {
joshmccloskey99f39012019-02-20 14:45:08 -08007098 // [0,100] progress for the assist gesture.
7099 optional int32 progress = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08007100}
Neil Fullerdb14b482019-02-05 19:44:44 +00007101
7102/*
7103 * Information about the time zone data on a device.
7104 */
7105message TimeZoneDataInfo {
7106 // A version identifier for the data set on device. e.g. "2018i"
7107 optional string tzdb_version = 1;
7108}
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007109
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007110/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007111 * Logs the GPU stats global health information.
7112 *
7113 * Logged from:
7114 * frameworks/native/services/gpuservice/gpustats/
7115 */
7116message GpuStatsGlobalInfo {
7117 // Package name of the gpu driver.
7118 optional string driver_package_name = 1;
7119
7120 // Version name of the gpu driver.
7121 optional string driver_version_name = 2;
7122
7123 // Version code of the gpu driver.
7124 optional int64 driver_version_code = 3;
7125
7126 // Build time of the gpu driver in UTC as seconds since January 1, 1970.
7127 optional int64 driver_build_time = 4;
7128
7129 // Total count of the gl driver gets loaded.
7130 optional int64 gl_loading_count = 5;
7131
7132 // Total count of the gl driver fails to be loaded.
7133 optional int64 gl_loading_failure_count = 6;
7134
7135 // Total count of the Vulkan driver gets loaded.
7136 optional int64 vk_loading_count = 7;
7137
7138 // Total count of the Vulkan driver fails to be loaded.
7139 optional int64 vk_loading_failure_count = 8;
Yiwei Zhang63852d2a2019-05-06 19:31:20 -07007140
7141 // Api version of the system Vulkan driver.
7142 optional int32 vulkan_version = 9;
7143
7144 // Api version of the system CPU Vulkan driver.
7145 optional int32 cpu_vulkan_version = 10;
7146
7147 // Api version of the system GLES driver.
7148 optional int32 gles_version = 11;
Yiwei Zhanga0f5fef2019-05-08 16:30:47 -07007149
7150 // Total count of the angle driver gets loaded.
7151 optional int64 angle_loading_count = 12;
7152
7153 // Total count of the angle driver fails to be loaded.
7154 optional int64 angle_loading_failure_count = 13;
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007155}
7156
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007157/**
7158 * GPU driver loading time info.
7159 */
7160message GpuDriverLoadingTime {
7161 // List of all the driver loading times for this app. The list size is
7162 // capped at 50.
7163 repeated int64 driver_loading_time = 1;
7164}
7165
7166/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007167 * Logs the GPU stats per app health information.
7168 *
7169 * Logged from:
7170 * frameworks/native/services/gpuservice/gpustats/
7171 */
7172message GpuStatsAppInfo {
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007173 // Package name of the application that loads the gpu driver. Total number
7174 // of different packages is capped at 100.
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007175 optional string app_package_name = 1;
7176
7177 // Version code of the gpu driver this app loads.
7178 optional int64 driver_version_code = 2;
7179
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007180 // gl driver loading time info.
7181 optional GpuDriverLoadingTime gl_driver_loading_time = 3
7182 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007183
Yiwei Zhang4fb92892019-03-04 14:29:25 -08007184 // Vulkan driver loading time info.
7185 optional GpuDriverLoadingTime vk_driver_loading_time = 4
7186 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhanga0f5fef2019-05-08 16:30:47 -07007187
7188 // Angle driver loading time info.
7189 optional GpuDriverLoadingTime angle_driver_loading_time = 5
7190 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang7c709302019-05-09 15:00:46 -07007191
7192 // CPU Vulkan implementation is in use.
7193 optional bool cpu_vulkan_in_use = 6;
Yiwei Zhanga7638612019-07-03 17:34:12 -07007194
7195 // App is not doing pre-rotation correctly.
7196 optional bool false_prerotation = 7;
Yiwei Zhangf02cf6b2019-12-20 14:51:07 -08007197
7198 // App creates GLESv1 context.
7199 optional bool gles_1_in_use = 8;
Yiwei Zhang5c81b632019-03-01 15:39:46 -08007200}
Rafal Slawikd4e87572019-03-12 13:08:38 +00007201
7202/*
7203 * Logs the size of the system ion heap.
7204 *
7205 * Pulled from StatsCompanionService.
7206 */
7207message SystemIonHeapSize {
Rafal Slawikbdd5a502020-01-14 14:14:29 +00007208 // Deprecated due to limited support of ion stats in debugfs.
7209 // Use `IonHeapSize` instead.
7210 option deprecated = true;
7211
Rafal Slawikd4e87572019-03-12 13:08:38 +00007212 // Size of the system ion heap in bytes.
Rafal Slawikbdd5a502020-01-14 14:14:29 +00007213 // Read from debugfs.
Rafal Slawikd4e87572019-03-12 13:08:38 +00007214 optional int64 size_in_bytes = 1;
7215}
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08007216
Rafal Slawik77987ed2019-06-17 12:28:23 +01007217/*
Rafal Slawikbdd5a502020-01-14 14:14:29 +00007218 * Logs the total size of the ion heap.
7219 *
7220 * Pulled from StatsCompanionService.
7221 */
7222message IonHeapSize {
7223 // Total size of all ion heaps in kilobytes.
7224 // Read from: /sys/kernel/ion/total_heaps_kb.
7225 optional int32 total_size_kb = 1;
7226}
7227
7228/*
Rafal Slawik77987ed2019-06-17 12:28:23 +01007229 * Logs the per-process size of the system ion heap.
7230 *
7231 * Pulled from StatsCompanionService.
7232 */
7233message ProcessSystemIonHeapSize {
7234 // The uid if available. -1 means not available.
7235 optional int32 uid = 1 [(is_uid) = true];
7236
7237 // The process name (from /proc/PID/cmdline).
7238 optional string process_name = 2;
7239
7240 // Sum of sizes of all allocations.
7241 optional int32 total_size_in_kilobytes = 3;
7242
7243 // Number of allocations.
7244 optional int32 allocation_count = 4;
7245
7246 // Size of the largest allocation.
7247 optional int32 max_size_in_kilobytes = 5;
7248}
7249
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08007250/**
7251 * Push network stack events.
7252 *
7253 * Log from:
7254 * frameworks/base/packages/NetworkStack/
7255 */
7256message NetworkStackReported {
Chiachang Wang729d2672019-03-27 17:33:52 +08007257 // The id that indicates the event reported from NetworkStack.
7258 optional int32 event_id = 1;
7259 // The data for the reported events.
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08007260 optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES];
7261}
Carmen Agimofa769c152019-03-04 14:39:14 +00007262
7263/**
7264 * Logs the apps that are installed on the external storage.
7265 * Pulled from:
7266 * StatsCompanionService
7267 */
7268message AppsOnExternalStorageInfo {
7269 // The type of the external storage.
7270 optional android.stats.storage.ExternalStorageType external_storage_type = 1;
7271 // The name of the package that is installed on the external storage.
7272 optional string package_name = 2;
7273}
joshmccloskey34c1f8e2019-04-11 14:06:43 -07007274
7275/**
7276 * Logs the settings related to Face.
7277 * Logged from:
7278 * frameworks/base/services/core/java/com/android/server/stats
7279 */
7280message FaceSettings {
7281 // Whether or not face unlock is allowed on Keyguard.
7282 optional bool unlock_keyguard_enabled = 1;
7283 // Whether or not face unlock dismisses the Keyguard.
7284 optional bool unlock_dismisses_keyguard = 2;
7285 // Whether or not face unlock requires attention.
7286 optional bool unlock_attention_required = 3;
7287 // Whether or not face unlock is allowed for apps (through BiometricPrompt).
7288 optional bool unlock_app_enabled = 4;
7289 // Whether or not face unlock always requires user confirmation.
7290 optional bool unlock_always_require_confirmation = 5;
7291 // Whether or not a diverse set of poses are required during enrollment.
7292 optional bool unlock_diversity_required = 6;
7293}
Maggie White442b6312019-04-05 16:26:44 -07007294
7295/**
7296 * Logs cooling devices maintained by the kernel.
7297 *
7298 * Pulled from StatsCompanionService.java
7299 */
7300message CoolingDevice {
7301 // The type of cooling device being reported. Eg. CPU, GPU...
7302 optional android.os.CoolingTypeEnum device_location = 1;
7303 // The name of the cooling device source. Eg. CPU0
7304 optional string device_name = 2;
7305 // Current throttle state of the cooling device. The value can any unsigned
7306 // integer between 0 and max_state defined in its driver. 0 means device is
7307 // not in throttling, higher value means deeper throttling.
7308 optional int32 state = 3;
7309}
Ben Blount763a5d52019-04-10 11:48:58 -07007310
7311/**
7312 * Intelligence has several counter-type events that don't warrant a
7313 * full separate atom. These are primarily API call counters but also include
7314 * counters for feature usage and specific failure modes.
7315 *
7316 * Logged from the Intelligence mainline module.
7317 */
7318message IntelligenceEventReported {
Ben Blount3658fa72019-04-22 17:31:40 -07007319 // The event type.
Ben Blount763a5d52019-04-10 11:48:58 -07007320 optional android.stats.intelligence.EventType event_id = 1;
Ben Blount3658fa72019-04-22 17:31:40 -07007321 // Success, failure.
Ben Blount763a5d52019-04-10 11:48:58 -07007322 optional android.stats.intelligence.Status status = 2;
Ben Blount3658fa72019-04-22 17:31:40 -07007323 // How many times the event occured (to report a batch of high frequency events).
7324 optional int32 count = 3;
Ben Blounte3223f3d2019-05-02 22:49:03 -07007325 // How long the event took (sum of durations if count > 1)
Ben Blount3658fa72019-04-22 17:31:40 -07007326 optional int64 duration_millis = 4;
Ben Blount763a5d52019-04-10 11:48:58 -07007327}
Andrew T Nguyenee615d62019-05-01 14:40:19 -07007328
7329/**
Yuncheol Heod1a85d22019-05-08 17:13:42 -07007330 * Logs when Car Power state changed.
7331 *
7332 * Logged from:
7333 * packages/services/Car/service/src/com/android/car/CarStatsLog.java
7334 */
7335message CarPowerStateChanged {
7336 // States come from CpmsState in CarPowerManagementService.java.
7337 enum State {
7338 WAIT_FOR_VHAL = 0;
7339 ON = 1;
7340 SHUTDOWN_PREPARE = 2;
7341 WAIT_FOR_FINISH = 3;
7342 SUSPEND = 4;
7343 SIMULATE_SLEEP = 5;
7344 }
7345 optional State state = 1;
7346}
7347
7348/**
7349 * Logs whether GarageMode is entered.
7350 *
7351 * Logged from:
7352 * packages/services/Car/service/src/com/android/car/CarStatsLog.java
7353 */
7354message GarageModeInfo {
7355 // Whether GarageMode is entered.
7356 optional bool is_garage_mode = 1;
7357}
Martijn Coenencd95d462019-04-25 17:09:45 +02007358
7359/**
7360 * Historical app ops data per package.
7361 */
7362message AppOps {
7363 // Uid of the package requesting the op
7364 optional int32 uid = 1 [(is_uid) = true];
7365
Stanislav Zholnin606454c2019-11-27 15:31:49 +00007366 // Name of the package performing the op
Martijn Coenencd95d462019-04-25 17:09:45 +02007367 optional string package_name = 2;
7368
7369 // operation id; maps to the OP_* constants in AppOpsManager.java
7370 optional int32 op_id = 3;
7371
7372 // The number of times the op was granted while the app was in the
7373 // foreground (only for trusted requests)
7374 optional int64 trusted_foreground_granted_count = 4;
7375
7376 // The number of times the op was granted while the app was in the
7377 // background (only for trusted requests)
7378 optional int64 trusted_background_granted_count = 5;
7379
7380 // The number of times the op was rejected while the app was in the
7381 // foreground (only for trusted requests)
7382 optional int64 trusted_foreground_rejected_count = 6;
7383
7384 // The number of times the op was rejected while the app was in the
7385 // background (only for trusted requests)
7386 optional int64 trusted_background_rejected_count = 7;
7387
7388 // For long-running operations, total duration of the operation
7389 // while the app was in the foreground (only for trusted requests)
7390 optional int64 trusted_foreground_duration_millis = 8;
7391
7392 // For long-running operations, total duration of the operation
7393 // while the app was in the background (only for trusted requests)
7394 optional int64 trusted_background_duration_millis = 9;
Stanislav Zholnin42d710e2019-11-28 13:11:54 +00007395
7396 // Whether AppOps is guarded by Runtime permission
7397 optional bool is_runtime_permission = 10;
Martijn Coenencd95d462019-04-25 17:09:45 +02007398}
Hongyi Zhang700137e2019-05-23 21:19:36 -07007399
7400/**
7401 * Location Manager API Usage information(e.g. API under usage,
7402 * API call's parameters).
7403 * Logged from:
7404 * frameworks/base/services/core/java/com/android/server/LocationManagerService.java
7405 */
7406message LocationManagerApiUsageReported {
7407
7408 // Indicating if usage starts or usage ends.
7409 optional android.stats.location.UsageState state = 1;
7410
7411 // LocationManagerService's API in use.
7412 // We can identify which API from LocationManager is
7413 // invoking current LMS API by the combination of
7414 // API parameter(e.g. is_listener_null, is_intent_null,
7415 // is_location_request_null)
7416 optional android.stats.location.LocationManagerServiceApi api_in_use = 2;
7417
7418 // Name of the package calling the API.
7419 optional string calling_package_name = 3;
7420
7421 // Type of the location provider.
7422 optional android.stats.location.ProviderType provider = 4;
7423
7424 // Quality of the location request
7425 optional android.stats.location.LocationRequestQuality quality = 5;
7426
7427 // The desired interval for active location updates, in milliseconds.
7428 // Bucketized to reduce cardinality.
7429 optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6;
7430
7431 // Minimum distance between location updates, in meters.
7432 // Bucketized to reduce cardinality.
7433 optional android.stats.location.SmallestDisplacementBucket
7434 bucketized_smallest_displacement = 7;
7435
7436 // The number of location updates.
7437 optional int64 num_updates = 8;
7438
7439 // The request expiration time, in millisecond since boot.
7440 // Bucketized to reduce cardinality.
7441 optional android.stats.location.ExpirationBucket
7442 bucketized_expire_in = 9;
7443
7444 // Type of Callback passed in for this API.
7445 optional android.stats.location.CallbackType callback_type = 10;
7446
7447 // The radius of the central point of the alert
7448 // region, in meters. Only for API REQUEST_GEOFENCE.
7449 // Bucketized to reduce cardinality.
7450 optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11;
7451
7452 // Activity Importance of API caller.
7453 // Categorized to 3 types that are interesting from location's perspective.
7454 optional android.stats.location.ActivityImportance activiy_importance = 12;
7455}
Stanislav Zholnin3d215df12019-06-05 16:48:20 +01007456
7457/**
7458 * Information about a permission grant or denial made by user inside ReviewPermissionsFragment
7459 */
7460message ReviewPermissionsFragmentResultReported {
7461 // unique value identifying a permission group change. A permission group change might result
7462 // in multiple of these atoms
7463 optional int64 change_id = 1;
7464
7465 // UID of package the permission belongs to
7466 optional int32 uid = 2 [(is_uid) = true];
7467
7468 // Name of package the permission belongs to
7469 optional string package_name = 3;
7470
7471 // The permission to be granted
7472 optional string permission_name = 4;
7473
7474 // The result of the permission grant
7475 optional bool permission_granted = 5;
7476}
Stanislav Zholnin247d1b72019-06-06 21:28:44 +01007477
7478/**
7479* Information about results of permission upgrade by RuntimePermissionsUpgradeController
7480* Logged from: RuntimePermissionUpdgradeController
7481*/
7482message RuntimePermissionsUpgradeResult {
7483 // Permission granted as result of upgrade
7484 optional string permission_name = 1;
7485
7486 // UID of package granted permission
7487 optional int32 uid = 2 [(is_uid) = true];
7488
7489 // Name of package granted permission
7490 optional string package_name = 3;
Stanislav Zholninbdf620b2019-06-06 22:38:33 +01007491}
7492
7493/**
7494* Information about a buttons presented in GrantPermissionsActivty and choice made by user
7495*/
7496message GrantPermissionsActivityButtonActions {
7497 // Permission granted as result of upgrade
7498 optional string permission_group_name = 1;
7499
7500 // UID of package granted permission
7501 optional int32 uid = 2 [(is_uid) = true];
7502
7503 // Name of package requesting permission
7504 optional string package_name = 3;
7505
7506 // Buttons presented in the dialog - bit flags, bit numbers are in accordance with
7507 // LABEL_ constants in GrantPermissionActivity.java
7508 optional int32 buttons_presented = 4;
7509
7510 // Button clicked by user - same as bit flags in buttons_presented with only single bit set
7511 optional int32 button_clicked = 5;
Evan Severson5dfc0912020-02-06 14:50:23 -08007512
7513 // id which identifies single session of user interacting with permission controller
7514 optional int64 session_id = 6;
Stanislav Zholninbdf620b2019-06-06 22:38:33 +01007515}
Stanislav Zholnin375e2ab2019-05-29 13:07:35 +01007516
7517/**
7518 * Information about LocationAccessCheck notification presented to user
7519 */
7520message LocationAccessCheckNotificationAction {
7521
7522 // id which identifies single session of user interacting with permission controller
7523 optional int64 session_id = 1;
7524
7525 // Uid of package for which location access check is presented
7526 optional int32 package_uid = 2;
7527
7528 // Name of package for which location access check is presented
7529 optional string package_name = 3;
7530
7531 enum Result {
7532 UNDEFINED = 0;
7533 // notification was presented to the user
7534 NOTIFICATION_PRESENTED = 1;
7535 // notification was declined by the user
7536 NOTIFICATION_DECLINED = 2;
7537 // notification was clicked by the user
7538 NOTIFICATION_CLICKED = 3;
7539 }
7540
7541 // View / interaction recorded
7542 optional Result result = 4;
7543}
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +01007544
7545/**
7546 * Information about a permission grant or revoke made by user inside AppPermissionFragment
7547 */
7548message AppPermissionFragmentActionReported {
7549 // id which identifies single session of user interacting with permission controller
7550 optional int64 session_id = 1;
7551
7552 // unique value identifying a permission group change. A permission group change might result
7553 // in multiple of these atoms
7554 optional int64 change_id = 2;
7555
7556 // UID of package the permission belongs to
7557 optional int32 uid = 3 [(is_uid) = true];
7558
7559 // Name of package the permission belongs to
7560 optional string package_name = 4;
7561
7562 // The permission to be granted
7563 optional string permission_name = 5;
7564
7565 // The result of the permission grant
7566 optional bool permission_granted = 6;
Stanislav Zholnin126da0c2020-01-28 16:50:43 +00007567
7568 // State of Permission Flags after grant as per android.content.pm.PermissionFlags
7569 optional int32 permission_flags = 7;
7570
7571 enum Button {
7572 UNDEFINED = 0;
7573 // Allow button
7574 ALLOW = 1;
7575 // Deny button
7576 DENY = 2;
7577 // Ask every time button
7578 ASK_EVERY_TIME = 3;
7579 // Allow all the time button
7580 ALLOW_ALWAYS = 4;
7581 // Allow only while using the app button
7582 ALLOW_FOREGROUND = 5;
7583 // Same is Deny button but shown in while in use dialog
7584 DENY_FOREGROUND = 6;
7585 }
7586
7587 // Button pressed in the dialog
7588 optional Button button_pressed = 8;
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +01007589}
Stanislav Zholninc9dda9e2019-06-02 20:50:13 +01007590
7591/**
7592* Information about a AppPermissionFragment viewed by user
7593*/
7594message AppPermissionFragmentViewed {
7595 // id which identifies single session of user interacting with permission controller
7596 optional int64 session_id = 1;
7597
7598 // UID of package for which permissions are viewed
7599 optional int32 uid = 2 [(is_uid) = true];
7600
7601 // Name of package for which permissions are viewed
7602 optional string package_name = 3;
7603
7604 // Permission group viewed
7605 optional string permission_group_name = 4;
7606}
Stanislav Zholnindc3e2b32019-06-06 18:10:14 +01007607
7608/**
7609* Information about a AppPermissionsFragment viewed by user
7610*/
7611message AppPermissionsFragmentViewed {
7612 // id which identifies single session of user interacting with permission controller
7613 optional int64 session_id = 1;
7614
7615 // id which identifies single view as every view might have several logging records
7616 // with different package information attached
7617 optional int64 view_id = 2;
7618
7619 // Permission group viewed
7620 optional string permission_group_name = 3;
7621
7622 // UID of package for which permissions are viewed
7623 optional int32 uid = 4 [(is_uid) = true];
7624
7625 // Name of package for which permissions are viewed
7626 optional string package_name = 5;
7627
7628 // Category in which permission is included
7629 enum Category {
7630 UNDEFINED = 0;
7631 ALLOWED = 1;
7632 ALLOWED_FOREGROUND = 2;
7633 DENIED = 3;
7634 }
7635 optional Category category = 6;
7636}
Stanislav Zholnin32a89c12019-06-04 14:59:21 +01007637
7638/**
7639* Information about a PermissionAppsFragment viewed by user.
7640* Logged from ui/handheld/PermissionAppsFragment.java
7641*/
7642message PermissionAppsFragmentViewed {
7643 // id which identifies single session of user interacting with permission controller
7644 optional int64 session_id = 1;
7645
7646 // id which identifies single view as every view might have several logging records
7647 // with different package information attached
7648 optional int64 view_id = 2;
7649
7650 // Permission group viewed
7651 optional string permission_group_name = 3;
7652
7653 // UID of package for which permissions are viewed
7654 optional int32 uid = 4 [(is_uid) = true];
7655
7656 // Name of package for which permissions are viewed
7657 optional string package_name = 5;
7658
7659 // Category in which app is included
7660 enum Category {
7661 UNDEFINED = 0;
7662 ALLOWED = 1;
7663 ALLOWED_FOREGROUND = 2;
7664 DENIED = 3;
7665 }
7666 optional Category category = 6;
7667}
Tony Make2b1b672019-07-29 16:59:47 +01007668
7669/**
7670 * Logs when there is a smart selection related event.
7671 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7672 * Logged from: TextClassifierEventLogger.java
7673 */
7674message TextSelectionEvent {
7675 // A session ID.
7676 optional string session_id = 1;
7677
7678 // Event type of this event.
7679 optional android.stats.textclassifier.EventType event_type = 2;
7680
Tony Mak9c84bd22019-12-09 07:27:25 +00007681 // Name of the annotator model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007682 optional string model_name = 3;
7683
7684 // Type of widget that was involved in triggering this event.
7685 optional android.stats.textclassifier.WidgetType widget_type = 4;
7686
7687 // Index of this event in a session.
7688 optional int32 event_index = 5;
7689
7690 // Entity type that is involved.
7691 optional string entity_type = 6;
7692
7693 // Relative word index of the start of the selection.
7694 optional int32 relative_word_start_index = 7;
7695
7696 // Relative word (exclusive) index of the end of the selection.
7697 optional int32 relative_word_end_index = 8;
7698
7699 // Relative word index of the start of the smart selection.
7700 optional int32 relative_suggested_word_start_index = 9;
7701
7702 // Relative word (exclusive) index of the end of the smart selection.
7703 optional int32 relative_suggested_word_end_index = 10;
Tony Mak98b59f02019-08-07 11:50:58 +01007704
7705 // Name of source package.
7706 optional string package_name = 11;
Tony Make2b1b672019-07-29 16:59:47 +01007707}
7708
7709/**
7710 * Logs when there is a smart linkify related event.
7711 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7712 * Logged from: TextClassifierEventLogger.java
7713 */
7714message TextLinkifyEvent {
7715 // A session ID.
7716 optional string session_id = 1;
7717
7718 // Event type of this event.
7719 optional android.stats.textclassifier.EventType event_type = 2;
7720
Tony Mak9c84bd22019-12-09 07:27:25 +00007721 // Name of the annotator model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007722 optional string model_name = 3;
7723
7724 // Type of widget that was involved in triggering this event.
7725 optional android.stats.textclassifier.WidgetType widget_type = 4;
7726
7727 // Index of this event in a session.
7728 optional int32 event_index = 5;
7729
7730 // Entity type that is involved.
7731 optional string entity_type = 6;
7732
7733 // Number of links detected.
7734 optional int32 num_links = 7;
7735
7736 // The total length of all links.
7737 optional int32 linked_text_length = 8;
7738
7739 // Length of input text.
7740 optional int32 text_length = 9;
7741
7742 // Time spent on generating links in ms.
7743 optional int64 latency_millis = 10;
Tony Mak98b59f02019-08-07 11:50:58 +01007744
7745 // Name of source package.
7746 optional string package_name = 11;
Tony Make2b1b672019-07-29 16:59:47 +01007747}
7748
7749/**
7750 * Logs when there is a conversation actions related event.
7751 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7752 * Logged from: TextClassifierEventLogger.java
7753 */
7754message ConversationActionsEvent {
7755 // A session ID.
7756 optional string session_id = 1;
7757
7758 // Event type of this event.
7759 optional android.stats.textclassifier.EventType event_type = 2;
7760
Tony Mak9c84bd22019-12-09 07:27:25 +00007761 // Name of the actions model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007762 optional string model_name = 3;
7763
7764 // Type of widget that was involved in triggering this event.
7765 optional android.stats.textclassifier.WidgetType widget_type = 4;
7766
7767 // The first entity type that is involved.
7768 optional string first_entity_type = 5;
7769
7770 // The second entity type that is involved.
7771 optional string second_entity_type = 6;
7772
7773 // The third entity type that is involved.
7774 optional string third_entity_type = 7;
7775
7776 // The score of the first entity type.
7777 optional float score = 8;
Tony Mak98b59f02019-08-07 11:50:58 +01007778
7779 // Name of source package.
7780 optional string package_name = 9;
Tony Mak9c84bd22019-12-09 07:27:25 +00007781
7782 // Name of the annotator model that is involved in this event.
7783 optional string annotator_model_name = 10;
Tony Make2b1b672019-07-29 16:59:47 +01007784}
7785
7786/**
7787 * Logs when there is a language detection related event.
7788 * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
7789 * Logged from: TextClassifierEventLogger.java
7790 */
7791message LanguageDetectionEvent {
7792 // A session ID.
7793 optional string session_id = 1;
7794
7795 // Event type of this event.
7796 optional android.stats.textclassifier.EventType event_type = 2;
7797
Tony Mak9c84bd22019-12-09 07:27:25 +00007798 // Name of the language detection model that is involved in this event.
Tony Make2b1b672019-07-29 16:59:47 +01007799 optional string model_name = 3;
7800
7801 // Type of widget that was involved in triggering this event.
7802 optional android.stats.textclassifier.WidgetType widget_type = 4;
7803
7804 // Detected language.
7805 optional string language_tag = 5;
7806
7807 // Score of the detected language.
7808 optional float score = 6;
7809
7810 // Position of this action.
7811 optional int32 action_index = 7;
Tony Mak98b59f02019-08-07 11:50:58 +01007812
7813 // Name of source package.
7814 optional string package_name = 8;
Tony Make2b1b672019-07-29 16:59:47 +01007815}
Tianjie Xu167c3db2019-07-22 14:25:14 -07007816
7817/**
7818 * Information about an OTA update attempt by update_engine.
7819 * Logged from platform/system/update_engine/metrics_reporter_android.cc
7820 */
7821message UpdateEngineUpdateAttemptReported {
7822 // The number of attempts for the update engine to apply a given payload.
7823 optional int32 attempt_number = 1;
7824
7825 optional android.stats.otaupdate.PayloadType payload_type = 2;
7826
7827 // The total time in minutes for the update engine to apply a given payload.
7828 // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and
7829 // it's increased when the system is sleeping.
7830 optional int32 duration_boottime_in_minutes = 3;
7831
7832 // The total time in minutes for the update engine to apply a given payload.
7833 // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW;
7834 // and it's not increased when the system is sleeping.
7835 optional int32 duration_monotonic_in_minutes = 4;
7836
7837 // The size of the payload in MiBs.
7838 optional int32 payload_size_mib = 5;
7839
7840 // The attempt result reported by the update engine for an OTA update.
7841 optional android.stats.otaupdate.AttemptResult attempt_result = 6;
7842
7843 // The error code reported by the update engine after an OTA update attempt
7844 // on A/B devices.
7845 optional android.stats.otaupdate.ErrorCode error_code = 7;
7846
7847 // The build fingerprint of the source system. The value is read from a
7848 // system property when the device takes the update. e.g.
7849 // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys
7850 optional string source_fingerprint = 8;
7851}
7852
7853/**
7854 * Information about all the attempts the device make before finishing the
7855 * successful update.
7856 * Logged from platform/system/update_engine/metrics_reporter_android.cc
7857 */
7858message UpdateEngineSuccessfulUpdateReported {
7859 // The number of attempts for the update engine to apply the payload for a
7860 // successful update.
7861 optional int32 attempt_count = 1;
7862
7863 optional android.stats.otaupdate.PayloadType payload_type = 2;
7864
7865 optional int32 payload_size_mib = 3;
7866
7867 // The total number of bytes downloaded by update_engine since the last
7868 // successful update.
7869 optional int32 total_bytes_downloaded_mib = 4;
7870
7871 // The ratio in percentage of the over-downloaded bytes compared to the
7872 // total bytes needed to successfully install the update. e.g. 200 if we
7873 // download 200MiB in total for a 100MiB package.
7874 optional int32 download_overhead_percentage = 5;
7875
7876 // The total time in minutes for the update engine to apply the payload for a
7877 // successful update.
7878 optional int32 total_duration_minutes = 6;
7879
7880 // The number of reboot of the device during a successful update.
7881 optional int32 reboot_count = 7;
7882}
Alec Mourie088e762019-07-02 13:10:55 -07007883
7884/**
Kenny Root4eacaaa2020-01-08 20:48:13 -08007885 * Reported when the RebootEscrow HAL has attempted to recover the escrowed
7886 * key to indicate whether it was successful or not.
7887 *
7888 * Logged from:
7889 * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
7890 */
7891message RebootEscrowRecoveryReported {
7892 optional bool successful = 1;
7893}
7894
7895/**
Alec Mourie088e762019-07-02 13:10:55 -07007896 * Global display pipeline metrics reported by SurfaceFlinger.
7897 * Pulled from:
7898 * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
7899 */
7900message SurfaceflingerStatsGlobalInfo {
7901 // Total number of frames presented during the tracing period
7902 optional int64 total_frames = 1;
7903 // Total number of frames missed
7904 optional int64 missed_frames = 2;
7905 // Total number of frames that fell back to client composition
7906 optional int64 client_composition_frames = 3;
7907 // Total time the display was turned on
7908 optional int64 display_on_millis = 4;
7909 // Total time that was spent performing animations.
7910 // This is derived from the present-to-present layer histogram
7911 optional int64 animation_millis = 5;
7912}
7913
7914/**
7915 * Per-layer display pipeline metrics reported by SurfaceFlinger.
7916 * The number of layers uploaded will be restricted due to size limitations.
7917 * Pulled from:
7918 * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp
7919 */
7920message SurfaceflingerStatsLayerInfo {
7921 // The layer for this set of metrics
7922 // For now we can infer that the package name is included in the layer
7923 // name.
7924 optional string layer_name = 1;
7925 // Total number of frames presented
7926 optional int64 total_frames = 2;
7927 // Total number of dropped frames while latching a buffer for this layer.
7928 optional int64 dropped_frames = 3;
7929 // Set of timings measured between successive presentation timestamps.
7930 optional FrameTimingHistogram present_to_present = 4
7931 [(android.os.statsd.log_mode) = MODE_BYTES];
7932 // Set of timings measured from when an app queued a buffer for
7933 // presentation, until the buffer was actually presented to the
7934 // display.
7935 optional FrameTimingHistogram post_to_present = 5
7936 [(android.os.statsd.log_mode) = MODE_BYTES];
7937 // Set of timings measured from when a buffer is ready to be presented,
7938 // until the buffer was actually presented to the display.
7939 optional FrameTimingHistogram acquire_to_present = 6
7940 [(android.os.statsd.log_mode) = MODE_BYTES];
7941 // Set of timings measured from when a buffer was latched by
7942 // SurfaceFlinger, until the buffer was presented to the display
7943 optional FrameTimingHistogram latch_to_present = 7
7944 [(android.os.statsd.log_mode) = MODE_BYTES];
7945 // Set of timings measured from the desired presentation to the actual
7946 // presentation time
7947 optional FrameTimingHistogram desired_to_present = 8
7948 [(android.os.statsd.log_mode) = MODE_BYTES];
7949 // Set of timings measured from when an app queued a buffer for
7950 // presentation, until the buffer was ready to be presented.
7951 optional FrameTimingHistogram post_to_acquire = 9
7952 [(android.os.statsd.log_mode) = MODE_BYTES];
7953}
7954
7955/**
7956 * Histogram of frame counts bucketed by time in milliseconds.
7957 * Because of size limitations, we hard-cap the number of buckets, with
7958 * buckets for corresponding to larger milliseconds being less precise.
7959 */
7960message FrameTimingHistogram {
7961 // Timings in milliseconds that describes a set of histogram buckets
7962 repeated int32 time_millis_buckets = 1;
7963 // Number of frames that match to each time_millis, i.e. the bucket
7964 // contents
7965 // It's required that len(time_millis) == len(frame_count)
7966 repeated int64 frame_counts = 2;
7967}
Emilian Peev6729f372019-08-29 09:14:09 -07007968
Emilian Peev6729f372019-08-29 09:14:09 -07007969/**
7970 * Information about camera facing and API level usage.
7971 * Logged from:
7972 * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java
7973 */
7974message CameraActionEvent {
7975 // Camera session duration
7976 optional int64 duration = 1;
7977
7978 // Camera API level used
7979 optional int32 api_level = 2;
7980
7981 // Name of client package
7982 optional string package_name = 3;
7983
7984 // Camera facing
7985 enum Facing {
7986 UNKNOWN = 0;
7987 BACK = 1;
7988 FRONT = 2;
7989 EXTERNAL = 3;
7990 }
7991 optional Facing facing = 4;
7992}
atrost01a20932019-08-28 15:40:37 +01007993
7994/**
7995 * Logs when a compatibility change is affecting an app.
7996 *
7997 * Logged from:
7998 * frameworks/base/core/java/android/app/AppCompatCallbacks.java and
7999 * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java
8000 */
8001message AppCompatibilityChangeReported {
8002 // The UID of the app being affected by the compatibilty change.
8003 optional int32 uid = 1 [(is_uid) = true];
8004
8005 // The ID of the change affecting the app.
8006 optional int64 change_id = 2;
8007
8008 enum State {
8009 UNKNOWN_STATE = 0;
8010 ENABLED = 1;
8011 DISABLED = 2;
8012 LOGGED = 3;
8013 }
8014
8015 // The state of the change - if logged from gating whether it was enabled or disabled, or just
8016 // logged otherwise.
8017 optional State state = 3;
8018
8019 enum Source {
8020 UNKNOWN_SOURCE = 0;
8021 APP_PROCESS = 1;
8022 SYSTEM_SERVER = 2;
8023 }
8024
8025 // Where it was logged from.
8026 optional Source source = 4;
8027
8028}
Hector Dearman40579f62019-11-01 13:19:30 +00008029
8030/**
8031 * Logged from
8032 * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc
8033 */
8034message PerfettoUploaded {
8035 enum Event {
8036 PERFETTO_UNDEFINED = 0;
8037 PERFETTO_TRACE_BEGIN = 1;
8038 PERFETTO_BACKGROUND_TRACE_BEGIN = 2;
8039 PERFETTO_ON_CONNECT = 3;
8040 PERFETTO_ON_TRACING_DISABLED = 4;
8041 PERFETTO_UPLOAD_DROPBOX_BEGIN = 5;
8042 PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6;
8043 PERFETTO_UPLOAD_DROPBOX_FAILURE = 7;
8044 PERFETTO_UPLOAD_INCIDENT_BEGIN = 8;
8045 PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9;
8046 PERFETTO_UPLOAD_INCIDENT_FAILURE = 10;
8047 PERFETTO_FINALIZE_TRACE_AND_EXIT = 11;
8048 PERFETTO_TRIGGER_BEGIN = 12;
8049 PERFETTO_TRIGGER_SUCCESS = 13;
8050 PERFETTO_TRIGGER_FAILURE = 14;
8051 PERFETTO_HIT_GUARDRAILS = 15;
8052 PERFETTO_ON_TIMEOUT = 16;
8053 PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17;
8054 }
8055
8056 // Which stage of the pipeline we are reporting from.
8057 optional Event event = 1;
8058
8059 // UUID matching the one set inside the SystemInfo trace packet.
8060 optional int64 trace_uuid_lsb = 2;
8061 optional int64 trace_uuid_msb = 3;
8062}
Mark Tabrya824a642019-11-05 12:26:12 -08008063
8064/**
8065 * Pulls client metrics on data transferred via Vehicle Maps Service.
8066 * Metrics are keyed by uid + layer.
8067 *
8068 * Pulled from:
8069 * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java
8070 */
8071message VmsClientStats {
8072 // UID of the VMS client app
8073 optional int32 uid = 1 [(is_uid) = true];
8074
8075 // VMS layer definition
8076 optional int32 layer_type = 2;
8077 optional int32 layer_channel = 3;
8078 optional int32 layer_version = 4;
8079
8080 // Bytes and packets sent by the client for the layer
8081 optional int64 tx_bytes = 5;
8082 optional int64 tx_packets = 6;
8083
8084 // Bytes and packets received by the client for the layer
8085 optional int64 rx_bytes = 7;
8086 optional int64 rx_packets = 8;
8087
8088 // Bytes and packets dropped due to client error
8089 optional int64 dropped_bytes = 9;
8090 optional int64 dropped_packets = 10;
8091}
Stanislav Zholninccb82e42019-11-29 18:59:49 +00008092
8093/**
8094 * State of a dangerous permission requested by a package - sampled
8095 * Pulled from: StatsCompanionService.java with data obtained from PackageManager API
8096*/
8097message DangerousPermissionStateSampled {
8098 // Name of the permission
8099 optional string permission_name = 1;
8100
8101 // Uid of the package
8102 optional int32 uid = 2 [(is_uid) = true];
8103
8104 // If the permission is granted to the uid
8105 optional bool is_granted = 3;
8106
8107 // Permission flags as per android.content.pm.PermissionFlags
8108 optional int32 permission_flags = 4;
8109}
8110
Stan Iliev637ba5e2019-08-16 13:43:08 -04008111/**
8112 * HWUI renders pipeline type: GL (0) or Vulkan (1).
8113 */
8114enum PipelineType {
8115 GL = 0;
8116 VULKAN = 1;
8117}
8118
8119/**
8120 * HWUI stats for a given app.
8121 */
8122message GraphicsStats {
8123 // The package name of the app
8124 optional string package_name = 1;
8125
8126 // The version code of the app
8127 optional int64 version_code = 2;
8128
8129 // The start & end timestamps in UTC as
8130 // milliseconds since January 1, 1970
8131 // Compatible with java.util.Date#setTime()
8132 optional int64 stats_start = 3;
8133
8134 optional int64 stats_end = 4;
8135
8136 // HWUI renders pipeline type: GL or Vulkan.
8137 optional PipelineType pipeline = 5;
8138
8139 // Distinct frame count.
8140 optional int32 total_frames = 6;
8141
8142 // Number of "missed vsync" events.
8143 optional int32 missed_vsync_count = 7;
8144
8145 // Number of frames in triple-buffering scenario (high input latency)
8146 optional int32 high_input_latency_count = 8;
8147
8148 // Number of "slow UI thread" events.
8149 optional int32 slow_ui_thread_count = 9;
8150
8151 // Number of "slow bitmap upload" events.
8152 optional int32 slow_bitmap_upload_count = 10;
8153
8154 // Number of "slow draw" events.
8155 optional int32 slow_draw_count = 11;
8156
8157 // Number of frames that missed their deadline (aka, visibly janked)
8158 optional int32 missed_deadline_count = 12;
8159
8160 // The frame time histogram for the package
8161 optional FrameTimingHistogram cpu_histogram = 13
8162 [(android.os.statsd.log_mode) = MODE_BYTES];
8163
8164 // The gpu frame time histogram for the package
8165 optional FrameTimingHistogram gpu_histogram = 14
8166 [(android.os.statsd.log_mode) = MODE_BYTES];
8167
8168 // UI mainline module version.
8169 optional int64 version_ui_module = 15;
8170
8171 // If true, these are HWUI stats for up to a 24h period for a given app from today.
8172 // If false, these are HWUI stats for a 24h period for a given app from the last complete
8173 // day (yesterday). Stats from yesterday stay constant, while stats from today may change as
8174 // more apps are running / rendering.
8175 optional bool is_today = 16;
8176}
Stanislav Zholnin606454c2019-11-27 15:31:49 +00008177
8178/**
8179 * Message related to dangerous (runtime) app ops access
8180 */
Stanislav Zholnin88c6f322020-01-29 14:48:11 +00008181message RuntimeAppOpAccess {
Stanislav Zholnin606454c2019-11-27 15:31:49 +00008182 // Uid of the package accessing app op
8183 optional int32 uid = 1 [(is_uid) = true];
8184
8185 // Name of the package accessing app op
8186 optional string package_name = 2;
8187
Stanislav Zholnin88c6f322020-01-29 14:48:11 +00008188 // operation string id per OPSTR_ constants in AppOpsManager.java
8189 optional string op = 3;
Stanislav Zholnin606454c2019-11-27 15:31:49 +00008190
8191 // feature id; provided by developer when accessing related API, limited at 50 chars by API.
8192 // Features must be provided through manifest using <feature> tag available in R and above.
8193 optional string feature_id = 4;
8194
8195 // message related to app op access, limited to 600 chars by API
8196 optional string message = 5;
8197
8198 enum SamplingStrategy {
8199 DEFAULT = 0;
8200 UNIFORM = 1;
8201 RARELY_USED = 2;
8202 }
8203
8204 // sampling strategy used to collect this message
8205 optional SamplingStrategy sampling_strategy = 6;
8206}
8207
Nikita Ioffe41dd57e2020-01-10 16:05:08 +00008208/*
8209 * Logs userspace reboot outcome and duration.
8210 *
8211 * Logged from:
8212 * frameworks/base/core/java/com/android/server/BootReceiver.java
8213 */
8214message UserspaceRebootReported {
8215 // Possible outcomes of userspace reboot.
8216 enum Outcome {
8217 // Default value in case platform failed to determine the outcome.
8218 OUTCOME_UNKNOWN = 0;
8219 // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot).
8220 SUCCESS = 1;
8221 // Userspace reboot shutdown sequence was aborted.
8222 FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2;
8223 // Remounting userdata into checkpointing mode failed.
8224 FAILED_USERDATA_REMOUNT = 3;
8225 // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard
8226 // reboot.
8227 FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4;
8228 }
8229 // Outcome of userspace reboot. Always set.
8230 optional Outcome outcome = 1;
8231 // Duration of userspace reboot in case it has a successful outcome.
8232 // Duration is measured as time between userspace reboot was initiated and until boot completed
8233 // (e.g. sys.boot_completed=1).
8234 optional int64 duration_millis = 2;
8235 // State of primary user's (user0) credential encryption storage.
8236 enum UserEncryptionState {
8237 // Default value.
8238 USER_ENCRYPTION_STATE_UNKNOWN = 0;
8239 // Credential encrypted storage is unlocked.
8240 UNLOCKED = 1;
8241 // Credential encrypted storage is locked.
8242 LOCKED = 2;
8243 }
8244 // State of primary user's encryption storage at the moment boot completed. Always set.
8245 optional UserEncryptionState user_encryption_state = 3;
8246}
Omer Nebil Yaveroglu06b969a2020-01-23 11:10:38 +00008247
8248/*
8249 * Logs integrity check information during each install.
8250 *
8251 * Logged from:
8252 * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
8253 */
8254message IntegrityCheckResultReported {
8255 optional string package_name = 1;
8256 optional string app_certificate_hash = 2;
Omer Nebil Yaveroglu0ade8542020-01-24 12:47:46 +00008257 optional int64 version_code = 3;
Omer Nebil Yaveroglu06b969a2020-01-23 11:10:38 +00008258 optional string installer_package_name = 4;
8259 enum Response {
8260 UNKNOWN = 0;
8261 ALLOWED = 1;
8262 REJECTED = 2;
8263 FORCE_ALLOWED = 3;
8264 }
8265 optional Response response = 5;
8266 // An estimate on the cause of the response. This will only be populated for
8267 // REJECTED and FORCE_ALLOWED
8268 optional bool caused_by_app_cert_rule = 6;
8269 optional bool caused_by_installer_rule = 7;
8270}
8271
8272/**
8273 * Logs the information about the rules and the provider whenever rules are
8274 * pushed into AppIntegrityManager.
8275 *
8276 * Logged from:
8277 * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java
8278 */
8279message IntegrityRulesPushed {
8280 optional bool success = 1;
8281 // Package name of the app that pushed the rules.
8282 optional string rule_provider = 2;
8283 // Version string of arbitrary format provided by the rule provider to
8284 // identify the rules.
8285 optional string rule_version = 3;
8286}
Jordan Liubedfa702019-12-20 15:08:45 -08008287
8288/**
8289 * Logs when a cell broadcast message is received on the device.
8290 *
8291 * Logged from CellBroadcastService module:
8292 * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
8293 */
8294message CellBroadcastMessageReported {
8295 // The type of Cell Broadcast message
8296 enum CbType {
8297 UNKNOWN_TYPE = 0;
8298 GSM = 1;
8299 CDMA = 2;
8300 CDMA_SPC = 3;
8301 }
8302
8303 // GSM, CDMA, CDMA-SCP
8304 optional CbType type = 1;
8305}
8306
8307/**
8308 * Logs when an error occurs while handling a cell broadcast message;
8309 *
8310 * Logged from CellBroadcastService module:
8311 * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
8312 */
8313message CellBroadcastMessageError {
8314 // The type of error raised when trying to handle a cell broadcast message
8315 enum ErrorType {
8316 UNKNOWN_TYPE = 0;
8317 CDMA_DECODING_ERROR = 1;
8318 CDMA_SCP_EMPTY = 2;
8319 CDMA_SCP_HANDLING_ERROR = 3;
8320 GSM_INVALID_HEADER_LENGTH = 4;
8321 GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5;
8322 GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6;
8323 GSM_INVALID_PDU = 7;
8324 GSM_INVALID_GEO_FENCING_DATA = 8;
8325 GSM_UMTS_INVALID_WAC = 9;
8326 FAILED_TO_INSERT_TO_DB = 10;
8327 UNEXPECTED_GEOMETRY_FROM_FWK = 11;
8328 UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12;
8329 UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13;
8330 UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14;
8331 }
8332
8333 // What kind of error occurred
8334 optional ErrorType type = 1;
8335
8336 // Exception message (or log message) associated with the error (max 1000 chars)
8337 optional string exception_message = 2;
8338}