blob: 4c1149bc7a67b35752826d9f9a286b9b2ab631d8 [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";
Fan Zhangf837b8e2018-10-23 12:38:30 -070025import "frameworks/base/core/proto/android/app/settings_enums.proto";
Tej Singh33a412b2018-03-16 18:43:59 -070026import "frameworks/base/core/proto/android/app/job/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";
Yangsteraf9aee72018-10-12 09:26:16 -070044import "frameworks/base/core/proto/android/stats/enums.proto";
shawnlinea5b66b2018-11-13 15:05:29 +080045import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
Bookatz11257ca2018-12-05 18:22:39 -080046import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
47import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
Yao Chen8c433862018-10-24 14:09:20 -070048import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
Carmen Agimof6688a352019-01-30 19:36:04 +000049import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto";
Hyunyoung Song80adf6be2019-01-30 09:59:30 -080050import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
Tej Singhc477d9c2018-02-05 18:31:39 -080051import "frameworks/base/core/proto/android/telecomm/enums.proto";
Bookatz1a1b0462018-01-12 11:47:03 -080052import "frameworks/base/core/proto/android/telephony/enums.proto";
53import "frameworks/base/core/proto/android/view/enums.proto";
Bookatz11257ca2018-12-05 18:22:39 -080054import "frameworks/base/core/proto/android/wifi/enums.proto";
Joe Onorato62c220b2017-11-18 20:32:56 -080055
Yao Chend54f9dd2017-10-17 17:37:48 +000056/**
Stefan Lafonae2df012017-11-14 09:17:21 -080057 * The master atom class. This message defines all of the available
Yao Chend54f9dd2017-10-17 17:37:48 +000058 * raw stats log events from the Android system, also known as "atoms."
59 *
60 * This field contains a single oneof with all of the available messages.
61 * The stats-log-api-gen tool runs as part of the Android build and
62 * generates the android.util.StatsLog class, which contains the constants
63 * and methods that Android uses to log.
64 *
Stefan Lafonae2df012017-11-14 09:17:21 -080065 * This Atom class is not actually built into the Android system.
Yao Chend54f9dd2017-10-17 17:37:48 +000066 * Instead, statsd on Android constructs these messages synthetically,
67 * in the format defined here and in stats_log.proto.
68 */
Stefan Lafonae2df012017-11-14 09:17:21 -080069message Atom {
70 // Pushed atoms start at 2.
David Chenc8a43242017-10-17 16:23:28 -070071 oneof pushed {
Bookatzc1a050a2017-10-10 15:49:28 -070072 // For StatsLog reasons, 1 is illegal and will not work. Must start at 2.
73 BleScanStateChanged ble_scan_state_changed = 2;
Chenjie Yubd1a28f2018-07-17 14:55:19 -070074 ProcessStateChanged process_state_changed = 3;
Bookatzc1a050a2017-10-10 15:49:28 -070075 BleScanResultReceived ble_scan_result_received = 4;
76 SensorStateChanged sensor_state_changed = 5;
Bookatzdb026a22018-01-10 19:01:56 -080077 GpsScanStateChanged gps_scan_state_changed = 6;
Bookatzc1a050a2017-10-10 15:49:28 -070078 SyncStateChanged sync_state_changed = 7;
79 ScheduledJobStateChanged scheduled_job_state_changed = 8;
80 ScreenBrightnessChanged screen_brightness_changed = 9;
Bookatzd6746242017-10-24 18:39:35 -070081 WakelockStateChanged wakelock_state_changed = 10;
Bookatzddccf0a2017-11-28 16:48:14 -080082 LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11;
83 MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12;
84 WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13;
Chenjie Yubd1a28f2018-07-17 14:55:19 -070085 ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14;
86 MemoryFactorStateChanged memory_factor_state_changed = 15;
87 ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16;
88 CachedKillReported cached_kill_reported = 17;
89 ProcessMemoryStatReported process_memory_stat_reported = 18;
Hyunyoung Songc6d6b772018-10-17 13:35:32 -070090 LauncherUIChanged launcher_event = 19;
Bookatzddccf0a2017-11-28 16:48:14 -080091 BatterySaverModeStateChanged battery_saver_mode_state_changed = 20;
92 DeviceIdleModeStateChanged device_idle_mode_state_changed = 21;
93 DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22;
Bookatzc1a050a2017-10-10 15:49:28 -070094 AudioStateChanged audio_state_changed = 23;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -080095 MediaCodecStateChanged media_codec_state_changed = 24;
Bookatzc1a050a2017-10-10 15:49:28 -070096 CameraStateChanged camera_state_changed = 25;
97 FlashlightStateChanged flashlight_state_changed = 26;
98 UidProcessStateChanged uid_process_state_changed = 27;
99 ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28;
100 ScreenStateChanged screen_state_changed = 29;
Bookatz8c6571b2017-10-24 15:04:41 -0700101 BatteryLevelChanged battery_level_changed = 30;
102 ChargingStateChanged charging_state_changed = 31;
103 PluggedStateChanged plugged_state_changed = 32;
Bookatza66083f2018-09-20 17:24:00 -0700104 InteractiveStateChanged interactive_state_changed = 33;
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -0800105 TouchEventReported touch_event_reported = 34;
Bookatz8c6571b2017-10-24 15:04:41 -0700106 WakeupAlarmOccurred wakeup_alarm_occurred = 35;
107 KernelWakeupReported kernel_wakeup_reported = 36;
Bookatze5885242017-10-24 20:10:31 -0700108 WifiLockStateChanged wifi_lock_state_changed = 37;
109 WifiSignalStrengthChanged wifi_signal_strength_changed = 38;
110 WifiScanStateChanged wifi_scan_state_changed = 39;
111 PhoneSignalStrengthChanged phone_signal_strength_changed = 40;
David Chenc28b2bb2017-10-24 12:52:52 -0700112 SettingChanged setting_changed = 41;
David Chenc8a43242017-10-17 16:23:28 -0700113 ActivityForegroundStateChanged activity_foreground_state_changed = 42;
David Chen21582962017-11-01 17:32:46 -0700114 IsolatedUidChanged isolated_uid_changed = 43;
Hugo Benichi884970e2017-11-14 22:42:46 +0900115 PacketWakeupOccurred packet_wakeup_occurred = 44;
Bookatz7948c872018-09-04 12:58:33 -0700116 WallClockTimeShifted wall_clock_time_shifted = 45;
Bookatz8fcd09a2017-12-18 13:01:10 -0800117 AnomalyDetected anomaly_detected = 46;
Andrei Oneada01ea52019-01-30 15:28:36 +0000118 AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true];
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800119 AppStartOccurred app_start_occurred = 48;
120 AppStartCanceled app_start_canceled = 49;
121 AppStartFullyDrawn app_start_fully_drawn = 50;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -0800122 LmkKillOccurred lmk_kill_occurred = 51;
Chenjie Yu52cacc62017-12-08 18:11:45 -0800123 PictureInPictureStateChanged picture_in_picture_state_changed = 52;
Tej Singh4503e102018-01-04 14:35:01 -0800124 WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -0800125 LmkStateChanged lmk_state_changed = 54;
126 AppStartMemoryStateCaptured app_start_memory_state_captured = 55;
Tej Singh1ea42892018-01-19 09:27:00 -0800127 ShutdownSequenceReported shutdown_sequence_reported = 56;
Tej Singh6483ea42018-01-25 17:45:49 -0800128 BootSequenceReported boot_sequence_reported = 57;
Andrei Oneada01ea52019-01-30 15:28:36 +0000129 DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true];
Chenjie Yue8904192017-12-08 19:12:57 -0800130 OverlayStateChanged overlay_state_changed = 59;
Chenjie Yuccfe6452018-01-30 11:33:21 -0800131 ForegroundServiceStateChanged foreground_service_state_changed = 60;
Tej Singhc477d9c2018-02-05 18:31:39 -0800132 CallStateChanged call_state_changed = 61;
Tej Singhdd7bd352018-02-09 19:33:15 -0800133 KeyguardStateChanged keyguard_state_changed = 62;
134 KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63;
135 KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800136 AppDied app_died = 65;
Tej Singha883b372018-02-15 11:30:01 -0800137 ResourceConfigurationChanged resource_configuration_changed = 66;
Tej Singh5d991e12018-03-09 19:48:11 -0800138 BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67;
139 BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68;
Bookatz48d362e2018-11-06 15:49:08 -0800140 GpsSignalQualityChanged gps_signal_quality_changed = 69;
Andrew Chantb56388b2018-03-22 21:07:33 -0700141 UsbConnectorStateChanged usb_connector_state_changed = 70;
Andrew Chant28d627e2018-02-22 15:17:05 -0800142 SpeakerImpedanceReported speaker_impedance_reported = 71;
143 HardwareFailed hardware_failed = 72;
144 PhysicalDropDetected physical_drop_detected = 73;
145 ChargeCyclesReported charge_cycles_reported = 74;
Tej Singheee317b2018-03-07 19:28:05 -0800146 MobileConnectionStateChanged mobile_connection_state_changed = 75;
147 MobileRadioTechnologyChanged mobile_radio_technology_changed = 76;
Andrew Chantb56388b2018-03-22 21:07:33 -0700148 UsbDeviceAttached usb_device_attached = 77;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800149 AppCrashOccurred app_crash_occurred = 78;
150 ANROccurred anr_occurred = 79;
151 WTFOccurred wtf_occurred = 80;
152 LowMemReported low_mem_reported = 81;
Howard Rocb767f62018-06-19 19:58:05 -0700153 GenericAtom generic_atom = 82;
jianjin6eada302019-02-28 11:25:57 -0800154 KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true];
Bookatza7020bd2018-08-28 16:29:35 -0700155 VibratorStateChanged vibrator_state_changed = 84;
Yangster-mac96353002018-09-05 11:18:55 -0700156 DeferredJobStatsReported deferred_job_stats_reported = 85;
Yangster-mace16189a2018-08-26 12:20:16 -0700157 ThermalThrottlingStateChanged thermal_throttling = 86;
Kevin Chyn1741a072019-01-17 11:54:40 -0800158 BiometricAcquired biometric_acquired = 87;
159 BiometricAuthenticated biometric_authenticated = 88;
160 BiometricErrorOccurred biometric_error_occurred = 89;
Howard Ro688ae182018-09-25 00:09:36 -0700161 Notification notification = 90;
Howard Roa46b6582018-09-18 16:45:02 -0700162 BatteryHealthSnapshot battery_health_snapshot = 91;
163 SlowIo slow_io = 92;
164 BatteryCausedShutdown battery_caused_shutdown = 93;
Yangsteraf9aee72018-10-12 09:26:16 -0700165 PhoneServiceStateChanged phone_service_state_changed = 94;
166 PhoneStateChanged phone_state_changed = 95;
arangelovd5db50e2018-10-12 20:24:39 +0100167 UserRestrictionChanged user_restriction_changed = 96;
Fan Zhang916c13b2018-10-16 22:49:45 -0700168 SettingsUIChanged settings_ui_changed = 97;
Chenjie Yuae9dfac2018-10-25 16:06:56 -0700169 ConnectivityStateChanged connectivity_state_changed = 98;
Chenjie Yu75b3c492018-10-06 21:45:19 -0700170 // TODO: service state change is very noisy shortly after boot, as well
171 // as at other transitions - coming out of doze, device plugged in, etc.
172 // Consider removing this if it becomes a problem
173 ServiceStateChanged service_state_changed = 99;
174 ServiceLaunchReported service_launch_reported = 100;
Tej Singh0d176952019-01-16 19:10:54 -0800175 FlagFlipUpdateOccurred flag_flip_update_occurred = 101;
Yangster-macb89807e2018-11-15 21:10:57 -0800176 BinaryPushStateChanged binary_push_state_changed = 102;
arangelov4e994062018-11-13 16:12:38 +0000177 DevicePolicyEvent device_policy_event = 103;
shawnlinea5b66b2018-11-13 15:05:29 +0800178 DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104;
179 DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = 105;
180 DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106;
181 DocsUIFileOperationReported docs_ui_provider_file_op = 107;
182 DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = 108;
183 DocsUILaunchReported docs_ui_launch_reported = 109;
184 DocsUIRootVisitedReported docs_ui_root_visited = 110;
185 DocsUIStartupMsReported docs_ui_startup_ms = 111;
186 DocsUIUserActionReported docs_ui_user_action_reported = 112;
Bookatzda1798c2018-12-13 14:16:00 -0800187 WifiEnabledStateChanged wifi_enabled_state_changed = 113;
188 WifiRunningStateChanged wifi_running_state_changed = 114;
Ben Murdochbab399f62018-12-06 11:01:38 +0000189 AppCompacted app_compacted = 115;
lifre82d8f62019-03-25 20:33:21 +0800190 NetworkDnsEventReported network_dns_event_reported = 116 [(log_from_module) = "resolv"];
shawnlina75e82d2019-01-07 10:31:12 +0800191 DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = 117;
192 DocsUIPickResultReported docs_ui_pick_result_reported = 118;
193 DocsUISearchModeReported docs_ui_search_mode_reported = 119;
194 DocsUISearchTypeReported docs_ui_search_type_reported = 120;
Chiachang Wangf6bedc22019-01-14 11:54:32 +0800195 DataStallEvent data_stall_event = 121;
Christian Brunschenf86039e2018-12-21 12:26:14 +0000196 RescuePartyResetReported rescue_party_reset_reported = 122;
Mathew Inwoodb375be52019-01-04 11:36:25 +0000197 SignedConfigReported signed_config_reported = 123;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -0800198 GnssNiEventReported gnss_ni_event_reported = 124;
Jack Heab86dbd22018-12-18 15:43:27 -0800199 BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = 125;
Jack Hed9837c82019-01-09 01:19:13 -0800200 BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126;
201 BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127;
Felix Lopez Luisd95346a2018-12-12 10:32:32 +0000202 AppDowngraded app_downgraded = 128;
203 AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129;
204 LowStorageStateChanged low_storage_state_changed = 130;
Yu-Han Yang14d5fb42019-01-16 12:42:59 -0800205 GnssNfwNotificationReported gnss_nfw_notification_reported = 131;
206 GnssConfigurationReported gnss_configuration_reported = 132;
Maggie Whitefc1aa592018-11-28 21:55:23 -0800207 UsbPortOverheatEvent usb_port_overheat_event_reported = 133;
Jack Yu95b64f32018-12-13 18:26:11 +0800208 NfcErrorOccurred nfc_error_occurred = 134;
209 NfcStateChanged nfc_state_changed = 135;
210 NfcBeamOccurred nfc_beam_occurred = 136;
211 NfcCardemulationOccurred nfc_cardemulation_occurred = 137;
212 NfcTagOccurred nfc_tag_occurred = 138;
213 NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139;
214 SeStateChanged se_state_changed = 140;
215 SeOmapiReported se_omapi_reported = 141;
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -0800216 BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142;
Alex Saloa060aee2019-01-21 14:36:41 -0800217 AttentionManagerServiceResultReported attention_manager_service_result_reported = 143;
Michael Groover9e7b06e2018-12-28 19:55:51 -0800218 AdbConnectionChanged adb_connection_changed = 144;
Carter Hsub8fd1e92019-01-11 15:24:45 +0800219 SpeechDspStatReported speech_dsp_stat_reported = 145;
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -0800220 UsbContaminantReported usb_contaminant_reported = 146;
Howard Roe103fe22019-01-17 16:52:16 -0800221 WatchdogRollbackOccurred watchdog_rollback_occurred = 147;
Kevin Chyne5a37fb2019-02-08 13:10:36 -0800222 BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148;
Steven Wuacef6bb2019-01-23 14:21:17 -0500223 BubbleUIChanged bubble_ui_changed = 149;
Kweku Adams8845d012018-12-11 20:06:45 -0800224 ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150;
Jack Hec27040a2019-01-09 20:54:41 -0800225 BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151;
226 BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152;
227 BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153;
228 BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154;
229 BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155;
230 BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156;
231 BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157;
232 BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158;
233 BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159;
Jack He1021a612019-01-20 21:22:46 -0800234 BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160;
235 BluetoothQualityReportReported bluetooth_quality_report_reported = 161;
236 BluetoothManufacturerInfoReported bluetooth_device_info_reported = 162;
237 BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163;
238 BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164;
239 BluetoothBondStateChanged bluetooth_bond_state_changed = 165;
240 BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166;
241 BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167;
Alex Salod7c3eef2019-01-25 14:43:27 -0800242 ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168;
Hui Yu885aca12019-01-10 17:11:34 -0800243 ProcessStartTime process_start_time = 169;
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -0800244 PermissionGrantRequestResultReported permission_grant_request_result_reported = 170;
Jack He815cdba2019-01-30 17:24:55 -0800245 BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
Michael Groover4a0ca942019-01-24 17:41:25 -0800246 DeviceIdentifierAccessDenied device_identifier_access_denied = 172;
Steven Wu552f63f2019-02-05 13:41:36 -0500247 BubbleDeveloperErrorReported bubble_developer_error_reported = 173;
joshmccloskey8c3322e2019-01-09 18:25:57 -0800248 AssistGestureStageReported assist_gesture_stage_reported = 174;
249 AssistGestureFeedbackReported assist_gesture_feedback_reported = 175;
250 AssistGestureProgressReported assist_gesture_progress_reported = 176;
Philip Quinn0eded622019-01-29 12:46:28 -0800251 TouchGestureClassified touch_gesture_classified = 177;
Andrei Onea4ad6d0c2019-02-08 13:54:12 +0000252 HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true];
Hyunyoung Song80adf6be2019-01-30 09:59:30 -0800253 StyleUIChanged style_ui_changed = 179;
Fabian Kozynskibfd6d852019-02-15 15:08:16 -0500254 PrivacyIndicatorsInteracted privacy_indicators_interacted = 180;
Carmen Agimof6688a352019-01-30 19:36:04 +0000255 AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181;
Chiachang Wang0e88ebf2019-03-21 10:18:07 +0800256 NetworkStackReported network_stack_reported = 182;
Yao Chend54f9dd2017-10-17 17:37:48 +0000257 }
David Chenc8a43242017-10-17 16:23:28 -0700258
David Chen6e3e6cb2018-01-03 16:14:06 -0800259 // Pulled events will start at field 10000.
Rafal Slawikd4e87572019-03-12 13:08:38 +0000260 // Next: 10057
David Chenc8a43242017-10-17 16:23:28 -0700261 oneof pulled {
David Chen6e3e6cb2018-01-03 16:14:06 -0800262 WifiBytesTransfer wifi_bytes_transfer = 10000;
263 WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
264 MobileBytesTransfer mobile_bytes_transfer = 10002;
265 MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003;
Chenjie Yu9d7720b2018-01-24 10:34:48 -0800266 BluetoothBytesTransfer bluetooth_bytes_transfer = 10006;
David Chen6e3e6cb2018-01-03 16:14:06 -0800267 KernelWakelock kernel_wakelock = 10004;
Chenjie Yuc8b7f222018-01-11 23:25:57 -0800268 SubsystemSleepState subsystem_sleep_state = 10005;
David Chen6e3e6cb2018-01-03 16:14:06 -0800269 CpuTimePerFreq cpu_time_per_freq = 10008;
270 CpuTimePerUid cpu_time_per_uid = 10009;
271 CpuTimePerUidFreq cpu_time_per_uid_freq = 10010;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800272 WifiActivityInfo wifi_activity_info = 10011;
David Chen6e3e6cb2018-01-03 16:14:06 -0800273 ModemActivityInfo modem_activity_info = 10012;
Chenjie Yu9d7720b2018-01-24 10:34:48 -0800274 BluetoothActivityInfo bluetooth_activity_info = 10007;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -0800275 ProcessMemoryState process_memory_state = 10013;
Chenjie Yu9d7720b2018-01-24 10:34:48 -0800276 SystemElapsedRealtime system_elapsed_realtime = 10014;
277 SystemUptime system_uptime = 10015;
Chenjie Yu9da105b2018-01-13 12:41:08 -0800278 CpuActiveTime cpu_active_time = 10016;
279 CpuClusterTime cpu_cluster_time = 10017;
Tej Singh86dc9db2018-09-06 00:39:57 +0000280 DiskSpace disk_space = 10018 [deprecated=true];
Tej Singhbf972d92018-01-10 20:51:13 -0800281 RemainingBatteryCapacity remaining_battery_capacity = 10019;
282 FullBatteryCapacity full_battery_capacity = 10020;
Tej Singh40298312018-02-16 00:15:09 -0800283 Temperature temperature = 10021;
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +0100284 BinderCalls binder_calls = 10022;
Olivier Gaillard9ea238d2018-07-24 10:26:31 +0100285 BinderCallsExceptions binder_calls_exceptions = 10023;
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +0100286 LooperStats looper_stats = 10024;
Tej Singh86dc9db2018-09-06 00:39:57 +0000287 DiskStats disk_stats = 10025;
288 DirectoryUsage directory_usage = 10026;
289 AppSize app_size = 10027;
290 CategorySize category_size = 10028;
Chenjie Yuab530202018-09-26 12:39:20 -0700291 ProcStats proc_stats = 10029;
Bookatz17f0d8a2018-09-13 12:56:32 -0700292 BatteryVoltage battery_voltage = 10030;
joshmccloskey5dcb4082019-02-26 15:28:37 -0800293 NumFingerprintsEnrolled num_fingerprints_enrolled = 10031;
Tej Singhe7726dc2018-09-21 11:42:12 -0700294 DiskIo disk_io = 10032;
Chenjie Yuab530202018-09-26 12:39:20 -0700295 PowerProfile power_profile = 10033;
Chenjie Yuf910b7802019-01-11 16:08:20 -0800296 ProcStatsPkgProc proc_stats_pkg_proc = 10034;
Yangster-mac308ea0c2018-10-22 13:10:25 -0700297 ProcessCpuTime process_cpu_time = 10035;
Rafal Slawik08621582018-10-15 14:53:07 +0100298 NativeProcessMemoryState native_process_memory_state = 10036;
Misha Wagner5a51e002018-10-03 15:04:09 +0100299 CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037;
Bookatz92da2832018-11-01 18:10:03 -0700300 OnDevicePowerMeasurement on_device_power_measurement = 10038;
Bookatz75ee60422018-11-09 12:27:37 -0800301 DeviceCalculatedPowerUse device_calculated_power_use = 10039;
302 DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040;
303 DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041;
Rafal Slawik3bea8952018-11-15 12:39:33 +0000304 ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042;
Tej Singhb1dbc8b2018-11-19 15:49:47 -0800305 BatteryLevel battery_level = 10043;
Bookatz366a4432018-11-20 09:42:33 -0800306 BuildInformation build_information = 10044;
Maggie White8735b852019-01-18 11:40:49 -0800307 BatteryCycleCount battery_cycle_count = 10045;
Olivier Gaillard18d452202019-01-22 15:03:41 +0000308 DebugElapsedClock debug_elapsed_clock = 10046;
309 DebugFailingElapsedClock debug_failing_elapsed_clock = 10047;
joshmccloskey5dcb4082019-02-26 15:28:37 -0800310 NumFacesEnrolled num_faces_enrolled = 10048;
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -0800311 RoleHolder role_holder = 10049;
Philip P. Moltmannf21a3502019-01-30 09:53:04 -0800312 DangerousPermissionState dangerous_permission_state = 10050;
Chenjie Yue13f44a2019-02-07 17:51:38 -0800313 TrainInfo train_info = 10051;
Neil Fullerdb14b482019-02-05 19:44:44 +0000314 TimeZoneDataInfo time_zone_data_info = 10052;
Carmen Agimof12dec122019-03-06 16:14:38 +0000315 ExternalStorageInfo external_storage_info = 10053;
Yiwei Zhang5c81b632019-03-01 15:39:46 -0800316 GpuStatsGlobalInfo gpu_stats_global_info = 10054;
317 GpuStatsAppInfo gpu_stats_app_info = 10055;
Rafal Slawikd4e87572019-03-12 13:08:38 +0000318 SystemIonHeapSize system_ion_heap_size = 10056;
David Chenc8a43242017-10-17 16:23:28 -0700319 }
yroa1fe77c2018-02-26 14:22:54 -0800320
Bookatz76aafcf2018-09-17 16:17:10 -0700321 // DO NOT USE field numbers above 100,000 in AOSP.
322 // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use.
323 // Field numbers 200,000 and above are reserved for future use; do not use them at all.
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700324}
325
Yao Chend54f9dd2017-10-17 17:37:48 +0000326/**
Yangster-mac20877162017-12-22 17:19:39 -0800327 * This proto represents a node of an attribution chain.
328 * Note: All attribution chains are represented as a repeated field of type
329 * AttributionNode. It is understood that in such arrays, the order is that
330 * of calls, that is [A, B, C] if A calls B that calls C.
Yao Chend54f9dd2017-10-17 17:37:48 +0000331 */
Yangster-mac20877162017-12-22 17:19:39 -0800332message AttributionNode {
333 // The uid for a given element in the attribution chain.
Yangster-mac7604aea2017-12-11 22:55:49 -0800334 optional int32 uid = 1;
Yangster-mac7604aea2017-12-11 22:55:49 -0800335
Yangster-mac20877162017-12-22 17:19:39 -0800336 // The (optional) string tag for an element in the attribution chain. If the
337 // element has no tag, it is encoded as an empty string.
338 optional string tag = 2;
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700339}
340
Yangster-mac48b3d622018-08-18 12:38:11 -0700341message KeyValuePair {
342 optional int32 key = 1;
343 oneof value {
Howard Ro4078dd42018-09-27 17:41:08 -0700344 int32 value_int = 2;
345 int64 value_long = 3;
346 string value_str = 4;
347 float value_float = 5;
Yangster-mac48b3d622018-08-18 12:38:11 -0700348 }
349}
350
351message KeyValuePairsAtom {
352 optional int32 uid = 1;
353 repeated KeyValuePair pairs = 2;
354}
355
Yao Chend54f9dd2017-10-17 17:37:48 +0000356/*
357 * *****************************************************************************
yrode4ca102017-11-15 22:57:24 -0800358 * Below are all of the individual atoms that are logged by Android via statsd.
Yao Chend54f9dd2017-10-17 17:37:48 +0000359 *
360 * RULES:
361 * - The field ids for each atom must start at 1, and count upwards by 1.
362 * Skipping field ids is not allowed.
363 * - These form an API, so renaming, renumbering or removing fields is
364 * not allowed between android releases. (This is not currently enforced,
365 * but there will be a tool to enforce this restriction).
366 * - The types must be built-in protocol buffer types, namely, no sub-messages
367 * are allowed (yet). The bytes type is also not allowed.
368 * - The CamelCase name of the message type should match the
Stefan Lafonae2df012017-11-14 09:17:21 -0800369 * underscore_separated name as defined in Atom.
Yao Chend54f9dd2017-10-17 17:37:48 +0000370 * - If an atom represents work that can be attributed to an app, there can
Yangster-mac7604aea2017-12-11 22:55:49 -0800371 * be exactly one AttributionChain field. It must be field number 1.
Yao Chend54f9dd2017-10-17 17:37:48 +0000372 * - A field that is a uid should be a string field, tagged with the [xxx]
373 * annotation. The generated code on android will be represented by UIDs,
374 * and those UIDs will be translated in xxx to those strings.
375 *
376 * CONVENTIONS:
Bookatzc1a050a2017-10-10 15:49:28 -0700377 * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange.
Yao Chend54f9dd2017-10-17 17:37:48 +0000378 * - If there is a UID, it goes first. Think in an object-oriented fashion.
379 * *****************************************************************************
380 */
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700381
Yao Chend54f9dd2017-10-17 17:37:48 +0000382/**
Yangster-mace16189a2018-08-26 12:20:16 -0700383 * Logs when the Thermal service HAL notifies the throttling start/stop events.
384 *
385 * Logged from:
386 * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
387 */
388message ThermalThrottlingStateChanged {
389 optional android.os.TemperatureTypeEnum sensor_type = 1;
390
391 enum State {
392 UNKNOWN = 0;
393 START = 1;
394 STOP = 2;
395 }
396
397 optional State state = 2;
398
399 optional float temperature = 3;
400}
401
402/**
Yao Chend54f9dd2017-10-17 17:37:48 +0000403 * Logs when the screen state changes.
404 *
405 * Logged from:
406 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
407 */
408message ScreenStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -0800409 // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
Yangster-macb6b77c62018-10-12 19:33:24 -0700410 optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE];
Stefan Lafoncdb1a0e2017-09-27 20:24:15 -0700411}
Yao Chend54f9dd2017-10-17 17:37:48 +0000412
413/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700414 * Logs that the process state of the uid, as determined by ActivityManager
415 * (i.e. the highest process state of that uid's processes) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +0000416 *
417 * Logged from:
418 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
419 */
Bookatzc1a050a2017-10-10 15:49:28 -0700420message UidProcessStateChanged {
Yangster-macb6b77c62018-10-12 19:33:24 -0700421 optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true];
Yao Chend54f9dd2017-10-17 17:37:48 +0000422
Bookatzdb026a22018-01-10 19:01:56 -0800423 // The state, from frameworks/base/core/proto/android/app/enums.proto.
Yangster-macb6b77c62018-10-12 19:33:24 -0700424 optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE];
Yao Chend54f9dd2017-10-17 17:37:48 +0000425}
426
427/**
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700428 * Logs process state change of a process, as per the activity manager.
429 *
430 * Logged from:
431 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
432 */
433message ProcessStateChanged {
434 optional int32 uid = 1;
435 optional string process_name = 2;
436 optional string package_name = 3;
437 // TODO: remove this when validation is done
438 optional int64 version = 5;
439 // The state, from frameworks/base/core/proto/android/app/enums.proto.
440 optional android.app.ProcessStateEnum state = 4;
441}
442
443/**
444 * Logs when ActivityManagerService sleep state is changed.
445 *
446 * Logged from:
447 * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java
448 */
449message ActivityManagerSleepStateChanged {
450 // TODO: import frameworks proto
451 enum State {
452 UNKNOWN = 0;
453 ASLEEP = 1;
454 AWAKE = 2;
455 }
Yangster-macb6b77c62018-10-12 19:33:24 -0700456 optional State state = 1 [(state_field_option).option = EXCLUSIVE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700457}
458
459/**
460 * Logs when system memory state changes.
461 *
462 * Logged from:
463 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
464 */
465message MemoryFactorStateChanged {
466 // TODO: import frameworks proto
467 enum State {
468 MEMORY_UNKNOWN = 0;
469 NORMAL = 1; // normal.
470 MODERATE = 2; // moderate memory pressure.
471 LOW = 3; // low memory.
472 CRITICAL = 4; // critical memory.
473
474 }
Yangster-macb6b77c62018-10-12 19:33:24 -0700475 optional State factor = 1 [(state_field_option).option = EXCLUSIVE];
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700476}
477
478/**
479 * Logs when app is using too much cpu, according to ActivityManagerService.
480 *
481 * Logged from:
482 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
483 */
484message ExcessiveCpuUsageReported {
485 optional int32 uid = 1;
486 optional string process_name = 2;
487 optional string package_name = 3;
488 // package version. TODO: remove this when validation is done
489 optional int64 version = 4;
490}
491
492/**
493 * Logs when a cached process is killed, along with its pss.
494 *
495 * Logged from:
496 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
497 */
498message CachedKillReported {
499 optional int32 uid = 1;
500 optional string process_name = 2;
501 optional string package_name = 3;
502 // TODO: remove this when validation is done
503 optional int64 version = 5;
504 optional int64 pss = 4;
505}
506
507/**
508 * Logs when memory stats of a process is reported.
509 *
510 * Logged from:
511 * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
512 */
513message ProcessMemoryStatReported {
514 optional int32 uid = 1;
515 optional string process_name = 2;
516 optional string package_name = 3;
517 //TODO: remove this when validation is done
518 optional int64 version = 9;
519 optional int64 pss = 4;
520 optional int64 uss = 5;
521 optional int64 rss = 6;
522 enum Type {
523 ADD_PSS_INTERNAL_SINGLE = 0;
524 ADD_PSS_INTERNAL_ALL_MEM = 1;
525 ADD_PSS_INTERNAL_ALL_POLL = 2;
526 ADD_PSS_EXTERNAL = 3;
527 ADD_PSS_EXTERNAL_SLOW = 4;
528 }
529 optional Type type = 7;
Muhammad Qureshidda73202019-03-07 13:54:20 -0800530 optional int64 duration_millis = 8;
Chenjie Yubd1a28f2018-07-17 14:55:19 -0700531}
532
533/**
Bookatzc1a050a2017-10-10 15:49:28 -0700534 * Logs that a process started, finished, crashed, or ANRed.
535 *
536 * Logged from:
537 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
538 */
539message ProcessLifeCycleStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -0700540 optional int32 uid = 1 [(is_uid) = true];
Bookatzc1a050a2017-10-10 15:49:28 -0700541
David Chen0b5c90c2018-01-25 16:51:49 -0800542 // The process name (usually same as the app name).
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800543 optional string process_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700544
Bookatzddccf0a2017-11-28 16:48:14 -0800545 // What lifecycle state the process changed to.
546 // This enum is specific to atoms.proto.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800547 enum State {
548 FINISHED = 0;
549 STARTED = 1;
550 CRASHED = 2;
Bookatzddccf0a2017-11-28 16:48:14 -0800551 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800552 optional State state = 3;
Bookatzc1a050a2017-10-10 15:49:28 -0700553}
554
Bookatzc1a050a2017-10-10 15:49:28 -0700555/**
556 * Logs when the ble scan state changes.
557 *
558 * Logged from:
Bookatz17a879d2018-03-28 15:05:28 -0700559 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700560 */
561message BleScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800562 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700563
564 enum State {
565 OFF = 0;
566 ON = 1;
Bookatze5ec0b42018-03-26 13:34:56 -0700567 // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes).
568 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700569 }
570 optional State state = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700571
Bookatze5ec0b42018-03-26 13:34:56 -0700572 // Does the scan have a filter.
573 optional bool is_filtered = 3;
574 // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally.
575 optional bool is_first_match = 4;
576 // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC).
577 optional bool is_opportunistic = 5;
Bookatzc1a050a2017-10-10 15:49:28 -0700578}
579
580/**
581 * Logs reporting of a ble scan finding results.
582 *
583 * Logged from:
Bookatzae6738e2018-09-13 11:38:56 -0700584 * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java
Bookatzc1a050a2017-10-10 15:49:28 -0700585 */
Bookatzae6738e2018-09-13 11:38:56 -0700586// TODO: Consider also tracking per-scanner-id.
Bookatzc1a050a2017-10-10 15:49:28 -0700587message BleScanResultReceived {
Yangster-macafad8c62018-01-05 22:30:49 -0800588 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700589
590 // Number of ble scan results returned.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800591 optional int32 num_results = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700592}
593
594/**
595 * Logs when a sensor state changes.
596 *
597 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700598 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700599 */
600message SensorStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800601 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700602
Bookatzc1a050a2017-10-10 15:49:28 -0700603 // The id (int) of the sensor.
604 optional int32 sensor_id = 2;
605
606 enum State {
607 OFF = 0;
608 ON = 1;
609 }
610 optional State state = 3;
611}
612
Bookatzc1a050a2017-10-10 15:49:28 -0700613/**
614 * Logs when GPS state changes.
615 *
616 * Logged from:
617 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
618 */
619message GpsScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800620 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700621
622 enum State {
623 OFF = 0;
624 ON = 1;
625 }
626 optional State state = 2;
627}
628
Bookatz48d362e2018-11-06 15:49:08 -0800629/**
630 * Logs when GPS signal quality.
631 *
632 * Logged from:
633 * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
634 */
635message GpsSignalQualityChanged {
636 optional android.server.location.GpsSignalQualityEnum level = 1;
637}
638
Bookatzc1a050a2017-10-10 15:49:28 -0700639
640/**
641 * Logs when a sync manager sync state changes.
642 *
643 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700644 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700645 */
646message SyncStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800647 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700648
David Chen0b5c90c2018-01-25 16:51:49 -0800649 // Name of the sync (as named in the app). Can be chosen at run-time.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800650 optional string sync_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700651
652 enum State {
653 OFF = 0;
654 ON = 1;
655 }
656 optional State state = 3;
657}
658
Yangster-mac96353002018-09-05 11:18:55 -0700659/*
660 * Deferred job stats.
661 *
662 * Logged from:
663 * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java
664*/
665message DeferredJobStatsReported {
666 repeated AttributionNode attribution_node = 1;
667
668 // Number of jobs deferred.
669 optional int32 num_jobs_deferred = 2;
670
671 // Time since the last job runs.
672 optional int64 time_since_last_job_millis = 3;
673}
674
Bookatzc1a050a2017-10-10 15:49:28 -0700675/**
676 * Logs when a job scheduler job state changes.
677 *
678 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700679 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700680 */
681message ScheduledJobStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800682 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700683
684 // Name of the job (as named in the app)
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800685 optional string job_name = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700686
687 enum State {
Tej Singhd5747a62018-01-08 20:57:35 -0800688 FINISHED = 0;
689 STARTED = 1;
690 SCHEDULED = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700691 }
692 optional State state = 3;
693
Tej Singh33a412b2018-03-16 18:43:59 -0700694 // The reason a job has stopped.
695 // This is only applicable when the state is FINISHED.
Bookatz235343d2018-03-26 13:03:50 -0700696 // The default value is STOP_REASON_UNKNOWN.
Tej Singh33a412b2018-03-16 18:43:59 -0700697 optional android.app.job.StopReasonEnum stop_reason = 4;
Bookatzc1a050a2017-10-10 15:49:28 -0700698}
699
700/**
701 * Logs when the audio state changes.
702 *
703 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700704 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700705 */
706message AudioStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800707 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700708
709 enum State {
710 OFF = 0;
711 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700712 // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes).
713 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700714 }
715 optional State state = 2;
716}
717
718/**
719 * Logs when the video codec state changes.
720 *
721 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700722 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700723 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800724message MediaCodecStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800725 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700726
727 enum State {
728 OFF = 0;
729 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700730 // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes).
731 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700732 }
733 optional State state = 2;
734}
735
736/**
737 * Logs when the flashlight state changes.
738 *
739 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700740 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700741 */
742message FlashlightStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800743 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700744
745 enum State {
746 OFF = 0;
747 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700748 // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes).
749 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700750 }
751 optional State state = 2;
752}
753
754/**
755 * Logs when the camera state changes.
756 *
757 * Logged from:
Bookatz235343d2018-03-26 13:03:50 -0700758 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
Bookatzc1a050a2017-10-10 15:49:28 -0700759 */
760message CameraStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800761 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700762
763 enum State {
764 OFF = 0;
765 ON = 1;
Bookatz235343d2018-03-26 13:03:50 -0700766 // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes).
767 RESET = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700768 }
769 optional State state = 2;
770}
771
772/**
773 * Logs that the state of a wakelock (per app and per wakelock name) has changed.
Yao Chend54f9dd2017-10-17 17:37:48 +0000774 *
775 * Logged from:
776 * TODO
777 */
Bookatzd6746242017-10-24 18:39:35 -0700778message WakelockStateChanged {
Yangster-mac20877162017-12-22 17:19:39 -0800779 repeated AttributionNode attribution_node = 1;
Yao Chend54f9dd2017-10-17 17:37:48 +0000780
Bookatz1a1b0462018-01-12 11:47:03 -0800781 // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
782 // From frameworks/base/core/proto/android/os/enums.proto.
Yangster-maca8a30442018-10-13 23:46:34 -0700783 optional android.os.WakeLockLevelEnum type = 2;
Bookatzc1a050a2017-10-10 15:49:28 -0700784
785 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
786 optional string tag = 3;
787
788 enum State {
Yangster-maccfdf3a42017-12-06 13:42:38 -0800789 RELEASE = 0;
790 ACQUIRE = 1;
791 CHANGE_RELEASE = 2;
792 CHANGE_ACQUIRE = 3;
Bookatzc1a050a2017-10-10 15:49:28 -0700793 }
794 optional State state = 4;
795}
796
797/**
Bookatzc1a050a2017-10-10 15:49:28 -0700798 * Logs when a partial wakelock is considered 'long' (over 1 min).
799 *
800 * Logged from:
801 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
802 */
803message LongPartialWakelockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -0800804 repeated AttributionNode attribution_node = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700805
Yao Chend54f9dd2017-10-17 17:37:48 +0000806 // The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
807 optional string tag = 2;
808
Bookatzc1a050a2017-10-10 15:49:28 -0700809 // TODO: I have no idea what this is.
810 optional string history_tag = 3;
811
812 enum State {
813 OFF = 0;
814 ON = 1;
815 }
816 optional State state = 4;
Yao Chend54f9dd2017-10-17 17:37:48 +0000817}
818
Bookatzc1a050a2017-10-10 15:49:28 -0700819/**
Bookatza66083f2018-09-20 17:24:00 -0700820 * Logs when the device is interactive, according to the PowerManager Notifier.
821 *
822 * Logged from:
823 * frameworks/base/services/core/java/com/android/server/power/Notifier.java
824 */
825message InteractiveStateChanged {
826 enum State {
827 OFF = 0;
828 ON = 1;
829 }
830 optional State state = 1;
831}
832
833/**
Bookatzc1a050a2017-10-10 15:49:28 -0700834 * Logs Battery Saver state change.
835 *
836 * Logged from:
837 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
838 */
839message BatterySaverModeStateChanged {
840 enum State {
841 OFF = 0;
842 ON = 1;
843 }
844 optional State state = 1;
845}
846
847/**
848 * Logs Doze mode state change.
849 *
850 * Logged from:
Bookatzddccf0a2017-11-28 16:48:14 -0800851 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatzc1a050a2017-10-10 15:49:28 -0700852 */
853message DeviceIdleModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -0800854 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzddccf0a2017-11-28 16:48:14 -0800855}
856
857
858/**
859 * Logs state change of Doze mode including maintenance windows.
860 *
861 * Logged from:
862 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
863 */
864message DeviceIdlingModeStateChanged {
Bookatz8bdae8d2018-01-16 11:24:30 -0800865 optional android.server.DeviceIdleModeEnum state = 1;
Bookatzc1a050a2017-10-10 15:49:28 -0700866}
867
868/**
869 * Logs screen brightness level.
870 *
871 * Logged from:
872 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
873 */
874message ScreenBrightnessChanged {
875 // Screen brightness level. Should be in [-1, 255] according to PowerManager.java.
876 optional int32 level = 1;
Bookatz8c6571b2017-10-24 15:04:41 -0700877}
878
879/**
880 * Logs battery level (percent full, from 0 to 100).
881 *
882 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -0700883 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -0700884 */
885message BatteryLevelChanged {
886 // Battery level. Should be in [0, 100].
887 optional int32 battery_level = 1;
888}
889
890/**
891 * Logs change in charging status of the device.
892 *
893 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -0700894 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -0700895 */
896message ChargingStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -0800897 // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
898 optional android.os.BatteryStatusEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -0700899}
900
901/**
902 * Logs whether the device is plugged in, and what power source it is using.
903 *
904 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -0700905 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -0700906 */
907message PluggedStateChanged {
Bookatz1a1b0462018-01-12 11:47:03 -0800908 // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
909 optional android.os.BatteryPluggedStateEnum state = 1;
Bookatz8c6571b2017-10-24 15:04:41 -0700910}
911
Bookatz8c6571b2017-10-24 15:04:41 -0700912/**
913 * Logs when an app's wakeup alarm fires.
914 *
915 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -0700916 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
Bookatz8c6571b2017-10-24 15:04:41 -0700917 */
918message WakeupAlarmOccurred {
Yangster-macafad8c62018-01-05 22:30:49 -0800919 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -0800920
921 // Name of the wakeup alarm.
922 optional string tag = 2;
Bookatzcaf2293e2018-09-23 13:07:43 -0700923
924 // Name of source package (for historical reasons, since BatteryStats tracked it).
925 optional string package_name = 3;
Bookatzddccf0a2017-11-28 16:48:14 -0800926}
927
928/**
929 * Logs when an an app causes the mobile radio to change state.
930 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio.
931 *
932 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -0700933 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -0800934 */
935message MobileRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800936 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -0800937
Bookatz1a1b0462018-01-12 11:47:03 -0800938 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
939 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatzddccf0a2017-11-28 16:48:14 -0800940}
941
942/**
943 * Logs when an an app causes the wifi radio to change state.
944 * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio.
945 *
946 * Logged from:
Bookatz0b028b12018-05-31 16:51:17 -0700947 * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
Bookatzddccf0a2017-11-28 16:48:14 -0800948 */
949message WifiRadioPowerStateChanged {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -0800950 repeated AttributionNode attribution_node = 1;
Bookatzddccf0a2017-11-28 16:48:14 -0800951
Bookatz1a1b0462018-01-12 11:47:03 -0800952 // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
953 optional android.telephony.DataConnectionPowerStateEnum state = 2;
Bookatz8c6571b2017-10-24 15:04:41 -0700954}
955
956/**
957 * Logs kernel wakeup reasons and aborts.
958 *
959 * Logged from:
Bookatz56585ca2018-09-07 11:38:45 -0700960 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatz8c6571b2017-10-24 15:04:41 -0700961 */
962message KernelWakeupReported {
963 // Name of the kernel wakeup reason (or abort).
964 optional string wakeup_reason_name = 1;
965
966 // Duration (in microseconds) for the wake-up interrupt to be serviced.
David Chen0b5c90c2018-01-25 16:51:49 -0800967 optional int64 duration_micros = 2;
Bookatze5885242017-10-24 20:10:31 -0700968}
969
970/**
Bookatzda1798c2018-12-13 14:16:00 -0800971 * Logs when Wifi is toggled on/off.
Bookatza0a1f8a2018-12-17 12:28:32 -0800972 * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled.
Bookatzda1798c2018-12-13 14:16:00 -0800973 *
974 * Logged from:
975 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
976 */
977message WifiEnabledStateChanged {
978 enum State {
979 OFF = 0;
980 ON = 1;
981 }
982 optional State state = 1;
983}
984
985/**
986 * 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 -0800987 * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'.
988 * Note that Wifi Scanning is monitored separately in WifiScanStateChanged.
Bookatzda1798c2018-12-13 14:16:00 -0800989 *
990 * Logged from:
991 * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
992 */
993message WifiRunningStateChanged {
994 repeated AttributionNode attribution_node = 1;
995
996 enum State {
997 OFF = 0;
998 ON = 1;
999 }
1000 optional State state = 2;
1001}
1002
1003/**
Bookatze5885242017-10-24 20:10:31 -07001004 * Logs wifi locks held by an app.
1005 *
1006 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07001007 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07001008 */
1009message WifiLockStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001010 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001011
1012 enum State {
1013 OFF = 0;
1014 ON = 1;
1015 }
1016 optional State state = 2;
Bookatz11257ca2018-12-05 18:22:39 -08001017
1018 // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto.
1019 optional android.net.wifi.WifiModeEnum mode = 3;
Bookatze5885242017-10-24 20:10:31 -07001020}
1021
1022/**
1023 * Logs wifi signal strength changes.
1024 *
1025 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001026 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java
Bookatze5885242017-10-24 20:10:31 -07001027 */
1028message WifiSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08001029 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
1030 optional android.telephony.SignalStrengthEnum signal_strength = 1;
Bookatze5885242017-10-24 20:10:31 -07001031}
1032
1033/**
1034 * Logs wifi scans performed by an app.
1035 *
1036 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001037 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
Bookatze5885242017-10-24 20:10:31 -07001038 */
1039message WifiScanStateChanged {
Yangster-macafad8c62018-01-05 22:30:49 -08001040 repeated AttributionNode attribution_node = 1;
Bookatze5885242017-10-24 20:10:31 -07001041
1042 enum State {
1043 OFF = 0;
1044 ON = 1;
1045 }
1046 optional State state = 2;
1047}
1048
1049/**
Tej Singh4503e102018-01-04 14:35:01 -08001050 * Logs wifi multicast locks held by an app
1051 *
1052 * Logged from:
Bookatz819ea832018-11-28 16:53:31 -08001053 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java
Tej Singh4503e102018-01-04 14:35:01 -08001054 */
1055message WifiMulticastLockStateChanged {
1056 repeated AttributionNode attribution_node = 1;
1057
1058 enum State {
1059 OFF = 0;
1060 ON = 1;
1061 }
1062 optional State state = 2;
Bookatz819ea832018-11-28 16:53:31 -08001063
1064 optional string tag = 3;
Tej Singh4503e102018-01-04 14:35:01 -08001065}
1066
1067/**
Tej Singh1ea42892018-01-19 09:27:00 -08001068 * Logs shutdown reason and duration on next boot.
1069 *
1070 * Logged from:
1071 * frameworks/base/core/java/com/android/server/BootReceiver.java
1072 */
1073message ShutdownSequenceReported {
1074 // True if shutdown is for a reboot. Default: false if we do not know.
1075 optional bool reboot = 1;
1076
1077 // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>".
1078 optional string reason = 2;
1079
1080 // Beginning of shutdown time in ms using wall clock time since unix epoch.
1081 // Default: 0 if no start time received.
David Chen0b5c90c2018-01-25 16:51:49 -08001082 optional int64 start_time_millis = 3;
Tej Singh1ea42892018-01-19 09:27:00 -08001083
1084 // Duration of shutdown in ms. Default: 0 if no duration received.
David Chen0b5c90c2018-01-25 16:51:49 -08001085 optional int64 duration_millis = 4;
Tej Singh1ea42892018-01-19 09:27:00 -08001086}
1087
Tej Singh6483ea42018-01-25 17:45:49 -08001088
1089/**
1090 * Logs boot reason and duration.
1091 *
1092 * Logged from:
1093 * system/core/bootstat/bootstat.cpp
1094 */
1095message BootSequenceReported {
1096 // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list
1097 // Default: "<EMPTY>" if not available.
1098 optional string bootloader_reason = 1;
1099
1100 // Reason for system boot. Eg. bootloader, reboot,userrequested
1101 // Default: "<EMPTY>" if not available.
1102 optional string system_reason = 2;
1103
1104 // End of boot time in ms from unix epoch using system wall clock.
David Chen0b5c90c2018-01-25 16:51:49 -08001105 optional int64 end_time_millis = 3;
Tej Singh6483ea42018-01-25 17:45:49 -08001106
1107 // Total boot duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001108 optional int64 total_duration_millis = 4;
Tej Singh6483ea42018-01-25 17:45:49 -08001109
1110 // Bootloader duration in ms.
David Chen0b5c90c2018-01-25 16:51:49 -08001111 optional int64 bootloader_duration_millis = 5;
Tej Singh6483ea42018-01-25 17:45:49 -08001112
1113 // Time since last boot in ms. Default: 0 if not available.
1114 optional int64 time_since_last_boot = 6;
1115}
1116
Tej Singhc477d9c2018-02-05 18:31:39 -08001117
1118/**
1119 * Logs call state and disconnect cause (if applicable).
1120 *
1121 * Logged from:
1122 * packages/services/Telecomm/src/com/android/server/telecom/Call.java
1123 */
1124message CallStateChanged {
1125 // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED.
1126 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1127 optional android.telecom.CallStateEnum call_state = 1;
1128
1129 // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY.
1130 // This value is only applicable when the call_state is DISCONNECTED, and
1131 // should always be UNKNOWN if the call_state is not DISCONNECTED.
1132 // From frameworks/base/core/proto/android/telecomm/enums.proto.
1133 optional android.telecom.DisconnectCauseEnum disconnect_cause = 2;
1134
1135 // True if the call is self-managed, which are apps that use the
1136 // telecom infrastructure to make their own calls.
1137 optional bool self_managed = 3;
1138
1139 // True if call is external. External calls are calls on connected Wear
1140 // devices but show up in Telecom so the user can pull them onto the device.
1141 optional bool external_call = 4;
1142}
1143
Tej Singh1ea42892018-01-19 09:27:00 -08001144/**
Tej Singhdd7bd352018-02-09 19:33:15 -08001145 * Logs keyguard state. The keyguard is the lock screen.
1146 *
1147 * Logged from:
1148 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
1149 */
1150message KeyguardStateChanged {
1151 enum State {
1152 UNKNOWN = 0;
1153 // The keyguard is hidden when the phone is unlocked.
1154 HIDDEN = 1;
1155 // The keyguard is shown when the phone is locked (screen turns off).
1156 SHOWN= 2;
1157 // The keyguard is occluded when something is overlaying the keyguard.
1158 // Eg. Opening the camera while on the lock screen.
1159 OCCLUDED = 3;
1160 }
1161 optional State state = 1;
1162}
1163
1164/**
1165 * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and
1166 * prompts the user to enter a password (pattern, pin, etc).
1167 *
1168 * Logged from:
1169 * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
1170 */
1171
1172message KeyguardBouncerStateChanged {
1173 enum State {
1174 UNKNOWN = 0;
1175 // Bouncer is hidden, either as a result of successfully entering the
1176 // password, screen timing out, or user going back to lock screen.
1177 HIDDEN = 1;
1178 // This is when the user is being prompted to enter the password.
1179 SHOWN = 2;
1180 }
1181 optional State state = 1;
1182}
1183
1184/**
1185 * Logs the result of entering a password into the keyguard bouncer.
1186 *
1187 * Logged from:
1188 * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
1189 */
1190message KeyguardBouncerPasswordEntered {
1191 enum BouncerResult {
1192 UNKNOWN = 0;
1193 // The password entered was incorrect.
1194 FAILURE = 1;
1195 // The password entered was correct.
1196 SUCCESS = 2;
1197 }
1198 optional BouncerResult result = 1;
1199}
1200
Tej Singha883b372018-02-15 11:30:01 -08001201/*
1202 * Logs changes to the configuration of the device. The configuration is defined
1203 * in frameworks/base/core/java/android/content/res/Configuration.java
1204 * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html
1205 * Please go there to interpret the possible values each field can be.
1206 *
1207 * Logged from:
1208 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
1209 */
1210message ResourceConfigurationChanged {
1211 // Bit mask of color capabilities of the screen.
1212 // Contains information about the color gamut and hdr mode of the screen.
1213 // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode
Yangster-maca8a30442018-10-13 23:46:34 -07001214 optional int32 color_mode = 1;
Tej Singha883b372018-02-15 11:30:01 -08001215
1216 // The target screen density being rendered to.
1217 // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi
Yangster-maca8a30442018-10-13 23:46:34 -07001218 optional int32 density_dpi = 2;
Tej Singha883b372018-02-15 11:30:01 -08001219
1220 // Current user preference for the scaling factor for fonts,
1221 // relative to the base density scaling.
1222 // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale
Yangster-maca8a30442018-10-13 23:46:34 -07001223 optional float font_scale = 3;
Tej Singha883b372018-02-15 11:30:01 -08001224
1225 // Flag indicating whether the hard keyboard is hidden.
1226 // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001227 optional int32 hard_keyboard_hidden = 4;
Tej Singha883b372018-02-15 11:30:01 -08001228
1229 // The type of keyboard attached to the device.
1230 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard
1231 optional int32 keyboard = 5;
1232
1233 // Flag indicating whether any keyboard is available. Takes soft keyboards into account.
1234 // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001235 optional int32 keyboard_hidden = 6;
Tej Singha883b372018-02-15 11:30:01 -08001236
1237 // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier.
1238 // 0 if undefined.
1239 // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc
1240 optional int32 mcc = 7;
1241
1242 // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier.
1243 // 0 if undefined. Note: the actual MNC may be 0, to check for this use the
1244 // MNC_ZERO symbol defined in Configuration.java.
1245 // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc
1246 optional int32 mnc = 8;
1247
1248 // The kind of navigation available on the device.
1249 // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation
1250 optional int32 navigation = 9;
1251
1252 // Flag indicating whether the navigation is available.
1253 // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden
Yangster-maca8a30442018-10-13 23:46:34 -07001254 optional int32 navigation_hidden = 10;
Tej Singha883b372018-02-15 11:30:01 -08001255
1256 // Overall orientation of the screen.
1257 // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation
1258 optional int32 orientation = 11;
1259
1260 // The current height of the available screen space, in dp units.
1261 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp
Yangster-maca8a30442018-10-13 23:46:34 -07001262 optional int32 screen_height_dp = 12;
Tej Singha883b372018-02-15 11:30:01 -08001263
1264 // Bit mask of overall layout of the screen.
1265 // Contains information about screen size, whether the screen is wider/taller
1266 // than normal, whether the screen layout is right-tl-left or left-to-right,
1267 // and whether the screen has a rounded shape.
1268 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout
Yangster-maca8a30442018-10-13 23:46:34 -07001269 optional int32 screen_layout = 13;
Tej Singha883b372018-02-15 11:30:01 -08001270
1271 // Current width of the available screen space, in dp units.
1272 // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001273 optional int32 screen_width_dp = 14;
Tej Singha883b372018-02-15 11:30:01 -08001274
1275 // The smallest screen size an application will see in normal operation.
1276 // This is the smallest value of both screenWidthDp and screenHeightDp
1277 // in portrait and landscape.
1278 // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
Yangster-maca8a30442018-10-13 23:46:34 -07001279 optional int32 smallest_screen_width_dp = 15;
Tej Singha883b372018-02-15 11:30:01 -08001280
1281 // The type of touch screen attached to the device.
1282 // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen
1283 optional int32 touchscreen = 16;
1284
1285 // Bit mask of the ui mode.
1286 // Contains information about the overall ui mode of the device.
1287 // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET
1288 // Also contains information about whether the device is in night mode.
1289 // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode
Yangster-maca8a30442018-10-13 23:46:34 -07001290 optional int32 ui_mode = 17;
Tej Singha883b372018-02-15 11:30:01 -08001291}
1292
Tej Singheee317b2018-03-07 19:28:05 -08001293
1294/**
1295 * Logs changes in the connection state of the mobile radio.
1296 *
1297 * Logged from:
1298 * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
1299 */
1300message MobileConnectionStateChanged {
1301 // States are from the state machine DataConnection.java.
1302 enum State {
1303 UNKNOWN = 0;
1304 // The connection is inactive, or disconnected.
1305 INACTIVE = 1;
1306 // The connection is being activated, or connecting.
1307 ACTIVATING = 2;
1308 // The connection is active, or connected.
1309 ACTIVE = 3;
1310 // The connection is disconnecting.
1311 DISCONNECTING = 4;
1312 // The connection is disconnecting after creating a connection.
1313 DISCONNECTION_ERROR_CREATING_CONNECTION = 5;
1314 }
1315 optional State state = 1;
1316 // For multi-sim phones, this distinguishes between the sim cards.
1317 optional int32 sim_slot_index = 2;
1318 // Used to identify the connection. Starts at 0 and increments by 1 for
1319 // every new network created. Resets whenever the device reboots.
1320 optional int32 data_connection_id = 3;
1321 // A bitmask for the capabilities of this connection.
1322 // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS.
1323 // Default value (if we have no information): 0
1324 optional int64 capabilities = 4;
1325 // If this connection has internet.
1326 // This just checks if the DEFAULT bit of capabilities is set.
1327 optional bool has_internet = 5;
1328}
1329
1330/**
1331 * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA.
1332 *
1333 * Logged from:
1334 * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
1335 */
1336message MobileRadioTechnologyChanged {
1337 optional android.telephony.NetworkTypeEnum state = 1;
1338 // For multi-sim phones, this distinguishes between the sim cards.
1339 optional int32 sim_slot_index = 2;
1340}
1341
Andrew Chantb56388b2018-03-22 21:07:33 -07001342/**
1343 * Logs the VID and PID of any connected USB devices.
1344 *
1345 * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present.
1346 *
1347 * Logged by Vendor.
1348 */
1349message UsbDeviceAttached {
1350 optional int32 vid = 1;
1351 optional int32 pid = 2;
1352 optional bool has_audio = 3;
1353 optional bool has_hid = 4;
1354 optional bool has_storage = 5;
Badhri Jagan Sridharan5ec629f2018-11-16 15:39:22 -08001355 enum State {
1356 STATE_DISCONNECTED = 0;
1357 STATE_CONNECTED = 1;
1358 }
1359 optional State state = 6;
Badhri Jagan Sridharanc2c54a22018-12-14 14:41:26 -08001360 optional int64 last_connect_duration_millis = 7;
Andrew Chantb56388b2018-03-22 21:07:33 -07001361}
1362
Tej Singheee317b2018-03-07 19:28:05 -08001363
Tej Singhdd7bd352018-02-09 19:33:15 -08001364/**
Tej Singh5d991e12018-03-09 19:48:11 -08001365 * Logs when Bluetooth is enabled and disabled.
1366 *
1367 * Logged from:
1368 * services/core/java/com/android/server/BluetoothManagerService.java
1369 */
1370message BluetoothEnabledStateChanged {
1371 repeated AttributionNode attribution_node = 1;
1372 // Whether or not bluetooth is enabled on the device.
1373 enum State {
1374 UNKNOWN = 0;
1375 ENABLED = 1;
1376 DISABLED = 2;
1377 }
1378 optional State state = 2;
1379 // The reason for being enabled/disabled.
1380 // Eg. Airplane mode, crash, application request.
1381 optional android.bluetooth.EnableDisableReasonEnum reason = 3;
1382 // If the reason is an application request, this will be the package name.
Yangster-maca8a30442018-10-13 23:46:34 -07001383 optional string pkg_name = 4;
Tej Singh5d991e12018-03-09 19:48:11 -08001384}
1385
1386/**
Jack Hed9837c82019-01-09 01:19:13 -08001387 * Logs when profiles on a Bluetooth device connects and disconnects.
Tej Singh5d991e12018-03-09 19:48:11 -08001388 *
1389 * Logged from:
Jack Hed9837c82019-01-09 01:19:13 -08001390 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
1391 *
1392 * Next Tag: 5
Tej Singh5d991e12018-03-09 19:48:11 -08001393 */
1394message BluetoothConnectionStateChanged {
1395 // The state of the connection.
1396 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1397 optional android.bluetooth.ConnectionStateEnum state = 1;
1398 // An identifier that can be used to match connect and disconnect events.
1399 // Currently is last two bytes of a hash of a device level ID and
1400 // the mac address of the bluetooth device that is connected.
Jack Hed9837c82019-01-09 01:19:13 -08001401 // Deprecated: use obfuscated_id instead, this one is always 0 for Q+
1402 optional int32 OBSOLETE_obfuscated_id = 2 [deprecated = true];
Tej Singh5d991e12018-03-09 19:48:11 -08001403 // The profile that is connected. Eg. GATT, A2DP, HEADSET.
1404 // From android.bluetooth.BluetoothAdapter.java
Jack Hed9837c82019-01-09 01:19:13 -08001405 // Default: 0 when not used
Tej Singh5d991e12018-03-09 19:48:11 -08001406 optional int32 bt_profile = 3;
Jack Hed9837c82019-01-09 01:19:13 -08001407 // An identifier that can be used to match events for this device.
1408 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1409 // Salt: Randomly generated 256 bit value
1410 // Hash algorithm: HMAC-SHA256
1411 // Size: 32 byte
1412 // Default: null or empty if the device identifier is not known
1413 optional bytes obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
1414}
1415
1416/**
1417 * Logs when a Bluetooth device connects and disconnects over ACL
1418 *
1419 * Logged from:
1420 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
1421 *
1422 * Next Tag: 3
1423 */
1424message BluetoothAclConnectionStateChanged {
1425 // An identifier that can be used to match events for this device.
1426 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1427 // Salt: Randomly generated 256 bit value
1428 // Hash algorithm: HMAC-SHA256
1429 // Size: 32 byte
1430 // Default: null or empty if the device identifier is not known
1431 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1432 // The state of the connection.
1433 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1434 optional android.bluetooth.ConnectionStateEnum state = 2;
1435}
1436
1437/**
1438 * Logs when a Bluetooth device connects and disconnects over SCO
1439 *
1440 * Logged from:
1441 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
1442 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java
1443 *
1444 * Next Tag: 4
1445 */
1446message BluetoothScoConnectionStateChanged {
1447 // An identifier that can be used to match events for this device.
1448 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1449 // Salt: Randomly generated 256 bit value
1450 // Hash algorithm: HMAC-SHA256
1451 // Size: 32 byte
1452 // Default: null or empty if the device identifier is not known
1453 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1454 // The state of the connection.
1455 // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
1456 optional android.bluetooth.ConnectionStateEnum state = 2;
1457 // Codec used for this SCO connection
1458 // Default: UNKNOWN
1459 optional android.bluetooth.hfp.ScoCodec codec = 3;
Tej Singh5d991e12018-03-09 19:48:11 -08001460}
1461
Jack Hec27040a2019-01-09 20:54:41 -08001462/**
1463 * Logged when active device of a profile changes
1464 *
1465 * Logged from:
1466 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1467 * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java
1468 * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java
1469 */
1470message BluetoothActiveDeviceChanged {
1471 // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID
1472 // From android.bluetooth.BluetoothProfile
1473 optional int32 bt_profile = 1;
1474 // An identifier that can be used to match events for this new active device.
1475 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1476 // Salt: Randomly generated 256 bit value
1477 // Hash algorithm: HMAC-SHA256
1478 // Size: 32 byte
1479 // Default: null or empty if there is no active device for this profile
1480 optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
1481}
1482
Jack Heab86dbd22018-12-18 15:43:27 -08001483// Logs when there is an event affecting Bluetooth device's link layer connection.
1484// - This event is triggered when there is a related HCI command or event
1485// - Users of this metrics can deduce Bluetooth device's connection state from these events
1486// - HCI commands are logged before the command is sent, after receiving command status, and after
1487// receiving command complete
1488// - HCI events are logged when they arrive
1489//
1490// Low level log from system/bt
1491//
1492// Bluetooth classic commands:
1493// - CMD_CREATE_CONNECTION
1494// - CMD_DISCONNECT
1495// - CMD_CREATE_CONNECTION_CANCEL
1496// - CMD_ACCEPT_CONNECTION_REQUEST
1497// - CMD_REJECT_CONNECTION_REQUEST
1498// - CMD_SETUP_ESCO_CONNECTION
1499// - CMD_ACCEPT_ESCO_CONNECTION
1500// - CMD_REJECT_ESCO_CONNECTION
1501// - CMD_ENH_SETUP_ESCO_CONNECTION
1502// - CMD_ENH_ACCEPT_ESCO_CONNECTION
1503//
1504// Bluetooth low energy commands:
1505// - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00]
1506// - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error]
1507// - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00]
1508// - CMD_BLE_CLEAR_WHITE_LIST
1509// - CMD_BLE_ADD_WHITE_LIST
1510// - CMD_BLE_REMOVE_WHITE_LIST
1511//
1512// Bluetooth classic events:
1513// - EVT_CONNECTION_COMP
1514// - EVT_CONNECTION_REQUEST
1515// - EVT_DISCONNECTION_COMP
1516// - EVT_ESCO_CONNECTION_COMP
1517// - EVT_ESCO_CONNECTION_CHANGED
1518//
1519// Bluetooth low energy meta events:
1520// - BLE_EVT_CONN_COMPLETE_EVT
1521// - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT
1522//
1523// Next tag: 10
1524message BluetoothLinkLayerConnectionEvent {
1525 // An identifier that can be used to match events for this device.
1526 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1527 // Salt: Randomly generated 256 bit value
1528 // Hash algorithm: HMAC-SHA256
1529 // Size: 32 byte
1530 // Default: null or empty if the device identifier is not known
1531 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1532 // Connection handle of this connection if available
1533 // Range: 0x0000 - 0x0EFF (12 bits)
1534 // Default: 0xFFFF if the handle is unknown
1535 optional int32 connection_handle = 2;
1536 // Direction of the link
1537 // Default: DIRECTION_UNKNOWN
1538 optional android.bluetooth.DirectionEnum direction = 3;
1539 // Type of this link
1540 // Default: LINK_TYPE_UNKNOWN
1541 optional android.bluetooth.LinkTypeEnum type = 4;
1542
1543 // Reason metadata for this link layer connection event, rules for interpretation:
1544 // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or
1545 // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case
1546 // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is
1547 // set and valid, ignore hci_ble_event
1548
1549 // HCI command associated with this event
1550 // Default: CMD_UNKNOWN
1551 optional android.bluetooth.hci.CommandEnum hci_cmd = 5;
1552 // HCI event associated with this event
1553 // Default: EVT_UNKNOWN
1554 optional android.bluetooth.hci.EventEnum hci_event = 6;
1555 // HCI BLE meta event associated with this event
1556 // Default: BLE_EVT_UNKNOWN
1557 optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7;
1558 // HCI command status code if this is triggerred by hci_cmd
1559 // Default: STATUS_UNKNOWN
1560 optional android.bluetooth.hci.StatusEnum cmd_status = 8;
1561 // HCI reason code associated with this event
1562 // Default: STATUS_UNKNOWN
1563 optional android.bluetooth.hci.StatusEnum reason_code = 9;
1564}
1565
Howard Roe103fe22019-01-17 16:52:16 -08001566/**
1567 * Logs when a module is rolled back by Watchdog.
1568 *
1569 * Logged from: Rollback Manager
1570 */
1571message WatchdogRollbackOccurred {
1572 enum RollbackType {
1573 UNKNOWN = 0;
1574 ROLLBACK_INITIATE = 1;
1575 ROLLBACK_SUCCESS = 2;
1576 ROLLBACK_FAILURE = 3;
Howard Roe4d6fed2019-03-04 16:54:19 -08001577 ROLLBACK_BOOT_TRIGGERED = 4;
Howard Roe103fe22019-01-17 16:52:16 -08001578 }
1579 optional RollbackType rollback_type = 1;
1580
1581 optional string package_name = 2;
1582
1583 optional int32 package_version_code = 3;
1584}
1585
Jack Hec27040a2019-01-09 20:54:41 -08001586/**
1587 * Logs when there is a change in Bluetooth A2DP playback state
1588 *
1589 * Logged from:
1590 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1591 */
1592message BluetoothA2dpPlaybackStateChanged {
1593 // An identifier that can be used to match events for this device.
1594 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1595 // Salt: Randomly generated 256 bit value
1596 // Hash algorithm: HMAC-SHA256
1597 // Size: 32 byte
1598 // Default: null or empty if the device identifier is not known
1599 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1600 // Current playback state
1601 // Default: PLAYBACK_STATE_UNKNOWN
1602 optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2;
1603 // Current audio coding mode
1604 // Default: AUDIO_CODING_MODE_UNKNOWN
1605 optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3;
1606}
1607
1608/**
1609 * Logs when there is a change in A2DP codec config for a particular remote device
1610 *
1611 * Logged from:
1612 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1613 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1614 */
1615message BluetoothA2dpCodecConfigChanged {
1616 // An identifier that can be used to match events for this device.
1617 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1618 // Salt: Randomly generated 256 bit value
1619 // Hash algorithm: HMAC-SHA256
1620 // Size: 32 byte
1621 // Default: null or empty if the device identifier is not known
1622 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1623 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1624 // Default SOURCE_CODEC_TYPE_INVALID
1625 optional int32 codec_type = 2;
1626 // Codec priroity, the higher the more preferred, -1 for disabled
1627 // Default: CODEC_PRIORITY_DEFAULT
1628 optional int32 codec_priority = 3;
1629 // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig
1630 // Default: SAMPLE_RATE_NONE
1631 optional int32 sample_rate = 4;
1632 // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig
1633 // Default: BITS_PER_SAMPLE_NONE
1634 optional int32 bits_per_sample = 5;
1635 // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig
1636 // Default: CHANNEL_MODE_NONE
1637 optional int32 channel_mode = 6;
1638 // Codec specific values
1639 // Default 0
1640 optional int64 codec_specific_1 = 7;
1641 optional int64 codec_specific_2 = 8;
1642 optional int64 codec_specific_3 = 9;
1643 optional int64 codec_specific_4 = 10;
1644}
1645
1646/**
1647 * Logs when there is a change in selectable A2DP codec capability for a paricular remote device
1648 * Each codec's capability is logged separately due to statsd restriction
1649 *
1650 * Logged from:
1651 * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
1652 * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java
1653 */
1654message BluetoothA2dpCodecCapabilityChanged {
1655 // An identifier that can be used to match events for this device.
1656 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1657 // Salt: Randomly generated 256 bit value
1658 // Hash algorithm: HMAC-SHA256
1659 // Size: 32 byte
1660 // Default: null or empty if the device identifier is not known
1661 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1662 // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig
1663 // Default SOURCE_CODEC_TYPE_INVALID
1664 optional int32 codec_type = 2;
1665 // Codec priroity, the higher the more preferred, -1 for disabled
1666 // Default: CODEC_PRIORITY_DEFAULT
1667 optional int32 codec_priority = 3;
1668 // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants
1669 // in BluetoothCodecConfig
1670 // Default: empty and SAMPLE_RATE_NONE for individual item
1671 optional int32 sample_rate = 4;
1672 // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants
1673 // in BluetoothCodecConfig
1674 // Default: empty and BITS_PER_SAMPLE_NONE for individual item
1675 optional int32 bits_per_sample = 5;
1676 // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in
1677 // BluetoothCodecConfig
1678 // Default: empty and CHANNEL_MODE_NONE for individual item
1679 optional int32 channel_mode = 6;
1680 // Codec specific values
1681 // Default 0
1682 optional int64 codec_specific_1 = 7;
1683 optional int64 codec_specific_2 = 8;
1684 optional int64 codec_specific_3 = 9;
1685 optional int64 codec_specific_4 = 10;
1686}
1687
1688/**
1689 * Logs when A2DP failed to read from PCM source.
1690 * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding.
1691 *
1692 * Logged from:
1693 * system/bt
1694 */
1695message BluetoothA2dpAudioUnderrunReported {
1696 // An identifier that can be used to match events for this device.
1697 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1698 // Salt: Randomly generated 256 bit value
1699 // Hash algorithm: HMAC-SHA256
1700 // Size: 32 byte
1701 // Default: null or empty if the device identifier is not known
1702 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1703 // Encoding interval in nanoseconds
1704 // Default: 0
1705 optional int64 encoding_interval_nanos = 2;
1706 // Number of bytes of PCM data that could not be read from the source
1707 // Default: 0
1708 optional int32 num_missing_pcm_bytes = 3;
1709}
1710
1711/**
1712 * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit
1713 * buffer queue is full and we have to drop data
1714 *
1715 * Logged from:
1716 * system/bt
1717 */
1718message BluetoothA2dpAudioOverrunReported {
1719 // An identifier that can be used to match events for this device.
1720 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1721 // Salt: Randomly generated 256 bit value
1722 // Hash algorithm: HMAC-SHA256
1723 // Size: 32 byte
1724 // Default: null or empty if the device identifier is not known
1725 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1726 // Encoding interval in nanoseconds
1727 // Default: 0
1728 optional int64 encoding_interval_nanos = 2;
1729 // Number of buffers dropped in this event
1730 // Each buffer is encoded in one encoding interval and consists of multiple encoded frames
1731 // Default: 0
1732 optional int32 num_dropped_buffers = 3;
1733 // Number of encoded buffers dropped in this event
1734 // Default 0
1735 optional int32 num_dropped_encoded_frames = 4;
1736 // Number of encoded bytes dropped in this event
1737 // Default: 0
1738 optional int32 num_dropped_encoded_bytes = 5;
1739}
1740
1741/**
1742 * Logs when we receive reports regarding a device's RSSI value
1743 *
1744 * Logged from:
1745 * system/bt
1746 */
1747message BluetoothDeviceRssiReported {
1748 // An identifier that can be used to match events for this device.
1749 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1750 // Salt: Randomly generated 256 bit value
1751 // Hash algorithm: HMAC-SHA256
1752 // Size: 32 byte
1753 // Default: null or empty if the device identifier is not known
1754 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1755 // Connection handle of this connection if available
1756 // Range: 0x0000 - 0x0EFF (12 bits)
1757 // Default: 0xFFFF if the handle is unknown
1758 optional int32 connection_handle = 2;
1759 // HCI command status code if this is triggerred by hci_cmd
1760 // Default: STATUS_UNKNOWN
1761 optional android.bluetooth.hci.StatusEnum hci_status = 3;
1762 // BR/EDR
1763 // Range: -128 ≤ N ≤ 127 (signed integer)
1764 // Units: dB
1765 // LE:
1766 // Range: -127 to 20, 127 (signed integer)
1767 // Units: dBm
1768 // Invalid when an out of range value is reported
1769 optional int32 rssi = 4;
1770}
1771
1772/**
1773 * Logs when we receive reports regarding how many consecutive failed contacts for a connection
1774 *
1775 * Logged from:
1776 * system/bt
1777 */
1778message BluetoothDeviceFailedContactCounterReported {
1779 // An identifier that can be used to match events for this device.
1780 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1781 // Salt: Randomly generated 256 bit value
1782 // Hash algorithm: HMAC-SHA256
1783 // Size: 32 byte
1784 // Default: null or empty if the device identifier is not known
1785 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1786 // Connection handle of this connection if available
1787 // Range: 0x0000 - 0x0EFF (12 bits)
1788 // Default: 0xFFFF if the handle is unknown
1789 optional int32 connection_handle = 2;
1790 // HCI command status code if this is triggerred by hci_cmd
1791 // Default: STATUS_UNKNOWN
1792 optional android.bluetooth.hci.StatusEnum cmd_status = 3;
1793 // Number of consecutive failed contacts for a connection corresponding to the Handle
1794 // Range: uint16_t, 0-0xFFFF
1795 // Default: 0xFFFFF
1796 optional int32 failed_contact_counter = 4;
1797}
1798
1799/**
1800 * Logs when we receive reports regarding the tranmit power level used for a specific connection
1801 *
1802 * Logged from:
1803 * system/bt
1804 */
1805message BluetoothDeviceTxPowerLevelReported {
1806 // An identifier that can be used to match events for this device.
1807 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1808 // Salt: Randomly generated 256 bit value
1809 // Hash algorithm: HMAC-SHA256
1810 // Size: 32 byte
1811 // Default: null or empty if the device identifier is not known
1812 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1813 // Connection handle of this connection if available
1814 // Range: 0x0000 - 0x0EFF (12 bits)
1815 // Default: 0xFFFF if the handle is unknown
1816 optional int32 connection_handle = 2;
Jack He1021a612019-01-20 21:22:46 -08001817 // HCI command status code if this is triggered by hci_cmd
Jack Hec27040a2019-01-09 20:54:41 -08001818 // Default: STATUS_UNKNOWN
1819 optional android.bluetooth.hci.StatusEnum hci_status = 3;
1820 // Range: -30 ≤ N ≤ 20
1821 // Units: dBm
1822 // Invalid when an out of range value is reported
1823 optional int32 transmit_power_level = 4;
1824}
Jack Heab86dbd22018-12-18 15:43:27 -08001825
Tej Singh5d991e12018-03-09 19:48:11 -08001826/**
Jack He1021a612019-01-20 21:22:46 -08001827 * Logs when Bluetooth controller failed to reply with command status within a timeout period after
1828 * receiving an HCI command from the host
1829 *
1830 * Logged from: system/bt
1831 */
1832message BluetoothHciTimeoutReported {
1833 // HCI command associated with this event
1834 // Default: CMD_UNKNOWN
1835 optional android.bluetooth.hci.CommandEnum hci_command = 1;
1836}
1837
1838/**
1839 * Logs when we receive Bluetooth Link Quality Report event from the controller
1840 * See Android Bluetooth HCI specification for more details
1841 *
1842 * Note: all count and bytes field are counted since last event
1843 *
1844 * Logged from: system/bt
1845 */
1846message BluetoothQualityReportReported {
1847 // Quality report ID
1848 // Original type: uint8_t
1849 // Default: BQR_ID_UNKNOWN
1850 optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1;
1851 // Packet type of the connection
1852 // Original type: uint8_t
1853 // Default: BQR_PACKET_TYPE_UNKNOWN
1854 optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2;
1855 // Connection handle of the connection
1856 // Original type: uint16_t
1857 optional int32 connection_handle = 3;
1858 // Performing Role for the connection
1859 // Original type: uint8_t
1860 optional int32 connection_role = 4;
1861 // Current Transmit Power Level for the connection. This value is the same as the controller's
1862 // response to the HCI_Read_Transmit_Power_Level HCI command
1863 // Original type: uint8_t
1864 optional int32 tx_power_level = 5;
1865 // Received Signal Strength Indication (RSSI) value for the connection. This value is an
1866 // absolute receiver signal strength value
1867 // Original type: int8_t
1868 optional int32 rssi = 6;
1869 // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the
1870 // channels used by the link currently
1871 // Original type: uint8_t
1872 optional int32 snr = 7;
1873 // Indicates the number of unused channels in AFH_channel_map
1874 // Original type: uint8_t
1875 optional int32 unused_afh_channel_count = 8;
1876 // Indicates the number of the channels which are interfered and quality is bad but are still
1877 // selected for AFH
1878 // Original type: uint8_t
1879 optional int32 afh_select_unideal_channel_count = 9;
1880 // Current Link Supervision Timeout Setting
1881 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
1882 // Original type: uint16_t
1883 optional int32 lsto = 10;
1884 // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's
1885 // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of
1886 // 0x01 (Piconet Clock)
1887 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
1888 // Original type: uint32_t
1889 optional int64 connection_piconet_clock = 11;
1890 // The count of retransmission
1891 // Original type: uint32_t
1892 optional int64 retransmission_count = 12;
1893 // The count of no RX
1894 // Original type: uint32_t
1895 optional int64 no_rx_count = 13;
1896 // The count of NAK (Negative Acknowledge)
1897 // Original type: uint32_t
1898 optional int64 nak_count = 14;
1899 // Controller timestamp of last TX ACK
1900 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
1901 // Original type: uint32_t
1902 optional int64 last_tx_ack_timestamp = 15;
1903 // The count of Flow-off (STOP)
1904 // Original type: uint32_t
1905 optional int64 flow_off_count = 16;
1906 // Controller timestamp of last Flow-on (GO)
1907 // Unit: N * 0.3125 ms (1 Bluetooth Clock)
1908 // Original type: uint32_t
1909 optional int64 last_flow_on_timestamp = 17;
1910 // Buffer overflow count (how many bytes of TX data are dropped) since the last event
1911 // Original type: uint32_t
1912 optional int64 buffer_overflow_bytes = 18;
1913 // Buffer underflow count (in byte) since last event
1914 // Original type: uint32_t
1915 optional int64 buffer_underflow_bytes = 19;
1916}
1917
1918/**
1919 * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack
1920 *
1921 * Notes:
1922 * - Each event can be partially filled as we might learn different pieces of device
1923 * information at different time
1924 * - Multiple device info events can be combined to give more complete picture
1925 * - When multiple device info events tries to describe the same information, the
1926 * later one wins
1927 *
1928 * Logged from:
1929 * packages/apps/Bluetooth
1930 */
1931message BluetoothManufacturerInfoReported {
1932 // An identifier that can be used to match events for this device.
1933 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1934 // Salt: Randomly generated 256 bit value
1935 // Hash algorithm: HMAC-SHA256
1936 // Size: 32 byte
1937 // Default: null or empty if the device identifier is not known
1938 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1939 // Where is this device info obtained from
1940 optional android.bluetooth.DeviceInfoSrcEnum source_type = 2;
1941 // Name of the data source
1942 // For EXTERNAL: package name of the data source
1943 // For INTERNAL: null for general case, component name otherwise
1944 optional string source_name = 3;
1945 // Name of the manufacturer of this device
1946 optional string manufacturer = 4;
1947 // Model of this device
1948 optional string model = 5;
1949 // Hardware version of this device
1950 optional string hardware_version = 6;
1951 // Software version of this device
1952 optional string software_version = 7;
1953}
1954
1955/**
1956 * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote
1957 * device, as documented by the Bluetooth Core HCI specification
1958 * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification
1959 * Vol 2, Part E, Page 1118
1960 *
1961 * Logged from:
1962 * system/bt
1963 */
1964message BluetoothRemoteVersionInfoReported {
1965 // Connection handle of the connection
1966 // Original type: uint16_t
1967 optional int32 connection_handle = 1;
1968 // HCI command status code
1969 // Default: STATUS_UNKNOWN
1970 optional android.bluetooth.hci.StatusEnum hci_status = 2;
1971 // 1 byte Version of current LMP in the remote controller
1972 optional int32 lmp_version = 3;
1973 // 2 bytes LMP manufacturer code of the remote controller
1974 // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
1975 optional int32 lmp_manufacturer_code = 4;
1976 // 4 bytes subversion of the LMP in the remote controller
1977 optional int32 lmp_subversion = 5;
1978}
1979
1980/**
1981 * Logs when certain Bluetooth SDP attributes are discovered
1982 * Constant definitions are from:
1983 * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
1984 *
1985 * Current logged attributes:
1986 * - BluetoothProfileDescriptorList
1987 * - Supported Features Bitmask
1988 *
1989 * Logged from:
1990 * system/bt
1991 */
1992message BluetoothSdpAttributeReported {
1993 // An identifier that can be used to match events for this device.
1994 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
1995 // Salt: Randomly generated 256 bit value
1996 // Hash algorithm: HMAC-SHA256
1997 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
1998 // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes
1999 // Original type: uint16_t
2000 optional int32 protocol_uuid = 2;
2001 // Short form UUIDs used to identify Bluetooth SDP attribute types
2002 // Original type: uint16_t
2003 optional int32 attribute_id = 3;
2004 // Attribute value for the particular attribute
2005 optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES];
2006}
2007
2008/**
2009 * Logs when bond state of a Bluetooth device changes
2010 *
2011 * Logged from:
2012 * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
2013 * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
2014 */
2015message BluetoothBondStateChanged {
2016 // An identifier that can be used to match events for this device.
2017 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2018 // Salt: Randomly generated 256 bit value
2019 // Hash algorithm: HMAC-SHA256
2020 // Size: 32 byte
2021 // Default: null or empty if the device identifier is not known
2022 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2023 // Preferred transport type to remote dual mode device
2024 // Default: TRANSPORT_AUTO means no preference
2025 optional android.bluetooth.TransportTypeEnum transport = 2;
2026 // The type of this Bluetooth device (Classic, LE, or Dual mode)
2027 // Default: UNKNOWN
2028 optional android.bluetooth.DeviceTypeEnum type = 3;
2029 // Current bond state (NONE, BONDING, BONDED)
2030 // Default: BOND_STATE_UNKNOWN
2031 optional android.bluetooth.BondStateEnum bond_state = 4;
2032 // Bonding sub state
2033 // Default: BOND_SUB_STATE_UNKNOWN
2034 optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5;
2035 // Unbond Reason
2036 // Default: UNBOND_REASON_UNKNOWN
2037 optional android.bluetooth.UnbondReasonEnum unbond_reason = 6;
2038}
2039
2040/**
2041 * Logs there is an event related Bluetooth classic pairing
2042 *
2043 * Logged from:
2044 * system/bt
2045 */
2046message BluetoothClassicPairingEventReported {
2047 // An identifier that can be used to match events for this device.
2048 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2049 // Salt: Randomly generated 256 bit value
2050 // Hash algorithm: HMAC-SHA256
2051 // Size: 32 byte
2052 // Default: null or empty if the device identifier is not known
2053 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2054 // Connection handle of this connection if available
2055 // Range: 0x0000 - 0x0EFF (12 bits)
2056 // Default: 0xFFFF if the handle is unknown
2057 optional int32 connection_handle = 2;
2058 // HCI command associated with this event
2059 // Default: CMD_UNKNOWN
2060 optional android.bluetooth.hci.CommandEnum hci_cmd = 3;
2061 // HCI event associated with this event
2062 // Default: EVT_UNKNOWN
2063 optional android.bluetooth.hci.EventEnum hci_event = 4;
2064 // HCI command status code if this is triggerred by hci_cmd
2065 // Default: STATUS_UNKNOWN
2066 optional android.bluetooth.hci.StatusEnum cmd_status = 5;
2067 // HCI reason code associated with this event
2068 // Default: STATUS_UNKNOWN
2069 optional android.bluetooth.hci.StatusEnum reason_code = 6;
Jack He3b259832019-03-20 03:47:29 -07002070 // A status value related to this specific event
2071 // Default: 0
2072 optional int64 event_value = 7;
Jack He1021a612019-01-20 21:22:46 -08002073}
2074
2075/**
2076 * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP)
2077 *
2078 * Logged from:
2079 * system/bt
2080 */
2081message BluetoothSmpPairingEventReported {
2082 // An identifier that can be used to match events for this device.
2083 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2084 // Salt: Randomly generated 256 bit value
2085 // Hash algorithm: HMAC-SHA256
2086 // Size: 32 byte
2087 // Default: null or empty if the device identifier is not known
2088 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
2089 // SMP command sent or received over L2CAP
2090 // Default: CMD_UNKNOWN
2091 optional android.bluetooth.smp.CommandEnum smp_command = 2;
2092 // Whether this command is sent or received
2093 // Default: DIRECTION_UNKNOWN
2094 optional android.bluetooth.DirectionEnum direction = 3;
2095 // SMP failure reason code
2096 // Default: PAIRING_FAIL_REASON_DEFAULT
2097 optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4;
2098}
2099
2100/**
Jack He815cdba2019-01-30 17:24:55 -08002101 * Logs when a Bluetooth socket’s connection state changed
2102 *
2103 * Logged from:
2104 * system/bt
2105 */
2106message BluetoothSocketConnectionStateChanged {
2107 // An identifier that can be used to match events for this device.
2108 // Currently, this is a salted hash of the MAC address of this Bluetooth device.
2109 // Salt: Randomly generated 256 bit value
2110 // Hash algorithm: HMAC-SHA256
2111 // Size: 32 byte
Jack Hee4ae0e72019-02-07 13:52:45 -08002112 // Default: null or empty if this is a server listener socket
Jack He815cdba2019-01-30 17:24:55 -08002113 optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
Jack Hee4ae0e72019-02-07 13:52:45 -08002114 // Temporary port of this socket for the current connection or session only
Jack He815cdba2019-01-30 17:24:55 -08002115 // Default 0 when unknown or don't care
2116 optional int32 port = 2;
2117 // Socket type as mentioned in
2118 // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
2119 // Default: SOCKET_TYPE_UNKNOWN
2120 optional android.bluetooth.SocketTypeEnum type = 3;
2121 // Socket connection state
2122 // Default: SOCKET_CONNECTION_STATE_UNKNOWN
2123 optional android.bluetooth.SocketConnectionstateEnum state = 4;
2124 // Number of bytes sent to remote device during this connection
2125 optional int64 tx_bytes = 5;
2126 // Number of bytes received from remote device during this connection
2127 optional int64 rx_bytes = 6;
Jack Hee4ae0e72019-02-07 13:52:45 -08002128 // Socket owner's UID
2129 optional int32 uid = 7 [(is_uid) = true];
2130 // Server port of this socket, if any. When both |server_port| and |port| fields are populated,
2131 // |port| must be spawned by |server_port|
2132 // Default 0 when unknown or don't care
2133 optional int32 server_port = 8;
2134 // Whether this is a server listener socket
2135 optional android.bluetooth.SocketRoleEnum is_server = 9;
Jack He815cdba2019-01-30 17:24:55 -08002136}
2137
2138/**
Andrew Chant28d627e2018-02-22 15:17:05 -08002139 * Logs when something is plugged into or removed from the USB-C connector.
2140 *
2141 * Logged from:
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002142 * UsbService
Andrew Chant28d627e2018-02-22 15:17:05 -08002143 */
2144message UsbConnectorStateChanged {
2145 enum State {
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002146 STATE_DISCONNECTED = 0;
2147 STATE_CONNECTED = 1;
Andrew Chant28d627e2018-02-22 15:17:05 -08002148 }
2149 optional State state = 1;
Badhri Jagan Sridharan223b3c72018-11-16 16:02:35 -08002150 optional string id = 2;
Badhri Jagan Sridharanfaf62072018-11-16 17:17:03 -08002151 // Last active session in ms.
2152 // 0 when the port is in connected state.
2153 optional int64 last_connect_duration_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002154}
2155
2156/**
2157 * Logs the reported speaker impedance.
2158 *
2159 * Logged from:
2160 * Vendor audio implementation.
2161 */
2162message SpeakerImpedanceReported {
2163 optional int32 speaker_location = 1;
2164 optional int32 impedance = 2;
2165}
2166
2167/**
2168 * Logs the report of a failed hardware.
2169 *
2170 * Logged from:
2171 * Vendor HALs.
2172 *
2173 */
2174message HardwareFailed {
2175 enum HardwareType {
2176 HARDWARE_FAILED_UNKNOWN = 0;
2177 HARDWARE_FAILED_MICROPHONE = 1;
2178 HARDWARE_FAILED_CODEC = 2;
2179 HARDWARE_FAILED_SPEAKER = 3;
2180 HARDWARE_FAILED_FINGERPRINT = 4;
2181 }
2182 optional HardwareType hardware_type = 1;
2183
Maggie White6dcd8572019-01-31 14:11:50 -08002184 /**
2185 * hardware_location allows vendors to differentiate between multiple instances of
Andrew Chant28d627e2018-02-22 15:17:05 -08002186 * the same hardware_type. The specific locations are vendor defined integers,
2187 * referring to board-specific numbering schemes.
2188 */
2189 optional int32 hardware_location = 2;
2190
Maggie White6dcd8572019-01-31 14:11:50 -08002191 /**
2192 * failure_code is specific to the HardwareType of the failed hardware.
2193 * It should use one of the enum values defined below.
Andrew Chant28d627e2018-02-22 15:17:05 -08002194 */
Maggie White6dcd8572019-01-31 14:11:50 -08002195 enum HardwareErrorCode {
2196 UNKNOWN = 0;
2197 COMPLETE = 1;
2198 SPEAKER_HIGH_Z = 2;
2199 SPEAKER_SHORT = 3;
2200 FINGERPRINT_SENSOR_BROKEN = 4;
2201 FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5;
Maggie Whiteb76cebc2019-02-05 15:21:29 -08002202 DEGRADE = 6;
Andrew Chant28d627e2018-02-22 15:17:05 -08002203 }
2204 optional int32 failure_code = 3;
2205}
2206
2207/**
2208 * Log an event when the device has been physically dropped.
2209 * Reported from the /vendor partition.
2210 */
2211message PhysicalDropDetected {
2212 // Confidence that the event was actually a drop, 0 -> 100
2213 optional int32 confidence_pctg = 1;
2214 // Peak acceleration of the drop, in 1/1000s of a g.
2215 optional int32 accel_peak_thousandths_g = 2;
Andrew Chantb56388b2018-03-22 21:07:33 -07002216 // Duration of freefall in ms
2217 optional int32 freefall_time_millis = 3;
Andrew Chant28d627e2018-02-22 15:17:05 -08002218}
2219
2220/**
2221 * Log bucketed battery charge cycles.
2222 *
2223 * Each bucket represents cycles of the battery past
Maggie White38c9d322018-11-20 10:07:52 -08002224 * a given charge point. For example, if 10 cycle buckets are
2225 * initialized, bucket 1 is the lowest 1/10th of the battery,
2226 * and bucket 10 is 100%.
Andrew Chant28d627e2018-02-22 15:17:05 -08002227 *
2228 * Logged from:
2229 * /sys/class/power_supply/bms/cycle_count, via Vendor.
2230 */
2231message ChargeCyclesReported {
2232 optional int32 cycle_bucket_1 = 1;
2233 optional int32 cycle_bucket_2 = 2;
2234 optional int32 cycle_bucket_3 = 3;
2235 optional int32 cycle_bucket_4 = 4;
2236 optional int32 cycle_bucket_5 = 5;
2237 optional int32 cycle_bucket_6 = 6;
2238 optional int32 cycle_bucket_7 = 7;
2239 optional int32 cycle_bucket_8 = 8;
Maggie White38c9d322018-11-20 10:07:52 -08002240 optional int32 cycle_bucket_9 = 9;
2241 optional int32 cycle_bucket_10 = 10;
Andrew Chant28d627e2018-02-22 15:17:05 -08002242}
2243
2244/**
Howard Roa46b6582018-09-18 16:45:02 -07002245 * Log battery health snapshot.
2246 *
2247 * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level
2248 * are snapshotted periodically over 24hrs.
2249 */
2250message BatteryHealthSnapshot {
2251 enum BatterySnapshotType {
2252 UNKNOWN = 0;
2253 MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs.
2254 MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs.
2255 MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs.
2256 MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs.
2257 MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs.
2258 MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs.
2259 MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs.
2260 MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs.
2261 MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs.
2262 MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs.
2263 AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs.
2264 }
2265 optional BatterySnapshotType type = 1;
2266 // Temperature, in 1/10ths of degree C.
Yangster-maca8a30442018-10-13 23:46:34 -07002267 optional int32 temperature_deci_celsius = 2;
Howard Roa46b6582018-09-18 16:45:02 -07002268 // Voltage Battery Voltage, in microVolts.
2269 optional int32 voltage_micro_volt = 3;
2270 // Current Battery current, in microAmps.
2271 optional int32 current_micro_amps = 4;
2272 // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts.
2273 optional int32 open_circuit_micro_volt = 5;
2274 // Resistance Battery Resistance, in microOhms.
2275 optional int32 resistance_micro_ohm = 6;
2276 // Level Battery Level, as % of full.
2277 optional int32 level_percent = 7;
2278}
2279
2280/**
2281 * Log slow I/O operations on the primary storage.
2282 */
2283message SlowIo {
2284 // Classifications of IO Operations.
2285 enum IoOperation {
2286 UNKNOWN = 0;
2287 READ = 1;
2288 WRITE = 2;
2289 UNMAP = 3;
2290 SYNC = 4;
2291 }
2292 optional IoOperation operation = 1;
2293
2294 // The number of slow IO operations of this type over 24 hours.
2295 optional int32 count = 2;
2296}
2297
2298/**
2299 * Log battery caused shutdown with the last recorded voltage.
2300 */
2301message BatteryCausedShutdown {
2302 // The last recorded battery voltage prior to shutdown.
2303 optional int32 last_recorded_micro_volt = 1;
2304}
2305
2306/**
Tej Singhbb8554a2018-01-26 11:59:14 -08002307 * Logs the duration of a davey (jank of >=700ms) when it occurs
2308 *
2309 * Logged from:
2310 * frameworks/base/libs/hwui/JankTracker.cpp
2311 */
2312message DaveyOccurred {
David Chen77ef6712018-02-23 18:23:42 -08002313 // The UID that logged this atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07002314 optional int32 uid = 1 [(is_uid) = true];
David Chen77ef6712018-02-23 18:23:42 -08002315
Tej Singhbb8554a2018-01-26 11:59:14 -08002316 // Amount of time it took to render the frame. Should be >=700ms.
David Chen77ef6712018-02-23 18:23:42 -08002317 optional int64 jank_duration_millis = 2;
Tej Singhbb8554a2018-01-26 11:59:14 -08002318}
2319
2320/**
Bookatze5885242017-10-24 20:10:31 -07002321 * Logs phone signal strength changes.
2322 *
2323 * Logged from:
David Chenc28b2bb2017-10-24 12:52:52 -07002324 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
Bookatze5885242017-10-24 20:10:31 -07002325 */
2326message PhoneSignalStrengthChanged {
Bookatz1a1b0462018-01-12 11:47:03 -08002327 // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
2328 optional android.telephony.SignalStrengthEnum signal_strength = 1;
David Chenc28b2bb2017-10-24 12:52:52 -07002329}
2330
Yangster4ccebea2018-10-09 17:09:02 -07002331
2332/**
2333 * Logs when the phone state, sim state or signal strength changes
2334 *
2335 * Logged from:
2336 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
2337 */
2338message PhoneServiceStateChanged {
2339 optional android.telephony.ServiceStateEnum state = 1;
2340 optional android.telephony.SimStateEnum sim_state = 2;
2341 optional android.telephony.SignalStrengthEnum signal_strength = 3;
2342}
2343
2344/**
2345 * Logs when the phone becomes on or off.
2346 *
2347 * Logged from:
2348 * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java
2349 */
2350message PhoneStateChanged {
2351 enum State {
2352 OFF = 0;
2353 ON = 1;
2354 }
2355 optional State state = 1;
2356}
2357
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002358message LauncherUIChanged {
Yao Chen8c433862018-10-24 14:09:20 -07002359 optional android.stats.launcher.LauncherAction action = 1;
2360 optional android.stats.launcher.LauncherState src_state = 2;
2361 optional android.stats.launcher.LauncherState dst_state = 3;
2362 optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES];
Hyunyoung Songc6d6b772018-10-17 13:35:32 -07002363 optional bool is_swipe_up_enabled = 5;
2364}
2365
Hyunyoung Song80adf6be2019-01-30 09:59:30 -08002366message StyleUIChanged {
2367 optional android.stats.style.Action action = 1;
2368 optional int32 color_package_hash = 2;
2369 optional int32 font_package_hash = 3;
2370 optional int32 shape_package_hash = 4;
2371 optional int32 clock_package_hash = 5;
2372 optional int32 launcher_grid = 6;
2373 optional int32 wallpaper_category_hash = 7;
2374 optional int32 wallpaper_id_hash = 8;
2375}
2376
David Chenc28b2bb2017-10-24 12:52:52 -07002377/**
Fan Zhang916c13b2018-10-16 22:49:45 -07002378 * Logs when Settings UI has changed.
2379 *
2380 * Logged from:
2381 * packages/apps/Settings
2382 */
2383message SettingsUIChanged {
2384 /**
Fan Zhang916c13b2018-10-16 22:49:45 -07002385 * Where this SettingsUIChange event comes from. For example, if
2386 * it's a PAGE_VISIBLE event, where the page is opened from.
2387 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002388 optional android.app.settings.PageId attribution = 1;
Fan Zhang916c13b2018-10-16 22:49:45 -07002389
2390 /**
2391 * What the UI action is.
2392 */
Fan Zhangf837b8e2018-10-23 12:38:30 -07002393 optional android.app.settings.Action action = 2;
Fan Zhang916c13b2018-10-16 22:49:45 -07002394
2395 /**
2396 * Where the action is happening
2397 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002398 optional android.app.settings.PageId page_id = 3;
Fan Zhang916c13b2018-10-16 22:49:45 -07002399
2400 /**
2401 * What preference changed in this event.
2402 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002403 optional string changed_preference_key = 4;
Fan Zhang916c13b2018-10-16 22:49:45 -07002404
2405 /**
2406 * The new value of the changed preference.
2407 */
Fan Zhangff2332b2018-12-06 15:16:41 -08002408 optional int64 changed_preference_int_value = 5;
Fan Zhang916c13b2018-10-16 22:49:45 -07002409}
2410
2411/**
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002412 * Logs basic timing information about touch events.
2413 * Reported at most every 5 minutes while device is being interacted with.
2414 *
2415 * Logged from:
2416 * frameworks/native/services/inputflinger
2417 */
2418message TouchEventReported {
2419 /**
2420 * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean,
2421 * and the standard deviation of latency between the kernel and framework
2422 * for touchscreen events. The units are microseconds.
2423 *
2424 * The number is measured as the difference between the time at which
2425 * the input event was received in the evdev driver,
2426 * and the time at which the input event was received in EventHub.
2427 */
2428 // Minimum value
2429 optional float latency_min_micros = 1;
2430 // Maximum value
2431 optional float latency_max_micros = 2;
2432 // Average value
2433 optional float latency_mean_micros = 3;
2434 // Standard deviation
2435 optional float latency_stdev_micros = 4;
Siarhei Vishniakouca954f92019-03-22 16:41:14 -07002436 // Number of touch events (input_event) in this report
2437 optional int32 count = 5;
Siarhei Vishniakou3ddecff2018-11-08 19:57:13 -08002438}
2439
2440/**
Philip Quinn0eded622019-01-29 12:46:28 -08002441 * Logs gesture classification and timing information for touch events.
2442 *
2443 * Logged from:
2444 * frameworks/base/core/java/android/view/GestureDetector.java
2445 * frameworks/base/core/java/android/view/View.java
2446 */
2447message TouchGestureClassified {
2448 // The source of the classification (e.g. Java class name).
2449 optional string source = 1;
2450
2451 enum Classification {
2452 UNKNOWN_CLASSIFICATION = 0;
2453 SINGLE_TAP = 1;
2454 DOUBLE_TAP = 2;
2455 LONG_PRESS = 3;
2456 DEEP_PRESS = 4;
2457 SCROLL = 5;
2458 }
2459 // The classification of the gesture.
2460 optional Classification classification = 2;
2461
2462 // The interval from the start of a touch event stream until the
2463 // classification was made.
2464 optional int32 latency_millis = 3;
2465
2466 // The distance from the location of the first touch event to the
2467 // location of the touch event when the classification was made.
2468 optional float displacement_px = 4;
2469}
2470
2471/**
David Chenc28b2bb2017-10-24 12:52:52 -07002472 * Logs that a setting was updated.
2473 * Logged from:
David Chenbd789912018-03-16 17:19:55 -07002474 * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
David Chenc28b2bb2017-10-24 12:52:52 -07002475 * The tag and is_default allow resetting of settings to default values based on the specified
2476 * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details.
2477 */
2478message SettingChanged {
2479 // The name of the setting.
2480 optional string setting = 1;
2481
2482 // The change being imposed on this setting. May represent a number, eg "3".
2483 optional string value = 2;
2484
2485 // The new value of this setting. For most settings, this is same as value. For some settings,
2486 // value is +X or -X where X represents an element in a set. For example, if the previous value
2487 // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C.
2488 // The +/- feature is currently only used for location_providers_allowed.
2489 optional string new_value = 3;
2490
2491 // The previous value of this setting.
2492 optional string prev_value = 4;
2493
2494 // The tag used with the is_default for resetting sets of settings. This is generally null.
2495 optional string tag = 5;
2496
Bookatz90867622018-01-31 15:05:57 -08002497 // True if this setting with tag should be resettable.
2498 optional bool is_default = 6;
David Chenc28b2bb2017-10-24 12:52:52 -07002499
David Chenbd789912018-03-16 17:19:55 -07002500 // The associated user (for multi-user feature). Defined in android/os/UserHandle.java
David Chenc28b2bb2017-10-24 12:52:52 -07002501 optional int32 user = 7;
David Chenbd789912018-03-16 17:19:55 -07002502
2503 enum ChangeReason {
2504 UPDATED = 1; // Updated can be an insertion or an update.
2505 DELETED = 2;
2506 }
2507 optional ChangeReason reason = 8;
David Chenc28b2bb2017-10-24 12:52:52 -07002508}
Chenjie Yub3dda412017-10-24 13:41:59 -07002509
Chenjie Yu05013b32017-11-21 10:21:41 -08002510/**
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002511 * Logs activity going to foreground or background
2512 *
2513 * Logged from:
2514 * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java
2515 */
2516message ActivityForegroundStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07002517 optional int32 uid = 1 [(is_uid) = true];
Yangster-mac20877162017-12-22 17:19:39 -08002518 optional string pkg_name = 2;
2519 optional string class_name = 3;
2520
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002521 enum State {
2522 BACKGROUND = 0;
2523 FOREGROUND = 1;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002524 }
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002525 optional State state = 4;
Chenjie Yu3d4f6042017-10-27 15:39:34 -07002526}
David Chenc8a43242017-10-17 16:23:28 -07002527
2528/**
Felix Lopez Luisd95346a2018-12-12 10:32:32 +00002529 * Logs when a volume entered low Storage state.
2530 * Logged from:
2531 * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
2532 */
2533message LowStorageStateChanged {
2534 // Volume that ran out of storage.
2535 optional string volume_description = 1;
2536
2537 enum State {
2538 UNKNOWN = 0;
2539 OFF = 1;
2540 ON = 2;
2541 }
2542 optional State state = 2;
2543}
2544
2545/**
2546 * Logs when an app is downgraded.
2547 * Logged from:
2548 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2549 */
2550message AppDowngraded {
2551 optional string package_name = 1;
2552 // Size of the package (all data) before being downgraded.
2553 optional int64 size_in_bytes_before = 2;
2554 // Size of the package (all data) after being downgraded.
2555 optional int64 size_in_bytes_after = 3;
2556
2557 optional bool aggressive = 4;
2558}
2559
2560/**
2561 * Logs when an app is optimized after being downgraded.
2562 * Logged from:
2563 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java
2564 */
2565message AppOptimizedAfterDowngraded {
2566 optional string package_name = 1;
2567}
2568
2569/**
Carmen Agimof6688a352019-01-30 19:36:04 +00002570 * Logs whenever an app is installed on external storage.
2571 * Logged from:
2572 frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java
2573 */
2574message AppInstallOnExternalStorageReported {
2575 // The type of external storage.
2576 optional android.stats.storage.ExternalStorageType storage_type = 1;
2577 // The name of the package that is installed on the sd card.
2578 optional string package_name = 2;
2579}
2580
2581/**
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002582 * Logs when an app crashes.
David Chen9e3808c2017-11-20 17:25:34 -08002583 * Logged from:
2584 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2585 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002586message AppCrashOccurred {
Yao Chenc40a19d2018-03-15 16:48:25 -07002587 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002588
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002589 optional string event_type = 2;
David Chen9e3808c2017-11-20 17:25:34 -08002590
2591 // The name of the process.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002592 // system_server if it is not by an app
David Chen9e3808c2017-11-20 17:25:34 -08002593 optional string process_name = 3;
2594
2595 // The pid if available. -1 means not available.
David Chen6e3e6cb2018-01-03 16:14:06 -08002596 optional sint32 pid = 4;
Chenjie Yuf17bf62f2018-04-02 14:22:19 -07002597
2598 optional string package_name = 5;
2599
2600 enum InstantApp {
2601 UNAVAILABLE = 0;
2602 FALSE = 1;
2603 TRUE = 2;
2604 }
2605 optional InstantApp is_instant_app = 6;
2606
2607 enum ForegroundState {
2608 UNKNOWN = 0;
2609 BACKGROUND = 1;
2610 FOREGROUND = 2;
2611 }
2612 optional ForegroundState foreground_state = 7;
Yang Lu732d6382018-11-05 07:53:12 -08002613
2614 optional android.server.ErrorSource error_source = 8;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002615}
David Chen9e3808c2017-11-20 17:25:34 -08002616
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002617/**
2618 * Logs when a WTF (What a Terrible Failure) happened.
2619 * Logged from:
2620 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2621 */
2622message WTFOccurred {
2623 optional int32 uid = 1 [(is_uid) = true];
David Chen9e3808c2017-11-20 17:25:34 -08002624
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002625 optional string tag = 2;
David Chen9e3808c2017-11-20 17:25:34 -08002626
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002627 // The name of the process.
2628 // system_server if it is not by an app
2629 optional string process_name = 3;
David Chen6e3e6cb2018-01-03 16:14:06 -08002630
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002631 // The pid if available. -1 means not available.
2632 optional sint32 pid = 4;
Yang Lu732d6382018-11-05 07:53:12 -08002633
2634 optional android.server.ErrorSource error_source = 5;
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002635}
2636
2637/**
2638 * Logs when system server reports low memory.
2639 * Logged from:
2640 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2641 */
2642message LowMemReported {
2643}
2644
2645/**
2646 * Logs when an app ANR (App Not Responding) occurs.
2647 * Logged from:
2648 * frameworks/base/services/core/java/com/android/server/am/AppErrors.java
2649 */
2650message ANROccurred {
2651 optional int32 uid = 1 [(is_uid) = true];
2652
2653 optional string process_name = 2;
2654
2655 optional string short_component_name = 3;
2656
2657 optional string reason = 4;
Chenjie Yuf17bf62f2018-04-02 14:22:19 -07002658
2659 enum InstantApp {
2660 UNAVAILABLE = 0;
2661 FALSE = 1;
2662 TRUE = 2;
2663 }
2664 optional InstantApp is_instant_app = 5;
2665
2666 enum ForegroundState {
2667 UNKNOWN = 0;
2668 BACKGROUND = 1;
2669 FOREGROUND = 2;
2670 }
2671 optional ForegroundState foreground_state = 6;
Yang Lu732d6382018-11-05 07:53:12 -08002672
2673 optional android.server.ErrorSource error_source = 7;
2674
2675 optional string package_name = 8;
David Chen9e3808c2017-11-20 17:25:34 -08002676}
2677
Bookatza7020bd2018-08-28 16:29:35 -07002678/**
2679 * Logs when the vibrator state changes.
2680 * Logged from:
2681 * frameworks/base/services/core/java/com/android/server/VibratorService.java
2682 */
2683message VibratorStateChanged {
2684 repeated AttributionNode attribution_node = 1;
2685
2686 enum State {
2687 OFF = 0;
2688 ON = 1;
2689 }
2690 optional State state = 2;
2691
2692 // Duration (in milliseconds) requested to keep the vibrator on.
2693 // Only applicable for State == ON.
2694 optional int64 duration_millis = 3;
2695}
2696
David Chen0a368b22017-12-06 16:28:16 -08002697/*
2698 * Allows other apps to push events into statsd.
2699 * Logged from:
2700 * frameworks/base/core/java/android/util/StatsLog.java
2701 */
David Chen0b5c90c2018-01-25 16:51:49 -08002702message AppBreadcrumbReported {
David Chen0a368b22017-12-06 16:28:16 -08002703 // The uid of the application that sent this custom atom.
Yao Chenc40a19d2018-03-15 16:48:25 -07002704 optional int32 uid = 1 [(is_uid) = true];
David Chen0a368b22017-12-06 16:28:16 -08002705
2706 // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16).
2707 optional int32 label = 2;
2708
2709 // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom
2710 // predicates for the metrics).
2711 enum State {
2712 UNKNOWN = 0;
2713 UNSPECIFIED = 1; // For events that are known to not represent START/STOP.
2714 STOP = 2;
2715 START = 3;
2716 }
2717 optional State state = 3;
2718}
2719
David Chen9e3808c2017-11-20 17:25:34 -08002720/**
Bookatz7948c872018-09-04 12:58:33 -07002721 * Logs the wall-clock time when a significant wall-clock time shift occurs.
2722 * For example, this could be due to the user manually changing the time.
2723 *
2724 * Logged from:
2725 * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java
2726 */
2727message WallClockTimeShifted {
2728 // New wall-clock time in milliseconds, according to System.currentTimeMillis().
2729 optional int64 wall_clock_timestamp_millis = 1;
2730}
2731
2732/**
Bookatz8fcd09a2017-12-18 13:01:10 -08002733 * Logs when statsd detects an anomaly.
2734 *
2735 * Logged from:
2736 * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp
2737 */
2738message AnomalyDetected {
2739 // Uid that owns the config whose anomaly detection alert fired.
Yao Chenc40a19d2018-03-15 16:48:25 -07002740 optional int32 config_uid = 1 [(is_uid) = true];
Bookatz8fcd09a2017-12-18 13:01:10 -08002741
Yangster-mac94e197c2018-01-02 16:03:03 -08002742 // Id of the config whose anomaly detection alert fired.
2743 optional int64 config_id = 2;
Bookatz8fcd09a2017-12-18 13:01:10 -08002744
Yangster-mac94e197c2018-01-02 16:03:03 -08002745 // Id of the alert (i.e. name of the anomaly that was detected).
2746 optional int64 alert_id = 3;
Bookatz8fcd09a2017-12-18 13:01:10 -08002747}
2748
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002749message AppStartOccurred {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002750 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07002751 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002752
2753 // The app package name.
2754 optional string pkg_name = 2;
2755
2756 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002757 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002758 WARM = 1;
2759 HOT = 2;
2760 COLD = 3;
2761 }
2762 // The transition type.
2763 optional TransitionType type = 3;
2764
2765 // The activity name.
2766 optional string activity_name = 4;
2767
2768 // The name of the calling app. Empty if not set.
2769 optional string calling_pkg_name = 5;
2770
2771 // Whether the app is an instant app.
2772 optional bool is_instant_app = 6;
2773
2774 // Device uptime when activity started.
David Chen0b5c90c2018-01-25 16:51:49 -08002775 optional int64 activity_start_millis = 7;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002776
Bookatz80d11a02018-01-16 10:46:35 -08002777 optional android.app.AppTransitionReasonEnum reason = 8;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002778
David Chen0b5c90c2018-01-25 16:51:49 -08002779 optional int32 transition_delay_millis = 9;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002780 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08002781 optional int32 starting_window_delay_millis = 10;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002782 // -1 if not set.
David Chen0b5c90c2018-01-25 16:51:49 -08002783 optional int32 bind_application_delay_millis = 11;
2784 optional int32 windows_drawn_delay_millis = 12;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002785
2786 // Empty if not set.
2787 optional string launch_token = 13;
2788
Calin Juravle759fbda2018-02-20 19:52:30 +00002789 // The compiler filter used when when the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07002790 optional int32 package_optimization_compilation_filter = 14;
Calin Juravle759fbda2018-02-20 19:52:30 +00002791
2792 // The reason why the package was optimized.
Calin Juravlea86783b2018-03-21 14:25:59 -07002793 optional int32 package_optimization_compilation_reason = 15;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002794}
2795
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002796message AppStartCanceled {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002797 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07002798 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002799
2800 // The app package name.
2801 optional string pkg_name = 2;
2802
2803 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002804 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002805 WARM = 1;
2806 HOT = 2;
2807 COLD = 3;
2808 }
2809 // The transition type.
2810 optional TransitionType type = 3;
2811
2812 // The activity name.
2813 optional string activity_name = 4;
2814}
2815
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002816message AppStartFullyDrawn {
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002817 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07002818 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002819
2820 // The app package name.
2821 optional string pkg_name = 2;
2822
2823 enum TransitionType {
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002824 UNKNOWN = 0;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002825 WITH_BUNDLE = 1;
2826 WITHOUT_BUNDLE = 2;
2827 }
2828 // The transition type.
2829 optional TransitionType type = 3;
2830
2831 // The activity name.
2832 optional string activity_name = 4;
2833
2834 optional bool transition_process_running = 5;
2835
2836 // App startup time (until call to Activity#reportFullyDrawn()).
David Chen0b5c90c2018-01-25 16:51:49 -08002837 optional int64 app_startup_time_millis = 6;
Olivier Gaillardaed7f122017-12-12 14:26:22 +00002838}
2839
Bookatz8fcd09a2017-12-18 13:01:10 -08002840/**
Chenjie Yu52cacc62017-12-08 18:11:45 -08002841 * Logs a picture-in-picture action
2842 * Logged from:
2843 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2844 * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java
2845 * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
2846 */
2847message PictureInPictureStateChanged {
Chenjie Yuae9fdf042018-02-15 10:19:32 -08002848 // -1 if it is not available
Yao Chenc40a19d2018-03-15 16:48:25 -07002849 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu52cacc62017-12-08 18:11:45 -08002850
Chenjie Yuae9fdf042018-02-15 10:19:32 -08002851 optional string short_name = 2;
Chenjie Yu52cacc62017-12-08 18:11:45 -08002852
Chenjie Yu52cacc62017-12-08 18:11:45 -08002853 enum State {
2854 ENTERED = 1;
2855 EXPANDED_TO_FULL_SCREEN = 2;
2856 MINIMIZED = 3;
2857 DISMISSED = 4;
2858 }
Chenjie Yuae9fdf042018-02-15 10:19:32 -08002859 optional State state = 3;
Chenjie Yu52cacc62017-12-08 18:11:45 -08002860}
2861
2862/**
Chenjie Yue8904192017-12-08 19:12:57 -08002863 * Logs overlay action
2864 * Logged from:
2865 * services/core/java/com/android/server/wm/Session.java
2866 */
2867message OverlayStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07002868 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yue8904192017-12-08 19:12:57 -08002869
2870 optional string package_name = 2;
2871
2872 optional bool using_alert_window = 3;
2873
2874 enum State {
2875 ENTERED = 1;
2876 EXITED = 2;
2877 }
2878 optional State state = 4;
2879}
2880
Chenjie Yuccfe6452018-01-30 11:33:21 -08002881/*
2882 * Logs foreground service starts and stops.
2883 * Note that this is not when a service starts or stops, but when it is
2884 * considered foreground.
2885 * Logged from
2886 * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java
2887 */
2888message ForegroundServiceStateChanged {
Yao Chenc40a19d2018-03-15 16:48:25 -07002889 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuccfe6452018-01-30 11:33:21 -08002890 // package_name + "/" + class_name
2891 optional string short_name = 2;
2892
2893 enum State {
2894 ENTER = 1;
2895 EXIT = 2;
2896 }
2897 optional State state = 3;
2898}
2899
Chenjie Yue8904192017-12-08 19:12:57 -08002900/**
Chenjie Yubbcbc602018-02-05 16:51:52 -08002901 * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky
2902 * behavior in its own uid. However, the metrics of these isolated uid's almost always should be
2903 * attributed back to the parent (host) uid. One example is Chrome.
2904 *
2905 * Logged from:
2906 * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
2907 */
2908message IsolatedUidChanged {
2909 // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08002910 // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd.
Bookatz3c648862018-05-25 13:32:43 -07002911 // This field is ignored when event == REMOVED.
Chenjie Yubbcbc602018-02-05 16:51:52 -08002912 optional int32 parent_uid = 1;
2913
2914 optional int32 isolated_uid = 2;
2915
2916 // We expect an isolated uid to be removed before if it's used for another parent uid.
2917 enum Event {
2918 REMOVED = 0;
2919 CREATED = 1;
2920 }
2921 optional Event event = 3;
2922}
2923
2924/*
2925 * Logs the reception of an incoming network packet causing the main system to wake up for
2926 * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd
2927 * and processed by WakeupController.cpp.
2928 */
2929message PacketWakeupOccurred {
2930 // The uid owning the socket into which the packet was delivered, or -1 if the packet was
2931 // delivered nowhere.
Yao Chenc40a19d2018-03-15 16:48:25 -07002932 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08002933 // The interface name on which the packet was received.
2934 optional string iface = 2;
2935 // The ethertype value of the packet.
2936 optional int32 ethertype = 3;
2937 // String representation of the destination MAC address of the packet.
2938 optional string destination_hardware_address = 4;
2939 // String representation of the source address of the packet if this was an IP packet.
2940 optional string source_ip = 5;
2941 // String representation of the destination address of the packet if this was an IP packet.
2942 optional string destination_ip = 6;
2943 // The value of the protocol field if this was an IPv4 packet or the value of the Next Header
2944 // field if this was an IPv6 packet. The range of possible values is the same for both IP
2945 // families.
2946 optional int32 ip_next_header = 7;
2947 // The source port if this was a TCP or UDP packet.
2948 optional int32 source_port = 8;
2949 // The destination port if this was a TCP or UDP packet.
2950 optional int32 destination_port = 9;
2951}
2952
2953/*
2954 * Logs the memory stats for an app on startup.
2955 * Logged from:
2956 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
2957 */
2958message AppStartMemoryStateCaptured {
2959 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07002960 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08002961
2962 // The process name.
2963 optional string process_name = 2;
2964
2965 // The activity name.
2966 optional string activity_name = 3;
2967
2968 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07002969 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08002970
2971 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07002972 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08002973
2974 // RSS
2975 optional int64 rss_in_bytes = 6;
2976
2977 // CACHE
2978 optional int64 cache_in_bytes = 7;
2979
2980 // SWAP
2981 optional int64 swap_in_bytes = 8;
2982}
2983
2984/*
2985 * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries
2986 * for LMK event.
2987 * Logged from:
2988 * system/core/lmkd/lmkd.c
2989 */
2990message LmkStateChanged {
2991 enum State {
2992 UNKNOWN = 0;
2993 START = 1;
2994 STOP = 2;
2995 }
2996 optional State state = 1;
2997}
2998
2999/*
3000 * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure.
3001 * Logged from:
3002 * system/core/lmkd/lmkd.c
3003 */
3004message LmkKillOccurred {
3005 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003006 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yubbcbc602018-02-05 16:51:52 -08003007
3008 // The process name.
3009 optional string process_name = 2;
3010
3011 // oom adj score.
Yangster-maca8a30442018-10-13 23:46:34 -07003012 optional int32 oom_adj_score = 3;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003013
3014 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003015 optional int64 page_fault = 4;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003016
3017 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003018 optional int64 page_major_fault = 5;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003019
3020 // RSS
3021 optional int64 rss_in_bytes = 6;
3022
3023 // CACHE
3024 optional int64 cache_in_bytes = 7;
3025
3026 // SWAP
3027 optional int64 swap_in_bytes = 8;
Jim Blackler8593d1f2018-11-21 15:24:48 +00003028
3029 // The elapsed real time of start of the process.
3030 optional int64 process_start_time_nanos = 9;
Suren Baghdasaryan1fbaa1f2019-03-04 11:09:31 -08003031
3032 // Min oom adj score considered by lmkd.
3033 optional int32 min_oom_score = 10;
Chenjie Yubbcbc602018-02-05 16:51:52 -08003034}
3035
Rajeev Kumar51b54602018-03-01 12:18:26 -08003036/*
3037 * Logs when the ActivityManagerService detects that an app died.
3038 *
3039 * Logged from:
3040 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
3041 */
3042message AppDied {
3043 // timestamp(elapsedRealtime) of record creation
Yangster-macb6b77c62018-10-12 19:33:24 -07003044 optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE];
Rajeev Kumar51b54602018-03-01 12:18:26 -08003045}
3046
Howard Ro21a039c2018-08-06 14:55:47 -07003047/**
3048 * An atom for generic metrics logging. Available from Android Q.
3049 */
3050message GenericAtom {
3051 // The uid of the application that sent this custom atom.
3052 optional int32 uid = 1 [(is_uid) = true];
3053
3054 // An event_id indicates the type of event.
Howard Ro9a862de2018-10-11 16:03:33 -07003055 optional android.stats.EventType event_id = 2;
Howard Ro21a039c2018-08-06 14:55:47 -07003056}
3057
Tej Singhd6d6d772018-09-05 17:41:25 -07003058/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003059 * Logs when a biometric acquire event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003060 *
3061 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003062 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003063 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003064message BiometricAcquired {
3065 // Biometric modality that was acquired.
3066 optional android.hardware.biometrics.ModalityEnum modality = 1;
3067 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java.
3068 optional int32 user = 2;
3069 // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage.
3070 optional bool is_crypto = 3;
3071 // Action that the device is performing. Acquired messages are only expected for enroll and
3072 // authenticate. Other actions may indicate an error.
3073 optional android.hardware.biometrics.ActionEnum action = 4;
3074 // The client that this acquisition was received for.
3075 optional android.hardware.biometrics.ClientEnum client = 5;
3076 // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager.
3077 optional int32 acquire_info = 6;
3078 // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
3079 optional int32 acquire_info_vendor = 7;
Tej Singhd6d6d772018-09-05 17:41:25 -07003080}
3081
3082/**
Kevin Chyn1741a072019-01-17 11:54:40 -08003083 * Logs when a biometric authentication event occurs.
Tej Singhd6d6d772018-09-05 17:41:25 -07003084 *
3085 * Logged from:
Kevin Chyn1741a072019-01-17 11:54:40 -08003086 * frameworks/base/services/core/java/com/android/server/biometrics
Tej Singhd6d6d772018-09-05 17:41:25 -07003087 */
Kevin Chyn1741a072019-01-17 11:54:40 -08003088message BiometricAuthenticated {
3089 // Biometric modality that was used.
3090 optional android.hardware.biometrics.ModalityEnum modality = 1;
3091 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3092 optional int32 user = 2;
3093 // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password
3094 // storage.
3095 optional bool is_crypto = 3;
3096 // The client that this acquisition was received for.
3097 optional android.hardware.biometrics.ClientEnum client = 4;
Kevin Chyndb77e132019-01-29 13:30:41 -08003098 // If authentication requires user confirmation. See BiometricPrompt's
3099 // setRequireConfirmation(bool) method.
3100 optional bool require_confirmation = 5;
Tej Singhd6d6d772018-09-05 17:41:25 -07003101
Kevin Chyn1741a072019-01-17 11:54:40 -08003102 enum State {
Tej Singhd6d6d772018-09-05 17:41:25 -07003103 UNKNOWN = 0;
Kevin Chyn1741a072019-01-17 11:54:40 -08003104 REJECTED = 1;
3105 PENDING_CONFIRMATION = 2;
3106 CONFIRMED = 3;
Tej Singhd6d6d772018-09-05 17:41:25 -07003107 }
Kevin Chyn1741a072019-01-17 11:54:40 -08003108
3109 // State of the current auth attempt.
Kevin Chyndb77e132019-01-29 13:30:41 -08003110 optional State state = 6;
Kevin Chyn1741a072019-01-17 11:54:40 -08003111 // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is
3112 // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to
3113 // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
3114 // CONFIRMED.
Kevin Chyndb77e132019-01-29 13:30:41 -08003115 optional int64 latency_millis = 7;
Kevin Chyn1741a072019-01-17 11:54:40 -08003116}
3117
3118/**
3119 * Logs when a biometric error occurs.
3120 *
3121 * Logged from:
3122 * frameworks/base/services/core/java/com/android/server/biometrics
3123 */
3124message BiometricErrorOccurred {
3125 // Biometric modality that was used.
3126 optional android.hardware.biometrics.ModalityEnum modality = 1;
3127 // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java
3128 optional int32 user = 2;
3129 // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage.
3130 optional bool is_crypto = 3;
3131 // Action that the device is performing.
3132 optional android.hardware.biometrics.ActionEnum action = 4;
3133 // The client that this acquisition was received for.
3134 optional android.hardware.biometrics.ClientEnum client = 5;
3135 // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors
3136 // are unique to modality.
3137 optional int32 error_info = 6;
3138 // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
3139 // by the vendor and not specified by the HIDL interface.
3140 optional int32 error_info_vendor = 7;
3141}
3142
3143/**
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003144 * Logs when a system health issue is detected.
Kevin Chyn1741a072019-01-17 11:54:40 -08003145 * Logged from:
3146 * frameworks/base/services/core/java/com/android/server/biometrics
3147 */
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003148message BiometricSystemHealthIssueDetected {
Kevin Chyn1741a072019-01-17 11:54:40 -08003149 // Biometric modality.
3150 optional android.hardware.biometrics.ModalityEnum modality = 1;
Kevin Chyne5a37fb2019-02-08 13:10:36 -08003151 // Type of issue detected.
3152 optional android.hardware.biometrics.IssueEnum issue = 2;
Tej Singhd6d6d772018-09-05 17:41:25 -07003153}
Howard Ro688ae182018-09-25 00:09:36 -07003154
3155message Notification {
3156
3157 // Type of notification event.
3158 enum Type {
3159 TYPE_UNKNOWN = 0;
3160 // Notification became visible to the user.
3161 TYPE_OPEN = 1;
3162 // Notification became hidden.
3163 TYPE_CLOSE = 2;
3164 // Notification switched to detail mode.
3165 TYPE_DETAIL = 3;
3166 // Notification was clicked.
3167 TYPE_ACTION = 4;
3168 // Notification was dismissed.
3169 TYPE_DISMISS = 5;
3170 // Notification switched to summary mode. The enum value of 14 is to
3171 // match that of metrics_constants.
3172 TYPE_COLLAPSE = 14;
3173 }
3174 optional Type type = 1;
3175
3176 // Package name associated with the notification.
3177 optional string package_name = 2;
3178
3179 // Tag associated with notification.
3180 optional string tag = 3;
3181
3182 // Application-supplied ID associated with the notification.
3183 optional int32 id = 4;
3184
3185 // Index of notification in the notification panel.
3186 optional int32 shade_index = 5;
3187
3188 // The number of notifications in the notification panel.
3189 optional int32 shade_count = 6;
3190
3191 // Importance for the notification.
3192 optional int32 importance = 7;
3193
3194 // ID for the notification channel.
Howard Ro183c2bd2018-10-18 13:52:10 -07003195 optional string channel_id = 8;
Howard Ro688ae182018-09-25 00:09:36 -07003196
3197 // Importance for the notification channel.
3198 optional int32 channel_importance = 9;
3199
Howard Ro183c2bd2018-10-18 13:52:10 -07003200 // Application-supplied ID associated with the notifications group.
3201 optional string group_id = 10;
3202
Howard Ro688ae182018-09-25 00:09:36 -07003203 // Whether notification was a group summary.
Howard Ro183c2bd2018-10-18 13:52:10 -07003204 optional bool group_summary = 11;
Howard Ro688ae182018-09-25 00:09:36 -07003205
Howard Ro183c2bd2018-10-18 13:52:10 -07003206 // Reason for dismissal of a notification. This field is only meaningful for
3207 // TYPE_DISMISS events.
3208 optional int32 dismiss_reason = 12;
Howard Ro688ae182018-09-25 00:09:36 -07003209
Howard Ro183c2bd2018-10-18 13:52:10 -07003210 // The first post time of notification, stable across updates.
3211 optional int64 creation_millis = 13;
Howard Ro688ae182018-09-25 00:09:36 -07003212
Howard Ro183c2bd2018-10-18 13:52:10 -07003213 // The most recent interruption time, or the creation time if no updates.
3214 // Differs from update_millis because updates are filtered based on whether
3215 // they actually interrupted the user.
3216 optional int64 interruption_millis = 14;
Howard Ro688ae182018-09-25 00:09:36 -07003217
Howard Ro183c2bd2018-10-18 13:52:10 -07003218 // The most recent update time, or the creation time if no updates.
3219 optional int64 update_millis = 15;
3220
3221 // The most recent visibility event.
3222 optional int64 visible_millis = 16;
Howard Ro688ae182018-09-25 00:09:36 -07003223}
3224
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003225/*
Tej Singh0d176952019-01-16 19:10:54 -08003226 * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips.
Yangster-macb89807e2018-11-15 21:10:57 -08003227 */
Tej Singh0d176952019-01-16 19:10:54 -08003228message FlagFlipUpdateOccurred {
3229 // If the event is from a flag config package, specify the package name.
3230 optional string flag_flip_package_name = 1;
3231
3232 // The order id of the package
3233 optional int64 order_id = 2;
Yangster-macb89807e2018-11-15 21:10:57 -08003234}
3235
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003236/**
3237 * Potential experiment ids that goes with a train install.
3238 */
3239message TrainExperimentIds {
3240 repeated int64 experiment_id = 1;
3241}
3242
Yangster-macb89807e2018-11-15 21:10:57 -08003243/*
3244 * Logs when a binary push state changes.
Chenjie Yu8366c712019-01-16 20:48:30 -08003245 * Logged by the installer via public api.
Yangster-macb89807e2018-11-15 21:10:57 -08003246 */
3247message BinaryPushStateChanged {
Chenjie Yu8366c712019-01-16 20:48:30 -08003248 // Name of the train.
3249 optional string train_name = 1;
3250 // Version code for a "train" of packages that need to be installed atomically
3251 optional int64 train_version_code = 2;
3252 // After installation of this package, device requires a restart.
3253 optional bool requires_staging = 3;
3254 // Rollback should be enabled for this install.
3255 optional bool rollback_enabled = 4;
3256 // Requires low latency monitoring if possible.
3257 optional bool requires_low_latency_monitor = 5;
3258
Yangster-macb89807e2018-11-15 21:10:57 -08003259 enum State {
Chenjie Yu8366c712019-01-16 20:48:30 -08003260 UNKNOWN = 0;
3261 INSTALL_REQUESTED = 1;
3262 INSTALL_STARTED = 2;
3263 INSTALL_STAGED_NOT_READY = 3;
3264 INSTALL_STAGED_READY = 4;
3265 INSTALL_SUCCESS = 5;
3266 INSTALL_FAILURE = 6;
3267 INSTALL_CANCELLED = 7;
3268 INSTALLER_ROLLBACK_REQUESTED = 8;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08003269 INSTALLER_ROLLBACK_INITIATED = 9;
3270 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
3271 INSTALLER_ROLLBACK_STAGED = 11;
3272 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
3273 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
3274 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
3275 INSTALLER_ROLLBACK_SUCCESS = 15;
3276 INSTALLER_ROLLBACK_FAILURE = 16;
3277 INSTALLER_ROLLBACK_CANCEL_STAGED_REMOVE_FROM_QUEUE = 17;
3278 INSTALLER_ROLLBACK_CANCEL_STAGED_DELETE_SESSION_INITIATED = 18;
3279 INSTALLER_ROLLBACK_CANCEL_STAGED_DELETE_SESSION_SUCCESS = 19;
3280 INSTALLER_ROLLBACK_CANCEL_STAGED_DELETE_SESSION_FAILURE = 20;
Yangster-macb89807e2018-11-15 21:10:57 -08003281 }
Chenjie Yu8366c712019-01-16 20:48:30 -08003282 optional State state = 6;
Chenjie Yu6b1667c2019-01-18 10:09:33 -08003283 // Possible experiment ids for monitoring this push.
3284 optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES];
3285 // user id
3286 optional int32 user_id = 8;
Yangster-macb89807e2018-11-15 21:10:57 -08003287}
3288
Maggie Whitefc1aa592018-11-28 21:55:23 -08003289/** Represents USB port overheat event. */
3290message UsbPortOverheatEvent {
3291 /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */
3292 optional int32 plug_temperature_deci_c = 1;
3293
3294 /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */
3295 optional int32 max_temperature_deci_c = 2;
3296
3297 /* Time between USB plug event and overheat threshold trip, in seconds. */
3298 optional int32 time_to_overheat_secs = 3;
3299
3300 /* Time between overheat threshold trip and hysteresis, in seconds. */
3301 optional int32 time_to_hysteresis_secs = 4;
3302
3303 /* Time between hysteresis and active mitigation ending, in seconds. */
3304 optional int32 time_to_inactive_secs = 5;
3305};
3306
Maggie White8735b852019-01-18 11:40:49 -08003307/**
3308 * Logs total effective full charge and discharge cycles on a battery.
3309 * Here are some examples of one effective cycle:
3310 * 1) the battery charges from 0% to 100% and drains back to 0%,
3311 * 2) charging from 50% to 100% and draining back to 50% twice.
3312 * Pulled from:
3313 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
3314 */
3315message BatteryCycleCount {
3316 /* Number of total charge and discharge cycles on the system battery. */
3317 optional int32 cycle_count = 1;
3318}
3319
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003320/**
Carmen Agimof12dec122019-03-06 16:14:38 +00003321 * Logs that external storage is mounted and information about it, the storage type (sd card/usb/
3322 * others), its type (public or private) and the size in bytes.
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003323 * Pulled from:
3324 * StatsCompanionService
3325 */
3326
Carmen Agimof12dec122019-03-06 16:14:38 +00003327message ExternalStorageInfo {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003328
Carmen Agimof12dec122019-03-06 16:14:38 +00003329 enum VolumeType {
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003330 UNKNOWN = 0;
Carmen Agimof12dec122019-03-06 16:14:38 +00003331 PUBLIC = 1;
3332 PRIVATE = 2;
3333 OTHER = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003334 }
3335
Carmen Agimof12dec122019-03-06 16:14:38 +00003336 // The type of external storage.
3337 optional android.stats.storage.ExternalStorageType storage_type = 1;
3338 // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal.
3339 optional VolumeType volume_type = 2;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003340 // Total size of the sd card in bytes.
Carmen Agimof12dec122019-03-06 16:14:38 +00003341 optional int64 size_bytes = 3;
Carmen Agimof35f7f6f2019-02-05 18:19:21 +00003342}
3343
Yangster-macb89807e2018-11-15 21:10:57 -08003344/*
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003345 * Logs when a connection becomes available and lost.
3346 * Logged in StatsCompanionService.java
3347 */
3348message ConnectivityStateChanged {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003349 // Id of the network.
3350 optional int32 net_id = 1;
3351
3352 enum State {
3353 UNKNOWN = 0;
3354 CONNECTED = 1;
3355 DISCONNECTED = 2;
3356 }
3357 // Connected state of a network.
3358 optional State state = 2;
3359}
3360
3361/**
3362 * Logs when a service starts and stops.
3363 * Logged from:
3364 * services/core/java/com/android/server/am/ActiveServices.java
3365 */
3366message ServiceStateChanged {
3367
3368 optional int32 uid = 1 [(is_uid) = true];
3369
3370 optional string package_name = 2;
3371
3372 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003373
3374 enum State {
Chenjie Yu75b3c492018-10-06 21:45:19 -07003375 START = 1;
3376 STOP = 2;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003377 }
Chenjie Yu75b3c492018-10-06 21:45:19 -07003378
3379 optional State state = 4;
3380}
3381
3382/**
3383 * Logs when a service is launched.
3384 * Logged from:
3385 * services/core/java/com/android/server/am/ActiveServices.java
3386 */
3387message ServiceLaunchReported {
3388
3389 optional int32 uid = 1 [(is_uid) = true];
3390
3391 optional string package_name = 2;
3392
3393 optional string service_name = 3;
Chenjie Yuae9dfac2018-10-25 16:06:56 -07003394}
Howard Ro688ae182018-09-25 00:09:36 -07003395
Andrei Onea4ad6d0c2019-02-08 13:54:12 +00003396/**
3397 * Logs when a hidden API is used.
3398 *
3399 * Logged from:
3400 * libcore/libart/src/main/java/dalvik/system/VMRuntime.java
3401 */
3402message HiddenApiUsed {
3403 // The uid of the app making the hidden access.
3404 optional int32 uid = 1 [(is_uid) = true];
3405
3406 // Signature of the method or field accessed.
3407 optional string signature = 2;
3408
3409 enum AccessMethod {
3410 NONE = 0;
3411 REFLECTION = 1;
3412 JNI = 2;
3413 LINKING = 3;
3414 }
3415
3416 // Type of access.
3417 optional AccessMethod access_method = 3;
3418
3419 // Whether the access was prevented or not.
3420 optional bool access_denied = 4;
3421}
3422
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003423/**
3424 * Logs user interaction with the Privacy Indicators added in Q. In particular:
3425 * - When user sees privacy chip
3426 * - When user clicks privacy chip
3427 * - How does the user exit the Privacy Dialog
3428 * Logged from:
Fabian Kozynskibfd6d852019-02-15 15:08:16 -05003429 * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
3430 */
3431message PrivacyIndicatorsInteracted {
3432
3433 enum Type {
3434 UNKNOWN = 0;
3435 CHIP_VIEWED = 1;
3436 CHIP_CLICKED = 2;
3437 DIALOG_PRIVACY_SETTINGS = 3;
3438 DIALOG_DISMISS = 4;
3439 DIALOG_LINE_ITEM = 5;
3440 }
3441
3442 optional Type type = 1 [(state_field_option).option = EXCLUSIVE];
3443
3444 // Used if the type is LINE_ITEM
3445 optional string package_name = 2;
3446}
3447
Chenjie Yubbcbc602018-02-05 16:51:52 -08003448//////////////////////////////////////////////////////////////////////
3449// Pulled atoms below this line //
3450//////////////////////////////////////////////////////////////////////
3451
3452/**
David Chenc8a43242017-10-17 16:23:28 -07003453 * Pulls bytes transferred via wifi (Sum of foreground and background usage).
3454 *
3455 * Pulled from:
3456 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
3457 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003458message WifiBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07003459 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003460
3461 optional int64 rx_bytes = 2;
3462
3463 optional int64 rx_packets = 3;
3464
3465 optional int64 tx_bytes = 4;
3466
3467 optional int64 tx_packets = 5;
3468}
3469
3470/**
3471 * Pulls bytes transferred via wifi (separated by foreground and background usage).
3472 *
3473 * Pulled from:
3474 * StatsCompanionService (using BatteryStats to get which interfaces are wifi)
3475 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003476message WifiBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07003477 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003478
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003479 // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats.
3480 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07003481
3482 optional int64 rx_bytes = 3;
3483
3484 optional int64 rx_packets = 4;
3485
3486 optional int64 tx_bytes = 5;
3487
3488 optional int64 tx_packets = 6;
3489}
3490
3491/**
3492 * Pulls bytes transferred via mobile networks (Sum of foreground and background usage).
3493 *
3494 * Pulled from:
3495 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
3496 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003497message MobileBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07003498 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003499
3500 optional int64 rx_bytes = 2;
3501
3502 optional int64 rx_packets = 3;
3503
3504 optional int64 tx_bytes = 4;
3505
3506 optional int64 tx_packets = 5;
3507}
3508
3509/**
3510 * Pulls bytes transferred via mobile networks (separated by foreground and background usage).
3511 *
3512 * Pulled from:
3513 * StatsCompanionService (using BatteryStats to get which interfaces are mobile data)
3514 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003515message MobileBytesTransferByFgBg {
Yao Chenc40a19d2018-03-15 16:48:25 -07003516 optional int32 uid = 1 [(is_uid) = true];
David Chenc8a43242017-10-17 16:23:28 -07003517
Yao Chenc40a19d2018-03-15 16:48:25 -07003518 // 1 denotes foreground and 0 denotes background. This is called Set in
3519 // NetworkStats.
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003520 optional bool is_foreground = 2;
David Chenc8a43242017-10-17 16:23:28 -07003521
3522 optional int64 rx_bytes = 3;
3523
3524 optional int64 rx_packets = 4;
3525
3526 optional int64 tx_bytes = 5;
3527
3528 optional int64 tx_packets = 6;
3529}
3530
3531/**
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003532 * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
3533 *
3534 * Pulled from:
3535 * StatsCompanionService
3536 */
3537message BluetoothBytesTransfer {
Yao Chenc40a19d2018-03-15 16:48:25 -07003538 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003539
3540 optional int64 rx_bytes = 2;
3541
3542 optional int64 tx_bytes = 3;
3543}
3544
3545/**
David Chenc8a43242017-10-17 16:23:28 -07003546 * Pulls the kernel wakelock durations. This atom is adapted from
3547 * android/internal/os/KernelWakelockStats.java
3548 *
3549 * Pulled from:
3550 * StatsCompanionService using KernelWakelockReader.
3551 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003552message KernelWakelock {
David Chenc8a43242017-10-17 16:23:28 -07003553 optional string name = 1;
3554
3555 optional int32 count = 2;
3556
3557 optional int32 version = 3;
3558
Yangster-maca8a30442018-10-13 23:46:34 -07003559 optional int64 time_micros = 4;
David Chenc8a43242017-10-17 16:23:28 -07003560}
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003561
Chenjie Yu05013b32017-11-21 10:21:41 -08003562/**
Benjamin Schwartz51329b72018-12-06 10:48:03 -08003563 * Pulls low power state information. If power.stats HAL is not available, this
3564 * includes platform and subsystem sleep state information,
3565 * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState
3566 * as defined in:
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003567 * hardware/interfaces/power/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003568 * hardware/interfaces/power/1.1/types.hal
Benjamin Schwartz51329b72018-12-06 10:48:03 -08003569 * If power.stats HAL is available, this includes PowerEntityStateResidencyResult
3570 * as defined in:
3571 * hardware/interfaces/power/stats/1.0/types.hal
Chenjie Yu5305e1d2017-10-31 13:49:36 -07003572 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003573message SubsystemSleepState {
Chenjie Yubbcbc602018-02-05 16:51:52 -08003574 // Subsystem name
3575 optional string subsystem_name = 1;
3576 // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty.
3577 // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name.
Benjamin Schwartz51329b72018-12-06 10:48:03 -08003578 // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the
3579 // powerEntityStateName from the corresponding PowerEntityStateInfo.
Chenjie Yubbcbc602018-02-05 16:51:52 -08003580 optional string subname = 2;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08003581 // The number of times it entered, or voted for entering the sleep state
Chenjie Yubbcbc602018-02-05 16:51:52 -08003582 optional uint64 count = 3;
Chenjie Yuc8b7f222018-01-11 23:25:57 -08003583 // The length of time spent in, or spent voting for, the sleep state
David Chen0b5c90c2018-01-25 16:51:49 -08003584 optional uint64 time_millis = 4;
David Chen21582962017-11-01 17:32:46 -07003585}
Chenjie Yu7f8def92017-11-03 09:33:15 -07003586
Chenjie Yu05013b32017-11-21 10:21:41 -08003587/**
Bookatz92da2832018-11-01 18:10:03 -07003588 * Pulls on-device power measurement information.
3589 * Data defined by hardware/interfaces/power/stats/1.0/types.hal.
3590 * Pulled from:
3591 * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp
3592 */
3593message OnDevicePowerMeasurement {
3594 // Name of the subsystem (to which the rail belongs).
3595 optional string subsystem_name = 1;
3596
3597 // Rail name. The rail lies within the subsystem.
3598 optional string rail_name = 2;
3599
3600 // Time (in ms since boot) at which the rail energy value was measured.
3601 // This may differ slightly from the time that statsd logs this information.
3602 optional uint64 measurement_timestamp_millis = 3;
3603
3604 // Accumulated energy used via the rail since device boot in uWs.
3605 optional uint64 energy_microwatt_secs = 4;
3606}
3607
3608/**
Chenjie Yu7f8def92017-11-03 09:33:15 -07003609 * Pulls Cpu time per frequency.
Chenjie Yu1ee9b742018-01-10 16:02:57 -08003610 * Pulls the time the cpu spend on the frequency index. Frequency index
3611 * starts from highest to lowest. The value should be monotonically
3612 * increasing since boot. However, if there is a cpu
3613 * hotplug event, the value would be reset as well.
Chenjie Yu7f8def92017-11-03 09:33:15 -07003614 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003615message CpuTimePerFreq {
Chenjie Yu7f8def92017-11-03 09:33:15 -07003616 optional uint32 cluster = 1;
3617 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08003618 optional uint64 time_millis = 3;
Chenjie Yu7f8def92017-11-03 09:33:15 -07003619}
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003620
Chenjie Yu05013b32017-11-21 10:21:41 -08003621/**
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003622 * Pulls Cpu Time Per Uid.
3623 * Note that isolated process uid time should be attributed to host uids.
3624 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003625message CpuTimePerUid {
Yao Chenc40a19d2018-03-15 16:48:25 -07003626 optional int32 uid = 1 [(is_uid) = true];
Misha Wagner6bc6c912018-11-16 13:19:54 +00003627 optional uint64 user_time_micros = 2;
3628 optional uint64 sys_time_micros = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003629}
3630
3631/**
3632 * Pulls Cpu Time Per Uid per frequency.
3633 * Note that isolated process uid time should be attributed to host uids.
3634 * For each uid, we order the time by descending frequencies.
3635 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003636message CpuTimePerUidFreq {
Yao Chenc40a19d2018-03-15 16:48:25 -07003637 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08003638 optional uint32 freq_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08003639 optional uint64 time_millis = 3;
Chenjie Yue33bc3b2017-11-06 17:56:44 -08003640}
Hugo Benichi884970e2017-11-14 22:42:46 +09003641
Chenjie Yu05013b32017-11-21 10:21:41 -08003642/**
3643 * Pulls Wifi Controller Activity Energy Info
3644 */
Chenjie Yu5caaa9d2018-03-06 15:48:54 -08003645message WifiActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08003646 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08003647 optional uint64 timestamp_millis = 1;
Chenjie Yu05013b32017-11-21 10:21:41 -08003648 // stack reported state
3649 // TODO: replace this with proto enum
3650 optional int32 stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07003651 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003652 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07003653 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003654 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07003655 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003656 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08003657 // product of current(mA), voltage(V) and time(ms)
3658 optional uint64 controller_energy_used = 6;
3659}
3660
3661/**
3662 * Pulls Modem Activity Energy Info
3663 */
Chenjie Yu31d14d72017-12-12 17:54:33 -08003664message ModemActivityInfo {
Chenjie Yu05013b32017-11-21 10:21:41 -08003665 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08003666 optional uint64 timestamp_millis = 1;
Yangster-maca8a30442018-10-13 23:46:34 -07003667 // sleep time in millis.
David Chen0b5c90c2018-01-25 16:51:49 -08003668 optional uint64 sleep_time_millis = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07003669 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003670 optional uint64 controller_idle_time_millis = 3;
Chenjie Yu05013b32017-11-21 10:21:41 -08003671 /**
3672 * Tx power index
3673 * index 0 = tx_power < 0dBm
3674 * index 1 = 0dBm < tx_power < 5dBm
3675 * index 2 = 5dBm < tx_power < 15dBm
3676 * index 3 = 15dBm < tx_power < 20dBm
3677 * index 4 = tx_power > 20dBm
3678 */
3679 // tx time in ms at power level 0
David Chen0b5c90c2018-01-25 16:51:49 -08003680 optional uint64 controller_tx_time_pl0_millis = 4;
Chenjie Yu05013b32017-11-21 10:21:41 -08003681 // tx time in ms at power level 1
David Chen0b5c90c2018-01-25 16:51:49 -08003682 optional uint64 controller_tx_time_pl1_millis = 5;
Chenjie Yu05013b32017-11-21 10:21:41 -08003683 // tx time in ms at power level 2
David Chen0b5c90c2018-01-25 16:51:49 -08003684 optional uint64 controller_tx_time_pl2_millis = 6;
Chenjie Yu05013b32017-11-21 10:21:41 -08003685 // tx time in ms at power level 3
David Chen0b5c90c2018-01-25 16:51:49 -08003686 optional uint64 controller_tx_time_pl3_millis = 7;
Chenjie Yu05013b32017-11-21 10:21:41 -08003687 // tx time in ms at power level 4
David Chen0b5c90c2018-01-25 16:51:49 -08003688 optional uint64 controller_tx_time_pl4_millis = 8;
Chenjie Yu05013b32017-11-21 10:21:41 -08003689 // rx time in ms at power level 5
David Chen0b5c90c2018-01-25 16:51:49 -08003690 optional uint64 controller_rx_time_millis = 9;
Chenjie Yu05013b32017-11-21 10:21:41 -08003691 // product of current(mA), voltage(V) and time(ms)
3692 optional uint64 energy_used = 10;
Joe Onorato62c220b2017-11-18 20:32:56 -08003693}
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08003694
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003695/**
3696 * Pulls Bluetooth Activity Energy Info
3697 * Note: BluetoothBytesTransfer is pulled at the same time from the controller.
3698 */
3699message BluetoothActivityInfo {
3700 // timestamp(wall clock) of record creation
David Chen0b5c90c2018-01-25 16:51:49 -08003701 optional uint64 timestamp_millis = 1;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003702 // bluetooth stack state
3703 optional int32 bluetooth_stack_state = 2;
Yangster-maca8a30442018-10-13 23:46:34 -07003704 // tx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003705 optional uint64 controller_tx_time_millis = 3;
Yangster-maca8a30442018-10-13 23:46:34 -07003706 // rx time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003707 optional uint64 controller_rx_time_millis = 4;
Yangster-maca8a30442018-10-13 23:46:34 -07003708 // idle time in millis
David Chen0b5c90c2018-01-25 16:51:49 -08003709 optional uint64 controller_idle_time_millis = 5;
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003710 // product of current(mA), voltage(V) and time(ms)
3711 optional uint64 energy_used = 6;
3712}
3713
Rajeev Kumar508a9bf2018-01-18 15:49:11 -08003714/*
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003715 * Logs the memory stats for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00003716 *
3717 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService).
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003718 */
3719message ProcessMemoryState {
3720 // The uid if available. -1 means not available.
Yao Chenc40a19d2018-03-15 16:48:25 -07003721 optional int32 uid = 1 [(is_uid) = true];
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003722
3723 // The process name.
Rafal Slawikda51b932018-12-13 16:31:33 +00003724 // Usually package name, "system" for system server.
3725 // Provided by ActivityManagerService.
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003726 optional string process_name = 2;
3727
Rafal Slawikda51b932018-12-13 16:31:33 +00003728 // Current OOM score adjustment. Value read from ProcessRecord.
Yangster-maca8a30442018-10-13 23:46:34 -07003729 optional int32 oom_adj_score = 3;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003730
3731 // # of page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003732 optional int64 page_fault = 4;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003733
3734 // # of major page-faults
Yangster-maca8a30442018-10-13 23:46:34 -07003735 optional int64 page_major_fault = 5;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003736
Rajeev Kumar90235992018-01-29 11:06:48 -08003737 // RSS
Rafal Slawikda51b932018-12-13 16:31:33 +00003738 // Value is read from /proc/PID/stat, field 24. Or from memory.stat, field
3739 // total_rss if per-app memory cgroups are enabled.
Rajeev Kumar90235992018-01-29 11:06:48 -08003740 optional int64 rss_in_bytes = 6;
3741
3742 // CACHE
Rafal Slawikda51b932018-12-13 16:31:33 +00003743 // Value is read from memory.stat, field total_cache if per-app memory
3744 // cgroups are enabled. Otherwise, 0.
Rajeev Kumar90235992018-01-29 11:06:48 -08003745 optional int64 cache_in_bytes = 7;
3746
3747 // SWAP
Rafal Slawikda51b932018-12-13 16:31:33 +00003748 // Value is read from memory.stat, field total_swap if per-app memory
3749 // cgroups are enabled. Otherwise, 0.
Rajeev Kumar90235992018-01-29 11:06:48 -08003750 optional int64 swap_in_bytes = 8;
Rafal Slawikaaf60892018-09-12 13:04:30 +01003751
Rafal Slawikd03ae422018-11-20 11:27:45 +00003752 // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
Rafal Slawik3bea8952018-11-15 12:39:33 +00003753 optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true];
Rafal Slawik272a8162018-11-01 15:12:28 +00003754
3755 // Elapsed real time when the process started.
3756 // Value is read from /proc/PID/stat, field 22. 0 if read from per-app memory cgroups.
3757 optional int64 start_time_nanos = 10;
Rajeev Kumar8a9fa052018-01-25 19:03:09 -08003758}
3759
3760/*
Rafal Slawik08621582018-10-15 14:53:07 +01003761 * Logs the memory stats for a native process (from procfs).
Rafal Slawikda51b932018-12-13 16:31:33 +00003762 *
3763 * Pulled from StatsCompanionService for selected native processes.
Rafal Slawik08621582018-10-15 14:53:07 +01003764 */
3765message NativeProcessMemoryState {
Rafal Slawikbf67d072018-10-23 11:07:54 +01003766 // The uid if available. -1 means not available.
3767 optional int32 uid = 1 [(is_uid) = true];
Rafal Slawik08621582018-10-15 14:53:07 +01003768
Rafal Slawikbf67d072018-10-23 11:07:54 +01003769 // The process name.
Rafal Slawikda51b932018-12-13 16:31:33 +00003770 // Value read from /proc/PID/cmdline.
Rafal Slawikbf67d072018-10-23 11:07:54 +01003771 optional string process_name = 2;
Rafal Slawik08621582018-10-15 14:53:07 +01003772
Rafal Slawikbf67d072018-10-23 11:07:54 +01003773 // # of page-faults
3774 optional int64 page_fault = 3;
Rafal Slawik08621582018-10-15 14:53:07 +01003775
Rafal Slawikbf67d072018-10-23 11:07:54 +01003776 // # of major page-faults
3777 optional int64 page_major_fault = 4;
Rafal Slawik08621582018-10-15 14:53:07 +01003778
Rafal Slawikbf67d072018-10-23 11:07:54 +01003779 // RSS
Rafal Slawikda51b932018-12-13 16:31:33 +00003780 // Value read from /proc/PID/stat, field 24.
Rafal Slawikbf67d072018-10-23 11:07:54 +01003781 optional int64 rss_in_bytes = 5;
Rafal Slawik08621582018-10-15 14:53:07 +01003782
Rafal Slawikd03ae422018-11-20 11:27:45 +00003783 // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
Rafal Slawik3bea8952018-11-15 12:39:33 +00003784 optional int64 rss_high_watermark_in_bytes = 6 [deprecated = true];
Rafal Slawikbf67d072018-10-23 11:07:54 +01003785
3786 // Elapsed real time when the process started.
3787 // Value is read from /proc/PID/stat, field 22.
3788 optional int64 start_time_nanos = 7;
Rafal Slawik08621582018-10-15 14:53:07 +01003789}
3790
3791/*
Rafal Slawik3bea8952018-11-15 12:39:33 +00003792 * Logs the memory high-water mark for a process.
Rafal Slawikda51b932018-12-13 16:31:33 +00003793 *
3794 * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie)
3795 * and for selected native processes.
Rafal Slawik44b88142018-12-15 16:48:09 +00003796 *
3797 * Pulling this atom resets high-water mark counters for all processes.
Rafal Slawik3bea8952018-11-15 12:39:33 +00003798 */
3799message ProcessMemoryHighWaterMark {
3800 // The uid if available. -1 means not available.
3801 optional int32 uid = 1 [(is_uid) = true];
3802
Rafal Slawikda51b932018-12-13 16:31:33 +00003803 // The process name.
3804 // Usually package name or process cmdline.
3805 // Provided by ActivityManagerService or read from /proc/PID/cmdline.
Rafal Slawik3bea8952018-11-15 12:39:33 +00003806 optional string process_name = 2;
3807
3808 // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in
3809 // /proc/PID/status.
3810 optional int64 rss_high_water_mark_in_bytes = 3;
3811}
3812
3813/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003814 * Elapsed real time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08003815 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003816message SystemElapsedRealtime {
David Chen0b5c90c2018-01-25 16:51:49 -08003817 optional uint64 time_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08003818}
3819
3820/*
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003821 * Up time from SystemClock.
Chenjie Yu9da105b2018-01-13 12:41:08 -08003822 */
Chenjie Yu9d7720b2018-01-24 10:34:48 -08003823message SystemUptime {
3824 // Milliseconds since the system was booted.
3825 // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
3826 // for external input).
3827 // It is not affected by clock scaling, idle, or other power saving mechanisms.
David Chen0b5c90c2018-01-25 16:51:49 -08003828 optional uint64 uptime_millis = 1;
Chenjie Yu9da105b2018-01-13 12:41:08 -08003829}
3830
3831/*
3832 * Reads from /proc/uid_concurrent_active_time which has the format:
3833 * active: X (X is # cores)
3834 * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores)
3835 * [uid1]: [time-0] [time-1] [time-2] ... ...
3836 * ...
3837 * Time-N means the CPU time a UID spent running concurrently with N other processes.
3838 * The file contains a monotonically increasing count of time for a single boot.
3839 */
3840message CpuActiveTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07003841 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08003842 optional uint64 time_millis = 2;
Chenjie Yu9da105b2018-01-13 12:41:08 -08003843}
3844
3845/**
3846 * Reads from /proc/uid_concurrent_policy_time which has the format:
3847 * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4)
3848 * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
3849 * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ...
3850 * ...
3851 * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes.
3852 * The file contains a monotonically increasing count of time for a single boot.
3853 */
3854message CpuClusterTime {
Yao Chenc40a19d2018-03-15 16:48:25 -07003855 optional int32 uid = 1 [(is_uid) = true];
Chenjie Yuec676612018-03-07 09:19:17 -08003856 optional int32 cluster_index = 2;
David Chen0b5c90c2018-01-25 16:51:49 -08003857 optional uint64 time_millis = 3;
Chenjie Yu937d7422018-01-10 16:37:53 -08003858}
3859
3860/*
3861 * Pulls free disk space, for data, system partition and temporary directory.
3862 */
3863message DiskSpace {
3864 // available bytes in data partition
3865 optional uint64 data_available_bytes = 1;
3866 // available bytes in system partition
3867 optional uint64 system_available_bytes = 2;
3868 // available bytes in download cache or temp directories
3869 optional uint64 temp_available_bytes = 3;
3870}
Tej Singhbf972d92018-01-10 20:51:13 -08003871
3872/**
3873 * Pulls battery coulomb counter, which is the remaining battery charge in uAh.
Tej Singh9876a3b2019-01-11 14:28:35 -08003874 *
3875 * Pulled from StatsCompanionService.java
Tej Singhbf972d92018-01-10 20:51:13 -08003876 */
3877message RemainingBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07003878 optional int32 charge_micro_ampere_hour = 1;
Tej Singhbf972d92018-01-10 20:51:13 -08003879}
3880
3881/**
3882 * Pulls battery capacity, which is the battery capacity when full in uAh.
Tej Singh40298312018-02-16 00:15:09 -08003883 * Pulled from:
3884 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
Tej Singhbf972d92018-01-10 20:51:13 -08003885 */
3886message FullBatteryCapacity {
Yangster-maca8a30442018-10-13 23:46:34 -07003887 optional int32 capacity_micro_ampere_hour = 1;
Tej Singh40298312018-02-16 00:15:09 -08003888}
3889
3890/**
Bookatz17f0d8a2018-09-13 12:56:32 -07003891 * Pulls battery voltage.
3892 * Pulled from:
3893 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
3894 */
3895message BatteryVoltage {
3896 // The voltage of the battery, in millivolts.
Yangster-maca8a30442018-10-13 23:46:34 -07003897 optional int32 voltage_millivolt = 1;
Bookatz17f0d8a2018-09-13 12:56:32 -07003898}
3899
3900/**
Tej Singhb1dbc8b2018-11-19 15:49:47 -08003901 * Pulls battery level (percent full, from 0 to 100).
3902 *
3903 * Pulled from:
3904 * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
3905 */
3906message BatteryLevel {
3907 // Battery level. Should be in [0, 100].
3908 optional int32 battery_level = 1;
3909}
3910
3911/**
Tej Singhd89137e2018-03-26 14:51:40 -07003912 * Pulls the temperature of various parts of the device.
3913 * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303.
Tej Singh40298312018-02-16 00:15:09 -08003914 *
3915 * Pulled from:
3916 * frameworks/base/cmds/statsd/src/external/ResourceThermalManagerPuller.cpp
3917 */
3918message Temperature {
Tej Singhb6070b92018-12-19 19:00:12 -08003919 // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_.
Tej Singh40298312018-02-16 00:15:09 -08003920 optional android.os.TemperatureTypeEnum sensor_location = 1;
3921
3922 // The name of the temperature source. Eg. CPU0
3923 optional string sensor_name = 2;
3924
Tej Singhd89137e2018-03-26 14:51:40 -07003925 // Temperature in tenths of a degree C.
Tej Singhb6070b92018-12-19 19:00:12 -08003926 // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
Yangster-maca8a30442018-10-13 23:46:34 -07003927 optional int32 temperature_deci_celsius = 3;
yroa1fe77c2018-02-26 14:22:54 -08003928}
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01003929
3930/**
3931 * Pulls the statistics of calls to Binder.
3932 *
Olivier Gaillardd25f7a82018-09-12 14:28:48 +01003933 * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one
3934 * config on the device.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01003935 *
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00003936 * Next tag: 15
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01003937 */
3938message BinderCalls {
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00003939 // UID of the process responsible for the binder transaction. It will be set if the process
3940 // executing the binder transaction attribute the transaction to another uid using
3941 // Binder.setThreadWorkSource().
3942 //
3943 // If not set, the value will be -1.
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01003944 optional int32 uid = 1 [(is_uid) = true];
Olivier Gaillard720ec5b2018-10-30 17:32:56 +00003945 // UID of the process executing the binder transaction.
3946 optional int32 direct_caller_uid = 14;
Olivier Gaillard9ea238d2018-07-24 10:26:31 +01003947 // Fully qualified class name of the API call.
3948 //
3949 // This is a system server class name.
3950 //
3951 // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid
3952 // gets recycled and we have isolated uids, we might attribute the data incorrectly.
3953 // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less
3954 // commonly used APIs.
3955 optional string service_class_name = 2;
3956 // Method name of the API call. It can also be a transaction code if we cannot
3957 // resolve it to a name. See Binder#getTransactionName.
3958 //
3959 // This is a system server method name.
3960 optional string service_method_name = 3;
3961 // Total number of API calls.
3962 optional int64 call_count = 4;
3963 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
3964 optional bool screen_interactive = 13;
3965 // Total number of API calls we have data recorded for. If we collected data for all the calls,
3966 // call_count will be equal to recorded_call_count.
3967 //
3968 // If recorded_call_count is different than call_count, it means data collection has been
3969 // sampled. All the fields below will be sampled in this case.
3970 optional int64 recorded_call_count = 12;
3971 // Number of exceptions thrown by the API.
3972 optional int64 recorded_exception_count = 5;
3973 // Total latency of all API calls.
3974 // Average can be computed using total_latency_micros / recorded_call_count.
3975 optional int64 recorded_total_latency_micros = 6;
3976 // Maximum latency of one API call.
3977 optional int64 recorded_max_latency_micros = 7;
3978 // Total CPU usage of all API calls.
3979 // Average can be computed using total_cpu_micros / recorded_call_count.
3980 // Total can be computed using total_cpu_micros / recorded_call_count * call_count.
3981 optional int64 recorded_total_cpu_micros = 8;
3982 // Maximum CPU usage of one API call.
3983 optional int64 recorded_max_cpu_micros = 9;
3984 // Maximum parcel reply size of one API call.
3985 optional int64 recorded_max_reply_size_bytes = 10;
3986 // Maximum parcel request size of one API call.
3987 optional int64 recorded_max_request_size_bytes = 11;
3988}
3989
3990/**
3991 * Pulls the statistics of exceptions during calls to Binder.
3992 *
3993 * Binder stats are cumulative from boot unless somebody reset the data using
3994 * > adb shell dumpsys binder_calls_stats --reset
3995 */
3996message BinderCallsExceptions {
3997 // Exception class name, e.g. java.lang.IllegalArgumentException.
3998 //
3999 // This is an exception class name thrown by the system server.
4000 optional string exception_class_name = 1;
4001 // Total number of exceptions.
4002 optional int64 exception_count = 2;
Olivier Gaillard00bfb1b2018-07-10 11:25:09 +01004003}
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004004
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004005/**
4006 * Pulls the statistics of message dispatching on HandlerThreads.
4007 *
4008 * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one
4009 * config on the device.
4010 *
4011 * Next tag: 11
4012 */
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004013message LooperStats {
Marcin Oczeretkoec758722018-09-12 12:53:47 +01004014 // The uid that made a call to the System Server and caused the message to be enqueued.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004015 optional int32 uid = 1 [(is_uid) = true];
4016
4017 // Fully qualified class name of the handler target class.
4018 //
4019 // This field does not contain PII. This is a system server class name.
4020 optional string handler_class_name = 2;
4021
4022 // The name of the thread that runs the Looper.
4023 //
4024 // This field does not contain PII. This is a system server thread name.
4025 optional string looper_thread_name = 3;
4026
4027 // The name of the dispatched message.
4028 //
4029 // This field does not contain PII. This is a system server constant or class
4030 // name.
4031 optional string message_name = 4;
4032
4033 // Total number of successfully dispatched messages.
4034 optional int64 message_count = 5;
4035
4036 // Total number of messages that failed dispatching.
4037 optional int64 exception_count = 6;
4038
4039 // Total number of processed messages we have data recorded for. If we
4040 // collected data for all the messages, message_count will be equal to
4041 // recorded_message_count.
4042 //
4043 // If recorded_message_count is different than message_count, it means data
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01004044 // collection has been sampled. The fields below will be sampled in this case.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004045 optional int64 recorded_message_count = 7;
4046
4047 // Total latency of all processed messages.
4048 // Average can be computed using recorded_total_latency_micros /
4049 // recorded_message_count.
4050 optional int64 recorded_total_latency_micros = 8;
4051
4052 // Total CPU usage of all processed message.
4053 // Average can be computed using recorded_total_cpu_micros /
4054 // recorded_message_count. Total can be computed using
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004055 // recorded_total_cpu_micros / recorded_message_count * message_count.
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004056 optional int64 recorded_total_cpu_micros = 9;
Marcin Oczeretko3e6494e2018-09-10 18:06:52 +01004057
4058 // True if the screen was interactive PowerManager#isInteractive at the end of the call.
4059 optional bool screen_interactive = 10;
Marcin Oczeretkoc06331a2018-10-02 13:00:38 +01004060
4061 // Max recorded CPU usage of all processed messages.
4062 optional int64 recorded_max_cpu_micros = 11;
4063
4064 // Max recorded latency of all processed messages.
4065 optional int64 recorded_max_latency_micros = 12;
4066
4067 // Total number of messages we tracked the dispatching delay for. If we
4068 // collected data for all the messages, message_count will be equal to
4069 // recorded_delay_message_count.
4070 //
4071 // If recorded_delay_message_count is different than message_count, it means data
4072 // collection has been sampled or/and not all messages specified the target dispatch time.
4073 // The fields below will be sampled in this case.
4074 optional int64 recorded_delay_message_count = 13;
4075
4076 // Total dispatching delay of all processed messages.
4077 // Calculated as a difference between the target dispatching time (Message.when)
4078 // and the actual dispatching time.
4079 // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count.
4080 optional int64 recorded_total_delay_millis = 14;
4081
4082 // Max dispatching delay of all processed messages.
4083 // Calculated as a difference between the target dispatching time (Message.when)
4084 // and the actual dispatching time.
4085 optional int64 recorded_max_delay_millis = 15;
Marcin Oczeretkod8cc8592018-08-22 16:07:36 +01004086}
Tej Singh86dc9db2018-09-06 00:39:57 +00004087
4088/**
4089 * Pulls disk information, such as write speed and latency.
4090 */
4091message DiskStats {
4092 // Time taken to open, write 512B to, and close a file.
4093 // -1 if error performing the check.
4094 optional int64 data_write_latency_millis = 1;
4095
4096 optional bool file_based_encryption = 2;
4097
4098 // Recent disk write speed in kB/s.
4099 // -1 if error querying storageed.
4100 // 0 if data is unavailable.
4101 optional int32 recent_disk_write_speed = 3;
4102}
4103
4104
4105/**
4106 * Free and total bytes of the Data, Cache, and System partition.
4107 */
4108message DirectoryUsage {
4109 enum Directory {
4110 UNKNOWN = 0;
4111 DATA = 1;
4112 CACHE = 2;
4113 SYSTEM = 3;
4114 }
4115 optional Directory directory = 1;
4116 optional int64 free_bytes = 2;
4117 optional int64 total_bytes = 3;
4118}
4119
4120
4121/**
4122 * Size of an application: apk size, data size, and cache size.
4123 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
4124 * Information is only reported for apps with the primary user (user 0).
4125 * Sizes are aggregated by package name.
4126 */
4127message AppSize {
4128 // Including uids will involve modifying diskstats logic.
4129 optional string package_name = 1;
4130 // App size in bytes. -1 if unavailable.
4131 optional int64 app_size_bytes = 2;
4132 // App data size in bytes. -1 if unavailable.
4133 optional int64 app_data_size_bytes = 3;
4134 // App cache size in bytes. -1 if unavailable.
4135 optional int64 app_cache_size_bytes = 4;
4136 // Time that the cache file was produced.
4137 // Uses System.currentTimeMillis(), which is wall clock time.
4138 optional int64 cache_time_millis = 5;
4139}
4140
4141
4142/**
4143 * Size of a particular category. Eg: photos, videos.
4144 * Reads from a cached file produced daily by DiskStatsLoggingService.java.
4145 */
4146message CategorySize {
4147 enum Category {
4148 UNKNOWN = 0;
4149 APP_SIZE = 1;
4150 APP_DATA_SIZE = 2;
4151 APP_CACHE_SIZE = 3;
4152 PHOTOS = 4;
4153 VIDEOS = 5;
4154 AUDIO = 6;
4155 DOWNLOADS = 7;
4156 SYSTEM = 8;
4157 OTHER = 9;
4158 }
4159 optional Category category = 1;
4160 // Category size in bytes.
4161 optional int64 size_bytes = 2;
4162 // Time that the cache file was produced.
4163 // Uses System.currentTimeMillis(), which is wall clock time.
4164 optional int64 cache_time_millis = 3;
4165}
Tej Singhd6d6d772018-09-05 17:41:25 -07004166
4167/**
Tej Singhe7726dc2018-09-21 11:42:12 -07004168 * Pulls per uid I/O stats. The stats are cumulative since boot.
4169 *
4170 * Read/write bytes are I/O events from a storage device
4171 * Read/write chars are data requested by read/write syscalls, and can be
4172 * satisfied by caching.
4173 *
4174 * Pulled from StatsCompanionService, which reads proc/uid_io/stats.
4175 */
4176message DiskIo {
4177 optional int32 uid = 1 [(is_uid) = true];
4178 optional int64 fg_chars_read = 2;
4179 optional int64 fg_chars_write = 3;
4180 optional int64 fg_bytes_read = 4;
4181 optional int64 fg_bytes_write = 5;
4182 optional int64 bg_chars_read = 6;
4183 optional int64 bg_chars_write = 7;
4184 optional int64 bg_bytes_read = 8;
4185 optional int64 bg_bytes_write = 9;
4186 optional int64 fg_fsync = 10;
4187 optional int64 bg_fsync= 11;
4188}
4189
4190
4191/**
Tej Singhd6d6d772018-09-05 17:41:25 -07004192 * Pulls the number of fingerprints for each user.
4193 *
Kevin Chyn1741a072019-01-17 11:54:40 -08004194 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
Tej Singhd6d6d772018-09-05 17:41:25 -07004195 */
joshmccloskey5dcb4082019-02-26 15:28:37 -08004196message NumFingerprintsEnrolled {
Tej Singhd6d6d772018-09-05 17:41:25 -07004197 // The associated user. Eg: 0 for owners, 10+ for others.
4198 // Defined in android/os/UserHandle.java
4199 optional int32 user = 1;
4200 // Number of fingerprints registered to that user.
joshmccloskey5dcb4082019-02-26 15:28:37 -08004201 optional int32 num_fingerprints_enrolled = 2;
Tej Singhd6d6d772018-09-05 17:41:25 -07004202}
Chenjie Yu12e5e672018-09-14 15:54:59 -07004203
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08004204/**
joshmccloskey5dcb4082019-02-26 15:28:37 -08004205 * Pulls the number of faces for each user.
4206 *
4207 * Pulled from StatsCompanionService, which queries <Biometric>Manager.
4208 */
4209message NumFacesEnrolled {
4210 // The associated user. Eg: 0 for owners, 10+ for others.
4211 // Defined in android/os/UserHandle.java
4212 optional int32 user = 1;
4213 // Number of faces registered to that user.
4214 optional int32 num_faces_enrolled = 2;
4215}
4216/**
Philip P. Moltmann70b42ae2019-01-29 16:24:19 -08004217 * A mapping of role holder -> role
4218 */
4219message RoleHolder {
4220 // uid of the role holder
4221 optional int32 uid = 1 [(is_uid) = true];
4222
4223 // package name of the role holder
4224 optional string package_name = 2;
4225
4226 // the role held
4227 optional string role = 3;
4228}
4229
Yangsteraf9aee72018-10-12 09:26:16 -07004230message AggStats {
4231 optional int64 min = 1;
4232
4233 optional int64 average = 2;
4234
4235 optional int64 max = 3;
4236}
4237
4238message ProcessStatsStateProto {
4239 optional android.service.procstats.ScreenState screen_state = 1;
4240
4241 optional android.service.procstats.MemoryState memory_state = 2;
4242
4243 // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
4244 // and not frameworks/base/core/java/android/app/ActivityManager.java
4245 optional android.service.procstats.ProcessState process_state = 3;
4246
4247 // Millisecond uptime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004248 optional int64 duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004249
4250 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004251 optional int64 realtime_duration_millis = 9;
Yangsteraf9aee72018-10-12 09:26:16 -07004252
4253 // # of samples taken
4254 optional int32 sample_size = 5;
4255
4256 // PSS is memory reserved for this process
4257 optional AggStats pss = 6;
4258
4259 // USS is memory shared between processes, divided evenly for accounting
4260 optional AggStats uss = 7;
4261
4262 // RSS is memory resident for this process
4263 optional AggStats rss = 8;
4264}
4265
4266// Next Tag: 7
4267message ProcessStatsProto {
4268 // Name of process.
4269 optional string process = 1;
4270
4271 // Uid of the process.
4272 optional int32 uid = 2;
4273
4274 // Information about how often kills occurred
4275 message Kill {
4276 // Count of excessive CPU kills
4277 optional int32 cpu = 1;
4278
4279 // Count of kills when cached
4280 optional int32 cached = 2;
4281
4282 // PSS stats during cached kill
4283 optional AggStats cached_pss = 3;
4284 }
4285 optional Kill kill = 3;
4286
4287 // Time and memory spent in various states.
4288 repeated ProcessStatsStateProto states = 5;
4289
4290 // Total time process has been running... screen_state, memory_state, and process_state
4291 // will not be set.
4292 optional ProcessStatsStateProto total_running_state = 6;
4293}
4294
4295message PackageServiceOperationStatsProto {
4296 // Operate enum: Started, Foreground, Bound, Executing
4297 optional android.service.procstats.ServiceOperationState operation = 1;
4298
4299 // Number of times the service was in this operation.
4300 optional int32 count = 2;
4301
4302 // Information about a state the service can be in.
4303 message StateStats {
4304 // Screen state enum.
4305 optional android.service.procstats.ScreenState screen_state = 1;
4306 // Memory state enum.
4307 optional android.service.procstats.MemoryState memory_state = 2;
4308
4309 // duration in milliseconds.
Yangster-maca8a30442018-10-13 23:46:34 -07004310 optional int64 duration_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07004311 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004312 optional int64 realtime_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004313 }
4314 repeated StateStats state_stats = 3;
4315}
4316
4317message PackageServiceStatsProto {
4318 // Name of service component.
4319 optional string service_name = 1;
4320
4321 // The operation stats.
4322 // The package_name, package_uid, package_version, service_name will not be set to save space.
4323 repeated PackageServiceOperationStatsProto operation_stats = 2;
4324}
4325
4326message PackageAssociationSourceProcessStatsProto {
4327 // Uid of the process.
4328 optional int32 process_uid = 1;
4329 // Process name.
4330 optional string process_name = 2;
Chenjie Yub2ecc792019-01-17 10:27:26 -08004331 // Package name.
4332 optional string package_name = 7;
Yangsteraf9aee72018-10-12 09:26:16 -07004333 // Total count of the times this association appeared.
4334 optional int32 total_count = 3;
4335
4336 // Millisecond uptime total duration this association was around.
Yangster-maca8a30442018-10-13 23:46:34 -07004337 optional int64 total_duration_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004338
4339 // Total count of the times this association became actively impacting its target process.
4340 optional int32 active_count = 5;
4341
4342 // Information on one source in this association.
4343 message StateStats {
4344 // Process state enum.
4345 optional android.service.procstats.ProcessState process_state = 1;
4346 // Millisecond uptime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004347 optional int64 duration_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07004348 // Millisecond elapsed realtime duration spent in this state
Yangster-maca8a30442018-10-13 23:46:34 -07004349 optional int64 realtime_duration_mmillis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07004350 }
4351 repeated StateStats active_state_stats = 6;
4352}
4353
4354message PackageAssociationProcessStatsProto {
4355 // Name of the target component.
4356 optional string component_name = 1;
4357 // Information on one source in this association.
4358 repeated PackageAssociationSourceProcessStatsProto sources = 2;
4359}
4360
4361
4362message ProcessStatsPackageProto {
4363 // Name of package.
4364 optional string package = 1;
4365
4366 // Uid of the package.
4367 optional int32 uid = 2;
4368
4369 // Version of the package.
4370 optional int64 version = 3;
4371
4372 // Stats for each process running with the package loaded in to it.
4373 repeated ProcessStatsProto process_stats = 4;
4374
4375 // Stats for each of the package's services.
4376 repeated PackageServiceStatsProto service_stats = 5;
4377
4378 // Stats for each association with the package.
4379 repeated PackageAssociationProcessStatsProto association_stats = 6;
4380}
4381
4382message ProcessStatsSectionProto {
4383 // Elapsed realtime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004384 optional int64 start_realtime_millis = 1;
Yangsteraf9aee72018-10-12 09:26:16 -07004385
4386 // Elapsed realtime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004387 optional int64 end_realtime_millis = 2;
Yangsteraf9aee72018-10-12 09:26:16 -07004388
4389 // CPU uptime at start of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004390 optional int64 start_uptime_millis = 3;
Yangsteraf9aee72018-10-12 09:26:16 -07004391
4392 // CPU uptime at end of report.
Yangster-maca8a30442018-10-13 23:46:34 -07004393 optional int64 end_uptime_millis = 4;
Yangsteraf9aee72018-10-12 09:26:16 -07004394
4395 // System runtime library. e.g. "libdvm.so", "libart.so".
4396 optional string runtime = 5;
4397
4398 // whether kernel reports swapped pss.
4399 optional bool has_swapped_pss = 6;
4400
4401 // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops".
4402 enum Status {
4403 STATUS_UNKNOWN = 0;
4404 STATUS_COMPLETE = 1;
4405 STATUS_PARTIAL = 2;
4406 STATUS_SHUTDOWN = 3;
4407 STATUS_SYSPROPS = 4;
4408 }
4409 repeated Status status = 7;
4410
Chenjie Yub2ecc792019-01-17 10:27:26 -08004411 // Number of pages available of various types and sizes, representation fragmentation.
4412 repeated ProcessStatsAvailablePagesProto available_pages = 10;
4413
Yangsteraf9aee72018-10-12 09:26:16 -07004414 // Stats for each process.
4415 repeated ProcessStatsProto process_stats = 8;
4416
4417 // Stats for each package.
4418 repeated ProcessStatsPackageProto package_stats = 9;
4419}
4420
Chenjie Yub2ecc792019-01-17 10:27:26 -08004421message ProcessStatsAvailablePagesProto {
4422 // Node these pages are in (as per /proc/pagetypeinfo)
4423 optional int32 node = 1;
4424
4425 // Zone these pages are in (as per /proc/pagetypeinfo)
4426 optional string zone = 2;
4427
4428 // Label for the type of these pages (as per /proc/pagetypeinfo)
4429 optional string label = 3;
4430
4431 // Distribution of number of pages available by order size. First entry in array is
4432 // order 0, second is order 1, etc. Each order increase is a doubling of page size.
4433 repeated int32 pages_per_order = 4;
4434}
4435
Chenjie Yu12e5e672018-09-14 15:54:59 -07004436/**
4437 * Pulled from ProcessStatsService.java
4438 */
4439message ProcStats {
Yangsteraf9aee72018-10-12 09:26:16 -07004440 optional ProcessStatsSectionProto proc_stats_section = 1;
4441}
4442
Chenjie Yuf910b7802019-01-11 16:08:20 -08004443/**
4444 * Pulled from ProcessStatsService.java
4445 */
4446message ProcStatsPkgProc {
4447 optional ProcessStatsSectionProto proc_stats_section = 1;
4448}
4449
Yangsteraf9aee72018-10-12 09:26:16 -07004450message PowerProfileProto {
4451 optional double cpu_suspend = 1;
4452
4453 optional double cpu_idle = 2;
4454
4455 optional double cpu_active = 3;
4456
4457 message CpuCluster {
4458 optional int32 id = 1;
4459 optional double cluster_power = 2;
4460 optional int32 cores = 3;
4461 repeated int64 speed = 4;
4462 repeated double core_power = 5;
4463 }
4464
4465 repeated CpuCluster cpu_cluster = 40;
4466
4467 optional double wifi_scan = 4;
4468
4469 optional double wifi_on = 5;
4470
4471 optional double wifi_active = 6;
4472
4473 optional double wifi_controller_idle = 7;
4474
4475 optional double wifi_controller_rx = 8;
4476
4477 optional double wifi_controller_tx = 9;
4478
4479 repeated double wifi_controller_tx_levels = 10;
4480
4481 optional double wifi_controller_operating_voltage = 11;
4482
4483 optional double bluetooth_controller_idle = 12;
4484
4485 optional double bluetooth_controller_rx = 13;
4486
4487 optional double bluetooth_controller_tx = 14;
4488
4489 optional double bluetooth_controller_operating_voltage = 15;
4490
4491 optional double modem_controller_sleep = 16;
4492
4493 optional double modem_controller_idle = 17;
4494
4495 optional double modem_controller_rx = 18;
4496
4497 repeated double modem_controller_tx = 19;
4498
4499 optional double modem_controller_operating_voltage = 20;
4500
4501 optional double gps_on = 21;
4502
4503 repeated double gps_signal_quality_based = 22;
4504
4505 optional double gps_operating_voltage = 23;
4506
4507 optional double bluetooth_on = 24;
4508
4509 optional double bluetooth_active = 25;
4510
4511 optional double bluetooth_at_cmd = 26;
4512
4513 optional double ambient_display = 27;
4514
4515 optional double screen_on = 28;
4516
4517 optional double radio_on = 29;
4518
4519 optional double radio_scanning = 30;
4520
4521 optional double radio_active = 31;
4522
4523 optional double screen_full = 32;
4524
4525 optional double audio = 33;
4526
4527 optional double video = 34;
4528
4529 optional double flashlight = 35;
4530
4531 optional double memory = 36;
4532
4533 optional double camera = 37;
4534
4535 optional double wifi_batched_scan = 38;
4536
4537 optional double battery_capacity = 39;
Chenjie Yu12e5e672018-09-14 15:54:59 -07004538}
Chenjie Yuab530202018-09-26 12:39:20 -07004539
4540/**
4541 * power_profile.xml and other constants for power model calculations.
4542 * Pulled from PowerProfile.java
4543 */
4544message PowerProfile {
Yangsteraf9aee72018-10-12 09:26:16 -07004545 optional PowerProfileProto power_profile = 1;
Howard Ro9a862de2018-10-11 16:03:33 -07004546}
Chenjie Yub35b5f72018-10-13 23:25:11 -07004547
4548/**
arangelovd5db50e2018-10-12 20:24:39 +01004549 * Logs when a user restriction was added or removed.
4550 *
4551 * Logged from:
4552 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
4553 */
4554message UserRestrictionChanged {
4555 // The raw string of the user restriction as defined in UserManager.
4556 // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS.
4557 optional string restriction = 1;
4558 // Whether the restriction is enabled or disabled.
4559 optional bool enabled = 2;
Howard Ro183c2bd2018-10-18 13:52:10 -07004560}
Yangster-mac308ea0c2018-10-22 13:10:25 -07004561
4562/**
4563 * Pulls process user time and system time. Puller takes a snapshot of all pids
4564 * in the system and returns cpu stats for those that are working at the time.
4565 * Dead pids will be dropped. Kernel processes are excluded.
4566 * Min cool-down is 5 sec.
4567 */
4568message ProcessCpuTime {
4569 optional int32 uid = 1 [(is_uid) = true];
4570
4571 optional string process_name = 2;
4572 // Process cpu time in user space, cumulative from boot/process start
4573 optional int64 user_time_millis = 3;
4574 // Process cpu time in system space, cumulative from boot/process start
4575 optional int64 system_time_millis = 4;
Rafal Slawikbf67d072018-10-23 11:07:54 +01004576}
Misha Wagner5a51e002018-10-03 15:04:09 +01004577
4578/**
4579 * Pulls the CPU usage for each thread.
4580 *
4581 * Read from /proc/$PID/task/$TID/time_in_state files.
4582 *
4583 * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and
4584 * time_in_state files not being present on some phones, have not been addressed. These should be
4585 * considered before a public release.
4586 */
4587message CpuTimePerThreadFreq {
4588 // UID that owns the process.
4589 optional int32 uid = 1 [(is_uid) = true];
4590 // ID of the process.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00004591 optional int32 process_id = 2;
Misha Wagner5a51e002018-10-03 15:04:09 +01004592 // ID of the thread.
Misha Wagnerdfa548c2018-11-16 11:18:00 +00004593 optional int32 thread_id = 3;
Misha Wagner5a51e002018-10-03 15:04:09 +01004594 // Name of the process taken from `/proc/$PID/cmdline`.
4595 optional string process_name = 4;
4596 // Name of the thread taken from `/proc/$PID/task/$TID/comm`
4597 optional string thread_name = 5;
Misha Wagnerfde69582018-11-28 13:26:32 +00004598
4599 // Report eight different frequencies, and how much time is spent in each frequency. Frequencies
4600 // are given in KHz, and time is given in milliseconds since the thread started. All eight
4601 // frequencies are given here as the alternative is sending eight separate atoms. This method
4602 // significantly reduces the amount of data created
4603 optional int32 frequency1_khz = 6;
4604 optional int32 time1_millis = 7;
4605 optional int32 frequency2_khz = 8;
4606 optional int32 time2_millis = 9;
4607 optional int32 frequency3_khz = 10;
4608 optional int32 time3_millis = 11;
4609 optional int32 frequency4_khz = 12;
4610 optional int32 time4_millis = 13;
4611 optional int32 frequency5_khz = 14;
4612 optional int32 time5_millis = 15;
4613 optional int32 frequency6_khz = 16;
4614 optional int32 time6_millis = 17;
4615 optional int32 frequency7_khz = 18;
4616 optional int32 time7_millis = 19;
4617 optional int32 frequency8_khz = 20;
4618 optional int32 time8_millis = 21;
Misha Wagner5a51e002018-10-03 15:04:09 +01004619}
Bookatz75ee60422018-11-09 12:27:37 -08004620
4621/**
Bookatz366a4432018-11-20 09:42:33 -08004622 * Pulls information about the device's build.
4623 */
4624message BuildInformation {
4625 // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse.
4626 // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags.
4627 optional string fingerprint = 1;
4628
4629 // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated.
4630 optional string brand = 2;
4631
4632 // Build.PRODUCT. The name of the overall product.
4633 optional string product = 3;
4634
4635 // Build.DEVICE. The name of the industrial design.
4636 optional string device = 4;
4637
4638 // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas".
4639 optional string version_release = 5;
4640
4641 // Build.ID. E.g. a label like "M4-rc20".
4642 optional string id = 6;
4643
4644 // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to
4645 // represent this build.
4646 optional string version_incremental = 7;
4647
4648 // Build.TYPE. The type of build, like "user" or "eng".
4649 optional string type = 8;
4650
4651 // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug".
4652 optional string tags = 9;
4653}
4654
4655/**
Bookatz75ee60422018-11-09 12:27:37 -08004656 * Pulls on-device BatteryStats power use calculations for the overall device.
4657 */
4658message DeviceCalculatedPowerUse {
Bookatz3dbc13a2018-12-21 12:16:51 -08004659 // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
4660 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
4661 // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()).
4662 optional int64 computed_power_nano_amp_secs = 1;
Bookatz75ee60422018-11-09 12:27:37 -08004663}
4664
4665/**
4666 * Pulls on-device BatteryStats power use calculations broken down by uid.
4667 * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use
4668 * that is attributed to non-uid items. They must all be included to get the total power use.
4669 */
4670message DeviceCalculatedPowerBlameUid {
4671 // Uid being blamed. Note: isolated uids have already been mapped to host uid.
4672 optional int32 uid = 1 [(is_uid) = true];
4673
Bookatz3dbc13a2018-12-21 12:16:51 -08004674 // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
4675 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
4676 optional int64 power_nano_amp_secs = 2;
Bookatz75ee60422018-11-09 12:27:37 -08004677}
4678
4679/**
4680 * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by
4681 * drain type.
4682 * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that
4683 * is attributed uids. They must all be included to get the total power use.
4684 */
4685message DeviceCalculatedPowerBlameOther {
4686 // The type of item whose power use is being reported.
4687 enum DrainType {
4688 AMBIENT_DISPLAY = 0;
4689 // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid.
4690 BLUETOOTH = 2;
4691 CAMERA = 3;
4692 // Cell-standby
4693 CELL = 4;
4694 FLASHLIGHT = 5;
4695 IDLE = 6;
4696 MEMORY = 7;
4697 // Amount that total computed drain exceeded the drain estimated using the
4698 // battery level changes and capacity.
4699 OVERCOUNTED = 8;
4700 PHONE = 9;
4701 SCREEN = 10;
4702 // Amount that total computed drain was below the drain estimated using the
4703 // battery level changes and capacity.
4704 UNACCOUNTED = 11;
4705 // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported.
4706 WIFI = 13;
4707 }
4708 optional DrainType drain_type = 1;
4709
Bookatz3dbc13a2018-12-21 12:16:51 -08004710 // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since
4711 // BatteryStats last reset (i.e. roughly since device was last significantly charged).
4712 optional int64 power_nano_amp_secs = 2;
Rafal Slawik3bea8952018-11-15 12:39:33 +00004713}
arangelov4e994062018-11-13 16:12:38 +00004714
4715/**
4716 * Logs device policy features.
4717 *
4718 * Logged from:
4719 * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
4720 * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
4721 */
4722message DevicePolicyEvent {
4723 // The event id - unique for each event.
4724 optional android.stats.devicepolicy.EventId event_id = 1;
4725 // The admin package name.
4726 optional string admin_package_name = 2;
4727 // A generic integer parameter.
4728 optional int32 integer_value = 3;
4729 // A generic boolean parameter.
4730 optional bool boolean_value = 4;
4731 // A parameter specifying a time period in milliseconds.
4732 optional uint64 time_period_millis = 5;
4733 // A parameter specifying a list of package names, bundle extras or string parameters.
4734 optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES];
4735}
shawnlinea5b66b2018-11-13 15:05:29 +08004736
4737/**
4738 * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up.
4739 *
4740 * Logged from:
4741 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4742 */
4743message DocsUILaunchReported {
4744 optional android.stats.docsui.LaunchAction launch_action = 1;
4745 optional bool has_initial_uri = 2;
4746 optional android.stats.docsui.MimeType mime_type = 3;
4747 optional android.stats.docsui.Root initial_root = 4;
4748}
4749
4750/**
4751 * Logs root/app visited event in file managers/picker. Call this when the user
4752 * taps on root/app in hamburger menu.
4753 *
4754 * Logged from:
4755 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4756 */
4757message DocsUIRootVisitedReported {
4758 optional android.stats.docsui.ContextScope scope = 1;
4759 optional android.stats.docsui.Root root = 2;
4760}
4761
4762/**
4763 * Logs file operation stats. Call this when a file operation has completed.
4764 *
4765 * Logged from:
4766 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4767 */
4768message DocsUIFileOperationReported {
4769 optional android.stats.docsui.Provider provider = 1;
4770 optional android.stats.docsui.FileOperation file_op = 2;
4771}
4772
4773/**
4774 * Logs file operation stats. Call this when a copy/move operation has completed with a specific
4775 * mode.
4776 *
4777 * Logged from:
4778 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4779 */
4780message DocsUIFileOperationCopyMoveModeReported {
4781 optional android.stats.docsui.FileOperation file_op = 1;
4782 optional android.stats.docsui.CopyMoveOpMode mode = 2;
4783}
4784
4785
4786/**
4787 * Logs file sub operation stats. Call this when a file operation has failed.
4788 *
4789 * Logged from:
4790 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4791 */
4792message DocsUIFileOperationFailureReported {
4793 optional android.stats.docsui.Authority authority = 1;
4794 optional android.stats.docsui.SubFileOperation sub_op = 2;
4795}
4796
4797/**
4798* Logs the cancellation of a file operation. Call this when a job is canceled
4799*
4800* Logged from:
4801* package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4802*/
4803message DocsUIFileOperationCanceledReported {
4804 optional android.stats.docsui.FileOperation file_op = 1;
4805}
4806
4807/**
4808 * Logs startup time in milliseconds.
4809 *
4810 * Logged from:
4811 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4812 */
4813message DocsUIStartupMsReported {
4814 optional int32 startup_millis = 1;
4815}
4816
4817/**
4818 * Logs the action that was started by user.
4819 *
4820 * Logged from:
4821 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4822 */
4823message DocsUIUserActionReported {
4824 optional android.stats.docsui.UserAction action = 1;
4825}
4826
4827/**
4828 * Logs the invalid type when invalid scoped access is requested.
4829 *
4830 * Logged from:
4831 * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java
4832 */
4833message DocsUIInvalidScopedAccessRequestReported {
4834 optional android.stats.docsui.InvalidScopedAccess type = 1;
Rafal Slawikda51b932018-12-13 16:31:33 +00004835}
Ben Murdochbab399f62018-12-06 11:01:38 +00004836
4837/**
shawnlina75e82d2019-01-07 10:31:12 +08004838 * Logs the package name that launches docsui picker mode.
4839 *
4840 * Logged from:
4841 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4842 */
4843message DocsUIPickerLaunchedFromReported {
4844 optional string package_name = 1;
4845}
4846
4847/**
4848 * Logs the search type.
4849 *
4850 * Logged from:
4851 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4852 */
4853message DocsUISearchTypeReported {
4854 optional android.stats.docsui.SearchType search_type = 1;
4855}
4856
4857/**
4858 * Logs the search mode.
4859 *
4860 * Logged from:
4861 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4862 */
4863message DocsUISearchModeReported {
4864 optional android.stats.docsui.SearchMode search_mode = 1;
4865}
4866
4867/**
4868 * Logs the pick result information.
4869 *
4870 * Logged from:
4871 * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java
4872 */
4873message DocsUIPickResultReported {
4874 optional int32 total_action_count = 1;
4875 optional int64 duration_millis = 2;
4876 optional int32 file_count= 3;
4877 optional bool is_searching = 4;
4878 optional android.stats.docsui.Root picked_from = 5;
4879 optional android.stats.docsui.MimeType mime_type = 6;
4880 optional int32 repeatedly_pick_times = 7;
4881}
4882
4883/**
Ben Murdochbab399f62018-12-06 11:01:38 +00004884 * Logs when an app's memory is compacted.
4885 *
4886 * Logged from:
4887 * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
4888 */
4889message AppCompacted {
4890 // The pid of the process being compacted.
4891 optional int32 pid = 1;
4892
4893 // The name of the process being compacted.
4894 optional string process_name = 2;
4895
4896 // The type of compaction.
4897 enum Action {
4898 UNKNOWN = 0;
4899 SOME = 1;
4900 FULL = 2;
4901 }
Ben Murdoch01720b82018-12-19 18:03:44 +00004902 optional Action action = 3;
Ben Murdochbab399f62018-12-06 11:01:38 +00004903
4904 // Total RSS in kilobytes consumed by the process prior to compaction.
4905 optional int64 before_rss_total_kilobytes = 4;
4906
4907 // File RSS in kilobytes consumed by the process prior to compaction.
4908 optional int64 before_rss_file_kilobytes = 5;
4909
4910 // Anonymous RSS in kilobytes consumed by the process prior to compaction.
4911 optional int64 before_rss_anon_kilobytes = 6;
4912
4913 // Swap in kilobytes consumed by the process prior to compaction.
4914 optional int64 before_swap_kilobytes = 7;
4915
4916 // Total RSS in kilobytes consumed by the process after compaction.
4917 optional int64 after_rss_total_kilobytes = 8;
4918
4919 // File RSS in kilobytes consumed by the process after compaction.
4920 optional int64 after_rss_file_kilobytes = 9;
4921
4922 // Anonymous RSS in kilobytes consumed by the process after compaction.
4923 optional int64 after_rss_anon_kilobytes = 10;
4924
4925 // Swap in kilobytes consumed by the process after compaction.
4926 optional int64 after_swap_kilobytes = 11;
4927
4928 // The time taken to perform compaction in milliseconds.
4929 optional int64 time_to_compact_millis = 12;
4930
4931 // The last compaction action performed for this app.
4932 optional Action last_action = 13;
4933
Ben Murdoch01720b82018-12-19 18:03:44 +00004934 // The last time that compaction was attempted on this process in milliseconds
4935 // since boot, not including sleep (see SystemClock.uptimeMillis()).
4936 optional int64 last_compact_timestamp_ms_since_boot = 14;
Ben Murdochbab399f62018-12-06 11:01:38 +00004937
Ben Murdoch885c21b2019-03-15 18:02:04 +00004938 // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction.
Ben Murdoch01720b82018-12-19 18:03:44 +00004939 optional int32 oom_score_adj = 15;
Ben Murdochbab399f62018-12-06 11:01:38 +00004940
4941 // The process state at the time of compaction.
4942 optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN];
Ben Murdochfdc55932019-01-30 10:43:15 +00004943
4944 // Free ZRAM in kilobytes before compaction.
4945 optional int64 before_zram_free_kilobytes = 17;
4946
4947 // Free ZRAM in kilobytes after compaction.
4948 optional int64 after_zram_free_kilobytes = 18;
Ben Murdochbab399f62018-12-06 11:01:38 +00004949}
lifr157fc552018-12-12 16:38:04 +08004950
4951/**
4952 * Logs the latency period(in microseconds) and the return code of
4953 * the DNS(Domain Name System) lookups.
4954 * These 4 methods(GETADDRINFO,GETHOSTBYNAME,GETHOSTBYADDR,RES_NSEND)
4955 * to get info(address or hostname) from DNS server(or DNS cache).
4956 * Logged from:
4957 * /system/netd/server/DnsProxyListener.cpp
4958 */
4959message NetworkDnsEventReported {
4960 // The types of the DNS lookups, as defined in
4961 //system/netd/server/binder/android/net/metrics/INetdEventListener.aidl
4962 enum EventType {
4963 EVENT_UNKNOWN = 0;
4964 EVENT_GETADDRINFO = 1;
4965 EVENT_GETHOSTBYNAME = 2;
4966 EVENT_GETHOSTBYADDR = 3;
4967 EVENT_RES_NSEND = 4;
4968 }
4969 optional EventType event_type = 1;
4970
4971 // The return value of the DNS resolver for each DNS lookups.
4972 //bionic/libc/include/netdb.h
4973 //system/netd/resolv/include/netd_resolv/resolv.h
4974 enum ReturnCode {
lifr357b7cf2019-01-15 02:05:45 +08004975 EAI_NO_ERROR = 0;
lifr157fc552018-12-12 16:38:04 +08004976 EAI_ADDRFAMILY = 1;
4977 EAI_AGAIN = 2;
4978 EAI_BADFLAGS = 3;
4979 EAI_FAIL = 4;
4980 EAI_FAMILY = 5;
4981 EAI_MEMORY = 6;
4982 EAI_NODATA = 7;
4983 EAI_NONAME = 8;
4984 EAI_SERVICE = 9;
4985 EAI_SOCKTYPE = 10;
4986 EAI_SYSTEM = 11;
4987 EAI_BADHINTS = 12;
4988 EAI_PROTOCOL = 13;
4989 EAI_OVERFLOW = 14;
4990 RESOLV_TIMEOUT = 255;
4991 EAI_MAX = 256;
4992 }
4993 optional ReturnCode return_code = 2;
4994
4995 // The latency period(in microseconds) it took for this DNS lookup to complete.
4996 optional int32 latency_micros = 3;
4997}
Chiachang Wangf6bedc22019-01-14 11:54:32 +08004998
4999/**
5000 * Logs when a data stall event occurs.
5001 *
5002 * Log from:
5003 * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
5004 */
5005message DataStallEvent {
5006 // Data stall evaluation type.
5007 // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
5008 // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*.
5009 optional int32 evaluation_type = 1;
5010 // See definition in data_stall_event.proto.
5011 optional com.android.server.connectivity.ProbeResult validation_result = 2;
5012 // See definition in data_stall_event.proto.
5013 optional android.net.NetworkCapabilitiesProto.Transport network_type = 3;
5014 // See definition in data_stall_event.proto.
5015 optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES];
5016 // See definition in data_stall_event.proto.
5017 optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES];
5018 // See definition in data_stall_event.proto.
5019 optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES];
5020}
Christian Brunschenf86039e2018-12-21 12:26:14 +00005021
5022/*
5023 * Logs when RescueParty resets some set of experiment flags.
5024 *
5025 * Logged from:
5026 * frameworks/base/services/core/java/com/android/server/RescueParty.java
5027 */
5028message RescuePartyResetReported {
5029 // The rescue level of this reset. A value of 0 indicates missing or unknown level information.
5030 optional int32 rescue_level = 1;
5031}
Mathew Inwoodb375be52019-01-04 11:36:25 +00005032
5033/**
5034 * Logs when signed config is received from an APK, and if that config was applied successfully.
5035 * Logged from:
5036 * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java
5037 */
5038message SignedConfigReported {
5039 enum Type {
5040 UNKNOWN_TYPE = 0;
5041 GLOBAL_SETTINGS = 1;
5042 }
5043 optional Type type = 1;
5044
5045 // The final status of the signed config received.
5046 enum Status {
5047 UNKNOWN_STATUS = 0;
5048 APPLIED = 1;
5049 BASE64_FAILURE_CONFIG = 2;
5050 BASE64_FAILURE_SIGNATURE = 3;
5051 SECURITY_EXCEPTION = 4;
5052 INVALID_CONFIG = 5;
5053 OLD_CONFIG = 6;
5054 SIGNATURE_CHECK_FAILED = 7;
5055 NOT_APPLICABLE = 8;
Mathew Inwood610d0962019-01-15 11:50:28 +00005056 SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9;
Mathew Inwoodb375be52019-01-04 11:36:25 +00005057 }
5058 optional Status status = 2;
5059
5060 // The version of the signed config processed.
5061 optional int32 version = 3;
5062
5063 // The package name that the config was extracted from.
5064 optional string from_package = 4;
5065
5066 enum Key {
5067 NO_KEY = 0;
5068 DEBUG = 1;
5069 PRODUCTION = 2;
5070 }
5071 // Which key was used to verify the config.
5072 optional Key verified_with = 5;
5073}
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005074
5075/*
5076 * Logs GNSS Network-Initiated (NI) location events.
5077 *
5078 * Logged from:
5079 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
5080 */
5081message GnssNiEventReported {
5082 // The type of GnssNiEvent.
5083 enum EventType {
5084 UNKNOWN = 0;
5085 NI_REQUEST = 1;
5086 NI_RESPONSE = 2;
5087 }
5088 optional EventType event_type = 1;
5089
5090 // An ID generated by HAL to associate NI notifications and UI responses.
5091 optional int32 notification_id = 2;
5092
5093 // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005094 optional android.server.location.GnssNiType ni_type = 3;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005095
5096 // NI requires notification.
5097 optional bool need_notify = 4;
5098
5099 // NI requires verification.
5100 optional bool need_verify = 5;
5101
5102 // NI requires privacy override, no notification/minimal trace.
5103 optional bool privacy_override = 6;
5104
5105 // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in
5106 // seconds.
5107 optional int32 timeout = 7;
5108
5109 // Default response when timeout.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005110 optional android.server.location.GnssUserResponseType default_response = 8;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005111
5112 // String representing the requester of the network inititated location request.
5113 optional string requestor_id = 9;
5114
5115 // Notification message text string representing the service(for eg. SUPL-service) who sent the
5116 // network initiated location request.
5117 optional string text = 10;
5118
5119 // requestorId decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005120 optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005121
5122 // Notification message text decoding scheme.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005123 optional android.server.location.GnssNiEncodingType text_encoding = 12;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005124
5125 // True if SUPL ES is enabled.
5126 optional bool is_supl_es_enabled = 13;
5127
5128 // True if GNSS location is enabled.
5129 optional bool is_location_enabled = 14;
5130
5131 // GNSS NI responses which define the response in NI structures.
Yu-Han Yang14d5fb42019-01-16 12:42:59 -08005132 optional android.server.location.GnssUserResponseType user_response = 15;
5133}
5134
5135/**
5136 * Logs GNSS non-framework (NFW) location notification.
5137 *
5138 * Logged from:
5139 * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
5140 */
5141message GnssNfwNotificationReported {
5142 // Package name of the Android proxy application representing the non-framework entity that
5143 // requested location. Set to empty string if unknown.
5144 optional string proxy_app_package_name = 1;
5145
5146 // Protocol stack that initiated the non-framework location request.
5147 optional android.server.location.NfwProtocolStack protocol_stack = 2;
5148
5149 // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise,
5150 // set to empty string. This field is opaque to the framework and used for logging purposes.
5151 optional string other_protocol_stack_name = 3;
5152
5153 // Source initiating/receiving the location information.
5154 optional android.server.location.NfwRequestor requestor = 4;
5155
5156 // Identity of the endpoint receiving the location information. For example, carrier name, OEM
5157 // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework
5158 // and used for logging purposes.
5159 optional string requestor_id = 5;
5160
5161 // Indicates whether location information was provided for this request.
5162 optional android.server.location.NfwResponseType response_type = 6;
5163
5164 // True if the device is in user initiated emergency session.
5165 optional bool in_emergency_mode = 7;
5166
5167 // True if cached location is provided.
5168 optional bool is_cached_location = 8;
5169
5170 // True if proxy app permission mismatch between framework and GNSS HAL.
5171 optional bool is_permission_mismatched = 9;
5172}
5173
5174/**
5175 * Logs GNSS configuration as defined in IGnssConfiguration.hal.
5176 *
5177 * Logged from:
5178 * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java
5179 */
5180message GnssConfigurationReported {
5181 // SUPL host name.
5182 optional string supl_host = 1;
5183
5184 // SUPL port number.
5185 optional int32 supl_port = 2;
5186
5187 // C2K host name.
5188 optional string c2k_host = 3;
5189
5190 // C2K port number.
5191 optional int32 c2k_port = 4;
5192
5193 // The SUPL version requested by Carrier.
5194 optional int32 supl_ver = 5;
5195
5196 // The SUPL mode.
5197 optional android.server.location.SuplMode supl_mode = 6;
5198
5199 // True if NI emergency SUPL restrictions is enabled.
5200 optional bool supl_es = 7;
5201
5202 // LTE Positioning Profile settings
5203 optional android.server.location.LppProfile lpp_profile = 8;
5204
5205 // Positioning protocol on A-Glonass system.
5206 optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9;
5207
5208 // True if emergency PDN is used. Otherwise, regular PDN is used.
5209 optional bool use_emergency_pdn_for_emergency_supl= 10;
5210
5211 // Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
5212 optional android.server.location.GpsLock gps_lock = 11;
5213
5214 // Number of seconds to extend the emergency session duration post emergency call.
5215 optional int32 es_extension_sec = 12;
5216
5217 // The full list of package names of proxy Android applications representing the non-framework
5218 // location access entities (on/off the device) for which the framework user has granted
5219 // non-framework location access permission. The package names are concatenated in one string
5220 // with spaces as separators.
5221 optional string enabled_proxy_app_package_name_list = 13;
Yu-Han Yang8a1b51d2018-12-26 22:18:31 -08005222}
Jack Yu95b64f32018-12-13 18:26:11 +08005223
5224/**
5225 * Logs when a NFC device's error occurred.
5226 * Logged from:
5227 * system/nfc/src/nfc/nfc/nfc_ncif.cc
5228 * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java
5229 */
5230message NfcErrorOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005231 enum Type {
5232 UNKNOWN = 0;
5233 CMD_TIMEOUT = 1;
5234 ERROR_NOTIFICATION = 2;
5235 AID_OVERFLOW = 3;
5236 }
5237 optional Type type = 1;
5238 // If it's nci cmd timeout, log the timeout command.
5239 optional uint32 nci_cmd = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08005240
Alex Salod7c3eef2019-01-25 14:43:27 -08005241 optional uint32 error_ntf_status_code = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08005242}
5243
5244/**
5245 * Logs when a NFC device's state changed event
5246 * Logged from:
5247 * packages/apps/Nfc/src/com/android/nfc/NfcService.java
5248 */
5249message NfcStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08005250 enum State {
5251 UNKNOWN = 0;
5252 OFF = 1;
5253 ON = 2;
5254 ON_LOCKED = 3; // Secure Nfc enabled.
5255 CRASH_RESTART = 4; // NfcService watchdog timeout restart.
5256 }
5257 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005258}
5259
5260/**
5261 * Logs when a NFC Beam Transaction occurred.
5262 * Logged from:
5263 * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
5264 */
5265message NfcBeamOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005266 enum Operation {
5267 UNKNOWN = 0;
5268 SEND = 1;
5269 RECEIVE = 2;
5270 }
5271 optional Operation operation = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005272}
5273
5274/**
5275 * Logs when a NFC Card Emulation Transaction occurred.
5276 * Logged from:
5277 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java
5278 * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java
5279 */
5280message NfcCardemulationOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005281 enum Category {
5282 UNKNOWN = 0;
5283 HCE_PAYMENT = 1;
5284 HCE_OTHER = 2;
5285 OFFHOST = 3;
5286 }
5287 // Transaction belongs to HCE payment or HCE other category, or offhost.
5288 optional Category category = 1;
5289 // SeName from transaction: SIMx, eSEx, HCE, HCEF.
5290 optional string se_name = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08005291}
5292
5293/**
5294 * Logs when a NFC Tag event occurred.
5295 * Logged from:
5296 * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java
5297 */
5298message NfcTagOccurred {
Alex Salod7c3eef2019-01-25 14:43:27 -08005299 enum Type {
5300 UNKNOWN = 0;
5301 URL = 1;
5302 BT_PAIRING = 2;
5303 PROVISION = 3;
5304 WIFI_CONNECT = 4;
5305 APP_LAUNCH = 5;
5306 OTHERS = 6;
5307 }
5308 optional Type type = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005309}
5310
5311/**
5312 * Logs when Hce transaction triggered
5313 * Logged from:
5314 * system/nfc/src/nfc/nfc/nfc_ncif.cc
5315 */
5316message NfcHceTransactionOccurred {
5317 // The latency period(in microseconds) it took for the first HCE data
5318 // exchange.
5319 optional uint32 latency_micros = 1;
5320}
5321
5322/**
5323 * Logs when SecureElement state event changed
5324 * Logged from:
5325 * packages/apps/SecureElement/src/com/android/se/Terminal.java
5326 */
5327message SeStateChanged {
Alex Salod7c3eef2019-01-25 14:43:27 -08005328 enum State {
5329 UNKNOWN = 0;
5330 INITIALIZED = 1;
5331 DISCONNECTED = 2;
5332 CONNECTED = 3;
5333 HALCRASH = 4;
5334 }
5335 optional State state = 1;
Jack Yu95b64f32018-12-13 18:26:11 +08005336
Alex Salod7c3eef2019-01-25 14:43:27 -08005337 optional string state_change_reason = 2;
5338 // SIMx or eSEx.
5339 optional string terminal = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08005340}
5341
5342/**
Philip P. Moltmanne0cf4e62019-01-29 14:22:48 -08005343 * Information about a permission grant request
5344 */
5345message PermissionGrantRequestResultReported {
5346 // unique value identifying an API call. A API call might result in multiple of these atoms
5347 optional int64 request_id = 1;
5348
5349 // UID of package requesting the permission grant
5350 optional int32 requesting_uid = 2 [(is_uid) = true];
5351
5352 // Name of package requesting the permission grant
5353 optional string requesting_package_name = 3;
5354
5355 // The permission to be granted
5356 optional string permission_name = 4;
5357
5358 // If the permission was explicitly requested via the API or added by the system
5359 optional bool is_implicit = 5;
5360
5361 enum Result {
5362 UNDEFINED = 0;
5363 // permission request was ignored
5364 IGNORED = 1;
5365 // permission request was ignored because it was user fixed
5366 IGNORED_USER_FIXED = 2;
5367 // permission request was ignored because it was policy fixed
5368 IGNORED_POLICY_FIXED = 3;
5369 // permission was granted by user action
5370 USER_GRANTED = 4;
5371 // permission was automatically granted
5372 AUTO_GRANTED = 5;
5373 // permission was denied by user action
5374 USER_DENIED = 6;
5375 // permission was denied with prejudice by the user
5376 USER_DENIED_WITH_PREJUDICE = 7;
5377 // permission was automatically denied
5378 AUTO_DENIED = 8;
5379 }
5380 // The result of the permission grant
5381 optional Result result = 6;
5382}
5383
5384/**
Jack Yu95b64f32018-12-13 18:26:11 +08005385 * Logs when Omapi API used
5386 * Logged from:
5387 * packages/apps/SecureElement/src/com/android/se/Terminal.java
5388 */
5389message SeOmapiReported {
Alex Salod7c3eef2019-01-25 14:43:27 -08005390 enum Operation {
5391 UNKNOWN = 0;
5392 OPEN_CHANNEL = 1;
5393 }
5394 optional Operation operation = 1;
5395 // SIMx or eSEx.
5396 optional string terminal = 2;
Jack Yu95b64f32018-12-13 18:26:11 +08005397
Alex Salod7c3eef2019-01-25 14:43:27 -08005398 optional string package_name = 3;
Jack Yu95b64f32018-12-13 18:26:11 +08005399}
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08005400
5401/**
Alex Saloa060aee2019-01-21 14:36:41 -08005402 * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED.
5403 * The dispatch latency is the dispatchClockTime - enqueueClockTime.
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08005404 * Logged from:
5405 * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
5406 */
5407message BroadcastDispatchLatencyReported {
Alex Saloa060aee2019-01-21 14:36:41 -08005408 optional int64 dispatch_latency_millis = 1;
5409}
5410
5411/**
5412 * Logs AttentionManagerService attention check result.
5413 *
5414 * Logged from:
5415 * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java
5416 */
5417message AttentionManagerServiceResultReported {
5418 // See core/java/android/service/attention/AttentionService.java
5419 enum AttentionCheckResult {
5420 UNKNOWN = 20;
5421 ATTENTION_SUCCESS_ABSENT = 0;
5422 ATTENTION_SUCCESS_PRESENT = 1;
5423 ATTENTION_FAILURE_PREEMPTED = 2;
5424 ATTENTION_FAILURE_TIMED_OUT = 3;
5425 ATTENTION_FAILURE_UNKNOWN = 4;
5426 }
5427 optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN];
Ng Zhi An7ff7fdb2019-01-16 15:35:51 -08005428}
Michael Groover9e7b06e2018-12-28 19:55:51 -08005429
5430/**
5431 * Logs when an adb connection changes state.
5432 *
5433 * Logged from:
5434 * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java
5435 */
5436message AdbConnectionChanged {
5437 // The last time this system connected via adb, or 0 if the 'always allow' option was not
5438 // previously selected for this system.
5439 optional int64 last_connection_time_millis = 1;
5440
5441 // The time in ms within which a subsequent connection from an 'always allow' system is allowed
5442 // to reconnect via adb without user interaction.
5443 optional int64 auth_window_millis = 2;
5444
5445 // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto.
5446 optional android.debug.AdbConnectionStateEnum state = 3;
5447
5448 // True if the 'always allow' option was selected for this system.
5449 optional bool always_allow = 4;
5450}
Carter Hsub8fd1e92019-01-11 15:24:45 +08005451
5452/*
5453 * Logs the reported speech DSP status.
5454 *
5455 * Logged from:
5456 * Vendor audio implementation.
5457 */
5458message SpeechDspStatReported {
5459 // The total Speech DSP uptime in milliseconds.
5460 optional int32 total_uptime_millis = 1;
5461 // The total Speech DSP downtime in milliseconds.
5462 optional int32 total_downtime_millis = 2;
5463 optional int32 total_crash_count = 3;
5464 optional int32 total_recover_count = 4;
5465}
Badhri Jagan Sridharan129c7292019-01-14 21:18:25 -08005466
5467/**
5468 * Logs USB connector contaminant status.
5469 *
5470 * Logged from: USB Service.
5471 */
5472message UsbContaminantReported {
5473 optional string id = 1;
5474 optional android.service.usb.ContaminantPresenceStatus status = 2;
5475}
Olivier Gaillard18d452202019-01-22 15:03:41 +00005476
5477/**
5478 * This atom is for debugging purpose.
5479 */
5480message DebugElapsedClock {
5481 // Monotically increasing value for each pull.
5482 optional int64 pull_count = 1;
5483 // Time from System.elapsedRealtime.
5484 optional int64 elapsed_clock_millis = 2;
5485 // Time from System.elapsedRealtime.
5486 optional int64 same_elapsed_clock_millis = 3;
5487 // Diff between current elapsed time and elapsed time from previous pull.
5488 optional int64 elapsed_clock_diff_millis = 4;
5489
5490 enum Type {
5491 TYPE_UNKNOWN = 0;
5492 ALWAYS_PRESENT = 1;
5493 PRESENT_ON_ODD_PULLS = 2;
5494 }
5495 // Type of behavior for the pulled data.
5496 optional Type type = 5;
5497}
5498
5499/**
5500 * This atom is for debugging purpose.
5501 */
5502message DebugFailingElapsedClock {
5503 // Monotically increasing value for each pull.
5504 optional int64 pull_count = 1;
5505 // Time from System.elapsedRealtime.
5506 optional int64 elapsed_clock_millis = 2;
5507 // Time from System.elapsedRealtime.
5508 optional int64 same_elapsed_clock_millis = 3;
5509 // Diff between current elapsed time and elapsed time from previous pull.
5510 optional int64 elapsed_clock_diff_millis = 4;
5511}
Steven Wuacef6bb2019-01-23 14:21:17 -05005512
5513/** Logs System UI bubbles event changed.
5514 *
5515 * Logged from:
5516 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles
5517 */
5518message BubbleUIChanged {
5519
5520 // The app package that is posting the bubble.
5521 optional string package_name = 1;
5522
5523 // The notification channel that is posting the bubble.
5524 optional string notification_channel = 2;
5525
5526 // The notification id associated with the posted bubble.
5527 optional int32 notification_id = 3;
5528
5529 // The position of the bubble within the bubble stack.
5530 optional int32 position = 4;
5531
5532 // The total number of bubbles within the bubble stack.
5533 optional int32 total_number = 5;
5534
5535 // User interactions with the bubble.
5536 enum Action {
5537 UNKNOWN = 0;
5538 POSTED = 1;
5539 UPDATED = 2;
5540 EXPANDED = 3;
5541 COLLAPSED = 4;
5542 DISMISSED = 5;
5543 STACK_DISMISSED = 6;
5544 STACK_MOVED = 7;
5545 HEADER_GO_TO_APP = 8;
5546 HEADER_GO_TO_SETTINGS = 9;
5547 PERMISSION_OPT_IN = 10;
5548 PERMISSION_OPT_OUT = 11;
Steven Wua62cb6a2019-02-15 17:12:51 -05005549 PERMISSION_DIALOG_SHOWN = 12;
Steven Wuacef6bb2019-01-23 14:21:17 -05005550 SWIPE_LEFT = 13;
5551 SWIPE_RIGHT = 14;
Steven Wua254dab2019-01-29 11:30:39 -05005552 STACK_EXPANDED = 15;
Steven Wuacef6bb2019-01-23 14:21:17 -05005553 }
5554 optional Action action = 6;
5555
5556 // Normalized screen position of the bubble stack. The range is between 0 and 1.
5557 optional float normalized_x_position = 7;
5558 optional float normalized_y_position = 8;
5559}
Kweku Adams8845d012018-12-11 20:06:45 -08005560
5561/**
Steven Wu552f63f2019-02-05 13:41:36 -05005562 * Logs System UI bubbles developer errors.
5563 *
5564 * Logged from:
5565 * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
5566 */
5567message BubbleDeveloperErrorReported {
5568
5569 // The app package that is posting the bubble.
5570 optional string package_name = 1;
5571
5572 // Bubble developer error type enums.
5573 enum Error {
5574 UNKNOWN = 0;
5575 ACTIVITY_INFO_MISSING = 1;
5576 ACTIVITY_INFO_NOT_RESIZABLE = 2;
5577 DOCUMENT_LAUNCH_NOT_ALWAYS = 3;
5578 }
5579 optional Error error = 2 [default = UNKNOWN];
5580}
5581
5582/**
Kweku Adams8845d012018-12-11 20:06:45 -08005583 * Logs that a constraint for a scheduled job has changed.
5584 *
5585 * Logged from:
5586 * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java
5587 */
5588message ScheduledJobConstraintChanged {
5589 repeated AttributionNode attribution_node = 1;
5590
5591 // Name of the job.
5592 optional string job_name = 2;
5593
5594 optional com.android.server.job.ConstraintEnum constraint = 3;
5595
5596 enum State {
Kweku Adamse8db3ab2019-02-27 14:30:34 -08005597 UNKNOWN = 0;
5598 UNSATISFIED = 1;
5599 SATISFIED = 2;
Kweku Adams8845d012018-12-11 20:06:45 -08005600 }
5601 optional State state = 4;
5602}
Alex Salod7c3eef2019-01-25 14:43:27 -08005603
5604/**
5605 * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check
5606 * returns true.
5607 *
5608 * Logged from:
5609 * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
5610 */
5611message ScreenTimeoutExtensionReported {
5612 // Describes how many times in a row did the power manager reset the screen off timeout.
5613 optional uint32 consecutive_timeout_extended_count = 1;
5614}
Hui Yu885aca12019-01-10 17:11:34 -08005615
5616/*
5617* Logs number of milliseconds it takes to start a process.
5618* The definition of app process start time is from the app launch time to
5619* the time that Zygote finished forking the app process and loaded the
5620* application package's java classes.
5621
5622* This metric is different from AppStartOccurred which is for foreground
5623* activity only.
5624
5625* ProcessStartTime can report all processes (both foreground and background)
5626* start time.
5627*
5628* Logged from:
5629* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
5630*/
5631message ProcessStartTime {
5632 // The uid of the ProcessRecord.
5633 optional int32 uid = 1 [(is_uid) = true];
5634
5635 // The process pid.
5636 optional int32 pid = 2;
5637
5638 // The process name.
5639 // Usually package name, "system" for system server.
5640 // Provided by ActivityManagerService.
5641 optional string process_name = 3;
5642
5643 enum StartType {
5644 UNKNOWN = 0;
5645 WARM = 1;
5646 HOT = 2;
5647 COLD = 3;
5648 }
5649
5650 // The start type.
5651 optional StartType type = 4;
5652
5653 // The elapsed realtime at the start of the process.
5654 optional int64 process_start_time_millis = 5;
5655
5656 // Number of milliseconds it takes to reach bind application.
5657 optional int32 bind_application_delay_millis = 6;
5658
5659 // Number of milliseconds it takes to finish start of the process.
5660 optional int32 process_start_delay_millis = 7;
5661
5662 // hostingType field in ProcessRecord, the component type such as "activity",
5663 // "service", "content provider", "broadcast" or other strings.
5664 optional string hosting_type = 8;
5665
5666 // hostingNameStr field in ProcessRecord. The component class name that runs
5667 // in this process.
5668 optional string hosting_name = 9;
5669}
5670
Philip P. Moltmannf21a3502019-01-30 09:53:04 -08005671/**
5672 * State of a dangerous permission requested by a package
5673 */
5674message DangerousPermissionState {
5675 // Name of the permission
5676 optional string permission_name = 1;
5677
5678 // Uid of the package
5679 optional int32 uid = 2 [(is_uid) = true];
5680
5681 // Package requesting the permission
5682 optional string package_name = 3;
5683
5684 // If the permission is granted to the uid
5685 optional bool is_granted = 4;
5686}
5687
Michael Groover4a0ca942019-01-24 17:41:25 -08005688/**
5689 * Logs when a package is denied access to a device identifier based on the new access requirements.
5690 *
5691 * Logged from:
5692 * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
5693 */
5694message DeviceIdentifierAccessDenied {
5695 // The name of the package denied access to the requested device identifier.
5696 optional string package_name = 1;
5697
5698 // The name of the device identifier method the package attempted to invoke.
5699 optional string method_name = 2;
5700
5701 // True if the package is preinstalled.
5702 optional bool is_preinstalled = 3;
5703
5704 // True if the package is privileged.
5705 optional bool is_priv_app = 4;
5706}
Chenjie Yue13f44a2019-02-07 17:51:38 -08005707
5708/**
Chenjie Yue13f44a2019-02-07 17:51:38 -08005709 * Pulls the ongoing mainline install train version code.
5710 * Pulled from StatsCompanionService
5711 */
5712message TrainInfo {
5713 optional int64 train_version_code = 1;
5714
5715 optional TrainExperimentIds train_experiment_id = 2;
Muhammad Qureshif4ca8242019-03-01 09:20:15 -08005716
5717 optional string train_name = 3;
5718
5719 enum Status {
5720 UNKNOWN = 0;
5721 INSTALL_REQUESTED = 1;
5722 INSTALL_STARTED = 2;
5723 INSTALL_STAGED_NOT_READY = 3;
5724 INSTALL_STAGED_READY = 4;
5725 INSTALL_SUCCESS = 5;
5726 INSTALL_FAILURE = 6;
5727 INSTALL_CANCELLED = 7;
5728 INSTALLER_ROLLBACK_REQUESTED = 8;
5729 INSTALLER_ROLLBACK_INITIATED = 9;
5730 INSTALLER_ROLLBACK_INITIATED_FAILURE = 10;
5731 INSTALLER_ROLLBACK_STAGED = 11;
5732 INSTALLER_ROLLBACK_STAGED_FAILURE = 12;
5733 INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13;
5734 INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14;
5735 INSTALLER_ROLLBACK_SUCCESS = 15;
5736 INSTALLER_ROLLBACK_FAILURE = 16;
5737 INSTALLER_ROLLBACK_CANCEL_STAGED_REMOVE_FROM_QUEUE = 17;
5738 INSTALLER_ROLLBACK_CANCEL_STAGED_DELETE_SESSION_INITIATED = 18;
5739 INSTALLER_ROLLBACK_CANCEL_STAGED_DELETE_SESSION_SUCCESS = 19;
5740 INSTALLER_ROLLBACK_CANCEL_STAGED_DELETE_SESSION_FAILURE = 20;
5741 }
5742 optional Status status = 4;
Chenjie Yue13f44a2019-02-07 17:51:38 -08005743}
joshmccloskey8c3322e2019-01-09 18:25:57 -08005744
5745/**
5746 * Logs the gesture stage changed event.
5747 *
5748 * Logged from:
5749 * frameworks/base/packages/SystemUI/
5750 */
5751message AssistGestureStageReported {
joshmccloskey99f39012019-02-20 14:45:08 -08005752 optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08005753}
5754
5755/**
5756 * Logs the feedback type.
5757 *
5758 * Logged from:
5759 * frameworks/base/packages/SystemUI/
5760 */
5761message AssistGestureFeedbackReported {
joshmccloskey99f39012019-02-20 14:45:08 -08005762 // Whether or not the gesture was used.
5763 optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08005764}
5765
5766/**
5767 * Logs the progress.
5768 *
5769 * Logged from:
5770 * frameworks/base/packages/SystemUI/
5771 */
5772message AssistGestureProgressReported {
joshmccloskey99f39012019-02-20 14:45:08 -08005773 // [0,100] progress for the assist gesture.
5774 optional int32 progress = 1;
joshmccloskey8c3322e2019-01-09 18:25:57 -08005775}
Neil Fullerdb14b482019-02-05 19:44:44 +00005776
5777/*
5778 * Information about the time zone data on a device.
5779 */
5780message TimeZoneDataInfo {
5781 // A version identifier for the data set on device. e.g. "2018i"
5782 optional string tzdb_version = 1;
5783}
Yiwei Zhang5c81b632019-03-01 15:39:46 -08005784
Yiwei Zhang4fb92892019-03-04 14:29:25 -08005785/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08005786 * Logs the GPU stats global health information.
5787 *
5788 * Logged from:
5789 * frameworks/native/services/gpuservice/gpustats/
5790 */
5791message GpuStatsGlobalInfo {
5792 // Package name of the gpu driver.
5793 optional string driver_package_name = 1;
5794
5795 // Version name of the gpu driver.
5796 optional string driver_version_name = 2;
5797
5798 // Version code of the gpu driver.
5799 optional int64 driver_version_code = 3;
5800
5801 // Build time of the gpu driver in UTC as seconds since January 1, 1970.
5802 optional int64 driver_build_time = 4;
5803
5804 // Total count of the gl driver gets loaded.
5805 optional int64 gl_loading_count = 5;
5806
5807 // Total count of the gl driver fails to be loaded.
5808 optional int64 gl_loading_failure_count = 6;
5809
5810 // Total count of the Vulkan driver gets loaded.
5811 optional int64 vk_loading_count = 7;
5812
5813 // Total count of the Vulkan driver fails to be loaded.
5814 optional int64 vk_loading_failure_count = 8;
5815}
5816
Yiwei Zhang4fb92892019-03-04 14:29:25 -08005817/**
5818 * GPU driver loading time info.
5819 */
5820message GpuDriverLoadingTime {
5821 // List of all the driver loading times for this app. The list size is
5822 // capped at 50.
5823 repeated int64 driver_loading_time = 1;
5824}
5825
5826/**
Yiwei Zhang5c81b632019-03-01 15:39:46 -08005827 * Logs the GPU stats per app health information.
5828 *
5829 * Logged from:
5830 * frameworks/native/services/gpuservice/gpustats/
5831 */
5832message GpuStatsAppInfo {
Yiwei Zhang4fb92892019-03-04 14:29:25 -08005833 // Package name of the application that loads the gpu driver. Total number
5834 // of different packages is capped at 100.
Yiwei Zhang5c81b632019-03-01 15:39:46 -08005835 optional string app_package_name = 1;
5836
5837 // Version code of the gpu driver this app loads.
5838 optional int64 driver_version_code = 2;
5839
Yiwei Zhang4fb92892019-03-04 14:29:25 -08005840 // gl driver loading time info.
5841 optional GpuDriverLoadingTime gl_driver_loading_time = 3
5842 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang5c81b632019-03-01 15:39:46 -08005843
Yiwei Zhang4fb92892019-03-04 14:29:25 -08005844 // Vulkan driver loading time info.
5845 optional GpuDriverLoadingTime vk_driver_loading_time = 4
5846 [(android.os.statsd.log_mode) = MODE_BYTES];
Yiwei Zhang5c81b632019-03-01 15:39:46 -08005847}
Rafal Slawikd4e87572019-03-12 13:08:38 +00005848
5849/*
5850 * Logs the size of the system ion heap.
5851 *
5852 * Pulled from StatsCompanionService.
5853 */
5854message SystemIonHeapSize {
5855 // Size of the system ion heap in bytes.
5856 optional int64 size_in_bytes = 1;
5857}
Chiachang Wang0e88ebf2019-03-21 10:18:07 +08005858
5859/**
5860 * Push network stack events.
5861 *
5862 * Log from:
5863 * frameworks/base/packages/NetworkStack/
5864 */
5865message NetworkStackReported {
5866 optional int32 eventId = 1;
5867 optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES];
5868}