Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | syntax = "proto2"; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 18 | |
| 19 | package android.os.statsd; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 20 | option java_package = "com.android.os"; |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 21 | option java_outer_classname = "AtomsProto"; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 22 | |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 23 | import "frameworks/base/cmds/statsd/src/atom_field_options.proto"; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 24 | import "frameworks/base/core/proto/android/app/enums.proto"; |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 25 | import "frameworks/base/core/proto/android/app/job/enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 26 | import "frameworks/base/core/proto/android/app/settings_enums.proto"; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 27 | import "frameworks/base/core/proto/android/bluetooth/a2dp/enums.proto"; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 28 | import "frameworks/base/core/proto/android/bluetooth/enums.proto"; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 29 | import "frameworks/base/core/proto/android/bluetooth/hci/enums.proto"; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 30 | import "frameworks/base/core/proto/android/bluetooth/hfp/enums.proto"; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 31 | import "frameworks/base/core/proto/android/bluetooth/smp/enums.proto"; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 32 | import "frameworks/base/core/proto/android/debug/enums.proto"; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 33 | import "frameworks/base/core/proto/android/hardware/biometrics/enums.proto"; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 34 | import "frameworks/base/core/proto/android/hardware/sensor/assist/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 35 | import "frameworks/base/core/proto/android/net/networkcapabilities.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 36 | import "frameworks/base/core/proto/android/os/enums.proto"; |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 37 | import "frameworks/base/core/proto/android/server/connectivity/data_stall_event.proto"; |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 38 | import "frameworks/base/core/proto/android/server/enums.proto"; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 39 | import "frameworks/base/core/proto/android/server/job/enums.proto"; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 40 | import "frameworks/base/core/proto/android/server/location/enums.proto"; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 41 | import "frameworks/base/core/proto/android/service/procstats_enum.proto"; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 42 | import "frameworks/base/core/proto/android/service/usb.proto"; |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 43 | import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto"; |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 44 | import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 45 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; |
| 46 | import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 47 | import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto"; |
| 48 | import "frameworks/base/core/proto/android/stats/enums.proto"; |
| 49 | import "frameworks/base/core/proto/android/stats/intelligence/enums.proto"; |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 50 | import "frameworks/base/core/proto/android/stats/launcher/launcher.proto"; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 51 | import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto"; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 52 | import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto"; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 53 | import "frameworks/base/core/proto/android/stats/style/style_enums.proto"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 54 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 55 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 56 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 57 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 58 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 59 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 60 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 61 | * raw stats log events from the Android system, also known as "atoms." |
| 62 | * |
| 63 | * This field contains a single oneof with all of the available messages. |
| 64 | * The stats-log-api-gen tool runs as part of the Android build and |
| 65 | * generates the android.util.StatsLog class, which contains the constants |
| 66 | * and methods that Android uses to log. |
| 67 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 68 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 69 | * Instead, statsd on Android constructs these messages synthetically, |
| 70 | * in the format defined here and in stats_log.proto. |
| 71 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 72 | message Atom { |
| 73 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 74 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 75 | // For StatsLog reasons, 1 is illegal and will not work. Must start at 2. |
| 76 | BleScanStateChanged ble_scan_state_changed = 2; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 77 | ProcessStateChanged process_state_changed = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 78 | BleScanResultReceived ble_scan_result_received = 4; |
| 79 | SensorStateChanged sensor_state_changed = 5; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 80 | GpsScanStateChanged gps_scan_state_changed = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 81 | SyncStateChanged sync_state_changed = 7; |
| 82 | ScheduledJobStateChanged scheduled_job_state_changed = 8; |
| 83 | ScreenBrightnessChanged screen_brightness_changed = 9; |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 84 | WakelockStateChanged wakelock_state_changed = 10; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 85 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11; |
| 86 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12; |
| 87 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 88 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14; |
| 89 | MemoryFactorStateChanged memory_factor_state_changed = 15; |
| 90 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16; |
| 91 | CachedKillReported cached_kill_reported = 17; |
| 92 | ProcessMemoryStatReported process_memory_stat_reported = 18; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 93 | LauncherUIChanged launcher_event = 19; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 94 | BatterySaverModeStateChanged battery_saver_mode_state_changed = 20; |
| 95 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21; |
| 96 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 97 | AudioStateChanged audio_state_changed = 23; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 98 | MediaCodecStateChanged media_codec_state_changed = 24; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 99 | CameraStateChanged camera_state_changed = 25; |
| 100 | FlashlightStateChanged flashlight_state_changed = 26; |
| 101 | UidProcessStateChanged uid_process_state_changed = 27; |
| 102 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28; |
| 103 | ScreenStateChanged screen_state_changed = 29; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 104 | BatteryLevelChanged battery_level_changed = 30; |
| 105 | ChargingStateChanged charging_state_changed = 31; |
| 106 | PluggedStateChanged plugged_state_changed = 32; |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 107 | InteractiveStateChanged interactive_state_changed = 33; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 108 | TouchEventReported touch_event_reported = 34; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 109 | WakeupAlarmOccurred wakeup_alarm_occurred = 35; |
| 110 | KernelWakeupReported kernel_wakeup_reported = 36; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 111 | WifiLockStateChanged wifi_lock_state_changed = 37; |
| 112 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38; |
| 113 | WifiScanStateChanged wifi_scan_state_changed = 39; |
| 114 | PhoneSignalStrengthChanged phone_signal_strength_changed = 40; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 115 | SettingChanged setting_changed = 41; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 116 | ActivityForegroundStateChanged activity_foreground_state_changed = 42; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 117 | IsolatedUidChanged isolated_uid_changed = 43; |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 118 | PacketWakeupOccurred packet_wakeup_occurred = 44; |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 119 | WallClockTimeShifted wall_clock_time_shifted = 45; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 120 | AnomalyDetected anomaly_detected = 46; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 121 | AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true]; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 122 | AppStartOccurred app_start_occurred = 48; |
| 123 | AppStartCanceled app_start_canceled = 49; |
| 124 | AppStartFullyDrawn app_start_fully_drawn = 50; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 125 | LmkKillOccurred lmk_kill_occurred = 51; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 126 | PictureInPictureStateChanged picture_in_picture_state_changed = 52; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 127 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 128 | LmkStateChanged lmk_state_changed = 54; |
| 129 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 130 | ShutdownSequenceReported shutdown_sequence_reported = 56; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 131 | BootSequenceReported boot_sequence_reported = 57; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 132 | DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 133 | OverlayStateChanged overlay_state_changed = 59; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 134 | ForegroundServiceStateChanged foreground_service_state_changed = 60; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 135 | CallStateChanged call_state_changed = 61; |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 136 | KeyguardStateChanged keyguard_state_changed = 62; |
| 137 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63; |
| 138 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 139 | AppDied app_died = 65; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 140 | ResourceConfigurationChanged resource_configuration_changed = 66; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 141 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67; |
| 142 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 143 | GpsSignalQualityChanged gps_signal_quality_changed = 69; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 144 | UsbConnectorStateChanged usb_connector_state_changed = 70; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 145 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 146 | HardwareFailed hardware_failed = 72; |
| 147 | PhysicalDropDetected physical_drop_detected = 73; |
| 148 | ChargeCyclesReported charge_cycles_reported = 74; |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 149 | MobileConnectionStateChanged mobile_connection_state_changed = 75; |
| 150 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 151 | UsbDeviceAttached usb_device_attached = 77; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 152 | AppCrashOccurred app_crash_occurred = 78; |
| 153 | ANROccurred anr_occurred = 79; |
| 154 | WTFOccurred wtf_occurred = 80; |
| 155 | LowMemReported low_mem_reported = 81; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 156 | GenericAtom generic_atom = 82; |
jianjin | 6eada30 | 2019-02-28 11:25:57 -0800 | [diff] [blame] | 157 | KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true]; |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 158 | VibratorStateChanged vibrator_state_changed = 84; |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 159 | DeferredJobStatsReported deferred_job_stats_reported = 85; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 160 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 161 | BiometricAcquired biometric_acquired = 87; |
| 162 | BiometricAuthenticated biometric_authenticated = 88; |
| 163 | BiometricErrorOccurred biometric_error_occurred = 89; |
Howard Ro | 0db8203 | 2019-04-07 18:43:34 -0700 | [diff] [blame] | 164 | // Atom number 90 is available for use. |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 165 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 166 | SlowIo slow_io = 92; |
| 167 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 168 | PhoneServiceStateChanged phone_service_state_changed = 94; |
| 169 | PhoneStateChanged phone_state_changed = 95; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 170 | UserRestrictionChanged user_restriction_changed = 96; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 171 | SettingsUIChanged settings_ui_changed = 97; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 172 | ConnectivityStateChanged connectivity_state_changed = 98; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 173 | // TODO: service state change is very noisy shortly after boot, as well |
| 174 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 175 | // Consider removing this if it becomes a problem |
| 176 | ServiceStateChanged service_state_changed = 99; |
| 177 | ServiceLaunchReported service_launch_reported = 100; |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 178 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 179 | BinaryPushStateChanged binary_push_state_changed = 102; |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 180 | DevicePolicyEvent device_policy_event = 103; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 181 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = |
| 182 | 104 [(log_from_module) = "docsui"]; |
| 183 | DocsUIFileOperationCopyMoveModeReported |
| 184 | docs_ui_file_op_copy_move_mode_reported = |
| 185 | 105 [(log_from_module) = "docsui"]; |
| 186 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = |
| 187 | 106 [(log_from_module) = "docsui"]; |
| 188 | DocsUIFileOperationReported docs_ui_provider_file_op = |
| 189 | 107 [(log_from_module) = "docsui"]; |
| 190 | DocsUIInvalidScopedAccessRequestReported |
| 191 | docs_ui_invalid_scoped_access_request = |
| 192 | 108 [(log_from_module) = "docsui"]; |
| 193 | DocsUILaunchReported docs_ui_launch_reported = |
| 194 | 109 [(log_from_module) = "docsui"]; |
| 195 | DocsUIRootVisitedReported docs_ui_root_visited = |
| 196 | 110 [(log_from_module) = "docsui"]; |
| 197 | DocsUIStartupMsReported docs_ui_startup_ms = |
| 198 | 111 [(log_from_module) = "docsui"]; |
| 199 | DocsUIUserActionReported docs_ui_user_action_reported = |
| 200 | 112 [(log_from_module) = "docsui"]; |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 201 | WifiEnabledStateChanged wifi_enabled_state_changed = 113; |
| 202 | WifiRunningStateChanged wifi_running_state_changed = 114; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 203 | AppCompacted app_compacted = 115; |
lifr | e82d8f6 | 2019-03-25 20:33:21 +0800 | [diff] [blame] | 204 | NetworkDnsEventReported network_dns_event_reported = 116 [(log_from_module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 205 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
| 206 | 117 [(log_from_module) = "docsui"]; |
| 207 | DocsUIPickResultReported docs_ui_pick_result_reported = |
| 208 | 118 [(log_from_module) = "docsui"]; |
| 209 | DocsUISearchModeReported docs_ui_search_mode_reported = |
| 210 | 119 [(log_from_module) = "docsui"]; |
| 211 | DocsUISearchTypeReported docs_ui_search_type_reported = |
| 212 | 120 [(log_from_module) = "docsui"]; |
Chiachang Wang | e512b26 | 2019-04-11 21:24:28 +0800 | [diff] [blame] | 213 | DataStallEvent data_stall_event = 121 [(log_from_module) = "network_stack"]; |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 214 | RescuePartyResetReported rescue_party_reset_reported = 122; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 215 | SignedConfigReported signed_config_reported = 123; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 216 | GnssNiEventReported gnss_ni_event_reported = 124; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 217 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = 125; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 218 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126; |
| 219 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 220 | AppDowngraded app_downgraded = 128; |
| 221 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
| 222 | LowStorageStateChanged low_storage_state_changed = 130; |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 223 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131; |
| 224 | GnssConfigurationReported gnss_configuration_reported = 132; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 225 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 226 | NfcErrorOccurred nfc_error_occurred = 134; |
| 227 | NfcStateChanged nfc_state_changed = 135; |
| 228 | NfcBeamOccurred nfc_beam_occurred = 136; |
| 229 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137; |
| 230 | NfcTagOccurred nfc_tag_occurred = 138; |
| 231 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139; |
| 232 | SeStateChanged se_state_changed = 140; |
| 233 | SeOmapiReported se_omapi_reported = 141; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 234 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 235 | AttentionManagerServiceResultReported attention_manager_service_result_reported = 143; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 236 | AdbConnectionChanged adb_connection_changed = 144; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 237 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 238 | UsbContaminantReported usb_contaminant_reported = 146; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 239 | WatchdogRollbackOccurred watchdog_rollback_occurred = 147; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 240 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 241 | BubbleUIChanged bubble_ui_changed = 149; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 242 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 243 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151; |
| 244 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152; |
| 245 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153; |
| 246 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154; |
| 247 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155; |
| 248 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156; |
| 249 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157; |
| 250 | BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158; |
| 251 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 252 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160; |
| 253 | BluetoothQualityReportReported bluetooth_quality_report_reported = 161; |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 254 | BluetoothDeviceInfoReported bluetooth_device_info_reported = 162; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 255 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163; |
| 256 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164; |
| 257 | BluetoothBondStateChanged bluetooth_bond_state_changed = 165; |
| 258 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166; |
| 259 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167; |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 260 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168; |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 261 | ProcessStartTime process_start_time = 169; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 262 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
| 263 | 170 [(log_from_module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 264 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 265 | DeviceIdentifierAccessDenied device_identifier_access_denied = 172; |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 266 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 267 | AssistGestureStageReported assist_gesture_stage_reported = 174; |
| 268 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175; |
| 269 | AssistGestureProgressReported assist_gesture_progress_reported = 176; |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 270 | TouchGestureClassified touch_gesture_classified = 177; |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 271 | HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true]; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 272 | StyleUIChanged style_ui_changed = 179; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 273 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 274 | 180 [(log_from_module) = "permissioncontroller"]; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 275 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181; |
Chiachang Wang | e512b26 | 2019-04-11 21:24:28 +0800 | [diff] [blame] | 276 | NetworkStackReported network_stack_reported = 182 [(log_from_module) = "network_stack"]; |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 277 | AppMovedStorageReported app_moved_storage_reported = 183; |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 278 | BiometricEnrolled biometric_enrolled = 184; |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 279 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185; |
| 280 | TombStoneOccurred tomb_stone_occurred = 186; |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 281 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = 187; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 282 | IntelligenceEventReported intelligence_event_reported = |
| 283 | 188 [(log_from_module) = "intelligence"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 284 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 285 | RoleRequestResultReported role_request_result_reported = |
| 286 | 190 [(log_from_module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 287 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 288 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 289 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 290 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 291 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 292 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 293 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 294 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 295 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 296 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 297 | VehicleMapServicePacketReported vms_packet_reported = 201; |
| 298 | VehicleMapServicePacketFailureReported vms_packet_failure_reported = 202; |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 299 | CarPowerStateChanged car_power_state_changed = 203; |
| 300 | GarageModeInfo garage_mode_info = 204; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 301 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 302 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 303 | // Pulled events will start at field 10000. |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 304 | // Next: 10059 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 305 | oneof pulled { |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 306 | WifiBytesTransfer wifi_bytes_transfer = 10000; |
| 307 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; |
| 308 | MobileBytesTransfer mobile_bytes_transfer = 10002; |
| 309 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 310 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 311 | KernelWakelock kernel_wakelock = 10004; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 312 | SubsystemSleepState subsystem_sleep_state = 10005; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 313 | CpuTimePerFreq cpu_time_per_freq = 10008; |
| 314 | CpuTimePerUid cpu_time_per_uid = 10009; |
| 315 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 316 | WifiActivityInfo wifi_activity_info = 10011; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 317 | ModemActivityInfo modem_activity_info = 10012; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 318 | BluetoothActivityInfo bluetooth_activity_info = 10007; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 319 | ProcessMemoryState process_memory_state = 10013; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 320 | SystemElapsedRealtime system_elapsed_realtime = 10014; |
| 321 | SystemUptime system_uptime = 10015; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 322 | CpuActiveTime cpu_active_time = 10016; |
| 323 | CpuClusterTime cpu_cluster_time = 10017; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 324 | DiskSpace disk_space = 10018 [deprecated=true]; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 325 | RemainingBatteryCapacity remaining_battery_capacity = 10019; |
| 326 | FullBatteryCapacity full_battery_capacity = 10020; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 327 | Temperature temperature = 10021; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 328 | BinderCalls binder_calls = 10022; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 329 | BinderCallsExceptions binder_calls_exceptions = 10023; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 330 | LooperStats looper_stats = 10024; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 331 | DiskStats disk_stats = 10025; |
| 332 | DirectoryUsage directory_usage = 10026; |
| 333 | AppSize app_size = 10027; |
| 334 | CategorySize category_size = 10028; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 335 | ProcStats proc_stats = 10029; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 336 | BatteryVoltage battery_voltage = 10030; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 337 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031; |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 338 | DiskIo disk_io = 10032; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 339 | PowerProfile power_profile = 10033; |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 340 | ProcStatsPkgProc proc_stats_pkg_proc = 10034; |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 341 | ProcessCpuTime process_cpu_time = 10035; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 342 | NativeProcessMemoryState native_process_memory_state = 10036; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 343 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 344 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 345 | DeviceCalculatedPowerUse device_calculated_power_use = 10039; |
| 346 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040; |
| 347 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 348 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042; |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 349 | BatteryLevel battery_level = 10043; |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 350 | BuildInformation build_information = 10044; |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 351 | BatteryCycleCount battery_cycle_count = 10045; |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 352 | DebugElapsedClock debug_elapsed_clock = 10046; |
| 353 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 354 | NumFacesEnrolled num_faces_enrolled = 10048; |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 355 | RoleHolder role_holder = 10049; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 356 | DangerousPermissionState dangerous_permission_state = 10050; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 357 | TrainInfo train_info = 10051; |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 358 | TimeZoneDataInfo time_zone_data_info = 10052; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 359 | ExternalStorageInfo external_storage_info = 10053; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 360 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 361 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 362 | SystemIonHeapSize system_ion_heap_size = 10056; |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 363 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057; |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 364 | FaceSettings face_settings = 10058; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 365 | CoolingDevice cooling_device = 10059; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame^] | 366 | AppOps app_ops = 10060; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 367 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 368 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 369 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 370 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 371 | // Field numbers 200,000 and above are reserved for future use; do not use them at all. |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 372 | } |
| 373 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 374 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 375 | * This proto represents a node of an attribution chain. |
| 376 | * Note: All attribution chains are represented as a repeated field of type |
| 377 | * AttributionNode. It is understood that in such arrays, the order is that |
| 378 | * of calls, that is [A, B, C] if A calls B that calls C. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 379 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 380 | message AttributionNode { |
| 381 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 382 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 383 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 384 | // The (optional) string tag for an element in the attribution chain. If the |
| 385 | // element has no tag, it is encoded as an empty string. |
| 386 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 387 | } |
| 388 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 389 | message KeyValuePair { |
| 390 | optional int32 key = 1; |
| 391 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 392 | int32 value_int = 2; |
| 393 | int64 value_long = 3; |
| 394 | string value_str = 4; |
| 395 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 396 | } |
| 397 | } |
| 398 | |
| 399 | message KeyValuePairsAtom { |
| 400 | optional int32 uid = 1; |
| 401 | repeated KeyValuePair pairs = 2; |
| 402 | } |
| 403 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 404 | /* |
| 405 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 406 | * Below are all of the individual atoms that are logged by Android via statsd. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 407 | * |
| 408 | * RULES: |
| 409 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 410 | * Skipping field ids is not allowed. |
| 411 | * - These form an API, so renaming, renumbering or removing fields is |
| 412 | * not allowed between android releases. (This is not currently enforced, |
| 413 | * but there will be a tool to enforce this restriction). |
| 414 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 415 | * are allowed (yet). The bytes type is also not allowed. |
| 416 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 417 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 418 | * - If an atom represents work that can be attributed to an app, there can |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 419 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 420 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 421 | * annotation. The generated code on android will be represented by UIDs, |
| 422 | * and those UIDs will be translated in xxx to those strings. |
| 423 | * |
| 424 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 425 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 426 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 427 | * ***************************************************************************** |
| 428 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 429 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 430 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 431 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 432 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 433 | * |
| 434 | * Logged from: |
| 435 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 436 | */ |
| 437 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 438 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 439 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 440 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 441 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 442 | enum State { |
| 443 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 444 | START = 1; // START indicated that throttling was triggered. |
| 445 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 446 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 447 | optional State state = 2; |
| 448 | |
| 449 | optional float temperature = 3; |
| 450 | } |
| 451 | |
| 452 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 453 | * Logs when the screen state changes. |
| 454 | * |
| 455 | * Logged from: |
| 456 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 457 | */ |
| 458 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 459 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 460 | optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 461 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 462 | |
| 463 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 464 | * Logs that the process state of the uid, as determined by ActivityManager |
| 465 | * (i.e. the highest process state of that uid's processes) has changed. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 466 | * |
| 467 | * Logged from: |
| 468 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 469 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 470 | message UidProcessStateChanged { |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 471 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 472 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 473 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 474 | optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 475 | } |
| 476 | |
| 477 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 478 | * Logs process state change of a process, as per the activity manager. |
| 479 | * |
| 480 | * Logged from: |
| 481 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 482 | */ |
| 483 | message ProcessStateChanged { |
| 484 | optional int32 uid = 1; |
| 485 | optional string process_name = 2; |
| 486 | optional string package_name = 3; |
| 487 | // TODO: remove this when validation is done |
| 488 | optional int64 version = 5; |
| 489 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 490 | optional android.app.ProcessStateEnum state = 4; |
| 491 | } |
| 492 | |
| 493 | /** |
| 494 | * Logs when ActivityManagerService sleep state is changed. |
| 495 | * |
| 496 | * Logged from: |
| 497 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 498 | */ |
| 499 | message ActivityManagerSleepStateChanged { |
| 500 | // TODO: import frameworks proto |
| 501 | enum State { |
| 502 | UNKNOWN = 0; |
| 503 | ASLEEP = 1; |
| 504 | AWAKE = 2; |
| 505 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 506 | optional State state = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 507 | } |
| 508 | |
| 509 | /** |
| 510 | * Logs when system memory state changes. |
| 511 | * |
| 512 | * Logged from: |
| 513 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 514 | */ |
| 515 | message MemoryFactorStateChanged { |
| 516 | // TODO: import frameworks proto |
| 517 | enum State { |
| 518 | MEMORY_UNKNOWN = 0; |
| 519 | NORMAL = 1; // normal. |
| 520 | MODERATE = 2; // moderate memory pressure. |
| 521 | LOW = 3; // low memory. |
| 522 | CRITICAL = 4; // critical memory. |
| 523 | |
| 524 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 525 | optional State factor = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 526 | } |
| 527 | |
| 528 | /** |
| 529 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 530 | * |
| 531 | * Logged from: |
| 532 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 533 | */ |
| 534 | message ExcessiveCpuUsageReported { |
| 535 | optional int32 uid = 1; |
| 536 | optional string process_name = 2; |
| 537 | optional string package_name = 3; |
| 538 | // package version. TODO: remove this when validation is done |
| 539 | optional int64 version = 4; |
| 540 | } |
| 541 | |
| 542 | /** |
| 543 | * Logs when a cached process is killed, along with its pss. |
| 544 | * |
| 545 | * Logged from: |
| 546 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 547 | */ |
| 548 | message CachedKillReported { |
| 549 | optional int32 uid = 1; |
| 550 | optional string process_name = 2; |
| 551 | optional string package_name = 3; |
| 552 | // TODO: remove this when validation is done |
| 553 | optional int64 version = 5; |
| 554 | optional int64 pss = 4; |
| 555 | } |
| 556 | |
| 557 | /** |
| 558 | * Logs when memory stats of a process is reported. |
| 559 | * |
| 560 | * Logged from: |
| 561 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 562 | */ |
| 563 | message ProcessMemoryStatReported { |
| 564 | optional int32 uid = 1; |
| 565 | optional string process_name = 2; |
| 566 | optional string package_name = 3; |
| 567 | //TODO: remove this when validation is done |
| 568 | optional int64 version = 9; |
| 569 | optional int64 pss = 4; |
| 570 | optional int64 uss = 5; |
| 571 | optional int64 rss = 6; |
| 572 | enum Type { |
| 573 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 574 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 575 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 576 | ADD_PSS_EXTERNAL = 3; |
| 577 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 578 | } |
| 579 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 580 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 581 | } |
| 582 | |
| 583 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 584 | * Logs that a process started, finished, crashed, or ANRed. |
| 585 | * |
| 586 | * Logged from: |
| 587 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 588 | */ |
| 589 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 590 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 591 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 592 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 593 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 594 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 595 | // What lifecycle state the process changed to. |
| 596 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 597 | enum State { |
| 598 | FINISHED = 0; |
| 599 | STARTED = 1; |
| 600 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 601 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 602 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 603 | } |
| 604 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 605 | /** |
| 606 | * Logs when the ble scan state changes. |
| 607 | * |
| 608 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 609 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 610 | */ |
| 611 | message BleScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 612 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 613 | |
| 614 | enum State { |
| 615 | OFF = 0; |
| 616 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 617 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 618 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 619 | } |
| 620 | optional State state = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 621 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 622 | // Does the scan have a filter. |
| 623 | optional bool is_filtered = 3; |
| 624 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
| 625 | optional bool is_first_match = 4; |
| 626 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
| 627 | optional bool is_opportunistic = 5; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 628 | } |
| 629 | |
| 630 | /** |
| 631 | * Logs reporting of a ble scan finding results. |
| 632 | * |
| 633 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 634 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 635 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 636 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 637 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 638 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 639 | |
| 640 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 641 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 642 | } |
| 643 | |
| 644 | /** |
| 645 | * Logs when a sensor state changes. |
| 646 | * |
| 647 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 648 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 649 | */ |
| 650 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 651 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 652 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 653 | // The id (int) of the sensor. |
| 654 | optional int32 sensor_id = 2; |
| 655 | |
| 656 | enum State { |
| 657 | OFF = 0; |
| 658 | ON = 1; |
| 659 | } |
| 660 | optional State state = 3; |
| 661 | } |
| 662 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 663 | /** |
| 664 | * Logs when GPS state changes. |
| 665 | * |
| 666 | * Logged from: |
| 667 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 668 | */ |
| 669 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 670 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 671 | |
| 672 | enum State { |
| 673 | OFF = 0; |
| 674 | ON = 1; |
| 675 | } |
| 676 | optional State state = 2; |
| 677 | } |
| 678 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 679 | /** |
| 680 | * Logs when GPS signal quality. |
| 681 | * |
| 682 | * Logged from: |
| 683 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 684 | */ |
| 685 | message GpsSignalQualityChanged { |
| 686 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 687 | } |
| 688 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 689 | |
| 690 | /** |
| 691 | * Logs when a sync manager sync state changes. |
| 692 | * |
| 693 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 694 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 695 | */ |
| 696 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 697 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 698 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 699 | // Name of the sync (as named in the app). Can be chosen at run-time. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 700 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 701 | |
| 702 | enum State { |
| 703 | OFF = 0; |
| 704 | ON = 1; |
| 705 | } |
| 706 | optional State state = 3; |
| 707 | } |
| 708 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 709 | /* |
| 710 | * Deferred job stats. |
| 711 | * |
| 712 | * Logged from: |
| 713 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 714 | */ |
| 715 | message DeferredJobStatsReported { |
| 716 | repeated AttributionNode attribution_node = 1; |
| 717 | |
| 718 | // Number of jobs deferred. |
| 719 | optional int32 num_jobs_deferred = 2; |
| 720 | |
| 721 | // Time since the last job runs. |
| 722 | optional int64 time_since_last_job_millis = 3; |
| 723 | } |
| 724 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 725 | /** |
| 726 | * Logs when a job scheduler job state changes. |
| 727 | * |
| 728 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 729 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 730 | */ |
| 731 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 732 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 733 | |
| 734 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 735 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 736 | |
| 737 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 738 | FINISHED = 0; |
| 739 | STARTED = 1; |
| 740 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 741 | } |
| 742 | optional State state = 3; |
| 743 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 744 | // The reason a job has stopped. |
| 745 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 746 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 747 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 748 | } |
| 749 | |
| 750 | /** |
| 751 | * Logs when the audio state changes. |
| 752 | * |
| 753 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 754 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 755 | */ |
| 756 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 757 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 758 | |
| 759 | enum State { |
| 760 | OFF = 0; |
| 761 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 762 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 763 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 764 | } |
| 765 | optional State state = 2; |
| 766 | } |
| 767 | |
| 768 | /** |
| 769 | * Logs when the video codec state changes. |
| 770 | * |
| 771 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 772 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 773 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 774 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 775 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 776 | |
| 777 | enum State { |
| 778 | OFF = 0; |
| 779 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 780 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 781 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 782 | } |
| 783 | optional State state = 2; |
| 784 | } |
| 785 | |
| 786 | /** |
| 787 | * Logs when the flashlight state changes. |
| 788 | * |
| 789 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 790 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 791 | */ |
| 792 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 793 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 794 | |
| 795 | enum State { |
| 796 | OFF = 0; |
| 797 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 798 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 799 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 800 | } |
| 801 | optional State state = 2; |
| 802 | } |
| 803 | |
| 804 | /** |
| 805 | * Logs when the camera state changes. |
| 806 | * |
| 807 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 808 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 809 | */ |
| 810 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 811 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 812 | |
| 813 | enum State { |
| 814 | OFF = 0; |
| 815 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 816 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 817 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 818 | } |
| 819 | optional State state = 2; |
| 820 | } |
| 821 | |
| 822 | /** |
| 823 | * Logs that the state of a wakelock (per app and per wakelock name) has changed. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 824 | * |
| 825 | * Logged from: |
| 826 | * TODO |
| 827 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 828 | message WakelockStateChanged { |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 829 | repeated AttributionNode attribution_node = 1; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 830 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 831 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 832 | // From frameworks/base/core/proto/android/os/enums.proto. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 833 | optional android.os.WakeLockLevelEnum type = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 834 | |
| 835 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 836 | optional string tag = 3; |
| 837 | |
| 838 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 839 | RELEASE = 0; |
| 840 | ACQUIRE = 1; |
| 841 | CHANGE_RELEASE = 2; |
| 842 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 843 | } |
| 844 | optional State state = 4; |
| 845 | } |
| 846 | |
| 847 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 848 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 849 | * |
| 850 | * Logged from: |
| 851 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 852 | */ |
| 853 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 854 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 855 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 856 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 857 | optional string tag = 2; |
| 858 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 859 | // TODO: I have no idea what this is. |
| 860 | optional string history_tag = 3; |
| 861 | |
| 862 | enum State { |
| 863 | OFF = 0; |
| 864 | ON = 1; |
| 865 | } |
| 866 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 867 | } |
| 868 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 869 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 870 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 871 | * |
| 872 | * Logged from: |
| 873 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 874 | */ |
| 875 | message InteractiveStateChanged { |
| 876 | enum State { |
| 877 | OFF = 0; |
| 878 | ON = 1; |
| 879 | } |
| 880 | optional State state = 1; |
| 881 | } |
| 882 | |
| 883 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 884 | * Logs Battery Saver state change. |
| 885 | * |
| 886 | * Logged from: |
| 887 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 888 | */ |
| 889 | message BatterySaverModeStateChanged { |
| 890 | enum State { |
| 891 | OFF = 0; |
| 892 | ON = 1; |
| 893 | } |
| 894 | optional State state = 1; |
| 895 | } |
| 896 | |
| 897 | /** |
| 898 | * Logs Doze mode state change. |
| 899 | * |
| 900 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 901 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 902 | */ |
| 903 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 904 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 905 | } |
| 906 | |
| 907 | |
| 908 | /** |
| 909 | * Logs state change of Doze mode including maintenance windows. |
| 910 | * |
| 911 | * Logged from: |
| 912 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 913 | */ |
| 914 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 915 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 916 | } |
| 917 | |
| 918 | /** |
| 919 | * Logs screen brightness level. |
| 920 | * |
| 921 | * Logged from: |
| 922 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 923 | */ |
| 924 | message ScreenBrightnessChanged { |
| 925 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 926 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 927 | } |
| 928 | |
| 929 | /** |
| 930 | * Logs battery level (percent full, from 0 to 100). |
| 931 | * |
| 932 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 933 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 934 | */ |
| 935 | message BatteryLevelChanged { |
| 936 | // Battery level. Should be in [0, 100]. |
| 937 | optional int32 battery_level = 1; |
| 938 | } |
| 939 | |
| 940 | /** |
| 941 | * Logs change in charging status of the device. |
| 942 | * |
| 943 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 944 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 945 | */ |
| 946 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 947 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 948 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 949 | } |
| 950 | |
| 951 | /** |
| 952 | * Logs whether the device is plugged in, and what power source it is using. |
| 953 | * |
| 954 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 955 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 956 | */ |
| 957 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 958 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 959 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 960 | } |
| 961 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 962 | /** |
| 963 | * Logs when an app's wakeup alarm fires. |
| 964 | * |
| 965 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 966 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 967 | */ |
| 968 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 969 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 970 | |
| 971 | // Name of the wakeup alarm. |
| 972 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 973 | |
| 974 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 975 | optional string package_name = 3; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 976 | } |
| 977 | |
| 978 | /** |
| 979 | * Logs when an an app causes the mobile radio to change state. |
| 980 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 981 | * |
| 982 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 983 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 984 | */ |
| 985 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 986 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 987 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 988 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 989 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 990 | } |
| 991 | |
| 992 | /** |
| 993 | * Logs when an an app causes the wifi radio to change state. |
| 994 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 995 | * |
| 996 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 997 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 998 | */ |
| 999 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1000 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1001 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1002 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1003 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1004 | } |
| 1005 | |
| 1006 | /** |
| 1007 | * Logs kernel wakeup reasons and aborts. |
| 1008 | * |
| 1009 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1010 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1011 | */ |
| 1012 | message KernelWakeupReported { |
| 1013 | // Name of the kernel wakeup reason (or abort). |
| 1014 | optional string wakeup_reason_name = 1; |
| 1015 | |
| 1016 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1017 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1018 | } |
| 1019 | |
| 1020 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1021 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1022 | * Note that Wifi may still perform certain functions (e.g. location scanning) even when disabled. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1023 | * |
| 1024 | * Logged from: |
| 1025 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1026 | */ |
| 1027 | message WifiEnabledStateChanged { |
| 1028 | enum State { |
| 1029 | OFF = 0; |
| 1030 | ON = 1; |
| 1031 | } |
| 1032 | optional State state = 1; |
| 1033 | } |
| 1034 | |
| 1035 | /** |
| 1036 | * Logs when an app causes Wifi to run. In this context, 'to run' means to use Wifi Client Mode. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1037 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1038 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1039 | * |
| 1040 | * Logged from: |
| 1041 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1042 | */ |
| 1043 | message WifiRunningStateChanged { |
| 1044 | repeated AttributionNode attribution_node = 1; |
| 1045 | |
| 1046 | enum State { |
| 1047 | OFF = 0; |
| 1048 | ON = 1; |
| 1049 | } |
| 1050 | optional State state = 2; |
| 1051 | } |
| 1052 | |
| 1053 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1054 | * Logs wifi locks held by an app. |
| 1055 | * |
| 1056 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1057 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1058 | */ |
| 1059 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1060 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1061 | |
| 1062 | enum State { |
| 1063 | OFF = 0; |
| 1064 | ON = 1; |
| 1065 | } |
| 1066 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1067 | |
| 1068 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1069 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1070 | } |
| 1071 | |
| 1072 | /** |
| 1073 | * Logs wifi signal strength changes. |
| 1074 | * |
| 1075 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1076 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1077 | */ |
| 1078 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1079 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1080 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1081 | } |
| 1082 | |
| 1083 | /** |
| 1084 | * Logs wifi scans performed by an app. |
| 1085 | * |
| 1086 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1087 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1088 | */ |
| 1089 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1090 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1091 | |
| 1092 | enum State { |
| 1093 | OFF = 0; |
| 1094 | ON = 1; |
| 1095 | } |
| 1096 | optional State state = 2; |
| 1097 | } |
| 1098 | |
| 1099 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1100 | * Logs wifi multicast locks held by an app |
| 1101 | * |
| 1102 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1103 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1104 | */ |
| 1105 | message WifiMulticastLockStateChanged { |
| 1106 | repeated AttributionNode attribution_node = 1; |
| 1107 | |
| 1108 | enum State { |
| 1109 | OFF = 0; |
| 1110 | ON = 1; |
| 1111 | } |
| 1112 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1113 | |
| 1114 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1115 | } |
| 1116 | |
| 1117 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1118 | * Logs shutdown reason and duration on next boot. |
| 1119 | * |
| 1120 | * Logged from: |
| 1121 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1122 | */ |
| 1123 | message ShutdownSequenceReported { |
| 1124 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1125 | optional bool reboot = 1; |
| 1126 | |
| 1127 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1128 | optional string reason = 2; |
| 1129 | |
| 1130 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1131 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1132 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1133 | |
| 1134 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1135 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1136 | } |
| 1137 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1138 | |
| 1139 | /** |
| 1140 | * Logs boot reason and duration. |
| 1141 | * |
| 1142 | * Logged from: |
| 1143 | * system/core/bootstat/bootstat.cpp |
| 1144 | */ |
| 1145 | message BootSequenceReported { |
| 1146 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1147 | // Default: "<EMPTY>" if not available. |
| 1148 | optional string bootloader_reason = 1; |
| 1149 | |
| 1150 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1151 | // Default: "<EMPTY>" if not available. |
| 1152 | optional string system_reason = 2; |
| 1153 | |
| 1154 | // End of boot time in ms from unix epoch using system wall clock. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1155 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1156 | |
| 1157 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1158 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1159 | |
| 1160 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1161 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1162 | |
| 1163 | // Time since last boot in ms. Default: 0 if not available. |
| 1164 | optional int64 time_since_last_boot = 6; |
| 1165 | } |
| 1166 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1167 | |
| 1168 | /** |
| 1169 | * Logs call state and disconnect cause (if applicable). |
| 1170 | * |
| 1171 | * Logged from: |
| 1172 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1173 | */ |
| 1174 | message CallStateChanged { |
| 1175 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1176 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1177 | optional android.telecom.CallStateEnum call_state = 1; |
| 1178 | |
| 1179 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1180 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1181 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1182 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1183 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1184 | |
| 1185 | // True if the call is self-managed, which are apps that use the |
| 1186 | // telecom infrastructure to make their own calls. |
| 1187 | optional bool self_managed = 3; |
| 1188 | |
| 1189 | // True if call is external. External calls are calls on connected Wear |
| 1190 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1191 | optional bool external_call = 4; |
| 1192 | } |
| 1193 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1194 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1195 | * Logs keyguard state. The keyguard is the lock screen. |
| 1196 | * |
| 1197 | * Logged from: |
| 1198 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1199 | */ |
| 1200 | message KeyguardStateChanged { |
| 1201 | enum State { |
| 1202 | UNKNOWN = 0; |
| 1203 | // The keyguard is hidden when the phone is unlocked. |
| 1204 | HIDDEN = 1; |
| 1205 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1206 | SHOWN= 2; |
| 1207 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1208 | // Eg. Opening the camera while on the lock screen. |
| 1209 | OCCLUDED = 3; |
| 1210 | } |
| 1211 | optional State state = 1; |
| 1212 | } |
| 1213 | |
| 1214 | /** |
| 1215 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1216 | * prompts the user to enter a password (pattern, pin, etc). |
| 1217 | * |
| 1218 | * Logged from: |
| 1219 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1220 | */ |
| 1221 | |
| 1222 | message KeyguardBouncerStateChanged { |
| 1223 | enum State { |
| 1224 | UNKNOWN = 0; |
| 1225 | // Bouncer is hidden, either as a result of successfully entering the |
| 1226 | // password, screen timing out, or user going back to lock screen. |
| 1227 | HIDDEN = 1; |
| 1228 | // This is when the user is being prompted to enter the password. |
| 1229 | SHOWN = 2; |
| 1230 | } |
| 1231 | optional State state = 1; |
| 1232 | } |
| 1233 | |
| 1234 | /** |
| 1235 | * Logs the result of entering a password into the keyguard bouncer. |
| 1236 | * |
| 1237 | * Logged from: |
| 1238 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1239 | */ |
| 1240 | message KeyguardBouncerPasswordEntered { |
| 1241 | enum BouncerResult { |
| 1242 | UNKNOWN = 0; |
| 1243 | // The password entered was incorrect. |
| 1244 | FAILURE = 1; |
| 1245 | // The password entered was correct. |
| 1246 | SUCCESS = 2; |
| 1247 | } |
| 1248 | optional BouncerResult result = 1; |
| 1249 | } |
| 1250 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1251 | /* |
| 1252 | * Logs changes to the configuration of the device. The configuration is defined |
| 1253 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1254 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1255 | * Please go there to interpret the possible values each field can be. |
| 1256 | * |
| 1257 | * Logged from: |
| 1258 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1259 | */ |
| 1260 | message ResourceConfigurationChanged { |
| 1261 | // Bit mask of color capabilities of the screen. |
| 1262 | // Contains information about the color gamut and hdr mode of the screen. |
| 1263 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1264 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1265 | |
| 1266 | // The target screen density being rendered to. |
| 1267 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1268 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1269 | |
| 1270 | // Current user preference for the scaling factor for fonts, |
| 1271 | // relative to the base density scaling. |
| 1272 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1273 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1274 | |
| 1275 | // Flag indicating whether the hard keyboard is hidden. |
| 1276 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1277 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1278 | |
| 1279 | // The type of keyboard attached to the device. |
| 1280 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1281 | optional int32 keyboard = 5; |
| 1282 | |
| 1283 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1284 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1285 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1286 | |
| 1287 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1288 | // 0 if undefined. |
| 1289 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1290 | optional int32 mcc = 7; |
| 1291 | |
| 1292 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1293 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1294 | // MNC_ZERO symbol defined in Configuration.java. |
| 1295 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1296 | optional int32 mnc = 8; |
| 1297 | |
| 1298 | // The kind of navigation available on the device. |
| 1299 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1300 | optional int32 navigation = 9; |
| 1301 | |
| 1302 | // Flag indicating whether the navigation is available. |
| 1303 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1304 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1305 | |
| 1306 | // Overall orientation of the screen. |
| 1307 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1308 | optional int32 orientation = 11; |
| 1309 | |
| 1310 | // The current height of the available screen space, in dp units. |
| 1311 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1312 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1313 | |
| 1314 | // Bit mask of overall layout of the screen. |
| 1315 | // Contains information about screen size, whether the screen is wider/taller |
| 1316 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1317 | // and whether the screen has a rounded shape. |
| 1318 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1319 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1320 | |
| 1321 | // Current width of the available screen space, in dp units. |
| 1322 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1323 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1324 | |
| 1325 | // The smallest screen size an application will see in normal operation. |
| 1326 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1327 | // in portrait and landscape. |
| 1328 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1329 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1330 | |
| 1331 | // The type of touch screen attached to the device. |
| 1332 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1333 | optional int32 touchscreen = 16; |
| 1334 | |
| 1335 | // Bit mask of the ui mode. |
| 1336 | // Contains information about the overall ui mode of the device. |
| 1337 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1338 | // Also contains information about whether the device is in night mode. |
| 1339 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1340 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1341 | } |
| 1342 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1343 | |
| 1344 | /** |
| 1345 | * Logs changes in the connection state of the mobile radio. |
| 1346 | * |
| 1347 | * Logged from: |
| 1348 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1349 | */ |
| 1350 | message MobileConnectionStateChanged { |
| 1351 | // States are from the state machine DataConnection.java. |
| 1352 | enum State { |
| 1353 | UNKNOWN = 0; |
| 1354 | // The connection is inactive, or disconnected. |
| 1355 | INACTIVE = 1; |
| 1356 | // The connection is being activated, or connecting. |
| 1357 | ACTIVATING = 2; |
| 1358 | // The connection is active, or connected. |
| 1359 | ACTIVE = 3; |
| 1360 | // The connection is disconnecting. |
| 1361 | DISCONNECTING = 4; |
| 1362 | // The connection is disconnecting after creating a connection. |
| 1363 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1364 | } |
| 1365 | optional State state = 1; |
| 1366 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1367 | optional int32 sim_slot_index = 2; |
| 1368 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1369 | // every new network created. Resets whenever the device reboots. |
| 1370 | optional int32 data_connection_id = 3; |
| 1371 | // A bitmask for the capabilities of this connection. |
| 1372 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1373 | // Default value (if we have no information): 0 |
| 1374 | optional int64 capabilities = 4; |
| 1375 | // If this connection has internet. |
| 1376 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1377 | optional bool has_internet = 5; |
| 1378 | } |
| 1379 | |
| 1380 | /** |
| 1381 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1382 | * |
| 1383 | * Logged from: |
| 1384 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1385 | */ |
| 1386 | message MobileRadioTechnologyChanged { |
| 1387 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1388 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1389 | optional int32 sim_slot_index = 2; |
| 1390 | } |
| 1391 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1392 | /** |
| 1393 | * Logs the VID and PID of any connected USB devices. |
| 1394 | * |
| 1395 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1396 | * |
| 1397 | * Logged by Vendor. |
| 1398 | */ |
| 1399 | message UsbDeviceAttached { |
| 1400 | optional int32 vid = 1; |
| 1401 | optional int32 pid = 2; |
| 1402 | optional bool has_audio = 3; |
| 1403 | optional bool has_hid = 4; |
| 1404 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1405 | enum State { |
| 1406 | STATE_DISCONNECTED = 0; |
| 1407 | STATE_CONNECTED = 1; |
| 1408 | } |
| 1409 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1410 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1411 | } |
| 1412 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1413 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1414 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1415 | * Logs when Bluetooth is enabled and disabled. |
| 1416 | * |
| 1417 | * Logged from: |
| 1418 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1419 | */ |
| 1420 | message BluetoothEnabledStateChanged { |
| 1421 | repeated AttributionNode attribution_node = 1; |
| 1422 | // Whether or not bluetooth is enabled on the device. |
| 1423 | enum State { |
| 1424 | UNKNOWN = 0; |
| 1425 | ENABLED = 1; |
| 1426 | DISABLED = 2; |
| 1427 | } |
| 1428 | optional State state = 2; |
| 1429 | // The reason for being enabled/disabled. |
| 1430 | // Eg. Airplane mode, crash, application request. |
| 1431 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1432 | // If the reason is an application request, this will be the package name. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1433 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1434 | } |
| 1435 | |
| 1436 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1437 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1438 | * |
| 1439 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1440 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1441 | * |
| 1442 | * Next Tag: 5 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1443 | */ |
| 1444 | message BluetoothConnectionStateChanged { |
| 1445 | // The state of the connection. |
| 1446 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1447 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1448 | // An identifier that can be used to match connect and disconnect events. |
| 1449 | // Currently is last two bytes of a hash of a device level ID and |
| 1450 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1451 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1452 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1453 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1454 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1455 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1456 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1457 | // An identifier that can be used to match events for this device. |
| 1458 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1459 | // Salt: Randomly generated 256 bit value |
| 1460 | // Hash algorithm: HMAC-SHA256 |
| 1461 | // Size: 32 byte |
| 1462 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1463 | optional bytes new_obfuscated_id = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1464 | } |
| 1465 | |
| 1466 | /** |
| 1467 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1468 | * |
| 1469 | * Logged from: |
| 1470 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1471 | * |
| 1472 | * Next Tag: 3 |
| 1473 | */ |
| 1474 | message BluetoothAclConnectionStateChanged { |
| 1475 | // An identifier that can be used to match events for this device. |
| 1476 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1477 | // Salt: Randomly generated 256 bit value |
| 1478 | // Hash algorithm: HMAC-SHA256 |
| 1479 | // Size: 32 byte |
| 1480 | // Default: null or empty if the device identifier is not known |
| 1481 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1482 | // The state of the connection. |
| 1483 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1484 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1485 | } |
| 1486 | |
| 1487 | /** |
| 1488 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1489 | * |
| 1490 | * Logged from: |
| 1491 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1492 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1493 | * |
| 1494 | * Next Tag: 4 |
| 1495 | */ |
| 1496 | message BluetoothScoConnectionStateChanged { |
| 1497 | // An identifier that can be used to match events for this device. |
| 1498 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1499 | // Salt: Randomly generated 256 bit value |
| 1500 | // Hash algorithm: HMAC-SHA256 |
| 1501 | // Size: 32 byte |
| 1502 | // Default: null or empty if the device identifier is not known |
| 1503 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1504 | // The state of the connection. |
| 1505 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1506 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1507 | // Codec used for this SCO connection |
| 1508 | // Default: UNKNOWN |
| 1509 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1510 | } |
| 1511 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1512 | /** |
| 1513 | * Logged when active device of a profile changes |
| 1514 | * |
| 1515 | * Logged from: |
| 1516 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1517 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1518 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1519 | */ |
| 1520 | message BluetoothActiveDeviceChanged { |
| 1521 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1522 | // From android.bluetooth.BluetoothProfile |
| 1523 | optional int32 bt_profile = 1; |
| 1524 | // An identifier that can be used to match events for this new active device. |
| 1525 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1526 | // Salt: Randomly generated 256 bit value |
| 1527 | // Hash algorithm: HMAC-SHA256 |
| 1528 | // Size: 32 byte |
| 1529 | // Default: null or empty if there is no active device for this profile |
| 1530 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1531 | } |
| 1532 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1533 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1534 | // - This event is triggered when there is a related HCI command or event |
| 1535 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1536 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1537 | // receiving command complete |
| 1538 | // - HCI events are logged when they arrive |
| 1539 | // |
| 1540 | // Low level log from system/bt |
| 1541 | // |
| 1542 | // Bluetooth classic commands: |
| 1543 | // - CMD_CREATE_CONNECTION |
| 1544 | // - CMD_DISCONNECT |
| 1545 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1546 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1547 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1548 | // - CMD_SETUP_ESCO_CONNECTION |
| 1549 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1550 | // - CMD_REJECT_ESCO_CONNECTION |
| 1551 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1552 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1553 | // |
| 1554 | // Bluetooth low energy commands: |
| 1555 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1556 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1557 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1558 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1559 | // - CMD_BLE_ADD_WHITE_LIST |
| 1560 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1561 | // |
| 1562 | // Bluetooth classic events: |
| 1563 | // - EVT_CONNECTION_COMP |
| 1564 | // - EVT_CONNECTION_REQUEST |
| 1565 | // - EVT_DISCONNECTION_COMP |
| 1566 | // - EVT_ESCO_CONNECTION_COMP |
| 1567 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1568 | // |
| 1569 | // Bluetooth low energy meta events: |
| 1570 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1571 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1572 | // |
| 1573 | // Next tag: 10 |
| 1574 | message BluetoothLinkLayerConnectionEvent { |
| 1575 | // An identifier that can be used to match events for this device. |
| 1576 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1577 | // Salt: Randomly generated 256 bit value |
| 1578 | // Hash algorithm: HMAC-SHA256 |
| 1579 | // Size: 32 byte |
| 1580 | // Default: null or empty if the device identifier is not known |
| 1581 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1582 | // Connection handle of this connection if available |
| 1583 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1584 | // Default: 0xFFFF if the handle is unknown |
| 1585 | optional int32 connection_handle = 2; |
| 1586 | // Direction of the link |
| 1587 | // Default: DIRECTION_UNKNOWN |
| 1588 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1589 | // Type of this link |
| 1590 | // Default: LINK_TYPE_UNKNOWN |
| 1591 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1592 | |
| 1593 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1594 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1595 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1596 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1597 | // set and valid, ignore hci_ble_event |
| 1598 | |
| 1599 | // HCI command associated with this event |
| 1600 | // Default: CMD_UNKNOWN |
| 1601 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1602 | // HCI event associated with this event |
| 1603 | // Default: EVT_UNKNOWN |
| 1604 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1605 | // HCI BLE meta event associated with this event |
| 1606 | // Default: BLE_EVT_UNKNOWN |
| 1607 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1608 | // HCI command status code if this is triggerred by hci_cmd |
| 1609 | // Default: STATUS_UNKNOWN |
| 1610 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1611 | // HCI reason code associated with this event |
| 1612 | // Default: STATUS_UNKNOWN |
| 1613 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
| 1614 | } |
| 1615 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1616 | /** |
| 1617 | * Logs when a module is rolled back by Watchdog. |
| 1618 | * |
| 1619 | * Logged from: Rollback Manager |
| 1620 | */ |
| 1621 | message WatchdogRollbackOccurred { |
| 1622 | enum RollbackType { |
| 1623 | UNKNOWN = 0; |
| 1624 | ROLLBACK_INITIATE = 1; |
| 1625 | ROLLBACK_SUCCESS = 2; |
| 1626 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 1627 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1628 | } |
| 1629 | optional RollbackType rollback_type = 1; |
| 1630 | |
| 1631 | optional string package_name = 2; |
| 1632 | |
| 1633 | optional int32 package_version_code = 3; |
| 1634 | } |
| 1635 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1636 | /** |
| 1637 | * Logs when there is a change in Bluetooth A2DP playback state |
| 1638 | * |
| 1639 | * Logged from: |
| 1640 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1641 | */ |
| 1642 | message BluetoothA2dpPlaybackStateChanged { |
| 1643 | // An identifier that can be used to match events for this device. |
| 1644 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1645 | // Salt: Randomly generated 256 bit value |
| 1646 | // Hash algorithm: HMAC-SHA256 |
| 1647 | // Size: 32 byte |
| 1648 | // Default: null or empty if the device identifier is not known |
| 1649 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1650 | // Current playback state |
| 1651 | // Default: PLAYBACK_STATE_UNKNOWN |
| 1652 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 1653 | // Current audio coding mode |
| 1654 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 1655 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
| 1656 | } |
| 1657 | |
| 1658 | /** |
| 1659 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 1660 | * |
| 1661 | * Logged from: |
| 1662 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1663 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1664 | */ |
| 1665 | message BluetoothA2dpCodecConfigChanged { |
| 1666 | // An identifier that can be used to match events for this device. |
| 1667 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1668 | // Salt: Randomly generated 256 bit value |
| 1669 | // Hash algorithm: HMAC-SHA256 |
| 1670 | // Size: 32 byte |
| 1671 | // Default: null or empty if the device identifier is not known |
| 1672 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1673 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1674 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1675 | optional int32 codec_type = 2; |
| 1676 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1677 | // Default: CODEC_PRIORITY_DEFAULT |
| 1678 | optional int32 codec_priority = 3; |
| 1679 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 1680 | // Default: SAMPLE_RATE_NONE |
| 1681 | optional int32 sample_rate = 4; |
| 1682 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 1683 | // Default: BITS_PER_SAMPLE_NONE |
| 1684 | optional int32 bits_per_sample = 5; |
| 1685 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 1686 | // Default: CHANNEL_MODE_NONE |
| 1687 | optional int32 channel_mode = 6; |
| 1688 | // Codec specific values |
| 1689 | // Default 0 |
| 1690 | optional int64 codec_specific_1 = 7; |
| 1691 | optional int64 codec_specific_2 = 8; |
| 1692 | optional int64 codec_specific_3 = 9; |
| 1693 | optional int64 codec_specific_4 = 10; |
| 1694 | } |
| 1695 | |
| 1696 | /** |
| 1697 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 1698 | * Each codec's capability is logged separately due to statsd restriction |
| 1699 | * |
| 1700 | * Logged from: |
| 1701 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1702 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1703 | */ |
| 1704 | message BluetoothA2dpCodecCapabilityChanged { |
| 1705 | // An identifier that can be used to match events for this device. |
| 1706 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1707 | // Salt: Randomly generated 256 bit value |
| 1708 | // Hash algorithm: HMAC-SHA256 |
| 1709 | // Size: 32 byte |
| 1710 | // Default: null or empty if the device identifier is not known |
| 1711 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1712 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1713 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1714 | optional int32 codec_type = 2; |
| 1715 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1716 | // Default: CODEC_PRIORITY_DEFAULT |
| 1717 | optional int32 codec_priority = 3; |
| 1718 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 1719 | // in BluetoothCodecConfig |
| 1720 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 1721 | optional int32 sample_rate = 4; |
| 1722 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 1723 | // in BluetoothCodecConfig |
| 1724 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 1725 | optional int32 bits_per_sample = 5; |
| 1726 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 1727 | // BluetoothCodecConfig |
| 1728 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 1729 | optional int32 channel_mode = 6; |
| 1730 | // Codec specific values |
| 1731 | // Default 0 |
| 1732 | optional int64 codec_specific_1 = 7; |
| 1733 | optional int64 codec_specific_2 = 8; |
| 1734 | optional int64 codec_specific_3 = 9; |
| 1735 | optional int64 codec_specific_4 = 10; |
| 1736 | } |
| 1737 | |
| 1738 | /** |
| 1739 | * Logs when A2DP failed to read from PCM source. |
| 1740 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 1741 | * |
| 1742 | * Logged from: |
| 1743 | * system/bt |
| 1744 | */ |
| 1745 | message BluetoothA2dpAudioUnderrunReported { |
| 1746 | // An identifier that can be used to match events for this device. |
| 1747 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1748 | // Salt: Randomly generated 256 bit value |
| 1749 | // Hash algorithm: HMAC-SHA256 |
| 1750 | // Size: 32 byte |
| 1751 | // Default: null or empty if the device identifier is not known |
| 1752 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1753 | // Encoding interval in nanoseconds |
| 1754 | // Default: 0 |
| 1755 | optional int64 encoding_interval_nanos = 2; |
| 1756 | // Number of bytes of PCM data that could not be read from the source |
| 1757 | // Default: 0 |
| 1758 | optional int32 num_missing_pcm_bytes = 3; |
| 1759 | } |
| 1760 | |
| 1761 | /** |
| 1762 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 1763 | * buffer queue is full and we have to drop data |
| 1764 | * |
| 1765 | * Logged from: |
| 1766 | * system/bt |
| 1767 | */ |
| 1768 | message BluetoothA2dpAudioOverrunReported { |
| 1769 | // An identifier that can be used to match events for this device. |
| 1770 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1771 | // Salt: Randomly generated 256 bit value |
| 1772 | // Hash algorithm: HMAC-SHA256 |
| 1773 | // Size: 32 byte |
| 1774 | // Default: null or empty if the device identifier is not known |
| 1775 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1776 | // Encoding interval in nanoseconds |
| 1777 | // Default: 0 |
| 1778 | optional int64 encoding_interval_nanos = 2; |
| 1779 | // Number of buffers dropped in this event |
| 1780 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 1781 | // Default: 0 |
| 1782 | optional int32 num_dropped_buffers = 3; |
| 1783 | // Number of encoded buffers dropped in this event |
| 1784 | // Default 0 |
| 1785 | optional int32 num_dropped_encoded_frames = 4; |
| 1786 | // Number of encoded bytes dropped in this event |
| 1787 | // Default: 0 |
| 1788 | optional int32 num_dropped_encoded_bytes = 5; |
| 1789 | } |
| 1790 | |
| 1791 | /** |
| 1792 | * Logs when we receive reports regarding a device's RSSI value |
| 1793 | * |
| 1794 | * Logged from: |
| 1795 | * system/bt |
| 1796 | */ |
| 1797 | message BluetoothDeviceRssiReported { |
| 1798 | // An identifier that can be used to match events for this device. |
| 1799 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1800 | // Salt: Randomly generated 256 bit value |
| 1801 | // Hash algorithm: HMAC-SHA256 |
| 1802 | // Size: 32 byte |
| 1803 | // Default: null or empty if the device identifier is not known |
| 1804 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1805 | // Connection handle of this connection if available |
| 1806 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1807 | // Default: 0xFFFF if the handle is unknown |
| 1808 | optional int32 connection_handle = 2; |
| 1809 | // HCI command status code if this is triggerred by hci_cmd |
| 1810 | // Default: STATUS_UNKNOWN |
| 1811 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1812 | // BR/EDR |
| 1813 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 1814 | // Units: dB |
| 1815 | // LE: |
| 1816 | // Range: -127 to 20, 127 (signed integer) |
| 1817 | // Units: dBm |
| 1818 | // Invalid when an out of range value is reported |
| 1819 | optional int32 rssi = 4; |
| 1820 | } |
| 1821 | |
| 1822 | /** |
| 1823 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 1824 | * |
| 1825 | * Logged from: |
| 1826 | * system/bt |
| 1827 | */ |
| 1828 | message BluetoothDeviceFailedContactCounterReported { |
| 1829 | // An identifier that can be used to match events for this device. |
| 1830 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1831 | // Salt: Randomly generated 256 bit value |
| 1832 | // Hash algorithm: HMAC-SHA256 |
| 1833 | // Size: 32 byte |
| 1834 | // Default: null or empty if the device identifier is not known |
| 1835 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1836 | // Connection handle of this connection if available |
| 1837 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1838 | // Default: 0xFFFF if the handle is unknown |
| 1839 | optional int32 connection_handle = 2; |
| 1840 | // HCI command status code if this is triggerred by hci_cmd |
| 1841 | // Default: STATUS_UNKNOWN |
| 1842 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 1843 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 1844 | // Range: uint16_t, 0-0xFFFF |
| 1845 | // Default: 0xFFFFF |
| 1846 | optional int32 failed_contact_counter = 4; |
| 1847 | } |
| 1848 | |
| 1849 | /** |
| 1850 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 1851 | * |
| 1852 | * Logged from: |
| 1853 | * system/bt |
| 1854 | */ |
| 1855 | message BluetoothDeviceTxPowerLevelReported { |
| 1856 | // An identifier that can be used to match events for this device. |
| 1857 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1858 | // Salt: Randomly generated 256 bit value |
| 1859 | // Hash algorithm: HMAC-SHA256 |
| 1860 | // Size: 32 byte |
| 1861 | // Default: null or empty if the device identifier is not known |
| 1862 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1863 | // Connection handle of this connection if available |
| 1864 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1865 | // Default: 0xFFFF if the handle is unknown |
| 1866 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1867 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1868 | // Default: STATUS_UNKNOWN |
| 1869 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1870 | // Range: -30 ≤ N ≤ 20 |
| 1871 | // Units: dBm |
| 1872 | // Invalid when an out of range value is reported |
| 1873 | optional int32 transmit_power_level = 4; |
| 1874 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1875 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1876 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1877 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 1878 | * receiving an HCI command from the host |
| 1879 | * |
| 1880 | * Logged from: system/bt |
| 1881 | */ |
| 1882 | message BluetoothHciTimeoutReported { |
| 1883 | // HCI command associated with this event |
| 1884 | // Default: CMD_UNKNOWN |
| 1885 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 1886 | } |
| 1887 | |
| 1888 | /** |
| 1889 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 1890 | * See Android Bluetooth HCI specification for more details |
| 1891 | * |
| 1892 | * Note: all count and bytes field are counted since last event |
| 1893 | * |
| 1894 | * Logged from: system/bt |
| 1895 | */ |
| 1896 | message BluetoothQualityReportReported { |
| 1897 | // Quality report ID |
| 1898 | // Original type: uint8_t |
| 1899 | // Default: BQR_ID_UNKNOWN |
| 1900 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 1901 | // Packet type of the connection |
| 1902 | // Original type: uint8_t |
| 1903 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 1904 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 1905 | // Connection handle of the connection |
| 1906 | // Original type: uint16_t |
| 1907 | optional int32 connection_handle = 3; |
| 1908 | // Performing Role for the connection |
| 1909 | // Original type: uint8_t |
| 1910 | optional int32 connection_role = 4; |
| 1911 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 1912 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 1913 | // Original type: uint8_t |
| 1914 | optional int32 tx_power_level = 5; |
| 1915 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 1916 | // absolute receiver signal strength value |
| 1917 | // Original type: int8_t |
| 1918 | optional int32 rssi = 6; |
| 1919 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 1920 | // channels used by the link currently |
| 1921 | // Original type: uint8_t |
| 1922 | optional int32 snr = 7; |
| 1923 | // Indicates the number of unused channels in AFH_channel_map |
| 1924 | // Original type: uint8_t |
| 1925 | optional int32 unused_afh_channel_count = 8; |
| 1926 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 1927 | // selected for AFH |
| 1928 | // Original type: uint8_t |
| 1929 | optional int32 afh_select_unideal_channel_count = 9; |
| 1930 | // Current Link Supervision Timeout Setting |
| 1931 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1932 | // Original type: uint16_t |
| 1933 | optional int32 lsto = 10; |
| 1934 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 1935 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 1936 | // 0x01 (Piconet Clock) |
| 1937 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1938 | // Original type: uint32_t |
| 1939 | optional int64 connection_piconet_clock = 11; |
| 1940 | // The count of retransmission |
| 1941 | // Original type: uint32_t |
| 1942 | optional int64 retransmission_count = 12; |
| 1943 | // The count of no RX |
| 1944 | // Original type: uint32_t |
| 1945 | optional int64 no_rx_count = 13; |
| 1946 | // The count of NAK (Negative Acknowledge) |
| 1947 | // Original type: uint32_t |
| 1948 | optional int64 nak_count = 14; |
| 1949 | // Controller timestamp of last TX ACK |
| 1950 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1951 | // Original type: uint32_t |
| 1952 | optional int64 last_tx_ack_timestamp = 15; |
| 1953 | // The count of Flow-off (STOP) |
| 1954 | // Original type: uint32_t |
| 1955 | optional int64 flow_off_count = 16; |
| 1956 | // Controller timestamp of last Flow-on (GO) |
| 1957 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 1958 | // Original type: uint32_t |
| 1959 | optional int64 last_flow_on_timestamp = 17; |
| 1960 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 1961 | // Original type: uint32_t |
| 1962 | optional int64 buffer_overflow_bytes = 18; |
| 1963 | // Buffer underflow count (in byte) since last event |
| 1964 | // Original type: uint32_t |
| 1965 | optional int64 buffer_underflow_bytes = 19; |
| 1966 | } |
| 1967 | |
| 1968 | /** |
| 1969 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 1970 | * |
| 1971 | * Notes: |
| 1972 | * - Each event can be partially filled as we might learn different pieces of device |
| 1973 | * information at different time |
| 1974 | * - Multiple device info events can be combined to give more complete picture |
| 1975 | * - When multiple device info events tries to describe the same information, the |
| 1976 | * later one wins |
| 1977 | * |
| 1978 | * Logged from: |
| 1979 | * packages/apps/Bluetooth |
| 1980 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 1981 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1982 | // An identifier that can be used to match events for this device. |
| 1983 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1984 | // Salt: Randomly generated 256 bit value |
| 1985 | // Hash algorithm: HMAC-SHA256 |
| 1986 | // Size: 32 byte |
| 1987 | // Default: null or empty if the device identifier is not known |
| 1988 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1989 | // Where is this device info obtained from |
| 1990 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 1991 | // Name of the data source |
| 1992 | // For EXTERNAL: package name of the data source |
| 1993 | // For INTERNAL: null for general case, component name otherwise |
| 1994 | optional string source_name = 3; |
| 1995 | // Name of the manufacturer of this device |
| 1996 | optional string manufacturer = 4; |
| 1997 | // Model of this device |
| 1998 | optional string model = 5; |
| 1999 | // Hardware version of this device |
| 2000 | optional string hardware_version = 6; |
| 2001 | // Software version of this device |
| 2002 | optional string software_version = 7; |
| 2003 | } |
| 2004 | |
| 2005 | /** |
| 2006 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2007 | * device, as documented by the Bluetooth Core HCI specification |
| 2008 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2009 | * Vol 2, Part E, Page 1118 |
| 2010 | * |
| 2011 | * Logged from: |
| 2012 | * system/bt |
| 2013 | */ |
| 2014 | message BluetoothRemoteVersionInfoReported { |
| 2015 | // Connection handle of the connection |
| 2016 | // Original type: uint16_t |
| 2017 | optional int32 connection_handle = 1; |
| 2018 | // HCI command status code |
| 2019 | // Default: STATUS_UNKNOWN |
| 2020 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2021 | // 1 byte Version of current LMP in the remote controller |
| 2022 | optional int32 lmp_version = 3; |
| 2023 | // 2 bytes LMP manufacturer code of the remote controller |
| 2024 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2025 | optional int32 lmp_manufacturer_code = 4; |
| 2026 | // 4 bytes subversion of the LMP in the remote controller |
| 2027 | optional int32 lmp_subversion = 5; |
| 2028 | } |
| 2029 | |
| 2030 | /** |
| 2031 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2032 | * Constant definitions are from: |
| 2033 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2034 | * |
| 2035 | * Current logged attributes: |
| 2036 | * - BluetoothProfileDescriptorList |
| 2037 | * - Supported Features Bitmask |
| 2038 | * |
| 2039 | * Logged from: |
| 2040 | * system/bt |
| 2041 | */ |
| 2042 | message BluetoothSdpAttributeReported { |
| 2043 | // An identifier that can be used to match events for this device. |
| 2044 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2045 | // Salt: Randomly generated 256 bit value |
| 2046 | // Hash algorithm: HMAC-SHA256 |
| 2047 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2048 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2049 | // Original type: uint16_t |
| 2050 | optional int32 protocol_uuid = 2; |
| 2051 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2052 | // Original type: uint16_t |
| 2053 | optional int32 attribute_id = 3; |
| 2054 | // Attribute value for the particular attribute |
| 2055 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2056 | } |
| 2057 | |
| 2058 | /** |
| 2059 | * Logs when bond state of a Bluetooth device changes |
| 2060 | * |
| 2061 | * Logged from: |
| 2062 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2063 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2064 | */ |
| 2065 | message BluetoothBondStateChanged { |
| 2066 | // An identifier that can be used to match events for this device. |
| 2067 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2068 | // Salt: Randomly generated 256 bit value |
| 2069 | // Hash algorithm: HMAC-SHA256 |
| 2070 | // Size: 32 byte |
| 2071 | // Default: null or empty if the device identifier is not known |
| 2072 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2073 | // Preferred transport type to remote dual mode device |
| 2074 | // Default: TRANSPORT_AUTO means no preference |
| 2075 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2076 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2077 | // Default: UNKNOWN |
| 2078 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2079 | // Current bond state (NONE, BONDING, BONDED) |
| 2080 | // Default: BOND_STATE_UNKNOWN |
| 2081 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2082 | // Bonding sub state |
| 2083 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2084 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2085 | // Unbond Reason |
| 2086 | // Default: UNBOND_REASON_UNKNOWN |
| 2087 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
| 2088 | } |
| 2089 | |
| 2090 | /** |
| 2091 | * Logs there is an event related Bluetooth classic pairing |
| 2092 | * |
| 2093 | * Logged from: |
| 2094 | * system/bt |
| 2095 | */ |
| 2096 | message BluetoothClassicPairingEventReported { |
| 2097 | // An identifier that can be used to match events for this device. |
| 2098 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2099 | // Salt: Randomly generated 256 bit value |
| 2100 | // Hash algorithm: HMAC-SHA256 |
| 2101 | // Size: 32 byte |
| 2102 | // Default: null or empty if the device identifier is not known |
| 2103 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2104 | // Connection handle of this connection if available |
| 2105 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2106 | // Default: 0xFFFF if the handle is unknown |
| 2107 | optional int32 connection_handle = 2; |
| 2108 | // HCI command associated with this event |
| 2109 | // Default: CMD_UNKNOWN |
| 2110 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2111 | // HCI event associated with this event |
| 2112 | // Default: EVT_UNKNOWN |
| 2113 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2114 | // HCI command status code if this is triggerred by hci_cmd |
| 2115 | // Default: STATUS_UNKNOWN |
| 2116 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2117 | // HCI reason code associated with this event |
| 2118 | // Default: STATUS_UNKNOWN |
| 2119 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2120 | // A status value related to this specific event |
| 2121 | // Default: 0 |
| 2122 | optional int64 event_value = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2123 | } |
| 2124 | |
| 2125 | /** |
| 2126 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2127 | * |
| 2128 | * Logged from: |
| 2129 | * system/bt |
| 2130 | */ |
| 2131 | message BluetoothSmpPairingEventReported { |
| 2132 | // An identifier that can be used to match events for this device. |
| 2133 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2134 | // Salt: Randomly generated 256 bit value |
| 2135 | // Hash algorithm: HMAC-SHA256 |
| 2136 | // Size: 32 byte |
| 2137 | // Default: null or empty if the device identifier is not known |
| 2138 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2139 | // SMP command sent or received over L2CAP |
| 2140 | // Default: CMD_UNKNOWN |
| 2141 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2142 | // Whether this command is sent or received |
| 2143 | // Default: DIRECTION_UNKNOWN |
| 2144 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2145 | // SMP failure reason code |
| 2146 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2147 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
| 2148 | } |
| 2149 | |
| 2150 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2151 | * Logs when a Bluetooth socket’s connection state changed |
| 2152 | * |
| 2153 | * Logged from: |
| 2154 | * system/bt |
| 2155 | */ |
| 2156 | message BluetoothSocketConnectionStateChanged { |
| 2157 | // An identifier that can be used to match events for this device. |
| 2158 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2159 | // Salt: Randomly generated 256 bit value |
| 2160 | // Hash algorithm: HMAC-SHA256 |
| 2161 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2162 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2163 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2164 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2165 | // Default 0 when unknown or don't care |
| 2166 | optional int32 port = 2; |
| 2167 | // Socket type as mentioned in |
| 2168 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2169 | // Default: SOCKET_TYPE_UNKNOWN |
| 2170 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2171 | // Socket connection state |
| 2172 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2173 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2174 | // Number of bytes sent to remote device during this connection |
| 2175 | optional int64 tx_bytes = 5; |
| 2176 | // Number of bytes received from remote device during this connection |
| 2177 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2178 | // Socket owner's UID |
| 2179 | optional int32 uid = 7 [(is_uid) = true]; |
| 2180 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2181 | // |port| must be spawned by |server_port| |
| 2182 | // Default 0 when unknown or don't care |
| 2183 | optional int32 server_port = 8; |
| 2184 | // Whether this is a server listener socket |
| 2185 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2186 | } |
| 2187 | |
| 2188 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2189 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2190 | * |
| 2191 | * Logged from: |
| 2192 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2193 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2194 | * |
| 2195 | */ |
| 2196 | message BluetoothClassOfDeviceReported { |
| 2197 | // An identifier that can be used to match events for this device. |
| 2198 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2199 | // Salt: Randomly generated 256 bit value |
| 2200 | // Hash algorithm: HMAC-SHA256 |
| 2201 | // Size: 32 byte |
| 2202 | // Default: null or empty if this is a server listener socket |
| 2203 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2204 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2205 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2206 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2207 | // Default: 0 |
| 2208 | optional int32 class_of_device = 2; |
| 2209 | } |
| 2210 | |
| 2211 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2212 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2213 | * |
| 2214 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2215 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2216 | */ |
| 2217 | message UsbConnectorStateChanged { |
| 2218 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2219 | STATE_DISCONNECTED = 0; |
| 2220 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2221 | } |
| 2222 | optional State state = 1; |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2223 | optional string id = 2; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2224 | // Last active session in ms. |
| 2225 | // 0 when the port is in connected state. |
| 2226 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2227 | } |
| 2228 | |
| 2229 | /** |
| 2230 | * Logs the reported speaker impedance. |
| 2231 | * |
| 2232 | * Logged from: |
| 2233 | * Vendor audio implementation. |
| 2234 | */ |
| 2235 | message SpeakerImpedanceReported { |
| 2236 | optional int32 speaker_location = 1; |
| 2237 | optional int32 impedance = 2; |
| 2238 | } |
| 2239 | |
| 2240 | /** |
| 2241 | * Logs the report of a failed hardware. |
| 2242 | * |
| 2243 | * Logged from: |
| 2244 | * Vendor HALs. |
| 2245 | * |
| 2246 | */ |
| 2247 | message HardwareFailed { |
| 2248 | enum HardwareType { |
| 2249 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2250 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2251 | HARDWARE_FAILED_CODEC = 2; |
| 2252 | HARDWARE_FAILED_SPEAKER = 3; |
| 2253 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2254 | } |
| 2255 | optional HardwareType hardware_type = 1; |
| 2256 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2257 | /** |
| 2258 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2259 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2260 | * referring to board-specific numbering schemes. |
| 2261 | */ |
| 2262 | optional int32 hardware_location = 2; |
| 2263 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2264 | /** |
| 2265 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2266 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2267 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2268 | enum HardwareErrorCode { |
| 2269 | UNKNOWN = 0; |
| 2270 | COMPLETE = 1; |
| 2271 | SPEAKER_HIGH_Z = 2; |
| 2272 | SPEAKER_SHORT = 3; |
| 2273 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2274 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2275 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2276 | } |
| 2277 | optional int32 failure_code = 3; |
| 2278 | } |
| 2279 | |
| 2280 | /** |
| 2281 | * Log an event when the device has been physically dropped. |
| 2282 | * Reported from the /vendor partition. |
| 2283 | */ |
| 2284 | message PhysicalDropDetected { |
| 2285 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2286 | optional int32 confidence_pctg = 1; |
| 2287 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2288 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2289 | // Duration of freefall in ms |
| 2290 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2291 | } |
| 2292 | |
| 2293 | /** |
| 2294 | * Log bucketed battery charge cycles. |
| 2295 | * |
| 2296 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2297 | * a given charge point. For example, if 10 cycle buckets are |
| 2298 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2299 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2300 | * |
| 2301 | * Logged from: |
| 2302 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2303 | */ |
| 2304 | message ChargeCyclesReported { |
| 2305 | optional int32 cycle_bucket_1 = 1; |
| 2306 | optional int32 cycle_bucket_2 = 2; |
| 2307 | optional int32 cycle_bucket_3 = 3; |
| 2308 | optional int32 cycle_bucket_4 = 4; |
| 2309 | optional int32 cycle_bucket_5 = 5; |
| 2310 | optional int32 cycle_bucket_6 = 6; |
| 2311 | optional int32 cycle_bucket_7 = 7; |
| 2312 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2313 | optional int32 cycle_bucket_9 = 9; |
| 2314 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2315 | } |
| 2316 | |
| 2317 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2318 | * Log battery health snapshot. |
| 2319 | * |
| 2320 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2321 | * are snapshotted periodically over 24hrs. |
| 2322 | */ |
| 2323 | message BatteryHealthSnapshot { |
| 2324 | enum BatterySnapshotType { |
| 2325 | UNKNOWN = 0; |
| 2326 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2327 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2328 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2329 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2330 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2331 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2332 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2333 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2334 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2335 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2336 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2337 | } |
| 2338 | optional BatterySnapshotType type = 1; |
| 2339 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2340 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2341 | // Voltage Battery Voltage, in microVolts. |
| 2342 | optional int32 voltage_micro_volt = 3; |
| 2343 | // Current Battery current, in microAmps. |
| 2344 | optional int32 current_micro_amps = 4; |
| 2345 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2346 | optional int32 open_circuit_micro_volt = 5; |
| 2347 | // Resistance Battery Resistance, in microOhms. |
| 2348 | optional int32 resistance_micro_ohm = 6; |
| 2349 | // Level Battery Level, as % of full. |
| 2350 | optional int32 level_percent = 7; |
| 2351 | } |
| 2352 | |
| 2353 | /** |
| 2354 | * Log slow I/O operations on the primary storage. |
| 2355 | */ |
| 2356 | message SlowIo { |
| 2357 | // Classifications of IO Operations. |
| 2358 | enum IoOperation { |
| 2359 | UNKNOWN = 0; |
| 2360 | READ = 1; |
| 2361 | WRITE = 2; |
| 2362 | UNMAP = 3; |
| 2363 | SYNC = 4; |
| 2364 | } |
| 2365 | optional IoOperation operation = 1; |
| 2366 | |
| 2367 | // The number of slow IO operations of this type over 24 hours. |
| 2368 | optional int32 count = 2; |
| 2369 | } |
| 2370 | |
| 2371 | /** |
| 2372 | * Log battery caused shutdown with the last recorded voltage. |
| 2373 | */ |
| 2374 | message BatteryCausedShutdown { |
| 2375 | // The last recorded battery voltage prior to shutdown. |
| 2376 | optional int32 last_recorded_micro_volt = 1; |
| 2377 | } |
| 2378 | |
| 2379 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2380 | * Logs when ThermalService receives throttling events. |
| 2381 | * |
| 2382 | * Logged from: |
| 2383 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2384 | */ |
| 2385 | message ThermalThrottlingSeverityStateChanged { |
| 2386 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2387 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2388 | |
| 2389 | // The name of the temperature source. Eg. CPU0 |
| 2390 | optional string sensor_name = 2; |
| 2391 | |
| 2392 | // Temperature in tenths of a degree C. |
| 2393 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2394 | optional int32 temperature_deci_celsius = 3; |
| 2395 | |
| 2396 | // Relative severity of the throttling, see enum definition. |
| 2397 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2398 | } |
| 2399 | |
| 2400 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2401 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2402 | * |
| 2403 | * Logged from: |
| 2404 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2405 | */ |
| 2406 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2407 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2408 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2409 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2410 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2411 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2412 | } |
| 2413 | |
| 2414 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2415 | * Logs phone signal strength changes. |
| 2416 | * |
| 2417 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2418 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2419 | */ |
| 2420 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2421 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2422 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2423 | } |
| 2424 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2425 | |
| 2426 | /** |
| 2427 | * Logs when the phone state, sim state or signal strength changes |
| 2428 | * |
| 2429 | * Logged from: |
| 2430 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2431 | */ |
| 2432 | message PhoneServiceStateChanged { |
| 2433 | optional android.telephony.ServiceStateEnum state = 1; |
| 2434 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2435 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2436 | } |
| 2437 | |
| 2438 | /** |
| 2439 | * Logs when the phone becomes on or off. |
| 2440 | * |
| 2441 | * Logged from: |
| 2442 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2443 | */ |
| 2444 | message PhoneStateChanged { |
| 2445 | enum State { |
| 2446 | OFF = 0; |
| 2447 | ON = 1; |
| 2448 | } |
| 2449 | optional State state = 1; |
| 2450 | } |
| 2451 | |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2452 | message LauncherUIChanged { |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 2453 | optional android.stats.launcher.LauncherAction action = 1; |
| 2454 | optional android.stats.launcher.LauncherState src_state = 2; |
| 2455 | optional android.stats.launcher.LauncherState dst_state = 3; |
| 2456 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES]; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2457 | optional bool is_swipe_up_enabled = 5; |
| 2458 | } |
| 2459 | |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2460 | message StyleUIChanged { |
| 2461 | optional android.stats.style.Action action = 1; |
| 2462 | optional int32 color_package_hash = 2; |
| 2463 | optional int32 font_package_hash = 3; |
| 2464 | optional int32 shape_package_hash = 4; |
| 2465 | optional int32 clock_package_hash = 5; |
| 2466 | optional int32 launcher_grid = 6; |
| 2467 | optional int32 wallpaper_category_hash = 7; |
| 2468 | optional int32 wallpaper_id_hash = 8; |
| 2469 | } |
| 2470 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2471 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2472 | * Logs when Settings UI has changed. |
| 2473 | * |
| 2474 | * Logged from: |
| 2475 | * packages/apps/Settings |
| 2476 | */ |
| 2477 | message SettingsUIChanged { |
| 2478 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2479 | * Where this SettingsUIChange event comes from. For example, if |
| 2480 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 2481 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2482 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2483 | |
| 2484 | /** |
| 2485 | * What the UI action is. |
| 2486 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2487 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2488 | |
| 2489 | /** |
| 2490 | * Where the action is happening |
| 2491 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2492 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2493 | |
| 2494 | /** |
| 2495 | * What preference changed in this event. |
| 2496 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2497 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2498 | |
| 2499 | /** |
| 2500 | * The new value of the changed preference. |
| 2501 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2502 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2503 | } |
| 2504 | |
| 2505 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2506 | * Logs basic timing information about touch events. |
| 2507 | * Reported at most every 5 minutes while device is being interacted with. |
| 2508 | * |
| 2509 | * Logged from: |
| 2510 | * frameworks/native/services/inputflinger |
| 2511 | */ |
| 2512 | message TouchEventReported { |
| 2513 | /** |
| 2514 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
| 2515 | * and the standard deviation of latency between the kernel and framework |
| 2516 | * for touchscreen events. The units are microseconds. |
| 2517 | * |
| 2518 | * The number is measured as the difference between the time at which |
| 2519 | * the input event was received in the evdev driver, |
| 2520 | * and the time at which the input event was received in EventHub. |
| 2521 | */ |
| 2522 | // Minimum value |
| 2523 | optional float latency_min_micros = 1; |
| 2524 | // Maximum value |
| 2525 | optional float latency_max_micros = 2; |
| 2526 | // Average value |
| 2527 | optional float latency_mean_micros = 3; |
| 2528 | // Standard deviation |
| 2529 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 2530 | // Number of touch events (input_event) in this report |
| 2531 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2532 | } |
| 2533 | |
| 2534 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 2535 | * Logs gesture classification and timing information for touch events. |
| 2536 | * |
| 2537 | * Logged from: |
| 2538 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 2539 | * frameworks/base/core/java/android/view/View.java |
| 2540 | */ |
| 2541 | message TouchGestureClassified { |
| 2542 | // The source of the classification (e.g. Java class name). |
| 2543 | optional string source = 1; |
| 2544 | |
| 2545 | enum Classification { |
| 2546 | UNKNOWN_CLASSIFICATION = 0; |
| 2547 | SINGLE_TAP = 1; |
| 2548 | DOUBLE_TAP = 2; |
| 2549 | LONG_PRESS = 3; |
| 2550 | DEEP_PRESS = 4; |
| 2551 | SCROLL = 5; |
| 2552 | } |
| 2553 | // The classification of the gesture. |
| 2554 | optional Classification classification = 2; |
| 2555 | |
| 2556 | // The interval from the start of a touch event stream until the |
| 2557 | // classification was made. |
| 2558 | optional int32 latency_millis = 3; |
| 2559 | |
| 2560 | // The distance from the location of the first touch event to the |
| 2561 | // location of the touch event when the classification was made. |
| 2562 | optional float displacement_px = 4; |
| 2563 | } |
| 2564 | |
| 2565 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2566 | * Logs that a setting was updated. |
| 2567 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2568 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2569 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 2570 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 2571 | */ |
| 2572 | message SettingChanged { |
| 2573 | // The name of the setting. |
| 2574 | optional string setting = 1; |
| 2575 | |
| 2576 | // The change being imposed on this setting. May represent a number, eg "3". |
| 2577 | optional string value = 2; |
| 2578 | |
| 2579 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 2580 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 2581 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 2582 | // The +/- feature is currently only used for location_providers_allowed. |
| 2583 | optional string new_value = 3; |
| 2584 | |
| 2585 | // The previous value of this setting. |
| 2586 | optional string prev_value = 4; |
| 2587 | |
| 2588 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 2589 | optional string tag = 5; |
| 2590 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 2591 | // True if this setting with tag should be resettable. |
| 2592 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2593 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2594 | // The associated user (for multi-user feature). Defined in android/os/UserHandle.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2595 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2596 | |
| 2597 | enum ChangeReason { |
| 2598 | UPDATED = 1; // Updated can be an insertion or an update. |
| 2599 | DELETED = 2; |
| 2600 | } |
| 2601 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2602 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 2603 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2604 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2605 | * Logs activity going to foreground or background |
| 2606 | * |
| 2607 | * Logged from: |
| 2608 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 2609 | */ |
| 2610 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2611 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 2612 | optional string pkg_name = 2; |
| 2613 | optional string class_name = 3; |
| 2614 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2615 | enum State { |
| 2616 | BACKGROUND = 0; |
| 2617 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2618 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2619 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2620 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2621 | |
| 2622 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 2623 | * Logs when a volume entered low Storage state. |
| 2624 | * Logged from: |
| 2625 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 2626 | */ |
| 2627 | message LowStorageStateChanged { |
| 2628 | // Volume that ran out of storage. |
| 2629 | optional string volume_description = 1; |
| 2630 | |
| 2631 | enum State { |
| 2632 | UNKNOWN = 0; |
| 2633 | OFF = 1; |
| 2634 | ON = 2; |
| 2635 | } |
| 2636 | optional State state = 2; |
| 2637 | } |
| 2638 | |
| 2639 | /** |
| 2640 | * Logs when an app is downgraded. |
| 2641 | * Logged from: |
| 2642 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2643 | */ |
| 2644 | message AppDowngraded { |
| 2645 | optional string package_name = 1; |
| 2646 | // Size of the package (all data) before being downgraded. |
| 2647 | optional int64 size_in_bytes_before = 2; |
| 2648 | // Size of the package (all data) after being downgraded. |
| 2649 | optional int64 size_in_bytes_after = 3; |
| 2650 | |
| 2651 | optional bool aggressive = 4; |
| 2652 | } |
| 2653 | |
| 2654 | /** |
| 2655 | * Logs when an app is optimized after being downgraded. |
| 2656 | * Logged from: |
| 2657 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2658 | */ |
| 2659 | message AppOptimizedAfterDowngraded { |
| 2660 | optional string package_name = 1; |
| 2661 | } |
| 2662 | |
| 2663 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 2664 | * Logs whenever an app is installed on external storage. |
| 2665 | * Logged from: |
| 2666 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 2667 | */ |
| 2668 | message AppInstallOnExternalStorageReported { |
| 2669 | // The type of external storage. |
| 2670 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 2671 | // The name of the package that is installed on the sd card. |
| 2672 | optional string package_name = 2; |
| 2673 | } |
| 2674 | |
| 2675 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2676 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2677 | * Logged from: |
| 2678 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2679 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2680 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2681 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2682 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2683 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2684 | |
| 2685 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2686 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2687 | optional string process_name = 3; |
| 2688 | |
| 2689 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2690 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2691 | |
| 2692 | optional string package_name = 5; |
| 2693 | |
| 2694 | enum InstantApp { |
| 2695 | UNAVAILABLE = 0; |
| 2696 | FALSE = 1; |
| 2697 | TRUE = 2; |
| 2698 | } |
| 2699 | optional InstantApp is_instant_app = 6; |
| 2700 | |
| 2701 | enum ForegroundState { |
| 2702 | UNKNOWN = 0; |
| 2703 | BACKGROUND = 1; |
| 2704 | FOREGROUND = 2; |
| 2705 | } |
| 2706 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2707 | |
| 2708 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2709 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2710 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2711 | /** |
| 2712 | * Logs when a WTF (What a Terrible Failure) happened. |
| 2713 | * Logged from: |
| 2714 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2715 | */ |
| 2716 | message WTFOccurred { |
| 2717 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2718 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2719 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2720 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2721 | // The name of the process. |
| 2722 | // system_server if it is not by an app |
| 2723 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2724 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2725 | // The pid if available. -1 means not available. |
| 2726 | optional sint32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2727 | |
| 2728 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2729 | } |
| 2730 | |
| 2731 | /** |
| 2732 | * Logs when system server reports low memory. |
| 2733 | * Logged from: |
| 2734 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2735 | */ |
| 2736 | message LowMemReported { |
| 2737 | } |
| 2738 | |
| 2739 | /** |
| 2740 | * Logs when an app ANR (App Not Responding) occurs. |
| 2741 | * Logged from: |
| 2742 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 2743 | */ |
| 2744 | message ANROccurred { |
| 2745 | optional int32 uid = 1 [(is_uid) = true]; |
| 2746 | |
| 2747 | optional string process_name = 2; |
| 2748 | |
| 2749 | optional string short_component_name = 3; |
| 2750 | |
| 2751 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2752 | |
| 2753 | enum InstantApp { |
| 2754 | UNAVAILABLE = 0; |
| 2755 | FALSE = 1; |
| 2756 | TRUE = 2; |
| 2757 | } |
| 2758 | optional InstantApp is_instant_app = 5; |
| 2759 | |
| 2760 | enum ForegroundState { |
| 2761 | UNKNOWN = 0; |
| 2762 | BACKGROUND = 1; |
| 2763 | FOREGROUND = 2; |
| 2764 | } |
| 2765 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2766 | |
| 2767 | optional android.server.ErrorSource error_source = 7; |
| 2768 | |
| 2769 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2770 | } |
| 2771 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 2772 | /** |
| 2773 | * Logs when the vibrator state changes. |
| 2774 | * Logged from: |
| 2775 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 2776 | */ |
| 2777 | message VibratorStateChanged { |
| 2778 | repeated AttributionNode attribution_node = 1; |
| 2779 | |
| 2780 | enum State { |
| 2781 | OFF = 0; |
| 2782 | ON = 1; |
| 2783 | } |
| 2784 | optional State state = 2; |
| 2785 | |
| 2786 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 2787 | // Only applicable for State == ON. |
| 2788 | optional int64 duration_millis = 3; |
| 2789 | } |
| 2790 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2791 | /* |
| 2792 | * Allows other apps to push events into statsd. |
| 2793 | * Logged from: |
| 2794 | * frameworks/base/core/java/android/util/StatsLog.java |
| 2795 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2796 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2797 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2798 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2799 | |
| 2800 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 2801 | optional int32 label = 2; |
| 2802 | |
| 2803 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 2804 | // predicates for the metrics). |
| 2805 | enum State { |
| 2806 | UNKNOWN = 0; |
| 2807 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 2808 | STOP = 2; |
| 2809 | START = 3; |
| 2810 | } |
| 2811 | optional State state = 3; |
| 2812 | } |
| 2813 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2814 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 2815 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 2816 | * For example, this could be due to the user manually changing the time. |
| 2817 | * |
| 2818 | * Logged from: |
| 2819 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 2820 | */ |
| 2821 | message WallClockTimeShifted { |
| 2822 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 2823 | optional int64 wall_clock_timestamp_millis = 1; |
| 2824 | } |
| 2825 | |
| 2826 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2827 | * Logs when statsd detects an anomaly. |
| 2828 | * |
| 2829 | * Logged from: |
| 2830 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 2831 | */ |
| 2832 | message AnomalyDetected { |
| 2833 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2834 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2835 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2836 | // Id of the config whose anomaly detection alert fired. |
| 2837 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2838 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2839 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 2840 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2841 | } |
| 2842 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2843 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2844 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2845 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2846 | |
| 2847 | // The app package name. |
| 2848 | optional string pkg_name = 2; |
| 2849 | |
| 2850 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2851 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2852 | WARM = 1; |
| 2853 | HOT = 2; |
| 2854 | COLD = 3; |
| 2855 | } |
| 2856 | // The transition type. |
| 2857 | optional TransitionType type = 3; |
| 2858 | |
| 2859 | // The activity name. |
| 2860 | optional string activity_name = 4; |
| 2861 | |
| 2862 | // The name of the calling app. Empty if not set. |
| 2863 | optional string calling_pkg_name = 5; |
| 2864 | |
| 2865 | // Whether the app is an instant app. |
| 2866 | optional bool is_instant_app = 6; |
| 2867 | |
| 2868 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2869 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2870 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 2871 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2872 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2873 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2874 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2875 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2876 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2877 | optional int32 bind_application_delay_millis = 11; |
| 2878 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2879 | |
| 2880 | // Empty if not set. |
| 2881 | optional string launch_token = 13; |
| 2882 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 2883 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 2884 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 2885 | |
| 2886 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 2887 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2888 | } |
| 2889 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2890 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2891 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2892 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2893 | |
| 2894 | // The app package name. |
| 2895 | optional string pkg_name = 2; |
| 2896 | |
| 2897 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2898 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2899 | WARM = 1; |
| 2900 | HOT = 2; |
| 2901 | COLD = 3; |
| 2902 | } |
| 2903 | // The transition type. |
| 2904 | optional TransitionType type = 3; |
| 2905 | |
| 2906 | // The activity name. |
| 2907 | optional string activity_name = 4; |
| 2908 | } |
| 2909 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2910 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2911 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2912 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2913 | |
| 2914 | // The app package name. |
| 2915 | optional string pkg_name = 2; |
| 2916 | |
| 2917 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2918 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2919 | WITH_BUNDLE = 1; |
| 2920 | WITHOUT_BUNDLE = 2; |
| 2921 | } |
| 2922 | // The transition type. |
| 2923 | optional TransitionType type = 3; |
| 2924 | |
| 2925 | // The activity name. |
| 2926 | optional string activity_name = 4; |
| 2927 | |
| 2928 | optional bool transition_process_running = 5; |
| 2929 | |
| 2930 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2931 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2932 | } |
| 2933 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2934 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2935 | * Logs a picture-in-picture action |
| 2936 | * Logged from: |
| 2937 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2938 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 2939 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 2940 | */ |
| 2941 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 2942 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2943 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2944 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 2945 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2946 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2947 | enum State { |
| 2948 | ENTERED = 1; |
| 2949 | EXPANDED_TO_FULL_SCREEN = 2; |
| 2950 | MINIMIZED = 3; |
| 2951 | DISMISSED = 4; |
| 2952 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 2953 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 2954 | } |
| 2955 | |
| 2956 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 2957 | * Logs overlay action |
| 2958 | * Logged from: |
| 2959 | * services/core/java/com/android/server/wm/Session.java |
| 2960 | */ |
| 2961 | message OverlayStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2962 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 2963 | |
| 2964 | optional string package_name = 2; |
| 2965 | |
| 2966 | optional bool using_alert_window = 3; |
| 2967 | |
| 2968 | enum State { |
| 2969 | ENTERED = 1; |
| 2970 | EXITED = 2; |
| 2971 | } |
| 2972 | optional State state = 4; |
| 2973 | } |
| 2974 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 2975 | /* |
| 2976 | * Logs foreground service starts and stops. |
| 2977 | * Note that this is not when a service starts or stops, but when it is |
| 2978 | * considered foreground. |
| 2979 | * Logged from |
| 2980 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 2981 | */ |
| 2982 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2983 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 2984 | // package_name + "/" + class_name |
| 2985 | optional string short_name = 2; |
| 2986 | |
| 2987 | enum State { |
| 2988 | ENTER = 1; |
| 2989 | EXIT = 2; |
| 2990 | } |
| 2991 | optional State state = 3; |
| 2992 | } |
| 2993 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 2994 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2995 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 2996 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 2997 | * attributed back to the parent (host) uid. One example is Chrome. |
| 2998 | * |
| 2999 | * Logged from: |
| 3000 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3001 | */ |
| 3002 | message IsolatedUidChanged { |
| 3003 | // The host UID. Generally, we should attribute metrics from the isolated uid to the host uid. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3004 | // NOTE: DO NOT annotate uid field in this atom. This atom is specially handled in statsd. |
Bookatz | 3c64886 | 2018-05-25 13:32:43 -0700 | [diff] [blame] | 3005 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3006 | optional int32 parent_uid = 1; |
| 3007 | |
| 3008 | optional int32 isolated_uid = 2; |
| 3009 | |
| 3010 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3011 | enum Event { |
| 3012 | REMOVED = 0; |
| 3013 | CREATED = 1; |
| 3014 | } |
| 3015 | optional Event event = 3; |
| 3016 | } |
| 3017 | |
| 3018 | /* |
| 3019 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3020 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3021 | * and processed by WakeupController.cpp. |
| 3022 | */ |
| 3023 | message PacketWakeupOccurred { |
| 3024 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3025 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3026 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3027 | // The interface name on which the packet was received. |
| 3028 | optional string iface = 2; |
| 3029 | // The ethertype value of the packet. |
| 3030 | optional int32 ethertype = 3; |
| 3031 | // String representation of the destination MAC address of the packet. |
| 3032 | optional string destination_hardware_address = 4; |
| 3033 | // String representation of the source address of the packet if this was an IP packet. |
| 3034 | optional string source_ip = 5; |
| 3035 | // String representation of the destination address of the packet if this was an IP packet. |
| 3036 | optional string destination_ip = 6; |
| 3037 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3038 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3039 | // families. |
| 3040 | optional int32 ip_next_header = 7; |
| 3041 | // The source port if this was a TCP or UDP packet. |
| 3042 | optional int32 source_port = 8; |
| 3043 | // The destination port if this was a TCP or UDP packet. |
| 3044 | optional int32 destination_port = 9; |
| 3045 | } |
| 3046 | |
| 3047 | /* |
| 3048 | * Logs the memory stats for an app on startup. |
| 3049 | * Logged from: |
| 3050 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3051 | */ |
| 3052 | message AppStartMemoryStateCaptured { |
| 3053 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3054 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3055 | |
| 3056 | // The process name. |
| 3057 | optional string process_name = 2; |
| 3058 | |
| 3059 | // The activity name. |
| 3060 | optional string activity_name = 3; |
| 3061 | |
| 3062 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3063 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3064 | |
| 3065 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3066 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3067 | |
| 3068 | // RSS |
| 3069 | optional int64 rss_in_bytes = 6; |
| 3070 | |
| 3071 | // CACHE |
| 3072 | optional int64 cache_in_bytes = 7; |
| 3073 | |
| 3074 | // SWAP |
| 3075 | optional int64 swap_in_bytes = 8; |
| 3076 | } |
| 3077 | |
| 3078 | /* |
| 3079 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3080 | * for LMK event. |
| 3081 | * Logged from: |
| 3082 | * system/core/lmkd/lmkd.c |
| 3083 | */ |
| 3084 | message LmkStateChanged { |
| 3085 | enum State { |
| 3086 | UNKNOWN = 0; |
| 3087 | START = 1; |
| 3088 | STOP = 2; |
| 3089 | } |
| 3090 | optional State state = 1; |
| 3091 | } |
| 3092 | |
| 3093 | /* |
| 3094 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3095 | * Logged from: |
| 3096 | * system/core/lmkd/lmkd.c |
| 3097 | */ |
| 3098 | message LmkKillOccurred { |
| 3099 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3100 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3101 | |
| 3102 | // The process name. |
| 3103 | optional string process_name = 2; |
| 3104 | |
| 3105 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3106 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3107 | |
| 3108 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3109 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3110 | |
| 3111 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3112 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3113 | |
| 3114 | // RSS |
| 3115 | optional int64 rss_in_bytes = 6; |
| 3116 | |
| 3117 | // CACHE |
| 3118 | optional int64 cache_in_bytes = 7; |
| 3119 | |
| 3120 | // SWAP |
| 3121 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3122 | |
| 3123 | // The elapsed real time of start of the process. |
| 3124 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3125 | |
| 3126 | // Min oom adj score considered by lmkd. |
| 3127 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3128 | } |
| 3129 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3130 | /* |
| 3131 | * Logs when the ActivityManagerService detects that an app died. |
| 3132 | * |
| 3133 | * Logged from: |
| 3134 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3135 | */ |
| 3136 | message AppDied { |
| 3137 | // timestamp(elapsedRealtime) of record creation |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 3138 | optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3139 | } |
| 3140 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3141 | /** |
| 3142 | * An atom for generic metrics logging. Available from Android Q. |
| 3143 | */ |
| 3144 | message GenericAtom { |
| 3145 | // The uid of the application that sent this custom atom. |
| 3146 | optional int32 uid = 1 [(is_uid) = true]; |
| 3147 | |
| 3148 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3149 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3150 | } |
| 3151 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3152 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3153 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3154 | * |
| 3155 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3156 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3157 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3158 | message BiometricAcquired { |
| 3159 | // Biometric modality that was acquired. |
| 3160 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3161 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 3162 | optional int32 user = 2; |
| 3163 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3164 | optional bool is_crypto = 3; |
| 3165 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 3166 | // authenticate. Other actions may indicate an error. |
| 3167 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3168 | // The client that this acquisition was received for. |
| 3169 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3170 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 3171 | optional int32 acquire_info = 6; |
| 3172 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 3173 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3174 | // Dictates if this message should trigger additional debugging. |
| 3175 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3176 | } |
| 3177 | |
| 3178 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3179 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3180 | * |
| 3181 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3182 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3183 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3184 | message BiometricAuthenticated { |
| 3185 | // Biometric modality that was used. |
| 3186 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3187 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3188 | optional int32 user = 2; |
| 3189 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 3190 | // storage. |
| 3191 | optional bool is_crypto = 3; |
| 3192 | // The client that this acquisition was received for. |
| 3193 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3194 | // If authentication requires user confirmation. See BiometricPrompt's |
| 3195 | // setRequireConfirmation(bool) method. |
| 3196 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3197 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3198 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3199 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3200 | REJECTED = 1; |
| 3201 | PENDING_CONFIRMATION = 2; |
| 3202 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3203 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3204 | |
| 3205 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3206 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3207 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 3208 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 3209 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 3210 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3211 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3212 | // Dictates if this message should trigger additional debugging. |
| 3213 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3214 | } |
| 3215 | |
| 3216 | /** |
| 3217 | * Logs when a biometric error occurs. |
| 3218 | * |
| 3219 | * Logged from: |
| 3220 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3221 | */ |
| 3222 | message BiometricErrorOccurred { |
| 3223 | // Biometric modality that was used. |
| 3224 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3225 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3226 | optional int32 user = 2; |
| 3227 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3228 | optional bool is_crypto = 3; |
| 3229 | // Action that the device is performing. |
| 3230 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3231 | // The client that this acquisition was received for. |
| 3232 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3233 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 3234 | // are unique to modality. |
| 3235 | optional int32 error_info = 6; |
| 3236 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 3237 | // by the vendor and not specified by the HIDL interface. |
| 3238 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3239 | // Dictates if this message should trigger additional debugging. |
| 3240 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3241 | } |
| 3242 | |
| 3243 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3244 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3245 | * Logged from: |
| 3246 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3247 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3248 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3249 | // Biometric modality. |
| 3250 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3251 | // Type of issue detected. |
| 3252 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3253 | // Dictates if this message should trigger additional debugging. |
| 3254 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3255 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3256 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 3257 | /** |
| 3258 | * Logs when a biometric enrollment occurs. |
| 3259 | * |
| 3260 | * Logged from: |
| 3261 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3262 | */ |
| 3263 | message BiometricEnrolled { |
| 3264 | // Biometric modality that was used. |
| 3265 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3266 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3267 | optional int32 user = 2; |
| 3268 | // The amount of time the enrollment took in milliseconds. |
| 3269 | optional int64 latency_millis = 3; |
| 3270 | // Whether or not the enrollment was successful. |
| 3271 | optional bool success = 4; |
| 3272 | } |
| 3273 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3274 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3275 | * Logs when a flag flip update occurrs. Used for mainline modules that update via flag flips. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3276 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3277 | message FlagFlipUpdateOccurred { |
| 3278 | // If the event is from a flag config package, specify the package name. |
| 3279 | optional string flag_flip_package_name = 1; |
| 3280 | |
| 3281 | // The order id of the package |
| 3282 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3283 | } |
| 3284 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3285 | /** |
| 3286 | * Potential experiment ids that goes with a train install. |
| 3287 | */ |
| 3288 | message TrainExperimentIds { |
| 3289 | repeated int64 experiment_id = 1; |
| 3290 | } |
| 3291 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3292 | /* |
| 3293 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3294 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3295 | */ |
| 3296 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3297 | // Name of the train. |
| 3298 | optional string train_name = 1; |
| 3299 | // Version code for a "train" of packages that need to be installed atomically |
| 3300 | optional int64 train_version_code = 2; |
| 3301 | // After installation of this package, device requires a restart. |
| 3302 | optional bool requires_staging = 3; |
| 3303 | // Rollback should be enabled for this install. |
| 3304 | optional bool rollback_enabled = 4; |
| 3305 | // Requires low latency monitoring if possible. |
| 3306 | optional bool requires_low_latency_monitor = 5; |
| 3307 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3308 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3309 | UNKNOWN = 0; |
| 3310 | INSTALL_REQUESTED = 1; |
| 3311 | INSTALL_STARTED = 2; |
| 3312 | INSTALL_STAGED_NOT_READY = 3; |
| 3313 | INSTALL_STAGED_READY = 4; |
| 3314 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3315 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 3316 | // and INSTALL_FAILURE_COMMIT. |
| 3317 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 3318 | // This enum is for installs that are manually cancelled via the Manual Update UI. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3319 | INSTALL_CANCELLED = 7; |
| 3320 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 3321 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 3322 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 3323 | INSTALLER_ROLLBACK_STAGED = 11; |
| 3324 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 3325 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 3326 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 3327 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 3328 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 3329 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 3330 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 3331 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 3332 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 3333 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 3334 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3335 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 3336 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 3337 | INSTALL_FAILURE_COMMIT = 25; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3338 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3339 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3340 | // Possible experiment ids for monitoring this push. |
| 3341 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 3342 | // user id |
| 3343 | optional int32 user_id = 8; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3344 | } |
| 3345 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 3346 | /** Represents USB port overheat event. */ |
| 3347 | message UsbPortOverheatEvent { |
| 3348 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 3349 | optional int32 plug_temperature_deci_c = 1; |
| 3350 | |
| 3351 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 3352 | optional int32 max_temperature_deci_c = 2; |
| 3353 | |
| 3354 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 3355 | optional int32 time_to_overheat_secs = 3; |
| 3356 | |
| 3357 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 3358 | optional int32 time_to_hysteresis_secs = 4; |
| 3359 | |
| 3360 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 3361 | optional int32 time_to_inactive_secs = 5; |
| 3362 | }; |
| 3363 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 3364 | /** |
| 3365 | * Logs total effective full charge and discharge cycles on a battery. |
| 3366 | * Here are some examples of one effective cycle: |
| 3367 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 3368 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 3369 | * Pulled from: |
| 3370 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3371 | */ |
| 3372 | message BatteryCycleCount { |
| 3373 | /* Number of total charge and discharge cycles on the system battery. */ |
| 3374 | optional int32 cycle_count = 1; |
| 3375 | } |
| 3376 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3377 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3378 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 3379 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3380 | * Pulled from: |
| 3381 | * StatsCompanionService |
| 3382 | */ |
| 3383 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3384 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3385 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3386 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3387 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3388 | PUBLIC = 1; |
| 3389 | PRIVATE = 2; |
| 3390 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3391 | } |
| 3392 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3393 | // The type of external storage. |
| 3394 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3395 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 3396 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3397 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3398 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3399 | } |
| 3400 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3401 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3402 | * Logs when a connection becomes available and lost. |
| 3403 | * Logged in StatsCompanionService.java |
| 3404 | */ |
| 3405 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3406 | // Id of the network. |
| 3407 | optional int32 net_id = 1; |
| 3408 | |
| 3409 | enum State { |
| 3410 | UNKNOWN = 0; |
| 3411 | CONNECTED = 1; |
| 3412 | DISCONNECTED = 2; |
| 3413 | } |
| 3414 | // Connected state of a network. |
| 3415 | optional State state = 2; |
| 3416 | } |
| 3417 | |
| 3418 | /** |
| 3419 | * Logs when a service starts and stops. |
| 3420 | * Logged from: |
| 3421 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3422 | */ |
| 3423 | message ServiceStateChanged { |
| 3424 | |
| 3425 | optional int32 uid = 1 [(is_uid) = true]; |
| 3426 | |
| 3427 | optional string package_name = 2; |
| 3428 | |
| 3429 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3430 | |
| 3431 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3432 | START = 1; |
| 3433 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3434 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3435 | |
| 3436 | optional State state = 4; |
| 3437 | } |
| 3438 | |
| 3439 | /** |
| 3440 | * Logs when a service is launched. |
| 3441 | * Logged from: |
| 3442 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3443 | */ |
| 3444 | message ServiceLaunchReported { |
| 3445 | |
| 3446 | optional int32 uid = 1 [(is_uid) = true]; |
| 3447 | |
| 3448 | optional string package_name = 2; |
| 3449 | |
| 3450 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3451 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3452 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 3453 | /** |
| 3454 | * Logs when a hidden API is used. |
| 3455 | * |
| 3456 | * Logged from: |
| 3457 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 3458 | */ |
| 3459 | message HiddenApiUsed { |
| 3460 | // The uid of the app making the hidden access. |
| 3461 | optional int32 uid = 1 [(is_uid) = true]; |
| 3462 | |
| 3463 | // Signature of the method or field accessed. |
| 3464 | optional string signature = 2; |
| 3465 | |
| 3466 | enum AccessMethod { |
| 3467 | NONE = 0; |
| 3468 | REFLECTION = 1; |
| 3469 | JNI = 2; |
| 3470 | LINKING = 3; |
| 3471 | } |
| 3472 | |
| 3473 | // Type of access. |
| 3474 | optional AccessMethod access_method = 3; |
| 3475 | |
| 3476 | // Whether the access was prevented or not. |
| 3477 | optional bool access_denied = 4; |
| 3478 | } |
| 3479 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3480 | /** |
| 3481 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 3482 | * - When user sees privacy chip |
| 3483 | * - When user clicks privacy chip |
| 3484 | * - How does the user exit the Privacy Dialog |
| 3485 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3486 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 3487 | */ |
| 3488 | message PrivacyIndicatorsInteracted { |
| 3489 | |
| 3490 | enum Type { |
| 3491 | UNKNOWN = 0; |
| 3492 | CHIP_VIEWED = 1; |
| 3493 | CHIP_CLICKED = 2; |
| 3494 | DIALOG_PRIVACY_SETTINGS = 3; |
| 3495 | DIALOG_DISMISS = 4; |
| 3496 | DIALOG_LINE_ITEM = 5; |
| 3497 | } |
| 3498 | |
| 3499 | optional Type type = 1 [(state_field_option).option = EXCLUSIVE]; |
| 3500 | |
| 3501 | // Used if the type is LINE_ITEM |
| 3502 | optional string package_name = 2; |
| 3503 | } |
| 3504 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 3505 | /** |
| 3506 | * Logs information about a package that is moved from the internal to external storage and vice |
| 3507 | * versa. |
| 3508 | * It logs the package name, the type of the external storage where the package is installed |
| 3509 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 3510 | * and the move type: if it's from internal to external or the other way around. |
| 3511 | * |
| 3512 | * Logged from: |
| 3513 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3514 | */ |
| 3515 | message AppMovedStorageReported { |
| 3516 | enum MoveType { |
| 3517 | UNKNOWN = 0; |
| 3518 | TO_EXTERNAL = 1; |
| 3519 | TO_INTERNAL = 2; |
| 3520 | } |
| 3521 | // The type of the external storage. |
| 3522 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 3523 | // The type of move. |
| 3524 | optional MoveType move_type = 2; |
| 3525 | // The name of the package that was moved. |
| 3526 | optional string package_name = 3; |
| 3527 | } |
| 3528 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 3529 | /** |
| 3530 | * Logs when system server watchdog occurs. |
| 3531 | * Logged from: |
| 3532 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 3533 | */ |
| 3534 | message SystemServerWatchdogOccurred { |
| 3535 | optional string subject = 1; |
| 3536 | } |
| 3537 | |
| 3538 | /** |
| 3539 | * Logs when new file added to tombstones. |
| 3540 | * Logged from: |
| 3541 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 3542 | */ |
| 3543 | message TombStoneOccurred { |
| 3544 | } |
| 3545 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 3546 | /* |
| 3547 | * Information about a role request |
| 3548 | * |
| 3549 | * Logged from: |
| 3550 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 3551 | */ |
| 3552 | message RoleRequestResultReported { |
| 3553 | // UID of application requesting the role |
| 3554 | optional int32 requesting_uid = 1; |
| 3555 | |
| 3556 | // Package name of application requesting the role |
| 3557 | optional string requesting_package_name = 2; |
| 3558 | |
| 3559 | // The role to be granted |
| 3560 | optional string role_name = 3; |
| 3561 | |
| 3562 | // The count of applications qualifying for the role |
| 3563 | optional int32 qualifying_count = 4; |
| 3564 | |
| 3565 | // UID of application current granted the role |
| 3566 | optional int32 current_uid = 5; |
| 3567 | |
| 3568 | // Package name of application current granted the role |
| 3569 | optional string current_package_name = 6; |
| 3570 | |
| 3571 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 3572 | // application |
| 3573 | optional int32 granted_another_uid = 7; |
| 3574 | |
| 3575 | // Package name of another application that user chose to grant the role to, instead of the |
| 3576 | // requesting application |
| 3577 | optional string granted_another_package_name = 8; |
| 3578 | |
| 3579 | enum Result { |
| 3580 | UNDEFINED = 0; |
| 3581 | // role request was ignored |
| 3582 | IGNORED = 1; |
| 3583 | // role request was ignored because it's already granted |
| 3584 | IGNORED_ALREADY_GRANTED = 2; |
| 3585 | // role request was ignored because the application isn't qualified |
| 3586 | IGNORED_NOT_QUALIFIED = 3; |
| 3587 | // role request was ignored because user said it should be always denied |
| 3588 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 3589 | // role was granted by user action |
| 3590 | USER_GRANTED = 5; |
| 3591 | // role was denied by user action |
| 3592 | USER_DENIED = 6; |
| 3593 | // role was denied by user granting another application the role |
| 3594 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 3595 | // role was denied and set to be always denied by the user |
| 3596 | USER_DENIED_WITH_ALWAYS = 8; |
| 3597 | } |
| 3598 | // The result of the role request |
| 3599 | optional Result result = 9; |
| 3600 | } |
| 3601 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3602 | ////////////////////////////////////////////////////////////////////// |
| 3603 | // Pulled atoms below this line // |
| 3604 | ////////////////////////////////////////////////////////////////////// |
| 3605 | |
| 3606 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3607 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 3608 | * |
| 3609 | * Pulled from: |
| 3610 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3611 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3612 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3613 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3614 | |
| 3615 | optional int64 rx_bytes = 2; |
| 3616 | |
| 3617 | optional int64 rx_packets = 3; |
| 3618 | |
| 3619 | optional int64 tx_bytes = 4; |
| 3620 | |
| 3621 | optional int64 tx_packets = 5; |
| 3622 | } |
| 3623 | |
| 3624 | /** |
| 3625 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 3626 | * |
| 3627 | * Pulled from: |
| 3628 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3629 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3630 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3631 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3632 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3633 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 3634 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3635 | |
| 3636 | optional int64 rx_bytes = 3; |
| 3637 | |
| 3638 | optional int64 rx_packets = 4; |
| 3639 | |
| 3640 | optional int64 tx_bytes = 5; |
| 3641 | |
| 3642 | optional int64 tx_packets = 6; |
| 3643 | } |
| 3644 | |
| 3645 | /** |
| 3646 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 3647 | * |
| 3648 | * Pulled from: |
| 3649 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3650 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3651 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3652 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3653 | |
| 3654 | optional int64 rx_bytes = 2; |
| 3655 | |
| 3656 | optional int64 rx_packets = 3; |
| 3657 | |
| 3658 | optional int64 tx_bytes = 4; |
| 3659 | |
| 3660 | optional int64 tx_packets = 5; |
| 3661 | } |
| 3662 | |
| 3663 | /** |
| 3664 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 3665 | * |
| 3666 | * Pulled from: |
| 3667 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3668 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3669 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3670 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3671 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3672 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 3673 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3674 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3675 | |
| 3676 | optional int64 rx_bytes = 3; |
| 3677 | |
| 3678 | optional int64 rx_packets = 4; |
| 3679 | |
| 3680 | optional int64 tx_bytes = 5; |
| 3681 | |
| 3682 | optional int64 tx_packets = 6; |
| 3683 | } |
| 3684 | |
| 3685 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3686 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 3687 | * |
| 3688 | * Pulled from: |
| 3689 | * StatsCompanionService |
| 3690 | */ |
| 3691 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3692 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3693 | |
| 3694 | optional int64 rx_bytes = 2; |
| 3695 | |
| 3696 | optional int64 tx_bytes = 3; |
| 3697 | } |
| 3698 | |
| 3699 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3700 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 3701 | * android/internal/os/KernelWakelockStats.java |
| 3702 | * |
| 3703 | * Pulled from: |
| 3704 | * StatsCompanionService using KernelWakelockReader. |
| 3705 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3706 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3707 | optional string name = 1; |
| 3708 | |
| 3709 | optional int32 count = 2; |
| 3710 | |
| 3711 | optional int32 version = 3; |
| 3712 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3713 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3714 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3715 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3716 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3717 | * Pulls low power state information. If power.stats HAL is not available, this |
| 3718 | * includes platform and subsystem sleep state information, |
| 3719 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 3720 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3721 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3722 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3723 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 3724 | * as defined in: |
| 3725 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 3726 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3727 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3728 | // Subsystem name |
| 3729 | optional string subsystem_name = 1; |
| 3730 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 3731 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 3732 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 3733 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3734 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 3735 | // The number of times it entered, or voted for entering the sleep state |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3736 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 3737 | // The length of time spent in, or spent voting for, the sleep state |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3738 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 3739 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3740 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3741 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 3742 | * Pulls on-device power measurement information. |
| 3743 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 3744 | * Pulled from: |
| 3745 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 3746 | */ |
| 3747 | message OnDevicePowerMeasurement { |
| 3748 | // Name of the subsystem (to which the rail belongs). |
| 3749 | optional string subsystem_name = 1; |
| 3750 | |
| 3751 | // Rail name. The rail lies within the subsystem. |
| 3752 | optional string rail_name = 2; |
| 3753 | |
| 3754 | // Time (in ms since boot) at which the rail energy value was measured. |
| 3755 | // This may differ slightly from the time that statsd logs this information. |
| 3756 | optional uint64 measurement_timestamp_millis = 3; |
| 3757 | |
| 3758 | // Accumulated energy used via the rail since device boot in uWs. |
| 3759 | optional uint64 energy_microwatt_secs = 4; |
| 3760 | } |
| 3761 | |
| 3762 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3763 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 3764 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 3765 | * starts from highest to lowest. The value should be monotonically |
| 3766 | * increasing since boot. However, if there is a cpu |
| 3767 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3768 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3769 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3770 | optional uint32 cluster = 1; |
| 3771 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3772 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 3773 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3774 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3775 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3776 | * Pulls Cpu Time Per Uid. |
| 3777 | * Note that isolated process uid time should be attributed to host uids. |
| 3778 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3779 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3780 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 3781 | optional uint64 user_time_micros = 2; |
| 3782 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3783 | } |
| 3784 | |
| 3785 | /** |
| 3786 | * Pulls Cpu Time Per Uid per frequency. |
| 3787 | * Note that isolated process uid time should be attributed to host uids. |
| 3788 | * For each uid, we order the time by descending frequencies. |
| 3789 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3790 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3791 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 3792 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3793 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 3794 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 3795 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3796 | /** |
| 3797 | * Pulls Wifi Controller Activity Energy Info |
| 3798 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3799 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3800 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3801 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3802 | // stack reported state |
| 3803 | // TODO: replace this with proto enum |
| 3804 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3805 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3806 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3807 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3808 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3809 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3810 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3811 | // product of current(mA), voltage(V) and time(ms) |
| 3812 | optional uint64 controller_energy_used = 6; |
| 3813 | } |
| 3814 | |
| 3815 | /** |
| 3816 | * Pulls Modem Activity Energy Info |
| 3817 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3818 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3819 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3820 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3821 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3822 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3823 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3824 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3825 | /** |
| 3826 | * Tx power index |
| 3827 | * index 0 = tx_power < 0dBm |
| 3828 | * index 1 = 0dBm < tx_power < 5dBm |
| 3829 | * index 2 = 5dBm < tx_power < 15dBm |
| 3830 | * index 3 = 15dBm < tx_power < 20dBm |
| 3831 | * index 4 = tx_power > 20dBm |
| 3832 | */ |
| 3833 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3834 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3835 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3836 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3837 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3838 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3839 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3840 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3841 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3842 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3843 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3844 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 3845 | // product of current(mA), voltage(V) and time(ms) |
| 3846 | optional uint64 energy_used = 10; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 3847 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 3848 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3849 | /** |
| 3850 | * Pulls Bluetooth Activity Energy Info |
| 3851 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 3852 | */ |
| 3853 | message BluetoothActivityInfo { |
| 3854 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3855 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3856 | // bluetooth stack state |
| 3857 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3858 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3859 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3860 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3861 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3862 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3863 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3864 | // product of current(mA), voltage(V) and time(ms) |
| 3865 | optional uint64 energy_used = 6; |
| 3866 | } |
| 3867 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 3868 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3869 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3870 | * |
| 3871 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3872 | */ |
| 3873 | message ProcessMemoryState { |
| 3874 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3875 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3876 | |
| 3877 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3878 | // Usually package name, "system" for system server. |
| 3879 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3880 | optional string process_name = 2; |
| 3881 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3882 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3883 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3884 | |
| 3885 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3886 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3887 | |
| 3888 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3889 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3890 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3891 | // RSS |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3892 | // Value is read from /proc/PID/stat, field 24. Or from memory.stat, field |
| 3893 | // total_rss if per-app memory cgroups are enabled. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3894 | optional int64 rss_in_bytes = 6; |
| 3895 | |
| 3896 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3897 | // Value is read from memory.stat, field total_cache if per-app memory |
| 3898 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3899 | optional int64 cache_in_bytes = 7; |
| 3900 | |
| 3901 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3902 | // Value is read from memory.stat, field total_swap if per-app memory |
Rafal Slawik | 44af3b3 | 2019-04-16 13:16:15 +0100 | [diff] [blame] | 3903 | // cgroups are enabled. Otherwise, VmSwap from /proc/PID/status. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 3904 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 3905 | |
Rafal Slawik | d03ae42 | 2018-11-20 11:27:45 +0000 | [diff] [blame] | 3906 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3907 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 3908 | |
| 3909 | // Elapsed real time when the process started. |
| 3910 | // Value is read from /proc/PID/stat, field 22. 0 if read from per-app memory cgroups. |
| 3911 | optional int64 start_time_nanos = 10; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 3912 | } |
| 3913 | |
| 3914 | /* |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3915 | * Logs the memory stats for a native process (from procfs). |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3916 | * |
| 3917 | * Pulled from StatsCompanionService for selected native processes. |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3918 | */ |
| 3919 | message NativeProcessMemoryState { |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3920 | // The uid if available. -1 means not available. |
| 3921 | optional int32 uid = 1 [(is_uid) = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3922 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3923 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3924 | // Value read from /proc/PID/cmdline. |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3925 | optional string process_name = 2; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3926 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3927 | // # of page-faults |
| 3928 | optional int64 page_fault = 3; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3929 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3930 | // # of major page-faults |
| 3931 | optional int64 page_major_fault = 4; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3932 | |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3933 | // RSS |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3934 | // Value read from /proc/PID/stat, field 24. |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3935 | optional int64 rss_in_bytes = 5; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3936 | |
Rafal Slawik | d03ae42 | 2018-11-20 11:27:45 +0000 | [diff] [blame] | 3937 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3938 | optional int64 rss_high_watermark_in_bytes = 6 [deprecated = true]; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 3939 | |
| 3940 | // Elapsed real time when the process started. |
| 3941 | // Value is read from /proc/PID/stat, field 22. |
| 3942 | optional int64 start_time_nanos = 7; |
Rafal Slawik | 44af3b3 | 2019-04-16 13:16:15 +0100 | [diff] [blame] | 3943 | |
| 3944 | // SWAP |
| 3945 | // Value read from /proc/PID/status, field VmSwap. |
| 3946 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 3947 | } |
| 3948 | |
| 3949 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3950 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3951 | * |
| 3952 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 3953 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 3954 | * |
| 3955 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3956 | */ |
| 3957 | message ProcessMemoryHighWaterMark { |
| 3958 | // The uid if available. -1 means not available. |
| 3959 | optional int32 uid = 1 [(is_uid) = true]; |
| 3960 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 3961 | // The process name. |
| 3962 | // Usually package name or process cmdline. |
| 3963 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 3964 | optional string process_name = 2; |
| 3965 | |
| 3966 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 3967 | // /proc/PID/status. |
| 3968 | optional int64 rss_high_water_mark_in_bytes = 3; |
| 3969 | } |
| 3970 | |
| 3971 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3972 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3973 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3974 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3975 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3976 | } |
| 3977 | |
| 3978 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3979 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3980 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 3981 | message SystemUptime { |
| 3982 | // Milliseconds since the system was booted. |
| 3983 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 3984 | // for external input). |
| 3985 | // It is not affected by clock scaling, idle, or other power saving mechanisms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3986 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 3987 | } |
| 3988 | |
| 3989 | /* |
| 3990 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 3991 | * active: X (X is # cores) |
| 3992 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 3993 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 3994 | * ... |
| 3995 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 3996 | * The file contains a monotonically increasing count of time for a single boot. |
| 3997 | */ |
| 3998 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3999 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4000 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4001 | } |
| 4002 | |
| 4003 | /** |
| 4004 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 4005 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 4006 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4007 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4008 | * ... |
| 4009 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 4010 | * The file contains a monotonically increasing count of time for a single boot. |
| 4011 | */ |
| 4012 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4013 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4014 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4015 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 4016 | } |
| 4017 | |
| 4018 | /* |
| 4019 | * Pulls free disk space, for data, system partition and temporary directory. |
| 4020 | */ |
| 4021 | message DiskSpace { |
| 4022 | // available bytes in data partition |
| 4023 | optional uint64 data_available_bytes = 1; |
| 4024 | // available bytes in system partition |
| 4025 | optional uint64 system_available_bytes = 2; |
| 4026 | // available bytes in download cache or temp directories |
| 4027 | optional uint64 temp_available_bytes = 3; |
| 4028 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4029 | |
| 4030 | /** |
| 4031 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 4032 | * |
| 4033 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4034 | */ |
| 4035 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4036 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4037 | } |
| 4038 | |
| 4039 | /** |
| 4040 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4041 | * Pulled from: |
| 4042 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4043 | */ |
| 4044 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4045 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4046 | } |
| 4047 | |
| 4048 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4049 | * Pulls battery voltage. |
| 4050 | * Pulled from: |
| 4051 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4052 | */ |
| 4053 | message BatteryVoltage { |
| 4054 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4055 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4056 | } |
| 4057 | |
| 4058 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 4059 | * Pulls battery level (percent full, from 0 to 100). |
| 4060 | * |
| 4061 | * Pulled from: |
| 4062 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4063 | */ |
| 4064 | message BatteryLevel { |
| 4065 | // Battery level. Should be in [0, 100]. |
| 4066 | optional int32 battery_level = 1; |
| 4067 | } |
| 4068 | |
| 4069 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4070 | * Pulls the temperature of various parts of the device. |
| 4071 | * The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4072 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4073 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4074 | */ |
| 4075 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4076 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4077 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 4078 | |
| 4079 | // The name of the temperature source. Eg. CPU0 |
| 4080 | optional string sensor_name = 2; |
| 4081 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4082 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4083 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4084 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4085 | |
| 4086 | // Relative severity of the throttling, see enum definition. |
| 4087 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 4088 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4089 | |
| 4090 | /** |
| 4091 | * Pulls the statistics of calls to Binder. |
| 4092 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 4093 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4094 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4095 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4096 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4097 | */ |
| 4098 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4099 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 4100 | // executing the binder transaction attribute the transaction to another uid using |
| 4101 | // Binder.setThreadWorkSource(). |
| 4102 | // |
| 4103 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4104 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4105 | // UID of the process executing the binder transaction. |
| 4106 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4107 | // Fully qualified class name of the API call. |
| 4108 | // |
| 4109 | // This is a system server class name. |
| 4110 | // |
| 4111 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 4112 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 4113 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 4114 | // commonly used APIs. |
| 4115 | optional string service_class_name = 2; |
| 4116 | // Method name of the API call. It can also be a transaction code if we cannot |
| 4117 | // resolve it to a name. See Binder#getTransactionName. |
| 4118 | // |
| 4119 | // This is a system server method name. |
| 4120 | optional string service_method_name = 3; |
| 4121 | // Total number of API calls. |
| 4122 | optional int64 call_count = 4; |
| 4123 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4124 | optional bool screen_interactive = 13; |
| 4125 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 4126 | // call_count will be equal to recorded_call_count. |
| 4127 | // |
| 4128 | // If recorded_call_count is different than call_count, it means data collection has been |
| 4129 | // sampled. All the fields below will be sampled in this case. |
| 4130 | optional int64 recorded_call_count = 12; |
| 4131 | // Number of exceptions thrown by the API. |
| 4132 | optional int64 recorded_exception_count = 5; |
| 4133 | // Total latency of all API calls. |
| 4134 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 4135 | optional int64 recorded_total_latency_micros = 6; |
| 4136 | // Maximum latency of one API call. |
| 4137 | optional int64 recorded_max_latency_micros = 7; |
| 4138 | // Total CPU usage of all API calls. |
| 4139 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 4140 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 4141 | optional int64 recorded_total_cpu_micros = 8; |
| 4142 | // Maximum CPU usage of one API call. |
| 4143 | optional int64 recorded_max_cpu_micros = 9; |
| 4144 | // Maximum parcel reply size of one API call. |
| 4145 | optional int64 recorded_max_reply_size_bytes = 10; |
| 4146 | // Maximum parcel request size of one API call. |
| 4147 | optional int64 recorded_max_request_size_bytes = 11; |
| 4148 | } |
| 4149 | |
| 4150 | /** |
| 4151 | * Pulls the statistics of exceptions during calls to Binder. |
| 4152 | * |
| 4153 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 4154 | * > adb shell dumpsys binder_calls_stats --reset |
| 4155 | */ |
| 4156 | message BinderCallsExceptions { |
| 4157 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 4158 | // |
| 4159 | // This is an exception class name thrown by the system server. |
| 4160 | optional string exception_class_name = 1; |
| 4161 | // Total number of exceptions. |
| 4162 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4163 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4164 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4165 | /** |
| 4166 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 4167 | * |
| 4168 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4169 | * config on the device. |
| 4170 | * |
| 4171 | * Next tag: 11 |
| 4172 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4173 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 4174 | // The uid that made a call to the System Server and caused the message to be enqueued. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4175 | optional int32 uid = 1 [(is_uid) = true]; |
| 4176 | |
| 4177 | // Fully qualified class name of the handler target class. |
| 4178 | // |
| 4179 | // This field does not contain PII. This is a system server class name. |
| 4180 | optional string handler_class_name = 2; |
| 4181 | |
| 4182 | // The name of the thread that runs the Looper. |
| 4183 | // |
| 4184 | // This field does not contain PII. This is a system server thread name. |
| 4185 | optional string looper_thread_name = 3; |
| 4186 | |
| 4187 | // The name of the dispatched message. |
| 4188 | // |
| 4189 | // This field does not contain PII. This is a system server constant or class |
| 4190 | // name. |
| 4191 | optional string message_name = 4; |
| 4192 | |
| 4193 | // Total number of successfully dispatched messages. |
| 4194 | optional int64 message_count = 5; |
| 4195 | |
| 4196 | // Total number of messages that failed dispatching. |
| 4197 | optional int64 exception_count = 6; |
| 4198 | |
| 4199 | // Total number of processed messages we have data recorded for. If we |
| 4200 | // collected data for all the messages, message_count will be equal to |
| 4201 | // recorded_message_count. |
| 4202 | // |
| 4203 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4204 | // collection has been sampled. The fields below will be sampled in this case. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4205 | optional int64 recorded_message_count = 7; |
| 4206 | |
| 4207 | // Total latency of all processed messages. |
| 4208 | // Average can be computed using recorded_total_latency_micros / |
| 4209 | // recorded_message_count. |
| 4210 | optional int64 recorded_total_latency_micros = 8; |
| 4211 | |
| 4212 | // Total CPU usage of all processed message. |
| 4213 | // Average can be computed using recorded_total_cpu_micros / |
| 4214 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4215 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4216 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4217 | |
| 4218 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4219 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4220 | |
| 4221 | // Max recorded CPU usage of all processed messages. |
| 4222 | optional int64 recorded_max_cpu_micros = 11; |
| 4223 | |
| 4224 | // Max recorded latency of all processed messages. |
| 4225 | optional int64 recorded_max_latency_micros = 12; |
| 4226 | |
| 4227 | // Total number of messages we tracked the dispatching delay for. If we |
| 4228 | // collected data for all the messages, message_count will be equal to |
| 4229 | // recorded_delay_message_count. |
| 4230 | // |
| 4231 | // If recorded_delay_message_count is different than message_count, it means data |
| 4232 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 4233 | // The fields below will be sampled in this case. |
| 4234 | optional int64 recorded_delay_message_count = 13; |
| 4235 | |
| 4236 | // Total dispatching delay of all processed messages. |
| 4237 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4238 | // and the actual dispatching time. |
| 4239 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 4240 | optional int64 recorded_total_delay_millis = 14; |
| 4241 | |
| 4242 | // Max dispatching delay of all processed messages. |
| 4243 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4244 | // and the actual dispatching time. |
| 4245 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4246 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 4247 | |
| 4248 | /** |
| 4249 | * Pulls disk information, such as write speed and latency. |
| 4250 | */ |
| 4251 | message DiskStats { |
| 4252 | // Time taken to open, write 512B to, and close a file. |
| 4253 | // -1 if error performing the check. |
| 4254 | optional int64 data_write_latency_millis = 1; |
| 4255 | |
| 4256 | optional bool file_based_encryption = 2; |
| 4257 | |
| 4258 | // Recent disk write speed in kB/s. |
| 4259 | // -1 if error querying storageed. |
| 4260 | // 0 if data is unavailable. |
| 4261 | optional int32 recent_disk_write_speed = 3; |
| 4262 | } |
| 4263 | |
| 4264 | |
| 4265 | /** |
| 4266 | * Free and total bytes of the Data, Cache, and System partition. |
| 4267 | */ |
| 4268 | message DirectoryUsage { |
| 4269 | enum Directory { |
| 4270 | UNKNOWN = 0; |
| 4271 | DATA = 1; |
| 4272 | CACHE = 2; |
| 4273 | SYSTEM = 3; |
| 4274 | } |
| 4275 | optional Directory directory = 1; |
| 4276 | optional int64 free_bytes = 2; |
| 4277 | optional int64 total_bytes = 3; |
| 4278 | } |
| 4279 | |
| 4280 | |
| 4281 | /** |
| 4282 | * Size of an application: apk size, data size, and cache size. |
| 4283 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4284 | * Information is only reported for apps with the primary user (user 0). |
| 4285 | * Sizes are aggregated by package name. |
| 4286 | */ |
| 4287 | message AppSize { |
| 4288 | // Including uids will involve modifying diskstats logic. |
| 4289 | optional string package_name = 1; |
| 4290 | // App size in bytes. -1 if unavailable. |
| 4291 | optional int64 app_size_bytes = 2; |
| 4292 | // App data size in bytes. -1 if unavailable. |
| 4293 | optional int64 app_data_size_bytes = 3; |
| 4294 | // App cache size in bytes. -1 if unavailable. |
| 4295 | optional int64 app_cache_size_bytes = 4; |
| 4296 | // Time that the cache file was produced. |
| 4297 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4298 | optional int64 cache_time_millis = 5; |
| 4299 | } |
| 4300 | |
| 4301 | |
| 4302 | /** |
| 4303 | * Size of a particular category. Eg: photos, videos. |
| 4304 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4305 | */ |
| 4306 | message CategorySize { |
| 4307 | enum Category { |
| 4308 | UNKNOWN = 0; |
| 4309 | APP_SIZE = 1; |
| 4310 | APP_DATA_SIZE = 2; |
| 4311 | APP_CACHE_SIZE = 3; |
| 4312 | PHOTOS = 4; |
| 4313 | VIDEOS = 5; |
| 4314 | AUDIO = 6; |
| 4315 | DOWNLOADS = 7; |
| 4316 | SYSTEM = 8; |
| 4317 | OTHER = 9; |
| 4318 | } |
| 4319 | optional Category category = 1; |
| 4320 | // Category size in bytes. |
| 4321 | optional int64 size_bytes = 2; |
| 4322 | // Time that the cache file was produced. |
| 4323 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4324 | optional int64 cache_time_millis = 3; |
| 4325 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4326 | |
| 4327 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 4328 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 4329 | * |
| 4330 | * Read/write bytes are I/O events from a storage device |
| 4331 | * Read/write chars are data requested by read/write syscalls, and can be |
| 4332 | * satisfied by caching. |
| 4333 | * |
| 4334 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 4335 | */ |
| 4336 | message DiskIo { |
| 4337 | optional int32 uid = 1 [(is_uid) = true]; |
| 4338 | optional int64 fg_chars_read = 2; |
| 4339 | optional int64 fg_chars_write = 3; |
| 4340 | optional int64 fg_bytes_read = 4; |
| 4341 | optional int64 fg_bytes_write = 5; |
| 4342 | optional int64 bg_chars_read = 6; |
| 4343 | optional int64 bg_chars_write = 7; |
| 4344 | optional int64 bg_bytes_read = 8; |
| 4345 | optional int64 bg_bytes_write = 9; |
| 4346 | optional int64 fg_fsync = 10; |
| 4347 | optional int64 bg_fsync= 11; |
| 4348 | } |
| 4349 | |
| 4350 | |
| 4351 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4352 | * Pulls the number of fingerprints for each user. |
| 4353 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4354 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4355 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4356 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4357 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 4358 | // Defined in android/os/UserHandle.java |
| 4359 | optional int32 user = 1; |
| 4360 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4361 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4362 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4363 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 4364 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4365 | * Pulls the number of faces for each user. |
| 4366 | * |
| 4367 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 4368 | */ |
| 4369 | message NumFacesEnrolled { |
| 4370 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 4371 | // Defined in android/os/UserHandle.java |
| 4372 | optional int32 user = 1; |
| 4373 | // Number of faces registered to that user. |
| 4374 | optional int32 num_faces_enrolled = 2; |
| 4375 | } |
| 4376 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 4377 | * A mapping of role holder -> role |
| 4378 | */ |
| 4379 | message RoleHolder { |
| 4380 | // uid of the role holder |
| 4381 | optional int32 uid = 1 [(is_uid) = true]; |
| 4382 | |
| 4383 | // package name of the role holder |
| 4384 | optional string package_name = 2; |
| 4385 | |
| 4386 | // the role held |
| 4387 | optional string role = 3; |
| 4388 | } |
| 4389 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4390 | message AggStats { |
| 4391 | optional int64 min = 1; |
| 4392 | |
| 4393 | optional int64 average = 2; |
| 4394 | |
| 4395 | optional int64 max = 3; |
| 4396 | } |
| 4397 | |
| 4398 | message ProcessStatsStateProto { |
| 4399 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4400 | |
| 4401 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4402 | |
| 4403 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 4404 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
| 4405 | optional android.service.procstats.ProcessState process_state = 3; |
| 4406 | |
| 4407 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4408 | optional int64 duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4409 | |
| 4410 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4411 | optional int64 realtime_duration_millis = 9; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4412 | |
| 4413 | // # of samples taken |
| 4414 | optional int32 sample_size = 5; |
| 4415 | |
| 4416 | // PSS is memory reserved for this process |
| 4417 | optional AggStats pss = 6; |
| 4418 | |
| 4419 | // USS is memory shared between processes, divided evenly for accounting |
| 4420 | optional AggStats uss = 7; |
| 4421 | |
| 4422 | // RSS is memory resident for this process |
| 4423 | optional AggStats rss = 8; |
| 4424 | } |
| 4425 | |
| 4426 | // Next Tag: 7 |
| 4427 | message ProcessStatsProto { |
| 4428 | // Name of process. |
| 4429 | optional string process = 1; |
| 4430 | |
| 4431 | // Uid of the process. |
| 4432 | optional int32 uid = 2; |
| 4433 | |
| 4434 | // Information about how often kills occurred |
| 4435 | message Kill { |
| 4436 | // Count of excessive CPU kills |
| 4437 | optional int32 cpu = 1; |
| 4438 | |
| 4439 | // Count of kills when cached |
| 4440 | optional int32 cached = 2; |
| 4441 | |
| 4442 | // PSS stats during cached kill |
| 4443 | optional AggStats cached_pss = 3; |
| 4444 | } |
| 4445 | optional Kill kill = 3; |
| 4446 | |
| 4447 | // Time and memory spent in various states. |
| 4448 | repeated ProcessStatsStateProto states = 5; |
| 4449 | |
| 4450 | // Total time process has been running... screen_state, memory_state, and process_state |
| 4451 | // will not be set. |
| 4452 | optional ProcessStatsStateProto total_running_state = 6; |
| 4453 | } |
| 4454 | |
| 4455 | message PackageServiceOperationStatsProto { |
| 4456 | // Operate enum: Started, Foreground, Bound, Executing |
| 4457 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 4458 | |
| 4459 | // Number of times the service was in this operation. |
| 4460 | optional int32 count = 2; |
| 4461 | |
| 4462 | // Information about a state the service can be in. |
| 4463 | message StateStats { |
| 4464 | // Screen state enum. |
| 4465 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4466 | // Memory state enum. |
| 4467 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4468 | |
| 4469 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4470 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4471 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4472 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4473 | } |
| 4474 | repeated StateStats state_stats = 3; |
| 4475 | } |
| 4476 | |
| 4477 | message PackageServiceStatsProto { |
| 4478 | // Name of service component. |
| 4479 | optional string service_name = 1; |
| 4480 | |
| 4481 | // The operation stats. |
| 4482 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 4483 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 4484 | } |
| 4485 | |
| 4486 | message PackageAssociationSourceProcessStatsProto { |
| 4487 | // Uid of the process. |
| 4488 | optional int32 process_uid = 1; |
| 4489 | // Process name. |
| 4490 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4491 | // Package name. |
| 4492 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4493 | // Total count of the times this association appeared. |
| 4494 | optional int32 total_count = 3; |
| 4495 | |
| 4496 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4497 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4498 | |
| 4499 | // Total count of the times this association became actively impacting its target process. |
| 4500 | optional int32 active_count = 5; |
| 4501 | |
| 4502 | // Information on one source in this association. |
| 4503 | message StateStats { |
| 4504 | // Process state enum. |
| 4505 | optional android.service.procstats.ProcessState process_state = 1; |
| 4506 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4507 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4508 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4509 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4510 | } |
| 4511 | repeated StateStats active_state_stats = 6; |
| 4512 | } |
| 4513 | |
| 4514 | message PackageAssociationProcessStatsProto { |
| 4515 | // Name of the target component. |
| 4516 | optional string component_name = 1; |
| 4517 | // Information on one source in this association. |
| 4518 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 4519 | } |
| 4520 | |
| 4521 | |
| 4522 | message ProcessStatsPackageProto { |
| 4523 | // Name of package. |
| 4524 | optional string package = 1; |
| 4525 | |
| 4526 | // Uid of the package. |
| 4527 | optional int32 uid = 2; |
| 4528 | |
| 4529 | // Version of the package. |
| 4530 | optional int64 version = 3; |
| 4531 | |
| 4532 | // Stats for each process running with the package loaded in to it. |
| 4533 | repeated ProcessStatsProto process_stats = 4; |
| 4534 | |
| 4535 | // Stats for each of the package's services. |
| 4536 | repeated PackageServiceStatsProto service_stats = 5; |
| 4537 | |
| 4538 | // Stats for each association with the package. |
| 4539 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 4540 | } |
| 4541 | |
| 4542 | message ProcessStatsSectionProto { |
| 4543 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4544 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4545 | |
| 4546 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4547 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4548 | |
| 4549 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4550 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4551 | |
| 4552 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4553 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4554 | |
| 4555 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 4556 | optional string runtime = 5; |
| 4557 | |
| 4558 | // whether kernel reports swapped pss. |
| 4559 | optional bool has_swapped_pss = 6; |
| 4560 | |
| 4561 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 4562 | enum Status { |
| 4563 | STATUS_UNKNOWN = 0; |
| 4564 | STATUS_COMPLETE = 1; |
| 4565 | STATUS_PARTIAL = 2; |
| 4566 | STATUS_SHUTDOWN = 3; |
| 4567 | STATUS_SYSPROPS = 4; |
| 4568 | } |
| 4569 | repeated Status status = 7; |
| 4570 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4571 | // Number of pages available of various types and sizes, representation fragmentation. |
| 4572 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 4573 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4574 | // Stats for each process. |
| 4575 | repeated ProcessStatsProto process_stats = 8; |
| 4576 | |
| 4577 | // Stats for each package. |
| 4578 | repeated ProcessStatsPackageProto package_stats = 9; |
| 4579 | } |
| 4580 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4581 | message ProcessStatsAvailablePagesProto { |
| 4582 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 4583 | optional int32 node = 1; |
| 4584 | |
| 4585 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 4586 | optional string zone = 2; |
| 4587 | |
| 4588 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 4589 | optional string label = 3; |
| 4590 | |
| 4591 | // Distribution of number of pages available by order size. First entry in array is |
| 4592 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 4593 | repeated int32 pages_per_order = 4; |
| 4594 | } |
| 4595 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4596 | /** |
| 4597 | * Pulled from ProcessStatsService.java |
| 4598 | */ |
| 4599 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4600 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4601 | } |
| 4602 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 4603 | /** |
| 4604 | * Pulled from ProcessStatsService.java |
| 4605 | */ |
| 4606 | message ProcStatsPkgProc { |
| 4607 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4608 | } |
| 4609 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4610 | message PowerProfileProto { |
| 4611 | optional double cpu_suspend = 1; |
| 4612 | |
| 4613 | optional double cpu_idle = 2; |
| 4614 | |
| 4615 | optional double cpu_active = 3; |
| 4616 | |
| 4617 | message CpuCluster { |
| 4618 | optional int32 id = 1; |
| 4619 | optional double cluster_power = 2; |
| 4620 | optional int32 cores = 3; |
| 4621 | repeated int64 speed = 4; |
| 4622 | repeated double core_power = 5; |
| 4623 | } |
| 4624 | |
| 4625 | repeated CpuCluster cpu_cluster = 40; |
| 4626 | |
| 4627 | optional double wifi_scan = 4; |
| 4628 | |
| 4629 | optional double wifi_on = 5; |
| 4630 | |
| 4631 | optional double wifi_active = 6; |
| 4632 | |
| 4633 | optional double wifi_controller_idle = 7; |
| 4634 | |
| 4635 | optional double wifi_controller_rx = 8; |
| 4636 | |
| 4637 | optional double wifi_controller_tx = 9; |
| 4638 | |
| 4639 | repeated double wifi_controller_tx_levels = 10; |
| 4640 | |
| 4641 | optional double wifi_controller_operating_voltage = 11; |
| 4642 | |
| 4643 | optional double bluetooth_controller_idle = 12; |
| 4644 | |
| 4645 | optional double bluetooth_controller_rx = 13; |
| 4646 | |
| 4647 | optional double bluetooth_controller_tx = 14; |
| 4648 | |
| 4649 | optional double bluetooth_controller_operating_voltage = 15; |
| 4650 | |
| 4651 | optional double modem_controller_sleep = 16; |
| 4652 | |
| 4653 | optional double modem_controller_idle = 17; |
| 4654 | |
| 4655 | optional double modem_controller_rx = 18; |
| 4656 | |
| 4657 | repeated double modem_controller_tx = 19; |
| 4658 | |
| 4659 | optional double modem_controller_operating_voltage = 20; |
| 4660 | |
| 4661 | optional double gps_on = 21; |
| 4662 | |
| 4663 | repeated double gps_signal_quality_based = 22; |
| 4664 | |
| 4665 | optional double gps_operating_voltage = 23; |
| 4666 | |
| 4667 | optional double bluetooth_on = 24; |
| 4668 | |
| 4669 | optional double bluetooth_active = 25; |
| 4670 | |
| 4671 | optional double bluetooth_at_cmd = 26; |
| 4672 | |
| 4673 | optional double ambient_display = 27; |
| 4674 | |
| 4675 | optional double screen_on = 28; |
| 4676 | |
| 4677 | optional double radio_on = 29; |
| 4678 | |
| 4679 | optional double radio_scanning = 30; |
| 4680 | |
| 4681 | optional double radio_active = 31; |
| 4682 | |
| 4683 | optional double screen_full = 32; |
| 4684 | |
| 4685 | optional double audio = 33; |
| 4686 | |
| 4687 | optional double video = 34; |
| 4688 | |
| 4689 | optional double flashlight = 35; |
| 4690 | |
| 4691 | optional double memory = 36; |
| 4692 | |
| 4693 | optional double camera = 37; |
| 4694 | |
| 4695 | optional double wifi_batched_scan = 38; |
| 4696 | |
| 4697 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4698 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 4699 | |
| 4700 | /** |
| 4701 | * power_profile.xml and other constants for power model calculations. |
| 4702 | * Pulled from PowerProfile.java |
| 4703 | */ |
| 4704 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4705 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 4706 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 4707 | |
| 4708 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 4709 | * Logs when a user restriction was added or removed. |
| 4710 | * |
| 4711 | * Logged from: |
| 4712 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 4713 | */ |
| 4714 | message UserRestrictionChanged { |
| 4715 | // The raw string of the user restriction as defined in UserManager. |
| 4716 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 4717 | optional string restriction = 1; |
| 4718 | // Whether the restriction is enabled or disabled. |
| 4719 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 4720 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 4721 | |
| 4722 | /** |
| 4723 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 4724 | * in the system and returns cpu stats for those that are working at the time. |
| 4725 | * Dead pids will be dropped. Kernel processes are excluded. |
| 4726 | * Min cool-down is 5 sec. |
| 4727 | */ |
| 4728 | message ProcessCpuTime { |
| 4729 | optional int32 uid = 1 [(is_uid) = true]; |
| 4730 | |
| 4731 | optional string process_name = 2; |
| 4732 | // Process cpu time in user space, cumulative from boot/process start |
| 4733 | optional int64 user_time_millis = 3; |
| 4734 | // Process cpu time in system space, cumulative from boot/process start |
| 4735 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 4736 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4737 | |
| 4738 | /** |
| 4739 | * Pulls the CPU usage for each thread. |
| 4740 | * |
| 4741 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 4742 | * |
| 4743 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 4744 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 4745 | * considered before a public release. |
| 4746 | */ |
| 4747 | message CpuTimePerThreadFreq { |
| 4748 | // UID that owns the process. |
| 4749 | optional int32 uid = 1 [(is_uid) = true]; |
| 4750 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 4751 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4752 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 4753 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4754 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 4755 | optional string process_name = 4; |
| 4756 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 4757 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 4758 | |
| 4759 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 4760 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 4761 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 4762 | // significantly reduces the amount of data created |
| 4763 | optional int32 frequency1_khz = 6; |
| 4764 | optional int32 time1_millis = 7; |
| 4765 | optional int32 frequency2_khz = 8; |
| 4766 | optional int32 time2_millis = 9; |
| 4767 | optional int32 frequency3_khz = 10; |
| 4768 | optional int32 time3_millis = 11; |
| 4769 | optional int32 frequency4_khz = 12; |
| 4770 | optional int32 time4_millis = 13; |
| 4771 | optional int32 frequency5_khz = 14; |
| 4772 | optional int32 time5_millis = 15; |
| 4773 | optional int32 frequency6_khz = 16; |
| 4774 | optional int32 time6_millis = 17; |
| 4775 | optional int32 frequency7_khz = 18; |
| 4776 | optional int32 time7_millis = 19; |
| 4777 | optional int32 frequency8_khz = 20; |
| 4778 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 4779 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4780 | |
| 4781 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 4782 | * Pulls information about the device's build. |
| 4783 | */ |
| 4784 | message BuildInformation { |
| 4785 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 4786 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 4787 | optional string fingerprint = 1; |
| 4788 | |
| 4789 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 4790 | optional string brand = 2; |
| 4791 | |
| 4792 | // Build.PRODUCT. The name of the overall product. |
| 4793 | optional string product = 3; |
| 4794 | |
| 4795 | // Build.DEVICE. The name of the industrial design. |
| 4796 | optional string device = 4; |
| 4797 | |
| 4798 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 4799 | optional string version_release = 5; |
| 4800 | |
| 4801 | // Build.ID. E.g. a label like "M4-rc20". |
| 4802 | optional string id = 6; |
| 4803 | |
| 4804 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 4805 | // represent this build. |
| 4806 | optional string version_incremental = 7; |
| 4807 | |
| 4808 | // Build.TYPE. The type of build, like "user" or "eng". |
| 4809 | optional string type = 8; |
| 4810 | |
| 4811 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 4812 | optional string tags = 9; |
| 4813 | } |
| 4814 | |
| 4815 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4816 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 4817 | */ |
| 4818 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 4819 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 4820 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 4821 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 4822 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4823 | } |
| 4824 | |
| 4825 | /** |
| 4826 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 4827 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 4828 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 4829 | */ |
| 4830 | message DeviceCalculatedPowerBlameUid { |
| 4831 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 4832 | optional int32 uid = 1 [(is_uid) = true]; |
| 4833 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 4834 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 4835 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 4836 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 4837 | } |
| 4838 | |
| 4839 | /** |
| 4840 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 4841 | * drain type. |
| 4842 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 4843 | * is attributed uids. They must all be included to get the total power use. |
| 4844 | */ |
| 4845 | message DeviceCalculatedPowerBlameOther { |
| 4846 | // The type of item whose power use is being reported. |
| 4847 | enum DrainType { |
| 4848 | AMBIENT_DISPLAY = 0; |
| 4849 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 4850 | BLUETOOTH = 2; |
| 4851 | CAMERA = 3; |
| 4852 | // Cell-standby |
| 4853 | CELL = 4; |
| 4854 | FLASHLIGHT = 5; |
| 4855 | IDLE = 6; |
| 4856 | MEMORY = 7; |
| 4857 | // Amount that total computed drain exceeded the drain estimated using the |
| 4858 | // battery level changes and capacity. |
| 4859 | OVERCOUNTED = 8; |
| 4860 | PHONE = 9; |
| 4861 | SCREEN = 10; |
| 4862 | // Amount that total computed drain was below the drain estimated using the |
| 4863 | // battery level changes and capacity. |
| 4864 | UNACCOUNTED = 11; |
| 4865 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 4866 | WIFI = 13; |
| 4867 | } |
| 4868 | optional DrainType drain_type = 1; |
| 4869 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 4870 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 4871 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 4872 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4873 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 4874 | |
| 4875 | /** |
| 4876 | * Logs device policy features. |
| 4877 | * |
| 4878 | * Logged from: |
| 4879 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 4880 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 4881 | */ |
| 4882 | message DevicePolicyEvent { |
| 4883 | // The event id - unique for each event. |
| 4884 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 4885 | // The admin package name. |
| 4886 | optional string admin_package_name = 2; |
| 4887 | // A generic integer parameter. |
| 4888 | optional int32 integer_value = 3; |
| 4889 | // A generic boolean parameter. |
| 4890 | optional bool boolean_value = 4; |
| 4891 | // A parameter specifying a time period in milliseconds. |
| 4892 | optional uint64 time_period_millis = 5; |
| 4893 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 4894 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 4895 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 4896 | |
| 4897 | /** |
| 4898 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 4899 | * |
| 4900 | * Logged from: |
| 4901 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4902 | */ |
| 4903 | message DocsUILaunchReported { |
| 4904 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 4905 | optional bool has_initial_uri = 2; |
| 4906 | optional android.stats.docsui.MimeType mime_type = 3; |
| 4907 | optional android.stats.docsui.Root initial_root = 4; |
| 4908 | } |
| 4909 | |
| 4910 | /** |
| 4911 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 4912 | * taps on root/app in hamburger menu. |
| 4913 | * |
| 4914 | * Logged from: |
| 4915 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4916 | */ |
| 4917 | message DocsUIRootVisitedReported { |
| 4918 | optional android.stats.docsui.ContextScope scope = 1; |
| 4919 | optional android.stats.docsui.Root root = 2; |
| 4920 | } |
| 4921 | |
| 4922 | /** |
| 4923 | * Logs file operation stats. Call this when a file operation has completed. |
| 4924 | * |
| 4925 | * Logged from: |
| 4926 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4927 | */ |
| 4928 | message DocsUIFileOperationReported { |
| 4929 | optional android.stats.docsui.Provider provider = 1; |
| 4930 | optional android.stats.docsui.FileOperation file_op = 2; |
| 4931 | } |
| 4932 | |
| 4933 | /** |
| 4934 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 4935 | * mode. |
| 4936 | * |
| 4937 | * Logged from: |
| 4938 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4939 | */ |
| 4940 | message DocsUIFileOperationCopyMoveModeReported { |
| 4941 | optional android.stats.docsui.FileOperation file_op = 1; |
| 4942 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 4943 | } |
| 4944 | |
| 4945 | |
| 4946 | /** |
| 4947 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 4948 | * |
| 4949 | * Logged from: |
| 4950 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4951 | */ |
| 4952 | message DocsUIFileOperationFailureReported { |
| 4953 | optional android.stats.docsui.Authority authority = 1; |
| 4954 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 4955 | } |
| 4956 | |
| 4957 | /** |
| 4958 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 4959 | * |
| 4960 | * Logged from: |
| 4961 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4962 | */ |
| 4963 | message DocsUIFileOperationCanceledReported { |
| 4964 | optional android.stats.docsui.FileOperation file_op = 1; |
| 4965 | } |
| 4966 | |
| 4967 | /** |
| 4968 | * Logs startup time in milliseconds. |
| 4969 | * |
| 4970 | * Logged from: |
| 4971 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4972 | */ |
| 4973 | message DocsUIStartupMsReported { |
| 4974 | optional int32 startup_millis = 1; |
| 4975 | } |
| 4976 | |
| 4977 | /** |
| 4978 | * Logs the action that was started by user. |
| 4979 | * |
| 4980 | * Logged from: |
| 4981 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 4982 | */ |
| 4983 | message DocsUIUserActionReported { |
| 4984 | optional android.stats.docsui.UserAction action = 1; |
| 4985 | } |
| 4986 | |
| 4987 | /** |
| 4988 | * Logs the invalid type when invalid scoped access is requested. |
| 4989 | * |
| 4990 | * Logged from: |
| 4991 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 4992 | */ |
| 4993 | message DocsUIInvalidScopedAccessRequestReported { |
| 4994 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4995 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 4996 | |
| 4997 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 4998 | * Logs the package name that launches docsui picker mode. |
| 4999 | * |
| 5000 | * Logged from: |
| 5001 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5002 | */ |
| 5003 | message DocsUIPickerLaunchedFromReported { |
| 5004 | optional string package_name = 1; |
| 5005 | } |
| 5006 | |
| 5007 | /** |
| 5008 | * Logs the search type. |
| 5009 | * |
| 5010 | * Logged from: |
| 5011 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5012 | */ |
| 5013 | message DocsUISearchTypeReported { |
| 5014 | optional android.stats.docsui.SearchType search_type = 1; |
| 5015 | } |
| 5016 | |
| 5017 | /** |
| 5018 | * Logs the search mode. |
| 5019 | * |
| 5020 | * Logged from: |
| 5021 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5022 | */ |
| 5023 | message DocsUISearchModeReported { |
| 5024 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 5025 | } |
| 5026 | |
| 5027 | /** |
| 5028 | * Logs the pick result information. |
| 5029 | * |
| 5030 | * Logged from: |
| 5031 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5032 | */ |
| 5033 | message DocsUIPickResultReported { |
| 5034 | optional int32 total_action_count = 1; |
| 5035 | optional int64 duration_millis = 2; |
| 5036 | optional int32 file_count= 3; |
| 5037 | optional bool is_searching = 4; |
| 5038 | optional android.stats.docsui.Root picked_from = 5; |
| 5039 | optional android.stats.docsui.MimeType mime_type = 6; |
| 5040 | optional int32 repeatedly_pick_times = 7; |
| 5041 | } |
| 5042 | |
| 5043 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5044 | * Logs when an app's memory is compacted. |
| 5045 | * |
| 5046 | * Logged from: |
| 5047 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 5048 | */ |
| 5049 | message AppCompacted { |
| 5050 | // The pid of the process being compacted. |
| 5051 | optional int32 pid = 1; |
| 5052 | |
| 5053 | // The name of the process being compacted. |
| 5054 | optional string process_name = 2; |
| 5055 | |
| 5056 | // The type of compaction. |
| 5057 | enum Action { |
| 5058 | UNKNOWN = 0; |
| 5059 | SOME = 1; |
| 5060 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 5061 | PERSISTENT = 3; |
| 5062 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5063 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5064 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5065 | |
| 5066 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 5067 | optional int64 before_rss_total_kilobytes = 4; |
| 5068 | |
| 5069 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 5070 | optional int64 before_rss_file_kilobytes = 5; |
| 5071 | |
| 5072 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 5073 | optional int64 before_rss_anon_kilobytes = 6; |
| 5074 | |
| 5075 | // Swap in kilobytes consumed by the process prior to compaction. |
| 5076 | optional int64 before_swap_kilobytes = 7; |
| 5077 | |
| 5078 | // Total RSS in kilobytes consumed by the process after compaction. |
| 5079 | optional int64 after_rss_total_kilobytes = 8; |
| 5080 | |
| 5081 | // File RSS in kilobytes consumed by the process after compaction. |
| 5082 | optional int64 after_rss_file_kilobytes = 9; |
| 5083 | |
| 5084 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 5085 | optional int64 after_rss_anon_kilobytes = 10; |
| 5086 | |
| 5087 | // Swap in kilobytes consumed by the process after compaction. |
| 5088 | optional int64 after_swap_kilobytes = 11; |
| 5089 | |
| 5090 | // The time taken to perform compaction in milliseconds. |
| 5091 | optional int64 time_to_compact_millis = 12; |
| 5092 | |
| 5093 | // The last compaction action performed for this app. |
| 5094 | optional Action last_action = 13; |
| 5095 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5096 | // The last time that compaction was attempted on this process in milliseconds |
| 5097 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 5098 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5099 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 5100 | // The "setAdj" (i.e. previous) oom_score_adj at the time of compaction. |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5101 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5102 | |
| 5103 | // The process state at the time of compaction. |
| 5104 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 5105 | |
| 5106 | // Free ZRAM in kilobytes before compaction. |
| 5107 | optional int64 before_zram_free_kilobytes = 17; |
| 5108 | |
| 5109 | // Free ZRAM in kilobytes after compaction. |
| 5110 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5111 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5112 | |
| 5113 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5114 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 5115 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 5116 | * |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5117 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 5118 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 5119 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 5120 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5121 | */ |
| 5122 | message NetworkDnsEventReported { |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5123 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5124 | |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5125 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5126 | |
| 5127 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5128 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5129 | |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5130 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 5131 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5132 | |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5133 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 5134 | // Only valid for event_type = EVENT_RESNSEND. |
| 5135 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5136 | |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5137 | optional android.stats.dnsresolver.Transport network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5138 | |
| 5139 | // The DNS over TLS mode on a specific netId. |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5140 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5141 | |
| 5142 | // Additional pass-through fields opaque to statsd. |
| 5143 | // The DNS resolver Mainline module can add new fields here without requiring an OS update. |
lifr | a2e19c0 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5144 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5145 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 5146 | |
| 5147 | /** |
| 5148 | * Logs when a data stall event occurs. |
| 5149 | * |
| 5150 | * Log from: |
| 5151 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5152 | */ |
| 5153 | message DataStallEvent { |
| 5154 | // Data stall evaluation type. |
| 5155 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5156 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 5157 | optional int32 evaluation_type = 1; |
| 5158 | // See definition in data_stall_event.proto. |
| 5159 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 5160 | // See definition in data_stall_event.proto. |
| 5161 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 5162 | // See definition in data_stall_event.proto. |
| 5163 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 5164 | // See definition in data_stall_event.proto. |
| 5165 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 5166 | // See definition in data_stall_event.proto. |
| 5167 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 5168 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 5169 | |
| 5170 | /* |
| 5171 | * Logs when RescueParty resets some set of experiment flags. |
| 5172 | * |
| 5173 | * Logged from: |
| 5174 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 5175 | */ |
| 5176 | message RescuePartyResetReported { |
| 5177 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 5178 | optional int32 rescue_level = 1; |
| 5179 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 5180 | |
| 5181 | /** |
| 5182 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 5183 | * Logged from: |
| 5184 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 5185 | */ |
| 5186 | message SignedConfigReported { |
| 5187 | enum Type { |
| 5188 | UNKNOWN_TYPE = 0; |
| 5189 | GLOBAL_SETTINGS = 1; |
| 5190 | } |
| 5191 | optional Type type = 1; |
| 5192 | |
| 5193 | // The final status of the signed config received. |
| 5194 | enum Status { |
| 5195 | UNKNOWN_STATUS = 0; |
| 5196 | APPLIED = 1; |
| 5197 | BASE64_FAILURE_CONFIG = 2; |
| 5198 | BASE64_FAILURE_SIGNATURE = 3; |
| 5199 | SECURITY_EXCEPTION = 4; |
| 5200 | INVALID_CONFIG = 5; |
| 5201 | OLD_CONFIG = 6; |
| 5202 | SIGNATURE_CHECK_FAILED = 7; |
| 5203 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 5204 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 5205 | } |
| 5206 | optional Status status = 2; |
| 5207 | |
| 5208 | // The version of the signed config processed. |
| 5209 | optional int32 version = 3; |
| 5210 | |
| 5211 | // The package name that the config was extracted from. |
| 5212 | optional string from_package = 4; |
| 5213 | |
| 5214 | enum Key { |
| 5215 | NO_KEY = 0; |
| 5216 | DEBUG = 1; |
| 5217 | PRODUCTION = 2; |
| 5218 | } |
| 5219 | // Which key was used to verify the config. |
| 5220 | optional Key verified_with = 5; |
| 5221 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5222 | |
| 5223 | /* |
| 5224 | * Logs GNSS Network-Initiated (NI) location events. |
| 5225 | * |
| 5226 | * Logged from: |
| 5227 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 5228 | */ |
| 5229 | message GnssNiEventReported { |
| 5230 | // The type of GnssNiEvent. |
| 5231 | enum EventType { |
| 5232 | UNKNOWN = 0; |
| 5233 | NI_REQUEST = 1; |
| 5234 | NI_RESPONSE = 2; |
| 5235 | } |
| 5236 | optional EventType event_type = 1; |
| 5237 | |
| 5238 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 5239 | optional int32 notification_id = 2; |
| 5240 | |
| 5241 | // A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5242 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5243 | |
| 5244 | // NI requires notification. |
| 5245 | optional bool need_notify = 4; |
| 5246 | |
| 5247 | // NI requires verification. |
| 5248 | optional bool need_verify = 5; |
| 5249 | |
| 5250 | // NI requires privacy override, no notification/minimal trace. |
| 5251 | optional bool privacy_override = 6; |
| 5252 | |
| 5253 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 5254 | // seconds. |
| 5255 | optional int32 timeout = 7; |
| 5256 | |
| 5257 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5258 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5259 | |
| 5260 | // String representing the requester of the network inititated location request. |
| 5261 | optional string requestor_id = 9; |
| 5262 | |
| 5263 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 5264 | // network initiated location request. |
| 5265 | optional string text = 10; |
| 5266 | |
| 5267 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5268 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5269 | |
| 5270 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5271 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5272 | |
| 5273 | // True if SUPL ES is enabled. |
| 5274 | optional bool is_supl_es_enabled = 13; |
| 5275 | |
| 5276 | // True if GNSS location is enabled. |
| 5277 | optional bool is_location_enabled = 14; |
| 5278 | |
| 5279 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5280 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 5281 | } |
| 5282 | |
| 5283 | /** |
| 5284 | * Logs GNSS non-framework (NFW) location notification. |
| 5285 | * |
| 5286 | * Logged from: |
| 5287 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 5288 | */ |
| 5289 | message GnssNfwNotificationReported { |
| 5290 | // Package name of the Android proxy application representing the non-framework entity that |
| 5291 | // requested location. Set to empty string if unknown. |
| 5292 | optional string proxy_app_package_name = 1; |
| 5293 | |
| 5294 | // Protocol stack that initiated the non-framework location request. |
| 5295 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 5296 | |
| 5297 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 5298 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 5299 | optional string other_protocol_stack_name = 3; |
| 5300 | |
| 5301 | // Source initiating/receiving the location information. |
| 5302 | optional android.server.location.NfwRequestor requestor = 4; |
| 5303 | |
| 5304 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 5305 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 5306 | // and used for logging purposes. |
| 5307 | optional string requestor_id = 5; |
| 5308 | |
| 5309 | // Indicates whether location information was provided for this request. |
| 5310 | optional android.server.location.NfwResponseType response_type = 6; |
| 5311 | |
| 5312 | // True if the device is in user initiated emergency session. |
| 5313 | optional bool in_emergency_mode = 7; |
| 5314 | |
| 5315 | // True if cached location is provided. |
| 5316 | optional bool is_cached_location = 8; |
| 5317 | |
| 5318 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 5319 | optional bool is_permission_mismatched = 9; |
| 5320 | } |
| 5321 | |
| 5322 | /** |
| 5323 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 5324 | * |
| 5325 | * Logged from: |
| 5326 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 5327 | */ |
| 5328 | message GnssConfigurationReported { |
| 5329 | // SUPL host name. |
| 5330 | optional string supl_host = 1; |
| 5331 | |
| 5332 | // SUPL port number. |
| 5333 | optional int32 supl_port = 2; |
| 5334 | |
| 5335 | // C2K host name. |
| 5336 | optional string c2k_host = 3; |
| 5337 | |
| 5338 | // C2K port number. |
| 5339 | optional int32 c2k_port = 4; |
| 5340 | |
| 5341 | // The SUPL version requested by Carrier. |
| 5342 | optional int32 supl_ver = 5; |
| 5343 | |
| 5344 | // The SUPL mode. |
| 5345 | optional android.server.location.SuplMode supl_mode = 6; |
| 5346 | |
| 5347 | // True if NI emergency SUPL restrictions is enabled. |
| 5348 | optional bool supl_es = 7; |
| 5349 | |
| 5350 | // LTE Positioning Profile settings |
| 5351 | optional android.server.location.LppProfile lpp_profile = 8; |
| 5352 | |
| 5353 | // Positioning protocol on A-Glonass system. |
| 5354 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 5355 | |
| 5356 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 5357 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 5358 | |
| 5359 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 5360 | optional android.server.location.GpsLock gps_lock = 11; |
| 5361 | |
| 5362 | // Number of seconds to extend the emergency session duration post emergency call. |
| 5363 | optional int32 es_extension_sec = 12; |
| 5364 | |
| 5365 | // The full list of package names of proxy Android applications representing the non-framework |
| 5366 | // location access entities (on/off the device) for which the framework user has granted |
| 5367 | // non-framework location access permission. The package names are concatenated in one string |
| 5368 | // with spaces as separators. |
| 5369 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5370 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5371 | |
| 5372 | /** |
| 5373 | * Logs when a NFC device's error occurred. |
| 5374 | * Logged from: |
| 5375 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5376 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 5377 | */ |
| 5378 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5379 | enum Type { |
| 5380 | UNKNOWN = 0; |
| 5381 | CMD_TIMEOUT = 1; |
| 5382 | ERROR_NOTIFICATION = 2; |
| 5383 | AID_OVERFLOW = 3; |
| 5384 | } |
| 5385 | optional Type type = 1; |
| 5386 | // If it's nci cmd timeout, log the timeout command. |
| 5387 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5388 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5389 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5390 | } |
| 5391 | |
| 5392 | /** |
| 5393 | * Logs when a NFC device's state changed event |
| 5394 | * Logged from: |
| 5395 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 5396 | */ |
| 5397 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5398 | enum State { |
| 5399 | UNKNOWN = 0; |
| 5400 | OFF = 1; |
| 5401 | ON = 2; |
| 5402 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 5403 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 5404 | } |
| 5405 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5406 | } |
| 5407 | |
| 5408 | /** |
| 5409 | * Logs when a NFC Beam Transaction occurred. |
| 5410 | * Logged from: |
| 5411 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 5412 | */ |
| 5413 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5414 | enum Operation { |
| 5415 | UNKNOWN = 0; |
| 5416 | SEND = 1; |
| 5417 | RECEIVE = 2; |
| 5418 | } |
| 5419 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5420 | } |
| 5421 | |
| 5422 | /** |
| 5423 | * Logs when a NFC Card Emulation Transaction occurred. |
| 5424 | * Logged from: |
| 5425 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 5426 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 5427 | */ |
| 5428 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5429 | enum Category { |
| 5430 | UNKNOWN = 0; |
| 5431 | HCE_PAYMENT = 1; |
| 5432 | HCE_OTHER = 2; |
| 5433 | OFFHOST = 3; |
| 5434 | } |
| 5435 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 5436 | optional Category category = 1; |
| 5437 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 5438 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5439 | } |
| 5440 | |
| 5441 | /** |
| 5442 | * Logs when a NFC Tag event occurred. |
| 5443 | * Logged from: |
| 5444 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 5445 | */ |
| 5446 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5447 | enum Type { |
| 5448 | UNKNOWN = 0; |
| 5449 | URL = 1; |
| 5450 | BT_PAIRING = 2; |
| 5451 | PROVISION = 3; |
| 5452 | WIFI_CONNECT = 4; |
| 5453 | APP_LAUNCH = 5; |
| 5454 | OTHERS = 6; |
| 5455 | } |
| 5456 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5457 | } |
| 5458 | |
| 5459 | /** |
| 5460 | * Logs when Hce transaction triggered |
| 5461 | * Logged from: |
| 5462 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5463 | */ |
| 5464 | message NfcHceTransactionOccurred { |
| 5465 | // The latency period(in microseconds) it took for the first HCE data |
| 5466 | // exchange. |
| 5467 | optional uint32 latency_micros = 1; |
| 5468 | } |
| 5469 | |
| 5470 | /** |
| 5471 | * Logs when SecureElement state event changed |
| 5472 | * Logged from: |
| 5473 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5474 | */ |
| 5475 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5476 | enum State { |
| 5477 | UNKNOWN = 0; |
| 5478 | INITIALIZED = 1; |
| 5479 | DISCONNECTED = 2; |
| 5480 | CONNECTED = 3; |
| 5481 | HALCRASH = 4; |
| 5482 | } |
| 5483 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5484 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5485 | optional string state_change_reason = 2; |
| 5486 | // SIMx or eSEx. |
| 5487 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5488 | } |
| 5489 | |
| 5490 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5491 | * Information about a permission grant request |
| 5492 | */ |
| 5493 | message PermissionGrantRequestResultReported { |
| 5494 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 5495 | optional int64 request_id = 1; |
| 5496 | |
| 5497 | // UID of package requesting the permission grant |
| 5498 | optional int32 requesting_uid = 2 [(is_uid) = true]; |
| 5499 | |
| 5500 | // Name of package requesting the permission grant |
| 5501 | optional string requesting_package_name = 3; |
| 5502 | |
| 5503 | // The permission to be granted |
| 5504 | optional string permission_name = 4; |
| 5505 | |
| 5506 | // If the permission was explicitly requested via the API or added by the system |
| 5507 | optional bool is_implicit = 5; |
| 5508 | |
| 5509 | enum Result { |
| 5510 | UNDEFINED = 0; |
| 5511 | // permission request was ignored |
| 5512 | IGNORED = 1; |
| 5513 | // permission request was ignored because it was user fixed |
| 5514 | IGNORED_USER_FIXED = 2; |
| 5515 | // permission request was ignored because it was policy fixed |
| 5516 | IGNORED_POLICY_FIXED = 3; |
| 5517 | // permission was granted by user action |
| 5518 | USER_GRANTED = 4; |
| 5519 | // permission was automatically granted |
| 5520 | AUTO_GRANTED = 5; |
| 5521 | // permission was denied by user action |
| 5522 | USER_DENIED = 6; |
| 5523 | // permission was denied with prejudice by the user |
| 5524 | USER_DENIED_WITH_PREJUDICE = 7; |
| 5525 | // permission was automatically denied |
| 5526 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 5527 | // permission request was ignored because permission is restricted |
| 5528 | IGNORED_RESTRICTED_PERMISSION = 9; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5529 | } |
| 5530 | // The result of the permission grant |
| 5531 | optional Result result = 6; |
| 5532 | } |
| 5533 | |
| 5534 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5535 | * Logs when Omapi API used |
| 5536 | * Logged from: |
| 5537 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5538 | */ |
| 5539 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5540 | enum Operation { |
| 5541 | UNKNOWN = 0; |
| 5542 | OPEN_CHANNEL = 1; |
| 5543 | } |
| 5544 | optional Operation operation = 1; |
| 5545 | // SIMx or eSEx. |
| 5546 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5547 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5548 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5549 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5550 | |
| 5551 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5552 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 5553 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5554 | * Logged from: |
| 5555 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 5556 | */ |
| 5557 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5558 | optional int64 dispatch_latency_millis = 1; |
| 5559 | } |
| 5560 | |
| 5561 | /** |
| 5562 | * Logs AttentionManagerService attention check result. |
| 5563 | * |
| 5564 | * Logged from: |
| 5565 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 5566 | */ |
| 5567 | message AttentionManagerServiceResultReported { |
| 5568 | // See core/java/android/service/attention/AttentionService.java |
| 5569 | enum AttentionCheckResult { |
| 5570 | UNKNOWN = 20; |
| 5571 | ATTENTION_SUCCESS_ABSENT = 0; |
| 5572 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 5573 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 5574 | ATTENTION_FAILURE_CANCELLED = 3; |
| 5575 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 5576 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 5577 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 5578 | } |
| 5579 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 5580 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 5581 | |
| 5582 | /** |
| 5583 | * Logs when an adb connection changes state. |
| 5584 | * |
| 5585 | * Logged from: |
| 5586 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 5587 | */ |
| 5588 | message AdbConnectionChanged { |
| 5589 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 5590 | // previously selected for this system. |
| 5591 | optional int64 last_connection_time_millis = 1; |
| 5592 | |
| 5593 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 5594 | // to reconnect via adb without user interaction. |
| 5595 | optional int64 auth_window_millis = 2; |
| 5596 | |
| 5597 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 5598 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 5599 | |
| 5600 | // True if the 'always allow' option was selected for this system. |
| 5601 | optional bool always_allow = 4; |
| 5602 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 5603 | |
| 5604 | /* |
| 5605 | * Logs the reported speech DSP status. |
| 5606 | * |
| 5607 | * Logged from: |
| 5608 | * Vendor audio implementation. |
| 5609 | */ |
| 5610 | message SpeechDspStatReported { |
| 5611 | // The total Speech DSP uptime in milliseconds. |
| 5612 | optional int32 total_uptime_millis = 1; |
| 5613 | // The total Speech DSP downtime in milliseconds. |
| 5614 | optional int32 total_downtime_millis = 2; |
| 5615 | optional int32 total_crash_count = 3; |
| 5616 | optional int32 total_recover_count = 4; |
| 5617 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 5618 | |
| 5619 | /** |
| 5620 | * Logs USB connector contaminant status. |
| 5621 | * |
| 5622 | * Logged from: USB Service. |
| 5623 | */ |
| 5624 | message UsbContaminantReported { |
| 5625 | optional string id = 1; |
| 5626 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 5627 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 5628 | |
| 5629 | /** |
| 5630 | * This atom is for debugging purpose. |
| 5631 | */ |
| 5632 | message DebugElapsedClock { |
| 5633 | // Monotically increasing value for each pull. |
| 5634 | optional int64 pull_count = 1; |
| 5635 | // Time from System.elapsedRealtime. |
| 5636 | optional int64 elapsed_clock_millis = 2; |
| 5637 | // Time from System.elapsedRealtime. |
| 5638 | optional int64 same_elapsed_clock_millis = 3; |
| 5639 | // Diff between current elapsed time and elapsed time from previous pull. |
| 5640 | optional int64 elapsed_clock_diff_millis = 4; |
| 5641 | |
| 5642 | enum Type { |
| 5643 | TYPE_UNKNOWN = 0; |
| 5644 | ALWAYS_PRESENT = 1; |
| 5645 | PRESENT_ON_ODD_PULLS = 2; |
| 5646 | } |
| 5647 | // Type of behavior for the pulled data. |
| 5648 | optional Type type = 5; |
| 5649 | } |
| 5650 | |
| 5651 | /** |
| 5652 | * This atom is for debugging purpose. |
| 5653 | */ |
| 5654 | message DebugFailingElapsedClock { |
| 5655 | // Monotically increasing value for each pull. |
| 5656 | optional int64 pull_count = 1; |
| 5657 | // Time from System.elapsedRealtime. |
| 5658 | optional int64 elapsed_clock_millis = 2; |
| 5659 | // Time from System.elapsedRealtime. |
| 5660 | optional int64 same_elapsed_clock_millis = 3; |
| 5661 | // Diff between current elapsed time and elapsed time from previous pull. |
| 5662 | optional int64 elapsed_clock_diff_millis = 4; |
| 5663 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5664 | |
| 5665 | /** Logs System UI bubbles event changed. |
| 5666 | * |
| 5667 | * Logged from: |
| 5668 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 5669 | */ |
| 5670 | message BubbleUIChanged { |
| 5671 | |
| 5672 | // The app package that is posting the bubble. |
| 5673 | optional string package_name = 1; |
| 5674 | |
| 5675 | // The notification channel that is posting the bubble. |
| 5676 | optional string notification_channel = 2; |
| 5677 | |
| 5678 | // The notification id associated with the posted bubble. |
| 5679 | optional int32 notification_id = 3; |
| 5680 | |
| 5681 | // The position of the bubble within the bubble stack. |
| 5682 | optional int32 position = 4; |
| 5683 | |
| 5684 | // The total number of bubbles within the bubble stack. |
| 5685 | optional int32 total_number = 5; |
| 5686 | |
| 5687 | // User interactions with the bubble. |
| 5688 | enum Action { |
| 5689 | UNKNOWN = 0; |
| 5690 | POSTED = 1; |
| 5691 | UPDATED = 2; |
| 5692 | EXPANDED = 3; |
| 5693 | COLLAPSED = 4; |
| 5694 | DISMISSED = 5; |
| 5695 | STACK_DISMISSED = 6; |
| 5696 | STACK_MOVED = 7; |
| 5697 | HEADER_GO_TO_APP = 8; |
| 5698 | HEADER_GO_TO_SETTINGS = 9; |
| 5699 | PERMISSION_OPT_IN = 10; |
| 5700 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 5701 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5702 | SWIPE_LEFT = 13; |
| 5703 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 5704 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 5705 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5706 | } |
| 5707 | optional Action action = 6; |
| 5708 | |
| 5709 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 5710 | optional float normalized_x_position = 7; |
| 5711 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 5712 | |
| 5713 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 5714 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 5715 | |
| 5716 | // Whether the bubble is an on-going one. |
| 5717 | optional bool is_ongoing = 10; |
| 5718 | |
| 5719 | // Whether the bubble is produced by an app running in foreground. |
| 5720 | optional bool is_foreground = 11; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 5721 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 5722 | |
| 5723 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 5724 | * Logs System UI bubbles developer errors. |
| 5725 | * |
| 5726 | * Logged from: |
| 5727 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 5728 | */ |
| 5729 | message BubbleDeveloperErrorReported { |
| 5730 | |
| 5731 | // The app package that is posting the bubble. |
| 5732 | optional string package_name = 1; |
| 5733 | |
| 5734 | // Bubble developer error type enums. |
| 5735 | enum Error { |
| 5736 | UNKNOWN = 0; |
| 5737 | ACTIVITY_INFO_MISSING = 1; |
| 5738 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 5739 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 5740 | } |
| 5741 | optional Error error = 2 [default = UNKNOWN]; |
| 5742 | } |
| 5743 | |
| 5744 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 5745 | * Logs that a constraint for a scheduled job has changed. |
| 5746 | * |
| 5747 | * Logged from: |
| 5748 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 5749 | */ |
| 5750 | message ScheduledJobConstraintChanged { |
| 5751 | repeated AttributionNode attribution_node = 1; |
| 5752 | |
| 5753 | // Name of the job. |
| 5754 | optional string job_name = 2; |
| 5755 | |
| 5756 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 5757 | |
| 5758 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 5759 | UNKNOWN = 0; |
| 5760 | UNSATISFIED = 1; |
| 5761 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 5762 | } |
| 5763 | optional State state = 4; |
| 5764 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5765 | |
| 5766 | /** |
| 5767 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 5768 | * returns true. |
| 5769 | * |
| 5770 | * Logged from: |
| 5771 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 5772 | */ |
| 5773 | message ScreenTimeoutExtensionReported { |
| 5774 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 5775 | optional uint32 consecutive_timeout_extended_count = 1; |
| 5776 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 5777 | |
| 5778 | /* |
| 5779 | * Logs number of milliseconds it takes to start a process. |
| 5780 | * The definition of app process start time is from the app launch time to |
| 5781 | * the time that Zygote finished forking the app process and loaded the |
| 5782 | * application package's java classes. |
| 5783 | |
| 5784 | * This metric is different from AppStartOccurred which is for foreground |
| 5785 | * activity only. |
| 5786 | |
| 5787 | * ProcessStartTime can report all processes (both foreground and background) |
| 5788 | * start time. |
| 5789 | * |
| 5790 | * Logged from: |
| 5791 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 5792 | */ |
| 5793 | message ProcessStartTime { |
| 5794 | // The uid of the ProcessRecord. |
| 5795 | optional int32 uid = 1 [(is_uid) = true]; |
| 5796 | |
| 5797 | // The process pid. |
| 5798 | optional int32 pid = 2; |
| 5799 | |
| 5800 | // The process name. |
| 5801 | // Usually package name, "system" for system server. |
| 5802 | // Provided by ActivityManagerService. |
| 5803 | optional string process_name = 3; |
| 5804 | |
| 5805 | enum StartType { |
| 5806 | UNKNOWN = 0; |
| 5807 | WARM = 1; |
| 5808 | HOT = 2; |
| 5809 | COLD = 3; |
| 5810 | } |
| 5811 | |
| 5812 | // The start type. |
| 5813 | optional StartType type = 4; |
| 5814 | |
| 5815 | // The elapsed realtime at the start of the process. |
| 5816 | optional int64 process_start_time_millis = 5; |
| 5817 | |
| 5818 | // Number of milliseconds it takes to reach bind application. |
| 5819 | optional int32 bind_application_delay_millis = 6; |
| 5820 | |
| 5821 | // Number of milliseconds it takes to finish start of the process. |
| 5822 | optional int32 process_start_delay_millis = 7; |
| 5823 | |
| 5824 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 5825 | // "service", "content provider", "broadcast" or other strings. |
| 5826 | optional string hosting_type = 8; |
| 5827 | |
| 5828 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 5829 | // in this process. |
| 5830 | optional string hosting_name = 9; |
| 5831 | } |
| 5832 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 5833 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 5834 | * Track Media Codec usage |
| 5835 | * Logged from: |
| 5836 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 5837 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 5838 | */ |
| 5839 | message MediametricsCodecReported { |
| 5840 | optional int64 timestamp_nanos = 1; |
| 5841 | optional string package_name = 2; |
| 5842 | optional int64 package_version_code = 3; |
| 5843 | optional int64 media_apex_version = 4; |
| 5844 | |
| 5845 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5846 | } |
| 5847 | |
| 5848 | /** |
| 5849 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 5850 | * Logged from: |
| 5851 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 5852 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 5853 | */ |
| 5854 | message MediametricsExtractorReported { |
| 5855 | optional int64 timestamp_nanos = 1; |
| 5856 | optional string package_name = 2; |
| 5857 | optional int64 package_version_code = 3; |
| 5858 | optional int64 media_apex_version = 4; |
| 5859 | |
| 5860 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5861 | } |
| 5862 | |
| 5863 | /** |
| 5864 | * Track how we arbitrate between microphone/input requests. |
| 5865 | * Logged from |
| 5866 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 5867 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 5868 | */ |
| 5869 | message MediametricsAudiopolicyReported { |
| 5870 | optional int64 timestamp_nanos = 1; |
| 5871 | optional string package_name = 2; |
| 5872 | optional int64 package_version_code = 3; |
| 5873 | optional int64 media_apex_version = 4; |
| 5874 | |
| 5875 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5876 | } |
| 5877 | |
| 5878 | /** |
| 5879 | * Track how we arbitrate between microphone requests. |
| 5880 | * Logged from |
| 5881 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 5882 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 5883 | */ |
| 5884 | message MediametricsAudiorecordReported { |
| 5885 | optional int64 timestamp_nanos = 1; |
| 5886 | optional string package_name = 2; |
| 5887 | optional int64 package_version_code = 3; |
| 5888 | optional int64 media_apex_version = 4; |
| 5889 | |
| 5890 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5891 | } |
| 5892 | |
| 5893 | /** |
| 5894 | * Track how we arbitrate between microphone/input requests. |
| 5895 | * Logged from |
| 5896 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 5897 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 5898 | */ |
| 5899 | message MediametricsAudiothreadReported { |
| 5900 | optional int64 timestamp_nanos = 1; |
| 5901 | optional string package_name = 2; |
| 5902 | optional int64 package_version_code = 3; |
| 5903 | optional int64 media_apex_version = 4; |
| 5904 | |
| 5905 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5906 | } |
| 5907 | |
| 5908 | /** |
| 5909 | * Track how we arbitrate between microphone/input requests. |
| 5910 | * Logged from |
| 5911 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 5912 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 5913 | */ |
| 5914 | message MediametricsAudiotrackReported { |
| 5915 | optional int64 timestamp_nanos = 1; |
| 5916 | optional string package_name = 2; |
| 5917 | optional int64 package_version_code = 3; |
| 5918 | optional int64 media_apex_version = 4; |
| 5919 | |
| 5920 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5921 | } |
| 5922 | |
| 5923 | /** |
| 5924 | * Track information about DRM framework performance |
| 5925 | * Logged from |
| 5926 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 5927 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 5928 | */ |
| 5929 | message MediametricsMediadrmReported { |
| 5930 | optional int64 timestamp_nanos = 1; |
| 5931 | optional string package_name = 2; |
| 5932 | optional int64 package_version_code = 3; |
| 5933 | optional int64 media_apex_version = 4; |
| 5934 | |
| 5935 | // vendor+description tell about which DRM plugin is in use on this device |
| 5936 | optional string vendor = 5; |
| 5937 | optional string description = 6; |
| 5938 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 5939 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5940 | } |
| 5941 | |
| 5942 | /** |
| 5943 | * Track information about the widevine DRM plugin performance |
| 5944 | * Logged from |
| 5945 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 5946 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 5947 | */ |
| 5948 | message MediametricsDrmWidevineReported { |
| 5949 | optional int64 timestamp_nanos = 1; |
| 5950 | optional string package_name = 2; |
| 5951 | optional int64 package_version_code = 3; |
| 5952 | optional int64 media_apex_version = 4; |
| 5953 | |
| 5954 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5955 | } |
| 5956 | |
| 5957 | /** |
| 5958 | * Track information about recordings (e.g. camcorder) |
| 5959 | * Logged from |
| 5960 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 5961 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 5962 | */ |
| 5963 | message MediametricsRecorderReported { |
| 5964 | optional int64 timestamp_nanos = 1; |
| 5965 | optional string package_name = 2; |
| 5966 | optional int64 package_version_code = 3; |
| 5967 | optional int64 media_apex_version = 4; |
| 5968 | |
| 5969 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5970 | } |
| 5971 | |
| 5972 | /** |
| 5973 | * Track Media Player usage |
| 5974 | * Logged from: |
| 5975 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 5976 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 5977 | */ |
| 5978 | message MediametricsNuPlayerReported { |
| 5979 | optional int64 timestamp_nanos = 1; |
| 5980 | optional string package_name = 2; |
| 5981 | optional int64 package_version_code = 3; |
| 5982 | optional int64 media_apex_version = 4; |
| 5983 | |
| 5984 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 5985 | } |
| 5986 | |
| 5987 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 5988 | * State of a dangerous permission requested by a package |
| 5989 | */ |
| 5990 | message DangerousPermissionState { |
| 5991 | // Name of the permission |
| 5992 | optional string permission_name = 1; |
| 5993 | |
| 5994 | // Uid of the package |
| 5995 | optional int32 uid = 2 [(is_uid) = true]; |
| 5996 | |
| 5997 | // Package requesting the permission |
| 5998 | optional string package_name = 3; |
| 5999 | |
| 6000 | // If the permission is granted to the uid |
| 6001 | optional bool is_granted = 4; |
| 6002 | } |
| 6003 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6004 | /** |
| 6005 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 6006 | * |
| 6007 | * Logged from: |
| 6008 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 6009 | */ |
| 6010 | message DeviceIdentifierAccessDenied { |
| 6011 | // The name of the package denied access to the requested device identifier. |
| 6012 | optional string package_name = 1; |
| 6013 | |
| 6014 | // The name of the device identifier method the package attempted to invoke. |
| 6015 | optional string method_name = 2; |
| 6016 | |
| 6017 | // True if the package is preinstalled. |
| 6018 | optional bool is_preinstalled = 3; |
| 6019 | |
| 6020 | // True if the package is privileged. |
| 6021 | optional bool is_priv_app = 4; |
| 6022 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6023 | |
| 6024 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6025 | * Pulls the ongoing mainline install train version code. |
| 6026 | * Pulled from StatsCompanionService |
| 6027 | */ |
| 6028 | message TrainInfo { |
| 6029 | optional int64 train_version_code = 1; |
| 6030 | |
| 6031 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6032 | |
| 6033 | optional string train_name = 3; |
| 6034 | |
| 6035 | enum Status { |
| 6036 | UNKNOWN = 0; |
| 6037 | INSTALL_REQUESTED = 1; |
| 6038 | INSTALL_STARTED = 2; |
| 6039 | INSTALL_STAGED_NOT_READY = 3; |
| 6040 | INSTALL_STAGED_READY = 4; |
| 6041 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6042 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 6043 | // and INSTALL_FAILURE_COMMIT. |
| 6044 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 6045 | // This enum is for installs that are manually cancelled via the Manual Update UI. |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6046 | INSTALL_CANCELLED = 7; |
| 6047 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 6048 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 6049 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 6050 | INSTALLER_ROLLBACK_STAGED = 11; |
| 6051 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 6052 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 6053 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 6054 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 6055 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 6056 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 6057 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 6058 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 6059 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 6060 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 6061 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6062 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 6063 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 6064 | INSTALL_FAILURE_COMMIT = 25; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6065 | } |
| 6066 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6067 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6068 | |
| 6069 | /** |
| 6070 | * Logs the gesture stage changed event. |
| 6071 | * |
| 6072 | * Logged from: |
| 6073 | * frameworks/base/packages/SystemUI/ |
| 6074 | */ |
| 6075 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6076 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6077 | } |
| 6078 | |
| 6079 | /** |
| 6080 | * Logs the feedback type. |
| 6081 | * |
| 6082 | * Logged from: |
| 6083 | * frameworks/base/packages/SystemUI/ |
| 6084 | */ |
| 6085 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6086 | // Whether or not the gesture was used. |
| 6087 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6088 | } |
| 6089 | |
| 6090 | /** |
| 6091 | * Logs the progress. |
| 6092 | * |
| 6093 | * Logged from: |
| 6094 | * frameworks/base/packages/SystemUI/ |
| 6095 | */ |
| 6096 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6097 | // [0,100] progress for the assist gesture. |
| 6098 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6099 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 6100 | |
| 6101 | /* |
| 6102 | * Information about the time zone data on a device. |
| 6103 | */ |
| 6104 | message TimeZoneDataInfo { |
| 6105 | // A version identifier for the data set on device. e.g. "2018i" |
| 6106 | optional string tzdb_version = 1; |
| 6107 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6108 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6109 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6110 | * Logs the GPU stats global health information. |
| 6111 | * |
| 6112 | * Logged from: |
| 6113 | * frameworks/native/services/gpuservice/gpustats/ |
| 6114 | */ |
| 6115 | message GpuStatsGlobalInfo { |
| 6116 | // Package name of the gpu driver. |
| 6117 | optional string driver_package_name = 1; |
| 6118 | |
| 6119 | // Version name of the gpu driver. |
| 6120 | optional string driver_version_name = 2; |
| 6121 | |
| 6122 | // Version code of the gpu driver. |
| 6123 | optional int64 driver_version_code = 3; |
| 6124 | |
| 6125 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 6126 | optional int64 driver_build_time = 4; |
| 6127 | |
| 6128 | // Total count of the gl driver gets loaded. |
| 6129 | optional int64 gl_loading_count = 5; |
| 6130 | |
| 6131 | // Total count of the gl driver fails to be loaded. |
| 6132 | optional int64 gl_loading_failure_count = 6; |
| 6133 | |
| 6134 | // Total count of the Vulkan driver gets loaded. |
| 6135 | optional int64 vk_loading_count = 7; |
| 6136 | |
| 6137 | // Total count of the Vulkan driver fails to be loaded. |
| 6138 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 6139 | |
| 6140 | // Api version of the system Vulkan driver. |
| 6141 | optional int32 vulkan_version = 9; |
| 6142 | |
| 6143 | // Api version of the system CPU Vulkan driver. |
| 6144 | optional int32 cpu_vulkan_version = 10; |
| 6145 | |
| 6146 | // Api version of the system GLES driver. |
| 6147 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 6148 | |
| 6149 | // Total count of the angle driver gets loaded. |
| 6150 | optional int64 angle_loading_count = 12; |
| 6151 | |
| 6152 | // Total count of the angle driver fails to be loaded. |
| 6153 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6154 | } |
| 6155 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6156 | /** |
| 6157 | * GPU driver loading time info. |
| 6158 | */ |
| 6159 | message GpuDriverLoadingTime { |
| 6160 | // List of all the driver loading times for this app. The list size is |
| 6161 | // capped at 50. |
| 6162 | repeated int64 driver_loading_time = 1; |
| 6163 | } |
| 6164 | |
| 6165 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6166 | * Logs the GPU stats per app health information. |
| 6167 | * |
| 6168 | * Logged from: |
| 6169 | * frameworks/native/services/gpuservice/gpustats/ |
| 6170 | */ |
| 6171 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6172 | // Package name of the application that loads the gpu driver. Total number |
| 6173 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6174 | optional string app_package_name = 1; |
| 6175 | |
| 6176 | // Version code of the gpu driver this app loads. |
| 6177 | optional int64 driver_version_code = 2; |
| 6178 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6179 | // gl driver loading time info. |
| 6180 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 6181 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6182 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6183 | // Vulkan driver loading time info. |
| 6184 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 6185 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 6186 | |
| 6187 | // Angle driver loading time info. |
| 6188 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 6189 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 6190 | |
| 6191 | // CPU Vulkan implementation is in use. |
| 6192 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6193 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 6194 | |
| 6195 | /* |
| 6196 | * Logs the size of the system ion heap. |
| 6197 | * |
| 6198 | * Pulled from StatsCompanionService. |
| 6199 | */ |
| 6200 | message SystemIonHeapSize { |
| 6201 | // Size of the system ion heap in bytes. |
| 6202 | optional int64 size_in_bytes = 1; |
| 6203 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6204 | |
| 6205 | /** |
| 6206 | * Push network stack events. |
| 6207 | * |
| 6208 | * Log from: |
| 6209 | * frameworks/base/packages/NetworkStack/ |
| 6210 | */ |
| 6211 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 6212 | // The id that indicates the event reported from NetworkStack. |
| 6213 | optional int32 event_id = 1; |
| 6214 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6215 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 6216 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 6217 | |
| 6218 | /** |
| 6219 | * Logs the apps that are installed on the external storage. |
| 6220 | * Pulled from: |
| 6221 | * StatsCompanionService |
| 6222 | */ |
| 6223 | message AppsOnExternalStorageInfo { |
| 6224 | // The type of the external storage. |
| 6225 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 6226 | // The name of the package that is installed on the external storage. |
| 6227 | optional string package_name = 2; |
| 6228 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 6229 | |
| 6230 | /** |
| 6231 | * Logs the settings related to Face. |
| 6232 | * Logged from: |
| 6233 | * frameworks/base/services/core/java/com/android/server/stats |
| 6234 | */ |
| 6235 | message FaceSettings { |
| 6236 | // Whether or not face unlock is allowed on Keyguard. |
| 6237 | optional bool unlock_keyguard_enabled = 1; |
| 6238 | // Whether or not face unlock dismisses the Keyguard. |
| 6239 | optional bool unlock_dismisses_keyguard = 2; |
| 6240 | // Whether or not face unlock requires attention. |
| 6241 | optional bool unlock_attention_required = 3; |
| 6242 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 6243 | optional bool unlock_app_enabled = 4; |
| 6244 | // Whether or not face unlock always requires user confirmation. |
| 6245 | optional bool unlock_always_require_confirmation = 5; |
| 6246 | // Whether or not a diverse set of poses are required during enrollment. |
| 6247 | optional bool unlock_diversity_required = 6; |
| 6248 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 6249 | |
| 6250 | /** |
| 6251 | * Logs cooling devices maintained by the kernel. |
| 6252 | * |
| 6253 | * Pulled from StatsCompanionService.java |
| 6254 | */ |
| 6255 | message CoolingDevice { |
| 6256 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 6257 | optional android.os.CoolingTypeEnum device_location = 1; |
| 6258 | // The name of the cooling device source. Eg. CPU0 |
| 6259 | optional string device_name = 2; |
| 6260 | // Current throttle state of the cooling device. The value can any unsigned |
| 6261 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 6262 | // not in throttling, higher value means deeper throttling. |
| 6263 | optional int32 state = 3; |
| 6264 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6265 | |
| 6266 | /** |
| 6267 | * Intelligence has several counter-type events that don't warrant a |
| 6268 | * full separate atom. These are primarily API call counters but also include |
| 6269 | * counters for feature usage and specific failure modes. |
| 6270 | * |
| 6271 | * Logged from the Intelligence mainline module. |
| 6272 | */ |
| 6273 | message IntelligenceEventReported { |
| 6274 | optional android.stats.intelligence.EventType event_id = 1; |
| 6275 | optional android.stats.intelligence.Status status = 2; |
| 6276 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 6277 | |
| 6278 | /** |
| 6279 | * Logs information about Vehicle Map Service packets. It specifies the layer |
| 6280 | * type, subtype, data version and size of the packet. |
| 6281 | */ |
| 6282 | message VehicleMapServicePacketReported { |
| 6283 | // Identifies the type of data being transported by a Vehicle Maps Service |
| 6284 | // packet. |
| 6285 | optional int32 layer_type = 1; |
| 6286 | // Identifies the subtype of the layer. |
| 6287 | optional int32 layer_subtype = 2; |
| 6288 | // Identifies the version of the data being transported by a Vehicle Maps |
| 6289 | // Service packet. |
| 6290 | optional int32 version = 3; |
| 6291 | // Size in bytes of the packet. |
| 6292 | optional int64 size_in_bytes = 4; |
| 6293 | } |
| 6294 | |
| 6295 | /** |
| 6296 | * Logs that a Vehicle Map Service packet failed to be delivered. |
| 6297 | */ |
| 6298 | message VehicleMapServicePacketFailureReported { |
| 6299 | // Identifies the type of data being transported by a Vehicle Map Service |
| 6300 | // packet. |
| 6301 | optional int32 layer_type = 1; |
| 6302 | // Identifies the subtype of the layer. |
| 6303 | optional int32 layer_subtype = 2; |
| 6304 | // Identifies the version of the data being transported by a Vehicle Map |
| 6305 | // Service packet. |
| 6306 | optional int32 version = 3; |
| 6307 | // Identifies the package name of the publisher of the data. |
| 6308 | optional string publisher_name = 4; |
| 6309 | // Identifies the package name of the subscriber of the data. An empty string |
| 6310 | // signifies that there are zero subscribers for the packet. |
| 6311 | optional string subscriber_name = 5; |
| 6312 | } |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 6313 | |
| 6314 | /** |
| 6315 | * Logs when Car Power state changed. |
| 6316 | * |
| 6317 | * Logged from: |
| 6318 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 6319 | */ |
| 6320 | message CarPowerStateChanged { |
| 6321 | // States come from CpmsState in CarPowerManagementService.java. |
| 6322 | enum State { |
| 6323 | WAIT_FOR_VHAL = 0; |
| 6324 | ON = 1; |
| 6325 | SHUTDOWN_PREPARE = 2; |
| 6326 | WAIT_FOR_FINISH = 3; |
| 6327 | SUSPEND = 4; |
| 6328 | SIMULATE_SLEEP = 5; |
| 6329 | } |
| 6330 | optional State state = 1; |
| 6331 | } |
| 6332 | |
| 6333 | /** |
| 6334 | * Logs whether GarageMode is entered. |
| 6335 | * |
| 6336 | * Logged from: |
| 6337 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 6338 | */ |
| 6339 | message GarageModeInfo { |
| 6340 | // Whether GarageMode is entered. |
| 6341 | optional bool is_garage_mode = 1; |
| 6342 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame^] | 6343 | |
| 6344 | /** |
| 6345 | * Historical app ops data per package. |
| 6346 | */ |
| 6347 | message AppOps { |
| 6348 | // Uid of the package requesting the op |
| 6349 | optional int32 uid = 1 [(is_uid) = true]; |
| 6350 | |
| 6351 | // Nmae of the package performing the op |
| 6352 | optional string package_name = 2; |
| 6353 | |
| 6354 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 6355 | optional int32 op_id = 3; |
| 6356 | |
| 6357 | // The number of times the op was granted while the app was in the |
| 6358 | // foreground (only for trusted requests) |
| 6359 | optional int64 trusted_foreground_granted_count = 4; |
| 6360 | |
| 6361 | // The number of times the op was granted while the app was in the |
| 6362 | // background (only for trusted requests) |
| 6363 | optional int64 trusted_background_granted_count = 5; |
| 6364 | |
| 6365 | // The number of times the op was rejected while the app was in the |
| 6366 | // foreground (only for trusted requests) |
| 6367 | optional int64 trusted_foreground_rejected_count = 6; |
| 6368 | |
| 6369 | // The number of times the op was rejected while the app was in the |
| 6370 | // background (only for trusted requests) |
| 6371 | optional int64 trusted_background_rejected_count = 7; |
| 6372 | |
| 6373 | // For long-running operations, total duration of the operation |
| 6374 | // while the app was in the foreground (only for trusted requests) |
| 6375 | optional int64 trusted_foreground_duration_millis = 8; |
| 6376 | |
| 6377 | // For long-running operations, total duration of the operation |
| 6378 | // while the app was in the background (only for trusted requests) |
| 6379 | optional int64 trusted_background_duration_millis = 9; |
| 6380 | } |