blob: 32d90b70c34e40d884836b2ecac2497bee426458 [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";
lifra2e19c02019-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";
Carmen Agimof6688a352019-01-30 19:36:04 +000053import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
Hyunyoung Song80adf6be2019-01-30 09:59:30 -080054import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
Tej Singhc477d9c2018-02-05 18:31:39 -080055import "frameworks/base/core/proto/android/telecomm/enums.proto";
Bookatz1a1b0462018-01-12 11:47:03 -080056import "frameworks/base/core/proto/android/telephony/enums.proto";
57import "frameworks/base/core/proto/android/view/enums.proto";
Bookatz11257ca2018-12-05 18:22:39 -080058import "frameworks/base/core/proto/android/wifi/enums.proto";
Joe Onorato62c220b2017-11-18 20:32:56 -080059
Yao Chend54f9dd2017-10-17 17:37:48 +000060/**
Stefan Lafonae2df012017-11-14 09:17:21 -080061 * The master atom class. This message defines all of the available
Yao Chend54f9dd2017-10-17 17:37:48 +000062 * raw stats log events from the Android system, also known as "atoms."
63 *
64 * This field contains a single oneof with all of the available messages.
65 * The stats-log-api-gen tool runs as part of the Android build and
66 * generates the android.util.StatsLog class, which contains the constants
67 * and methods that Android uses to log.
68 *
Stefan Lafonae2df012017-11-14 09:17:21 -080069 * This Atom class is not actually built into the Android system.
Yao Chend54f9dd2017-10-17 17:37:48 +000070 * Instead, statsd on Android constructs these messages synthetically,
71 * in the format defined here and in stats_log.proto.
72 */
Stefan Lafonae2df012017-11-14 09:17:21 -080073message Atom {
74 // Pushed atoms start at 2.
David Chenc8a43242017-10-17 16:23:28 -070075 oneof pushed {
Bookatzc1a050a2017-10-10 15:49:28 -070076 // For StatsLog reasons, 1 is illegal and will not work. Must start at 2.
77 BleScanStateChanged ble_scan_state_changed = 2;
Chenjie Yubd1a28f2018-07-17 14:55:19 -070078 ProcessStateChanged process_state_changed = 3;
Bookatzc1a050a2017-10-10 15:49:28 -070079 BleScanResultReceived ble_scan_result_received = 4;
80 SensorStateChanged sensor_state_changed = 5;
Bookatzdb026a22018-01-10 19:01:56 -080081 GpsScanStateChanged gps_scan_state_changed = 6;
Bookatzc1a050a2017-10-10 15:49:28 -070082 SyncStateChanged sync_state_changed = 7;
83 ScheduledJobStateChanged scheduled_job_state_changed = 8;
84 ScreenBrightnessChanged screen_brightness_changed = 9;
Bookatzd6746242017-10-24 18:39:35 -070085 WakelockStateChanged wakelock_state_changed = 10;
Bookatzddccf0a2017-11-28 16:48:14 -080086 LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11;
87 MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12;
88 WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13;
Chenjie Yubd1a28f2018-07-17 14:55:19 -070089 ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14;
90 MemoryFactorStateChanged memory_factor_state_changed = 15;
91 ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16;
92 CachedKillReported cached_kill_reported = 17;
93 ProcessMemoryStatReported process_memory_stat_reported = 18;
Hyunyoung Songc6d6b772018-10-17 13:35:32 -070094 LauncherUIChanged launcher_event = 19;
Bookatzddccf0a2017-11-28 16:48:14 -080095 BatterySaverModeStateChanged battery_saver_mode_state_changed = 20;
96 DeviceIdleModeStateChanged device_idle_mode_state_changed = 21;
97 DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22;
Bookatzc1a050a2017-10-10 15:49:28 -070098 AudioStateChanged audio_state_changed = 23;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -080099 MediaCodecStateChanged media_codec_state_changed = 24;
Bookatzc1a050a2017-10-10 15:49:28 -0700100 CameraStateChanged camera_state_changed = 25;
101 FlashlightStateChanged flashlight_state_changed = 26;
102 UidProcessStateChanged uid_process_state_changed = 27;
103 ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28;
104 ScreenStateChanged screen_state_changed = 29;
Bookatz8c6571b2017-10-24 15:04:41 -0700105 BatteryLevelChanged battery_level_changed = 30;
106 ChargingStateChanged charging_state_changed = 31;
107 PluggedStateChanged plugged_state_changed = 32;
Bookatza66083f2018-09-20 17:24:00 -0700108 InteractiveStateChanged interactive_state_changed = 33;
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -0800109 TouchEventReported touch_event_reported = 34;
Bookatz8c6571b2017-10-24 15:04:41 -0700110 WakeupAlarmOccurred wakeup_alarm_occurred = 35;
111 KernelWakeupReported kernel_wakeup_reported = 36;
Bookatze5885242017-10-24 20:10:31 -0700112 WifiLockStateChanged wifi_lock_state_changed = 37;
113 WifiSignalStrengthChanged wifi_signal_strength_changed = 38;
114 WifiScanStateChanged wifi_scan_state_changed = 39;
115 PhoneSignalStrengthChanged phone_signal_strength_changed = 40;
David Chenc28b2bb2017-10-24 12:52:52 -0700116 SettingChanged setting_changed = 41;
David Chenc8a43242017-10-17 16:23:28 -0700117 ActivityForegroundStateChanged activity_foreground_state_changed = 42;
David Chen21582962017-11-01 17:32:46 -0700118 IsolatedUidChanged isolated_uid_changed = 43;
Hugo Benichi884970e2017-11-14 22:42:46 +0900119 PacketWakeupOccurred packet_wakeup_occurred = 44;
Bookatz7948c872018-09-04 12:58:33 -0700120 WallClockTimeShifted wall_clock_time_shifted = 45;
Bookatz8fcd09a2017-12-18 13:01:10 -0800121 AnomalyDetected anomaly_detected = 46;
Andrei Oneada01ea52019-01-30 15:28:36 +0000122 AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true];
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800123 AppStartOccurred app_start_occurred = 48;
124 AppStartCanceled app_start_canceled = 49;
125 AppStartFullyDrawn app_start_fully_drawn = 50;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -0800126 LmkKillOccurred lmk_kill_occurred = 51;
Chenjie Yu52cacc62017-12-08 18:11:45 -0800127 PictureInPictureStateChanged picture_in_picture_state_changed = 52;
Tej Singh4503e102018-01-04 14:35:01 -0800128 WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -0800129 LmkStateChanged lmk_state_changed = 54;
130 AppStartMemoryStateCaptured app_start_memory_state_captured = 55;
Tej Singh1ea42892018-01-19 09:27:00 -0800131 ShutdownSequenceReported shutdown_sequence_reported = 56;
Tej Singh6483ea42018-01-25 17:45:49 -0800132 BootSequenceReported boot_sequence_reported = 57;
Andrei Oneada01ea52019-01-30 15:28:36 +0000133 DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true];
Chenjie Yue8904192017-12-08 19:12:57 -0800134 OverlayStateChanged overlay_state_changed = 59;
Chenjie Yuccfe6452018-01-30 11:33:21 -0800135 ForegroundServiceStateChanged foreground_service_state_changed = 60;
Tej Singhc477d9c2018-02-05 18:31:39 -0800136 CallStateChanged call_state_changed = 61;
Tej Singhdd7bd352018-02-09 19:33:15 -0800137 KeyguardStateChanged keyguard_state_changed = 62;
138 KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63;
139 KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800140 AppDied app_died = 65;
Tej Singha883b372018-02-15 11:30:01 -0800141 ResourceConfigurationChanged resource_configuration_changed = 66;
Tej Singh5d991e12018-03-09 19:48:11 -0800142 BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67;
143 BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68;
Bookatz48d362e2018-11-06 15:49:08 -0800144 GpsSignalQualityChanged gps_signal_quality_changed = 69;
Andrew Chantb56388b2018-03-22 21:07:33 -0700145 UsbConnectorStateChanged usb_connector_state_changed = 70;
Andrew Chant28d627e2018-02-22 15:17:05 -0800146 SpeakerImpedanceReported speaker_impedance_reported = 71;
147 HardwareFailed hardware_failed = 72;
148 PhysicalDropDetected physical_drop_detected = 73;
149 ChargeCyclesReported charge_cycles_reported = 74;
Tej Singheee317b2018-03-07 19:28:05 -0800150 MobileConnectionStateChanged mobile_connection_state_changed = 75;
151 MobileRadioTechnologyChanged mobile_radio_technology_changed = 76;
Andrew Chantb56388b2018-03-22 21:07:33 -0700152 UsbDeviceAttached usb_device_attached = 77;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800153 AppCrashOccurred app_crash_occurred = 78;
154 ANROccurred anr_occurred = 79;
155 WTFOccurred wtf_occurred = 80;
156 LowMemReported low_mem_reported = 81;
Howard Rocb767f62018-06-19 19:58:05 -0700157 GenericAtom generic_atom = 82;
jianjin6eada302019-02-28 11:25:57 -0800158 KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true];
Bookatza7020bd2018-08-28 16:29:35 -0700159 VibratorStateChanged vibrator_state_changed = 84;
Yangster-mac96353002018-09-05 11:18:55 -0700160 DeferredJobStatsReported deferred_job_stats_reported = 85;
Tej Singha72344992019-04-17 18:55:08 -0700161 ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
Kevin Chyn1741a072019-01-17 11:54:40 -0800162 BiometricAcquired biometric_acquired = 87;
163 BiometricAuthenticated biometric_authenticated = 88;
164 BiometricErrorOccurred biometric_error_occurred = 89;
Howard Ro0db82032019-04-07 18:43:34 -0700165 // Atom number 90 is available for use.
Howard Roa46b6582018-09-18 16:45:02 -0700166 BatteryHealthSnapshot battery_health_snapshot = 91;
167 SlowIo slow_io = 92;
168 BatteryCausedShutdown battery_caused_shutdown = 93;
Yangsteraf9aee72018-10-12 09:26:16 -0700169 PhoneServiceStateChanged phone_service_state_changed = 94;
170 PhoneStateChanged phone_state_changed = 95;
arangelovd5db50e2018-10-12 20:24:39 +0100171 UserRestrictionChanged user_restriction_changed = 96;
Fan Zhang916c13b2018-10-16 22:49:45 -0700172 SettingsUIChanged settings_ui_changed = 97;
Chenjie Yuae9dfac2018-10-25 16:06:56 -0700173 ConnectivityStateChanged connectivity_state_changed = 98;
Chenjie Yu75b3c492018-10-06 21:45:19 -0700174 // TODO: service state change is very noisy shortly after boot, as well
175 // as at other transitions - coming out of doze, device plugged in, etc.
176 // Consider removing this if it becomes a problem
177 ServiceStateChanged service_state_changed = 99;
178 ServiceLaunchReported service_launch_reported = 100;
Tej Singh0d176952019-01-16 19:10:54 -0800179 FlagFlipUpdateOccurred flag_flip_update_occurred = 101;
Yangster-macb89807e2018-11-15 21:10:57 -0800180 BinaryPushStateChanged binary_push_state_changed = 102;
arangelov4e994062018-11-13 16:12:38 +0000181 DevicePolicyEvent device_policy_event = 103;
shawnlin9a1392a2019-04-09 16:21:17 +0800182 DocsUIFileOperationCanceledReported docs_ui_file_op_canceled =
183 104 [(log_from_module) = "docsui"];
184 DocsUIFileOperationCopyMoveModeReported
185 docs_ui_file_op_copy_move_mode_reported =
186 105 [(log_from_module) = "docsui"];
187 DocsUIFileOperationFailureReported docs_ui_file_op_failure =
188 106 [(log_from_module) = "docsui"];
189 DocsUIFileOperationReported docs_ui_provider_file_op =
190 107 [(log_from_module) = "docsui"];
191 DocsUIInvalidScopedAccessRequestReported
192 docs_ui_invalid_scoped_access_request =
193 108 [(log_from_module) = "docsui"];
194 DocsUILaunchReported docs_ui_launch_reported =
195 109 [(log_from_module) = "docsui"];
196 DocsUIRootVisitedReported docs_ui_root_visited =
197 110 [(log_from_module) = "docsui"];
198 DocsUIStartupMsReported docs_ui_startup_ms =
199 111 [(log_from_module) = "docsui"];
200 DocsUIUserActionReported docs_ui_user_action_reported =
201 112 [(log_from_module) = "docsui"];
Bookatzda1798c2018-12-13 14:16:00 -0800202 WifiEnabledStateChanged wifi_enabled_state_changed = 113;
203 WifiRunningStateChanged wifi_running_state_changed = 114;
Ben Murdochbab399f2018-12-06 11:01:38 +0000204 AppCompacted app_compacted = 115;
lifre82d8f62019-03-25 20:33:21 +0800205 NetworkDnsEventReported network_dns_event_reported = 116 [(log_from_module) = "resolv"];
shawnlin9a1392a2019-04-09 16:21:17 +0800206 DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported =
207 117 [(log_from_module) = "docsui"];
208 DocsUIPickResultReported docs_ui_pick_result_reported =
209 118 [(log_from_module) = "docsui"];
210 DocsUISearchModeReported docs_ui_search_mode_reported =
211 119 [(log_from_module) = "docsui"];
212 DocsUISearchTypeReported docs_ui_search_type_reported =
213 120 [(log_from_module) = "docsui"];
Chiachang Wange512b262019-04-11 21:24:28 +0800214 DataStallEvent data_stall_event = 121 [(log_from_module) = "network_stack"];
Christian Brunschenf86039e2018-12-21 12:26:14 +0000215 RescuePartyResetReported rescue_party_reset_reported = 122;
Mathew Inwoodb375be52019-01-04 11:36:25 +0000216 SignedConfigReported signed_config_reported = 123;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -0800217 GnssNiEventReported gnss_ni_event_reported = 124;
Jack Heab86dbd22018-12-18 15:43:27 -0800218 BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = 125;
Jack Hed9837c82019-01-09 01:19:13 -0800219 BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126;
220 BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127;
Felix Lopez Luisd95346a2018-12-12 10:32:32 +0000221 AppDowngraded app_downgraded = 128;
222 AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
223 LowStorageStateChanged low_storage_state_changed = 130;
Yu-Han Yang14d5fb42019-01-16 12:42:59 -0800224 GnssNfwNotificationReported gnss_nfw_notification_reported = 131;
225 GnssConfigurationReported gnss_configuration_reported = 132;
Maggie Whitefc1aa592018-11-28 21:55:23 -0800226 UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
Jack Yu95b64f32018-12-13 18:26:11 +0800227 NfcErrorOccurred nfc_error_occurred = 134;
228 NfcStateChanged nfc_state_changed = 135;
229 NfcBeamOccurred nfc_beam_occurred = 136;
230 NfcCardemulationOccurred nfc_cardemulation_occurred = 137;
231 NfcTagOccurred nfc_tag_occurred = 138;
232 NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139;
233 SeStateChanged se_state_changed = 140;
234 SeOmapiReported se_omapi_reported = 141;
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -0800235 BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142;
Alex Saloa060aee2019-01-21 14:36:41 -0800236 AttentionManagerServiceResultReported attention_manager_service_result_reported = 143;
Michael Groover9e7b06e2018-12-28 19:55:51 -0800237 AdbConnectionChanged adb_connection_changed = 144;
Carter Hsub8fd1e92019-01-11 15:24:45 +0800238 SpeechDspStatReported speech_dsp_stat_reported = 145;
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -0800239 UsbContaminantReported usb_contaminant_reported = 146;
Howard Roe103fe22019-01-17 16:52:16 -0800240 WatchdogRollbackOccurred watchdog_rollback_occurred = 147;
Kevin Chyne5a37fb2019-02-08 13:10:36 -0800241 BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148;
Steven Wuacef6bb2019-01-23 14:21:17 -0500242 BubbleUIChanged bubble_ui_changed = 149;
Kweku Adams8845d012018-12-11 20:06:45 -0800243 ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150;
Jack Hec27040a2019-01-09 20:54:41 -0800244 BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151;
245 BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152;
246 BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153;
247 BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154;
248 BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155;
249 BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156;
250 BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157;
251 BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158;
252 BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159;
Jack He1021a612019-01-20 21:22:46 -0800253 BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160;
254 BluetoothQualityReportReported bluetooth_quality_report_reported = 161;
Jack Heaea26982019-04-04 11:19:48 -0700255 BluetoothDeviceInfoReported bluetooth_device_info_reported = 162;
Jack He1021a612019-01-20 21:22:46 -0800256 BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163;
257 BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164;
258 BluetoothBondStateChanged bluetooth_bond_state_changed = 165;
259 BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166;
260 BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167;
Alex Salod7c3eef2019-01-25 14:43:27 -0800261 ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168;
Hui Yu885aca12019-01-10 17:11:34 -0800262 ProcessStartTime process_start_time = 169;
Philip P. Moltmannb2f0c772019-04-11 14:41:21 -0700263 PermissionGrantRequestResultReported permission_grant_request_result_reported =
264 170 [(log_from_module) = "permissioncontroller"];
Jack He815cdba2019-01-30 17:24:55 -0800265 BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
Michael Groover4a0ca942019-01-24 17:41:25 -0800266 DeviceIdentifierAccessDenied device_identifier_access_denied = 172;
Steven Wu552f63f2019-02-05 13:41:36 -0500267 BubbleDeveloperErrorReported bubble_developer_error_reported = 173;
joshmccloskey8c3322e2019-01-09 18:25:57 -0800268 AssistGestureStageReported assist_gesture_stage_reported = 174;
269 AssistGestureFeedbackReported assist_gesture_feedback_reported = 175;
270 AssistGestureProgressReported assist_gesture_progress_reported = 176;
Philip Quinn0eded622019-01-29 12:46:28 -0800271 TouchGestureClassified touch_gesture_classified = 177;
Andrei Onea4ad6d0c2019-02-08 13:54:12 +0000272 HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true];
Kunhung Li286c52f2019-05-21 20:10:43 +0800273 StyleUIChanged style_ui_changed = 179 [(log_from_module) = "style"];
Joel Galenson6f41b1062019-04-16 12:22:41 -0700274 PrivacyIndicatorsInteracted privacy_indicators_interacted =
Tej Singha72344992019-04-17 18:55:08 -0700275 180 [(log_from_module) = "permissioncontroller"];
Carmen Agimof6688a352019-01-30 19:36:04 +0000276 AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181;
Chiachang Wange512b262019-04-11 21:24:28 +0800277 NetworkStackReported network_stack_reported = 182 [(log_from_module) = "network_stack"];
Carmen Agimof6dcc5032019-03-01 16:20:09 +0000278 AppMovedStorageReported app_moved_storage_reported = 183;
joshmccloskey6f952b22019-03-25 20:59:35 -0700279 BiometricEnrolled biometric_enrolled = 184;
jianjin8f2dee02019-03-29 14:03:08 -0700280 SystemServerWatchdogOccurred system_server_watchdog_occurred = 185;
281 TombStoneOccurred tomb_stone_occurred = 186;
Jack He71426802019-04-02 13:32:52 -0700282 BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = 187;
Ben Blount763a5d52019-04-10 11:48:58 -0700283 IntelligenceEventReported intelligence_event_reported =
284 188 [(log_from_module) = "intelligence"];
Tej Singha72344992019-04-17 18:55:08 -0700285 ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189;
Hai Zhang5d3328d2019-04-13 21:25:06 +0800286 RoleRequestResultReported role_request_result_reported =
287 190 [(log_from_module) = "permissioncontroller"];
Ray Essick8ab04df2019-02-15 11:01:02 -0800288 MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191;
289 MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192;
290 MediametricsAudiothreadReported mediametrics_audiothread_reported = 193;
291 MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194;
292 MediametricsCodecReported mediametrics_codec_reported = 195;
293 MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196;
294 MediametricsExtractorReported mediametrics_extractor_reported = 197;
295 MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
296 MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
297 MediametricsRecorderReported mediametrics_recorder_reported = 200;
Yuncheol Heod1a85d22019-05-08 17:13:42 -0700298 CarPowerStateChanged car_power_state_changed = 203;
299 GarageModeInfo garage_mode_info = 204;
Tej Singhc9203082019-05-03 13:42:23 -0700300 TestAtomReported test_atom_reported = 205 [(log_from_module) = "cts"];
Adam Heff2185342019-01-23 15:59:09 -0800301 ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = 206;
302 ContentCaptureServiceEvents content_capture_service_events = 207;
303 ContentCaptureSessionEvents content_capture_session_events = 208;
304 ContentCaptureFlushed content_capture_flushed = 209;
Hongyi Zhang700137e2019-05-23 21:19:36 -0700305 LocationManagerApiUsageReported location_manager_api_usage_reported = 210;
Stanislav Zholninbdf620b2019-06-06 22:38:33 +0100306 ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported =
307 211 [(log_from_module) = "permissioncontroller"];
Stanislav Zholnin247d1b72019-06-06 21:28:44 +0100308 RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result =
309 212 [(log_from_module) = "permissioncontroller"];
Stanislav Zholninbdf620b2019-06-06 22:38:33 +0100310 GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions =
311 213 [(log_from_module) = "permissioncontroller"];
Stanislav Zholnin375e2ab2019-05-29 13:07:35 +0100312 LocationAccessCheckNotificationAction location_access_check_notification_action =
313 214 [(log_from_module) = "permissioncontroller"];
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +0100314 AppPermissionFragmentActionReported app_permission_fragment_action_reported =
315 215 [(log_from_module) = "permissioncontroller"];
Stanislav Zholninc9dda9e2019-06-02 20:50:13 +0100316 AppPermissionFragmentViewed app_permission_fragment_viewed =
317 216 [(log_from_module) = "permissioncontroller"];
Stanislav Zholnindc3e2b32019-06-06 18:10:14 +0100318 AppPermissionsFragmentViewed app_permissions_fragment_viewed =
319 217 [(log_from_module) = "permissioncontroller"];
Stanislav Zholnin32a89c12019-06-04 14:59:21 +0100320 PermissionAppsFragmentViewed permission_apps_fragment_viewed =
321 218 [(log_from_module) = "permissioncontroller"];
Hyunyoung Songf1b935e2019-07-09 09:19:25 -0700322 ExclusionRectStateChanged exclusion_rect_state_changed = 223;
323 BackGesture back_gesture_reported_reported = 224;
atrost1516d522019-08-28 15:40:37 +0100324
325 AppCompatibilityChangeReported app_compatibility_change_reported =
326 228 [(allow_from_any_uid) = true];
Yao Chend54f9dd2017-10-17 17:37:48 +0000327 }
David Chenc8a43242017-10-17 16:23:28 -0700328
David Chen6e3e6cb2018-01-03 16:14:06 -0800329 // Pulled events will start at field 10000.
Rafal Slawik6d44d6d2019-06-17 12:28:23 +0100330 // Next: 10062
David Chenc8a43242017-10-17 16:23:28 -0700331 oneof pulled {
David Chen6e3e6cb2018-01-03 16:14:06 -0800332 WifiBytesTransfer wifi_bytes_transfer = 10000;
333 WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
334 MobileBytesTransfer mobile_bytes_transfer = 10002;
335 MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003;
Chenjie Yu9d7720b2018-01-24 10:34:48 -0800336 BluetoothBytesTransfer bluetooth_bytes_transfer = 10006;
David Chen6e3e6cb2018-01-03 16:14:06 -0800337 KernelWakelock kernel_wakelock = 10004;
Chenjie Yuc8b7f222018-01-11 23:25:57 -0800338 SubsystemSleepState subsystem_sleep_state = 10005;
David Chen6e3e6cb2018-01-03 16:14:06 -0800339 CpuTimePerFreq cpu_time_per_freq = 10008;
340 CpuTimePerUid cpu_time_per_uid = 10009;
341 CpuTimePerUidFreq cpu_time_per_uid_freq = 10010;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800342 WifiActivityInfo wifi_activity_info = 10011;
David Chen6e3e6cb2018-01-03 16:14:06 -0800343 ModemActivityInfo modem_activity_info = 10012;
Chenjie Yu9d7720b2018-01-24 10:34:48 -0800344 BluetoothActivityInfo bluetooth_activity_info = 10007;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -0800345 ProcessMemoryState process_memory_state = 10013;
Chenjie Yu9d7720b2018-01-24 10:34:48 -0800346 SystemElapsedRealtime system_elapsed_realtime = 10014;
347 SystemUptime system_uptime = 10015;
Chenjie Yu9da105b2018-01-13 12:41:08 -0800348 CpuActiveTime cpu_active_time = 10016;
349 CpuClusterTime cpu_cluster_time = 10017;
Tej Singh86dc9db2018-09-06 00:39:57 +0000350 DiskSpace disk_space = 10018 [deprecated=true];
Tej Singhbf972d92018-01-10 20:51:13 -0800351 RemainingBatteryCapacity remaining_battery_capacity = 10019;
352 FullBatteryCapacity full_battery_capacity = 10020;
Tej Singh40298312018-02-16 00:15:09 -0800353 Temperature temperature = 10021;
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +0100354 BinderCalls binder_calls = 10022;
Olivier Gaillard9ea238d2018-07-24 10:26:31 +0100355 BinderCallsExceptions binder_calls_exceptions = 10023;
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +0100356 LooperStats looper_stats = 10024;
Tej Singh86dc9db2018-09-06 00:39:57 +0000357 DiskStats disk_stats = 10025;
358 DirectoryUsage directory_usage = 10026;
359 AppSize app_size = 10027;
360 CategorySize category_size = 10028;
Chenjie Yuab530202018-09-26 12:39:20 -0700361 ProcStats proc_stats = 10029;
Bookatz17f0d8a2018-09-13 12:56:32 -0700362 BatteryVoltage battery_voltage = 10030;
joshmccloskey5dcb4082019-02-26 15:28:37 -0800363 NumFingerprintsEnrolled num_fingerprints_enrolled = 10031;
Tej Singhe7726dc2018-09-21 11:42:12 -0700364 DiskIo disk_io = 10032;
Chenjie Yuab530202018-09-26 12:39:20 -0700365 PowerProfile power_profile = 10033;
Chenjie Yuf910b7802019-01-11 16:08:20 -0800366 ProcStatsPkgProc proc_stats_pkg_proc = 10034;
Yangster-mac308ea0c2018-10-22 13:10:25 -0700367 ProcessCpuTime process_cpu_time = 10035;
Rafal Slawik08621582018-10-15 14:53:07 +0100368 NativeProcessMemoryState native_process_memory_state = 10036;
Misha Wagner5a51e002018-10-03 15:04:09 +0100369 CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037;
Bookatz92da2832018-11-01 18:10:03 -0700370 OnDevicePowerMeasurement on_device_power_measurement = 10038;
Bookatz75ee6042018-11-09 12:27:37 -0800371 DeviceCalculatedPowerUse device_calculated_power_use = 10039;
372 DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040;
373 DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041;
Rafal Slawik3bea8952018-11-15 12:39:33 +0000374 ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042;
Tej Singhb1dbc8b2018-11-19 15:49:47 -0800375 BatteryLevel battery_level = 10043;
Bookatz366a4432018-11-20 09:42:33 -0800376 BuildInformation build_information = 10044;
Maggie White8735b852019-01-18 11:40:49 -0800377 BatteryCycleCount battery_cycle_count = 10045;
Olivier Gaillard18d452202019-01-22 15:03:41 +0000378 DebugElapsedClock debug_elapsed_clock = 10046;
379 DebugFailingElapsedClock debug_failing_elapsed_clock = 10047;
joshmccloskey5dcb4082019-02-26 15:28:37 -0800380 NumFacesEnrolled num_faces_enrolled = 10048;
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -0800381 RoleHolder role_holder = 10049;
Philip P. Moltmannf21a3502019-01-30 09:53:04 -0800382 DangerousPermissionState dangerous_permission_state = 10050;
Chenjie Yue13f44a2019-02-07 17:51:38 -0800383 TrainInfo train_info = 10051;
Neil Fullerdb14b482019-02-05 19:44:44 +0000384 TimeZoneDataInfo time_zone_data_info = 10052;
Carmen Agimof12dec122019-03-06 16:14:38 +0000385 ExternalStorageInfo external_storage_info = 10053;
Yiwei Zhang5c81b632019-03-01 15:39:46 -0800386 GpuStatsGlobalInfo gpu_stats_global_info = 10054;
387 GpuStatsAppInfo gpu_stats_app_info = 10055;
Rafal Slawikd4e87572019-03-12 13:08:38 +0000388 SystemIonHeapSize system_ion_heap_size = 10056;
Carmen Agimofa769c152019-03-04 14:39:14 +0000389 AppsOnExternalStorageInfo apps_on_external_storage_info = 10057;
joshmccloskey34c1f8e2019-04-11 14:06:43 -0700390 FaceSettings face_settings = 10058;
Maggie White442b6312019-04-05 16:26:44 -0700391 CoolingDevice cooling_device = 10059;
Martijn Coenencd95d462019-04-25 17:09:45 +0200392 AppOps app_ops = 10060;
Rafal Slawik6d44d6d2019-06-17 12:28:23 +0100393 ProcessSystemIonHeapSize process_system_ion_heap_size = 10061;
David Chenc8a43242017-10-17 16:23:28 -0700394 }
yroa1fe77c2018-02-26 14:22:54 -0800395
Bookatz76aafcf2018-09-17 16:17:10 -0700396 // DO NOT USE field numbers above 100,000 in AOSP.
397 // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
398 // Field numbers 200,000 and above are reserved for future use; do not use them at all.
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700399}
400
Yao Chend54f9dd2017-10-17 17:37:48 +0000401/**
Yangster-mac20877162017-12-22 17:19:39 -0800402 * This proto represents a node of an attribution chain.
403 * Note: All attribution chains are represented as a repeated field of type
404 * AttributionNode. It is understood that in such arrays, the order is that
405 * of calls, that is [A, B, C] if A calls B that calls C.
Yao Chend54f9dd2017-10-17 17:37:48 +0000406 */
Yangster-mac20877162017-12-22 17:19:39 -0800407message AttributionNode {
408 // The uid for a given element in the attribution chain.
Yangster-mac7604aea2017-12-11 22:55:49 -0800409 optional int32 uid = 1;
Yangster-mac7604aea2017-12-11 22:55:49 -0800410
Yangster-mac20877162017-12-22 17:19:39 -0800411 // The (optional) string tag for an element in the attribution chain. If the
412 // element has no tag, it is encoded as an empty string.
413 optional string tag = 2;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700414}
415
Yangster-mac48b3d622018-08-18 12:38:11 -0700416message KeyValuePair {
417 optional int32 key = 1;
418 oneof value {
Howard Ro4078dd42018-09-27 17:41:08 -0700419 int32 value_int = 2;
420 int64 value_long = 3;
421 string value_str = 4;
422 float value_float = 5;
Yangster-mac48b3d622018-08-18 12:38:11 -0700423 }
424}
425
426message KeyValuePairsAtom {
427 optional int32 uid = 1;
428 repeated KeyValuePair pairs = 2;
429}
430
Yao Chend54f9dd2017-10-17 17:37:48 +0000431/*
432 * *****************************************************************************
yrode4ca102017-11-15 22:57:24 -0800433 * Below are all of the individual atoms that are logged by Android via statsd.
Yao Chend54f9dd2017-10-17 17:37:48 +0000434 *
435 * RULES:
436 * - The field ids for each atom must start at 1, and count upwards by 1.
437 * Skipping field ids is not allowed.
438 * - These form an API, so renaming, renumbering or removing fields is
439 * not allowed between android releases. (This is not currently enforced,
440 * but there will be a tool to enforce this restriction).
441 * - The types must be built-in protocol buffer types, namely, no sub-messages
442 * are allowed (yet). The bytes type is also not allowed.
443 * - The CamelCase name of the message type should match the
Stefan Lafonae2df012017-11-14 09:17:21 -0800444 * underscore_separated name as defined in Atom.
Yao Chend54f9dd2017-10-17 17:37:48 +0000445 * - If an atom represents work that can be attributed to an app, there can
Yangster-mac7604aea2017-12-11 22:55:49 -0800446 * be exactly one AttributionChain field. It must be field number 1.
Yao Chend54f9dd2017-10-17 17:37:48 +0000447 * - A field that is a uid should be a string field, tagged with the [xxx]
448 * annotation. The generated code on android will be represented by UIDs,
449 * and those UIDs will be translated in xxx to those strings.
450 *
451 * CONVENTIONS:
Bookatzc1a050a2017-10-10 15:49:28 -0700452 * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange.
Yao Chend54f9dd2017-10-17 17:37:48 +0000453 * - If there is a UID, it goes first. Think in an object-oriented fashion.
454 * *****************************************************************************
455 */
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700456
Yao Chend54f9dd2017-10-17 17:37:48 +0000457/**
Tej Singha72344992019-04-17 18:55:08 -0700458 * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged.
Yangster-mace16189a2018-08-26 12:20:16 -0700459 * Logs when the Thermal service HAL notifies the throttling start/stop events.
460 *
461 * Logged from:
462 * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
463 */
464message ThermalThrottlingStateChanged {
Maggie White442b6312019-04-05 16:26:44 -0700465 // The type of temperature being reported (CPU, GPU, SKIN, etc)
Yangster-mace16189a2018-08-26 12:20:16 -0700466 optional android.os.TemperatureTypeEnum sensor_type = 1;
467
Maggie White442b6312019-04-05 16:26:44 -0700468 // Throttling state, this field is DEPRECATED
Yangster-mace16189a2018-08-26 12:20:16 -0700469 enum State {
470 UNKNOWN = 0;
Maggie White442b6312019-04-05 16:26:44 -0700471 START = 1; // START indicated that throttling was triggered.
472 STOP = 2; // STOP indicates that throttling was cleared.
Yangster-mace16189a2018-08-26 12:20:16 -0700473 }
Yangster-mace16189a2018-08-26 12:20:16 -0700474 optional State state = 2;
475
476 optional float temperature = 3;
477}
478
479/**
Yao Chend54f9dd2017-10-17 17:37:48 +0000480 * Logs when the screen state changes.
481 *
482 * Logged from:
483 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
484 */
485message ScreenStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -0800486 // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
Yangster-macb6b77c62018-10-12 19:33:24 -0700487 optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE];
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700488}
Yao Chend54f9dd2017-10-17 17:37:48 +0000489
490/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700491 * Logs that the process state of the uid, as determined by ActivityManager
492 * (i.e. the highest process state of that uid's processes) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +0000493 *
494 * Logged from:
495 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
496 */
Bookatzc1a050a2017-10-10 15:49:28 -0700497message UidProcessStateChanged {
Yangster-macb6b77c62018-10-12 19:33:24 -0700498 optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true];
Yao Chend54f9dd2017-10-17 17:37:48 +0000499
Bookatzdb026a22018-01-10 19:01:56 -0800500 // The state, from frameworks/base/core/proto/android/app/enums.proto.
Yangster-macb6b77c62018-10-12 19:33:24 -0700501 optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE];
Yao Chend54f9dd2017-10-17 17:37:48 +0000502}
503
504/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700505 * Logs process state change of a process, as per the activity manager.
506 *
507 * Logged from:
508 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
509 */
510message ProcessStateChanged {
511 optional int32 uid = 1;
512 optional string process_name = 2;
513 optional string package_name = 3;
514 // TODO: remove this when validation is done
515 optional int64 version = 5;
516 // The state, from frameworks/base/core/proto/android/app/enums.proto.
517 optional android.app.ProcessStateEnum state = 4;
518}
519
520/**
521 * Logs when ActivityManagerService sleep state is changed.
522 *
523 * Logged from:
524 * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java
525 */
526message ActivityManagerSleepStateChanged {
527 // TODO: import frameworks proto
528 enum State {
529 UNKNOWN = 0;
530 ASLEEP = 1;
531 AWAKE = 2;
532 }
Yangster-macb6b77c62018-10-12 19:33:24 -0700533 optional State state = 1 [(state_field_option).option = EXCLUSIVE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700534}
535
536/**
537 * Logs when system memory state changes.
538 *
539 * Logged from:
540 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
541 */
542message MemoryFactorStateChanged {
543 // TODO: import frameworks proto
544 enum State {
545 MEMORY_UNKNOWN = 0;
546 NORMAL = 1; // normal.
547 MODERATE = 2; // moderate memory pressure.
548 LOW = 3; // low memory.
549 CRITICAL = 4; // critical memory.
550
551 }
Yangster-macb6b77c62018-10-12 19:33:24 -0700552 optional State factor = 1 [(state_field_option).option = EXCLUSIVE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700553}
554
555/**
556 * Logs when app is using too much cpu, according to ActivityManagerService.
557 *
558 * Logged from:
559 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
560 */
561message ExcessiveCpuUsageReported {
562 optional int32 uid = 1;
563 optional string process_name = 2;
564 optional string package_name = 3;
565 // package version. TODO: remove this when validation is done
566 optional int64 version = 4;
567}
568
569/**
570 * Logs when a cached process is killed, along with its pss.
571 *
572 * Logged from:
573 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
574 */
575message CachedKillReported {
576 optional int32 uid = 1;
577 optional string process_name = 2;
578 optional string package_name = 3;
579 // TODO: remove this when validation is done
580 optional int64 version = 5;
581 optional int64 pss = 4;
582}
583
584/**
585 * Logs when memory stats of a process is reported.
586 *
587 * Logged from:
588 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
589 */
590message ProcessMemoryStatReported {
591 optional int32 uid = 1;
592 optional string process_name = 2;
593 optional string package_name = 3;
594 //TODO: remove this when validation is done
595 optional int64 version = 9;
596 optional int64 pss = 4;
597 optional int64 uss = 5;
598 optional int64 rss = 6;
599 enum Type {
600 ADD_PSS_INTERNAL_SINGLE = 0;
601 ADD_PSS_INTERNAL_ALL_MEM = 1;
602 ADD_PSS_INTERNAL_ALL_POLL = 2;
603 ADD_PSS_EXTERNAL = 3;
604 ADD_PSS_EXTERNAL_SLOW = 4;
605 }
606 optional Type type = 7;
Muhammad Qureshidda73202019-03-07 13:54:20 -0800607 optional int64 duration_millis = 8;
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700608}
609
610/**
Bookatzc1a050a2017-10-10 15:49:28 -0700611 * Logs that a process started, finished, crashed, or ANRed.
612 *
613 * Logged from:
614 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
615 */
616message ProcessLifeCycleStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -0700617 optional int32 uid = 1 [(is_uid) = true];
Bookatzc1a050a2017-10-10 15:49:28 -0700618
David Chen0b5c90c2018-01-25 16:51:49 -0800619 // The process name (usually same as the app name).
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800620 optional string process_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700621
Bookatzddccf0a2017-11-28 16:48:14 -0800622 // What lifecycle state the process changed to.
623 // This enum is specific to atoms.proto.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800624 enum State {
625 FINISHED = 0;
626 STARTED = 1;
627 CRASHED = 2;
Bookatzddccf0a2017-11-28 16:48:14 -0800628 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800629 optional State state = 3;
Bookatzc1a050a2017-10-10 15:49:28 -0700630}
631
Bookatzc1a050a2017-10-10 15:49:28 -0700632/**
633 * Logs when the ble scan state changes.
634 *
635 * Logged from:
Bookatz17a879d2018-03-28 15:05:28 -0700636 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700637 */
638message BleScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800639 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700640
641 enum State {
642 OFF = 0;
643 ON = 1;
Bookatze5ec0b42018-03-26 13:34:56 -0700644 // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
645 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700646 }
647 optional State state = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700648
Bookatze5ec0b42018-03-26 13:34:56 -0700649 // Does the scan have a filter.
650 optional bool is_filtered = 3;
651 // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
652 optional bool is_first_match = 4;
653 // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
654 optional bool is_opportunistic = 5;
Bookatzc1a050a2017-10-10 15:49:28 -0700655}
656
657/**
658 * Logs reporting of a ble scan finding results.
659 *
660 * Logged from:
Bookatzae6738e2018-09-13 11:38:56 -0700661 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700662 */
Bookatzae6738e2018-09-13 11:38:56 -0700663// TODO: Consider also tracking per-scanner-id.
Bookatzc1a050a2017-10-10 15:49:28 -0700664message BleScanResultReceived {
Yangster-macafad8c62018-01-05 22:30:49 -0800665 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700666
667 // Number of ble scan results returned.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800668 optional int32 num_results = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700669}
670
671/**
672 * Logs when a sensor state changes.
673 *
674 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700675 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700676 */
677message SensorStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800678 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700679
Bookatzc1a050a2017-10-10 15:49:28 -0700680 // The id (int) of the sensor.
681 optional int32 sensor_id = 2;
682
683 enum State {
684 OFF = 0;
685 ON = 1;
686 }
687 optional State state = 3;
688}
689
Bookatzc1a050a2017-10-10 15:49:28 -0700690/**
691 * Logs when GPS state changes.
692 *
693 * Logged from:
694 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
695 */
696message GpsScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800697 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700698
699 enum State {
700 OFF = 0;
701 ON = 1;
702 }
703 optional State state = 2;
704}
705
Bookatz48d362e2018-11-06 15:49:08 -0800706/**
707 * Logs when GPS signal quality.
708 *
709 * Logged from:
710 * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
711 */
712message GpsSignalQualityChanged {
713 optional android.server.location.GpsSignalQualityEnum level = 1;
714}
715
Bookatzc1a050a2017-10-10 15:49:28 -0700716
717/**
718 * Logs when a sync manager sync state changes.
719 *
720 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700721 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700722 */
723message SyncStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800724 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700725
David Chen0b5c90c2018-01-25 16:51:49 -0800726 // Name of the sync (as named in the app). Can be chosen at run-time.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800727 optional string sync_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700728
729 enum State {
730 OFF = 0;
731 ON = 1;
732 }
733 optional State state = 3;
734}
735
Yangster-mac96353002018-09-05 11:18:55 -0700736/*
737 * Deferred job stats.
738 *
739 * Logged from:
740 * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
741*/
742message DeferredJobStatsReported {
743 repeated AttributionNode attribution_node = 1;
744
745 // Number of jobs deferred.
746 optional int32 num_jobs_deferred = 2;
747
748 // Time since the last job runs.
749 optional int64 time_since_last_job_millis = 3;
750}
751
Bookatzc1a050a2017-10-10 15:49:28 -0700752/**
753 * Logs when a job scheduler job state changes.
754 *
755 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700756 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700757 */
758message ScheduledJobStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800759 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700760
761 // Name of the job (as named in the app)
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800762 optional string job_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700763
764 enum State {
Tej Singhd5747a62018-01-08 20:57:35 -0800765 FINISHED = 0;
766 STARTED = 1;
767 SCHEDULED = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700768 }
769 optional State state = 3;
770
Tej Singh33a412b2018-03-16 18:43:59 -0700771 // The reason a job has stopped.
772 // This is only applicable when the state is FINISHED.
Bookatz235343d2018-03-26 13:03:50 -0700773 // The default value is STOP_REASON_UNKNOWN.
Tej Singh33a412b2018-03-16 18:43:59 -0700774 optional android.app.job.StopReasonEnum stop_reason = 4;
Ben Murdoch741e3352019-05-09 11:27:28 +0100775
776 // The standby bucket of the app that scheduled the job. These match the framework constants
777 // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is
778 // already assigned 0.
779 enum Bucket {
780 UNKNOWN = -1;
781 ACTIVE = 0;
782 WORKING_SET = 1;
783 FREQUENT = 2;
784 RARE = 3;
785 NEVER = 4;
786 }
787 optional Bucket standby_bucket = 5 [default = UNKNOWN];
788
789 // The job id (as assigned by the app).
790 optional int32 job_id = 6;
Bookatzc1a050a2017-10-10 15:49:28 -0700791}
792
793/**
794 * Logs when the audio state changes.
795 *
796 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700797 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700798 */
799message AudioStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800800 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700801
802 enum State {
803 OFF = 0;
804 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700805 // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
806 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700807 }
808 optional State state = 2;
809}
810
811/**
812 * Logs when the video codec state changes.
813 *
814 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700815 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700816 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800817message MediaCodecStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800818 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700819
820 enum State {
821 OFF = 0;
822 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700823 // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes).
824 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700825 }
826 optional State state = 2;
827}
828
829/**
830 * Logs when the flashlight state changes.
831 *
832 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700833 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700834 */
835message FlashlightStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800836 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700837
838 enum State {
839 OFF = 0;
840 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700841 // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes).
842 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700843 }
844 optional State state = 2;
845}
846
847/**
848 * Logs when the camera state changes.
849 *
850 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700851 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700852 */
853message CameraStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800854 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700855
856 enum State {
857 OFF = 0;
858 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700859 // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes).
860 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700861 }
862 optional State state = 2;
863}
864
865/**
866 * Logs that the state of a wakelock (per app and per wakelock name) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +0000867 *
868 * Logged from:
869 * TODO
870 */
Bookatzd6746242017-10-24 18:39:35 -0700871message WakelockStateChanged {
Yangster-mac20877162017-12-22 17:19:39 -0800872 repeated AttributionNode attribution_node = 1;
Yao Chend54f9dd2017-10-17 17:37:48 +0000873
Bookatz1a1b0462018-01-12 11:47:03 -0800874 // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
875 // From frameworks/base/core/proto/android/os/enums.proto.
Yangster-maca8a30442018-10-13 23:46:34 -0700876 optional android.os.WakeLockLevelEnum type = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700877
878 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
879 optional string tag = 3;
880
881 enum State {
Yangster-maccfdf3a42017-12-06 13:42:38 -0800882 RELEASE = 0;
883 ACQUIRE = 1;
884 CHANGE_RELEASE = 2;
885 CHANGE_ACQUIRE = 3;
Bookatzc1a050a2017-10-10 15:49:28 -0700886 }
887 optional State state = 4;
888}
889
890/**
Bookatzc1a050a2017-10-10 15:49:28 -0700891 * Logs when a partial wakelock is considered 'long' (over 1 min).
892 *
893 * Logged from:
894 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
895 */
896message LongPartialWakelockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800897 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700898
Yao Chend54f9dd2017-10-17 17:37:48 +0000899 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
900 optional string tag = 2;
901
Bookatzc1a050a2017-10-10 15:49:28 -0700902 // TODO: I have no idea what this is.
903 optional string history_tag = 3;
904
905 enum State {
906 OFF = 0;
907 ON = 1;
908 }
909 optional State state = 4;
Yao Chend54f9dd2017-10-17 17:37:48 +0000910}
911
Bookatzc1a050a2017-10-10 15:49:28 -0700912/**
Bookatza66083f2018-09-20 17:24:00 -0700913 * Logs when the device is interactive, according to the PowerManager Notifier.
914 *
915 * Logged from:
916 * frameworks/base/services/core/java/com/android/server/power/Notifier.java
917 */
918message InteractiveStateChanged {
919 enum State {
920 OFF = 0;
921 ON = 1;
922 }
923 optional State state = 1;
924}
925
926/**
Bookatzc1a050a2017-10-10 15:49:28 -0700927 * Logs Battery Saver state change.
928 *
929 * Logged from:
930 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
931 */
932message BatterySaverModeStateChanged {
933 enum State {
934 OFF = 0;
935 ON = 1;
936 }
937 optional State state = 1;
938}
939
940/**
941 * Logs Doze mode state change.
942 *
943 * Logged from:
Bookatzddccf0a2017-11-28 16:48:14 -0800944 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatzc1a050a2017-10-10 15:49:28 -0700945 */
946message DeviceIdleModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -0800947 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzddccf0a2017-11-28 16:48:14 -0800948}
949
950
951/**
952 * Logs state change of Doze mode including maintenance windows.
953 *
954 * Logged from:
955 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
956 */
957message DeviceIdlingModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -0800958 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700959}
960
961/**
962 * Logs screen brightness level.
963 *
964 * Logged from:
965 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
966 */
967message ScreenBrightnessChanged {
968 // Screen brightness level. Should be in [-1, 255] according to PowerManager.java.
969 optional int32 level = 1;
Bookatz8c6571b2017-10-24 15:04:41 -0700970}
971
972/**
973 * Logs battery level (percent full, from 0 to 100).
974 *
975 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -0700976 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -0700977 */
978message BatteryLevelChanged {
979 // Battery level. Should be in [0, 100].
980 optional int32 battery_level = 1;
981}
982
983/**
984 * Logs change in charging status of the device.
985 *
986 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -0700987 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -0700988 */
989message ChargingStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -0800990 // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
991 optional android.os.BatteryStatusEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -0700992}
993
994/**
995 * Logs whether the device is plugged in, and what power source it is using.
996 *
997 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -0700998 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -0700999 */
1000message PluggedStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001001 // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
1002 optional android.os.BatteryPluggedStateEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -07001003}
1004
Bookatz8c6571b2017-10-24 15:04:41 -07001005/**
1006 * Logs when an app's wakeup alarm fires.
1007 *
1008 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001009 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
Bookatz8c6571b2017-10-24 15:04:41 -07001010 */
1011message WakeupAlarmOccurred {
Yangster-macafad8c62018-01-05 22:30:49 -08001012 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001013
1014 // Name of the wakeup alarm.
1015 optional string tag = 2;
Bookatzcaf2293e2018-09-23 13:07:43 -07001016
1017 // Name of source package (for historical reasons, since BatteryStats tracked it).
1018 optional string package_name = 3;
Ben Murdoch3389f1522019-05-21 15:05:34 +01001019
1020 // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java.
1021 enum Bucket {
1022 UNKNOWN = 0;
1023 EXEMPTED = 5;
1024 ACTIVE = 10;
1025 WORKING_SET = 20;
1026 FREQUENT = 30;
1027 RARE = 40;
1028 NEVER = 50;
1029 }
1030 // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired.
1031 optional Bucket app_standby_bucket = 4;
Bookatzddccf0a2017-11-28 16:48:14 -08001032}
1033
1034/**
1035 * Logs when an an app causes the mobile radio to change state.
1036 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio.
1037 *
1038 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -07001039 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -08001040 */
1041message MobileRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08001042 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001043
Bookatz1a1b0462018-01-12 11:47:03 -08001044 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
1045 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatzddccf0a2017-11-28 16:48:14 -08001046}
1047
1048/**
1049 * Logs when an an app causes the wifi radio to change state.
1050 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio.
1051 *
1052 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -07001053 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -08001054 */
1055message WifiRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08001056 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -08001057
Bookatz1a1b0462018-01-12 11:47:03 -08001058 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
1059 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatz8c6571b2017-10-24 15:04:41 -07001060}
1061
1062/**
1063 * Logs kernel wakeup reasons and aborts.
1064 *
1065 * Logged from:
Bookatz56585ca2018-09-07 11:38:45 -07001066 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -07001067 */
1068message KernelWakeupReported {
1069 // Name of the kernel wakeup reason (or abort).
1070 optional string wakeup_reason_name = 1;
1071
1072 // Duration (in microseconds) for the wake-up interrupt to be serviced.
David Chen0b5c90c2018-01-25 16:51:49 -08001073 optional int64 duration_micros = 2;
Bookatze5885242017-10-24 20:10:31 -07001074}
1075
1076/**
Bookatzda1798c2018-12-13 14:16:00 -08001077 * Logs when Wifi is toggled on/off.
Bookatza0a1f8a2018-12-17 12:28:32 -08001078 * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled.
Bookatzda1798c2018-12-13 14:16:00 -08001079 *
1080 * Logged from:
1081 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1082 */
1083message WifiEnabledStateChanged {
1084 enum State {
1085 OFF = 0;
1086 ON = 1;
1087 }
1088 optional State state = 1;
1089}
1090
1091/**
1092 * 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 -08001093 * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'.
1094 * Note that Wifi Scanning is monitored separately in WifiScanStateChanged.
Bookatzda1798c2018-12-13 14:16:00 -08001095 *
1096 * Logged from:
1097 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
1098 */
1099message WifiRunningStateChanged {
1100 repeated AttributionNode attribution_node = 1;
1101
1102 enum State {
1103 OFF = 0;
1104 ON = 1;
1105 }
1106 optional State state = 2;
1107}
1108
1109/**
Bookatze5885242017-10-24 20:10:31 -07001110 * Logs wifi locks held by an app.
1111 *
1112 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001113 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07001114 */
1115message WifiLockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001116 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001117
1118 enum State {
1119 OFF = 0;
1120 ON = 1;
1121 }
1122 optional State state = 2;
Bookatz11257ca2018-12-05 18:22:39 -08001123
1124 // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto.
1125 optional android.net.wifi.WifiModeEnum mode = 3;
Bookatze5885242017-10-24 20:10:31 -07001126}
1127
1128/**
1129 * Logs wifi signal strength changes.
1130 *
1131 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001132 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
Bookatze5885242017-10-24 20:10:31 -07001133 */
1134message WifiSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001135 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
1136 optional android.telephony.SignalStrengthEnum signal_strength = 1;
Bookatze5885242017-10-24 20:10:31 -07001137}
1138
1139/**
1140 * Logs wifi scans performed by an app.
1141 *
1142 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001143 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
Bookatze5885242017-10-24 20:10:31 -07001144 */
1145message WifiScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001146 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001147
1148 enum State {
1149 OFF = 0;
1150 ON = 1;
1151 }
1152 optional State state = 2;
1153}
1154
1155/**
Tej Singh4503e102018-01-04 14:35:01 -08001156 * Logs wifi multicast locks held by an app
1157 *
1158 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001159 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java
Tej Singh4503e102018-01-04 14:35:01 -08001160 */
1161message WifiMulticastLockStateChanged {
1162 repeated AttributionNode attribution_node = 1;
1163
1164 enum State {
1165 OFF = 0;
1166 ON = 1;
1167 }
1168 optional State state = 2;
Bookatz819ea832018-11-28 16:53:31 -08001169
1170 optional string tag = 3;
Tej Singh4503e102018-01-04 14:35:01 -08001171}
1172
1173/**
Tej Singh1ea42892018-01-19 09:27:00 -08001174 * Logs shutdown reason and duration on next boot.
1175 *
1176 * Logged from:
1177 * frameworks/base/core/java/com/android/server/BootReceiver.java
1178 */
1179message ShutdownSequenceReported {
1180 // True if shutdown is for a reboot. Default: false if we do not know.
1181 optional bool reboot = 1;
1182
1183 // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>".
1184 optional string reason = 2;
1185
1186 // Beginning of shutdown time in ms using wall clock time since unix epoch.
1187 // Default: 0 if no start time received.
David Chen0b5c90c2018-01-25 16:51:49 -08001188 optional int64 start_time_millis = 3;
Tej Singh1ea42892018-01-19 09:27:00 -08001189
1190 // Duration of shutdown in ms. Default: 0 if no duration received.
David Chen0b5c90c2018-01-25 16:51:49 -08001191 optional int64 duration_millis = 4;
Tej Singh1ea42892018-01-19 09:27:00 -08001192}
1193
Tej Singh6483ea42018-01-25 17:45:49 -08001194
1195/**
1196 * Logs boot reason and duration.
1197 *
1198 * Logged from:
1199 * system/core/bootstat/bootstat.cpp
1200 */
1201message BootSequenceReported {
1202 // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list
1203 // Default: "<EMPTY>" if not available.
1204 optional string bootloader_reason = 1;
1205
1206 // Reason for system boot. Eg. bootloader, reboot,userrequested
1207 // Default: "<EMPTY>" if not available.
1208 optional string system_reason = 2;
1209
1210 // End of boot time in ms from unix epoch using system wall clock.
David Chen0b5c90c2018-01-25 16:51:49 -08001211 optional int64 end_time_millis = 3;
Tej Singh6483ea42018-01-25 17:45:49 -08001212
1213 // Total boot duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001214 optional int64 total_duration_millis = 4;
Tej Singh6483ea42018-01-25 17:45:49 -08001215
1216 // Bootloader duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001217 optional int64 bootloader_duration_millis = 5;
Tej Singh6483ea42018-01-25 17:45:49 -08001218
1219 // Time since last boot in ms. Default: 0 if not available.
1220 optional int64 time_since_last_boot = 6;
1221}
1222
Tej Singhc477d9c2018-02-05 18:31:39 -08001223
1224/**
1225 * Logs call state and disconnect cause (if applicable).
1226 *
1227 * Logged from:
1228 * packages/services/Telecomm/src/com/android/server/telecom/Call.java
1229 */
1230message CallStateChanged {
1231 // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED.
1232 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1233 optional android.telecom.CallStateEnum call_state = 1;
1234
1235 // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY.
1236 // This value is only applicable when the call_state is DISCONNECTED, and
1237 // should always be UNKNOWN if the call_state is not DISCONNECTED.
1238 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1239 optional android.telecom.DisconnectCauseEnum disconnect_cause = 2;
1240
1241 // True if the call is self-managed, which are apps that use the
1242 // telecom infrastructure to make their own calls.
1243 optional bool self_managed = 3;
1244
1245 // True if call is external. External calls are calls on connected Wear
1246 // devices but show up in Telecom so the user can pull them onto the device.
1247 optional bool external_call = 4;
1248}
1249
Tej Singh1ea42892018-01-19 09:27:00 -08001250/**
Tej Singhdd7bd352018-02-09 19:33:15 -08001251 * Logs keyguard state. The keyguard is the lock screen.
1252 *
1253 * Logged from:
1254 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
1255 */
1256message KeyguardStateChanged {
1257 enum State {
1258 UNKNOWN = 0;
1259 // The keyguard is hidden when the phone is unlocked.
1260 HIDDEN = 1;
1261 // The keyguard is shown when the phone is locked (screen turns off).
1262 SHOWN= 2;
1263 // The keyguard is occluded when something is overlaying the keyguard.
1264 // Eg. Opening the camera while on the lock screen.
1265 OCCLUDED = 3;
1266 }
1267 optional State state = 1;
1268}
1269
1270/**
1271 * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and
1272 * prompts the user to enter a password (pattern, pin, etc).
1273 *
1274 * Logged from:
1275 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
1276 */
1277
1278message KeyguardBouncerStateChanged {
1279 enum State {
1280 UNKNOWN = 0;
1281 // Bouncer is hidden, either as a result of successfully entering the
1282 // password, screen timing out, or user going back to lock screen.
1283 HIDDEN = 1;
1284 // This is when the user is being prompted to enter the password.
1285 SHOWN = 2;
1286 }
1287 optional State state = 1;
1288}
1289
1290/**
1291 * Logs the result of entering a password into the keyguard bouncer.
1292 *
1293 * Logged from:
1294 * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
1295 */
1296message KeyguardBouncerPasswordEntered {
1297 enum BouncerResult {
1298 UNKNOWN = 0;
1299 // The password entered was incorrect.
1300 FAILURE = 1;
1301 // The password entered was correct.
1302 SUCCESS = 2;
1303 }
1304 optional BouncerResult result = 1;
1305}
1306
Tej Singha883b372018-02-15 11:30:01 -08001307/*
1308 * Logs changes to the configuration of the device. The configuration is defined
1309 * in frameworks/base/core/java/android/content/res/Configuration.java
1310 * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html
1311 * Please go there to interpret the possible values each field can be.
1312 *
1313 * Logged from:
1314 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
1315 */
1316message ResourceConfigurationChanged {
1317 // Bit mask of color capabilities of the screen.
1318 // Contains information about the color gamut and hdr mode of the screen.
1319 // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode
Yangster-maca8a30442018-10-13 23:46:34 -07001320 optional int32 color_mode = 1;
Tej Singha883b372018-02-15 11:30:01 -08001321
1322 // The target screen density being rendered to.
1323 // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi
Yangster-maca8a30442018-10-13 23:46:34 -07001324 optional int32 density_dpi = 2;
Tej Singha883b372018-02-15 11:30:01 -08001325
1326 // Current user preference for the scaling factor for fonts,
1327 // relative to the base density scaling.
1328 // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale
Yangster-maca8a30442018-10-13 23:46:34 -07001329 optional float font_scale = 3;
Tej Singha883b372018-02-15 11:30:01 -08001330
1331 // Flag indicating whether the hard keyboard is hidden.
1332 // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001333 optional int32 hard_keyboard_hidden = 4;
Tej Singha883b372018-02-15 11:30:01 -08001334
1335 // The type of keyboard attached to the device.
1336 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard
1337 optional int32 keyboard = 5;
1338
1339 // Flag indicating whether any keyboard is available. Takes soft keyboards into account.
1340 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001341 optional int32 keyboard_hidden = 6;
Tej Singha883b372018-02-15 11:30:01 -08001342
1343 // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier.
1344 // 0 if undefined.
1345 // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc
1346 optional int32 mcc = 7;
1347
1348 // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier.
1349 // 0 if undefined. Note: the actual MNC may be 0, to check for this use the
1350 // MNC_ZERO symbol defined in Configuration.java.
1351 // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc
1352 optional int32 mnc = 8;
1353
1354 // The kind of navigation available on the device.
1355 // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation
1356 optional int32 navigation = 9;
1357
1358 // Flag indicating whether the navigation is available.
1359 // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001360 optional int32 navigation_hidden = 10;
Tej Singha883b372018-02-15 11:30:01 -08001361
1362 // Overall orientation of the screen.
1363 // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation
1364 optional int32 orientation = 11;
1365
1366 // The current height of the available screen space, in dp units.
1367 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp
Yangster-maca8a30442018-10-13 23:46:34 -07001368 optional int32 screen_height_dp = 12;
Tej Singha883b372018-02-15 11:30:01 -08001369
1370 // Bit mask of overall layout of the screen.
1371 // Contains information about screen size, whether the screen is wider/taller
1372 // than normal, whether the screen layout is right-tl-left or left-to-right,
1373 // and whether the screen has a rounded shape.
1374 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout
Yangster-maca8a30442018-10-13 23:46:34 -07001375 optional int32 screen_layout = 13;
Tej Singha883b372018-02-15 11:30:01 -08001376
1377 // Current width of the available screen space, in dp units.
1378 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001379 optional int32 screen_width_dp = 14;
Tej Singha883b372018-02-15 11:30:01 -08001380
1381 // The smallest screen size an application will see in normal operation.
1382 // This is the smallest value of both screenWidthDp and screenHeightDp
1383 // in portrait and landscape.
1384 // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001385 optional int32 smallest_screen_width_dp = 15;
Tej Singha883b372018-02-15 11:30:01 -08001386
1387 // The type of touch screen attached to the device.
1388 // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen
1389 optional int32 touchscreen = 16;
1390
1391 // Bit mask of the ui mode.
1392 // Contains information about the overall ui mode of the device.
1393 // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET
1394 // Also contains information about whether the device is in night mode.
1395 // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode
Yangster-maca8a30442018-10-13 23:46:34 -07001396 optional int32 ui_mode = 17;
Tej Singha883b372018-02-15 11:30:01 -08001397}
1398
Tej Singheee317b2018-03-07 19:28:05 -08001399
1400/**
1401 * Logs changes in the connection state of the mobile radio.
1402 *
1403 * Logged from:
1404 * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
1405 */
1406message MobileConnectionStateChanged {
1407 // States are from the state machine DataConnection.java.
1408 enum State {
1409 UNKNOWN = 0;
1410 // The connection is inactive, or disconnected.
1411 INACTIVE = 1;
1412 // The connection is being activated, or connecting.
1413 ACTIVATING = 2;
1414 // The connection is active, or connected.
1415 ACTIVE = 3;
1416 // The connection is disconnecting.
1417 DISCONNECTING = 4;
1418 // The connection is disconnecting after creating a connection.
1419 DISCONNECTION_ERROR_CREATING_CONNECTION = 5;
1420 }
1421 optional State state = 1;
1422 // For multi-sim phones, this distinguishes between the sim cards.
1423 optional int32 sim_slot_index = 2;
1424 // Used to identify the connection. Starts at 0 and increments by 1 for
1425 // every new network created. Resets whenever the device reboots.
1426 optional int32 data_connection_id = 3;
1427 // A bitmask for the capabilities of this connection.
1428 // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS.
1429 // Default value (if we have no information): 0
1430 optional int64 capabilities = 4;
1431 // If this connection has internet.
1432 // This just checks if the DEFAULT bit of capabilities is set.
1433 optional bool has_internet = 5;
1434}
1435
1436/**
1437 * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA.
1438 *
1439 * Logged from:
1440 * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
1441 */
1442message MobileRadioTechnologyChanged {
1443 optional android.telephony.NetworkTypeEnum state = 1;
1444 // For multi-sim phones, this distinguishes between the sim cards.
1445 optional int32 sim_slot_index = 2;
1446}
1447
Andrew Chantb56388b2018-03-22 21:07:33 -07001448/**
1449 * Logs the VID and PID of any connected USB devices.
1450 *
1451 * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present.
1452 *
1453 * Logged by Vendor.
1454 */
1455message UsbDeviceAttached {
1456 optional int32 vid = 1;
1457 optional int32 pid = 2;
1458 optional bool has_audio = 3;
1459 optional bool has_hid = 4;
1460 optional bool has_storage = 5;
Badhri Jagan Sridharan5ec629f2018-11-16 15:39:22 -08001461 enum State {
1462 STATE_DISCONNECTED = 0;
1463 STATE_CONNECTED = 1;
1464 }
1465 optional State state = 6;
Badhri Jagan Sridharanc2c54a22018-12-14 14:41:26 -08001466 optional int64 last_connect_duration_millis = 7;
Andrew Chantb56388b2018-03-22 21:07:33 -07001467}
1468
Tej Singheee317b2018-03-07 19:28:05 -08001469
Tej Singhdd7bd352018-02-09 19:33:15 -08001470/**
Tej Singh5d991e12018-03-09 19:48:11 -08001471 * Logs when Bluetooth is enabled and disabled.
1472 *
1473 * Logged from:
1474 * services/core/java/com/android/server/BluetoothManagerService.java
1475 */
1476message BluetoothEnabledStateChanged {
1477 repeated AttributionNode attribution_node = 1;
1478 // Whether or not bluetooth is enabled on the device.
1479 enum State {
1480 UNKNOWN = 0;
1481 ENABLED = 1;
1482 DISABLED = 2;
1483 }
1484 optional State state = 2;
1485 // The reason for being enabled/disabled.
1486 // Eg. Airplane mode, crash, application request.
1487 optional android.bluetooth.EnableDisableReasonEnum reason = 3;
1488 // If the reason is an application request, this will be the package name.
Yangster-maca8a30442018-10-13 23:46:34 -07001489 optional string pkg_name = 4;
Tej Singh5d991e12018-03-09 19:48:11 -08001490}
1491
1492/**
Jack Hed9837c82019-01-09 01:19:13 -08001493 * Logs when profiles on a Bluetooth device connects and disconnects.
Tej Singh5d991e12018-03-09 19:48:11 -08001494 *
1495 * Logged from:
Jack Hed9837c82019-01-09 01:19:13 -08001496 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
1497 *
1498 * Next Tag: 5
Tej Singh5d991e12018-03-09 19:48:11 -08001499 */
1500message BluetoothConnectionStateChanged {
1501 // The state of the connection.
1502 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1503 optional android.bluetooth.ConnectionStateEnum state = 1;
1504 // An identifier that can be used to match connect and disconnect events.
1505 // Currently is last two bytes of a hash of a device level ID and
1506 // the mac address of the bluetooth device that is connected.
Jack Hed9837c82019-01-09 01:19:13 -08001507 // Deprecated: use obfuscated_id instead, this one is always 0 for Q+
Jack Heac33c992019-04-03 16:08:21 -07001508 optional int32 obfuscated_id = 2 [deprecated = true];
Tej Singh5d991e12018-03-09 19:48:11 -08001509 // The profile that is connected. Eg. GATT, A2DP, HEADSET.
1510 // From android.bluetooth.BluetoothAdapter.java
Jack Hed9837c82019-01-09 01:19:13 -08001511 // Default: 0 when not used
Tej Singh5d991e12018-03-09 19:48:11 -08001512 optional int32 bt_profile = 3;
Jack Hed9837c82019-01-09 01:19:13 -08001513 // An identifier that can be used to match events for this device.
1514 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1515 // Salt: Randomly generated 256 bit value
1516 // Hash algorithm: HMAC-SHA256
1517 // Size: 32 byte
1518 // Default: null or empty if the device identifier is not known
Jack Heac33c992019-04-03 16:08:21 -07001519 optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
Jack Hed9837c82019-01-09 01:19:13 -08001520}
1521
1522/**
1523 * Logs when a Bluetooth device connects and disconnects over ACL
1524 *
1525 * Logged from:
1526 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
1527 *
1528 * Next Tag: 3
1529 */
1530message BluetoothAclConnectionStateChanged {
1531 // An identifier that can be used to match events for this device.
1532 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1533 // Salt: Randomly generated 256 bit value
1534 // Hash algorithm: HMAC-SHA256
1535 // Size: 32 byte
1536 // Default: null or empty if the device identifier is not known
1537 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1538 // The state of the connection.
1539 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1540 optional android.bluetooth.ConnectionStateEnum state = 2;
1541}
1542
1543/**
1544 * Logs when a Bluetooth device connects and disconnects over SCO
1545 *
1546 * Logged from:
1547 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
1548 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java
1549 *
1550 * Next Tag: 4
1551 */
1552message BluetoothScoConnectionStateChanged {
1553 // An identifier that can be used to match events for this device.
1554 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1555 // Salt: Randomly generated 256 bit value
1556 // Hash algorithm: HMAC-SHA256
1557 // Size: 32 byte
1558 // Default: null or empty if the device identifier is not known
1559 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1560 // The state of the connection.
1561 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1562 optional android.bluetooth.ConnectionStateEnum state = 2;
1563 // Codec used for this SCO connection
1564 // Default: UNKNOWN
1565 optional android.bluetooth.hfp.ScoCodec codec = 3;
Tej Singh5d991e12018-03-09 19:48:11 -08001566}
1567
Jack Hec27040a2019-01-09 20:54:41 -08001568/**
1569 * Logged when active device of a profile changes
1570 *
1571 * Logged from:
1572 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1573 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java
1574 * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java
1575 */
1576message BluetoothActiveDeviceChanged {
1577 // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID
1578 // From android.bluetooth.BluetoothProfile
1579 optional int32 bt_profile = 1;
1580 // An identifier that can be used to match events for this new active device.
1581 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1582 // Salt: Randomly generated 256 bit value
1583 // Hash algorithm: HMAC-SHA256
1584 // Size: 32 byte
1585 // Default: null or empty if there is no active device for this profile
1586 optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
1587}
1588
Jack Heab86dbd22018-12-18 15:43:27 -08001589// Logs when there is an event affecting Bluetooth device's link layer connection.
1590// - This event is triggered when there is a related HCI command or event
1591// - Users of this metrics can deduce Bluetooth device's connection state from these events
1592// - HCI commands are logged before the command is sent, after receiving command status, and after
1593// receiving command complete
1594// - HCI events are logged when they arrive
1595//
1596// Low level log from system/bt
1597//
1598// Bluetooth classic commands:
1599// - CMD_CREATE_CONNECTION
1600// - CMD_DISCONNECT
1601// - CMD_CREATE_CONNECTION_CANCEL
1602// - CMD_ACCEPT_CONNECTION_REQUEST
1603// - CMD_REJECT_CONNECTION_REQUEST
1604// - CMD_SETUP_ESCO_CONNECTION
1605// - CMD_ACCEPT_ESCO_CONNECTION
1606// - CMD_REJECT_ESCO_CONNECTION
1607// - CMD_ENH_SETUP_ESCO_CONNECTION
1608// - CMD_ENH_ACCEPT_ESCO_CONNECTION
1609//
1610// Bluetooth low energy commands:
1611// - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00]
1612// - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
1613// - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
1614// - CMD_BLE_CLEAR_WHITE_LIST
1615// - CMD_BLE_ADD_WHITE_LIST
1616// - CMD_BLE_REMOVE_WHITE_LIST
1617//
1618// Bluetooth classic events:
1619// - EVT_CONNECTION_COMP
1620// - EVT_CONNECTION_REQUEST
1621// - EVT_DISCONNECTION_COMP
1622// - EVT_ESCO_CONNECTION_COMP
1623// - EVT_ESCO_CONNECTION_CHANGED
1624//
1625// Bluetooth low energy meta events:
1626// - BLE_EVT_CONN_COMPLETE_EVT
1627// - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT
1628//
1629// Next tag: 10
1630message BluetoothLinkLayerConnectionEvent {
1631 // An identifier that can be used to match events for this device.
1632 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1633 // Salt: Randomly generated 256 bit value
1634 // Hash algorithm: HMAC-SHA256
1635 // Size: 32 byte
1636 // Default: null or empty if the device identifier is not known
1637 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1638 // Connection handle of this connection if available
1639 // Range: 0x0000 - 0x0EFF (12 bits)
1640 // Default: 0xFFFF if the handle is unknown
1641 optional int32 connection_handle = 2;
1642 // Direction of the link
1643 // Default: DIRECTION_UNKNOWN
1644 optional android.bluetooth.DirectionEnum direction = 3;
1645 // Type of this link
1646 // Default: LINK_TYPE_UNKNOWN
1647 optional android.bluetooth.LinkTypeEnum type = 4;
1648
1649 // Reason metadata for this link layer connection event, rules for interpretation:
1650 // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or
1651 // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case
1652 // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is
1653 // set and valid, ignore hci_ble_event
1654
1655 // HCI command associated with this event
1656 // Default: CMD_UNKNOWN
1657 optional android.bluetooth.hci.CommandEnum hci_cmd = 5;
1658 // HCI event associated with this event
1659 // Default: EVT_UNKNOWN
1660 optional android.bluetooth.hci.EventEnum hci_event = 6;
1661 // HCI BLE meta event associated with this event
1662 // Default: BLE_EVT_UNKNOWN
1663 optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7;
1664 // HCI command status code if this is triggerred by hci_cmd
1665 // Default: STATUS_UNKNOWN
1666 optional android.bluetooth.hci.StatusEnum cmd_status = 8;
1667 // HCI reason code associated with this event
1668 // Default: STATUS_UNKNOWN
1669 optional android.bluetooth.hci.StatusEnum reason_code = 9;
1670}
1671
Howard Roe103fe22019-01-17 16:52:16 -08001672/**
1673 * Logs when a module is rolled back by Watchdog.
1674 *
1675 * Logged from: Rollback Manager
1676 */
1677message WatchdogRollbackOccurred {
1678 enum RollbackType {
1679 UNKNOWN = 0;
1680 ROLLBACK_INITIATE = 1;
1681 ROLLBACK_SUCCESS = 2;
1682 ROLLBACK_FAILURE = 3;
Howard Roe4d6fed2019-03-04 16:54:19 -08001683 ROLLBACK_BOOT_TRIGGERED = 4;
Howard Roe103fe22019-01-17 16:52:16 -08001684 }
1685 optional RollbackType rollback_type = 1;
1686
1687 optional string package_name = 2;
1688
1689 optional int32 package_version_code = 3;
1690}
1691
Jack Hec27040a2019-01-09 20:54:41 -08001692/**
1693 * Logs when there is a change in Bluetooth A2DP playback state
1694 *
1695 * Logged from:
1696 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1697 */
1698message BluetoothA2dpPlaybackStateChanged {
1699 // An identifier that can be used to match events for this device.
1700 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1701 // Salt: Randomly generated 256 bit value
1702 // Hash algorithm: HMAC-SHA256
1703 // Size: 32 byte
1704 // Default: null or empty if the device identifier is not known
1705 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1706 // Current playback state
1707 // Default: PLAYBACK_STATE_UNKNOWN
1708 optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2;
1709 // Current audio coding mode
1710 // Default: AUDIO_CODING_MODE_UNKNOWN
1711 optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3;
1712}
1713
1714/**
1715 * Logs when there is a change in A2DP codec config for a particular remote device
1716 *
1717 * Logged from:
1718 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1719 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1720 */
1721message BluetoothA2dpCodecConfigChanged {
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 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1730 // Default SOURCE_CODEC_TYPE_INVALID
1731 optional int32 codec_type = 2;
1732 // Codec priroity, the higher the more preferred, -1 for disabled
1733 // Default: CODEC_PRIORITY_DEFAULT
1734 optional int32 codec_priority = 3;
1735 // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig
1736 // Default: SAMPLE_RATE_NONE
1737 optional int32 sample_rate = 4;
1738 // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig
1739 // Default: BITS_PER_SAMPLE_NONE
1740 optional int32 bits_per_sample = 5;
1741 // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig
1742 // Default: CHANNEL_MODE_NONE
1743 optional int32 channel_mode = 6;
1744 // Codec specific values
1745 // Default 0
1746 optional int64 codec_specific_1 = 7;
1747 optional int64 codec_specific_2 = 8;
1748 optional int64 codec_specific_3 = 9;
1749 optional int64 codec_specific_4 = 10;
1750}
1751
1752/**
1753 * Logs when there is a change in selectable A2DP codec capability for a paricular remote device
1754 * Each codec's capability is logged separately due to statsd restriction
1755 *
1756 * Logged from:
1757 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1758 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1759 */
1760message BluetoothA2dpCodecCapabilityChanged {
1761 // An identifier that can be used to match events for this device.
1762 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1763 // Salt: Randomly generated 256 bit value
1764 // Hash algorithm: HMAC-SHA256
1765 // Size: 32 byte
1766 // Default: null or empty if the device identifier is not known
1767 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1768 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1769 // Default SOURCE_CODEC_TYPE_INVALID
1770 optional int32 codec_type = 2;
1771 // Codec priroity, the higher the more preferred, -1 for disabled
1772 // Default: CODEC_PRIORITY_DEFAULT
1773 optional int32 codec_priority = 3;
1774 // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants
1775 // in BluetoothCodecConfig
1776 // Default: empty and SAMPLE_RATE_NONE for individual item
1777 optional int32 sample_rate = 4;
1778 // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants
1779 // in BluetoothCodecConfig
1780 // Default: empty and BITS_PER_SAMPLE_NONE for individual item
1781 optional int32 bits_per_sample = 5;
1782 // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in
1783 // BluetoothCodecConfig
1784 // Default: empty and CHANNEL_MODE_NONE for individual item
1785 optional int32 channel_mode = 6;
1786 // Codec specific values
1787 // Default 0
1788 optional int64 codec_specific_1 = 7;
1789 optional int64 codec_specific_2 = 8;
1790 optional int64 codec_specific_3 = 9;
1791 optional int64 codec_specific_4 = 10;
1792}
1793
1794/**
1795 * Logs when A2DP failed to read from PCM source.
1796 * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding.
1797 *
1798 * Logged from:
1799 * system/bt
1800 */
1801message BluetoothA2dpAudioUnderrunReported {
1802 // An identifier that can be used to match events for this device.
1803 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1804 // Salt: Randomly generated 256 bit value
1805 // Hash algorithm: HMAC-SHA256
1806 // Size: 32 byte
1807 // Default: null or empty if the device identifier is not known
1808 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1809 // Encoding interval in nanoseconds
1810 // Default: 0
1811 optional int64 encoding_interval_nanos = 2;
1812 // Number of bytes of PCM data that could not be read from the source
1813 // Default: 0
1814 optional int32 num_missing_pcm_bytes = 3;
1815}
1816
1817/**
1818 * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit
1819 * buffer queue is full and we have to drop data
1820 *
1821 * Logged from:
1822 * system/bt
1823 */
1824message BluetoothA2dpAudioOverrunReported {
1825 // An identifier that can be used to match events for this device.
1826 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1827 // Salt: Randomly generated 256 bit value
1828 // Hash algorithm: HMAC-SHA256
1829 // Size: 32 byte
1830 // Default: null or empty if the device identifier is not known
1831 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1832 // Encoding interval in nanoseconds
1833 // Default: 0
1834 optional int64 encoding_interval_nanos = 2;
1835 // Number of buffers dropped in this event
1836 // Each buffer is encoded in one encoding interval and consists of multiple encoded frames
1837 // Default: 0
1838 optional int32 num_dropped_buffers = 3;
1839 // Number of encoded buffers dropped in this event
1840 // Default 0
1841 optional int32 num_dropped_encoded_frames = 4;
1842 // Number of encoded bytes dropped in this event
1843 // Default: 0
1844 optional int32 num_dropped_encoded_bytes = 5;
1845}
1846
1847/**
1848 * Logs when we receive reports regarding a device's RSSI value
1849 *
1850 * Logged from:
1851 * system/bt
1852 */
1853message BluetoothDeviceRssiReported {
1854 // An identifier that can be used to match events for this device.
1855 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1856 // Salt: Randomly generated 256 bit value
1857 // Hash algorithm: HMAC-SHA256
1858 // Size: 32 byte
1859 // Default: null or empty if the device identifier is not known
1860 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1861 // Connection handle of this connection if available
1862 // Range: 0x0000 - 0x0EFF (12 bits)
1863 // Default: 0xFFFF if the handle is unknown
1864 optional int32 connection_handle = 2;
1865 // HCI command status code if this is triggerred by hci_cmd
1866 // Default: STATUS_UNKNOWN
1867 optional android.bluetooth.hci.StatusEnum hci_status = 3;
1868 // BR/EDR
1869 // Range: -128 ≤ N ≤ 127 (signed integer)
1870 // Units: dB
1871 // LE:
1872 // Range: -127 to 20, 127 (signed integer)
1873 // Units: dBm
1874 // Invalid when an out of range value is reported
1875 optional int32 rssi = 4;
1876}
1877
1878/**
1879 * Logs when we receive reports regarding how many consecutive failed contacts for a connection
1880 *
1881 * Logged from:
1882 * system/bt
1883 */
1884message BluetoothDeviceFailedContactCounterReported {
1885 // An identifier that can be used to match events for this device.
1886 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1887 // Salt: Randomly generated 256 bit value
1888 // Hash algorithm: HMAC-SHA256
1889 // Size: 32 byte
1890 // Default: null or empty if the device identifier is not known
1891 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1892 // Connection handle of this connection if available
1893 // Range: 0x0000 - 0x0EFF (12 bits)
1894 // Default: 0xFFFF if the handle is unknown
1895 optional int32 connection_handle = 2;
1896 // HCI command status code if this is triggerred by hci_cmd
1897 // Default: STATUS_UNKNOWN
1898 optional android.bluetooth.hci.StatusEnum cmd_status = 3;
1899 // Number of consecutive failed contacts for a connection corresponding to the Handle
1900 // Range: uint16_t, 0-0xFFFF
1901 // Default: 0xFFFFF
1902 optional int32 failed_contact_counter = 4;
1903}
1904
1905/**
1906 * Logs when we receive reports regarding the tranmit power level used for a specific connection
1907 *
1908 * Logged from:
1909 * system/bt
1910 */
1911message BluetoothDeviceTxPowerLevelReported {
1912 // An identifier that can be used to match events for this device.
1913 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1914 // Salt: Randomly generated 256 bit value
1915 // Hash algorithm: HMAC-SHA256
1916 // Size: 32 byte
1917 // Default: null or empty if the device identifier is not known
1918 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1919 // Connection handle of this connection if available
1920 // Range: 0x0000 - 0x0EFF (12 bits)
1921 // Default: 0xFFFF if the handle is unknown
1922 optional int32 connection_handle = 2;
Jack He1021a612019-01-20 21:22:46 -08001923 // HCI command status code if this is triggered by hci_cmd
Jack Hec27040a2019-01-09 20:54:41 -08001924 // Default: STATUS_UNKNOWN
1925 optional android.bluetooth.hci.StatusEnum hci_status = 3;
1926 // Range: -30 ≤ N ≤ 20
1927 // Units: dBm
1928 // Invalid when an out of range value is reported
1929 optional int32 transmit_power_level = 4;
1930}
Jack Heab86dbd22018-12-18 15:43:27 -08001931
Tej Singh5d991e12018-03-09 19:48:11 -08001932/**
Jack He1021a612019-01-20 21:22:46 -08001933 * Logs when Bluetooth controller failed to reply with command status within a timeout period after
1934 * receiving an HCI command from the host
1935 *
1936 * Logged from: system/bt
1937 */
1938message BluetoothHciTimeoutReported {
1939 // HCI command associated with this event
1940 // Default: CMD_UNKNOWN
1941 optional android.bluetooth.hci.CommandEnum hci_command = 1;
1942}
1943
1944/**
1945 * Logs when we receive Bluetooth Link Quality Report event from the controller
1946 * See Android Bluetooth HCI specification for more details
1947 *
1948 * Note: all count and bytes field are counted since last event
1949 *
1950 * Logged from: system/bt
1951 */
1952message BluetoothQualityReportReported {
1953 // Quality report ID
1954 // Original type: uint8_t
1955 // Default: BQR_ID_UNKNOWN
1956 optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1;
1957 // Packet type of the connection
1958 // Original type: uint8_t
1959 // Default: BQR_PACKET_TYPE_UNKNOWN
1960 optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2;
1961 // Connection handle of the connection
1962 // Original type: uint16_t
1963 optional int32 connection_handle = 3;
1964 // Performing Role for the connection
1965 // Original type: uint8_t
1966 optional int32 connection_role = 4;
1967 // Current Transmit Power Level for the connection. This value is the same as the controller's
1968 // response to the HCI_Read_Transmit_Power_Level HCI command
1969 // Original type: uint8_t
1970 optional int32 tx_power_level = 5;
1971 // Received Signal Strength Indication (RSSI) value for the connection. This value is an
1972 // absolute receiver signal strength value
1973 // Original type: int8_t
1974 optional int32 rssi = 6;
1975 // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the
1976 // channels used by the link currently
1977 // Original type: uint8_t
1978 optional int32 snr = 7;
1979 // Indicates the number of unused channels in AFH_channel_map
1980 // Original type: uint8_t
1981 optional int32 unused_afh_channel_count = 8;
1982 // Indicates the number of the channels which are interfered and quality is bad but are still
1983 // selected for AFH
1984 // Original type: uint8_t
1985 optional int32 afh_select_unideal_channel_count = 9;
1986 // Current Link Supervision Timeout Setting
1987 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
1988 // Original type: uint16_t
1989 optional int32 lsto = 10;
1990 // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's
1991 // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of
1992 // 0x01 (Piconet Clock)
1993 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
1994 // Original type: uint32_t
1995 optional int64 connection_piconet_clock = 11;
1996 // The count of retransmission
1997 // Original type: uint32_t
1998 optional int64 retransmission_count = 12;
1999 // The count of no RX
2000 // Original type: uint32_t
2001 optional int64 no_rx_count = 13;
2002 // The count of NAK (Negative Acknowledge)
2003 // Original type: uint32_t
2004 optional int64 nak_count = 14;
2005 // Controller timestamp of last TX ACK
2006 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2007 // Original type: uint32_t
2008 optional int64 last_tx_ack_timestamp = 15;
2009 // The count of Flow-off (STOP)
2010 // Original type: uint32_t
2011 optional int64 flow_off_count = 16;
2012 // Controller timestamp of last Flow-on (GO)
2013 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
2014 // Original type: uint32_t
2015 optional int64 last_flow_on_timestamp = 17;
2016 // Buffer overflow count (how many bytes of TX data are dropped) since the last event
2017 // Original type: uint32_t
2018 optional int64 buffer_overflow_bytes = 18;
2019 // Buffer underflow count (in byte) since last event
2020 // Original type: uint32_t
2021 optional int64 buffer_underflow_bytes = 19;
2022}
2023
2024/**
2025 * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack
2026 *
2027 * Notes:
2028 * - Each event can be partially filled as we might learn different pieces of device
2029 * information at different time
2030 * - Multiple device info events can be combined to give more complete picture
2031 * - When multiple device info events tries to describe the same information, the
2032 * later one wins
2033 *
2034 * Logged from:
2035 * packages/apps/Bluetooth
2036 */
Jack Heaea26982019-04-04 11:19:48 -07002037message BluetoothDeviceInfoReported {
Jack He1021a612019-01-20 21:22:46 -08002038 // An identifier that can be used to match events for this device.
2039 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2040 // Salt: Randomly generated 256 bit value
2041 // Hash algorithm: HMAC-SHA256
2042 // Size: 32 byte
2043 // Default: null or empty if the device identifier is not known
2044 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2045 // Where is this device info obtained from
2046 optional android.bluetooth.DeviceInfoSrcEnum source_type = 2;
2047 // Name of the data source
2048 // For EXTERNAL: package name of the data source
2049 // For INTERNAL: null for general case, component name otherwise
2050 optional string source_name = 3;
2051 // Name of the manufacturer of this device
2052 optional string manufacturer = 4;
2053 // Model of this device
2054 optional string model = 5;
2055 // Hardware version of this device
2056 optional string hardware_version = 6;
2057 // Software version of this device
2058 optional string software_version = 7;
2059}
2060
2061/**
2062 * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote
2063 * device, as documented by the Bluetooth Core HCI specification
2064 * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification
2065 * Vol 2, Part E, Page 1118
2066 *
2067 * Logged from:
2068 * system/bt
2069 */
2070message BluetoothRemoteVersionInfoReported {
2071 // Connection handle of the connection
2072 // Original type: uint16_t
2073 optional int32 connection_handle = 1;
2074 // HCI command status code
2075 // Default: STATUS_UNKNOWN
2076 optional android.bluetooth.hci.StatusEnum hci_status = 2;
2077 // 1 byte Version of current LMP in the remote controller
2078 optional int32 lmp_version = 3;
2079 // 2 bytes LMP manufacturer code of the remote controller
2080 // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
2081 optional int32 lmp_manufacturer_code = 4;
2082 // 4 bytes subversion of the LMP in the remote controller
2083 optional int32 lmp_subversion = 5;
2084}
2085
2086/**
2087 * Logs when certain Bluetooth SDP attributes are discovered
2088 * Constant definitions are from:
2089 * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
2090 *
2091 * Current logged attributes:
2092 * - BluetoothProfileDescriptorList
2093 * - Supported Features Bitmask
2094 *
2095 * Logged from:
2096 * system/bt
2097 */
2098message BluetoothSdpAttributeReported {
2099 // An identifier that can be used to match events for this device.
2100 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2101 // Salt: Randomly generated 256 bit value
2102 // Hash algorithm: HMAC-SHA256
2103 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2104 // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes
2105 // Original type: uint16_t
2106 optional int32 protocol_uuid = 2;
2107 // Short form UUIDs used to identify Bluetooth SDP attribute types
2108 // Original type: uint16_t
2109 optional int32 attribute_id = 3;
2110 // Attribute value for the particular attribute
2111 optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
2112}
2113
2114/**
2115 * Logs when bond state of a Bluetooth device changes
2116 *
2117 * Logged from:
2118 * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
2119 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
2120 */
2121message BluetoothBondStateChanged {
2122 // An identifier that can be used to match events for this device.
2123 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2124 // Salt: Randomly generated 256 bit value
2125 // Hash algorithm: HMAC-SHA256
2126 // Size: 32 byte
2127 // Default: null or empty if the device identifier is not known
2128 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2129 // Preferred transport type to remote dual mode device
2130 // Default: TRANSPORT_AUTO means no preference
2131 optional android.bluetooth.TransportTypeEnum transport = 2;
2132 // The type of this Bluetooth device (Classic, LE, or Dual mode)
2133 // Default: UNKNOWN
2134 optional android.bluetooth.DeviceTypeEnum type = 3;
2135 // Current bond state (NONE, BONDING, BONDED)
2136 // Default: BOND_STATE_UNKNOWN
2137 optional android.bluetooth.BondStateEnum bond_state = 4;
2138 // Bonding sub state
2139 // Default: BOND_SUB_STATE_UNKNOWN
2140 optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5;
2141 // Unbond Reason
2142 // Default: UNBOND_REASON_UNKNOWN
2143 optional android.bluetooth.UnbondReasonEnum unbond_reason = 6;
2144}
2145
2146/**
2147 * Logs there is an event related Bluetooth classic pairing
2148 *
2149 * Logged from:
2150 * system/bt
2151 */
2152message BluetoothClassicPairingEventReported {
2153 // An identifier that can be used to match events for this device.
2154 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2155 // Salt: Randomly generated 256 bit value
2156 // Hash algorithm: HMAC-SHA256
2157 // Size: 32 byte
2158 // Default: null or empty if the device identifier is not known
2159 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2160 // Connection handle of this connection if available
2161 // Range: 0x0000 - 0x0EFF (12 bits)
2162 // Default: 0xFFFF if the handle is unknown
2163 optional int32 connection_handle = 2;
2164 // HCI command associated with this event
2165 // Default: CMD_UNKNOWN
2166 optional android.bluetooth.hci.CommandEnum hci_cmd = 3;
2167 // HCI event associated with this event
2168 // Default: EVT_UNKNOWN
2169 optional android.bluetooth.hci.EventEnum hci_event = 4;
2170 // HCI command status code if this is triggerred by hci_cmd
2171 // Default: STATUS_UNKNOWN
2172 optional android.bluetooth.hci.StatusEnum cmd_status = 5;
2173 // HCI reason code associated with this event
2174 // Default: STATUS_UNKNOWN
2175 optional android.bluetooth.hci.StatusEnum reason_code = 6;
Jack He3b259832019-03-20 03:47:29 -07002176 // A status value related to this specific event
2177 // Default: 0
2178 optional int64 event_value = 7;
Jack He1021a612019-01-20 21:22:46 -08002179}
2180
2181/**
2182 * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP)
2183 *
2184 * Logged from:
2185 * system/bt
2186 */
2187message BluetoothSmpPairingEventReported {
2188 // An identifier that can be used to match events for this device.
2189 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2190 // Salt: Randomly generated 256 bit value
2191 // Hash algorithm: HMAC-SHA256
2192 // Size: 32 byte
2193 // Default: null or empty if the device identifier is not known
2194 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2195 // SMP command sent or received over L2CAP
2196 // Default: CMD_UNKNOWN
2197 optional android.bluetooth.smp.CommandEnum smp_command = 2;
2198 // Whether this command is sent or received
2199 // Default: DIRECTION_UNKNOWN
2200 optional android.bluetooth.DirectionEnum direction = 3;
2201 // SMP failure reason code
2202 // Default: PAIRING_FAIL_REASON_DEFAULT
2203 optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4;
2204}
2205
2206/**
Jack He815cdba2019-01-30 17:24:55 -08002207 * Logs when a Bluetooth socket’s connection state changed
2208 *
2209 * Logged from:
2210 * system/bt
2211 */
2212message BluetoothSocketConnectionStateChanged {
2213 // An identifier that can be used to match events for this device.
2214 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2215 // Salt: Randomly generated 256 bit value
2216 // Hash algorithm: HMAC-SHA256
2217 // Size: 32 byte
Jack Hee4ae0e72019-02-07 13:52:45 -08002218 // Default: null or empty if this is a server listener socket
Jack He815cdba2019-01-30 17:24:55 -08002219 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
Jack Hee4ae0e72019-02-07 13:52:45 -08002220 // Temporary port of this socket for the current connection or session only
Jack He815cdba2019-01-30 17:24:55 -08002221 // Default 0 when unknown or don't care
2222 optional int32 port = 2;
2223 // Socket type as mentioned in
2224 // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
2225 // Default: SOCKET_TYPE_UNKNOWN
2226 optional android.bluetooth.SocketTypeEnum type = 3;
2227 // Socket connection state
2228 // Default: SOCKET_CONNECTION_STATE_UNKNOWN
2229 optional android.bluetooth.SocketConnectionstateEnum state = 4;
2230 // Number of bytes sent to remote device during this connection
2231 optional int64 tx_bytes = 5;
2232 // Number of bytes received from remote device during this connection
2233 optional int64 rx_bytes = 6;
Jack Hee4ae0e72019-02-07 13:52:45 -08002234 // Socket owner's UID
2235 optional int32 uid = 7 [(is_uid) = true];
2236 // Server port of this socket, if any. When both |server_port| and |port| fields are populated,
2237 // |port| must be spawned by |server_port|
2238 // Default 0 when unknown or don't care
2239 optional int32 server_port = 8;
2240 // Whether this is a server listener socket
2241 optional android.bluetooth.SocketRoleEnum is_server = 9;
Jack He815cdba2019-01-30 17:24:55 -08002242}
2243
2244/**
Jack He71426802019-04-02 13:32:52 -07002245 * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection
2246 *
2247 * Logged from:
2248 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
2249 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
2250 *
2251 */
2252message BluetoothClassOfDeviceReported {
2253 // An identifier that can be used to match events for this device.
2254 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2255 // Salt: Randomly generated 256 bit value
2256 // Hash algorithm: HMAC-SHA256
2257 // Size: 32 byte
2258 // Default: null or empty if this is a server listener socket
2259 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2260 // Class of Device (CoD) value including both Major, Minor device class and service class
2261 // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband
2262 // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass
2263 // Default: 0
2264 optional int32 class_of_device = 2;
2265}
2266
2267/**
Andrew Chant28d627e2018-02-22 15:17:05 -08002268 * Logs when something is plugged into or removed from the USB-C connector.
2269 *
2270 * Logged from:
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002271 * UsbService
Andrew Chant28d627e2018-02-22 15:17:05 -08002272 */
2273message UsbConnectorStateChanged {
2274 enum State {
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002275 STATE_DISCONNECTED = 0;
2276 STATE_CONNECTED = 1;
Andrew Chant28d627e2018-02-22 15:17:05 -08002277 }
2278 optional State state = 1;
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002279 optional string id = 2;
Badhri Jagan Sridharanfaf62072018-11-16 17:17:03 -08002280 // Last active session in ms.
2281 // 0 when the port is in connected state.
2282 optional int64 last_connect_duration_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002283}
2284
2285/**
2286 * Logs the reported speaker impedance.
2287 *
2288 * Logged from:
2289 * Vendor audio implementation.
2290 */
2291message SpeakerImpedanceReported {
2292 optional int32 speaker_location = 1;
2293 optional int32 impedance = 2;
2294}
2295
2296/**
2297 * Logs the report of a failed hardware.
2298 *
2299 * Logged from:
2300 * Vendor HALs.
2301 *
2302 */
2303message HardwareFailed {
2304 enum HardwareType {
2305 HARDWARE_FAILED_UNKNOWN = 0;
2306 HARDWARE_FAILED_MICROPHONE = 1;
2307 HARDWARE_FAILED_CODEC = 2;
2308 HARDWARE_FAILED_SPEAKER = 3;
2309 HARDWARE_FAILED_FINGERPRINT = 4;
2310 }
2311 optional HardwareType hardware_type = 1;
2312
Maggie White6dcd8572019-01-31 14:11:50 -08002313 /**
2314 * hardware_location allows vendors to differentiate between multiple instances of
Andrew Chant28d627e2018-02-22 15:17:05 -08002315 * the same hardware_type. The specific locations are vendor defined integers,
2316 * referring to board-specific numbering schemes.
2317 */
2318 optional int32 hardware_location = 2;
2319
Maggie White6dcd8572019-01-31 14:11:50 -08002320 /**
2321 * failure_code is specific to the HardwareType of the failed hardware.
2322 * It should use one of the enum values defined below.
Andrew Chant28d627e2018-02-22 15:17:05 -08002323 */
Maggie White6dcd8572019-01-31 14:11:50 -08002324 enum HardwareErrorCode {
2325 UNKNOWN = 0;
2326 COMPLETE = 1;
2327 SPEAKER_HIGH_Z = 2;
2328 SPEAKER_SHORT = 3;
2329 FINGERPRINT_SENSOR_BROKEN = 4;
2330 FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5;
Maggie Whiteb76cebc2019-02-05 15:21:29 -08002331 DEGRADE = 6;
Andrew Chant28d627e2018-02-22 15:17:05 -08002332 }
2333 optional int32 failure_code = 3;
2334}
2335
2336/**
2337 * Log an event when the device has been physically dropped.
2338 * Reported from the /vendor partition.
2339 */
2340message PhysicalDropDetected {
2341 // Confidence that the event was actually a drop, 0 -> 100
2342 optional int32 confidence_pctg = 1;
2343 // Peak acceleration of the drop, in 1/1000s of a g.
2344 optional int32 accel_peak_thousandths_g = 2;
Andrew Chantb56388b2018-03-22 21:07:33 -07002345 // Duration of freefall in ms
2346 optional int32 freefall_time_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002347}
2348
2349/**
2350 * Log bucketed battery charge cycles.
2351 *
2352 * Each bucket represents cycles of the battery past
Maggie White38c9d322018-11-20 10:07:52 -08002353 * a given charge point. For example, if 10 cycle buckets are
2354 * initialized, bucket 1 is the lowest 1/10th of the battery,
2355 * and bucket 10 is 100%.
Andrew Chant28d627e2018-02-22 15:17:05 -08002356 *
2357 * Logged from:
2358 * /sys/class/power_supply/bms/cycle_count, via Vendor.
2359 */
2360message ChargeCyclesReported {
2361 optional int32 cycle_bucket_1 = 1;
2362 optional int32 cycle_bucket_2 = 2;
2363 optional int32 cycle_bucket_3 = 3;
2364 optional int32 cycle_bucket_4 = 4;
2365 optional int32 cycle_bucket_5 = 5;
2366 optional int32 cycle_bucket_6 = 6;
2367 optional int32 cycle_bucket_7 = 7;
2368 optional int32 cycle_bucket_8 = 8;
Maggie White38c9d322018-11-20 10:07:52 -08002369 optional int32 cycle_bucket_9 = 9;
2370 optional int32 cycle_bucket_10 = 10;
Andrew Chant28d627e2018-02-22 15:17:05 -08002371}
2372
2373/**
Howard Roa46b6582018-09-18 16:45:02 -07002374 * Log battery health snapshot.
2375 *
2376 * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level
2377 * are snapshotted periodically over 24hrs.
2378 */
2379message BatteryHealthSnapshot {
2380 enum BatterySnapshotType {
2381 UNKNOWN = 0;
2382 MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs.
2383 MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs.
2384 MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs.
2385 MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs.
2386 MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs.
2387 MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs.
2388 MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs.
2389 MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs.
2390 MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs.
2391 MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs.
2392 AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs.
2393 }
2394 optional BatterySnapshotType type = 1;
2395 // Temperature, in 1/10ths of degree C.
Yangster-maca8a30442018-10-13 23:46:34 -07002396 optional int32 temperature_deci_celsius = 2;
Howard Roa46b6582018-09-18 16:45:02 -07002397 // Voltage Battery Voltage, in microVolts.
2398 optional int32 voltage_micro_volt = 3;
2399 // Current Battery current, in microAmps.
2400 optional int32 current_micro_amps = 4;
2401 // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts.
2402 optional int32 open_circuit_micro_volt = 5;
2403 // Resistance Battery Resistance, in microOhms.
2404 optional int32 resistance_micro_ohm = 6;
2405 // Level Battery Level, as % of full.
2406 optional int32 level_percent = 7;
2407}
2408
2409/**
2410 * Log slow I/O operations on the primary storage.
2411 */
2412message SlowIo {
2413 // Classifications of IO Operations.
2414 enum IoOperation {
2415 UNKNOWN = 0;
2416 READ = 1;
2417 WRITE = 2;
2418 UNMAP = 3;
2419 SYNC = 4;
2420 }
2421 optional IoOperation operation = 1;
2422
2423 // The number of slow IO operations of this type over 24 hours.
2424 optional int32 count = 2;
2425}
2426
2427/**
2428 * Log battery caused shutdown with the last recorded voltage.
2429 */
2430message BatteryCausedShutdown {
2431 // The last recorded battery voltage prior to shutdown.
2432 optional int32 last_recorded_micro_volt = 1;
2433}
2434
2435/**
Tej Singha72344992019-04-17 18:55:08 -07002436 * Logs when ThermalService receives throttling events.
2437 *
2438 * Logged from:
2439 * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
2440 */
2441message ThermalThrottlingSeverityStateChanged {
2442 // The type of temperature being reported (CPU, GPU, SKIN, etc)
2443 optional android.os.TemperatureTypeEnum sensor_type = 1;
2444
2445 // The name of the temperature source. Eg. CPU0
2446 optional string sensor_name = 2;
2447
2448 // Temperature in tenths of a degree C.
2449 // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
2450 optional int32 temperature_deci_celsius = 3;
2451
2452 // Relative severity of the throttling, see enum definition.
2453 optional android.os.ThrottlingSeverityEnum severity = 4;
2454}
2455
2456/**
Tej Singhbb8554a2018-01-26 11:59:14 -08002457 * Logs the duration of a davey (jank of >=700ms) when it occurs
2458 *
2459 * Logged from:
2460 * frameworks/base/libs/hwui/JankTracker.cpp
2461 */
2462message DaveyOccurred {
David Chen77ef6712018-02-23 18:23:42 -08002463 // The UID that logged this atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07002464 optional int32 uid = 1 [(is_uid) = true];
David Chen77ef6712018-02-23 18:23:42 -08002465
Tej Singhbb8554a2018-01-26 11:59:14 -08002466 // Amount of time it took to render the frame. Should be >=700ms.
David Chen77ef6712018-02-23 18:23:42 -08002467 optional int64 jank_duration_millis = 2;
Tej Singhbb8554a2018-01-26 11:59:14 -08002468}
2469
2470/**
Bookatze5885242017-10-24 20:10:31 -07002471 * Logs phone signal strength changes.
2472 *
2473 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07002474 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07002475 */
2476message PhoneSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08002477 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
2478 optional android.telephony.SignalStrengthEnum signal_strength = 1;
David Chenc28b2bb2017-10-24 12:52:52 -07002479}
2480
Yangster4ccebea2018-10-09 17:09:02 -07002481
2482/**
2483 * Logs when the phone state, sim state or signal strength changes
2484 *
2485 * Logged from:
2486 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
2487 */
2488message PhoneServiceStateChanged {
2489 optional android.telephony.ServiceStateEnum state = 1;
2490 optional android.telephony.SimStateEnum sim_state = 2;
2491 optional android.telephony.SignalStrengthEnum signal_strength = 3;
2492}
2493
2494/**
2495 * Logs when the phone becomes on or off.
2496 *
2497 * Logged from:
2498 * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java
2499 */
2500message PhoneStateChanged {
2501 enum State {
2502 OFF = 0;
2503 ON = 1;
2504 }
2505 optional State state = 1;
2506}
2507
Hyunyoung Songf1b935e2019-07-09 09:19:25 -07002508message BackGesture {
2509 enum BackType {
2510 DEFAULT_BACK_TYPE = 0;
2511 COMPLETED = 1;
2512 COMPLETED_REJECTED = 2; // successful because coming from rejected area
2513 INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area
2514 INCOMPLETE = 4;
2515 }
2516 optional BackType type = 1;
2517
2518 optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event
2519 enum WindowHorizontalLocation {
2520 DEFAULT_LOCATION = 0;
2521 LEFT = 1;
2522 RIGHT = 2;
2523 }
2524 optional WindowHorizontalLocation x_location = 3;
2525}
2526
2527message ExclusionRectStateChanged {
2528 optional string component_name = 1; // if not available, simply packageName
2529 optional int32 requested_height = 2; // px
2530 optional int32 rejected_height = 3; // px
2531
2532 enum WindowHorizontalLocation {
2533 DEFAULT_LOCATION = 0;
2534 LEFT = 1;
2535 RIGHT = 2;
2536 }
2537 optional WindowHorizontalLocation x_location = 4;
2538 optional bool landscape = 5;
2539 optional bool splitscreen = 6;
2540 optional int32 duration_millis = 7;
2541}
2542
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002543message LauncherUIChanged {
Yao Chen8c433862018-10-24 14:09:20 -07002544 optional android.stats.launcher.LauncherAction action = 1;
2545 optional android.stats.launcher.LauncherState src_state = 2;
2546 optional android.stats.launcher.LauncherState dst_state = 3;
2547 optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES];
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002548 optional bool is_swipe_up_enabled = 5;
2549}
2550
Hyunyoung Song80adf6be2019-01-30 09:59:30 -08002551message StyleUIChanged {
2552 optional android.stats.style.Action action = 1;
2553 optional int32 color_package_hash = 2;
2554 optional int32 font_package_hash = 3;
2555 optional int32 shape_package_hash = 4;
2556 optional int32 clock_package_hash = 5;
2557 optional int32 launcher_grid = 6;
2558 optional int32 wallpaper_category_hash = 7;
2559 optional int32 wallpaper_id_hash = 8;
Kunhung Li286c52f2019-05-21 20:10:43 +08002560 optional int32 color_preference = 9;
2561 optional android.stats.style.LocationPreference location_preference = 10;
Hyunyoung Song80adf6be2019-01-30 09:59:30 -08002562}
2563
David Chenc28b2bb2017-10-24 12:52:52 -07002564/**
Fan Zhang916c13b2018-10-16 22:49:45 -07002565 * Logs when Settings UI has changed.
2566 *
2567 * Logged from:
2568 * packages/apps/Settings
2569 */
2570message SettingsUIChanged {
2571 /**
Fan Zhang916c13b2018-10-16 22:49:45 -07002572 * Where this SettingsUIChange event comes from. For example, if
2573 * it's a PAGE_VISIBLE event, where the page is opened from.
2574 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002575 optional android.app.settings.PageId attribution = 1;
Fan Zhang916c13b2018-10-16 22:49:45 -07002576
2577 /**
2578 * What the UI action is.
2579 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002580 optional android.app.settings.Action action = 2;
Fan Zhang916c13b2018-10-16 22:49:45 -07002581
2582 /**
2583 * Where the action is happening
2584 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002585 optional android.app.settings.PageId page_id = 3;
Fan Zhang916c13b2018-10-16 22:49:45 -07002586
2587 /**
2588 * What preference changed in this event.
2589 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002590 optional string changed_preference_key = 4;
Fan Zhang916c13b2018-10-16 22:49:45 -07002591
2592 /**
2593 * The new value of the changed preference.
2594 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002595 optional int64 changed_preference_int_value = 5;
Fan Zhang916c13b2018-10-16 22:49:45 -07002596}
2597
2598/**
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002599 * Logs basic timing information about touch events.
2600 * Reported at most every 5 minutes while device is being interacted with.
2601 *
2602 * Logged from:
2603 * frameworks/native/services/inputflinger
2604 */
2605message TouchEventReported {
2606 /**
2607 * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
2608 * and the standard deviation of latency between the kernel and framework
2609 * for touchscreen events. The units are microseconds.
2610 *
2611 * The number is measured as the difference between the time at which
2612 * the input event was received in the evdev driver,
2613 * and the time at which the input event was received in EventHub.
2614 */
2615 // Minimum value
2616 optional float latency_min_micros = 1;
2617 // Maximum value
2618 optional float latency_max_micros = 2;
2619 // Average value
2620 optional float latency_mean_micros = 3;
2621 // Standard deviation
2622 optional float latency_stdev_micros = 4;
Siarhei Vishniakouca954f92019-03-22 16:41:14 -07002623 // Number of touch events (input_event) in this report
2624 optional int32 count = 5;
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002625}
2626
2627/**
Philip Quinn0eded622019-01-29 12:46:28 -08002628 * Logs gesture classification and timing information for touch events.
2629 *
2630 * Logged from:
2631 * frameworks/base/core/java/android/view/GestureDetector.java
2632 * frameworks/base/core/java/android/view/View.java
2633 */
2634message TouchGestureClassified {
2635 // The source of the classification (e.g. Java class name).
2636 optional string source = 1;
2637
2638 enum Classification {
2639 UNKNOWN_CLASSIFICATION = 0;
2640 SINGLE_TAP = 1;
2641 DOUBLE_TAP = 2;
2642 LONG_PRESS = 3;
2643 DEEP_PRESS = 4;
2644 SCROLL = 5;
2645 }
2646 // The classification of the gesture.
2647 optional Classification classification = 2;
2648
2649 // The interval from the start of a touch event stream until the
2650 // classification was made.
2651 optional int32 latency_millis = 3;
2652
2653 // The distance from the location of the first touch event to the
2654 // location of the touch event when the classification was made.
2655 optional float displacement_px = 4;
2656}
2657
2658/**
David Chenc28b2bb2017-10-24 12:52:52 -07002659 * Logs that a setting was updated.
2660 * Logged from:
David Chenbd789912018-03-16 17:19:55 -07002661 * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
David Chenc28b2bb2017-10-24 12:52:52 -07002662 * The tag and is_default allow resetting of settings to default values based on the specified
2663 * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details.
2664 */
2665message SettingChanged {
2666 // The name of the setting.
2667 optional string setting = 1;
2668
2669 // The change being imposed on this setting. May represent a number, eg "3".
2670 optional string value = 2;
2671
2672 // The new value of this setting. For most settings, this is same as value. For some settings,
2673 // value is +X or -X where X represents an element in a set. For example, if the previous value
2674 // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C.
2675 // The +/- feature is currently only used for location_providers_allowed.
2676 optional string new_value = 3;
2677
2678 // The previous value of this setting.
2679 optional string prev_value = 4;
2680
2681 // The tag used with the is_default for resetting sets of settings. This is generally null.
2682 optional string tag = 5;
2683
Bookatz90867622018-01-31 15:05:57 -08002684 // True if this setting with tag should be resettable.
2685 optional bool is_default = 6;
David Chenc28b2bb2017-10-24 12:52:52 -07002686
David Chenbd789912018-03-16 17:19:55 -07002687 // The associated user (for multi-user feature). Defined in android/os/UserHandle.java
David Chenc28b2bb2017-10-24 12:52:52 -07002688 optional int32 user = 7;
David Chenbd789912018-03-16 17:19:55 -07002689
2690 enum ChangeReason {
2691 UPDATED = 1; // Updated can be an insertion or an update.
2692 DELETED = 2;
2693 }
2694 optional ChangeReason reason = 8;
David Chenc28b2bb2017-10-24 12:52:52 -07002695}
Chenjie Yub3dda412017-10-24 13:41:59 -07002696
Chenjie Yu05013b32017-11-21 10:21:41 -08002697/**
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002698 * Logs activity going to foreground or background
2699 *
2700 * Logged from:
2701 * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
2702 */
2703message ActivityForegroundStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07002704 optional int32 uid = 1 [(is_uid) = true];
Yangster-mac20877162017-12-22 17:19:39 -08002705 optional string pkg_name = 2;
2706 optional string class_name = 3;
2707
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002708 enum State {
2709 BACKGROUND = 0;
2710 FOREGROUND = 1;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002711 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002712 optional State state = 4;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002713}
David Chenc8a43242017-10-17 16:23:28 -07002714
2715/**
Felix Lopez Luisd95346a2018-12-12 10:32:32 +00002716 * Logs when a volume entered low Storage state.
2717 * Logged from:
2718 * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
2719 */
2720message LowStorageStateChanged {
2721 // Volume that ran out of storage.
2722 optional string volume_description = 1;
2723
2724 enum State {
2725 UNKNOWN = 0;
2726 OFF = 1;
2727 ON = 2;
2728 }
2729 optional State state = 2;
2730}
2731
2732/**
2733 * Logs when an app is downgraded.
2734 * Logged from:
2735 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2736 */
2737message AppDowngraded {
2738 optional string package_name = 1;
2739 // Size of the package (all data) before being downgraded.
2740 optional int64 size_in_bytes_before = 2;
2741 // Size of the package (all data) after being downgraded.
2742 optional int64 size_in_bytes_after = 3;
2743
2744 optional bool aggressive = 4;
2745}
2746
2747/**
2748 * Logs when an app is optimized after being downgraded.
2749 * Logged from:
2750 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2751 */
2752message AppOptimizedAfterDowngraded {
2753 optional string package_name = 1;
2754}
2755
2756/**
Carmen Agimof6688a352019-01-30 19:36:04 +00002757 * Logs whenever an app is installed on external storage.
2758 * Logged from:
2759 frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
2760 */
2761message AppInstallOnExternalStorageReported {
2762 // The type of external storage.
2763 optional android.stats.storage.ExternalStorageType storage_type = 1;
2764 // The name of the package that is installed on the sd card.
2765 optional string package_name = 2;
2766}
2767
2768/**
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002769 * Logs when an app crashes.
David Chen9e3808c2017-11-20 17:25:34 -08002770 * Logged from:
2771 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2772 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002773message AppCrashOccurred {
Yao Chenc40a19d2018-03-15 16:48:25 -07002774 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002775
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002776 optional string event_type = 2;
David Chen9e3808c2017-11-20 17:25:34 -08002777
2778 // The name of the process.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002779 // system_server if it is not by an app
David Chen9e3808c2017-11-20 17:25:34 -08002780 optional string process_name = 3;
2781
2782 // The pid if available. -1 means not available.
David Chen6e3e6cb2018-01-03 16:14:06 -08002783 optional sint32 pid = 4;
Chenjie Yuf17bf622018-04-02 14:22:19 -07002784
2785 optional string package_name = 5;
2786
2787 enum InstantApp {
2788 UNAVAILABLE = 0;
2789 FALSE = 1;
2790 TRUE = 2;
2791 }
2792 optional InstantApp is_instant_app = 6;
2793
2794 enum ForegroundState {
2795 UNKNOWN = 0;
2796 BACKGROUND = 1;
2797 FOREGROUND = 2;
2798 }
2799 optional ForegroundState foreground_state = 7;
Yang Lu732d6382018-11-05 07:53:12 -08002800
2801 optional android.server.ErrorSource error_source = 8;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002802}
David Chen9e3808c2017-11-20 17:25:34 -08002803
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002804/**
2805 * Logs when a WTF (What a Terrible Failure) happened.
2806 * Logged from:
2807 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2808 */
2809message WTFOccurred {
2810 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002811
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002812 optional string tag = 2;
David Chen9e3808c2017-11-20 17:25:34 -08002813
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002814 // The name of the process.
2815 // system_server if it is not by an app
2816 optional string process_name = 3;
David Chen6e3e6cb2018-01-03 16:14:06 -08002817
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002818 // The pid if available. -1 means not available.
2819 optional sint32 pid = 4;
Yang Lu732d6382018-11-05 07:53:12 -08002820
2821 optional android.server.ErrorSource error_source = 5;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002822}
2823
2824/**
2825 * Logs when system server reports low memory.
2826 * Logged from:
2827 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2828 */
2829message LowMemReported {
2830}
2831
2832/**
2833 * Logs when an app ANR (App Not Responding) occurs.
2834 * Logged from:
2835 * frameworks/base/services/core/java/com/android/server/am/AppErrors.java
2836 */
2837message ANROccurred {
2838 optional int32 uid = 1 [(is_uid) = true];
2839
2840 optional string process_name = 2;
2841
2842 optional string short_component_name = 3;
2843
2844 optional string reason = 4;
Chenjie Yuf17bf622018-04-02 14:22:19 -07002845
2846 enum InstantApp {
2847 UNAVAILABLE = 0;
2848 FALSE = 1;
2849 TRUE = 2;
2850 }
2851 optional InstantApp is_instant_app = 5;
2852
2853 enum ForegroundState {
2854 UNKNOWN = 0;
2855 BACKGROUND = 1;
2856 FOREGROUND = 2;
2857 }
2858 optional ForegroundState foreground_state = 6;
Yang Lu732d6382018-11-05 07:53:12 -08002859
2860 optional android.server.ErrorSource error_source = 7;
2861
2862 optional string package_name = 8;
David Chen9e3808c2017-11-20 17:25:34 -08002863}
2864
Bookatza7020bd2018-08-28 16:29:35 -07002865/**
2866 * Logs when the vibrator state changes.
2867 * Logged from:
2868 * frameworks/base/services/core/java/com/android/server/VibratorService.java
2869 */
2870message VibratorStateChanged {
2871 repeated AttributionNode attribution_node = 1;
2872
2873 enum State {
2874 OFF = 0;
2875 ON = 1;
2876 }
2877 optional State state = 2;
2878
2879 // Duration (in milliseconds) requested to keep the vibrator on.
2880 // Only applicable for State == ON.
2881 optional int64 duration_millis = 3;
2882}
2883
David Chen0a368b22017-12-06 16:28:16 -08002884/*
2885 * Allows other apps to push events into statsd.
2886 * Logged from:
2887 * frameworks/base/core/java/android/util/StatsLog.java
2888 */
David Chen0b5c90c2018-01-25 16:51:49 -08002889message AppBreadcrumbReported {
David Chen0a368b22017-12-06 16:28:16 -08002890 // The uid of the application that sent this custom atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07002891 optional int32 uid = 1 [(is_uid) = true];
David Chen0a368b22017-12-06 16:28:16 -08002892
2893 // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16).
2894 optional int32 label = 2;
2895
2896 // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom
2897 // predicates for the metrics).
2898 enum State {
2899 UNKNOWN = 0;
2900 UNSPECIFIED = 1; // For events that are known to not represent START/STOP.
2901 STOP = 2;
2902 START = 3;
2903 }
2904 optional State state = 3;
2905}
2906
David Chen9e3808c2017-11-20 17:25:34 -08002907/**
Bookatz7948c872018-09-04 12:58:33 -07002908 * Logs the wall-clock time when a significant wall-clock time shift occurs.
2909 * For example, this could be due to the user manually changing the time.
2910 *
2911 * Logged from:
2912 * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
2913 */
2914message WallClockTimeShifted {
2915 // New wall-clock time in milliseconds, according to System.currentTimeMillis().
2916 optional int64 wall_clock_timestamp_millis = 1;
2917}
2918
2919/**
Bookatz8fcd09a2017-12-18 13:01:10 -08002920 * Logs when statsd detects an anomaly.
2921 *
2922 * Logged from:
2923 * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp
2924 */
2925message AnomalyDetected {
2926 // Uid that owns the config whose anomaly detection alert fired.
Yao Chenc40a19d2018-03-15 16:48:25 -07002927 optional int32 config_uid = 1 [(is_uid) = true];
Bookatz8fcd09a2017-12-18 13:01:10 -08002928
Yangster-mac94e197c2018-01-02 16:03:03 -08002929 // Id of the config whose anomaly detection alert fired.
2930 optional int64 config_id = 2;
Bookatz8fcd09a2017-12-18 13:01:10 -08002931
Yangster-mac94e197c2018-01-02 16:03:03 -08002932 // Id of the alert (i.e. name of the anomaly that was detected).
2933 optional int64 alert_id = 3;
Bookatz8fcd09a2017-12-18 13:01:10 -08002934}
2935
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002936message AppStartOccurred {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002937 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07002938 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002939
2940 // The app package name.
2941 optional string pkg_name = 2;
2942
2943 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002944 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002945 WARM = 1;
2946 HOT = 2;
2947 COLD = 3;
2948 }
2949 // The transition type.
2950 optional TransitionType type = 3;
2951
2952 // The activity name.
2953 optional string activity_name = 4;
2954
2955 // The name of the calling app. Empty if not set.
2956 optional string calling_pkg_name = 5;
2957
2958 // Whether the app is an instant app.
2959 optional bool is_instant_app = 6;
2960
2961 // Device uptime when activity started.
David Chen0b5c90c2018-01-25 16:51:49 -08002962 optional int64 activity_start_millis = 7;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002963
Bookatz80d11a02018-01-16 10:46:35 -08002964 optional android.app.AppTransitionReasonEnum reason = 8;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002965
David Chen0b5c90c2018-01-25 16:51:49 -08002966 optional int32 transition_delay_millis = 9;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002967 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08002968 optional int32 starting_window_delay_millis = 10;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002969 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08002970 optional int32 bind_application_delay_millis = 11;
2971 optional int32 windows_drawn_delay_millis = 12;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002972
2973 // Empty if not set.
2974 optional string launch_token = 13;
2975
Calin Juravle759fbda2018-02-20 19:52:30 +00002976 // The compiler filter used when when the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07002977 optional int32 package_optimization_compilation_filter = 14;
Calin Juravle759fbda2018-02-20 19:52:30 +00002978
2979 // The reason why the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07002980 optional int32 package_optimization_compilation_reason = 15;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002981}
2982
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002983message AppStartCanceled {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002984 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07002985 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002986
2987 // The app package name.
2988 optional string pkg_name = 2;
2989
2990 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002991 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002992 WARM = 1;
2993 HOT = 2;
2994 COLD = 3;
2995 }
2996 // The transition type.
2997 optional TransitionType type = 3;
2998
2999 // The activity name.
3000 optional string activity_name = 4;
3001}
3002
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003003message AppStartFullyDrawn {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003004 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003005 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003006
3007 // The app package name.
3008 optional string pkg_name = 2;
3009
3010 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003011 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003012 WITH_BUNDLE = 1;
3013 WITHOUT_BUNDLE = 2;
3014 }
3015 // The transition type.
3016 optional TransitionType type = 3;
3017
3018 // The activity name.
3019 optional string activity_name = 4;
3020
3021 optional bool transition_process_running = 5;
3022
3023 // App startup time (until call to Activity#reportFullyDrawn()).
David Chen0b5c90c2018-01-25 16:51:49 -08003024 optional int64 app_startup_time_millis = 6;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00003025}
3026
Bookatz8fcd09a2017-12-18 13:01:10 -08003027/**
Chenjie Yu52cacc62017-12-08 18:11:45 -08003028 * Logs a picture-in-picture action
3029 * Logged from:
3030 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3031 * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java
3032 * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
3033 */
3034message PictureInPictureStateChanged {
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003035 // -1 if it is not available
Yao Chenc40a19d2018-03-15 16:48:25 -07003036 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu52cacc62017-12-08 18:11:45 -08003037
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003038 optional string short_name = 2;
Chenjie Yu52cacc62017-12-08 18:11:45 -08003039
Chenjie Yu52cacc62017-12-08 18:11:45 -08003040 enum State {
3041 ENTERED = 1;
3042 EXPANDED_TO_FULL_SCREEN = 2;
3043 MINIMIZED = 3;
3044 DISMISSED = 4;
3045 }
Chenjie Yuae9fdf042018-02-15 10:19:32 -08003046 optional State state = 3;
Chenjie Yu52cacc62017-12-08 18:11:45 -08003047}
3048
3049/**
Chenjie Yue8904192017-12-08 19:12:57 -08003050 * Logs overlay action
3051 * Logged from:
3052 * services/core/java/com/android/server/wm/Session.java
3053 */
3054message OverlayStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07003055 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yue8904192017-12-08 19:12:57 -08003056
3057 optional string package_name = 2;
3058
3059 optional bool using_alert_window = 3;
3060
3061 enum State {
3062 ENTERED = 1;
3063 EXITED = 2;
3064 }
3065 optional State state = 4;
3066}
3067
Chenjie Yuccfe6452018-01-30 11:33:21 -08003068/*
3069 * Logs foreground service starts and stops.
3070 * Note that this is not when a service starts or stops, but when it is
3071 * considered foreground.
3072 * Logged from
3073 * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
3074 */
3075message ForegroundServiceStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07003076 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuccfe6452018-01-30 11:33:21 -08003077 // package_name + "/" + class_name
3078 optional string short_name = 2;
3079
3080 enum State {
3081 ENTER = 1;
3082 EXIT = 2;
3083 }
3084 optional State state = 3;
3085}
3086
Chenjie Yue8904192017-12-08 19:12:57 -08003087/**
Chenjie Yubbcbc602018-02-05 16:51:52 -08003088 * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky
3089 * behavior in its own uid. However, the metrics of these isolated uid's almost always should be
3090 * attributed back to the parent (host) uid. One example is Chrome.
3091 *
3092 * Logged from:
3093 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
3094 */
3095message IsolatedUidChanged {
3096 // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003097 // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd.
Bookatz3c648862018-05-25 13:32:43 -07003098 // This field is ignored when event == REMOVED.
Chenjie Yubbcbc602018-02-05 16:51:52 -08003099 optional int32 parent_uid = 1;
3100
3101 optional int32 isolated_uid = 2;
3102
3103 // We expect an isolated uid to be removed before if it's used for another parent uid.
3104 enum Event {
3105 REMOVED = 0;
3106 CREATED = 1;
3107 }
3108 optional Event event = 3;
3109}
3110
3111/*
3112 * Logs the reception of an incoming network packet causing the main system to wake up for
3113 * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd
3114 * and processed by WakeupController.cpp.
3115 */
3116message PacketWakeupOccurred {
3117 // The uid owning the socket into which the packet was delivered, or -1 if the packet was
3118 // delivered nowhere.
Yao Chenc40a19d2018-03-15 16:48:25 -07003119 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003120 // The interface name on which the packet was received.
3121 optional string iface = 2;
3122 // The ethertype value of the packet.
3123 optional int32 ethertype = 3;
3124 // String representation of the destination MAC address of the packet.
3125 optional string destination_hardware_address = 4;
3126 // String representation of the source address of the packet if this was an IP packet.
3127 optional string source_ip = 5;
3128 // String representation of the destination address of the packet if this was an IP packet.
3129 optional string destination_ip = 6;
3130 // The value of the protocol field if this was an IPv4 packet or the value of the Next Header
3131 // field if this was an IPv6 packet. The range of possible values is the same for both IP
3132 // families.
3133 optional int32 ip_next_header = 7;
3134 // The source port if this was a TCP or UDP packet.
3135 optional int32 source_port = 8;
3136 // The destination port if this was a TCP or UDP packet.
3137 optional int32 destination_port = 9;
3138}
3139
3140/*
3141 * Logs the memory stats for an app on startup.
3142 * Logged from:
3143 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3144 */
3145message AppStartMemoryStateCaptured {
3146 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003147 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003148
3149 // The process name.
3150 optional string process_name = 2;
3151
3152 // The activity name.
3153 optional string activity_name = 3;
3154
3155 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003156 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003157
3158 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003159 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003160
3161 // RSS
3162 optional int64 rss_in_bytes = 6;
3163
3164 // CACHE
3165 optional int64 cache_in_bytes = 7;
3166
3167 // SWAP
3168 optional int64 swap_in_bytes = 8;
3169}
3170
3171/*
3172 * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries
3173 * for LMK event.
3174 * Logged from:
3175 * system/core/lmkd/lmkd.c
3176 */
3177message LmkStateChanged {
3178 enum State {
3179 UNKNOWN = 0;
3180 START = 1;
3181 STOP = 2;
3182 }
3183 optional State state = 1;
3184}
3185
3186/*
3187 * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure.
3188 * Logged from:
3189 * system/core/lmkd/lmkd.c
3190 */
3191message LmkKillOccurred {
3192 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003193 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003194
3195 // The process name.
3196 optional string process_name = 2;
3197
3198 // oom adj score.
Yangster-maca8a30442018-10-13 23:46:34 -07003199 optional int32 oom_adj_score = 3;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003200
3201 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003202 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003203
3204 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003205 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003206
3207 // RSS
3208 optional int64 rss_in_bytes = 6;
3209
3210 // CACHE
3211 optional int64 cache_in_bytes = 7;
3212
3213 // SWAP
3214 optional int64 swap_in_bytes = 8;
Jim Blackler8593d1f2018-11-21 15:24:48 +00003215
3216 // The elapsed real time of start of the process.
3217 optional int64 process_start_time_nanos = 9;
Suren Baghdasaryan1fbaa1f2019-03-04 11:09:31 -08003218
3219 // Min oom adj score considered by lmkd.
3220 optional int32 min_oom_score = 10;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003221}
3222
Rajeev Kumar51b54602018-03-01 12:18:26 -08003223/*
3224 * Logs when the ActivityManagerService detects that an app died.
3225 *
3226 * Logged from:
3227 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3228 */
3229message AppDied {
3230 // timestamp(elapsedRealtime) of record creation
Yangster-macb6b77c62018-10-12 19:33:24 -07003231 optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE];
Rajeev Kumar51b54602018-03-01 12:18:26 -08003232}
3233
Howard Ro21a039c2018-08-06 14:55:47 -07003234/**
3235 * An atom for generic metrics logging. Available from Android Q.
3236 */
3237message GenericAtom {
3238 // The uid of the application that sent this custom atom.
3239 optional int32 uid = 1 [(is_uid) = true];
3240
3241 // An event_id indicates the type of event.
Howard Ro9a862de2018-10-11 16:03:33 -07003242 optional android.stats.EventType event_id = 2;
Howard Ro21a039c2018-08-06 14:55:47 -07003243}
3244
Tej Singhd6d6d772018-09-05 17:41:25 -07003245/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003246 * Logs when a biometric acquire event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003247 *
3248 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003249 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003250 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003251message BiometricAcquired {
3252 // Biometric modality that was acquired.
3253 optional android.hardware.biometrics.ModalityEnum modality = 1;
3254 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java.
3255 optional int32 user = 2;
3256 // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage.
3257 optional bool is_crypto = 3;
3258 // Action that the device is performing. Acquired messages are only expected for enroll and
3259 // authenticate. Other actions may indicate an error.
3260 optional android.hardware.biometrics.ActionEnum action = 4;
3261 // The client that this acquisition was received for.
3262 optional android.hardware.biometrics.ClientEnum client = 5;
3263 // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager.
3264 optional int32 acquire_info = 6;
3265 // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
3266 optional int32 acquire_info_vendor = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003267 // Dictates if this message should trigger additional debugging.
3268 optional bool debug = 8;
Tej Singhd6d6d772018-09-05 17:41:25 -07003269}
3270
3271/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003272 * Logs when a biometric authentication event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003273 *
3274 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003275 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003276 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003277message BiometricAuthenticated {
3278 // Biometric modality that was used.
3279 optional android.hardware.biometrics.ModalityEnum modality = 1;
3280 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3281 optional int32 user = 2;
3282 // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password
3283 // storage.
3284 optional bool is_crypto = 3;
3285 // The client that this acquisition was received for.
3286 optional android.hardware.biometrics.ClientEnum client = 4;
Kevin Chyndb77e132019-01-29 13:30:41 -08003287 // If authentication requires user confirmation. See BiometricPrompt's
3288 // setRequireConfirmation(bool) method.
3289 optional bool require_confirmation = 5;
Tej Singhd6d6d772018-09-05 17:41:25 -07003290
Kevin Chyn1741a072019-01-17 11:54:40 -08003291 enum State {
Tej Singhd6d6d772018-09-05 17:41:25 -07003292 UNKNOWN = 0;
Kevin Chyn1741a072019-01-17 11:54:40 -08003293 REJECTED = 1;
3294 PENDING_CONFIRMATION = 2;
3295 CONFIRMED = 3;
Tej Singhd6d6d772018-09-05 17:41:25 -07003296 }
Kevin Chyn1741a072019-01-17 11:54:40 -08003297
3298 // State of the current auth attempt.
Kevin Chyndb77e132019-01-29 13:30:41 -08003299 optional State state = 6;
Kevin Chyn1741a072019-01-17 11:54:40 -08003300 // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is
3301 // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to
3302 // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
3303 // CONFIRMED.
Kevin Chyndb77e132019-01-29 13:30:41 -08003304 optional int64 latency_millis = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003305 // Dictates if this message should trigger additional debugging.
3306 optional bool debug = 8;
Kevin Chyn1741a072019-01-17 11:54:40 -08003307}
3308
3309/**
3310 * Logs when a biometric error occurs.
3311 *
3312 * Logged from:
3313 * frameworks/base/services/core/java/com/android/server/biometrics
3314 */
3315message BiometricErrorOccurred {
3316 // Biometric modality that was used.
3317 optional android.hardware.biometrics.ModalityEnum modality = 1;
3318 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3319 optional int32 user = 2;
3320 // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage.
3321 optional bool is_crypto = 3;
3322 // Action that the device is performing.
3323 optional android.hardware.biometrics.ActionEnum action = 4;
3324 // The client that this acquisition was received for.
3325 optional android.hardware.biometrics.ClientEnum client = 5;
3326 // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors
3327 // are unique to modality.
3328 optional int32 error_info = 6;
3329 // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
3330 // by the vendor and not specified by the HIDL interface.
3331 optional int32 error_info_vendor = 7;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003332 // Dictates if this message should trigger additional debugging.
3333 optional bool debug = 8;
Kevin Chyn7fca2362019-06-20 17:20:42 -07003334 // Time spent during the authentication attempt.
3335 optional int64 latency_millis = 9;
Kevin Chyn1741a072019-01-17 11:54:40 -08003336}
3337
3338/**
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003339 * Logs when a system health issue is detected.
Kevin Chyn1741a072019-01-17 11:54:40 -08003340 * Logged from:
3341 * frameworks/base/services/core/java/com/android/server/biometrics
3342 */
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003343message BiometricSystemHealthIssueDetected {
Kevin Chyn1741a072019-01-17 11:54:40 -08003344 // Biometric modality.
3345 optional android.hardware.biometrics.ModalityEnum modality = 1;
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003346 // Type of issue detected.
3347 optional android.hardware.biometrics.IssueEnum issue = 2;
joshmccloskey1fad0f62019-04-01 13:32:53 -07003348 // Dictates if this message should trigger additional debugging.
3349 optional bool debug = 3;
Tej Singhd6d6d772018-09-05 17:41:25 -07003350}
Howard Ro688ae182018-09-25 00:09:36 -07003351
joshmccloskey6f952b22019-03-25 20:59:35 -07003352/**
3353 * Logs when a biometric enrollment occurs.
3354 *
3355 * Logged from:
3356 * frameworks/base/services/core/java/com/android/server/biometrics
3357 */
3358message BiometricEnrolled {
3359 // Biometric modality that was used.
3360 optional android.hardware.biometrics.ModalityEnum modality = 1;
3361 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3362 optional int32 user = 2;
3363 // The amount of time the enrollment took in milliseconds.
3364 optional int64 latency_millis = 3;
3365 // Whether or not the enrollment was successful.
3366 optional bool success = 4;
3367}
3368
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003369/*
Tej Singh0d176952019-01-16 19:10:54 -08003370 * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips.
Yangster-macb89807e2018-11-15 21:10:57 -08003371 */
Tej Singh0d176952019-01-16 19:10:54 -08003372message FlagFlipUpdateOccurred {
3373 // If the event is from a flag config package, specify the package name.
3374 optional string flag_flip_package_name = 1;
3375
3376 // The order id of the package
3377 optional int64 order_id = 2;
Yangster-macb89807e2018-11-15 21:10:57 -08003378}
3379
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003380/**
3381 * Potential experiment ids that goes with a train install.
3382 */
3383message TrainExperimentIds {
3384 repeated int64 experiment_id = 1;
3385}
3386
Yangster-macb89807e2018-11-15 21:10:57 -08003387/*
3388 * Logs when a binary push state changes.
Chenjie Yu8366c712019-01-16 20:48:30 -08003389 * Logged by the installer via public api.
Yangster-macb89807e2018-11-15 21:10:57 -08003390 */
3391message BinaryPushStateChanged {
Chenjie Yu8366c712019-01-16 20:48:30 -08003392 // Name of the train.
3393 optional string train_name = 1;
3394 // Version code for a "train" of packages that need to be installed atomically
3395 optional int64 train_version_code = 2;
3396 // After installation of this package, device requires a restart.
3397 optional bool requires_staging = 3;
3398 // Rollback should be enabled for this install.
3399 optional bool rollback_enabled = 4;
3400 // Requires low latency monitoring if possible.
3401 optional bool requires_low_latency_monitor = 5;
3402
Yangster-macb89807e2018-11-15 21:10:57 -08003403 enum State {
Chenjie Yu8366c712019-01-16 20:48:30 -08003404 UNKNOWN = 0;
3405 INSTALL_REQUESTED = 1;
3406 INSTALL_STARTED = 2;
3407 INSTALL_STAGED_NOT_READY = 3;
3408 INSTALL_STAGED_READY = 4;
3409 INSTALL_SUCCESS = 5;
Tej Singh403fe472019-04-30 12:54:21 -07003410 // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
3411 // and INSTALL_FAILURE_COMMIT.
3412 INSTALL_FAILURE = 6 [deprecated = true];
3413 // This enum is for installs that are manually cancelled via the Manual Update UI.
Chenjie Yu8366c712019-01-16 20:48:30 -08003414 INSTALL_CANCELLED = 7;
3415 INSTALLER_ROLLBACK_REQUESTED = 8;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08003416 INSTALLER_ROLLBACK_INITIATED = 9;
3417 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
3418 INSTALLER_ROLLBACK_STAGED = 11;
3419 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
3420 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
3421 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
3422 INSTALLER_ROLLBACK_SUCCESS = 15;
3423 INSTALLER_ROLLBACK_FAILURE = 16;
Howard Ro174ed562019-04-07 22:17:58 -07003424 INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
3425 INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
3426 INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
3427 INSTALL_STAGED_CANCEL_REQUESTED = 20;
3428 INSTALL_STAGED_CANCEL_SUCCESS = 21;
3429 INSTALL_STAGED_CANCEL_FAILURE = 22;
Tej Singh403fe472019-04-30 12:54:21 -07003430 INSTALL_FAILURE_DOWNLOAD = 23;
3431 INSTALL_FAILURE_STATE_MISMATCH = 24;
3432 INSTALL_FAILURE_COMMIT = 25;
Yangster-macb89807e2018-11-15 21:10:57 -08003433 }
Chenjie Yu8366c712019-01-16 20:48:30 -08003434 optional State state = 6;
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003435 // Possible experiment ids for monitoring this push.
3436 optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
3437 // user id
3438 optional int32 user_id = 8;
Yangster-macb89807e2018-11-15 21:10:57 -08003439}
3440
Tej Singhc9203082019-05-03 13:42:23 -07003441/* Test atom, is not logged anywhere */
3442message TestAtomReported {
3443 repeated AttributionNode attribution_node = 1;
3444 optional int32 int_field = 2;
3445 optional int64 long_field = 3;
3446 optional float float_field = 4;
3447 optional string string_field = 5;
3448 optional bool boolean_field = 6;
3449 enum State {
3450 UNKNOWN = 0;
3451 OFF = 1;
3452 ON = 2;
3453 }
3454 optional State state = 7;
3455 optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES];
3456}
3457
Maggie Whitefc1aa592018-11-28 21:55:23 -08003458/** Represents USB port overheat event. */
3459message UsbPortOverheatEvent {
3460 /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */
3461 optional int32 plug_temperature_deci_c = 1;
3462
3463 /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */
3464 optional int32 max_temperature_deci_c = 2;
3465
3466 /* Time between USB plug event and overheat threshold trip, in seconds. */
3467 optional int32 time_to_overheat_secs = 3;
3468
3469 /* Time between overheat threshold trip and hysteresis, in seconds. */
3470 optional int32 time_to_hysteresis_secs = 4;
3471
3472 /* Time between hysteresis and active mitigation ending, in seconds. */
3473 optional int32 time_to_inactive_secs = 5;
3474};
3475
Maggie White8735b852019-01-18 11:40:49 -08003476/**
3477 * Logs total effective full charge and discharge cycles on a battery.
3478 * Here are some examples of one effective cycle:
3479 * 1) the battery charges from 0% to 100% and drains back to 0%,
3480 * 2) charging from 50% to 100% and draining back to 50% twice.
3481 * Pulled from:
3482 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
3483 */
3484message BatteryCycleCount {
3485 /* Number of total charge and discharge cycles on the system battery. */
3486 optional int32 cycle_count = 1;
3487}
3488
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003489/**
Carmen Agimof12dec122019-03-06 16:14:38 +00003490 * Logs that external storage is mounted and information about it, the storage type (sd card/usb/
3491 * others), its type (public or private) and the size in bytes.
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003492 * Pulled from:
3493 * StatsCompanionService
3494 */
3495
Carmen Agimof12dec122019-03-06 16:14:38 +00003496message ExternalStorageInfo {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003497
Carmen Agimof12dec122019-03-06 16:14:38 +00003498 enum VolumeType {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003499 UNKNOWN = 0;
Carmen Agimof12dec122019-03-06 16:14:38 +00003500 PUBLIC = 1;
3501 PRIVATE = 2;
3502 OTHER = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003503 }
3504
Carmen Agimof12dec122019-03-06 16:14:38 +00003505 // The type of external storage.
3506 optional android.stats.storage.ExternalStorageType storage_type = 1;
3507 // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal.
3508 optional VolumeType volume_type = 2;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003509 // Total size of the sd card in bytes.
Carmen Agimof12dec122019-03-06 16:14:38 +00003510 optional int64 size_bytes = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003511}
3512
Yangster-macb89807e2018-11-15 21:10:57 -08003513/*
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003514 * Logs when a connection becomes available and lost.
3515 * Logged in StatsCompanionService.java
3516 */
3517message ConnectivityStateChanged {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003518 // Id of the network.
3519 optional int32 net_id = 1;
3520
3521 enum State {
3522 UNKNOWN = 0;
3523 CONNECTED = 1;
3524 DISCONNECTED = 2;
3525 }
3526 // Connected state of a network.
3527 optional State state = 2;
3528}
3529
3530/**
3531 * Logs when a service starts and stops.
3532 * Logged from:
3533 * services/core/java/com/android/server/am/ActiveServices.java
3534 */
3535message ServiceStateChanged {
3536
3537 optional int32 uid = 1 [(is_uid) = true];
3538
3539 optional string package_name = 2;
3540
3541 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003542
3543 enum State {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003544 START = 1;
3545 STOP = 2;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003546 }
Chenjie Yu75b3c492018-10-06 21:45:19 -07003547
3548 optional State state = 4;
3549}
3550
3551/**
3552 * Logs when a service is launched.
3553 * Logged from:
3554 * services/core/java/com/android/server/am/ActiveServices.java
3555 */
3556message ServiceLaunchReported {
3557
3558 optional int32 uid = 1 [(is_uid) = true];
3559
3560 optional string package_name = 2;
3561
3562 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003563}
Howard Ro688ae182018-09-25 00:09:36 -07003564
Andrei Onea4ad6d0c2019-02-08 13:54:12 +00003565/**
3566 * Logs when a hidden API is used.
3567 *
3568 * Logged from:
3569 * libcore/libart/src/main/java/dalvik/system/VMRuntime.java
3570 */
3571message HiddenApiUsed {
3572 // The uid of the app making the hidden access.
3573 optional int32 uid = 1 [(is_uid) = true];
3574
3575 // Signature of the method or field accessed.
3576 optional string signature = 2;
3577
3578 enum AccessMethod {
3579 NONE = 0;
3580 REFLECTION = 1;
3581 JNI = 2;
3582 LINKING = 3;
3583 }
3584
3585 // Type of access.
3586 optional AccessMethod access_method = 3;
3587
3588 // Whether the access was prevented or not.
3589 optional bool access_denied = 4;
3590}
3591
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003592/**
3593 * Logs user interaction with the Privacy Indicators added in Q. In particular:
3594 * - When user sees privacy chip
3595 * - When user clicks privacy chip
3596 * - How does the user exit the Privacy Dialog
3597 * Logged from:
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003598 * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
3599 */
3600message PrivacyIndicatorsInteracted {
3601
3602 enum Type {
3603 UNKNOWN = 0;
3604 CHIP_VIEWED = 1;
3605 CHIP_CLICKED = 2;
3606 DIALOG_PRIVACY_SETTINGS = 3;
3607 DIALOG_DISMISS = 4;
3608 DIALOG_LINE_ITEM = 5;
3609 }
3610
3611 optional Type type = 1 [(state_field_option).option = EXCLUSIVE];
3612
3613 // Used if the type is LINE_ITEM
3614 optional string package_name = 2;
3615}
3616
Carmen Agimof6dcc5032019-03-01 16:20:09 +00003617/**
3618 * Logs information about a package that is moved from the internal to external storage and vice
3619 * versa.
3620 * It logs the package name, the type of the external storage where the package is installed
3621 * (if moved to external storage, or UNKNOWN if moved to internal storage),
3622 * and the move type: if it's from internal to external or the other way around.
3623 *
3624 * Logged from:
3625 frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
3626 */
3627message AppMovedStorageReported {
3628 enum MoveType {
3629 UNKNOWN = 0;
3630 TO_EXTERNAL = 1;
3631 TO_INTERNAL = 2;
3632 }
3633 // The type of the external storage.
3634 optional android.stats.storage.ExternalStorageType external_storage_type = 1;
3635 // The type of move.
3636 optional MoveType move_type = 2;
3637 // The name of the package that was moved.
3638 optional string package_name = 3;
3639}
3640
jianjin8f2dee02019-03-29 14:03:08 -07003641/**
3642 * Logs when system server watchdog occurs.
3643 * Logged from:
3644 * frameworks/base/services/core/java/com/android/server/Watchdog.java
3645 */
3646message SystemServerWatchdogOccurred {
3647 optional string subject = 1;
3648}
3649
3650/**
3651 * Logs when new file added to tombstones.
3652 * Logged from:
3653 * frameworks/base/core/java/com/android/server/BootReceiver.java
3654 */
3655message TombStoneOccurred {
3656}
3657
Hai Zhang5d3328d2019-04-13 21:25:06 +08003658/*
3659 * Information about a role request
3660 *
3661 * Logged from:
3662 * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java
3663 */
3664message RoleRequestResultReported {
3665 // UID of application requesting the role
3666 optional int32 requesting_uid = 1;
3667
3668 // Package name of application requesting the role
3669 optional string requesting_package_name = 2;
3670
3671 // The role to be granted
3672 optional string role_name = 3;
3673
3674 // The count of applications qualifying for the role
3675 optional int32 qualifying_count = 4;
3676
3677 // UID of application current granted the role
3678 optional int32 current_uid = 5;
3679
3680 // Package name of application current granted the role
3681 optional string current_package_name = 6;
3682
3683 // UID of another application that user chose to grant the role to, instead of the requesting
3684 // application
3685 optional int32 granted_another_uid = 7;
3686
3687 // Package name of another application that user chose to grant the role to, instead of the
3688 // requesting application
3689 optional string granted_another_package_name = 8;
3690
3691 enum Result {
3692 UNDEFINED = 0;
3693 // role request was ignored
3694 IGNORED = 1;
3695 // role request was ignored because it's already granted
3696 IGNORED_ALREADY_GRANTED = 2;
3697 // role request was ignored because the application isn't qualified
3698 IGNORED_NOT_QUALIFIED = 3;
3699 // role request was ignored because user said it should be always denied
3700 IGNORED_USER_ALWAYS_DENIED = 4;
3701 // role was granted by user action
3702 USER_GRANTED = 5;
3703 // role was denied by user action
3704 USER_DENIED = 6;
3705 // role was denied by user granting another application the role
3706 USER_DENIED_GRANTED_ANOTHER = 7;
3707 // role was denied and set to be always denied by the user
3708 USER_DENIED_WITH_ALWAYS = 8;
3709 }
3710 // The result of the role request
3711 optional Result result = 9;
3712}
3713
Chenjie Yubbcbc602018-02-05 16:51:52 -08003714//////////////////////////////////////////////////////////////////////
3715// Pulled atoms below this line //
3716//////////////////////////////////////////////////////////////////////
3717
3718/**
David Chenc8a43242017-10-17 16:23:28 -07003719 * Pulls bytes transferred via wifi (Sum of foreground and background usage).
3720 *
3721 * Pulled from:
3722 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
3723 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003724message WifiBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07003725 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003726
3727 optional int64 rx_bytes = 2;
3728
3729 optional int64 rx_packets = 3;
3730
3731 optional int64 tx_bytes = 4;
3732
3733 optional int64 tx_packets = 5;
3734}
3735
3736/**
3737 * Pulls bytes transferred via wifi (separated by foreground and background usage).
3738 *
3739 * Pulled from:
3740 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
3741 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003742message WifiBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07003743 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003744
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003745 // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats.
3746 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07003747
3748 optional int64 rx_bytes = 3;
3749
3750 optional int64 rx_packets = 4;
3751
3752 optional int64 tx_bytes = 5;
3753
3754 optional int64 tx_packets = 6;
3755}
3756
3757/**
3758 * Pulls bytes transferred via mobile networks (Sum of foreground and background usage).
3759 *
3760 * Pulled from:
3761 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
3762 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003763message MobileBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07003764 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003765
3766 optional int64 rx_bytes = 2;
3767
3768 optional int64 rx_packets = 3;
3769
3770 optional int64 tx_bytes = 4;
3771
3772 optional int64 tx_packets = 5;
3773}
3774
3775/**
3776 * Pulls bytes transferred via mobile networks (separated by foreground and background usage).
3777 *
3778 * Pulled from:
3779 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
3780 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003781message MobileBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07003782 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003783
Yao Chenc40a19d2018-03-15 16:48:25 -07003784 // 1 denotes foreground and 0 denotes background. This is called Set in
3785 // NetworkStats.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003786 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07003787
3788 optional int64 rx_bytes = 3;
3789
3790 optional int64 rx_packets = 4;
3791
3792 optional int64 tx_bytes = 5;
3793
3794 optional int64 tx_packets = 6;
3795}
3796
3797/**
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003798 * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
3799 *
3800 * Pulled from:
3801 * StatsCompanionService
3802 */
3803message BluetoothBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07003804 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003805
3806 optional int64 rx_bytes = 2;
3807
3808 optional int64 tx_bytes = 3;
3809}
3810
3811/**
David Chenc8a43242017-10-17 16:23:28 -07003812 * Pulls the kernel wakelock durations. This atom is adapted from
3813 * android/internal/os/KernelWakelockStats.java
3814 *
3815 * Pulled from:
3816 * StatsCompanionService using KernelWakelockReader.
3817 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003818message KernelWakelock {
David Chenc8a43242017-10-17 16:23:28 -07003819 optional string name = 1;
3820
3821 optional int32 count = 2;
3822
3823 optional int32 version = 3;
3824
Yangster-maca8a30442018-10-13 23:46:34 -07003825 optional int64 time_micros = 4;
David Chenc8a43242017-10-17 16:23:28 -07003826}
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003827
Chenjie Yu05013b32017-11-21 10:21:41 -08003828/**
Benjamin Schwartz51329b72018-12-06 10:48:03 -08003829 * Pulls low power state information. If power.stats HAL is not available, this
3830 * includes platform and subsystem sleep state information,
3831 * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState
3832 * as defined in:
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003833 * hardware/interfaces/power/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003834 * hardware/interfaces/power/1.1/types.hal
Benjamin Schwartz51329b72018-12-06 10:48:03 -08003835 * If power.stats HAL is available, this includes PowerEntityStateResidencyResult
3836 * as defined in:
3837 * hardware/interfaces/power/stats/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003838 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003839message SubsystemSleepState {
Chenjie Yubbcbc602018-02-05 16:51:52 -08003840 // Subsystem name
3841 optional string subsystem_name = 1;
3842 // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty.
3843 // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name.
Benjamin Schwartz51329b72018-12-06 10:48:03 -08003844 // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the
3845 // powerEntityStateName from the corresponding PowerEntityStateInfo.
Chenjie Yubbcbc602018-02-05 16:51:52 -08003846 optional string subname = 2;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08003847 // The number of times it entered, or voted for entering the sleep state
Chenjie Yubbcbc602018-02-05 16:51:52 -08003848 optional uint64 count = 3;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08003849 // The length of time spent in, or spent voting for, the sleep state
David Chen0b5c90c2018-01-25 16:51:49 -08003850 optional uint64 time_millis = 4;
David Chen21582962017-11-01 17:32:46 -07003851}
Chenjie Yu7f8def92017-11-03 09:33:15 -07003852
Chenjie Yu05013b32017-11-21 10:21:41 -08003853/**
Bookatz92da2832018-11-01 18:10:03 -07003854 * Pulls on-device power measurement information.
3855 * Data defined by hardware/interfaces/power/stats/1.0/types.hal.
3856 * Pulled from:
3857 * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp
3858 */
3859message OnDevicePowerMeasurement {
3860 // Name of the subsystem (to which the rail belongs).
3861 optional string subsystem_name = 1;
3862
3863 // Rail name. The rail lies within the subsystem.
3864 optional string rail_name = 2;
3865
3866 // Time (in ms since boot) at which the rail energy value was measured.
3867 // This may differ slightly from the time that statsd logs this information.
3868 optional uint64 measurement_timestamp_millis = 3;
3869
3870 // Accumulated energy used via the rail since device boot in uWs.
3871 optional uint64 energy_microwatt_secs = 4;
3872}
3873
3874/**
Chenjie Yu7f8def92017-11-03 09:33:15 -07003875 * Pulls Cpu time per frequency.
Chenjie Yu1ee9b742018-01-10 16:02:57 -08003876 * Pulls the time the cpu spend on the frequency index. Frequency index
3877 * starts from highest to lowest. The value should be monotonically
3878 * increasing since boot. However, if there is a cpu
3879 * hotplug event, the value would be reset as well.
Chenjie Yu7f8def92017-11-03 09:33:15 -07003880 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003881message CpuTimePerFreq {
Chenjie Yu7f8def92017-11-03 09:33:15 -07003882 optional uint32 cluster = 1;
3883 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08003884 optional uint64 time_millis = 3;
Chenjie Yu7f8def92017-11-03 09:33:15 -07003885}
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003886
Chenjie Yu05013b32017-11-21 10:21:41 -08003887/**
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003888 * Pulls Cpu Time Per Uid.
3889 * Note that isolated process uid time should be attributed to host uids.
3890 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003891message CpuTimePerUid {
Yao Chenc40a19d2018-03-15 16:48:25 -07003892 optional int32 uid = 1 [(is_uid) = true];
Misha Wagner6bc6c912018-11-16 13:19:54 +00003893 optional uint64 user_time_micros = 2;
3894 optional uint64 sys_time_micros = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003895}
3896
3897/**
3898 * Pulls Cpu Time Per Uid per frequency.
3899 * Note that isolated process uid time should be attributed to host uids.
3900 * For each uid, we order the time by descending frequencies.
3901 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003902message CpuTimePerUidFreq {
Yao Chenc40a19d2018-03-15 16:48:25 -07003903 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08003904 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08003905 optional uint64 time_millis = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003906}
Hugo Benichi884970e2017-11-14 22:42:46 +09003907
Chenjie Yu05013b32017-11-21 10:21:41 -08003908/**
3909 * Pulls Wifi Controller Activity Energy Info
3910 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003911message WifiActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08003912 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08003913 optional uint64 timestamp_millis = 1;
Chenjie Yu05013b32017-11-21 10:21:41 -08003914 // stack reported state
3915 // TODO: replace this with proto enum
3916 optional int32 stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07003917 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003918 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07003919 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003920 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07003921 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003922 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08003923 // product of current(mA), voltage(V) and time(ms)
3924 optional uint64 controller_energy_used = 6;
3925}
3926
3927/**
3928 * Pulls Modem Activity Energy Info
3929 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003930message ModemActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08003931 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08003932 optional uint64 timestamp_millis = 1;
Yangster-maca8a30442018-10-13 23:46:34 -07003933 // sleep time in millis.
David Chen0b5c90c2018-01-25 16:51:49 -08003934 optional uint64 sleep_time_millis = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07003935 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003936 optional uint64 controller_idle_time_millis = 3;
Chenjie Yu05013b32017-11-21 10:21:41 -08003937 /**
3938 * Tx power index
3939 * index 0 = tx_power < 0dBm
3940 * index 1 = 0dBm < tx_power < 5dBm
3941 * index 2 = 5dBm < tx_power < 15dBm
3942 * index 3 = 15dBm < tx_power < 20dBm
3943 * index 4 = tx_power > 20dBm
3944 */
3945 // tx time in ms at power level 0
David Chen0b5c90c2018-01-25 16:51:49 -08003946 optional uint64 controller_tx_time_pl0_millis = 4;
Chenjie Yu05013b32017-11-21 10:21:41 -08003947 // tx time in ms at power level 1
David Chen0b5c90c2018-01-25 16:51:49 -08003948 optional uint64 controller_tx_time_pl1_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08003949 // tx time in ms at power level 2
David Chen0b5c90c2018-01-25 16:51:49 -08003950 optional uint64 controller_tx_time_pl2_millis = 6;
Chenjie Yu05013b32017-11-21 10:21:41 -08003951 // tx time in ms at power level 3
David Chen0b5c90c2018-01-25 16:51:49 -08003952 optional uint64 controller_tx_time_pl3_millis = 7;
Chenjie Yu05013b32017-11-21 10:21:41 -08003953 // tx time in ms at power level 4
David Chen0b5c90c2018-01-25 16:51:49 -08003954 optional uint64 controller_tx_time_pl4_millis = 8;
Chenjie Yu05013b32017-11-21 10:21:41 -08003955 // rx time in ms at power level 5
David Chen0b5c90c2018-01-25 16:51:49 -08003956 optional uint64 controller_rx_time_millis = 9;
Chenjie Yu05013b32017-11-21 10:21:41 -08003957 // product of current(mA), voltage(V) and time(ms)
3958 optional uint64 energy_used = 10;
Joe Onorato62c220b2017-11-18 20:32:56 -08003959}
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08003960
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003961/**
3962 * Pulls Bluetooth Activity Energy Info
3963 * Note: BluetoothBytesTransfer is pulled at the same time from the controller.
3964 */
3965message BluetoothActivityInfo {
3966 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08003967 optional uint64 timestamp_millis = 1;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003968 // bluetooth stack state
3969 optional int32 bluetooth_stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07003970 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003971 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07003972 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003973 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07003974 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003975 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003976 // product of current(mA), voltage(V) and time(ms)
3977 optional uint64 energy_used = 6;
3978}
3979
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08003980/*
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003981 * Logs the memory stats for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00003982 *
3983 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService).
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003984 */
3985message ProcessMemoryState {
3986 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003987 optional int32 uid = 1 [(is_uid) = true];
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003988
3989 // The process name.
Rafal Slawikda51b932018-12-13 16:31:33 +00003990 // Usually package name, "system" for system server.
3991 // Provided by ActivityManagerService.
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003992 optional string process_name = 2;
3993
Rafal Slawikda51b932018-12-13 16:31:33 +00003994 // Current OOM score adjustment. Value read from ProcessRecord.
Yangster-maca8a30442018-10-13 23:46:34 -07003995 optional int32 oom_adj_score = 3;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003996
3997 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003998 optional int64 page_fault = 4;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003999
4000 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07004001 optional int64 page_major_fault = 5;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004002
Rajeev Kumar90235992018-01-29 11:06:48 -08004003 // RSS
Ioannis Ilkos466ad6c2019-06-18 17:42:00 +01004004 // Value is read from /proc/PID/status. Or from memory.stat, field
Rafal Slawikda51b932018-12-13 16:31:33 +00004005 // total_rss if per-app memory cgroups are enabled.
Rajeev Kumar90235992018-01-29 11:06:48 -08004006 optional int64 rss_in_bytes = 6;
4007
4008 // CACHE
Rafal Slawikda51b932018-12-13 16:31:33 +00004009 // Value is read from memory.stat, field total_cache if per-app memory
4010 // cgroups are enabled. Otherwise, 0.
Rajeev Kumar90235992018-01-29 11:06:48 -08004011 optional int64 cache_in_bytes = 7;
4012
4013 // SWAP
Rafal Slawikda51b932018-12-13 16:31:33 +00004014 // Value is read from memory.stat, field total_swap if per-app memory
Rafal Slawik44af3b32019-04-16 13:16:15 +01004015 // cgroups are enabled. Otherwise, VmSwap from /proc/PID/status.
Rajeev Kumar90235992018-01-29 11:06:48 -08004016 optional int64 swap_in_bytes = 8;
Rafal Slawikaaf60892018-09-12 13:04:30 +01004017
Rafal Slawikd03ae422018-11-20 11:27:45 +00004018 // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004019 optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true];
Rafal Slawik272a8162018-11-01 15:12:28 +00004020
4021 // Elapsed real time when the process started.
4022 // Value is read from /proc/PID/stat, field 22. 0 if read from per-app memory cgroups.
4023 optional int64 start_time_nanos = 10;
Ioannis Ilkos466ad6c2019-06-18 17:42:00 +01004024
4025 // Anonymous page size plus swap size. Values are read from /proc/PID/status.
4026 optional int32 anon_rss_and_swap_in_kilobytes = 11;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08004027}
4028
4029/*
Rafal Slawik08621582018-10-15 14:53:07 +01004030 * Logs the memory stats for a native process (from procfs).
Rafal Slawikda51b932018-12-13 16:31:33 +00004031 *
4032 * Pulled from StatsCompanionService for selected native processes.
Rafal Slawik08621582018-10-15 14:53:07 +01004033 */
4034message NativeProcessMemoryState {
Rafal Slawikbf67d072018-10-23 11:07:54 +01004035 // The uid if available. -1 means not available.
4036 optional int32 uid = 1 [(is_uid) = true];
Rafal Slawik08621582018-10-15 14:53:07 +01004037
Rafal Slawikbf67d072018-10-23 11:07:54 +01004038 // The process name.
Rafal Slawikda51b932018-12-13 16:31:33 +00004039 // Value read from /proc/PID/cmdline.
Rafal Slawikbf67d072018-10-23 11:07:54 +01004040 optional string process_name = 2;
Rafal Slawik08621582018-10-15 14:53:07 +01004041
Rafal Slawikbf67d072018-10-23 11:07:54 +01004042 // # of page-faults
4043 optional int64 page_fault = 3;
Rafal Slawik08621582018-10-15 14:53:07 +01004044
Rafal Slawikbf67d072018-10-23 11:07:54 +01004045 // # of major page-faults
4046 optional int64 page_major_fault = 4;
Rafal Slawik08621582018-10-15 14:53:07 +01004047
Rafal Slawikbf67d072018-10-23 11:07:54 +01004048 // RSS
Ioannis Ilkos466ad6c2019-06-18 17:42:00 +01004049 // Value read from /proc/PID/status.
Rafal Slawikbf67d072018-10-23 11:07:54 +01004050 optional int64 rss_in_bytes = 5;
Rafal Slawik08621582018-10-15 14:53:07 +01004051
Rafal Slawikd03ae422018-11-20 11:27:45 +00004052 // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004053 optional int64 rss_high_watermark_in_bytes = 6 [deprecated = true];
Rafal Slawikbf67d072018-10-23 11:07:54 +01004054
4055 // Elapsed real time when the process started.
4056 // Value is read from /proc/PID/stat, field 22.
4057 optional int64 start_time_nanos = 7;
Rafal Slawik44af3b32019-04-16 13:16:15 +01004058
4059 // SWAP
4060 // Value read from /proc/PID/status, field VmSwap.
4061 optional int64 swap_in_bytes = 8;
Ioannis Ilkos466ad6c2019-06-18 17:42:00 +01004062
4063 // Anonymous page size plus swap size. Values are read from /proc/PID/status.
4064 optional int32 anon_rss_and_swap_in_kilobytes = 9;
Rafal Slawik08621582018-10-15 14:53:07 +01004065}
4066
4067/*
Rafal Slawik3bea8952018-11-15 12:39:33 +00004068 * Logs the memory high-water mark for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00004069 *
4070 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie)
4071 * and for selected native processes.
Rafal Slawik44b88142018-12-15 16:48:09 +00004072 *
4073 * Pulling this atom resets high-water mark counters for all processes.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004074 */
4075message ProcessMemoryHighWaterMark {
4076 // The uid if available. -1 means not available.
4077 optional int32 uid = 1 [(is_uid) = true];
4078
Rafal Slawikda51b932018-12-13 16:31:33 +00004079 // The process name.
4080 // Usually package name or process cmdline.
4081 // Provided by ActivityManagerService or read from /proc/PID/cmdline.
Rafal Slawik3bea8952018-11-15 12:39:33 +00004082 optional string process_name = 2;
4083
4084 // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
4085 // /proc/PID/status.
4086 optional int64 rss_high_water_mark_in_bytes = 3;
4087}
4088
4089/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004090 * Elapsed real time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08004091 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004092message SystemElapsedRealtime {
David Chen0b5c90c2018-01-25 16:51:49 -08004093 optional uint64 time_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004094}
4095
4096/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004097 * Up time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08004098 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08004099message SystemUptime {
4100 // Milliseconds since the system was booted.
4101 // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
4102 // for external input).
4103 // It is not affected by clock scaling, idle, or other power saving mechanisms.
David Chen0b5c90c2018-01-25 16:51:49 -08004104 optional uint64 uptime_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004105}
4106
4107/*
4108 * Reads from /proc/uid_concurrent_active_time which has the format:
4109 * active: X (X is # cores)
4110 * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores)
4111 * [uid1]: [time-0] [time-1] [time-2] ... ...
4112 * ...
4113 * Time-N means the CPU time a UID spent running concurrently with N other processes.
4114 * The file contains a monotonically increasing count of time for a single boot.
4115 */
4116message CpuActiveTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07004117 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004118 optional uint64 time_millis = 2;
Chenjie Yu9da105b2018-01-13 12:41:08 -08004119}
4120
4121/**
4122 * Reads from /proc/uid_concurrent_policy_time which has the format:
4123 * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4)
4124 * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
4125 * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
4126 * ...
4127 * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes.
4128 * The file contains a monotonically increasing count of time for a single boot.
4129 */
4130message CpuClusterTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07004131 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08004132 optional int32 cluster_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08004133 optional uint64 time_millis = 3;
Chenjie Yu937d7422018-01-10 16:37:53 -08004134}
4135
4136/*
4137 * Pulls free disk space, for data, system partition and temporary directory.
4138 */
4139message DiskSpace {
4140 // available bytes in data partition
4141 optional uint64 data_available_bytes = 1;
4142 // available bytes in system partition
4143 optional uint64 system_available_bytes = 2;
4144 // available bytes in download cache or temp directories
4145 optional uint64 temp_available_bytes = 3;
4146}
Tej Singhbf972d92018-01-10 20:51:13 -08004147
4148/**
4149 * Pulls battery coulomb counter, which is the remaining battery charge in uAh.
Tej Singh9876a3b2019-01-11 14:28:35 -08004150 *
4151 * Pulled from StatsCompanionService.java
Tej Singhbf972d92018-01-10 20:51:13 -08004152 */
4153message RemainingBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07004154 optional int32 charge_micro_ampere_hour = 1;
Tej Singhbf972d92018-01-10 20:51:13 -08004155}
4156
4157/**
4158 * Pulls battery capacity, which is the battery capacity when full in uAh.
Tej Singh40298312018-02-16 00:15:09 -08004159 * Pulled from:
4160 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
Tej Singhbf972d92018-01-10 20:51:13 -08004161 */
4162message FullBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07004163 optional int32 capacity_micro_ampere_hour = 1;
Tej Singh40298312018-02-16 00:15:09 -08004164}
4165
4166/**
Bookatz17f0d8a2018-09-13 12:56:32 -07004167 * Pulls battery voltage.
4168 * Pulled from:
4169 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
4170 */
4171message BatteryVoltage {
4172 // The voltage of the battery, in millivolts.
Yangster-maca8a30442018-10-13 23:46:34 -07004173 optional int32 voltage_millivolt = 1;
Bookatz17f0d8a2018-09-13 12:56:32 -07004174}
4175
4176/**
Tej Singhb1dbc8b2018-11-19 15:49:47 -08004177 * Pulls battery level (percent full, from 0 to 100).
4178 *
4179 * Pulled from:
4180 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
4181 */
4182message BatteryLevel {
4183 // Battery level. Should be in [0, 100].
4184 optional int32 battery_level = 1;
4185}
4186
4187/**
Tej Singhd89137e2018-03-26 14:51:40 -07004188 * Pulls the temperature of various parts of the device.
4189 * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303.
Tej Singh40298312018-02-16 00:15:09 -08004190 *
Maggie White442b6312019-04-05 16:26:44 -07004191 * Pulled from StatsCompanionService.java
Tej Singh40298312018-02-16 00:15:09 -08004192 */
4193message Temperature {
Tej Singhb6070b92018-12-19 19:00:12 -08004194 // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_.
Tej Singh40298312018-02-16 00:15:09 -08004195 optional android.os.TemperatureTypeEnum sensor_location = 1;
4196
4197 // The name of the temperature source. Eg. CPU0
4198 optional string sensor_name = 2;
4199
Tej Singhd89137e2018-03-26 14:51:40 -07004200 // Temperature in tenths of a degree C.
Tej Singhb6070b92018-12-19 19:00:12 -08004201 // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
Yangster-maca8a30442018-10-13 23:46:34 -07004202 optional int32 temperature_deci_celsius = 3;
Maggie White442b6312019-04-05 16:26:44 -07004203
4204 // Relative severity of the throttling, see enum definition.
4205 optional android.os.ThrottlingSeverityEnum severity = 4;
yroa1fe77c2018-02-26 14:22:54 -08004206}
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004207
4208/**
4209 * Pulls the statistics of calls to Binder.
4210 *
Olivier Gaillardd25f7a82018-09-12 14:28:48 +01004211 * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one
4212 * config on the device.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004213 *
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004214 * Next tag: 15
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004215 */
4216message BinderCalls {
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004217 // UID of the process responsible for the binder transaction. It will be set if the process
4218 // executing the binder transaction attribute the transaction to another uid using
4219 // Binder.setThreadWorkSource().
4220 //
4221 // If not set, the value will be -1.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004222 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00004223 // UID of the process executing the binder transaction.
4224 optional int32 direct_caller_uid = 14;
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01004225 // Fully qualified class name of the API call.
4226 //
4227 // This is a system server class name.
4228 //
4229 // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid
4230 // gets recycled and we have isolated uids, we might attribute the data incorrectly.
4231 // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less
4232 // commonly used APIs.
4233 optional string service_class_name = 2;
4234 // Method name of the API call. It can also be a transaction code if we cannot
4235 // resolve it to a name. See Binder#getTransactionName.
4236 //
4237 // This is a system server method name.
4238 optional string service_method_name = 3;
4239 // Total number of API calls.
4240 optional int64 call_count = 4;
4241 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
4242 optional bool screen_interactive = 13;
4243 // Total number of API calls we have data recorded for. If we collected data for all the calls,
4244 // call_count will be equal to recorded_call_count.
4245 //
4246 // If recorded_call_count is different than call_count, it means data collection has been
4247 // sampled. All the fields below will be sampled in this case.
4248 optional int64 recorded_call_count = 12;
4249 // Number of exceptions thrown by the API.
4250 optional int64 recorded_exception_count = 5;
4251 // Total latency of all API calls.
4252 // Average can be computed using total_latency_micros / recorded_call_count.
4253 optional int64 recorded_total_latency_micros = 6;
4254 // Maximum latency of one API call.
4255 optional int64 recorded_max_latency_micros = 7;
4256 // Total CPU usage of all API calls.
4257 // Average can be computed using total_cpu_micros / recorded_call_count.
4258 // Total can be computed using total_cpu_micros / recorded_call_count * call_count.
4259 optional int64 recorded_total_cpu_micros = 8;
4260 // Maximum CPU usage of one API call.
4261 optional int64 recorded_max_cpu_micros = 9;
4262 // Maximum parcel reply size of one API call.
4263 optional int64 recorded_max_reply_size_bytes = 10;
4264 // Maximum parcel request size of one API call.
4265 optional int64 recorded_max_request_size_bytes = 11;
4266}
4267
4268/**
4269 * Pulls the statistics of exceptions during calls to Binder.
4270 *
4271 * Binder stats are cumulative from boot unless somebody reset the data using
4272 * > adb shell dumpsys binder_calls_stats --reset
4273 */
4274message BinderCallsExceptions {
4275 // Exception class name, e.g. java.lang.IllegalArgumentException.
4276 //
4277 // This is an exception class name thrown by the system server.
4278 optional string exception_class_name = 1;
4279 // Total number of exceptions.
4280 optional int64 exception_count = 2;
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004281}
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004282
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004283/**
4284 * Pulls the statistics of message dispatching on HandlerThreads.
4285 *
4286 * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one
4287 * config on the device.
4288 *
4289 * Next tag: 11
4290 */
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004291message LooperStats {
Marcin Oczeretkoec758722018-09-12 12:53:47 +01004292 // The uid that made a call to the System Server and caused the message to be enqueued.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004293 optional int32 uid = 1 [(is_uid) = true];
4294
4295 // Fully qualified class name of the handler target class.
4296 //
4297 // This field does not contain PII. This is a system server class name.
4298 optional string handler_class_name = 2;
4299
4300 // The name of the thread that runs the Looper.
4301 //
4302 // This field does not contain PII. This is a system server thread name.
4303 optional string looper_thread_name = 3;
4304
4305 // The name of the dispatched message.
4306 //
4307 // This field does not contain PII. This is a system server constant or class
4308 // name.
4309 optional string message_name = 4;
4310
4311 // Total number of successfully dispatched messages.
4312 optional int64 message_count = 5;
4313
4314 // Total number of messages that failed dispatching.
4315 optional int64 exception_count = 6;
4316
4317 // Total number of processed messages we have data recorded for. If we
4318 // collected data for all the messages, message_count will be equal to
4319 // recorded_message_count.
4320 //
4321 // If recorded_message_count is different than message_count, it means data
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01004322 // collection has been sampled. The fields below will be sampled in this case.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004323 optional int64 recorded_message_count = 7;
4324
4325 // Total latency of all processed messages.
4326 // Average can be computed using recorded_total_latency_micros /
4327 // recorded_message_count.
4328 optional int64 recorded_total_latency_micros = 8;
4329
4330 // Total CPU usage of all processed message.
4331 // Average can be computed using recorded_total_cpu_micros /
4332 // recorded_message_count. Total can be computed using
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004333 // recorded_total_cpu_micros / recorded_message_count * message_count.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004334 optional int64 recorded_total_cpu_micros = 9;
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004335
4336 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
4337 optional bool screen_interactive = 10;
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01004338
4339 // Max recorded CPU usage of all processed messages.
4340 optional int64 recorded_max_cpu_micros = 11;
4341
4342 // Max recorded latency of all processed messages.
4343 optional int64 recorded_max_latency_micros = 12;
4344
4345 // Total number of messages we tracked the dispatching delay for. If we
4346 // collected data for all the messages, message_count will be equal to
4347 // recorded_delay_message_count.
4348 //
4349 // If recorded_delay_message_count is different than message_count, it means data
4350 // collection has been sampled or/and not all messages specified the target dispatch time.
4351 // The fields below will be sampled in this case.
4352 optional int64 recorded_delay_message_count = 13;
4353
4354 // Total dispatching delay of all processed messages.
4355 // Calculated as a difference between the target dispatching time (Message.when)
4356 // and the actual dispatching time.
4357 // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count.
4358 optional int64 recorded_total_delay_millis = 14;
4359
4360 // Max dispatching delay of all processed messages.
4361 // Calculated as a difference between the target dispatching time (Message.when)
4362 // and the actual dispatching time.
4363 optional int64 recorded_max_delay_millis = 15;
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004364}
Tej Singh86dc9db2018-09-06 00:39:57 +00004365
4366/**
4367 * Pulls disk information, such as write speed and latency.
4368 */
4369message DiskStats {
4370 // Time taken to open, write 512B to, and close a file.
4371 // -1 if error performing the check.
4372 optional int64 data_write_latency_millis = 1;
4373
4374 optional bool file_based_encryption = 2;
4375
4376 // Recent disk write speed in kB/s.
4377 // -1 if error querying storageed.
4378 // 0 if data is unavailable.
4379 optional int32 recent_disk_write_speed = 3;
4380}
4381
4382
4383/**
4384 * Free and total bytes of the Data, Cache, and System partition.
4385 */
4386message DirectoryUsage {
4387 enum Directory {
4388 UNKNOWN = 0;
4389 DATA = 1;
4390 CACHE = 2;
4391 SYSTEM = 3;
4392 }
4393 optional Directory directory = 1;
4394 optional int64 free_bytes = 2;
4395 optional int64 total_bytes = 3;
4396}
4397
4398
4399/**
4400 * Size of an application: apk size, data size, and cache size.
4401 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
4402 * Information is only reported for apps with the primary user (user 0).
4403 * Sizes are aggregated by package name.
4404 */
4405message AppSize {
4406 // Including uids will involve modifying diskstats logic.
4407 optional string package_name = 1;
4408 // App size in bytes. -1 if unavailable.
4409 optional int64 app_size_bytes = 2;
4410 // App data size in bytes. -1 if unavailable.
4411 optional int64 app_data_size_bytes = 3;
4412 // App cache size in bytes. -1 if unavailable.
4413 optional int64 app_cache_size_bytes = 4;
4414 // Time that the cache file was produced.
4415 // Uses System.currentTimeMillis(), which is wall clock time.
4416 optional int64 cache_time_millis = 5;
4417}
4418
4419
4420/**
4421 * Size of a particular category. Eg: photos, videos.
4422 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
4423 */
4424message CategorySize {
4425 enum Category {
4426 UNKNOWN = 0;
4427 APP_SIZE = 1;
4428 APP_DATA_SIZE = 2;
4429 APP_CACHE_SIZE = 3;
4430 PHOTOS = 4;
4431 VIDEOS = 5;
4432 AUDIO = 6;
4433 DOWNLOADS = 7;
4434 SYSTEM = 8;
4435 OTHER = 9;
4436 }
4437 optional Category category = 1;
4438 // Category size in bytes.
4439 optional int64 size_bytes = 2;
4440 // Time that the cache file was produced.
4441 // Uses System.currentTimeMillis(), which is wall clock time.
4442 optional int64 cache_time_millis = 3;
4443}
Tej Singhd6d6d772018-09-05 17:41:25 -07004444
4445/**
Tej Singhe7726dc2018-09-21 11:42:12 -07004446 * Pulls per uid I/O stats. The stats are cumulative since boot.
4447 *
4448 * Read/write bytes are I/O events from a storage device
4449 * Read/write chars are data requested by read/write syscalls, and can be
4450 * satisfied by caching.
4451 *
4452 * Pulled from StatsCompanionService, which reads proc/uid_io/stats.
4453 */
4454message DiskIo {
4455 optional int32 uid = 1 [(is_uid) = true];
4456 optional int64 fg_chars_read = 2;
4457 optional int64 fg_chars_write = 3;
4458 optional int64 fg_bytes_read = 4;
4459 optional int64 fg_bytes_write = 5;
4460 optional int64 bg_chars_read = 6;
4461 optional int64 bg_chars_write = 7;
4462 optional int64 bg_bytes_read = 8;
4463 optional int64 bg_bytes_write = 9;
4464 optional int64 fg_fsync = 10;
4465 optional int64 bg_fsync= 11;
4466}
4467
4468
4469/**
Tej Singhd6d6d772018-09-05 17:41:25 -07004470 * Pulls the number of fingerprints for each user.
4471 *
Kevin Chyn1741a072019-01-17 11:54:40 -08004472 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
Tej Singhd6d6d772018-09-05 17:41:25 -07004473 */
joshmccloskey5dcb4082019-02-26 15:28:37 -08004474message NumFingerprintsEnrolled {
Tej Singhd6d6d772018-09-05 17:41:25 -07004475 // The associated user. Eg: 0 for owners, 10+ for others.
4476 // Defined in android/os/UserHandle.java
4477 optional int32 user = 1;
4478 // Number of fingerprints registered to that user.
joshmccloskey5dcb4082019-02-26 15:28:37 -08004479 optional int32 num_fingerprints_enrolled = 2;
Tej Singhd6d6d772018-09-05 17:41:25 -07004480}
Chenjie Yu12e5e672018-09-14 15:54:59 -07004481
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08004482/**
joshmccloskey5dcb4082019-02-26 15:28:37 -08004483 * Pulls the number of faces for each user.
4484 *
4485 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
4486 */
4487message NumFacesEnrolled {
4488 // The associated user. Eg: 0 for owners, 10+ for others.
4489 // Defined in android/os/UserHandle.java
4490 optional int32 user = 1;
4491 // Number of faces registered to that user.
4492 optional int32 num_faces_enrolled = 2;
4493}
4494/**
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08004495 * A mapping of role holder -> role
4496 */
4497message RoleHolder {
4498 // uid of the role holder
4499 optional int32 uid = 1 [(is_uid) = true];
4500
4501 // package name of the role holder
4502 optional string package_name = 2;
4503
4504 // the role held
4505 optional string role = 3;
4506}
4507
Yangsteraf9aee72018-10-12 09:26:16 -07004508message AggStats {
4509 optional int64 min = 1;
4510
4511 optional int64 average = 2;
4512
4513 optional int64 max = 3;
4514}
4515
4516message ProcessStatsStateProto {
4517 optional android.service.procstats.ScreenState screen_state = 1;
4518
4519 optional android.service.procstats.MemoryState memory_state = 2;
4520
4521 // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
4522 // and not frameworks/base/core/java/android/app/ActivityManager.java
4523 optional android.service.procstats.ProcessState process_state = 3;
4524
4525 // Millisecond uptime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004526 optional int64 duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004527
4528 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004529 optional int64 realtime_duration_millis = 9;
Yangsteraf9aee72018-10-12 09:26:16 -07004530
4531 // # of samples taken
4532 optional int32 sample_size = 5;
4533
4534 // PSS is memory reserved for this process
4535 optional AggStats pss = 6;
4536
4537 // USS is memory shared between processes, divided evenly for accounting
4538 optional AggStats uss = 7;
4539
4540 // RSS is memory resident for this process
4541 optional AggStats rss = 8;
4542}
4543
4544// Next Tag: 7
4545message ProcessStatsProto {
4546 // Name of process.
4547 optional string process = 1;
4548
4549 // Uid of the process.
4550 optional int32 uid = 2;
4551
4552 // Information about how often kills occurred
4553 message Kill {
4554 // Count of excessive CPU kills
4555 optional int32 cpu = 1;
4556
4557 // Count of kills when cached
4558 optional int32 cached = 2;
4559
4560 // PSS stats during cached kill
4561 optional AggStats cached_pss = 3;
4562 }
4563 optional Kill kill = 3;
4564
4565 // Time and memory spent in various states.
4566 repeated ProcessStatsStateProto states = 5;
4567
4568 // Total time process has been running... screen_state, memory_state, and process_state
4569 // will not be set.
4570 optional ProcessStatsStateProto total_running_state = 6;
4571}
4572
4573message PackageServiceOperationStatsProto {
4574 // Operate enum: Started, Foreground, Bound, Executing
4575 optional android.service.procstats.ServiceOperationState operation = 1;
4576
4577 // Number of times the service was in this operation.
4578 optional int32 count = 2;
4579
4580 // Information about a state the service can be in.
4581 message StateStats {
4582 // Screen state enum.
4583 optional android.service.procstats.ScreenState screen_state = 1;
4584 // Memory state enum.
4585 optional android.service.procstats.MemoryState memory_state = 2;
4586
4587 // duration in milliseconds.
Yangster-maca8a30442018-10-13 23:46:34 -07004588 optional int64 duration_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07004589 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004590 optional int64 realtime_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004591 }
4592 repeated StateStats state_stats = 3;
4593}
4594
4595message PackageServiceStatsProto {
4596 // Name of service component.
4597 optional string service_name = 1;
4598
4599 // The operation stats.
4600 // The package_name, package_uid, package_version, service_name will not be set to save space.
4601 repeated PackageServiceOperationStatsProto operation_stats = 2;
4602}
4603
4604message PackageAssociationSourceProcessStatsProto {
4605 // Uid of the process.
4606 optional int32 process_uid = 1;
4607 // Process name.
4608 optional string process_name = 2;
Chenjie Yub2ecc792019-01-17 10:27:26 -08004609 // Package name.
4610 optional string package_name = 7;
Yangsteraf9aee72018-10-12 09:26:16 -07004611 // Total count of the times this association appeared.
4612 optional int32 total_count = 3;
4613
4614 // Millisecond uptime total duration this association was around.
Yangster-maca8a30442018-10-13 23:46:34 -07004615 optional int64 total_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004616
4617 // Total count of the times this association became actively impacting its target process.
4618 optional int32 active_count = 5;
4619
4620 // Information on one source in this association.
4621 message StateStats {
4622 // Process state enum.
4623 optional android.service.procstats.ProcessState process_state = 1;
4624 // Millisecond uptime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004625 optional int64 duration_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07004626 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004627 optional int64 realtime_duration_mmillis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07004628 }
4629 repeated StateStats active_state_stats = 6;
4630}
4631
4632message PackageAssociationProcessStatsProto {
4633 // Name of the target component.
4634 optional string component_name = 1;
4635 // Information on one source in this association.
4636 repeated PackageAssociationSourceProcessStatsProto sources = 2;
4637}
4638
4639
4640message ProcessStatsPackageProto {
4641 // Name of package.
4642 optional string package = 1;
4643
4644 // Uid of the package.
4645 optional int32 uid = 2;
4646
4647 // Version of the package.
4648 optional int64 version = 3;
4649
4650 // Stats for each process running with the package loaded in to it.
4651 repeated ProcessStatsProto process_stats = 4;
4652
4653 // Stats for each of the package's services.
4654 repeated PackageServiceStatsProto service_stats = 5;
4655
4656 // Stats for each association with the package.
4657 repeated PackageAssociationProcessStatsProto association_stats = 6;
4658}
4659
4660message ProcessStatsSectionProto {
4661 // Elapsed realtime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004662 optional int64 start_realtime_millis = 1;
Yangsteraf9aee72018-10-12 09:26:16 -07004663
4664 // Elapsed realtime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004665 optional int64 end_realtime_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07004666
4667 // CPU uptime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004668 optional int64 start_uptime_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07004669
4670 // CPU uptime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004671 optional int64 end_uptime_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004672
4673 // System runtime library. e.g. "libdvm.so", "libart.so".
4674 optional string runtime = 5;
4675
4676 // whether kernel reports swapped pss.
4677 optional bool has_swapped_pss = 6;
4678
4679 // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops".
4680 enum Status {
4681 STATUS_UNKNOWN = 0;
4682 STATUS_COMPLETE = 1;
4683 STATUS_PARTIAL = 2;
4684 STATUS_SHUTDOWN = 3;
4685 STATUS_SYSPROPS = 4;
4686 }
4687 repeated Status status = 7;
4688
Chenjie Yub2ecc792019-01-17 10:27:26 -08004689 // Number of pages available of various types and sizes, representation fragmentation.
4690 repeated ProcessStatsAvailablePagesProto available_pages = 10;
4691
Yangsteraf9aee72018-10-12 09:26:16 -07004692 // Stats for each process.
4693 repeated ProcessStatsProto process_stats = 8;
4694
4695 // Stats for each package.
4696 repeated ProcessStatsPackageProto package_stats = 9;
4697}
4698
Chenjie Yub2ecc792019-01-17 10:27:26 -08004699message ProcessStatsAvailablePagesProto {
4700 // Node these pages are in (as per /proc/pagetypeinfo)
4701 optional int32 node = 1;
4702
4703 // Zone these pages are in (as per /proc/pagetypeinfo)
4704 optional string zone = 2;
4705
4706 // Label for the type of these pages (as per /proc/pagetypeinfo)
4707 optional string label = 3;
4708
4709 // Distribution of number of pages available by order size. First entry in array is
4710 // order 0, second is order 1, etc. Each order increase is a doubling of page size.
4711 repeated int32 pages_per_order = 4;
4712}
4713
Chenjie Yu12e5e672018-09-14 15:54:59 -07004714/**
4715 * Pulled from ProcessStatsService.java
4716 */
4717message ProcStats {
Yangsteraf9aee72018-10-12 09:26:16 -07004718 optional ProcessStatsSectionProto proc_stats_section = 1;
4719}
4720
Chenjie Yuf910b7802019-01-11 16:08:20 -08004721/**
4722 * Pulled from ProcessStatsService.java
4723 */
4724message ProcStatsPkgProc {
4725 optional ProcessStatsSectionProto proc_stats_section = 1;
4726}
4727
Yangsteraf9aee72018-10-12 09:26:16 -07004728message PowerProfileProto {
4729 optional double cpu_suspend = 1;
4730
4731 optional double cpu_idle = 2;
4732
4733 optional double cpu_active = 3;
4734
4735 message CpuCluster {
4736 optional int32 id = 1;
4737 optional double cluster_power = 2;
4738 optional int32 cores = 3;
4739 repeated int64 speed = 4;
4740 repeated double core_power = 5;
4741 }
4742
4743 repeated CpuCluster cpu_cluster = 40;
4744
4745 optional double wifi_scan = 4;
4746
4747 optional double wifi_on = 5;
4748
4749 optional double wifi_active = 6;
4750
4751 optional double wifi_controller_idle = 7;
4752
4753 optional double wifi_controller_rx = 8;
4754
4755 optional double wifi_controller_tx = 9;
4756
4757 repeated double wifi_controller_tx_levels = 10;
4758
4759 optional double wifi_controller_operating_voltage = 11;
4760
4761 optional double bluetooth_controller_idle = 12;
4762
4763 optional double bluetooth_controller_rx = 13;
4764
4765 optional double bluetooth_controller_tx = 14;
4766
4767 optional double bluetooth_controller_operating_voltage = 15;
4768
4769 optional double modem_controller_sleep = 16;
4770
4771 optional double modem_controller_idle = 17;
4772
4773 optional double modem_controller_rx = 18;
4774
4775 repeated double modem_controller_tx = 19;
4776
4777 optional double modem_controller_operating_voltage = 20;
4778
4779 optional double gps_on = 21;
4780
4781 repeated double gps_signal_quality_based = 22;
4782
4783 optional double gps_operating_voltage = 23;
4784
4785 optional double bluetooth_on = 24;
4786
4787 optional double bluetooth_active = 25;
4788
4789 optional double bluetooth_at_cmd = 26;
4790
4791 optional double ambient_display = 27;
4792
4793 optional double screen_on = 28;
4794
4795 optional double radio_on = 29;
4796
4797 optional double radio_scanning = 30;
4798
4799 optional double radio_active = 31;
4800
4801 optional double screen_full = 32;
4802
4803 optional double audio = 33;
4804
4805 optional double video = 34;
4806
4807 optional double flashlight = 35;
4808
4809 optional double memory = 36;
4810
4811 optional double camera = 37;
4812
4813 optional double wifi_batched_scan = 38;
4814
4815 optional double battery_capacity = 39;
Chenjie Yu12e5e672018-09-14 15:54:59 -07004816}
Chenjie Yuab530202018-09-26 12:39:20 -07004817
4818/**
4819 * power_profile.xml and other constants for power model calculations.
4820 * Pulled from PowerProfile.java
4821 */
4822message PowerProfile {
Yangsteraf9aee72018-10-12 09:26:16 -07004823 optional PowerProfileProto power_profile = 1;
Howard Ro9a862de2018-10-11 16:03:33 -07004824}
Chenjie Yub35b5f72018-10-13 23:25:11 -07004825
4826/**
arangelovd5db50e2018-10-12 20:24:39 +01004827 * Logs when a user restriction was added or removed.
4828 *
4829 * Logged from:
4830 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
4831 */
4832message UserRestrictionChanged {
4833 // The raw string of the user restriction as defined in UserManager.
4834 // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS.
4835 optional string restriction = 1;
4836 // Whether the restriction is enabled or disabled.
4837 optional bool enabled = 2;
Howard Ro183c2bd2018-10-18 13:52:10 -07004838}
Yangster-mac308ea0c2018-10-22 13:10:25 -07004839
4840/**
4841 * Pulls process user time and system time. Puller takes a snapshot of all pids
4842 * in the system and returns cpu stats for those that are working at the time.
4843 * Dead pids will be dropped. Kernel processes are excluded.
4844 * Min cool-down is 5 sec.
4845 */
4846message ProcessCpuTime {
4847 optional int32 uid = 1 [(is_uid) = true];
4848
4849 optional string process_name = 2;
4850 // Process cpu time in user space, cumulative from boot/process start
4851 optional int64 user_time_millis = 3;
4852 // Process cpu time in system space, cumulative from boot/process start
4853 optional int64 system_time_millis = 4;
Rafal Slawikbf67d072018-10-23 11:07:54 +01004854}
Misha Wagner5a51e002018-10-03 15:04:09 +01004855
4856/**
4857 * Pulls the CPU usage for each thread.
4858 *
4859 * Read from /proc/$PID/task/$TID/time_in_state files.
4860 *
4861 * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and
4862 * time_in_state files not being present on some phones, have not been addressed. These should be
4863 * considered before a public release.
4864 */
4865message CpuTimePerThreadFreq {
4866 // UID that owns the process.
4867 optional int32 uid = 1 [(is_uid) = true];
4868 // ID of the process.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00004869 optional int32 process_id = 2;
Misha Wagner5a51e002018-10-03 15:04:09 +01004870 // ID of the thread.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00004871 optional int32 thread_id = 3;
Misha Wagner5a51e002018-10-03 15:04:09 +01004872 // Name of the process taken from `/proc/$PID/cmdline`.
4873 optional string process_name = 4;
4874 // Name of the thread taken from `/proc/$PID/task/$TID/comm`
4875 optional string thread_name = 5;
Misha Wagnerfde69582018-11-28 13:26:32 +00004876
4877 // Report eight different frequencies, and how much time is spent in each frequency. Frequencies
4878 // are given in KHz, and time is given in milliseconds since the thread started. All eight
4879 // frequencies are given here as the alternative is sending eight separate atoms. This method
4880 // significantly reduces the amount of data created
4881 optional int32 frequency1_khz = 6;
4882 optional int32 time1_millis = 7;
4883 optional int32 frequency2_khz = 8;
4884 optional int32 time2_millis = 9;
4885 optional int32 frequency3_khz = 10;
4886 optional int32 time3_millis = 11;
4887 optional int32 frequency4_khz = 12;
4888 optional int32 time4_millis = 13;
4889 optional int32 frequency5_khz = 14;
4890 optional int32 time5_millis = 15;
4891 optional int32 frequency6_khz = 16;
4892 optional int32 time6_millis = 17;
4893 optional int32 frequency7_khz = 18;
4894 optional int32 time7_millis = 19;
4895 optional int32 frequency8_khz = 20;
4896 optional int32 time8_millis = 21;
Misha Wagner5a51e002018-10-03 15:04:09 +01004897}
Bookatz75ee6042018-11-09 12:27:37 -08004898
4899/**
Bookatz366a4432018-11-20 09:42:33 -08004900 * Pulls information about the device's build.
4901 */
4902message BuildInformation {
4903 // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse.
4904 // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags.
4905 optional string fingerprint = 1;
4906
4907 // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated.
4908 optional string brand = 2;
4909
4910 // Build.PRODUCT. The name of the overall product.
4911 optional string product = 3;
4912
4913 // Build.DEVICE. The name of the industrial design.
4914 optional string device = 4;
4915
4916 // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas".
4917 optional string version_release = 5;
4918
4919 // Build.ID. E.g. a label like "M4-rc20".
4920 optional string id = 6;
4921
4922 // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to
4923 // represent this build.
4924 optional string version_incremental = 7;
4925
4926 // Build.TYPE. The type of build, like "user" or "eng".
4927 optional string type = 8;
4928
4929 // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug".
4930 optional string tags = 9;
4931}
4932
4933/**
Adam Heff2185342019-01-23 15:59:09 -08004934 * Logs information about mismatched caller for content capture.
4935 *
4936 * Logged from:
4937 * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java
4938 */
4939message ContentCaptureCallerMismatchReported {
4940 optional string intended_package = 1;
4941 optional string calling_package = 2;
4942}
4943
4944/**
4945 * Logs information about content capture service events.
4946 *
4947 * Logged from:
4948 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
4949 */
4950message ContentCaptureServiceEvents {
4951 // The type of event.
4952 enum Event {
4953 UNKNOWN = 0;
4954 ON_CONNECTED = 1;
4955 ON_DISCONNECTED = 2;
4956 SET_WHITELIST = 3;
4957 SET_DISABLED = 4;
4958 ON_USER_DATA_REMOVED = 5;
4959 }
4960 optional Event event = 1;
4961 // component/package of content capture service.
4962 optional string service_info = 2;
4963 // component/package of target.
4964 // it's a concatenated list of component/package for SET_WHITELIST event
4965 // separated by " ".
4966 optional string target_info = 3;
4967}
4968
4969/**
4970 * Logs information about content capture session events.
4971 *
4972 * Logged from:
4973 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
4974 */
4975message ContentCaptureSessionEvents {
4976 // The type of event.
4977 enum Event {
4978 UNKNOWN = 0;
4979 ON_SESSION_STARTED = 1;
4980 ON_SESSION_FINISHED = 2;
4981 SESSION_NOT_CREATED = 3;
4982 }
4983 optional int32 session_id = 1;
4984 optional Event event = 2;
4985 // (n/a on session finished)
4986 optional int32 state_flags = 3;
4987 // component/package of content capture service.
4988 optional string service_info = 4;
4989 // component/package of app.
4990 // (n/a on session finished)
4991 optional string app_info = 5;
4992 optional bool is_child_session = 6;
4993}
4994
4995/**
4996 * Logs information about session being flushed.
4997 *
4998 * Logged from:
4999 * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java
5000 */
5001message ContentCaptureFlushed {
5002 optional int32 session_id = 1;
5003 // component/package of content capture service.
5004 optional string service_info = 2;
5005 // component/package of app.
5006 optional string app_info = 3;
5007 // session start/finish events
5008 optional int32 child_session_started = 4;
5009 optional int32 child_session_finished = 5;
5010 // count of view events.
5011 optional int32 view_appeared_count = 6;
5012 optional int32 view_disappeared_count = 7;
5013 optional int32 view_text_changed_count = 8;
5014
5015 // Flush stats.
5016 optional int32 max_events = 9;
5017 optional int32 idle_flush_freq = 10;
5018 optional int32 text_flush_freq = 11;
5019 optional int32 flush_reason = 12;
5020}
5021
5022/**
Bookatz75ee6042018-11-09 12:27:37 -08005023 * Pulls on-device BatteryStats power use calculations for the overall device.
5024 */
5025message DeviceCalculatedPowerUse {
Bookatz3dbc13a2018-12-21 12:16:51 -08005026 // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5027 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5028 // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()).
5029 optional int64 computed_power_nano_amp_secs = 1;
Bookatz75ee6042018-11-09 12:27:37 -08005030}
5031
5032/**
5033 * Pulls on-device BatteryStats power use calculations broken down by uid.
5034 * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use
5035 * that is attributed to non-uid items. They must all be included to get the total power use.
5036 */
5037message DeviceCalculatedPowerBlameUid {
5038 // Uid being blamed. Note: isolated uids have already been mapped to host uid.
5039 optional int32 uid = 1 [(is_uid) = true];
5040
Bookatz3dbc13a2018-12-21 12:16:51 -08005041 // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5042 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5043 optional int64 power_nano_amp_secs = 2;
Bookatz75ee6042018-11-09 12:27:37 -08005044}
5045
5046/**
5047 * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by
5048 * drain type.
5049 * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that
5050 * is attributed uids. They must all be included to get the total power use.
5051 */
5052message DeviceCalculatedPowerBlameOther {
5053 // The type of item whose power use is being reported.
5054 enum DrainType {
5055 AMBIENT_DISPLAY = 0;
5056 // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid.
5057 BLUETOOTH = 2;
5058 CAMERA = 3;
5059 // Cell-standby
5060 CELL = 4;
5061 FLASHLIGHT = 5;
5062 IDLE = 6;
5063 MEMORY = 7;
5064 // Amount that total computed drain exceeded the drain estimated using the
5065 // battery level changes and capacity.
5066 OVERCOUNTED = 8;
5067 PHONE = 9;
5068 SCREEN = 10;
5069 // Amount that total computed drain was below the drain estimated using the
5070 // battery level changes and capacity.
5071 UNACCOUNTED = 11;
5072 // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported.
5073 WIFI = 13;
5074 }
5075 optional DrainType drain_type = 1;
5076
Bookatz3dbc13a2018-12-21 12:16:51 -08005077 // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
5078 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
5079 optional int64 power_nano_amp_secs = 2;
Rafal Slawik3bea8952018-11-15 12:39:33 +00005080}
arangelov4e994062018-11-13 16:12:38 +00005081
5082/**
5083 * Logs device policy features.
5084 *
5085 * Logged from:
5086 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
5087 * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
5088 */
5089message DevicePolicyEvent {
5090 // The event id - unique for each event.
5091 optional android.stats.devicepolicy.EventId event_id = 1;
5092 // The admin package name.
5093 optional string admin_package_name = 2;
5094 // A generic integer parameter.
5095 optional int32 integer_value = 3;
5096 // A generic boolean parameter.
5097 optional bool boolean_value = 4;
5098 // A parameter specifying a time period in milliseconds.
5099 optional uint64 time_period_millis = 5;
5100 // A parameter specifying a list of package names, bundle extras or string parameters.
5101 optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES];
5102}
shawnlinea5b66b2018-11-13 15:05:29 +08005103
5104/**
5105 * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up.
5106 *
5107 * Logged from:
5108 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5109 */
5110message DocsUILaunchReported {
5111 optional android.stats.docsui.LaunchAction launch_action = 1;
5112 optional bool has_initial_uri = 2;
5113 optional android.stats.docsui.MimeType mime_type = 3;
5114 optional android.stats.docsui.Root initial_root = 4;
5115}
5116
5117/**
5118 * Logs root/app visited event in file managers/picker. Call this when the user
5119 * taps on root/app in hamburger menu.
5120 *
5121 * Logged from:
5122 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5123 */
5124message DocsUIRootVisitedReported {
5125 optional android.stats.docsui.ContextScope scope = 1;
5126 optional android.stats.docsui.Root root = 2;
5127}
5128
5129/**
5130 * Logs file operation stats. Call this when a file operation has completed.
5131 *
5132 * Logged from:
5133 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5134 */
5135message DocsUIFileOperationReported {
5136 optional android.stats.docsui.Provider provider = 1;
5137 optional android.stats.docsui.FileOperation file_op = 2;
5138}
5139
5140/**
5141 * Logs file operation stats. Call this when a copy/move operation has completed with a specific
5142 * mode.
5143 *
5144 * Logged from:
5145 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5146 */
5147message DocsUIFileOperationCopyMoveModeReported {
5148 optional android.stats.docsui.FileOperation file_op = 1;
5149 optional android.stats.docsui.CopyMoveOpMode mode = 2;
5150}
5151
5152
5153/**
5154 * Logs file sub operation stats. Call this when a file operation has failed.
5155 *
5156 * Logged from:
5157 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5158 */
5159message DocsUIFileOperationFailureReported {
5160 optional android.stats.docsui.Authority authority = 1;
5161 optional android.stats.docsui.SubFileOperation sub_op = 2;
5162}
5163
5164/**
5165* Logs the cancellation of a file operation. Call this when a job is canceled
5166*
5167* Logged from:
5168* package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5169*/
5170message DocsUIFileOperationCanceledReported {
5171 optional android.stats.docsui.FileOperation file_op = 1;
5172}
5173
5174/**
5175 * Logs startup time in milliseconds.
5176 *
5177 * Logged from:
5178 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5179 */
5180message DocsUIStartupMsReported {
5181 optional int32 startup_millis = 1;
5182}
5183
5184/**
5185 * Logs the action that was started by user.
5186 *
5187 * Logged from:
5188 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5189 */
5190message DocsUIUserActionReported {
5191 optional android.stats.docsui.UserAction action = 1;
5192}
5193
5194/**
5195 * Logs the invalid type when invalid scoped access is requested.
5196 *
5197 * Logged from:
5198 * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java
5199 */
5200message DocsUIInvalidScopedAccessRequestReported {
5201 optional android.stats.docsui.InvalidScopedAccess type = 1;
Rafal Slawikda51b932018-12-13 16:31:33 +00005202}
Ben Murdochbab399f2018-12-06 11:01:38 +00005203
5204/**
shawnlina75e82d2019-01-07 10:31:12 +08005205 * Logs the package name that launches docsui picker mode.
5206 *
5207 * Logged from:
5208 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5209 */
5210message DocsUIPickerLaunchedFromReported {
5211 optional string package_name = 1;
5212}
5213
5214/**
5215 * Logs the search type.
5216 *
5217 * Logged from:
5218 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5219 */
5220message DocsUISearchTypeReported {
5221 optional android.stats.docsui.SearchType search_type = 1;
5222}
5223
5224/**
5225 * Logs the search mode.
5226 *
5227 * Logged from:
5228 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5229 */
5230message DocsUISearchModeReported {
5231 optional android.stats.docsui.SearchMode search_mode = 1;
5232}
5233
5234/**
5235 * Logs the pick result information.
5236 *
5237 * Logged from:
5238 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
5239 */
5240message DocsUIPickResultReported {
5241 optional int32 total_action_count = 1;
5242 optional int64 duration_millis = 2;
5243 optional int32 file_count= 3;
5244 optional bool is_searching = 4;
5245 optional android.stats.docsui.Root picked_from = 5;
5246 optional android.stats.docsui.MimeType mime_type = 6;
5247 optional int32 repeatedly_pick_times = 7;
5248}
5249
5250/**
Ben Murdochbab399f2018-12-06 11:01:38 +00005251 * Logs when an app's memory is compacted.
5252 *
5253 * Logged from:
5254 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
5255 */
5256message AppCompacted {
5257 // The pid of the process being compacted.
5258 optional int32 pid = 1;
5259
5260 // The name of the process being compacted.
5261 optional string process_name = 2;
5262
5263 // The type of compaction.
5264 enum Action {
5265 UNKNOWN = 0;
5266 SOME = 1;
5267 FULL = 2;
Ben Murdoch35c14202019-04-09 11:00:53 +01005268 PERSISTENT = 3;
5269 BFGS = 4;
Ben Murdochbab399f2018-12-06 11:01:38 +00005270 }
Ben Murdoch01720b82018-12-19 18:03:44 +00005271 optional Action action = 3;
Ben Murdochbab399f2018-12-06 11:01:38 +00005272
5273 // Total RSS in kilobytes consumed by the process prior to compaction.
5274 optional int64 before_rss_total_kilobytes = 4;
5275
5276 // File RSS in kilobytes consumed by the process prior to compaction.
5277 optional int64 before_rss_file_kilobytes = 5;
5278
5279 // Anonymous RSS in kilobytes consumed by the process prior to compaction.
5280 optional int64 before_rss_anon_kilobytes = 6;
5281
5282 // Swap in kilobytes consumed by the process prior to compaction.
5283 optional int64 before_swap_kilobytes = 7;
5284
5285 // Total RSS in kilobytes consumed by the process after compaction.
5286 optional int64 after_rss_total_kilobytes = 8;
5287
5288 // File RSS in kilobytes consumed by the process after compaction.
5289 optional int64 after_rss_file_kilobytes = 9;
5290
5291 // Anonymous RSS in kilobytes consumed by the process after compaction.
5292 optional int64 after_rss_anon_kilobytes = 10;
5293
5294 // Swap in kilobytes consumed by the process after compaction.
5295 optional int64 after_swap_kilobytes = 11;
5296
5297 // The time taken to perform compaction in milliseconds.
5298 optional int64 time_to_compact_millis = 12;
5299
5300 // The last compaction action performed for this app.
5301 optional Action last_action = 13;
5302
Ben Murdoch01720b82018-12-19 18:03:44 +00005303 // The last time that compaction was attempted on this process in milliseconds
5304 // since boot, not including sleep (see SystemClock.uptimeMillis()).
5305 optional int64 last_compact_timestamp_ms_since_boot = 14;
Ben Murdochbab399f2018-12-06 11:01:38 +00005306
Ben Murdoch885c21b2019-03-15 18:02:04 +00005307 // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction.
Ben Murdoch01720b82018-12-19 18:03:44 +00005308 optional int32 oom_score_adj = 15;
Ben Murdochbab399f2018-12-06 11:01:38 +00005309
5310 // The process state at the time of compaction.
5311 optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN];
Ben Murdochfdc55932019-01-30 10:43:15 +00005312
5313 // Free ZRAM in kilobytes before compaction.
5314 optional int64 before_zram_free_kilobytes = 17;
5315
5316 // Free ZRAM in kilobytes after compaction.
5317 optional int64 after_zram_free_kilobytes = 18;
Ben Murdochbab399f2018-12-06 11:01:38 +00005318}
lifr157fc552018-12-12 16:38:04 +08005319
5320/**
lifrb6b90b62019-03-29 00:40:17 +08005321 * Logs a DNS lookup operation initiated by the system resolver on behalf of an application
5322 * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName().
5323 *
lifra2e19c02019-04-16 22:16:30 +08005324 * The NetworkDnsEventReported message represents the entire lookup operation, which may
5325 * result one or more queries to the recursive DNS resolvers. Those are individually logged
5326 * in DnsQueryEvents to enable computing error rates and network latency and timeouts
5327 * broken up by query type, transport, network interface, etc.
lifr157fc552018-12-12 16:38:04 +08005328 */
5329message NetworkDnsEventReported {
lifra2e19c02019-04-16 22:16:30 +08005330 optional android.stats.dnsresolver.EventType event_type = 1;
lifr157fc552018-12-12 16:38:04 +08005331
lifra2e19c02019-04-16 22:16:30 +08005332 optional android.stats.dnsresolver.ReturnCode return_code = 2;
lifrb6b90b62019-03-29 00:40:17 +08005333
5334 // The latency in microseconds of the entire DNS lookup operation.
lifr157fc552018-12-12 16:38:04 +08005335 optional int32 latency_micros = 3;
lifrb6b90b62019-03-29 00:40:17 +08005336
lifra2e19c02019-04-16 22:16:30 +08005337 // Only valid for event_type = EVENT_GETADDRINFO.
5338 optional int32 hints_ai_flags = 4;
lifrb6b90b62019-03-29 00:40:17 +08005339
lifra2e19c02019-04-16 22:16:30 +08005340 // Flags passed to android_res_nsend() defined in multinetwork.h
5341 // Only valid for event_type = EVENT_RESNSEND.
5342 optional int32 res_nsend_flags = 5;
lifrb6b90b62019-03-29 00:40:17 +08005343
Frank Libe8ecaa2019-06-18 05:45:25 -07005344 optional android.stats.dnsresolver.NetworkType network_type = 6;
lifrb6b90b62019-03-29 00:40:17 +08005345
5346 // The DNS over TLS mode on a specific netId.
lifra2e19c02019-04-16 22:16:30 +08005347 optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7;
lifrb6b90b62019-03-29 00:40:17 +08005348
5349 // Additional pass-through fields opaque to statsd.
5350 // The DNS resolver Mainline module can add new fields here without requiring an OS update.
lifra2e19c02019-04-16 22:16:30 +08005351 optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES];
Frank Li762eb4a2019-07-22 08:13:03 -07005352
5353 // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom.
5354 optional int32 sampling_rate_denom = 9;
lifr157fc552018-12-12 16:38:04 +08005355}
Chiachang Wangf6bedc22019-01-14 11:54:32 +08005356
5357/**
5358 * Logs when a data stall event occurs.
5359 *
5360 * Log from:
5361 * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
5362 */
5363message DataStallEvent {
5364 // Data stall evaluation type.
5365 // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
5366 // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*.
5367 optional int32 evaluation_type = 1;
5368 // See definition in data_stall_event.proto.
5369 optional com.android.server.connectivity.ProbeResult validation_result = 2;
5370 // See definition in data_stall_event.proto.
5371 optional android.net.NetworkCapabilitiesProto.Transport network_type = 3;
5372 // See definition in data_stall_event.proto.
5373 optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES];
5374 // See definition in data_stall_event.proto.
5375 optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES];
5376 // See definition in data_stall_event.proto.
5377 optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES];
5378}
Christian Brunschenf86039e2018-12-21 12:26:14 +00005379
5380/*
5381 * Logs when RescueParty resets some set of experiment flags.
5382 *
5383 * Logged from:
5384 * frameworks/base/services/core/java/com/android/server/RescueParty.java
5385 */
5386message RescuePartyResetReported {
5387 // The rescue level of this reset. A value of 0 indicates missing or unknown level information.
5388 optional int32 rescue_level = 1;
5389}
Mathew Inwoodb375be52019-01-04 11:36:25 +00005390
5391/**
5392 * Logs when signed config is received from an APK, and if that config was applied successfully.
5393 * Logged from:
5394 * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java
5395 */
5396message SignedConfigReported {
5397 enum Type {
5398 UNKNOWN_TYPE = 0;
5399 GLOBAL_SETTINGS = 1;
5400 }
5401 optional Type type = 1;
5402
5403 // The final status of the signed config received.
5404 enum Status {
5405 UNKNOWN_STATUS = 0;
5406 APPLIED = 1;
5407 BASE64_FAILURE_CONFIG = 2;
5408 BASE64_FAILURE_SIGNATURE = 3;
5409 SECURITY_EXCEPTION = 4;
5410 INVALID_CONFIG = 5;
5411 OLD_CONFIG = 6;
5412 SIGNATURE_CHECK_FAILED = 7;
5413 NOT_APPLICABLE = 8;
Mathew Inwood610d0962019-01-15 11:50:28 +00005414 SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9;
Mathew Inwoodb375be52019-01-04 11:36:25 +00005415 }
5416 optional Status status = 2;
5417
5418 // The version of the signed config processed.
5419 optional int32 version = 3;
5420
5421 // The package name that the config was extracted from.
5422 optional string from_package = 4;
5423
5424 enum Key {
5425 NO_KEY = 0;
5426 DEBUG = 1;
5427 PRODUCTION = 2;
5428 }
5429 // Which key was used to verify the config.
5430 optional Key verified_with = 5;
5431}
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005432
5433/*
5434 * Logs GNSS Network-Initiated (NI) location events.
5435 *
5436 * Logged from:
5437 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
5438 */
5439message GnssNiEventReported {
5440 // The type of GnssNiEvent.
5441 enum EventType {
5442 UNKNOWN = 0;
5443 NI_REQUEST = 1;
5444 NI_RESPONSE = 2;
5445 }
5446 optional EventType event_type = 1;
5447
5448 // An ID generated by HAL to associate NI notifications and UI responses.
5449 optional int32 notification_id = 2;
5450
5451 // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005452 optional android.server.location.GnssNiType ni_type = 3;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005453
5454 // NI requires notification.
5455 optional bool need_notify = 4;
5456
5457 // NI requires verification.
5458 optional bool need_verify = 5;
5459
5460 // NI requires privacy override, no notification/minimal trace.
5461 optional bool privacy_override = 6;
5462
5463 // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in
5464 // seconds.
5465 optional int32 timeout = 7;
5466
5467 // Default response when timeout.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005468 optional android.server.location.GnssUserResponseType default_response = 8;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005469
5470 // String representing the requester of the network inititated location request.
5471 optional string requestor_id = 9;
5472
5473 // Notification message text string representing the service(for eg. SUPL-service) who sent the
5474 // network initiated location request.
5475 optional string text = 10;
5476
5477 // requestorId decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005478 optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005479
5480 // Notification message text decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005481 optional android.server.location.GnssNiEncodingType text_encoding = 12;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005482
5483 // True if SUPL ES is enabled.
5484 optional bool is_supl_es_enabled = 13;
5485
5486 // True if GNSS location is enabled.
5487 optional bool is_location_enabled = 14;
5488
5489 // GNSS NI responses which define the response in NI structures.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005490 optional android.server.location.GnssUserResponseType user_response = 15;
5491}
5492
5493/**
5494 * Logs GNSS non-framework (NFW) location notification.
5495 *
5496 * Logged from:
5497 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
5498 */
5499message GnssNfwNotificationReported {
5500 // Package name of the Android proxy application representing the non-framework entity that
5501 // requested location. Set to empty string if unknown.
5502 optional string proxy_app_package_name = 1;
5503
5504 // Protocol stack that initiated the non-framework location request.
5505 optional android.server.location.NfwProtocolStack protocol_stack = 2;
5506
5507 // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise,
5508 // set to empty string. This field is opaque to the framework and used for logging purposes.
5509 optional string other_protocol_stack_name = 3;
5510
5511 // Source initiating/receiving the location information.
5512 optional android.server.location.NfwRequestor requestor = 4;
5513
5514 // Identity of the endpoint receiving the location information. For example, carrier name, OEM
5515 // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework
5516 // and used for logging purposes.
5517 optional string requestor_id = 5;
5518
5519 // Indicates whether location information was provided for this request.
5520 optional android.server.location.NfwResponseType response_type = 6;
5521
5522 // True if the device is in user initiated emergency session.
5523 optional bool in_emergency_mode = 7;
5524
5525 // True if cached location is provided.
5526 optional bool is_cached_location = 8;
5527
5528 // True if proxy app permission mismatch between framework and GNSS HAL.
5529 optional bool is_permission_mismatched = 9;
5530}
5531
5532/**
5533 * Logs GNSS configuration as defined in IGnssConfiguration.hal.
5534 *
5535 * Logged from:
5536 * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java
5537 */
5538message GnssConfigurationReported {
5539 // SUPL host name.
5540 optional string supl_host = 1;
5541
5542 // SUPL port number.
5543 optional int32 supl_port = 2;
5544
5545 // C2K host name.
5546 optional string c2k_host = 3;
5547
5548 // C2K port number.
5549 optional int32 c2k_port = 4;
5550
5551 // The SUPL version requested by Carrier.
5552 optional int32 supl_ver = 5;
5553
5554 // The SUPL mode.
5555 optional android.server.location.SuplMode supl_mode = 6;
5556
5557 // True if NI emergency SUPL restrictions is enabled.
5558 optional bool supl_es = 7;
5559
5560 // LTE Positioning Profile settings
5561 optional android.server.location.LppProfile lpp_profile = 8;
5562
5563 // Positioning protocol on A-Glonass system.
5564 optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9;
5565
5566 // True if emergency PDN is used. Otherwise, regular PDN is used.
5567 optional bool use_emergency_pdn_for_emergency_supl= 10;
5568
5569 // Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
5570 optional android.server.location.GpsLock gps_lock = 11;
5571
5572 // Number of seconds to extend the emergency session duration post emergency call.
5573 optional int32 es_extension_sec = 12;
5574
5575 // The full list of package names of proxy Android applications representing the non-framework
5576 // location access entities (on/off the device) for which the framework user has granted
5577 // non-framework location access permission. The package names are concatenated in one string
5578 // with spaces as separators.
5579 optional string enabled_proxy_app_package_name_list = 13;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005580}
Jack Yu95b64f32018-12-13 18:26:11 +08005581
5582/**
5583 * Logs when a NFC device's error occurred.
5584 * Logged from:
5585 * system/nfc/src/nfc/nfc/nfc_ncif.cc
5586 * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java
5587 */
5588message NfcErrorOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005589 enum Type {
5590 UNKNOWN = 0;
5591 CMD_TIMEOUT = 1;
5592 ERROR_NOTIFICATION = 2;
5593 AID_OVERFLOW = 3;
5594 }
5595 optional Type type = 1;
5596 // If it's nci cmd timeout, log the timeout command.
5597 optional uint32 nci_cmd = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08005598
Alex Salod7c3eef2019-01-25 14:43:27 -08005599 optional uint32 error_ntf_status_code = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08005600}
5601
5602/**
5603 * Logs when a NFC device's state changed event
5604 * Logged from:
5605 * packages/apps/Nfc/src/com/android/nfc/NfcService.java
5606 */
5607message NfcStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08005608 enum State {
5609 UNKNOWN = 0;
5610 OFF = 1;
5611 ON = 2;
5612 ON_LOCKED = 3; // Secure Nfc enabled.
5613 CRASH_RESTART = 4; // NfcService watchdog timeout restart.
5614 }
5615 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005616}
5617
5618/**
5619 * Logs when a NFC Beam Transaction occurred.
5620 * Logged from:
5621 * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
5622 */
5623message NfcBeamOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005624 enum Operation {
5625 UNKNOWN = 0;
5626 SEND = 1;
5627 RECEIVE = 2;
5628 }
5629 optional Operation operation = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005630}
5631
5632/**
5633 * Logs when a NFC Card Emulation Transaction occurred.
5634 * Logged from:
5635 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java
5636 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java
5637 */
5638message NfcCardemulationOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005639 enum Category {
5640 UNKNOWN = 0;
5641 HCE_PAYMENT = 1;
5642 HCE_OTHER = 2;
5643 OFFHOST = 3;
5644 }
5645 // Transaction belongs to HCE payment or HCE other category, or offhost.
5646 optional Category category = 1;
5647 // SeName from transaction: SIMx, eSEx, HCE, HCEF.
5648 optional string se_name = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08005649}
5650
5651/**
5652 * Logs when a NFC Tag event occurred.
5653 * Logged from:
5654 * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java
5655 */
5656message NfcTagOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005657 enum Type {
5658 UNKNOWN = 0;
5659 URL = 1;
5660 BT_PAIRING = 2;
5661 PROVISION = 3;
5662 WIFI_CONNECT = 4;
5663 APP_LAUNCH = 5;
5664 OTHERS = 6;
5665 }
5666 optional Type type = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005667}
5668
5669/**
5670 * Logs when Hce transaction triggered
5671 * Logged from:
5672 * system/nfc/src/nfc/nfc/nfc_ncif.cc
5673 */
5674message NfcHceTransactionOccurred {
5675 // The latency period(in microseconds) it took for the first HCE data
5676 // exchange.
5677 optional uint32 latency_micros = 1;
5678}
5679
5680/**
5681 * Logs when SecureElement state event changed
5682 * Logged from:
5683 * packages/apps/SecureElement/src/com/android/se/Terminal.java
5684 */
5685message SeStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08005686 enum State {
5687 UNKNOWN = 0;
5688 INITIALIZED = 1;
5689 DISCONNECTED = 2;
5690 CONNECTED = 3;
5691 HALCRASH = 4;
5692 }
5693 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005694
Alex Salod7c3eef2019-01-25 14:43:27 -08005695 optional string state_change_reason = 2;
5696 // SIMx or eSEx.
5697 optional string terminal = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08005698}
5699
5700/**
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08005701 * Information about a permission grant request
5702 */
5703message PermissionGrantRequestResultReported {
5704 // unique value identifying an API call. A API call might result in multiple of these atoms
5705 optional int64 request_id = 1;
5706
5707 // UID of package requesting the permission grant
5708 optional int32 requesting_uid = 2 [(is_uid) = true];
5709
5710 // Name of package requesting the permission grant
5711 optional string requesting_package_name = 3;
5712
5713 // The permission to be granted
5714 optional string permission_name = 4;
5715
5716 // If the permission was explicitly requested via the API or added by the system
5717 optional bool is_implicit = 5;
5718
5719 enum Result {
5720 UNDEFINED = 0;
5721 // permission request was ignored
5722 IGNORED = 1;
5723 // permission request was ignored because it was user fixed
5724 IGNORED_USER_FIXED = 2;
5725 // permission request was ignored because it was policy fixed
5726 IGNORED_POLICY_FIXED = 3;
5727 // permission was granted by user action
5728 USER_GRANTED = 4;
5729 // permission was automatically granted
5730 AUTO_GRANTED = 5;
5731 // permission was denied by user action
5732 USER_DENIED = 6;
5733 // permission was denied with prejudice by the user
5734 USER_DENIED_WITH_PREJUDICE = 7;
5735 // permission was automatically denied
5736 AUTO_DENIED = 8;
Svet Ganovd8eb8b22019-04-05 18:52:08 -07005737 // permission request was ignored because permission is restricted
5738 IGNORED_RESTRICTED_PERMISSION = 9;
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08005739 }
5740 // The result of the permission grant
5741 optional Result result = 6;
5742}
5743
5744/**
Jack Yu95b64f32018-12-13 18:26:11 +08005745 * Logs when Omapi API used
5746 * Logged from:
5747 * packages/apps/SecureElement/src/com/android/se/Terminal.java
5748 */
5749message SeOmapiReported {
Alex Salod7c3eef2019-01-25 14:43:27 -08005750 enum Operation {
5751 UNKNOWN = 0;
5752 OPEN_CHANNEL = 1;
5753 }
5754 optional Operation operation = 1;
5755 // SIMx or eSEx.
5756 optional string terminal = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08005757
Alex Salod7c3eef2019-01-25 14:43:27 -08005758 optional string package_name = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08005759}
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08005760
5761/**
Alex Saloa060aee2019-01-21 14:36:41 -08005762 * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED.
5763 * The dispatch latency is the dispatchClockTime - enqueueClockTime.
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08005764 * Logged from:
5765 * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
5766 */
5767message BroadcastDispatchLatencyReported {
Alex Saloa060aee2019-01-21 14:36:41 -08005768 optional int64 dispatch_latency_millis = 1;
5769}
5770
5771/**
5772 * Logs AttentionManagerService attention check result.
5773 *
5774 * Logged from:
5775 * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java
5776 */
5777message AttentionManagerServiceResultReported {
5778 // See core/java/android/service/attention/AttentionService.java
5779 enum AttentionCheckResult {
5780 UNKNOWN = 20;
5781 ATTENTION_SUCCESS_ABSENT = 0;
5782 ATTENTION_SUCCESS_PRESENT = 1;
Alex Salodd028ba2019-04-17 13:33:49 -07005783 ATTENTION_FAILURE_UNKNOWN = 2;
5784 ATTENTION_FAILURE_CANCELLED = 3;
5785 ATTENTION_FAILURE_PREEMPTED = 4;
5786 ATTENTION_FAILURE_TIMED_OUT = 5;
5787 ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6;
Alex Saloa060aee2019-01-21 14:36:41 -08005788 }
5789 optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN];
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08005790}
Michael Groover9e7b06e2018-12-28 19:55:51 -08005791
5792/**
5793 * Logs when an adb connection changes state.
5794 *
5795 * Logged from:
5796 * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java
5797 */
5798message AdbConnectionChanged {
5799 // The last time this system connected via adb, or 0 if the 'always allow' option was not
5800 // previously selected for this system.
5801 optional int64 last_connection_time_millis = 1;
5802
5803 // The time in ms within which a subsequent connection from an 'always allow' system is allowed
5804 // to reconnect via adb without user interaction.
5805 optional int64 auth_window_millis = 2;
5806
5807 // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto.
5808 optional android.debug.AdbConnectionStateEnum state = 3;
5809
5810 // True if the 'always allow' option was selected for this system.
5811 optional bool always_allow = 4;
5812}
Carter Hsub8fd1e92019-01-11 15:24:45 +08005813
5814/*
5815 * Logs the reported speech DSP status.
5816 *
5817 * Logged from:
5818 * Vendor audio implementation.
5819 */
5820message SpeechDspStatReported {
5821 // The total Speech DSP uptime in milliseconds.
5822 optional int32 total_uptime_millis = 1;
5823 // The total Speech DSP downtime in milliseconds.
5824 optional int32 total_downtime_millis = 2;
5825 optional int32 total_crash_count = 3;
5826 optional int32 total_recover_count = 4;
5827}
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -08005828
5829/**
5830 * Logs USB connector contaminant status.
5831 *
5832 * Logged from: USB Service.
5833 */
5834message UsbContaminantReported {
5835 optional string id = 1;
5836 optional android.service.usb.ContaminantPresenceStatus status = 2;
5837}
Olivier Gaillard18d452202019-01-22 15:03:41 +00005838
5839/**
5840 * This atom is for debugging purpose.
5841 */
5842message DebugElapsedClock {
5843 // Monotically increasing value for each pull.
5844 optional int64 pull_count = 1;
5845 // Time from System.elapsedRealtime.
5846 optional int64 elapsed_clock_millis = 2;
5847 // Time from System.elapsedRealtime.
5848 optional int64 same_elapsed_clock_millis = 3;
5849 // Diff between current elapsed time and elapsed time from previous pull.
5850 optional int64 elapsed_clock_diff_millis = 4;
5851
5852 enum Type {
5853 TYPE_UNKNOWN = 0;
5854 ALWAYS_PRESENT = 1;
5855 PRESENT_ON_ODD_PULLS = 2;
5856 }
5857 // Type of behavior for the pulled data.
5858 optional Type type = 5;
5859}
5860
5861/**
5862 * This atom is for debugging purpose.
5863 */
5864message DebugFailingElapsedClock {
5865 // Monotically increasing value for each pull.
5866 optional int64 pull_count = 1;
5867 // Time from System.elapsedRealtime.
5868 optional int64 elapsed_clock_millis = 2;
5869 // Time from System.elapsedRealtime.
5870 optional int64 same_elapsed_clock_millis = 3;
5871 // Diff between current elapsed time and elapsed time from previous pull.
5872 optional int64 elapsed_clock_diff_millis = 4;
5873}
Steven Wuacef6bb2019-01-23 14:21:17 -05005874
5875/** Logs System UI bubbles event changed.
5876 *
5877 * Logged from:
5878 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles
5879 */
5880message BubbleUIChanged {
5881
5882 // The app package that is posting the bubble.
5883 optional string package_name = 1;
5884
5885 // The notification channel that is posting the bubble.
5886 optional string notification_channel = 2;
5887
5888 // The notification id associated with the posted bubble.
5889 optional int32 notification_id = 3;
5890
5891 // The position of the bubble within the bubble stack.
5892 optional int32 position = 4;
5893
5894 // The total number of bubbles within the bubble stack.
5895 optional int32 total_number = 5;
5896
5897 // User interactions with the bubble.
5898 enum Action {
5899 UNKNOWN = 0;
5900 POSTED = 1;
5901 UPDATED = 2;
5902 EXPANDED = 3;
5903 COLLAPSED = 4;
5904 DISMISSED = 5;
5905 STACK_DISMISSED = 6;
5906 STACK_MOVED = 7;
5907 HEADER_GO_TO_APP = 8;
5908 HEADER_GO_TO_SETTINGS = 9;
5909 PERMISSION_OPT_IN = 10;
5910 PERMISSION_OPT_OUT = 11;
Steven Wua62cb6a2019-02-15 17:12:51 -05005911 PERMISSION_DIALOG_SHOWN = 12;
Steven Wuacef6bb2019-01-23 14:21:17 -05005912 SWIPE_LEFT = 13;
5913 SWIPE_RIGHT = 14;
Steven Wua254dab2019-01-29 11:30:39 -05005914 STACK_EXPANDED = 15;
Steven Wu1684f2d2019-04-11 14:10:42 -04005915 FLYOUT = 16;
Steven Wuacef6bb2019-01-23 14:21:17 -05005916 }
5917 optional Action action = 6;
5918
5919 // Normalized screen position of the bubble stack. The range is between 0 and 1.
5920 optional float normalized_x_position = 7;
5921 optional float normalized_y_position = 8;
Steven Wu45e38ae2019-03-25 16:16:59 -04005922
5923 // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon.
5924 optional bool is_unread = 9;
Steven Wu8ba8ca92019-04-11 10:47:42 -04005925
5926 // Whether the bubble is an on-going one.
5927 optional bool is_ongoing = 10;
5928
5929 // Whether the bubble is produced by an app running in foreground.
Mady Mellordaa0a662019-06-24 16:42:35 -07005930 // This is deprecated and the value should be ignored.
5931 optional bool is_foreground = 11 [deprecated = true];
Steven Wuacef6bb2019-01-23 14:21:17 -05005932}
Kweku Adams8845d012018-12-11 20:06:45 -08005933
5934/**
Steven Wu552f63f2019-02-05 13:41:36 -05005935 * Logs System UI bubbles developer errors.
5936 *
5937 * Logged from:
5938 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
5939 */
5940message BubbleDeveloperErrorReported {
5941
5942 // The app package that is posting the bubble.
5943 optional string package_name = 1;
5944
5945 // Bubble developer error type enums.
5946 enum Error {
5947 UNKNOWN = 0;
5948 ACTIVITY_INFO_MISSING = 1;
5949 ACTIVITY_INFO_NOT_RESIZABLE = 2;
5950 DOCUMENT_LAUNCH_NOT_ALWAYS = 3;
5951 }
5952 optional Error error = 2 [default = UNKNOWN];
5953}
5954
5955/**
Kweku Adams8845d012018-12-11 20:06:45 -08005956 * Logs that a constraint for a scheduled job has changed.
5957 *
5958 * Logged from:
5959 * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
5960 */
5961message ScheduledJobConstraintChanged {
5962 repeated AttributionNode attribution_node = 1;
5963
5964 // Name of the job.
5965 optional string job_name = 2;
5966
5967 optional com.android.server.job.ConstraintEnum constraint = 3;
5968
5969 enum State {
Kweku Adamse8db3ab2019-02-27 14:30:34 -08005970 UNKNOWN = 0;
5971 UNSATISFIED = 1;
5972 SATISFIED = 2;
Kweku Adams8845d012018-12-11 20:06:45 -08005973 }
5974 optional State state = 4;
5975}
Alex Salod7c3eef2019-01-25 14:43:27 -08005976
5977/**
5978 * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check
5979 * returns true.
5980 *
5981 * Logged from:
5982 * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
5983 */
5984message ScreenTimeoutExtensionReported {
5985 // Describes how many times in a row did the power manager reset the screen off timeout.
5986 optional uint32 consecutive_timeout_extended_count = 1;
5987}
Hui Yu885aca12019-01-10 17:11:34 -08005988
5989/*
5990* Logs number of milliseconds it takes to start a process.
5991* The definition of app process start time is from the app launch time to
5992* the time that Zygote finished forking the app process and loaded the
5993* application package's java classes.
5994
5995* This metric is different from AppStartOccurred which is for foreground
5996* activity only.
5997
5998* ProcessStartTime can report all processes (both foreground and background)
5999* start time.
6000*
6001* Logged from:
6002* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
6003*/
6004message ProcessStartTime {
6005 // The uid of the ProcessRecord.
6006 optional int32 uid = 1 [(is_uid) = true];
6007
6008 // The process pid.
6009 optional int32 pid = 2;
6010
6011 // The process name.
6012 // Usually package name, "system" for system server.
6013 // Provided by ActivityManagerService.
6014 optional string process_name = 3;
6015
6016 enum StartType {
6017 UNKNOWN = 0;
6018 WARM = 1;
6019 HOT = 2;
6020 COLD = 3;
6021 }
6022
6023 // The start type.
6024 optional StartType type = 4;
6025
6026 // The elapsed realtime at the start of the process.
6027 optional int64 process_start_time_millis = 5;
6028
6029 // Number of milliseconds it takes to reach bind application.
6030 optional int32 bind_application_delay_millis = 6;
6031
6032 // Number of milliseconds it takes to finish start of the process.
6033 optional int32 process_start_delay_millis = 7;
6034
6035 // hostingType field in ProcessRecord, the component type such as "activity",
6036 // "service", "content provider", "broadcast" or other strings.
6037 optional string hosting_type = 8;
6038
6039 // hostingNameStr field in ProcessRecord. The component class name that runs
6040 // in this process.
6041 optional string hosting_name = 9;
6042}
6043
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006044/**
Ray Essick8ab04df2019-02-15 11:01:02 -08006045 * Track Media Codec usage
6046 * Logged from:
6047 * frameworks/av/media/libstagefright/MediaCodec.cpp
6048 * frameworks/av/services/mediaanalytics/statsd_codec.cpp
6049 */
6050message MediametricsCodecReported {
6051 optional int64 timestamp_nanos = 1;
6052 optional string package_name = 2;
6053 optional int64 package_version_code = 3;
6054 optional int64 media_apex_version = 4;
6055
6056 optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6057}
6058
6059/**
6060 * Track Media Extractor (pulling video/audio streams out of containers) usage
6061 * Logged from:
6062 * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp
6063 * frameworks/av/services/mediaanalytics/statsd_extractor.cpp
6064 */
6065message MediametricsExtractorReported {
6066 optional int64 timestamp_nanos = 1;
6067 optional string package_name = 2;
6068 optional int64 package_version_code = 3;
6069 optional int64 media_apex_version = 4;
6070
6071 optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6072}
6073
6074/**
6075 * Track how we arbitrate between microphone/input requests.
6076 * Logged from
6077 * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
6078 * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp
6079 */
6080message MediametricsAudiopolicyReported {
6081 optional int64 timestamp_nanos = 1;
6082 optional string package_name = 2;
6083 optional int64 package_version_code = 3;
6084 optional int64 media_apex_version = 4;
6085
6086 optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6087}
6088
6089/**
6090 * Track how we arbitrate between microphone requests.
6091 * Logged from
6092 * frameworks/av/media/libaudioclient/AudioRecord.cpp
6093 * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp
6094 */
6095message MediametricsAudiorecordReported {
6096 optional int64 timestamp_nanos = 1;
6097 optional string package_name = 2;
6098 optional int64 package_version_code = 3;
6099 optional int64 media_apex_version = 4;
6100
6101 optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6102}
6103
6104/**
6105 * Track how we arbitrate between microphone/input requests.
6106 * Logged from
6107 * frameworks/av/media/libnblog/ReportPerformance.cpp
6108 * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp
6109 */
6110message MediametricsAudiothreadReported {
6111 optional int64 timestamp_nanos = 1;
6112 optional string package_name = 2;
6113 optional int64 package_version_code = 3;
6114 optional int64 media_apex_version = 4;
6115
6116 optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6117}
6118
6119/**
6120 * Track how we arbitrate between microphone/input requests.
6121 * Logged from
6122 * frameworks/av/media/libaudioclient/AudioTrack.cpp
6123 * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp
6124 */
6125message MediametricsAudiotrackReported {
6126 optional int64 timestamp_nanos = 1;
6127 optional string package_name = 2;
6128 optional int64 package_version_code = 3;
6129 optional int64 media_apex_version = 4;
6130
6131 optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6132}
6133
6134/**
6135 * Track information about DRM framework performance
6136 * Logged from
6137 * frameworks/av/drm/libmediadrm/DrmHal.cpp
6138 * frameworks/av/services/mediaanalytics/statsd_drm.cpp
6139 */
6140message MediametricsMediadrmReported {
6141 optional int64 timestamp_nanos = 1;
6142 optional string package_name = 2;
6143 optional int64 package_version_code = 3;
6144 optional int64 media_apex_version = 4;
6145
6146 // vendor+description tell about which DRM plugin is in use on this device
6147 optional string vendor = 5;
6148 optional string description = 6;
6149 // from frameworks/av/drm/libmediadrm/protos/metrics.proto
6150 optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES];
6151}
6152
6153/**
6154 * Track information about the widevine DRM plugin performance
6155 * Logged from
6156 * vendor/widevine/libwvdrmengine/cdm/metrics
6157 * frameworks/av/services/mediaanalytics/statsd_drm.cpp
6158 */
6159message MediametricsDrmWidevineReported {
6160 optional int64 timestamp_nanos = 1;
6161 optional string package_name = 2;
6162 optional int64 package_version_code = 3;
6163 optional int64 media_apex_version = 4;
6164
6165 optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6166}
6167
6168/**
6169 * Track information about recordings (e.g. camcorder)
6170 * Logged from
6171 * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp
6172 * frameworks/av/services/mediaanalytics/statsd_recorder.cpp
6173 */
6174message MediametricsRecorderReported {
6175 optional int64 timestamp_nanos = 1;
6176 optional string package_name = 2;
6177 optional int64 package_version_code = 3;
6178 optional int64 media_apex_version = 4;
6179
6180 optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6181}
6182
6183/**
6184 * Track Media Player usage
6185 * Logged from:
6186 * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
6187 * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp
6188 */
6189message MediametricsNuPlayerReported {
6190 optional int64 timestamp_nanos = 1;
6191 optional string package_name = 2;
6192 optional int64 package_version_code = 3;
6193 optional int64 media_apex_version = 4;
6194
6195 optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES];
6196}
6197
6198/**
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006199 * State of a dangerous permission requested by a package
6200 */
6201message DangerousPermissionState {
6202 // Name of the permission
6203 optional string permission_name = 1;
6204
6205 // Uid of the package
6206 optional int32 uid = 2 [(is_uid) = true];
6207
6208 // Package requesting the permission
6209 optional string package_name = 3;
6210
6211 // If the permission is granted to the uid
6212 optional bool is_granted = 4;
Stanislav Zholnin75c3fd12019-05-21 13:10:51 +01006213
6214 // Permission flags as per android.content.pm.PermissionFlags
6215 optional int32 permission_flags = 5;
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08006216}
6217
Michael Groover4a0ca942019-01-24 17:41:25 -08006218/**
6219 * Logs when a package is denied access to a device identifier based on the new access requirements.
6220 *
6221 * Logged from:
6222 * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
6223 */
6224message DeviceIdentifierAccessDenied {
6225 // The name of the package denied access to the requested device identifier.
6226 optional string package_name = 1;
6227
6228 // The name of the device identifier method the package attempted to invoke.
6229 optional string method_name = 2;
6230
6231 // True if the package is preinstalled.
6232 optional bool is_preinstalled = 3;
6233
6234 // True if the package is privileged.
6235 optional bool is_priv_app = 4;
6236}
Chenjie Yue13f44a2019-02-07 17:51:38 -08006237
6238/**
Chenjie Yue13f44a2019-02-07 17:51:38 -08006239 * Pulls the ongoing mainline install train version code.
6240 * Pulled from StatsCompanionService
6241 */
6242message TrainInfo {
6243 optional int64 train_version_code = 1;
6244
6245 optional TrainExperimentIds train_experiment_id = 2;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08006246
6247 optional string train_name = 3;
6248
6249 enum Status {
6250 UNKNOWN = 0;
6251 INSTALL_REQUESTED = 1;
6252 INSTALL_STARTED = 2;
6253 INSTALL_STAGED_NOT_READY = 3;
6254 INSTALL_STAGED_READY = 4;
6255 INSTALL_SUCCESS = 5;
Tej Singh403fe472019-04-30 12:54:21 -07006256 // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH,
6257 // and INSTALL_FAILURE_COMMIT.
6258 INSTALL_FAILURE = 6 [deprecated = true];
6259 // This enum is for installs that are manually cancelled via the Manual Update UI.
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08006260 INSTALL_CANCELLED = 7;
6261 INSTALLER_ROLLBACK_REQUESTED = 8;
6262 INSTALLER_ROLLBACK_INITIATED = 9;
6263 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
6264 INSTALLER_ROLLBACK_STAGED = 11;
6265 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
6266 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
6267 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
6268 INSTALLER_ROLLBACK_SUCCESS = 15;
6269 INSTALLER_ROLLBACK_FAILURE = 16;
Howard Ro174ed562019-04-07 22:17:58 -07006270 INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17;
6271 INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18;
6272 INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19;
6273 INSTALL_STAGED_CANCEL_REQUESTED = 20;
6274 INSTALL_STAGED_CANCEL_SUCCESS = 21;
6275 INSTALL_STAGED_CANCEL_FAILURE = 22;
Tej Singh403fe472019-04-30 12:54:21 -07006276 INSTALL_FAILURE_DOWNLOAD = 23;
6277 INSTALL_FAILURE_STATE_MISMATCH = 24;
6278 INSTALL_FAILURE_COMMIT = 25;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08006279 }
6280 optional Status status = 4;
Chenjie Yue13f44a2019-02-07 17:51:38 -08006281}
joshmccloskey8c3322e2019-01-09 18:25:57 -08006282
6283/**
6284 * Logs the gesture stage changed event.
6285 *
6286 * Logged from:
6287 * frameworks/base/packages/SystemUI/
6288 */
6289message AssistGestureStageReported {
joshmccloskey99f39012019-02-20 14:45:08 -08006290 optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08006291}
6292
6293/**
6294 * Logs the feedback type.
6295 *
6296 * Logged from:
6297 * frameworks/base/packages/SystemUI/
6298 */
6299message AssistGestureFeedbackReported {
joshmccloskey99f39012019-02-20 14:45:08 -08006300 // Whether or not the gesture was used.
6301 optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08006302}
6303
6304/**
6305 * Logs the progress.
6306 *
6307 * Logged from:
6308 * frameworks/base/packages/SystemUI/
6309 */
6310message AssistGestureProgressReported {
joshmccloskey99f39012019-02-20 14:45:08 -08006311 // [0,100] progress for the assist gesture.
6312 optional int32 progress = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08006313}
Neil Fullerdb14b482019-02-05 19:44:44 +00006314
6315/*
6316 * Information about the time zone data on a device.
6317 */
6318message TimeZoneDataInfo {
6319 // A version identifier for the data set on device. e.g. "2018i"
6320 optional string tzdb_version = 1;
6321}
Yiwei Zhang5c81b632019-03-01 15:39:46 -08006322
Yiwei Zhang4fb92892019-03-04 14:29:25 -08006323/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08006324 * Logs the GPU stats global health information.
6325 *
6326 * Logged from:
6327 * frameworks/native/services/gpuservice/gpustats/
6328 */
6329message GpuStatsGlobalInfo {
6330 // Package name of the gpu driver.
6331 optional string driver_package_name = 1;
6332
6333 // Version name of the gpu driver.
6334 optional string driver_version_name = 2;
6335
6336 // Version code of the gpu driver.
6337 optional int64 driver_version_code = 3;
6338
6339 // Build time of the gpu driver in UTC as seconds since January 1, 1970.
6340 optional int64 driver_build_time = 4;
6341
6342 // Total count of the gl driver gets loaded.
6343 optional int64 gl_loading_count = 5;
6344
6345 // Total count of the gl driver fails to be loaded.
6346 optional int64 gl_loading_failure_count = 6;
6347
6348 // Total count of the Vulkan driver gets loaded.
6349 optional int64 vk_loading_count = 7;
6350
6351 // Total count of the Vulkan driver fails to be loaded.
6352 optional int64 vk_loading_failure_count = 8;
Yiwei Zhang63852d2a2019-05-06 19:31:20 -07006353
6354 // Api version of the system Vulkan driver.
6355 optional int32 vulkan_version = 9;
6356
6357 // Api version of the system CPU Vulkan driver.
6358 optional int32 cpu_vulkan_version = 10;
6359
6360 // Api version of the system GLES driver.
6361 optional int32 gles_version = 11;
Yiwei Zhanga0f5fef2019-05-08 16:30:47 -07006362
6363 // Total count of the angle driver gets loaded.
6364 optional int64 angle_loading_count = 12;
6365
6366 // Total count of the angle driver fails to be loaded.
6367 optional int64 angle_loading_failure_count = 13;
Yiwei Zhang5c81b632019-03-01 15:39:46 -08006368}
6369
Yiwei Zhang4fb92892019-03-04 14:29:25 -08006370/**
6371 * GPU driver loading time info.
6372 */
6373message GpuDriverLoadingTime {
6374 // List of all the driver loading times for this app. The list size is
6375 // capped at 50.
6376 repeated int64 driver_loading_time = 1;
6377}
6378
6379/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08006380 * Logs the GPU stats per app health information.
6381 *
6382 * Logged from:
6383 * frameworks/native/services/gpuservice/gpustats/
6384 */
6385message GpuStatsAppInfo {
Yiwei Zhang4fb92892019-03-04 14:29:25 -08006386 // Package name of the application that loads the gpu driver. Total number
6387 // of different packages is capped at 100.
Yiwei Zhang5c81b632019-03-01 15:39:46 -08006388 optional string app_package_name = 1;
6389
6390 // Version code of the gpu driver this app loads.
6391 optional int64 driver_version_code = 2;
6392
Yiwei Zhang4fb92892019-03-04 14:29:25 -08006393 // gl driver loading time info.
6394 optional GpuDriverLoadingTime gl_driver_loading_time = 3
6395 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang5c81b632019-03-01 15:39:46 -08006396
Yiwei Zhang4fb92892019-03-04 14:29:25 -08006397 // Vulkan driver loading time info.
6398 optional GpuDriverLoadingTime vk_driver_loading_time = 4
6399 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhanga0f5fef2019-05-08 16:30:47 -07006400
6401 // Angle driver loading time info.
6402 optional GpuDriverLoadingTime angle_driver_loading_time = 5
6403 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang7c709302019-05-09 15:00:46 -07006404
6405 // CPU Vulkan implementation is in use.
6406 optional bool cpu_vulkan_in_use = 6;
Yiwei Zhang5c81b632019-03-01 15:39:46 -08006407}
Rafal Slawikd4e87572019-03-12 13:08:38 +00006408
6409/*
6410 * Logs the size of the system ion heap.
6411 *
6412 * Pulled from StatsCompanionService.
6413 */
6414message SystemIonHeapSize {
6415 // Size of the system ion heap in bytes.
6416 optional int64 size_in_bytes = 1;
6417}
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08006418
Rafal Slawik6d44d6d2019-06-17 12:28:23 +01006419/*
6420 * Logs the per-process size of the system ion heap.
6421 *
6422 * Pulled from StatsCompanionService.
6423 */
6424message ProcessSystemIonHeapSize {
6425 // The uid if available. -1 means not available.
6426 optional int32 uid = 1 [(is_uid) = true];
6427
6428 // The process name (from /proc/PID/cmdline).
6429 optional string process_name = 2;
6430
6431 // Sum of sizes of all allocations.
6432 optional int32 total_size_in_kilobytes = 3;
6433
6434 // Number of allocations.
6435 optional int32 allocation_count = 4;
6436
6437 // Size of the largest allocation.
6438 optional int32 max_size_in_kilobytes = 5;
6439}
6440
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08006441/**
6442 * Push network stack events.
6443 *
6444 * Log from:
6445 * frameworks/base/packages/NetworkStack/
6446 */
6447message NetworkStackReported {
Chiachang Wang729d2672019-03-27 17:33:52 +08006448 // The id that indicates the event reported from NetworkStack.
6449 optional int32 event_id = 1;
6450 // The data for the reported events.
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08006451 optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES];
6452}
Carmen Agimofa769c152019-03-04 14:39:14 +00006453
6454/**
6455 * Logs the apps that are installed on the external storage.
6456 * Pulled from:
6457 * StatsCompanionService
6458 */
6459message AppsOnExternalStorageInfo {
6460 // The type of the external storage.
6461 optional android.stats.storage.ExternalStorageType external_storage_type = 1;
6462 // The name of the package that is installed on the external storage.
6463 optional string package_name = 2;
6464}
joshmccloskey34c1f8e2019-04-11 14:06:43 -07006465
6466/**
6467 * Logs the settings related to Face.
6468 * Logged from:
6469 * frameworks/base/services/core/java/com/android/server/stats
6470 */
6471message FaceSettings {
6472 // Whether or not face unlock is allowed on Keyguard.
6473 optional bool unlock_keyguard_enabled = 1;
6474 // Whether or not face unlock dismisses the Keyguard.
6475 optional bool unlock_dismisses_keyguard = 2;
6476 // Whether or not face unlock requires attention.
6477 optional bool unlock_attention_required = 3;
6478 // Whether or not face unlock is allowed for apps (through BiometricPrompt).
6479 optional bool unlock_app_enabled = 4;
6480 // Whether or not face unlock always requires user confirmation.
6481 optional bool unlock_always_require_confirmation = 5;
6482 // Whether or not a diverse set of poses are required during enrollment.
6483 optional bool unlock_diversity_required = 6;
6484}
Maggie White442b6312019-04-05 16:26:44 -07006485
6486/**
6487 * Logs cooling devices maintained by the kernel.
6488 *
6489 * Pulled from StatsCompanionService.java
6490 */
6491message CoolingDevice {
6492 // The type of cooling device being reported. Eg. CPU, GPU...
6493 optional android.os.CoolingTypeEnum device_location = 1;
6494 // The name of the cooling device source. Eg. CPU0
6495 optional string device_name = 2;
6496 // Current throttle state of the cooling device. The value can any unsigned
6497 // integer between 0 and max_state defined in its driver. 0 means device is
6498 // not in throttling, higher value means deeper throttling.
6499 optional int32 state = 3;
6500}
Ben Blount763a5d52019-04-10 11:48:58 -07006501
6502/**
6503 * Intelligence has several counter-type events that don't warrant a
6504 * full separate atom. These are primarily API call counters but also include
6505 * counters for feature usage and specific failure modes.
6506 *
6507 * Logged from the Intelligence mainline module.
6508 */
6509message IntelligenceEventReported {
6510 optional android.stats.intelligence.EventType event_id = 1;
6511 optional android.stats.intelligence.Status status = 2;
6512}
Andrew T Nguyenee615d62019-05-01 14:40:19 -07006513
6514/**
Yuncheol Heod1a85d22019-05-08 17:13:42 -07006515 * Logs when Car Power state changed.
6516 *
6517 * Logged from:
6518 * packages/services/Car/service/src/com/android/car/CarStatsLog.java
6519 */
6520message CarPowerStateChanged {
6521 // States come from CpmsState in CarPowerManagementService.java.
6522 enum State {
6523 WAIT_FOR_VHAL = 0;
6524 ON = 1;
6525 SHUTDOWN_PREPARE = 2;
6526 WAIT_FOR_FINISH = 3;
6527 SUSPEND = 4;
6528 SIMULATE_SLEEP = 5;
6529 }
6530 optional State state = 1;
6531}
6532
6533/**
6534 * Logs whether GarageMode is entered.
6535 *
6536 * Logged from:
6537 * packages/services/Car/service/src/com/android/car/CarStatsLog.java
6538 */
6539message GarageModeInfo {
6540 // Whether GarageMode is entered.
6541 optional bool is_garage_mode = 1;
6542}
Martijn Coenencd95d462019-04-25 17:09:45 +02006543
6544/**
6545 * Historical app ops data per package.
6546 */
6547message AppOps {
6548 // Uid of the package requesting the op
6549 optional int32 uid = 1 [(is_uid) = true];
6550
6551 // Nmae of the package performing the op
6552 optional string package_name = 2;
6553
6554 // operation id; maps to the OP_* constants in AppOpsManager.java
6555 optional int32 op_id = 3;
6556
6557 // The number of times the op was granted while the app was in the
6558 // foreground (only for trusted requests)
6559 optional int64 trusted_foreground_granted_count = 4;
6560
6561 // The number of times the op was granted while the app was in the
6562 // background (only for trusted requests)
6563 optional int64 trusted_background_granted_count = 5;
6564
6565 // The number of times the op was rejected while the app was in the
6566 // foreground (only for trusted requests)
6567 optional int64 trusted_foreground_rejected_count = 6;
6568
6569 // The number of times the op was rejected while the app was in the
6570 // background (only for trusted requests)
6571 optional int64 trusted_background_rejected_count = 7;
6572
6573 // For long-running operations, total duration of the operation
6574 // while the app was in the foreground (only for trusted requests)
6575 optional int64 trusted_foreground_duration_millis = 8;
6576
6577 // For long-running operations, total duration of the operation
6578 // while the app was in the background (only for trusted requests)
6579 optional int64 trusted_background_duration_millis = 9;
6580}
Hongyi Zhang700137e2019-05-23 21:19:36 -07006581
6582/**
6583 * Location Manager API Usage information(e.g. API under usage,
6584 * API call's parameters).
6585 * Logged from:
6586 * frameworks/base/services/core/java/com/android/server/LocationManagerService.java
6587 */
6588message LocationManagerApiUsageReported {
6589
6590 // Indicating if usage starts or usage ends.
6591 optional android.stats.location.UsageState state = 1;
6592
6593 // LocationManagerService's API in use.
6594 // We can identify which API from LocationManager is
6595 // invoking current LMS API by the combination of
6596 // API parameter(e.g. is_listener_null, is_intent_null,
6597 // is_location_request_null)
6598 optional android.stats.location.LocationManagerServiceApi api_in_use = 2;
6599
6600 // Name of the package calling the API.
6601 optional string calling_package_name = 3;
6602
6603 // Type of the location provider.
6604 optional android.stats.location.ProviderType provider = 4;
6605
6606 // Quality of the location request
6607 optional android.stats.location.LocationRequestQuality quality = 5;
6608
6609 // The desired interval for active location updates, in milliseconds.
6610 // Bucketized to reduce cardinality.
6611 optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6;
6612
6613 // Minimum distance between location updates, in meters.
6614 // Bucketized to reduce cardinality.
6615 optional android.stats.location.SmallestDisplacementBucket
6616 bucketized_smallest_displacement = 7;
6617
6618 // The number of location updates.
6619 optional int64 num_updates = 8;
6620
6621 // The request expiration time, in millisecond since boot.
6622 // Bucketized to reduce cardinality.
6623 optional android.stats.location.ExpirationBucket
6624 bucketized_expire_in = 9;
6625
6626 // Type of Callback passed in for this API.
6627 optional android.stats.location.CallbackType callback_type = 10;
6628
6629 // The radius of the central point of the alert
6630 // region, in meters. Only for API REQUEST_GEOFENCE.
6631 // Bucketized to reduce cardinality.
6632 optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11;
6633
6634 // Activity Importance of API caller.
6635 // Categorized to 3 types that are interesting from location's perspective.
6636 optional android.stats.location.ActivityImportance activiy_importance = 12;
6637}
Stanislav Zholnin3d215df12019-06-05 16:48:20 +01006638
6639/**
6640 * Information about a permission grant or denial made by user inside ReviewPermissionsFragment
6641 */
6642message ReviewPermissionsFragmentResultReported {
6643 // unique value identifying a permission group change. A permission group change might result
6644 // in multiple of these atoms
6645 optional int64 change_id = 1;
6646
6647 // UID of package the permission belongs to
6648 optional int32 uid = 2 [(is_uid) = true];
6649
6650 // Name of package the permission belongs to
6651 optional string package_name = 3;
6652
6653 // The permission to be granted
6654 optional string permission_name = 4;
6655
6656 // The result of the permission grant
6657 optional bool permission_granted = 5;
6658}
Stanislav Zholnin247d1b72019-06-06 21:28:44 +01006659
6660/**
6661* Information about results of permission upgrade by RuntimePermissionsUpgradeController
6662* Logged from: RuntimePermissionUpdgradeController
6663*/
6664message RuntimePermissionsUpgradeResult {
6665 // Permission granted as result of upgrade
6666 optional string permission_name = 1;
6667
6668 // UID of package granted permission
6669 optional int32 uid = 2 [(is_uid) = true];
6670
6671 // Name of package granted permission
6672 optional string package_name = 3;
Stanislav Zholninbdf620b2019-06-06 22:38:33 +01006673}
6674
6675/**
6676* Information about a buttons presented in GrantPermissionsActivty and choice made by user
6677*/
6678message GrantPermissionsActivityButtonActions {
6679 // Permission granted as result of upgrade
6680 optional string permission_group_name = 1;
6681
6682 // UID of package granted permission
6683 optional int32 uid = 2 [(is_uid) = true];
6684
6685 // Name of package requesting permission
6686 optional string package_name = 3;
6687
6688 // Buttons presented in the dialog - bit flags, bit numbers are in accordance with
6689 // LABEL_ constants in GrantPermissionActivity.java
6690 optional int32 buttons_presented = 4;
6691
6692 // Button clicked by user - same as bit flags in buttons_presented with only single bit set
6693 optional int32 button_clicked = 5;
6694}
Stanislav Zholnin375e2ab2019-05-29 13:07:35 +01006695
6696/**
6697 * Information about LocationAccessCheck notification presented to user
6698 */
6699message LocationAccessCheckNotificationAction {
6700
6701 // id which identifies single session of user interacting with permission controller
6702 optional int64 session_id = 1;
6703
6704 // Uid of package for which location access check is presented
6705 optional int32 package_uid = 2;
6706
6707 // Name of package for which location access check is presented
6708 optional string package_name = 3;
6709
6710 enum Result {
6711 UNDEFINED = 0;
6712 // notification was presented to the user
6713 NOTIFICATION_PRESENTED = 1;
6714 // notification was declined by the user
6715 NOTIFICATION_DECLINED = 2;
6716 // notification was clicked by the user
6717 NOTIFICATION_CLICKED = 3;
6718 }
6719
6720 // View / interaction recorded
6721 optional Result result = 4;
6722}
Stanislav Zholnin3e0f9bc2019-05-23 19:03:55 +01006723
6724/**
6725 * Information about a permission grant or revoke made by user inside AppPermissionFragment
6726 */
6727message AppPermissionFragmentActionReported {
6728 // id which identifies single session of user interacting with permission controller
6729 optional int64 session_id = 1;
6730
6731 // unique value identifying a permission group change. A permission group change might result
6732 // in multiple of these atoms
6733 optional int64 change_id = 2;
6734
6735 // UID of package the permission belongs to
6736 optional int32 uid = 3 [(is_uid) = true];
6737
6738 // Name of package the permission belongs to
6739 optional string package_name = 4;
6740
6741 // The permission to be granted
6742 optional string permission_name = 5;
6743
6744 // The result of the permission grant
6745 optional bool permission_granted = 6;
6746}
Stanislav Zholninc9dda9e2019-06-02 20:50:13 +01006747
6748/**
6749* Information about a AppPermissionFragment viewed by user
6750*/
6751message AppPermissionFragmentViewed {
6752 // id which identifies single session of user interacting with permission controller
6753 optional int64 session_id = 1;
6754
6755 // UID of package for which permissions are viewed
6756 optional int32 uid = 2 [(is_uid) = true];
6757
6758 // Name of package for which permissions are viewed
6759 optional string package_name = 3;
6760
6761 // Permission group viewed
6762 optional string permission_group_name = 4;
6763}
Stanislav Zholnindc3e2b32019-06-06 18:10:14 +01006764
6765/**
6766* Information about a AppPermissionsFragment viewed by user
6767*/
6768message AppPermissionsFragmentViewed {
6769 // id which identifies single session of user interacting with permission controller
6770 optional int64 session_id = 1;
6771
6772 // id which identifies single view as every view might have several logging records
6773 // with different package information attached
6774 optional int64 view_id = 2;
6775
6776 // Permission group viewed
6777 optional string permission_group_name = 3;
6778
6779 // UID of package for which permissions are viewed
6780 optional int32 uid = 4 [(is_uid) = true];
6781
6782 // Name of package for which permissions are viewed
6783 optional string package_name = 5;
6784
6785 // Category in which permission is included
6786 enum Category {
6787 UNDEFINED = 0;
6788 ALLOWED = 1;
6789 ALLOWED_FOREGROUND = 2;
6790 DENIED = 3;
6791 }
6792 optional Category category = 6;
6793}
Stanislav Zholnin32a89c12019-06-04 14:59:21 +01006794
6795/**
6796* Information about a PermissionAppsFragment viewed by user.
6797* Logged from ui/handheld/PermissionAppsFragment.java
6798*/
6799message PermissionAppsFragmentViewed {
6800 // id which identifies single session of user interacting with permission controller
6801 optional int64 session_id = 1;
6802
6803 // id which identifies single view as every view might have several logging records
6804 // with different package information attached
6805 optional int64 view_id = 2;
6806
6807 // Permission group viewed
6808 optional string permission_group_name = 3;
6809
6810 // UID of package for which permissions are viewed
6811 optional int32 uid = 4 [(is_uid) = true];
6812
6813 // Name of package for which permissions are viewed
6814 optional string package_name = 5;
6815
6816 // Category in which app is included
6817 enum Category {
6818 UNDEFINED = 0;
6819 ALLOWED = 1;
6820 ALLOWED_FOREGROUND = 2;
6821 DENIED = 3;
6822 }
6823 optional Category category = 6;
6824}
atrost1516d522019-08-28 15:40:37 +01006825
6826/**
6827 * Logs when a compatibility change is affecting an app.
6828 *
6829 * Logged from:
6830 * frameworks/base/core/java/android/app/AppCompatCallbacks.java and
6831 * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java
6832 */
6833message AppCompatibilityChangeReported {
6834 // The UID of the app being affected by the compatibilty change.
6835 optional int32 uid = 1 [(is_uid) = true];
6836
6837 // The ID of the change affecting the app.
6838 optional int64 change_id = 2;
6839
6840 enum State {
6841 UNKNOWN_STATE = 0;
6842 ENABLED = 1;
6843 DISABLED = 2;
6844 LOGGED = 3;
6845 }
6846
6847 // The state of the change - if logged from gating whether it was enabled or disabled, or just
6848 // logged otherwise.
6849 optional State state = 3;
6850
6851 enum Source {
6852 UNKNOWN_SOURCE = 0;
6853 APP_PROCESS = 1;
6854 SYSTEM_SERVER = 2;
6855 }
6856
6857 // Where it was logged from.
6858 optional Source source = 4;
6859
6860}