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 | 1f74b05 | 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"; |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 51 | import "frameworks/base/core/proto/android/stats/location/location_enums.proto"; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 52 | import "frameworks/base/core/proto/android/stats/mediametrics/mediametrics.proto"; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 53 | import "frameworks/base/core/proto/android/stats/mediaprovider/mediaprovider_enums.proto"; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 54 | import "frameworks/base/core/proto/android/stats/storage/storage_enums.proto"; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 55 | import "frameworks/base/core/proto/android/stats/style/style_enums.proto"; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 56 | import "frameworks/base/core/proto/android/stats/sysui/notification_enums.proto"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 57 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 58 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 59 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 60 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 61 | import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto"; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 62 | import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 63 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 64 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 65 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 66 | * raw stats log events from the Android system, also known as "atoms." |
| 67 | * |
| 68 | * This field contains a single oneof with all of the available messages. |
| 69 | * The stats-log-api-gen tool runs as part of the Android build and |
| 70 | * generates the android.util.StatsLog class, which contains the constants |
| 71 | * and methods that Android uses to log. |
| 72 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 73 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 74 | * Instead, statsd on Android constructs these messages synthetically, |
| 75 | * in the format defined here and in stats_log.proto. |
| 76 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 77 | message Atom { |
| 78 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 79 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 80 | // For StatsLog reasons, 1 is illegal and will not work. Must start at 2. |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 81 | BleScanStateChanged ble_scan_state_changed = 2 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 82 | ProcessStateChanged process_state_changed = 3 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 83 | BleScanResultReceived ble_scan_result_received = 4 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 84 | SensorStateChanged sensor_state_changed = 5 [(module) = "framework"]; |
| 85 | GpsScanStateChanged gps_scan_state_changed = 6 [(module) = "framework"]; |
| 86 | SyncStateChanged sync_state_changed = 7 [(module) = "framework"]; |
| 87 | ScheduledJobStateChanged scheduled_job_state_changed = 8 [(module) = "framework"]; |
| 88 | ScreenBrightnessChanged screen_brightness_changed = 9 [(module) = "framework"]; |
| 89 | WakelockStateChanged wakelock_state_changed = 10 [(module) = "framework"]; |
| 90 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = |
| 91 | 11 [(module) = "framework"]; |
| 92 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12 [(module) = "framework"]; |
| 93 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"]; |
| 94 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = |
| 95 | 14 [(module) = "framework"]; |
| 96 | MemoryFactorStateChanged memory_factor_state_changed = 15 [(module) = "framework"]; |
| 97 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16 [(module) = "framework"]; |
| 98 | CachedKillReported cached_kill_reported = 17 [(module) = "framework"]; |
| 99 | ProcessMemoryStatReported process_memory_stat_reported = 18 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 100 | LauncherUIChanged launcher_event = 19 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 101 | BatterySaverModeStateChanged battery_saver_mode_state_changed = 20 [(module) = "framework"]; |
| 102 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"]; |
| 103 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"]; |
| 104 | AudioStateChanged audio_state_changed = 23 [(module) = "framework"]; |
| 105 | MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"]; |
| 106 | CameraStateChanged camera_state_changed = 25 [(module) = "framework"]; |
| 107 | FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"]; |
| 108 | UidProcessStateChanged uid_process_state_changed = 27 [(module) = "framework"]; |
| 109 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28 [(module) = "framework"]; |
| 110 | ScreenStateChanged screen_state_changed = 29 [(module) = "framework"]; |
| 111 | BatteryLevelChanged battery_level_changed = 30 [(module) = "framework"]; |
| 112 | ChargingStateChanged charging_state_changed = 31 [(module) = "framework"]; |
| 113 | PluggedStateChanged plugged_state_changed = 32 [(module) = "framework"]; |
| 114 | InteractiveStateChanged interactive_state_changed = 33 [(module) = "framework"]; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 115 | TouchEventReported touch_event_reported = 34; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 116 | WakeupAlarmOccurred wakeup_alarm_occurred = 35 [(module) = "framework"]; |
| 117 | KernelWakeupReported kernel_wakeup_reported = 36 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 118 | WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"]; |
| 119 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"]; |
| 120 | WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 121 | PhoneSignalStrengthChanged phone_signal_strength_changed = 40 [(module) = "framework"]; |
| 122 | SettingChanged setting_changed = 41 [(module) = "framework"]; |
| 123 | ActivityForegroundStateChanged activity_foreground_state_changed = |
| 124 | 42 [(module) = "framework"]; |
| 125 | IsolatedUidChanged isolated_uid_changed = 43 [(module) = "framework"]; |
| 126 | PacketWakeupOccurred packet_wakeup_occurred = 44 [(module) = "framework"]; |
| 127 | WallClockTimeShifted wall_clock_time_shifted = 45 [(module) = "framework"]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 128 | AnomalyDetected anomaly_detected = 46; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 129 | AppBreadcrumbReported app_breadcrumb_reported = |
| 130 | 47 [(allow_from_any_uid) = true, (module) = "framework"]; |
| 131 | AppStartOccurred app_start_occurred = 48 [(module) = "framework"]; |
| 132 | AppStartCanceled app_start_canceled = 49 [(module) = "framework"]; |
| 133 | AppStartFullyDrawn app_start_fully_drawn = 50 [(module) = "framework"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 134 | LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 135 | PictureInPictureStateChanged picture_in_picture_state_changed = 52 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 136 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 137 | LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 138 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55 [(module) = "framework"]; |
| 139 | ShutdownSequenceReported shutdown_sequence_reported = 56 [(module) = "framework"]; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 140 | BootSequenceReported boot_sequence_reported = 57; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 141 | DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 142 | OverlayStateChanged overlay_state_changed = 59 [(module) = "framework"]; |
| 143 | ForegroundServiceStateChanged foreground_service_state_changed |
| 144 | = 60 [(module) = "framework"]; |
Muhammad Qureshi | dbe9e81 | 2020-01-25 07:41:39 -0800 | [diff] [blame] | 145 | CallStateChanged call_state_changed = 61 [(module) = "telecom"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 146 | KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"]; |
| 147 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"]; |
| 148 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 149 | AppDied app_died = 65 [(module) = "framework"]; |
| 150 | ResourceConfigurationChanged resource_configuration_changed = 66 [(module) = "framework"]; |
| 151 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 152 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = |
| 153 | 68 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 154 | GpsSignalQualityChanged gps_signal_quality_changed = 69 [(module) = "framework"]; |
| 155 | UsbConnectorStateChanged usb_connector_state_changed = 70 [(module) = "framework"]; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 156 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 157 | HardwareFailed hardware_failed = 72; |
| 158 | PhysicalDropDetected physical_drop_detected = 73; |
| 159 | ChargeCyclesReported charge_cycles_reported = 74; |
Muhammad Qureshi | a4efed8 | 2020-01-23 13:53:51 -0800 | [diff] [blame] | 160 | MobileConnectionStateChanged mobile_connection_state_changed = 75 [(module) = "telephony"]; |
| 161 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76 [(module) = "telephony"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 162 | UsbDeviceAttached usb_device_attached = 77 [(module) = "framework"]; |
| 163 | AppCrashOccurred app_crash_occurred = 78 [(module) = "framework"]; |
| 164 | ANROccurred anr_occurred = 79 [(module) = "framework"]; |
| 165 | WTFOccurred wtf_occurred = 80 [(module) = "framework"]; |
| 166 | LowMemReported low_mem_reported = 81 [(module) = "framework"]; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 167 | GenericAtom generic_atom = 82; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 168 | KeyValuePairsAtom key_value_pairs_atom = |
| 169 | 83 [(allow_from_any_uid) = true, (module) = "framework"]; |
| 170 | VibratorStateChanged vibrator_state_changed = 84 [(module) = "framework"]; |
| 171 | DeferredJobStatsReported deferred_job_stats_reported = 85 [(module) = "framework"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 172 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 173 | BiometricAcquired biometric_acquired = 87 [(module) = "framework"]; |
| 174 | BiometricAuthenticated biometric_authenticated = 88 [(module) = "framework"]; |
| 175 | BiometricErrorOccurred biometric_error_occurred = 89 [(module) = "framework"]; |
| 176 | UiEventReported ui_event_reported = 90 [(module) = "framework"]; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 177 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 178 | SlowIo slow_io = 92; |
| 179 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 180 | PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"]; |
| 181 | PhoneStateChanged phone_state_changed = 95 [(module) = "framework"]; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 182 | UserRestrictionChanged user_restriction_changed = 96; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 183 | SettingsUIChanged settings_ui_changed = 97; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 184 | ConnectivityStateChanged connectivity_state_changed = 98 [(module) = "framework"]; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 185 | // TODO: service state change is very noisy shortly after boot, as well |
| 186 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 187 | // Consider removing this if it becomes a problem |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 188 | ServiceStateChanged service_state_changed = 99 [(module) = "framework"]; |
| 189 | ServiceLaunchReported service_launch_reported = 100 [(module) = "framework"]; |
| 190 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101 [(module) = "framework"]; |
| 191 | BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "framework"]; |
| 192 | DevicePolicyEvent device_policy_event = 103 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 193 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; |
| 194 | DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = |
| 195 | 105 [(module) = "docsui"]; |
| 196 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"]; |
| 197 | DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"]; |
| 198 | DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = |
| 199 | 108 [(module) = "docsui"]; |
| 200 | DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"]; |
| 201 | DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"]; |
| 202 | DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"]; |
| 203 | DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 204 | WifiEnabledStateChanged wifi_enabled_state_changed = 113 [(module) = "framework"]; |
| 205 | WifiRunningStateChanged wifi_running_state_changed = 114 [(module) = "framework"]; |
| 206 | AppCompacted app_compacted = 115 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 207 | NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 208 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 209 | 117 [(module) = "docsui"]; |
| 210 | DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"]; |
| 211 | DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"]; |
| 212 | DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"]; |
| 213 | DataStallEvent data_stall_event = 121 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 214 | RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"]; |
| 215 | SignedConfigReported signed_config_reported = 123 [(module) = "framework"]; |
| 216 | GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 217 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = |
| 218 | 125 [(module) = "bluetooth"]; |
| 219 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = |
| 220 | 126 [(module) = "bluetooth"]; |
| 221 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = |
| 222 | 127 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 223 | AppDowngraded app_downgraded = 128 [(module) = "framework"]; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 224 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 225 | LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"]; |
| 226 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"]; |
| 227 | GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"]; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 228 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 229 | NfcErrorOccurred nfc_error_occurred = 134; |
| 230 | NfcStateChanged nfc_state_changed = 135; |
| 231 | NfcBeamOccurred nfc_beam_occurred = 136; |
| 232 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137; |
| 233 | NfcTagOccurred nfc_tag_occurred = 138; |
| 234 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139; |
| 235 | SeStateChanged se_state_changed = 140; |
| 236 | SeOmapiReported se_omapi_reported = 141; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 237 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = |
| 238 | 142 [(module) = "framework"]; |
| 239 | AttentionManagerServiceResultReported attention_manager_service_result_reported = |
| 240 | 143 [(module) = "framework"]; |
| 241 | AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"]; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 242 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 243 | UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"]; |
| 244 | WatchdogRollbackOccurred watchdog_rollback_occurred = 147 [(module) = "framework"]; |
| 245 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = |
| 246 | 148 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 247 | BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 248 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = |
| 249 | 150 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 250 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = |
| 251 | 151 [(module) = "bluetooth"]; |
| 252 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = |
| 253 | 152 [(module) = "bluetooth"]; |
| 254 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = |
| 255 | 153 [(module) = "bluetooth"]; |
| 256 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = |
| 257 | 154 [(module) = "bluetooth"]; |
| 258 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = |
| 259 | 155 [(module) = "bluetooth"]; |
| 260 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = |
| 261 | 156 [(module) = "bluetooth"]; |
| 262 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = |
| 263 | 157 [(module) = "bluetooth"]; |
| 264 | BluetoothDeviceFailedContactCounterReported |
| 265 | bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"]; |
| 266 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = |
| 267 | 159 [(module) = "bluetooth"]; |
| 268 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = |
| 269 | 160 [(module) = "bluetooth"]; |
| 270 | BluetoothQualityReportReported bluetooth_quality_report_reported = |
| 271 | 161 [(module) = "bluetooth"]; |
| 272 | BluetoothDeviceInfoReported bluetooth_device_info_reported = |
| 273 | 162 [(module) = "bluetooth"]; |
| 274 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = |
| 275 | 163 [(module) = "bluetooth"]; |
| 276 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = |
| 277 | 164 [(module) = "bluetooth"]; |
| 278 | BluetoothBondStateChanged bluetooth_bond_state_changed = |
| 279 | 165 [(module) = "bluetooth"]; |
| 280 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = |
| 281 | 166 [(module) = "bluetooth"]; |
| 282 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = |
| 283 | 167 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 284 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = |
| 285 | 168 [(module) = "framework"]; |
| 286 | ProcessStartTime process_start_time = 169 [(module) = "framework"]; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 287 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 288 | 170 [(module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 289 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Muhammad Qureshi | ed8bca0 | 2020-01-24 16:07:49 -0800 | [diff] [blame] | 290 | DeviceIdentifierAccessDenied device_identifier_access_denied = |
| 291 | 172 [(module) = "telephony_common"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 292 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"]; |
Muhammad Qureshi | 76b2524 | 2020-01-25 19:02:08 -0800 | [diff] [blame] | 293 | AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"]; |
| 294 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"]; |
| 295 | AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 296 | TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"]; |
| 297 | HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true, (module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 298 | StyleUIChanged style_ui_changed = 179 [(module) = "sysui"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 299 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 300 | 180 [(module) = "permissioncontroller"]; |
| 301 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = |
| 302 | 181 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 303 | NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 304 | AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"]; |
| 305 | BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"]; |
| 306 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"]; |
| 307 | TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 308 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = |
| 309 | 187 [(module) = "bluetooth"]; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 310 | IntelligenceEventReported intelligence_event_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 311 | 188 [(module) = "intelligence"]; |
| 312 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = |
| 313 | 189 [(module) = "framework"]; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 314 | RoleRequestResultReported role_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 315 | 190 [(module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 316 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 317 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 318 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 319 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 320 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 321 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 322 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 323 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 324 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 325 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 326 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 327 | CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"]; |
| 328 | GarageModeInfo garage_mode_info = 204 [(module) = "car"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 329 | TestAtomReported test_atom_reported = 205 [(module) = "cts"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 330 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = |
| 331 | 206 [(module) = "framework"]; |
| 332 | ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"]; |
| 333 | ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"]; |
| 334 | ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"]; |
| 335 | LocationManagerApiUsageReported location_manager_api_usage_reported = |
| 336 | 210 [(module) = "framework"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 337 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 338 | 211 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 339 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 340 | 212 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 341 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 342 | 213 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 343 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 344 | 214 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 345 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 346 | 215 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 347 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 348 | 216 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 349 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 350 | 217 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 351 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 352 | 218 [(module) = "permissioncontroller"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 353 | TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"]; |
| 354 | TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"]; |
| 355 | ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"]; |
| 356 | LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 357 | ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 358 | BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"]; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 359 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 360 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 361 | CameraActionEvent camera_action_event = 227 [(module) = "framework"]; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 362 | AppCompatibilityChangeReported app_compatibility_change_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 363 | 228 [(allow_from_any_uid) = true, (module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 364 | PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 365 | VmsClientConnectionStateChanged vms_client_connection_state_changed = |
| 366 | 230 [(module) = "car"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 367 | MediaProviderScanEvent media_provider_scan_event = 233 [(module) = "mediaprovider"]; |
| 368 | MediaProviderDeletionEvent media_provider_deletion_event = 234 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 369 | MediaProviderPermissionEvent media_provider_permission_event = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 370 | 235 [(module) = "mediaprovider"]; |
| 371 | MediaProviderSchemaChange media_provider_schema_change = 236 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 372 | MediaProviderIdleMaintenance media_provider_idle_maintenance = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 373 | 237 [(module) = "mediaprovider"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 374 | RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"]; |
| 375 | BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"]; |
| 376 | BootTimeEventElapsedTime boot_time_event_elapsed_time_reported = |
| 377 | 240 [(module) = "framework"]; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 378 | BootTimeEventUtcTime boot_time_event_utc_time_reported = 241; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 379 | BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"]; |
Nikita Ioffe | 41dd57e | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 380 | UserspaceRebootReported userspace_reboot_reported = 243; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 381 | NotificationReported notification_reported = 244; |
| 382 | NotificationPanelReported notification_panel_reported = 245; |
| 383 | NotificationChannelModified notification_panel_modified = 246; |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 384 | IntegrityCheckResultReported integrity_check_result_reported = 247; |
| 385 | IntegrityRulesPushed integrity_rules_pushed = 248; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 386 | CellBroadcastMessageReported cb_message_reported = |
| 387 | 249 [(module) = "cellbroadcast"]; |
| 388 | CellBroadcastMessageError cb_message_error = |
| 389 | 250 [(module) = "cellbroadcast"]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 390 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 391 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 392 | // Pulled events will start at field 10000. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 393 | // Next: 10071 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 394 | oneof pulled { |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 395 | WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"]; |
| 396 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"]; |
| 397 | MobileBytesTransfer mobile_bytes_transfer = 10002 [(module) = "framework"]; |
| 398 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003 [(module) = "framework"]; |
| 399 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"]; |
| 400 | KernelWakelock kernel_wakelock = 10004 [(module) = "framework"]; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 401 | SubsystemSleepState subsystem_sleep_state = 10005; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 402 | CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"]; |
| 403 | CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework"]; |
| 404 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010 [(module) = "framework"]; |
| 405 | WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"]; |
| 406 | ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"]; |
| 407 | BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"]; |
| 408 | ProcessMemoryState process_memory_state = 10013 [(module) = "framework"]; |
| 409 | SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"]; |
| 410 | SystemUptime system_uptime = 10015 [(module) = "framework"]; |
| 411 | CpuActiveTime cpu_active_time = 10016 [(module) = "framework"]; |
| 412 | CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"]; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 413 | DiskSpace disk_space = 10018 [deprecated=true]; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 414 | RemainingBatteryCapacity remaining_battery_capacity = 10019; |
| 415 | FullBatteryCapacity full_battery_capacity = 10020; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 416 | Temperature temperature = 10021 [(module) = "framework"]; |
| 417 | BinderCalls binder_calls = 10022 [(module) = "framework"]; |
| 418 | BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"]; |
| 419 | LooperStats looper_stats = 10024 [(module) = "framework"]; |
| 420 | DiskStats disk_stats = 10025 [(module) = "framework"]; |
| 421 | DirectoryUsage directory_usage = 10026 [(module) = "framework"]; |
| 422 | AppSize app_size = 10027 [(module) = "framework"]; |
| 423 | CategorySize category_size = 10028 [(module) = "framework"]; |
| 424 | ProcStats proc_stats = 10029 [(module) = "framework"]; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 425 | BatteryVoltage battery_voltage = 10030; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 426 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"]; |
| 427 | DiskIo disk_io = 10032 [(module) = "framework"]; |
| 428 | PowerProfile power_profile = 10033 [(module) = "framework"]; |
| 429 | ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"]; |
| 430 | ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"]; |
| 431 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"]; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 432 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 433 | DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"]; |
| 434 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = |
| 435 | 10040 [(module) = "framework"]; |
| 436 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = |
| 437 | 10041 [(module) = "framework"]; |
| 438 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"]; |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 439 | BatteryLevel battery_level = 10043; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 440 | BuildInformation build_information = 10044 [(module) = "framework"]; |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 441 | BatteryCycleCount battery_cycle_count = 10045; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 442 | DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"]; |
| 443 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"]; |
| 444 | NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"]; |
| 445 | RoleHolder role_holder = 10049 [(module) = "framework"]; |
| 446 | DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"]; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 447 | TrainInfo train_info = 10051; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 448 | TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"]; |
| 449 | ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 450 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 451 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 452 | SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"]; |
| 453 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"]; |
| 454 | FaceSettings face_settings = 10058 [(module) = "framework"]; |
| 455 | CoolingDevice cooling_device = 10059 [(module) = "framework"]; |
| 456 | AppOps app_ops = 10060 [(module) = "framework"]; |
| 457 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 458 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 459 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 460 | ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 461 | VmsClientStats vms_client_stats = 10065 [(module) = "car"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 462 | NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"]; |
| 463 | DangerousPermissionStateSampled dangerous_permission_state_sampled = |
| 464 | 10067 [(module) = "framework"]; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 465 | GraphicsStats graphics_stats = 10068; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 466 | RuntimeAppOpsAccess runtime_app_ops_access = 10069; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame^] | 467 | IonHeapSize ion_heap_size = 10070 [(module) = "framework"]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 468 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 469 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 470 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 471 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 472 | // Field numbers 200,000 and above are reserved for future use; do not use them at all. |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 473 | |
| 474 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 475 | } |
| 476 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 477 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 478 | * This proto represents a node of an attribution chain. |
| 479 | * Note: All attribution chains are represented as a repeated field of type |
| 480 | * AttributionNode. It is understood that in such arrays, the order is that |
| 481 | * 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] | 482 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 483 | message AttributionNode { |
| 484 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 485 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 486 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 487 | // The (optional) string tag for an element in the attribution chain. If the |
| 488 | // element has no tag, it is encoded as an empty string. |
| 489 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 490 | } |
| 491 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 492 | message KeyValuePair { |
| 493 | optional int32 key = 1; |
| 494 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 495 | int32 value_int = 2; |
| 496 | int64 value_long = 3; |
| 497 | string value_str = 4; |
| 498 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 499 | } |
| 500 | } |
| 501 | |
| 502 | message KeyValuePairsAtom { |
| 503 | optional int32 uid = 1; |
| 504 | repeated KeyValuePair pairs = 2; |
| 505 | } |
| 506 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 507 | /* |
| 508 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 509 | * 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] | 510 | * |
| 511 | * RULES: |
| 512 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 513 | * Skipping field ids is not allowed. |
| 514 | * - These form an API, so renaming, renumbering or removing fields is |
| 515 | * not allowed between android releases. (This is not currently enforced, |
| 516 | * but there will be a tool to enforce this restriction). |
| 517 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 518 | * are allowed (yet). The bytes type is also not allowed. |
| 519 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 520 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 521 | * - 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] | 522 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 523 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 524 | * annotation. The generated code on android will be represented by UIDs, |
| 525 | * and those UIDs will be translated in xxx to those strings. |
| 526 | * |
| 527 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 528 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 529 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 530 | * ***************************************************************************** |
| 531 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 532 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 533 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 534 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 535 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 536 | * |
| 537 | * Logged from: |
| 538 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 539 | */ |
| 540 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 541 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 542 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 543 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 544 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 545 | enum State { |
| 546 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 547 | START = 1; // START indicated that throttling was triggered. |
| 548 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 549 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 550 | optional State state = 2; |
| 551 | |
| 552 | optional float temperature = 3; |
| 553 | } |
| 554 | |
| 555 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 556 | * Logs when the screen state changes. |
| 557 | * |
| 558 | * Logged from: |
| 559 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 560 | */ |
| 561 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 562 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 563 | optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 564 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 565 | |
| 566 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 567 | * Logs that the process state of the uid, as determined by ActivityManager |
| 568 | * (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] | 569 | * |
| 570 | * Logged from: |
| 571 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 572 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 573 | message UidProcessStateChanged { |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 574 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 575 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 576 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 577 | optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 578 | } |
| 579 | |
| 580 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 581 | * Logs process state change of a process, as per the activity manager. |
| 582 | * |
| 583 | * Logged from: |
| 584 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 585 | */ |
| 586 | message ProcessStateChanged { |
| 587 | optional int32 uid = 1; |
| 588 | optional string process_name = 2; |
| 589 | optional string package_name = 3; |
| 590 | // TODO: remove this when validation is done |
| 591 | optional int64 version = 5; |
| 592 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 593 | optional android.app.ProcessStateEnum state = 4; |
| 594 | } |
| 595 | |
| 596 | /** |
| 597 | * Logs when ActivityManagerService sleep state is changed. |
| 598 | * |
| 599 | * Logged from: |
| 600 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 601 | */ |
| 602 | message ActivityManagerSleepStateChanged { |
| 603 | // TODO: import frameworks proto |
| 604 | enum State { |
| 605 | UNKNOWN = 0; |
| 606 | ASLEEP = 1; |
| 607 | AWAKE = 2; |
| 608 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 609 | optional State state = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 610 | } |
| 611 | |
| 612 | /** |
| 613 | * Logs when system memory state changes. |
| 614 | * |
| 615 | * Logged from: |
| 616 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 617 | */ |
| 618 | message MemoryFactorStateChanged { |
| 619 | // TODO: import frameworks proto |
| 620 | enum State { |
| 621 | MEMORY_UNKNOWN = 0; |
| 622 | NORMAL = 1; // normal. |
| 623 | MODERATE = 2; // moderate memory pressure. |
| 624 | LOW = 3; // low memory. |
| 625 | CRITICAL = 4; // critical memory. |
| 626 | |
| 627 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 628 | optional State factor = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 629 | } |
| 630 | |
| 631 | /** |
| 632 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 633 | * |
| 634 | * Logged from: |
| 635 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 636 | */ |
| 637 | message ExcessiveCpuUsageReported { |
| 638 | optional int32 uid = 1; |
| 639 | optional string process_name = 2; |
| 640 | optional string package_name = 3; |
| 641 | // package version. TODO: remove this when validation is done |
| 642 | optional int64 version = 4; |
| 643 | } |
| 644 | |
| 645 | /** |
| 646 | * Logs when a cached process is killed, along with its pss. |
| 647 | * |
| 648 | * Logged from: |
| 649 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 650 | */ |
| 651 | message CachedKillReported { |
| 652 | optional int32 uid = 1; |
| 653 | optional string process_name = 2; |
| 654 | optional string package_name = 3; |
| 655 | // TODO: remove this when validation is done |
| 656 | optional int64 version = 5; |
| 657 | optional int64 pss = 4; |
| 658 | } |
| 659 | |
| 660 | /** |
| 661 | * Logs when memory stats of a process is reported. |
| 662 | * |
| 663 | * Logged from: |
| 664 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 665 | */ |
| 666 | message ProcessMemoryStatReported { |
| 667 | optional int32 uid = 1; |
| 668 | optional string process_name = 2; |
| 669 | optional string package_name = 3; |
| 670 | //TODO: remove this when validation is done |
| 671 | optional int64 version = 9; |
| 672 | optional int64 pss = 4; |
| 673 | optional int64 uss = 5; |
| 674 | optional int64 rss = 6; |
| 675 | enum Type { |
| 676 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 677 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 678 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 679 | ADD_PSS_EXTERNAL = 3; |
| 680 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 681 | } |
| 682 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 683 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 684 | } |
| 685 | |
| 686 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 687 | * Logs that a process started, finished, crashed, or ANRed. |
| 688 | * |
| 689 | * Logged from: |
| 690 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 691 | */ |
| 692 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 693 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 694 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 695 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 696 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 697 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 698 | // What lifecycle state the process changed to. |
| 699 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 700 | enum State { |
| 701 | FINISHED = 0; |
| 702 | STARTED = 1; |
| 703 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 704 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 705 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 706 | } |
| 707 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 708 | /** |
| 709 | * Logs when the ble scan state changes. |
| 710 | * |
| 711 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 712 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 713 | */ |
| 714 | message BleScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 715 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 716 | |
| 717 | enum State { |
| 718 | OFF = 0; |
| 719 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 720 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 721 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 722 | } |
| 723 | optional State state = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 724 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 725 | // Does the scan have a filter. |
| 726 | optional bool is_filtered = 3; |
| 727 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
| 728 | optional bool is_first_match = 4; |
| 729 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
| 730 | optional bool is_opportunistic = 5; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 731 | } |
| 732 | |
| 733 | /** |
| 734 | * Logs reporting of a ble scan finding results. |
| 735 | * |
| 736 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 737 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 738 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 739 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 740 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 741 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 742 | |
| 743 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 744 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 745 | } |
| 746 | |
| 747 | /** |
| 748 | * Logs when a sensor state changes. |
| 749 | * |
| 750 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 751 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 752 | */ |
| 753 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 754 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 755 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 756 | // The id (int) of the sensor. |
| 757 | optional int32 sensor_id = 2; |
| 758 | |
| 759 | enum State { |
| 760 | OFF = 0; |
| 761 | ON = 1; |
| 762 | } |
| 763 | optional State state = 3; |
| 764 | } |
| 765 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 766 | /** |
| 767 | * Logs when GPS state changes. |
| 768 | * |
| 769 | * Logged from: |
| 770 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 771 | */ |
| 772 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 773 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 774 | |
| 775 | enum State { |
| 776 | OFF = 0; |
| 777 | ON = 1; |
| 778 | } |
| 779 | optional State state = 2; |
| 780 | } |
| 781 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 782 | /** |
| 783 | * Logs when GPS signal quality. |
| 784 | * |
| 785 | * Logged from: |
| 786 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 787 | */ |
| 788 | message GpsSignalQualityChanged { |
| 789 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 790 | } |
| 791 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 792 | |
| 793 | /** |
| 794 | * Logs when a sync manager sync state changes. |
| 795 | * |
| 796 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 797 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 798 | */ |
| 799 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 800 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 801 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 802 | // 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] | 803 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 804 | |
| 805 | enum State { |
| 806 | OFF = 0; |
| 807 | ON = 1; |
| 808 | } |
| 809 | optional State state = 3; |
| 810 | } |
| 811 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 812 | /* |
| 813 | * Deferred job stats. |
| 814 | * |
| 815 | * Logged from: |
| 816 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 817 | */ |
| 818 | message DeferredJobStatsReported { |
| 819 | repeated AttributionNode attribution_node = 1; |
| 820 | |
| 821 | // Number of jobs deferred. |
| 822 | optional int32 num_jobs_deferred = 2; |
| 823 | |
| 824 | // Time since the last job runs. |
| 825 | optional int64 time_since_last_job_millis = 3; |
| 826 | } |
| 827 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 828 | /** |
| 829 | * Logs when a job scheduler job state changes. |
| 830 | * |
| 831 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 832 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 833 | */ |
| 834 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 835 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 836 | |
| 837 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 838 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 839 | |
| 840 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 841 | FINISHED = 0; |
| 842 | STARTED = 1; |
| 843 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 844 | } |
| 845 | optional State state = 3; |
| 846 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 847 | // The reason a job has stopped. |
| 848 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 849 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 850 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 851 | |
| 852 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 853 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 854 | // already assigned 0. |
| 855 | enum Bucket { |
| 856 | UNKNOWN = -1; |
| 857 | ACTIVE = 0; |
| 858 | WORKING_SET = 1; |
| 859 | FREQUENT = 2; |
| 860 | RARE = 3; |
| 861 | NEVER = 4; |
Kweku Adams | ae9d6be | 2020-01-14 16:10:14 -0800 | [diff] [blame] | 862 | RESTRICTED = 5; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 863 | } |
| 864 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 865 | |
| 866 | // The job id (as assigned by the app). |
| 867 | optional int32 job_id = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 868 | } |
| 869 | |
| 870 | /** |
| 871 | * Logs when the audio state changes. |
| 872 | * |
| 873 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 874 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 875 | */ |
| 876 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 877 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 878 | |
| 879 | enum State { |
| 880 | OFF = 0; |
| 881 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 882 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 883 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 884 | } |
| 885 | optional State state = 2; |
| 886 | } |
| 887 | |
| 888 | /** |
| 889 | * Logs when the video codec state changes. |
| 890 | * |
| 891 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 892 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 893 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 894 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 895 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 896 | |
| 897 | enum State { |
| 898 | OFF = 0; |
| 899 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 900 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 901 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 902 | } |
| 903 | optional State state = 2; |
| 904 | } |
| 905 | |
| 906 | /** |
| 907 | * Logs when the flashlight state changes. |
| 908 | * |
| 909 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 910 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 911 | */ |
| 912 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 913 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 914 | |
| 915 | enum State { |
| 916 | OFF = 0; |
| 917 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 918 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 919 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 920 | } |
| 921 | optional State state = 2; |
| 922 | } |
| 923 | |
| 924 | /** |
| 925 | * Logs when the camera state changes. |
| 926 | * |
| 927 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 928 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 929 | */ |
| 930 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 931 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 932 | |
| 933 | enum State { |
| 934 | OFF = 0; |
| 935 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 936 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 937 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 938 | } |
| 939 | optional State state = 2; |
| 940 | } |
| 941 | |
| 942 | /** |
| 943 | * 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] | 944 | * |
| 945 | * Logged from: |
| 946 | * TODO |
| 947 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 948 | message WakelockStateChanged { |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 949 | repeated AttributionNode attribution_node = 1 |
| 950 | [(state_field_option).option = PRIMARY_FIELD_FIRST_UID]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 951 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 952 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 953 | // From frameworks/base/core/proto/android/os/enums.proto. |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 954 | optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).option = PRIMARY]; |
| 955 | ; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 956 | |
| 957 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 958 | optional string tag = 3 [(state_field_option).option = PRIMARY]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 959 | |
| 960 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 961 | RELEASE = 0; |
| 962 | ACQUIRE = 1; |
| 963 | CHANGE_RELEASE = 2; |
| 964 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 965 | } |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 966 | optional State state = 4 [(state_field_option).option = EXCLUSIVE]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 967 | } |
| 968 | |
| 969 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 970 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 971 | * |
| 972 | * Logged from: |
| 973 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 974 | */ |
| 975 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 976 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 977 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 978 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 979 | optional string tag = 2; |
| 980 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 981 | // TODO: I have no idea what this is. |
| 982 | optional string history_tag = 3; |
| 983 | |
| 984 | enum State { |
| 985 | OFF = 0; |
| 986 | ON = 1; |
| 987 | } |
| 988 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 989 | } |
| 990 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 991 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 992 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 993 | * |
| 994 | * Logged from: |
| 995 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 996 | */ |
| 997 | message InteractiveStateChanged { |
| 998 | enum State { |
| 999 | OFF = 0; |
| 1000 | ON = 1; |
| 1001 | } |
| 1002 | optional State state = 1; |
| 1003 | } |
| 1004 | |
| 1005 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1006 | * Logs Battery Saver state change. |
| 1007 | * |
| 1008 | * Logged from: |
| 1009 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1010 | */ |
| 1011 | message BatterySaverModeStateChanged { |
| 1012 | enum State { |
| 1013 | OFF = 0; |
| 1014 | ON = 1; |
| 1015 | } |
| 1016 | optional State state = 1; |
| 1017 | } |
| 1018 | |
| 1019 | /** |
| 1020 | * Logs Doze mode state change. |
| 1021 | * |
| 1022 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1023 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1024 | */ |
| 1025 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 1026 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1027 | } |
| 1028 | |
| 1029 | |
| 1030 | /** |
| 1031 | * Logs state change of Doze mode including maintenance windows. |
| 1032 | * |
| 1033 | * Logged from: |
| 1034 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1035 | */ |
| 1036 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 1037 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1038 | } |
| 1039 | |
| 1040 | /** |
| 1041 | * Logs screen brightness level. |
| 1042 | * |
| 1043 | * Logged from: |
| 1044 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1045 | */ |
| 1046 | message ScreenBrightnessChanged { |
| 1047 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 1048 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1049 | } |
| 1050 | |
| 1051 | /** |
| 1052 | * Logs battery level (percent full, from 0 to 100). |
| 1053 | * |
| 1054 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1055 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1056 | */ |
| 1057 | message BatteryLevelChanged { |
| 1058 | // Battery level. Should be in [0, 100]. |
| 1059 | optional int32 battery_level = 1; |
| 1060 | } |
| 1061 | |
| 1062 | /** |
| 1063 | * Logs change in charging status of the device. |
| 1064 | * |
| 1065 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1066 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1067 | */ |
| 1068 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1069 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 1070 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1071 | } |
| 1072 | |
| 1073 | /** |
| 1074 | * Logs whether the device is plugged in, and what power source it is using. |
| 1075 | * |
| 1076 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1077 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1078 | */ |
| 1079 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1080 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 1081 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1082 | } |
| 1083 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1084 | /** |
| 1085 | * Logs when an app's wakeup alarm fires. |
| 1086 | * |
| 1087 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1088 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1089 | */ |
| 1090 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1091 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1092 | |
| 1093 | // Name of the wakeup alarm. |
| 1094 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1095 | |
| 1096 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1097 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1098 | |
| 1099 | // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java. |
| 1100 | enum Bucket { |
| 1101 | UNKNOWN = 0; |
| 1102 | EXEMPTED = 5; |
| 1103 | ACTIVE = 10; |
| 1104 | WORKING_SET = 20; |
| 1105 | FREQUENT = 30; |
| 1106 | RARE = 40; |
| 1107 | NEVER = 50; |
| 1108 | } |
| 1109 | // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired. |
| 1110 | optional Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1111 | } |
| 1112 | |
| 1113 | /** |
| 1114 | * Logs when an an app causes the mobile radio to change state. |
| 1115 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1116 | * |
| 1117 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1118 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1119 | */ |
| 1120 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1121 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1122 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1123 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1124 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1125 | } |
| 1126 | |
| 1127 | /** |
| 1128 | * Logs when an an app causes the wifi radio to change state. |
| 1129 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1130 | * |
| 1131 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1132 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1133 | */ |
| 1134 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1135 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1136 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1137 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1138 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1139 | } |
| 1140 | |
| 1141 | /** |
| 1142 | * Logs kernel wakeup reasons and aborts. |
| 1143 | * |
| 1144 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1145 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1146 | */ |
| 1147 | message KernelWakeupReported { |
| 1148 | // Name of the kernel wakeup reason (or abort). |
| 1149 | optional string wakeup_reason_name = 1; |
| 1150 | |
| 1151 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1152 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1153 | } |
| 1154 | |
| 1155 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1156 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1157 | * 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] | 1158 | * |
| 1159 | * Logged from: |
| 1160 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1161 | */ |
| 1162 | message WifiEnabledStateChanged { |
| 1163 | enum State { |
| 1164 | OFF = 0; |
| 1165 | ON = 1; |
| 1166 | } |
| 1167 | optional State state = 1; |
| 1168 | } |
| 1169 | |
| 1170 | /** |
| 1171 | * 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] | 1172 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1173 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1174 | * |
| 1175 | * Logged from: |
| 1176 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1177 | */ |
| 1178 | message WifiRunningStateChanged { |
| 1179 | repeated AttributionNode attribution_node = 1; |
| 1180 | |
| 1181 | enum State { |
| 1182 | OFF = 0; |
| 1183 | ON = 1; |
| 1184 | } |
| 1185 | optional State state = 2; |
| 1186 | } |
| 1187 | |
| 1188 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1189 | * Logs wifi locks held by an app. |
| 1190 | * |
| 1191 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1192 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1193 | */ |
| 1194 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1195 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1196 | |
| 1197 | enum State { |
| 1198 | OFF = 0; |
| 1199 | ON = 1; |
| 1200 | } |
| 1201 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1202 | |
| 1203 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1204 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1205 | } |
| 1206 | |
| 1207 | /** |
| 1208 | * Logs wifi signal strength changes. |
| 1209 | * |
| 1210 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1211 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1212 | */ |
| 1213 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1214 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1215 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1216 | } |
| 1217 | |
| 1218 | /** |
| 1219 | * Logs wifi scans performed by an app. |
| 1220 | * |
| 1221 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1222 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1223 | */ |
| 1224 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1225 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1226 | |
| 1227 | enum State { |
| 1228 | OFF = 0; |
| 1229 | ON = 1; |
| 1230 | } |
| 1231 | optional State state = 2; |
| 1232 | } |
| 1233 | |
| 1234 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1235 | * Logs wifi multicast locks held by an app |
| 1236 | * |
| 1237 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1238 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1239 | */ |
| 1240 | message WifiMulticastLockStateChanged { |
| 1241 | repeated AttributionNode attribution_node = 1; |
| 1242 | |
| 1243 | enum State { |
| 1244 | OFF = 0; |
| 1245 | ON = 1; |
| 1246 | } |
| 1247 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1248 | |
| 1249 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1250 | } |
| 1251 | |
| 1252 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1253 | * Logs shutdown reason and duration on next boot. |
| 1254 | * |
| 1255 | * Logged from: |
| 1256 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1257 | */ |
| 1258 | message ShutdownSequenceReported { |
| 1259 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1260 | optional bool reboot = 1; |
| 1261 | |
| 1262 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1263 | optional string reason = 2; |
| 1264 | |
| 1265 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1266 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1267 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1268 | |
| 1269 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1270 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1271 | } |
| 1272 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1273 | |
| 1274 | /** |
| 1275 | * Logs boot reason and duration. |
| 1276 | * |
| 1277 | * Logged from: |
| 1278 | * system/core/bootstat/bootstat.cpp |
| 1279 | */ |
| 1280 | message BootSequenceReported { |
| 1281 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1282 | // Default: "<EMPTY>" if not available. |
| 1283 | optional string bootloader_reason = 1; |
| 1284 | |
| 1285 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1286 | // Default: "<EMPTY>" if not available. |
| 1287 | optional string system_reason = 2; |
| 1288 | |
| 1289 | // 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] | 1290 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1291 | |
| 1292 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1293 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1294 | |
| 1295 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1296 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1297 | |
| 1298 | // Time since last boot in ms. Default: 0 if not available. |
| 1299 | optional int64 time_since_last_boot = 6; |
| 1300 | } |
| 1301 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1302 | |
| 1303 | /** |
| 1304 | * Logs call state and disconnect cause (if applicable). |
| 1305 | * |
| 1306 | * Logged from: |
| 1307 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1308 | */ |
| 1309 | message CallStateChanged { |
| 1310 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1311 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1312 | optional android.telecom.CallStateEnum call_state = 1; |
| 1313 | |
| 1314 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1315 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1316 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1317 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1318 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1319 | |
| 1320 | // True if the call is self-managed, which are apps that use the |
| 1321 | // telecom infrastructure to make their own calls. |
| 1322 | optional bool self_managed = 3; |
| 1323 | |
| 1324 | // True if call is external. External calls are calls on connected Wear |
| 1325 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1326 | optional bool external_call = 4; |
| 1327 | } |
| 1328 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1329 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1330 | * Logs keyguard state. The keyguard is the lock screen. |
| 1331 | * |
| 1332 | * Logged from: |
| 1333 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1334 | */ |
| 1335 | message KeyguardStateChanged { |
| 1336 | enum State { |
| 1337 | UNKNOWN = 0; |
| 1338 | // The keyguard is hidden when the phone is unlocked. |
| 1339 | HIDDEN = 1; |
| 1340 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1341 | SHOWN= 2; |
| 1342 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1343 | // Eg. Opening the camera while on the lock screen. |
| 1344 | OCCLUDED = 3; |
| 1345 | } |
| 1346 | optional State state = 1; |
| 1347 | } |
| 1348 | |
| 1349 | /** |
| 1350 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1351 | * prompts the user to enter a password (pattern, pin, etc). |
| 1352 | * |
| 1353 | * Logged from: |
| 1354 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1355 | */ |
| 1356 | |
| 1357 | message KeyguardBouncerStateChanged { |
| 1358 | enum State { |
| 1359 | UNKNOWN = 0; |
| 1360 | // Bouncer is hidden, either as a result of successfully entering the |
| 1361 | // password, screen timing out, or user going back to lock screen. |
| 1362 | HIDDEN = 1; |
| 1363 | // This is when the user is being prompted to enter the password. |
| 1364 | SHOWN = 2; |
| 1365 | } |
| 1366 | optional State state = 1; |
| 1367 | } |
| 1368 | |
| 1369 | /** |
| 1370 | * Logs the result of entering a password into the keyguard bouncer. |
| 1371 | * |
| 1372 | * Logged from: |
| 1373 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1374 | */ |
| 1375 | message KeyguardBouncerPasswordEntered { |
| 1376 | enum BouncerResult { |
| 1377 | UNKNOWN = 0; |
| 1378 | // The password entered was incorrect. |
| 1379 | FAILURE = 1; |
| 1380 | // The password entered was correct. |
| 1381 | SUCCESS = 2; |
| 1382 | } |
| 1383 | optional BouncerResult result = 1; |
| 1384 | } |
| 1385 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1386 | /* |
| 1387 | * Logs changes to the configuration of the device. The configuration is defined |
| 1388 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1389 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1390 | * Please go there to interpret the possible values each field can be. |
| 1391 | * |
| 1392 | * Logged from: |
| 1393 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1394 | */ |
| 1395 | message ResourceConfigurationChanged { |
| 1396 | // Bit mask of color capabilities of the screen. |
| 1397 | // Contains information about the color gamut and hdr mode of the screen. |
| 1398 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1399 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1400 | |
| 1401 | // The target screen density being rendered to. |
| 1402 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1403 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1404 | |
| 1405 | // Current user preference for the scaling factor for fonts, |
| 1406 | // relative to the base density scaling. |
| 1407 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1408 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1409 | |
| 1410 | // Flag indicating whether the hard keyboard is hidden. |
| 1411 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1412 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1413 | |
| 1414 | // The type of keyboard attached to the device. |
| 1415 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1416 | optional int32 keyboard = 5; |
| 1417 | |
| 1418 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1419 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1420 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1421 | |
| 1422 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1423 | // 0 if undefined. |
| 1424 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1425 | optional int32 mcc = 7; |
| 1426 | |
| 1427 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1428 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1429 | // MNC_ZERO symbol defined in Configuration.java. |
| 1430 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1431 | optional int32 mnc = 8; |
| 1432 | |
| 1433 | // The kind of navigation available on the device. |
| 1434 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1435 | optional int32 navigation = 9; |
| 1436 | |
| 1437 | // Flag indicating whether the navigation is available. |
| 1438 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1439 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1440 | |
| 1441 | // Overall orientation of the screen. |
| 1442 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1443 | optional int32 orientation = 11; |
| 1444 | |
| 1445 | // The current height of the available screen space, in dp units. |
| 1446 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1447 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1448 | |
| 1449 | // Bit mask of overall layout of the screen. |
| 1450 | // Contains information about screen size, whether the screen is wider/taller |
| 1451 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1452 | // and whether the screen has a rounded shape. |
| 1453 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1454 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1455 | |
| 1456 | // Current width of the available screen space, in dp units. |
| 1457 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1458 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1459 | |
| 1460 | // The smallest screen size an application will see in normal operation. |
| 1461 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1462 | // in portrait and landscape. |
| 1463 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1464 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1465 | |
| 1466 | // The type of touch screen attached to the device. |
| 1467 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1468 | optional int32 touchscreen = 16; |
| 1469 | |
| 1470 | // Bit mask of the ui mode. |
| 1471 | // Contains information about the overall ui mode of the device. |
| 1472 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1473 | // Also contains information about whether the device is in night mode. |
| 1474 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1475 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1476 | } |
| 1477 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1478 | |
| 1479 | /** |
| 1480 | * Logs changes in the connection state of the mobile radio. |
| 1481 | * |
| 1482 | * Logged from: |
| 1483 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1484 | */ |
| 1485 | message MobileConnectionStateChanged { |
| 1486 | // States are from the state machine DataConnection.java. |
| 1487 | enum State { |
| 1488 | UNKNOWN = 0; |
| 1489 | // The connection is inactive, or disconnected. |
| 1490 | INACTIVE = 1; |
| 1491 | // The connection is being activated, or connecting. |
| 1492 | ACTIVATING = 2; |
| 1493 | // The connection is active, or connected. |
| 1494 | ACTIVE = 3; |
| 1495 | // The connection is disconnecting. |
| 1496 | DISCONNECTING = 4; |
| 1497 | // The connection is disconnecting after creating a connection. |
| 1498 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1499 | } |
| 1500 | optional State state = 1; |
| 1501 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1502 | optional int32 sim_slot_index = 2; |
| 1503 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1504 | // every new network created. Resets whenever the device reboots. |
| 1505 | optional int32 data_connection_id = 3; |
| 1506 | // A bitmask for the capabilities of this connection. |
| 1507 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1508 | // Default value (if we have no information): 0 |
| 1509 | optional int64 capabilities = 4; |
| 1510 | // If this connection has internet. |
| 1511 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1512 | optional bool has_internet = 5; |
| 1513 | } |
| 1514 | |
| 1515 | /** |
| 1516 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1517 | * |
| 1518 | * Logged from: |
| 1519 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1520 | */ |
| 1521 | message MobileRadioTechnologyChanged { |
| 1522 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1523 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1524 | optional int32 sim_slot_index = 2; |
| 1525 | } |
| 1526 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1527 | /** |
| 1528 | * Logs the VID and PID of any connected USB devices. |
| 1529 | * |
| 1530 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1531 | * |
| 1532 | * Logged by Vendor. |
| 1533 | */ |
| 1534 | message UsbDeviceAttached { |
| 1535 | optional int32 vid = 1; |
| 1536 | optional int32 pid = 2; |
| 1537 | optional bool has_audio = 3; |
| 1538 | optional bool has_hid = 4; |
| 1539 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1540 | enum State { |
| 1541 | STATE_DISCONNECTED = 0; |
| 1542 | STATE_CONNECTED = 1; |
| 1543 | } |
| 1544 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1545 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1546 | } |
| 1547 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1548 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1549 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1550 | * Logs when Bluetooth is enabled and disabled. |
| 1551 | * |
| 1552 | * Logged from: |
| 1553 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1554 | */ |
| 1555 | message BluetoothEnabledStateChanged { |
| 1556 | repeated AttributionNode attribution_node = 1; |
| 1557 | // Whether or not bluetooth is enabled on the device. |
| 1558 | enum State { |
| 1559 | UNKNOWN = 0; |
| 1560 | ENABLED = 1; |
| 1561 | DISABLED = 2; |
| 1562 | } |
| 1563 | optional State state = 2; |
| 1564 | // The reason for being enabled/disabled. |
| 1565 | // Eg. Airplane mode, crash, application request. |
| 1566 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1567 | // 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] | 1568 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1569 | } |
| 1570 | |
| 1571 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1572 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1573 | * |
| 1574 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1575 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1576 | * |
| 1577 | * Next Tag: 5 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1578 | */ |
| 1579 | message BluetoothConnectionStateChanged { |
| 1580 | // The state of the connection. |
| 1581 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1582 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1583 | // An identifier that can be used to match connect and disconnect events. |
| 1584 | // Currently is last two bytes of a hash of a device level ID and |
| 1585 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1586 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1587 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1588 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1589 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1590 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1591 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1592 | // An identifier that can be used to match events for this device. |
| 1593 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1594 | // Salt: Randomly generated 256 bit value |
| 1595 | // Hash algorithm: HMAC-SHA256 |
| 1596 | // Size: 32 byte |
| 1597 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1598 | 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] | 1599 | } |
| 1600 | |
| 1601 | /** |
| 1602 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1603 | * |
| 1604 | * Logged from: |
| 1605 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1606 | * |
| 1607 | * Next Tag: 3 |
| 1608 | */ |
| 1609 | message BluetoothAclConnectionStateChanged { |
| 1610 | // An identifier that can be used to match events for this device. |
| 1611 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1612 | // Salt: Randomly generated 256 bit value |
| 1613 | // Hash algorithm: HMAC-SHA256 |
| 1614 | // Size: 32 byte |
| 1615 | // Default: null or empty if the device identifier is not known |
| 1616 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1617 | // The state of the connection. |
| 1618 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1619 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1620 | } |
| 1621 | |
| 1622 | /** |
| 1623 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1624 | * |
| 1625 | * Logged from: |
| 1626 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1627 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1628 | * |
| 1629 | * Next Tag: 4 |
| 1630 | */ |
| 1631 | message BluetoothScoConnectionStateChanged { |
| 1632 | // An identifier that can be used to match events for this device. |
| 1633 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1634 | // Salt: Randomly generated 256 bit value |
| 1635 | // Hash algorithm: HMAC-SHA256 |
| 1636 | // Size: 32 byte |
| 1637 | // Default: null or empty if the device identifier is not known |
| 1638 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1639 | // The state of the connection. |
| 1640 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1641 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1642 | // Codec used for this SCO connection |
| 1643 | // Default: UNKNOWN |
| 1644 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1645 | } |
| 1646 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1647 | /** |
| 1648 | * Logged when active device of a profile changes |
| 1649 | * |
| 1650 | * Logged from: |
| 1651 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1652 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1653 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1654 | */ |
| 1655 | message BluetoothActiveDeviceChanged { |
| 1656 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1657 | // From android.bluetooth.BluetoothProfile |
| 1658 | optional int32 bt_profile = 1; |
| 1659 | // An identifier that can be used to match events for this new active device. |
| 1660 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1661 | // Salt: Randomly generated 256 bit value |
| 1662 | // Hash algorithm: HMAC-SHA256 |
| 1663 | // Size: 32 byte |
| 1664 | // Default: null or empty if there is no active device for this profile |
| 1665 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1666 | } |
| 1667 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1668 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1669 | // - This event is triggered when there is a related HCI command or event |
| 1670 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1671 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1672 | // receiving command complete |
| 1673 | // - HCI events are logged when they arrive |
| 1674 | // |
| 1675 | // Low level log from system/bt |
| 1676 | // |
| 1677 | // Bluetooth classic commands: |
| 1678 | // - CMD_CREATE_CONNECTION |
| 1679 | // - CMD_DISCONNECT |
| 1680 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1681 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1682 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1683 | // - CMD_SETUP_ESCO_CONNECTION |
| 1684 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1685 | // - CMD_REJECT_ESCO_CONNECTION |
| 1686 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1687 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1688 | // |
| 1689 | // Bluetooth low energy commands: |
| 1690 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1691 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1692 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1693 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1694 | // - CMD_BLE_ADD_WHITE_LIST |
| 1695 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1696 | // |
| 1697 | // Bluetooth classic events: |
| 1698 | // - EVT_CONNECTION_COMP |
| 1699 | // - EVT_CONNECTION_REQUEST |
| 1700 | // - EVT_DISCONNECTION_COMP |
| 1701 | // - EVT_ESCO_CONNECTION_COMP |
| 1702 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1703 | // |
| 1704 | // Bluetooth low energy meta events: |
| 1705 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1706 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1707 | // |
| 1708 | // Next tag: 10 |
| 1709 | message BluetoothLinkLayerConnectionEvent { |
| 1710 | // An identifier that can be used to match events for this device. |
| 1711 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1712 | // Salt: Randomly generated 256 bit value |
| 1713 | // Hash algorithm: HMAC-SHA256 |
| 1714 | // Size: 32 byte |
| 1715 | // Default: null or empty if the device identifier is not known |
| 1716 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1717 | // Connection handle of this connection if available |
| 1718 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1719 | // Default: 0xFFFF if the handle is unknown |
| 1720 | optional int32 connection_handle = 2; |
| 1721 | // Direction of the link |
| 1722 | // Default: DIRECTION_UNKNOWN |
| 1723 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1724 | // Type of this link |
| 1725 | // Default: LINK_TYPE_UNKNOWN |
| 1726 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1727 | |
| 1728 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1729 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1730 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1731 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1732 | // set and valid, ignore hci_ble_event |
| 1733 | |
| 1734 | // HCI command associated with this event |
| 1735 | // Default: CMD_UNKNOWN |
| 1736 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1737 | // HCI event associated with this event |
| 1738 | // Default: EVT_UNKNOWN |
| 1739 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1740 | // HCI BLE meta event associated with this event |
| 1741 | // Default: BLE_EVT_UNKNOWN |
| 1742 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1743 | // HCI command status code if this is triggerred by hci_cmd |
| 1744 | // Default: STATUS_UNKNOWN |
| 1745 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1746 | // HCI reason code associated with this event |
| 1747 | // Default: STATUS_UNKNOWN |
| 1748 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
| 1749 | } |
| 1750 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1751 | /** |
| 1752 | * Logs when a module is rolled back by Watchdog. |
| 1753 | * |
| 1754 | * Logged from: Rollback Manager |
| 1755 | */ |
| 1756 | message WatchdogRollbackOccurred { |
| 1757 | enum RollbackType { |
| 1758 | UNKNOWN = 0; |
| 1759 | ROLLBACK_INITIATE = 1; |
| 1760 | ROLLBACK_SUCCESS = 2; |
| 1761 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 1762 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1763 | } |
| 1764 | optional RollbackType rollback_type = 1; |
| 1765 | |
| 1766 | optional string package_name = 2; |
| 1767 | |
| 1768 | optional int32 package_version_code = 3; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1769 | |
| 1770 | enum RollbackReasonType { |
| 1771 | REASON_UNKNOWN = 0; |
| 1772 | REASON_NATIVE_CRASH = 1; |
| 1773 | REASON_EXPLICIT_HEALTH_CHECK = 2; |
| 1774 | REASON_APP_CRASH = 3; |
| 1775 | REASON_APP_NOT_RESPONDING = 4; |
Gavin Corkery | 3285d22 | 2020-01-17 19:24:22 +0000 | [diff] [blame] | 1776 | REASON_NATIVE_CRASH_DURING_BOOT = 5; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1777 | } |
| 1778 | optional RollbackReasonType rollback_reason = 4; |
| 1779 | |
| 1780 | // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback |
| 1781 | // is initiated. Empty if the package is unknown. |
| 1782 | optional string failing_package_name = 5; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1783 | } |
| 1784 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1785 | /** |
| 1786 | * Logs when there is a change in Bluetooth A2DP playback state |
| 1787 | * |
| 1788 | * Logged from: |
| 1789 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1790 | */ |
| 1791 | message BluetoothA2dpPlaybackStateChanged { |
| 1792 | // An identifier that can be used to match events for this device. |
| 1793 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1794 | // Salt: Randomly generated 256 bit value |
| 1795 | // Hash algorithm: HMAC-SHA256 |
| 1796 | // Size: 32 byte |
| 1797 | // Default: null or empty if the device identifier is not known |
| 1798 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1799 | // Current playback state |
| 1800 | // Default: PLAYBACK_STATE_UNKNOWN |
| 1801 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 1802 | // Current audio coding mode |
| 1803 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 1804 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
| 1805 | } |
| 1806 | |
| 1807 | /** |
| 1808 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 1809 | * |
| 1810 | * Logged from: |
| 1811 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1812 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1813 | */ |
| 1814 | message BluetoothA2dpCodecConfigChanged { |
| 1815 | // An identifier that can be used to match events for this device. |
| 1816 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1817 | // Salt: Randomly generated 256 bit value |
| 1818 | // Hash algorithm: HMAC-SHA256 |
| 1819 | // Size: 32 byte |
| 1820 | // Default: null or empty if the device identifier is not known |
| 1821 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1822 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1823 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1824 | optional int32 codec_type = 2; |
| 1825 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1826 | // Default: CODEC_PRIORITY_DEFAULT |
| 1827 | optional int32 codec_priority = 3; |
| 1828 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 1829 | // Default: SAMPLE_RATE_NONE |
| 1830 | optional int32 sample_rate = 4; |
| 1831 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 1832 | // Default: BITS_PER_SAMPLE_NONE |
| 1833 | optional int32 bits_per_sample = 5; |
| 1834 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 1835 | // Default: CHANNEL_MODE_NONE |
| 1836 | optional int32 channel_mode = 6; |
| 1837 | // Codec specific values |
| 1838 | // Default 0 |
| 1839 | optional int64 codec_specific_1 = 7; |
| 1840 | optional int64 codec_specific_2 = 8; |
| 1841 | optional int64 codec_specific_3 = 9; |
| 1842 | optional int64 codec_specific_4 = 10; |
| 1843 | } |
| 1844 | |
| 1845 | /** |
| 1846 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 1847 | * Each codec's capability is logged separately due to statsd restriction |
| 1848 | * |
| 1849 | * Logged from: |
| 1850 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1851 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1852 | */ |
| 1853 | message BluetoothA2dpCodecCapabilityChanged { |
| 1854 | // An identifier that can be used to match events for this device. |
| 1855 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1856 | // Salt: Randomly generated 256 bit value |
| 1857 | // Hash algorithm: HMAC-SHA256 |
| 1858 | // Size: 32 byte |
| 1859 | // Default: null or empty if the device identifier is not known |
| 1860 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1861 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1862 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1863 | optional int32 codec_type = 2; |
| 1864 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1865 | // Default: CODEC_PRIORITY_DEFAULT |
| 1866 | optional int32 codec_priority = 3; |
| 1867 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 1868 | // in BluetoothCodecConfig |
| 1869 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 1870 | optional int32 sample_rate = 4; |
| 1871 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 1872 | // in BluetoothCodecConfig |
| 1873 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 1874 | optional int32 bits_per_sample = 5; |
| 1875 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 1876 | // BluetoothCodecConfig |
| 1877 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 1878 | optional int32 channel_mode = 6; |
| 1879 | // Codec specific values |
| 1880 | // Default 0 |
| 1881 | optional int64 codec_specific_1 = 7; |
| 1882 | optional int64 codec_specific_2 = 8; |
| 1883 | optional int64 codec_specific_3 = 9; |
| 1884 | optional int64 codec_specific_4 = 10; |
| 1885 | } |
| 1886 | |
| 1887 | /** |
| 1888 | * Logs when A2DP failed to read from PCM source. |
| 1889 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 1890 | * |
| 1891 | * Logged from: |
| 1892 | * system/bt |
| 1893 | */ |
| 1894 | message BluetoothA2dpAudioUnderrunReported { |
| 1895 | // An identifier that can be used to match events for this device. |
| 1896 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1897 | // Salt: Randomly generated 256 bit value |
| 1898 | // Hash algorithm: HMAC-SHA256 |
| 1899 | // Size: 32 byte |
| 1900 | // Default: null or empty if the device identifier is not known |
| 1901 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1902 | // Encoding interval in nanoseconds |
| 1903 | // Default: 0 |
| 1904 | optional int64 encoding_interval_nanos = 2; |
| 1905 | // Number of bytes of PCM data that could not be read from the source |
| 1906 | // Default: 0 |
| 1907 | optional int32 num_missing_pcm_bytes = 3; |
| 1908 | } |
| 1909 | |
| 1910 | /** |
| 1911 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 1912 | * buffer queue is full and we have to drop data |
| 1913 | * |
| 1914 | * Logged from: |
| 1915 | * system/bt |
| 1916 | */ |
| 1917 | message BluetoothA2dpAudioOverrunReported { |
| 1918 | // An identifier that can be used to match events for this device. |
| 1919 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1920 | // Salt: Randomly generated 256 bit value |
| 1921 | // Hash algorithm: HMAC-SHA256 |
| 1922 | // Size: 32 byte |
| 1923 | // Default: null or empty if the device identifier is not known |
| 1924 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1925 | // Encoding interval in nanoseconds |
| 1926 | // Default: 0 |
| 1927 | optional int64 encoding_interval_nanos = 2; |
| 1928 | // Number of buffers dropped in this event |
| 1929 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 1930 | // Default: 0 |
| 1931 | optional int32 num_dropped_buffers = 3; |
| 1932 | // Number of encoded buffers dropped in this event |
| 1933 | // Default 0 |
| 1934 | optional int32 num_dropped_encoded_frames = 4; |
| 1935 | // Number of encoded bytes dropped in this event |
| 1936 | // Default: 0 |
| 1937 | optional int32 num_dropped_encoded_bytes = 5; |
| 1938 | } |
| 1939 | |
| 1940 | /** |
| 1941 | * Logs when we receive reports regarding a device's RSSI value |
| 1942 | * |
| 1943 | * Logged from: |
| 1944 | * system/bt |
| 1945 | */ |
| 1946 | message BluetoothDeviceRssiReported { |
| 1947 | // An identifier that can be used to match events for this device. |
| 1948 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1949 | // Salt: Randomly generated 256 bit value |
| 1950 | // Hash algorithm: HMAC-SHA256 |
| 1951 | // Size: 32 byte |
| 1952 | // Default: null or empty if the device identifier is not known |
| 1953 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1954 | // Connection handle of this connection if available |
| 1955 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1956 | // Default: 0xFFFF if the handle is unknown |
| 1957 | optional int32 connection_handle = 2; |
| 1958 | // HCI command status code if this is triggerred by hci_cmd |
| 1959 | // Default: STATUS_UNKNOWN |
| 1960 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1961 | // BR/EDR |
| 1962 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 1963 | // Units: dB |
| 1964 | // LE: |
| 1965 | // Range: -127 to 20, 127 (signed integer) |
| 1966 | // Units: dBm |
| 1967 | // Invalid when an out of range value is reported |
| 1968 | optional int32 rssi = 4; |
| 1969 | } |
| 1970 | |
| 1971 | /** |
| 1972 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 1973 | * |
| 1974 | * Logged from: |
| 1975 | * system/bt |
| 1976 | */ |
| 1977 | message BluetoothDeviceFailedContactCounterReported { |
| 1978 | // An identifier that can be used to match events for this device. |
| 1979 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1980 | // Salt: Randomly generated 256 bit value |
| 1981 | // Hash algorithm: HMAC-SHA256 |
| 1982 | // Size: 32 byte |
| 1983 | // Default: null or empty if the device identifier is not known |
| 1984 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1985 | // Connection handle of this connection if available |
| 1986 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1987 | // Default: 0xFFFF if the handle is unknown |
| 1988 | optional int32 connection_handle = 2; |
| 1989 | // HCI command status code if this is triggerred by hci_cmd |
| 1990 | // Default: STATUS_UNKNOWN |
| 1991 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 1992 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 1993 | // Range: uint16_t, 0-0xFFFF |
| 1994 | // Default: 0xFFFFF |
| 1995 | optional int32 failed_contact_counter = 4; |
| 1996 | } |
| 1997 | |
| 1998 | /** |
| 1999 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 2000 | * |
| 2001 | * Logged from: |
| 2002 | * system/bt |
| 2003 | */ |
| 2004 | message BluetoothDeviceTxPowerLevelReported { |
| 2005 | // An identifier that can be used to match events for this device. |
| 2006 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2007 | // Salt: Randomly generated 256 bit value |
| 2008 | // Hash algorithm: HMAC-SHA256 |
| 2009 | // Size: 32 byte |
| 2010 | // Default: null or empty if the device identifier is not known |
| 2011 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2012 | // Connection handle of this connection if available |
| 2013 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2014 | // Default: 0xFFFF if the handle is unknown |
| 2015 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2016 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2017 | // Default: STATUS_UNKNOWN |
| 2018 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2019 | // Range: -30 ≤ N ≤ 20 |
| 2020 | // Units: dBm |
| 2021 | // Invalid when an out of range value is reported |
| 2022 | optional int32 transmit_power_level = 4; |
| 2023 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 2024 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 2025 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2026 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 2027 | * receiving an HCI command from the host |
| 2028 | * |
| 2029 | * Logged from: system/bt |
| 2030 | */ |
| 2031 | message BluetoothHciTimeoutReported { |
| 2032 | // HCI command associated with this event |
| 2033 | // Default: CMD_UNKNOWN |
| 2034 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 2035 | } |
| 2036 | |
| 2037 | /** |
| 2038 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 2039 | * See Android Bluetooth HCI specification for more details |
| 2040 | * |
| 2041 | * Note: all count and bytes field are counted since last event |
| 2042 | * |
| 2043 | * Logged from: system/bt |
| 2044 | */ |
| 2045 | message BluetoothQualityReportReported { |
| 2046 | // Quality report ID |
| 2047 | // Original type: uint8_t |
| 2048 | // Default: BQR_ID_UNKNOWN |
| 2049 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 2050 | // Packet type of the connection |
| 2051 | // Original type: uint8_t |
| 2052 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 2053 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 2054 | // Connection handle of the connection |
| 2055 | // Original type: uint16_t |
| 2056 | optional int32 connection_handle = 3; |
| 2057 | // Performing Role for the connection |
| 2058 | // Original type: uint8_t |
| 2059 | optional int32 connection_role = 4; |
| 2060 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 2061 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 2062 | // Original type: uint8_t |
| 2063 | optional int32 tx_power_level = 5; |
| 2064 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 2065 | // absolute receiver signal strength value |
| 2066 | // Original type: int8_t |
| 2067 | optional int32 rssi = 6; |
| 2068 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 2069 | // channels used by the link currently |
| 2070 | // Original type: uint8_t |
| 2071 | optional int32 snr = 7; |
| 2072 | // Indicates the number of unused channels in AFH_channel_map |
| 2073 | // Original type: uint8_t |
| 2074 | optional int32 unused_afh_channel_count = 8; |
| 2075 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2076 | // selected for AFH |
| 2077 | // Original type: uint8_t |
| 2078 | optional int32 afh_select_unideal_channel_count = 9; |
| 2079 | // Current Link Supervision Timeout Setting |
| 2080 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2081 | // Original type: uint16_t |
| 2082 | optional int32 lsto = 10; |
| 2083 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2084 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2085 | // 0x01 (Piconet Clock) |
| 2086 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2087 | // Original type: uint32_t |
| 2088 | optional int64 connection_piconet_clock = 11; |
| 2089 | // The count of retransmission |
| 2090 | // Original type: uint32_t |
| 2091 | optional int64 retransmission_count = 12; |
| 2092 | // The count of no RX |
| 2093 | // Original type: uint32_t |
| 2094 | optional int64 no_rx_count = 13; |
| 2095 | // The count of NAK (Negative Acknowledge) |
| 2096 | // Original type: uint32_t |
| 2097 | optional int64 nak_count = 14; |
| 2098 | // Controller timestamp of last TX ACK |
| 2099 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2100 | // Original type: uint32_t |
| 2101 | optional int64 last_tx_ack_timestamp = 15; |
| 2102 | // The count of Flow-off (STOP) |
| 2103 | // Original type: uint32_t |
| 2104 | optional int64 flow_off_count = 16; |
| 2105 | // Controller timestamp of last Flow-on (GO) |
| 2106 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2107 | // Original type: uint32_t |
| 2108 | optional int64 last_flow_on_timestamp = 17; |
| 2109 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2110 | // Original type: uint32_t |
| 2111 | optional int64 buffer_overflow_bytes = 18; |
| 2112 | // Buffer underflow count (in byte) since last event |
| 2113 | // Original type: uint32_t |
| 2114 | optional int64 buffer_underflow_bytes = 19; |
| 2115 | } |
| 2116 | |
| 2117 | /** |
| 2118 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2119 | * |
| 2120 | * Notes: |
| 2121 | * - Each event can be partially filled as we might learn different pieces of device |
| 2122 | * information at different time |
| 2123 | * - Multiple device info events can be combined to give more complete picture |
| 2124 | * - When multiple device info events tries to describe the same information, the |
| 2125 | * later one wins |
| 2126 | * |
| 2127 | * Logged from: |
| 2128 | * packages/apps/Bluetooth |
| 2129 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2130 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2131 | // An identifier that can be used to match events for this device. |
| 2132 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2133 | // Salt: Randomly generated 256 bit value |
| 2134 | // Hash algorithm: HMAC-SHA256 |
| 2135 | // Size: 32 byte |
| 2136 | // Default: null or empty if the device identifier is not known |
| 2137 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2138 | // Where is this device info obtained from |
| 2139 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2140 | // Name of the data source |
| 2141 | // For EXTERNAL: package name of the data source |
| 2142 | // For INTERNAL: null for general case, component name otherwise |
| 2143 | optional string source_name = 3; |
| 2144 | // Name of the manufacturer of this device |
| 2145 | optional string manufacturer = 4; |
| 2146 | // Model of this device |
| 2147 | optional string model = 5; |
| 2148 | // Hardware version of this device |
| 2149 | optional string hardware_version = 6; |
| 2150 | // Software version of this device |
| 2151 | optional string software_version = 7; |
| 2152 | } |
| 2153 | |
| 2154 | /** |
| 2155 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2156 | * device, as documented by the Bluetooth Core HCI specification |
| 2157 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2158 | * Vol 2, Part E, Page 1118 |
| 2159 | * |
| 2160 | * Logged from: |
| 2161 | * system/bt |
| 2162 | */ |
| 2163 | message BluetoothRemoteVersionInfoReported { |
| 2164 | // Connection handle of the connection |
| 2165 | // Original type: uint16_t |
| 2166 | optional int32 connection_handle = 1; |
| 2167 | // HCI command status code |
| 2168 | // Default: STATUS_UNKNOWN |
| 2169 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2170 | // 1 byte Version of current LMP in the remote controller |
| 2171 | optional int32 lmp_version = 3; |
| 2172 | // 2 bytes LMP manufacturer code of the remote controller |
| 2173 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2174 | optional int32 lmp_manufacturer_code = 4; |
| 2175 | // 4 bytes subversion of the LMP in the remote controller |
| 2176 | optional int32 lmp_subversion = 5; |
| 2177 | } |
| 2178 | |
| 2179 | /** |
| 2180 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2181 | * Constant definitions are from: |
| 2182 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2183 | * |
| 2184 | * Current logged attributes: |
| 2185 | * - BluetoothProfileDescriptorList |
| 2186 | * - Supported Features Bitmask |
| 2187 | * |
| 2188 | * Logged from: |
| 2189 | * system/bt |
| 2190 | */ |
| 2191 | message BluetoothSdpAttributeReported { |
| 2192 | // An identifier that can be used to match events for this device. |
| 2193 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2194 | // Salt: Randomly generated 256 bit value |
| 2195 | // Hash algorithm: HMAC-SHA256 |
| 2196 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2197 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2198 | // Original type: uint16_t |
| 2199 | optional int32 protocol_uuid = 2; |
| 2200 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2201 | // Original type: uint16_t |
| 2202 | optional int32 attribute_id = 3; |
| 2203 | // Attribute value for the particular attribute |
| 2204 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2205 | } |
| 2206 | |
| 2207 | /** |
| 2208 | * Logs when bond state of a Bluetooth device changes |
| 2209 | * |
| 2210 | * Logged from: |
| 2211 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2212 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2213 | */ |
| 2214 | message BluetoothBondStateChanged { |
| 2215 | // An identifier that can be used to match events for this device. |
| 2216 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2217 | // Salt: Randomly generated 256 bit value |
| 2218 | // Hash algorithm: HMAC-SHA256 |
| 2219 | // Size: 32 byte |
| 2220 | // Default: null or empty if the device identifier is not known |
| 2221 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2222 | // Preferred transport type to remote dual mode device |
| 2223 | // Default: TRANSPORT_AUTO means no preference |
| 2224 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2225 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2226 | // Default: UNKNOWN |
| 2227 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2228 | // Current bond state (NONE, BONDING, BONDED) |
| 2229 | // Default: BOND_STATE_UNKNOWN |
| 2230 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2231 | // Bonding sub state |
| 2232 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2233 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2234 | // Unbond Reason |
| 2235 | // Default: UNBOND_REASON_UNKNOWN |
| 2236 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
| 2237 | } |
| 2238 | |
| 2239 | /** |
| 2240 | * Logs there is an event related Bluetooth classic pairing |
| 2241 | * |
| 2242 | * Logged from: |
| 2243 | * system/bt |
| 2244 | */ |
| 2245 | message BluetoothClassicPairingEventReported { |
| 2246 | // An identifier that can be used to match events for this device. |
| 2247 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2248 | // Salt: Randomly generated 256 bit value |
| 2249 | // Hash algorithm: HMAC-SHA256 |
| 2250 | // Size: 32 byte |
| 2251 | // Default: null or empty if the device identifier is not known |
| 2252 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2253 | // Connection handle of this connection if available |
| 2254 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2255 | // Default: 0xFFFF if the handle is unknown |
| 2256 | optional int32 connection_handle = 2; |
| 2257 | // HCI command associated with this event |
| 2258 | // Default: CMD_UNKNOWN |
| 2259 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2260 | // HCI event associated with this event |
| 2261 | // Default: EVT_UNKNOWN |
| 2262 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2263 | // HCI command status code if this is triggerred by hci_cmd |
| 2264 | // Default: STATUS_UNKNOWN |
| 2265 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2266 | // HCI reason code associated with this event |
| 2267 | // Default: STATUS_UNKNOWN |
| 2268 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2269 | // A status value related to this specific event |
| 2270 | // Default: 0 |
| 2271 | optional int64 event_value = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2272 | } |
| 2273 | |
| 2274 | /** |
| 2275 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2276 | * |
| 2277 | * Logged from: |
| 2278 | * system/bt |
| 2279 | */ |
| 2280 | message BluetoothSmpPairingEventReported { |
| 2281 | // An identifier that can be used to match events for this device. |
| 2282 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2283 | // Salt: Randomly generated 256 bit value |
| 2284 | // Hash algorithm: HMAC-SHA256 |
| 2285 | // Size: 32 byte |
| 2286 | // Default: null or empty if the device identifier is not known |
| 2287 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2288 | // SMP command sent or received over L2CAP |
| 2289 | // Default: CMD_UNKNOWN |
| 2290 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2291 | // Whether this command is sent or received |
| 2292 | // Default: DIRECTION_UNKNOWN |
| 2293 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2294 | // SMP failure reason code |
| 2295 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2296 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
| 2297 | } |
| 2298 | |
| 2299 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2300 | * Logs when a Bluetooth socket’s connection state changed |
| 2301 | * |
| 2302 | * Logged from: |
| 2303 | * system/bt |
| 2304 | */ |
| 2305 | message BluetoothSocketConnectionStateChanged { |
| 2306 | // An identifier that can be used to match events for this device. |
| 2307 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2308 | // Salt: Randomly generated 256 bit value |
| 2309 | // Hash algorithm: HMAC-SHA256 |
| 2310 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2311 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2312 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2313 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2314 | // Default 0 when unknown or don't care |
| 2315 | optional int32 port = 2; |
| 2316 | // Socket type as mentioned in |
| 2317 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2318 | // Default: SOCKET_TYPE_UNKNOWN |
| 2319 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2320 | // Socket connection state |
| 2321 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2322 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2323 | // Number of bytes sent to remote device during this connection |
| 2324 | optional int64 tx_bytes = 5; |
| 2325 | // Number of bytes received from remote device during this connection |
| 2326 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2327 | // Socket owner's UID |
| 2328 | optional int32 uid = 7 [(is_uid) = true]; |
| 2329 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2330 | // |port| must be spawned by |server_port| |
| 2331 | // Default 0 when unknown or don't care |
| 2332 | optional int32 server_port = 8; |
| 2333 | // Whether this is a server listener socket |
| 2334 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2335 | } |
| 2336 | |
| 2337 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2338 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2339 | * |
| 2340 | * Logged from: |
| 2341 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2342 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2343 | * |
| 2344 | */ |
| 2345 | message BluetoothClassOfDeviceReported { |
| 2346 | // An identifier that can be used to match events for this device. |
| 2347 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2348 | // Salt: Randomly generated 256 bit value |
| 2349 | // Hash algorithm: HMAC-SHA256 |
| 2350 | // Size: 32 byte |
| 2351 | // Default: null or empty if this is a server listener socket |
| 2352 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2353 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2354 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2355 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2356 | // Default: 0 |
| 2357 | optional int32 class_of_device = 2; |
| 2358 | } |
| 2359 | |
| 2360 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2361 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2362 | * |
| 2363 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2364 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2365 | */ |
| 2366 | message UsbConnectorStateChanged { |
| 2367 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2368 | STATE_DISCONNECTED = 0; |
| 2369 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2370 | } |
| 2371 | optional State state = 1; |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2372 | optional string id = 2; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2373 | // Last active session in ms. |
| 2374 | // 0 when the port is in connected state. |
| 2375 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2376 | } |
| 2377 | |
| 2378 | /** |
| 2379 | * Logs the reported speaker impedance. |
| 2380 | * |
| 2381 | * Logged from: |
| 2382 | * Vendor audio implementation. |
| 2383 | */ |
| 2384 | message SpeakerImpedanceReported { |
| 2385 | optional int32 speaker_location = 1; |
| 2386 | optional int32 impedance = 2; |
| 2387 | } |
| 2388 | |
| 2389 | /** |
| 2390 | * Logs the report of a failed hardware. |
| 2391 | * |
| 2392 | * Logged from: |
| 2393 | * Vendor HALs. |
| 2394 | * |
| 2395 | */ |
| 2396 | message HardwareFailed { |
| 2397 | enum HardwareType { |
| 2398 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2399 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2400 | HARDWARE_FAILED_CODEC = 2; |
| 2401 | HARDWARE_FAILED_SPEAKER = 3; |
| 2402 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2403 | } |
| 2404 | optional HardwareType hardware_type = 1; |
| 2405 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2406 | /** |
| 2407 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2408 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2409 | * referring to board-specific numbering schemes. |
| 2410 | */ |
| 2411 | optional int32 hardware_location = 2; |
| 2412 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2413 | /** |
| 2414 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2415 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2416 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2417 | enum HardwareErrorCode { |
| 2418 | UNKNOWN = 0; |
| 2419 | COMPLETE = 1; |
| 2420 | SPEAKER_HIGH_Z = 2; |
| 2421 | SPEAKER_SHORT = 3; |
| 2422 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2423 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2424 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2425 | } |
| 2426 | optional int32 failure_code = 3; |
| 2427 | } |
| 2428 | |
| 2429 | /** |
| 2430 | * Log an event when the device has been physically dropped. |
| 2431 | * Reported from the /vendor partition. |
| 2432 | */ |
| 2433 | message PhysicalDropDetected { |
| 2434 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2435 | optional int32 confidence_pctg = 1; |
| 2436 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2437 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2438 | // Duration of freefall in ms |
| 2439 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2440 | } |
| 2441 | |
| 2442 | /** |
| 2443 | * Log bucketed battery charge cycles. |
| 2444 | * |
| 2445 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2446 | * a given charge point. For example, if 10 cycle buckets are |
| 2447 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2448 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2449 | * |
| 2450 | * Logged from: |
| 2451 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2452 | */ |
| 2453 | message ChargeCyclesReported { |
| 2454 | optional int32 cycle_bucket_1 = 1; |
| 2455 | optional int32 cycle_bucket_2 = 2; |
| 2456 | optional int32 cycle_bucket_3 = 3; |
| 2457 | optional int32 cycle_bucket_4 = 4; |
| 2458 | optional int32 cycle_bucket_5 = 5; |
| 2459 | optional int32 cycle_bucket_6 = 6; |
| 2460 | optional int32 cycle_bucket_7 = 7; |
| 2461 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2462 | optional int32 cycle_bucket_9 = 9; |
| 2463 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2464 | } |
| 2465 | |
| 2466 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2467 | * Log battery health snapshot. |
| 2468 | * |
| 2469 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2470 | * are snapshotted periodically over 24hrs. |
| 2471 | */ |
| 2472 | message BatteryHealthSnapshot { |
| 2473 | enum BatterySnapshotType { |
| 2474 | UNKNOWN = 0; |
| 2475 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2476 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2477 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2478 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2479 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2480 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2481 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2482 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2483 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2484 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2485 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2486 | } |
| 2487 | optional BatterySnapshotType type = 1; |
| 2488 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2489 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2490 | // Voltage Battery Voltage, in microVolts. |
| 2491 | optional int32 voltage_micro_volt = 3; |
| 2492 | // Current Battery current, in microAmps. |
| 2493 | optional int32 current_micro_amps = 4; |
| 2494 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2495 | optional int32 open_circuit_micro_volt = 5; |
| 2496 | // Resistance Battery Resistance, in microOhms. |
| 2497 | optional int32 resistance_micro_ohm = 6; |
| 2498 | // Level Battery Level, as % of full. |
| 2499 | optional int32 level_percent = 7; |
| 2500 | } |
| 2501 | |
| 2502 | /** |
| 2503 | * Log slow I/O operations on the primary storage. |
| 2504 | */ |
| 2505 | message SlowIo { |
| 2506 | // Classifications of IO Operations. |
| 2507 | enum IoOperation { |
| 2508 | UNKNOWN = 0; |
| 2509 | READ = 1; |
| 2510 | WRITE = 2; |
| 2511 | UNMAP = 3; |
| 2512 | SYNC = 4; |
| 2513 | } |
| 2514 | optional IoOperation operation = 1; |
| 2515 | |
| 2516 | // The number of slow IO operations of this type over 24 hours. |
| 2517 | optional int32 count = 2; |
| 2518 | } |
| 2519 | |
| 2520 | /** |
| 2521 | * Log battery caused shutdown with the last recorded voltage. |
| 2522 | */ |
| 2523 | message BatteryCausedShutdown { |
| 2524 | // The last recorded battery voltage prior to shutdown. |
| 2525 | optional int32 last_recorded_micro_volt = 1; |
| 2526 | } |
| 2527 | |
| 2528 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2529 | * Logs when ThermalService receives throttling events. |
| 2530 | * |
| 2531 | * Logged from: |
| 2532 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2533 | */ |
| 2534 | message ThermalThrottlingSeverityStateChanged { |
| 2535 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2536 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2537 | |
| 2538 | // The name of the temperature source. Eg. CPU0 |
| 2539 | optional string sensor_name = 2; |
| 2540 | |
| 2541 | // Temperature in tenths of a degree C. |
| 2542 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2543 | optional int32 temperature_deci_celsius = 3; |
| 2544 | |
| 2545 | // Relative severity of the throttling, see enum definition. |
| 2546 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2547 | } |
| 2548 | |
| 2549 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2550 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2551 | * |
| 2552 | * Logged from: |
| 2553 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2554 | */ |
| 2555 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2556 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2557 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2558 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2559 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2560 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2561 | } |
| 2562 | |
| 2563 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2564 | * Logs phone signal strength changes. |
| 2565 | * |
| 2566 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2567 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2568 | */ |
| 2569 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2570 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2571 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2572 | } |
| 2573 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2574 | |
| 2575 | /** |
| 2576 | * Logs when the phone state, sim state or signal strength changes |
| 2577 | * |
| 2578 | * Logged from: |
| 2579 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2580 | */ |
| 2581 | message PhoneServiceStateChanged { |
| 2582 | optional android.telephony.ServiceStateEnum state = 1; |
| 2583 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2584 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2585 | } |
| 2586 | |
| 2587 | /** |
| 2588 | * Logs when the phone becomes on or off. |
| 2589 | * |
| 2590 | * Logged from: |
| 2591 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2592 | */ |
| 2593 | message PhoneStateChanged { |
| 2594 | enum State { |
| 2595 | OFF = 0; |
| 2596 | ON = 1; |
| 2597 | } |
| 2598 | optional State state = 1; |
| 2599 | } |
| 2600 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2601 | message BackGesture { |
| 2602 | enum BackType { |
| 2603 | DEFAULT_BACK_TYPE = 0; |
| 2604 | COMPLETED = 1; |
| 2605 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 2606 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 2607 | INCOMPLETE = 4; |
| 2608 | } |
| 2609 | optional BackType type = 1; |
| 2610 | |
| 2611 | optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event |
| 2612 | enum WindowHorizontalLocation { |
| 2613 | DEFAULT_LOCATION = 0; |
| 2614 | LEFT = 1; |
| 2615 | RIGHT = 2; |
| 2616 | } |
| 2617 | optional WindowHorizontalLocation x_location = 3; |
| 2618 | } |
| 2619 | |
| 2620 | message ExclusionRectStateChanged { |
| 2621 | optional string component_name = 1; // if not available, simply packageName |
| 2622 | optional int32 requested_height = 2; // px |
| 2623 | optional int32 rejected_height = 3; // px |
| 2624 | |
| 2625 | enum WindowHorizontalLocation { |
| 2626 | DEFAULT_LOCATION = 0; |
| 2627 | LEFT = 1; |
| 2628 | RIGHT = 2; |
| 2629 | } |
| 2630 | optional WindowHorizontalLocation x_location = 4; |
| 2631 | optional bool landscape = 5; |
| 2632 | optional bool splitscreen = 6; |
| 2633 | optional int32 duration_millis = 7; |
| 2634 | } |
| 2635 | |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2636 | message LauncherUIChanged { |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 2637 | optional android.stats.launcher.LauncherAction action = 1; |
| 2638 | optional android.stats.launcher.LauncherState src_state = 2; |
| 2639 | optional android.stats.launcher.LauncherState dst_state = 3; |
| 2640 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES]; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2641 | optional bool is_swipe_up_enabled = 5; |
| 2642 | } |
| 2643 | |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2644 | message StyleUIChanged { |
| 2645 | optional android.stats.style.Action action = 1; |
| 2646 | optional int32 color_package_hash = 2; |
| 2647 | optional int32 font_package_hash = 3; |
| 2648 | optional int32 shape_package_hash = 4; |
| 2649 | optional int32 clock_package_hash = 5; |
| 2650 | optional int32 launcher_grid = 6; |
| 2651 | optional int32 wallpaper_category_hash = 7; |
| 2652 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 2653 | optional int32 color_preference = 9; |
| 2654 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2655 | } |
| 2656 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2657 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2658 | * Logs when Settings UI has changed. |
| 2659 | * |
| 2660 | * Logged from: |
| 2661 | * packages/apps/Settings |
| 2662 | */ |
| 2663 | message SettingsUIChanged { |
| 2664 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2665 | * Where this SettingsUIChange event comes from. For example, if |
| 2666 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 2667 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2668 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2669 | |
| 2670 | /** |
| 2671 | * What the UI action is. |
| 2672 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2673 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2674 | |
| 2675 | /** |
| 2676 | * Where the action is happening |
| 2677 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2678 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2679 | |
| 2680 | /** |
| 2681 | * What preference changed in this event. |
| 2682 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2683 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2684 | |
| 2685 | /** |
| 2686 | * The new value of the changed preference. |
| 2687 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2688 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2689 | } |
| 2690 | |
| 2691 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2692 | * Logs basic timing information about touch events. |
| 2693 | * Reported at most every 5 minutes while device is being interacted with. |
| 2694 | * |
| 2695 | * Logged from: |
| 2696 | * frameworks/native/services/inputflinger |
| 2697 | */ |
| 2698 | message TouchEventReported { |
| 2699 | /** |
| 2700 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2701 | * and the standard deviation of the time spent processing touchscreen events |
| 2702 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2703 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2704 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 2705 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 2706 | * the kernel's input event subsystem upon receipt of the input event. |
| 2707 | * The ending point is taken inside InputDispatcher, just after the input event |
| 2708 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2709 | */ |
| 2710 | // Minimum value |
| 2711 | optional float latency_min_micros = 1; |
| 2712 | // Maximum value |
| 2713 | optional float latency_max_micros = 2; |
| 2714 | // Average value |
| 2715 | optional float latency_mean_micros = 3; |
| 2716 | // Standard deviation |
| 2717 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 2718 | // Number of touch events (input_event) in this report |
| 2719 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2720 | } |
| 2721 | |
| 2722 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 2723 | * Logs gesture classification and timing information for touch events. |
| 2724 | * |
| 2725 | * Logged from: |
| 2726 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 2727 | * frameworks/base/core/java/android/view/View.java |
| 2728 | */ |
| 2729 | message TouchGestureClassified { |
| 2730 | // The source of the classification (e.g. Java class name). |
| 2731 | optional string source = 1; |
| 2732 | |
| 2733 | enum Classification { |
| 2734 | UNKNOWN_CLASSIFICATION = 0; |
| 2735 | SINGLE_TAP = 1; |
| 2736 | DOUBLE_TAP = 2; |
| 2737 | LONG_PRESS = 3; |
| 2738 | DEEP_PRESS = 4; |
| 2739 | SCROLL = 5; |
| 2740 | } |
| 2741 | // The classification of the gesture. |
| 2742 | optional Classification classification = 2; |
| 2743 | |
| 2744 | // The interval from the start of a touch event stream until the |
| 2745 | // classification was made. |
| 2746 | optional int32 latency_millis = 3; |
| 2747 | |
| 2748 | // The distance from the location of the first touch event to the |
| 2749 | // location of the touch event when the classification was made. |
| 2750 | optional float displacement_px = 4; |
| 2751 | } |
| 2752 | |
| 2753 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2754 | * Logs that a setting was updated. |
| 2755 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2756 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2757 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 2758 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 2759 | */ |
| 2760 | message SettingChanged { |
| 2761 | // The name of the setting. |
| 2762 | optional string setting = 1; |
| 2763 | |
| 2764 | // The change being imposed on this setting. May represent a number, eg "3". |
| 2765 | optional string value = 2; |
| 2766 | |
| 2767 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 2768 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 2769 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 2770 | // The +/- feature is currently only used for location_providers_allowed. |
| 2771 | optional string new_value = 3; |
| 2772 | |
| 2773 | // The previous value of this setting. |
| 2774 | optional string prev_value = 4; |
| 2775 | |
| 2776 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 2777 | optional string tag = 5; |
| 2778 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 2779 | // True if this setting with tag should be resettable. |
| 2780 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2781 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2782 | // 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] | 2783 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2784 | |
| 2785 | enum ChangeReason { |
| 2786 | UPDATED = 1; // Updated can be an insertion or an update. |
| 2787 | DELETED = 2; |
| 2788 | } |
| 2789 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2790 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 2791 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2792 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2793 | * Logs activity going to foreground or background |
| 2794 | * |
| 2795 | * Logged from: |
| 2796 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 2797 | */ |
| 2798 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2799 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 2800 | optional string pkg_name = 2; |
| 2801 | optional string class_name = 3; |
| 2802 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2803 | enum State { |
| 2804 | BACKGROUND = 0; |
| 2805 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2806 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2807 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2808 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2809 | |
| 2810 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 2811 | * Logs when a volume entered low Storage state. |
| 2812 | * Logged from: |
| 2813 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 2814 | */ |
| 2815 | message LowStorageStateChanged { |
| 2816 | // Volume that ran out of storage. |
| 2817 | optional string volume_description = 1; |
| 2818 | |
| 2819 | enum State { |
| 2820 | UNKNOWN = 0; |
| 2821 | OFF = 1; |
| 2822 | ON = 2; |
| 2823 | } |
| 2824 | optional State state = 2; |
| 2825 | } |
| 2826 | |
| 2827 | /** |
| 2828 | * Logs when an app is downgraded. |
| 2829 | * Logged from: |
| 2830 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2831 | */ |
| 2832 | message AppDowngraded { |
| 2833 | optional string package_name = 1; |
| 2834 | // Size of the package (all data) before being downgraded. |
| 2835 | optional int64 size_in_bytes_before = 2; |
| 2836 | // Size of the package (all data) after being downgraded. |
| 2837 | optional int64 size_in_bytes_after = 3; |
| 2838 | |
| 2839 | optional bool aggressive = 4; |
| 2840 | } |
| 2841 | |
| 2842 | /** |
| 2843 | * Logs when an app is optimized after being downgraded. |
| 2844 | * Logged from: |
| 2845 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2846 | */ |
| 2847 | message AppOptimizedAfterDowngraded { |
| 2848 | optional string package_name = 1; |
| 2849 | } |
| 2850 | |
| 2851 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 2852 | * Logs whenever an app is installed on external storage. |
| 2853 | * Logged from: |
| 2854 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 2855 | */ |
| 2856 | message AppInstallOnExternalStorageReported { |
| 2857 | // The type of external storage. |
| 2858 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 2859 | // The name of the package that is installed on the sd card. |
| 2860 | optional string package_name = 2; |
| 2861 | } |
| 2862 | |
| 2863 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2864 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2865 | * Logged from: |
| 2866 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2867 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2868 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2869 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2870 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2871 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2872 | |
| 2873 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2874 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2875 | optional string process_name = 3; |
| 2876 | |
| 2877 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2878 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2879 | |
| 2880 | optional string package_name = 5; |
| 2881 | |
| 2882 | enum InstantApp { |
| 2883 | UNAVAILABLE = 0; |
| 2884 | FALSE = 1; |
| 2885 | TRUE = 2; |
| 2886 | } |
| 2887 | optional InstantApp is_instant_app = 6; |
| 2888 | |
| 2889 | enum ForegroundState { |
| 2890 | UNKNOWN = 0; |
| 2891 | BACKGROUND = 1; |
| 2892 | FOREGROUND = 2; |
| 2893 | } |
| 2894 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2895 | |
| 2896 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2897 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2898 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2899 | /** |
| 2900 | * Logs when a WTF (What a Terrible Failure) happened. |
| 2901 | * Logged from: |
| 2902 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2903 | */ |
| 2904 | message WTFOccurred { |
| 2905 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2906 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2907 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2908 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2909 | // The name of the process. |
| 2910 | // system_server if it is not by an app |
| 2911 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2912 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2913 | // The pid if available. -1 means not available. |
| 2914 | optional sint32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2915 | |
| 2916 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2917 | } |
| 2918 | |
| 2919 | /** |
| 2920 | * Logs when system server reports low memory. |
| 2921 | * Logged from: |
| 2922 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2923 | */ |
| 2924 | message LowMemReported { |
| 2925 | } |
| 2926 | |
| 2927 | /** |
| 2928 | * Logs when an app ANR (App Not Responding) occurs. |
| 2929 | * Logged from: |
| 2930 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 2931 | */ |
| 2932 | message ANROccurred { |
| 2933 | optional int32 uid = 1 [(is_uid) = true]; |
| 2934 | |
| 2935 | optional string process_name = 2; |
| 2936 | |
| 2937 | optional string short_component_name = 3; |
| 2938 | |
| 2939 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2940 | |
| 2941 | enum InstantApp { |
| 2942 | UNAVAILABLE = 0; |
| 2943 | FALSE = 1; |
| 2944 | TRUE = 2; |
| 2945 | } |
| 2946 | optional InstantApp is_instant_app = 5; |
| 2947 | |
| 2948 | enum ForegroundState { |
| 2949 | UNKNOWN = 0; |
| 2950 | BACKGROUND = 1; |
| 2951 | FOREGROUND = 2; |
| 2952 | } |
| 2953 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2954 | |
| 2955 | optional android.server.ErrorSource error_source = 7; |
| 2956 | |
| 2957 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2958 | } |
| 2959 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 2960 | /** |
| 2961 | * Logs when the vibrator state changes. |
| 2962 | * Logged from: |
| 2963 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 2964 | */ |
| 2965 | message VibratorStateChanged { |
| 2966 | repeated AttributionNode attribution_node = 1; |
| 2967 | |
| 2968 | enum State { |
| 2969 | OFF = 0; |
| 2970 | ON = 1; |
| 2971 | } |
| 2972 | optional State state = 2; |
| 2973 | |
| 2974 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 2975 | // Only applicable for State == ON. |
| 2976 | optional int64 duration_millis = 3; |
| 2977 | } |
| 2978 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2979 | /* |
| 2980 | * Allows other apps to push events into statsd. |
| 2981 | * Logged from: |
| 2982 | * frameworks/base/core/java/android/util/StatsLog.java |
| 2983 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2984 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2985 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2986 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2987 | |
| 2988 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 2989 | optional int32 label = 2; |
| 2990 | |
| 2991 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 2992 | // predicates for the metrics). |
| 2993 | enum State { |
| 2994 | UNKNOWN = 0; |
| 2995 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 2996 | STOP = 2; |
| 2997 | START = 3; |
| 2998 | } |
| 2999 | optional State state = 3; |
| 3000 | } |
| 3001 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3002 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 3003 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 3004 | * For example, this could be due to the user manually changing the time. |
| 3005 | * |
| 3006 | * Logged from: |
| 3007 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 3008 | */ |
| 3009 | message WallClockTimeShifted { |
| 3010 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 3011 | optional int64 wall_clock_timestamp_millis = 1; |
| 3012 | } |
| 3013 | |
| 3014 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3015 | * Logs when statsd detects an anomaly. |
| 3016 | * |
| 3017 | * Logged from: |
| 3018 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 3019 | */ |
| 3020 | message AnomalyDetected { |
| 3021 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3022 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3023 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3024 | // Id of the config whose anomaly detection alert fired. |
| 3025 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3026 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3027 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 3028 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3029 | } |
| 3030 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3031 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3032 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3033 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3034 | |
| 3035 | // The app package name. |
| 3036 | optional string pkg_name = 2; |
| 3037 | |
| 3038 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3039 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3040 | WARM = 1; |
| 3041 | HOT = 2; |
| 3042 | COLD = 3; |
| 3043 | } |
| 3044 | // The transition type. |
| 3045 | optional TransitionType type = 3; |
| 3046 | |
| 3047 | // The activity name. |
| 3048 | optional string activity_name = 4; |
| 3049 | |
| 3050 | // The name of the calling app. Empty if not set. |
| 3051 | optional string calling_pkg_name = 5; |
| 3052 | |
| 3053 | // Whether the app is an instant app. |
| 3054 | optional bool is_instant_app = 6; |
| 3055 | |
| 3056 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3057 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3058 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 3059 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3060 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3061 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3062 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3063 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3064 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3065 | optional int32 bind_application_delay_millis = 11; |
| 3066 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3067 | |
| 3068 | // Empty if not set. |
| 3069 | optional string launch_token = 13; |
| 3070 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3071 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3072 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3073 | |
| 3074 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3075 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3076 | } |
| 3077 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3078 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3079 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3080 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3081 | |
| 3082 | // The app package name. |
| 3083 | optional string pkg_name = 2; |
| 3084 | |
| 3085 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3086 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3087 | WARM = 1; |
| 3088 | HOT = 2; |
| 3089 | COLD = 3; |
| 3090 | } |
| 3091 | // The transition type. |
| 3092 | optional TransitionType type = 3; |
| 3093 | |
| 3094 | // The activity name. |
| 3095 | optional string activity_name = 4; |
| 3096 | } |
| 3097 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3098 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 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]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3101 | |
| 3102 | // The app package name. |
| 3103 | optional string pkg_name = 2; |
| 3104 | |
| 3105 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3106 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3107 | WITH_BUNDLE = 1; |
| 3108 | WITHOUT_BUNDLE = 2; |
| 3109 | } |
| 3110 | // The transition type. |
| 3111 | optional TransitionType type = 3; |
| 3112 | |
| 3113 | // The activity name. |
| 3114 | optional string activity_name = 4; |
| 3115 | |
| 3116 | optional bool transition_process_running = 5; |
| 3117 | |
| 3118 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3119 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3120 | } |
| 3121 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3122 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3123 | * Logs a picture-in-picture action |
| 3124 | * Logged from: |
| 3125 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3126 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3127 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3128 | */ |
| 3129 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3130 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3131 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3132 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3133 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3134 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3135 | enum State { |
| 3136 | ENTERED = 1; |
| 3137 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3138 | MINIMIZED = 3; |
| 3139 | DISMISSED = 4; |
| 3140 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3141 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3142 | } |
| 3143 | |
| 3144 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3145 | * Logs overlay action |
| 3146 | * Logged from: |
| 3147 | * services/core/java/com/android/server/wm/Session.java |
| 3148 | */ |
| 3149 | message OverlayStateChanged { |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3150 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3151 | |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3152 | optional string package_name = 2 [(state_field_option).option = PRIMARY]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3153 | |
| 3154 | optional bool using_alert_window = 3; |
| 3155 | |
| 3156 | enum State { |
| 3157 | ENTERED = 1; |
| 3158 | EXITED = 2; |
| 3159 | } |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3160 | optional State state = 4 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3161 | } |
| 3162 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3163 | /* |
| 3164 | * Logs foreground service starts and stops. |
| 3165 | * Note that this is not when a service starts or stops, but when it is |
| 3166 | * considered foreground. |
| 3167 | * Logged from |
| 3168 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3169 | */ |
| 3170 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3171 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3172 | // package_name + "/" + class_name |
| 3173 | optional string short_name = 2; |
| 3174 | |
| 3175 | enum State { |
| 3176 | ENTER = 1; |
| 3177 | EXIT = 2; |
| 3178 | } |
| 3179 | optional State state = 3; |
| 3180 | } |
| 3181 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3182 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3183 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3184 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3185 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3186 | * |
| 3187 | * Logged from: |
| 3188 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3189 | */ |
| 3190 | message IsolatedUidChanged { |
| 3191 | // 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] | 3192 | // 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] | 3193 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3194 | optional int32 parent_uid = 1; |
| 3195 | |
| 3196 | optional int32 isolated_uid = 2; |
| 3197 | |
| 3198 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3199 | enum Event { |
| 3200 | REMOVED = 0; |
| 3201 | CREATED = 1; |
| 3202 | } |
| 3203 | optional Event event = 3; |
| 3204 | } |
| 3205 | |
| 3206 | /* |
| 3207 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3208 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3209 | * and processed by WakeupController.cpp. |
| 3210 | */ |
| 3211 | message PacketWakeupOccurred { |
| 3212 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3213 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3214 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3215 | // The interface name on which the packet was received. |
| 3216 | optional string iface = 2; |
| 3217 | // The ethertype value of the packet. |
| 3218 | optional int32 ethertype = 3; |
| 3219 | // String representation of the destination MAC address of the packet. |
| 3220 | optional string destination_hardware_address = 4; |
| 3221 | // String representation of the source address of the packet if this was an IP packet. |
| 3222 | optional string source_ip = 5; |
| 3223 | // String representation of the destination address of the packet if this was an IP packet. |
| 3224 | optional string destination_ip = 6; |
| 3225 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3226 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3227 | // families. |
| 3228 | optional int32 ip_next_header = 7; |
| 3229 | // The source port if this was a TCP or UDP packet. |
| 3230 | optional int32 source_port = 8; |
| 3231 | // The destination port if this was a TCP or UDP packet. |
| 3232 | optional int32 destination_port = 9; |
| 3233 | } |
| 3234 | |
| 3235 | /* |
| 3236 | * Logs the memory stats for an app on startup. |
| 3237 | * Logged from: |
| 3238 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3239 | */ |
| 3240 | message AppStartMemoryStateCaptured { |
| 3241 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3242 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3243 | |
| 3244 | // The process name. |
| 3245 | optional string process_name = 2; |
| 3246 | |
| 3247 | // The activity name. |
| 3248 | optional string activity_name = 3; |
| 3249 | |
| 3250 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3251 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3252 | |
| 3253 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3254 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3255 | |
| 3256 | // RSS |
| 3257 | optional int64 rss_in_bytes = 6; |
| 3258 | |
| 3259 | // CACHE |
| 3260 | optional int64 cache_in_bytes = 7; |
| 3261 | |
| 3262 | // SWAP |
| 3263 | optional int64 swap_in_bytes = 8; |
| 3264 | } |
| 3265 | |
| 3266 | /* |
| 3267 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3268 | * for LMK event. |
| 3269 | * Logged from: |
| 3270 | * system/core/lmkd/lmkd.c |
| 3271 | */ |
| 3272 | message LmkStateChanged { |
| 3273 | enum State { |
| 3274 | UNKNOWN = 0; |
| 3275 | START = 1; |
| 3276 | STOP = 2; |
| 3277 | } |
| 3278 | optional State state = 1; |
| 3279 | } |
| 3280 | |
| 3281 | /* |
| 3282 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3283 | * Logged from: |
| 3284 | * system/core/lmkd/lmkd.c |
| 3285 | */ |
| 3286 | message LmkKillOccurred { |
| 3287 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3288 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3289 | |
| 3290 | // The process name. |
| 3291 | optional string process_name = 2; |
| 3292 | |
| 3293 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3294 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3295 | |
| 3296 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3297 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3298 | |
| 3299 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3300 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3301 | |
| 3302 | // RSS |
| 3303 | optional int64 rss_in_bytes = 6; |
| 3304 | |
| 3305 | // CACHE |
| 3306 | optional int64 cache_in_bytes = 7; |
| 3307 | |
| 3308 | // SWAP |
| 3309 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3310 | |
| 3311 | // The elapsed real time of start of the process. |
| 3312 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3313 | |
| 3314 | // Min oom adj score considered by lmkd. |
| 3315 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3316 | } |
| 3317 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3318 | /* |
| 3319 | * Logs when the ActivityManagerService detects that an app died. |
| 3320 | * |
| 3321 | * Logged from: |
| 3322 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3323 | */ |
| 3324 | message AppDied { |
| 3325 | // timestamp(elapsedRealtime) of record creation |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 3326 | optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3327 | } |
| 3328 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3329 | /** |
| 3330 | * An atom for generic metrics logging. Available from Android Q. |
| 3331 | */ |
| 3332 | message GenericAtom { |
| 3333 | // The uid of the application that sent this custom atom. |
| 3334 | optional int32 uid = 1 [(is_uid) = true]; |
| 3335 | |
| 3336 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3337 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3338 | } |
| 3339 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3340 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3341 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3342 | * this button" or "this dialog was displayed". |
| 3343 | * Keep the UI event stream clean: don't use for system or background events. |
| 3344 | * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly. |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3345 | * |
| 3346 | * Logged from: |
| 3347 | * frameworks/base/services/core/java/com/android/server/ |
| 3348 | * frameworks/base/packages/SystemUI/src/com/android/systemui/ |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3349 | */ |
| 3350 | message UiEventReported { |
| 3351 | // The event_id. |
| 3352 | optional int32 event_id = 1; |
| 3353 | // The event's source or target uid and package, if applicable. |
| 3354 | // For example, the package posting a notification, or the destination package of a share. |
| 3355 | optional int32 uid = 2 [(is_uid) = true]; |
| 3356 | optional string package_name = 3; |
Will Brockman | 12282ac | 2019-12-20 09:37:42 -0500 | [diff] [blame] | 3357 | // An identifier used to disambiguate which logs refer to a particular instance of some |
| 3358 | // UI element. Useful when there might be multiple instances simultaneously active. |
| 3359 | optional int32 instance_id = 4; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3360 | } |
| 3361 | |
| 3362 | /** |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3363 | * Reports a notification was created or updated. |
| 3364 | * |
| 3365 | * Logged from: |
| 3366 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3367 | */ |
| 3368 | message NotificationReported { |
| 3369 | // The event_id (as for UiEventReported). |
| 3370 | optional int32 event_id = 1; |
| 3371 | // The notifying app's uid and package. |
| 3372 | optional int32 uid = 2 [(is_uid) = true]; |
| 3373 | optional string package_name = 3; |
| 3374 | // A small system-assigned identifier for the notification. |
| 3375 | // Locally probably-unique, but expect collisions across users and/or days. |
| 3376 | optional int32 instance_id = 4; |
| 3377 | // The app-assigned notification ID and tag |
| 3378 | optional int32 notification_id = 5; |
| 3379 | optional string notification_tag = 6; |
| 3380 | optional string channel_id = 7; // App-assigned channel ID |
| 3381 | |
| 3382 | // Grouping information |
| 3383 | optional string group_id = 8; // Group the notification currently belongs to |
| 3384 | optional int32 group_instance_id = 9; // Instance_id of the group-summary notification |
| 3385 | optional bool is_group_summary = 10; // Tags the group-summary notification |
| 3386 | |
| 3387 | // Attributes |
| 3388 | optional string category = 11; // App-assigned notification category (API-defined strings) |
| 3389 | optional int32 style = 12; // App-assigned notification style |
| 3390 | optional int32 num_people = 13; // Number of Person records attached to the notification |
| 3391 | |
| 3392 | // Ordering, importance and interruptiveness |
| 3393 | |
| 3394 | optional int32 position = 14; // Position in NotificationManager's list |
| 3395 | |
| 3396 | optional android.stats.sysui.NotificationImportance importance = 15; |
| 3397 | optional int32 alerting = 16; // Bitfield, 1=buzz 2=beep 4=blink |
| 3398 | |
| 3399 | enum NotificationImportanceExplanation { |
| 3400 | IMPORTANCE_EXPLANATION_UNKNOWN = 0; |
| 3401 | IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance. |
| 3402 | IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance. |
| 3403 | IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override. |
| 3404 | IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override. |
| 3405 | // Like _APP, but based on pre-channels priority signal. |
| 3406 | IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5; |
| 3407 | } |
| 3408 | |
| 3409 | optional NotificationImportanceExplanation importance_source = 17; |
| 3410 | optional android.stats.sysui.NotificationImportance importance_initial = 18; |
| 3411 | optional NotificationImportanceExplanation importance_initial_source = 19; |
| 3412 | optional android.stats.sysui.NotificationImportance importance_asst = 20; |
| 3413 | optional int32 assistant_hash = 21; |
| 3414 | optional float assistant_ranking_score = 22; |
| 3415 | } |
| 3416 | |
| 3417 | message Notification { |
| 3418 | // The notifying app's uid and package. |
| 3419 | optional int32 uid = 1 [(is_uid) = true]; |
| 3420 | optional string package_name = 2; |
| 3421 | // A small system-assigned identifier for the notification. |
| 3422 | optional int32 instance_id = 3; |
| 3423 | |
| 3424 | // Grouping information. |
| 3425 | optional int32 group_instance_id = 4; |
| 3426 | optional bool is_group_summary = 5; |
| 3427 | |
| 3428 | // The section of the shade that the notification is in. |
| 3429 | // See NotificationSectionsManager.PriorityBucket. |
| 3430 | enum NotificationSection { |
| 3431 | SECTION_UNKNOWN = 0; |
| 3432 | SECTION_PEOPLE = 1; |
| 3433 | SECTION_ALERTING = 2; |
| 3434 | SECTION_SILENT = 3; |
| 3435 | } |
| 3436 | optional NotificationSection section = 6; |
| 3437 | } |
| 3438 | |
| 3439 | message NotificationList { |
| 3440 | repeated Notification notifications = 1; // An ordered sequence of notifications. |
| 3441 | } |
| 3442 | |
| 3443 | /** |
| 3444 | * Reports a notification panel was displayed, e.g. from the lockscreen or status bar. |
| 3445 | * |
| 3446 | * Logged from: |
| 3447 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
| 3448 | */ |
| 3449 | message NotificationPanelReported { |
| 3450 | // The event_id (as for UiEventReported). |
| 3451 | optional int32 event_id = 1; |
| 3452 | optional int32 num_notifications = 2; |
| 3453 | // The notifications in the panel, in the order that they appear there. |
| 3454 | optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES]; |
| 3455 | } |
| 3456 | |
| 3457 | /** |
| 3458 | * Reports a notification channel, or channel group, was created, updated, or deleted. |
| 3459 | * |
| 3460 | * Logged from: |
| 3461 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3462 | */ |
| 3463 | message NotificationChannelModified { |
| 3464 | // The event_id (as for UiEventReported). |
| 3465 | optional int32 event_id = 1; |
| 3466 | // The notifying app's uid and package. |
| 3467 | optional int32 uid = 2 [(is_uid) = true]; |
| 3468 | optional string package_name = 3; |
| 3469 | // App-assigned notification channel ID or channel-group ID |
| 3470 | optional string channel_id = 4; |
| 3471 | // Previous importance setting, if applicable |
| 3472 | optional android.stats.sysui.NotificationImportance old_importance = 5; |
| 3473 | // New importance setting |
| 3474 | optional android.stats.sysui.NotificationImportance importance = 6; |
| 3475 | } |
| 3476 | |
| 3477 | |
| 3478 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3479 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3480 | * |
| 3481 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3482 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3483 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3484 | message BiometricAcquired { |
| 3485 | // Biometric modality that was acquired. |
| 3486 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3487 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 3488 | optional int32 user = 2; |
| 3489 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3490 | optional bool is_crypto = 3; |
| 3491 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 3492 | // authenticate. Other actions may indicate an error. |
| 3493 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3494 | // The client that this acquisition was received for. |
| 3495 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3496 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 3497 | optional int32 acquire_info = 6; |
| 3498 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 3499 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3500 | // Dictates if this message should trigger additional debugging. |
| 3501 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3502 | } |
| 3503 | |
| 3504 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3505 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3506 | * |
| 3507 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3508 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3509 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3510 | message BiometricAuthenticated { |
| 3511 | // Biometric modality that was used. |
| 3512 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3513 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3514 | optional int32 user = 2; |
| 3515 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 3516 | // storage. |
| 3517 | optional bool is_crypto = 3; |
| 3518 | // The client that this acquisition was received for. |
| 3519 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3520 | // If authentication requires user confirmation. See BiometricPrompt's |
| 3521 | // setRequireConfirmation(bool) method. |
| 3522 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3523 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3524 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3525 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3526 | REJECTED = 1; |
| 3527 | PENDING_CONFIRMATION = 2; |
| 3528 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3529 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3530 | |
| 3531 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3532 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3533 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 3534 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 3535 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 3536 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3537 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3538 | // Dictates if this message should trigger additional debugging. |
| 3539 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3540 | } |
| 3541 | |
| 3542 | /** |
| 3543 | * Logs when a biometric error occurs. |
| 3544 | * |
| 3545 | * Logged from: |
| 3546 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3547 | */ |
| 3548 | message BiometricErrorOccurred { |
| 3549 | // Biometric modality that was used. |
| 3550 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3551 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3552 | optional int32 user = 2; |
| 3553 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3554 | optional bool is_crypto = 3; |
| 3555 | // Action that the device is performing. |
| 3556 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3557 | // The client that this acquisition was received for. |
| 3558 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3559 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 3560 | // are unique to modality. |
| 3561 | optional int32 error_info = 6; |
| 3562 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 3563 | // by the vendor and not specified by the HIDL interface. |
| 3564 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3565 | // Dictates if this message should trigger additional debugging. |
| 3566 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 3567 | // Time spent during the authentication attempt. |
| 3568 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3569 | } |
| 3570 | |
| 3571 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3572 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3573 | * Logged from: |
| 3574 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3575 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3576 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3577 | // Biometric modality. |
| 3578 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3579 | // Type of issue detected. |
| 3580 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3581 | // Dictates if this message should trigger additional debugging. |
| 3582 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3583 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3584 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 3585 | /** |
| 3586 | * Logs when a biometric enrollment occurs. |
| 3587 | * |
| 3588 | * Logged from: |
| 3589 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3590 | */ |
| 3591 | message BiometricEnrolled { |
| 3592 | // Biometric modality that was used. |
| 3593 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3594 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3595 | optional int32 user = 2; |
| 3596 | // The amount of time the enrollment took in milliseconds. |
| 3597 | optional int64 latency_millis = 3; |
| 3598 | // Whether or not the enrollment was successful. |
| 3599 | optional bool success = 4; |
| 3600 | } |
| 3601 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3602 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3603 | * 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] | 3604 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3605 | message FlagFlipUpdateOccurred { |
| 3606 | // If the event is from a flag config package, specify the package name. |
| 3607 | optional string flag_flip_package_name = 1; |
| 3608 | |
| 3609 | // The order id of the package |
| 3610 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3611 | } |
| 3612 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3613 | /** |
| 3614 | * Potential experiment ids that goes with a train install. |
| 3615 | */ |
| 3616 | message TrainExperimentIds { |
| 3617 | repeated int64 experiment_id = 1; |
| 3618 | } |
| 3619 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3620 | /* |
| 3621 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3622 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3623 | */ |
| 3624 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3625 | // Name of the train. |
| 3626 | optional string train_name = 1; |
| 3627 | // Version code for a "train" of packages that need to be installed atomically |
| 3628 | optional int64 train_version_code = 2; |
| 3629 | // After installation of this package, device requires a restart. |
| 3630 | optional bool requires_staging = 3; |
| 3631 | // Rollback should be enabled for this install. |
| 3632 | optional bool rollback_enabled = 4; |
| 3633 | // Requires low latency monitoring if possible. |
| 3634 | optional bool requires_low_latency_monitor = 5; |
| 3635 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3636 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3637 | UNKNOWN = 0; |
| 3638 | INSTALL_REQUESTED = 1; |
| 3639 | INSTALL_STARTED = 2; |
| 3640 | INSTALL_STAGED_NOT_READY = 3; |
| 3641 | INSTALL_STAGED_READY = 4; |
| 3642 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3643 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 3644 | // and INSTALL_FAILURE_COMMIT. |
| 3645 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 3646 | // 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] | 3647 | INSTALL_CANCELLED = 7; |
| 3648 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 3649 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 3650 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 3651 | INSTALLER_ROLLBACK_STAGED = 11; |
| 3652 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 3653 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 3654 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 3655 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 3656 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 3657 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 3658 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 3659 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 3660 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 3661 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 3662 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3663 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 3664 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 3665 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 3666 | REBOOT_TRIGGERED = 26; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3667 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3668 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3669 | // Possible experiment ids for monitoring this push. |
| 3670 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 3671 | // user id |
| 3672 | optional int32 user_id = 8; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 3673 | optional int32 reason = 9; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3674 | } |
| 3675 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 3676 | /* Test atom, is not logged anywhere */ |
| 3677 | message TestAtomReported { |
| 3678 | repeated AttributionNode attribution_node = 1; |
| 3679 | optional int32 int_field = 2; |
| 3680 | optional int64 long_field = 3; |
| 3681 | optional float float_field = 4; |
| 3682 | optional string string_field = 5; |
| 3683 | optional bool boolean_field = 6; |
| 3684 | enum State { |
| 3685 | UNKNOWN = 0; |
| 3686 | OFF = 1; |
| 3687 | ON = 2; |
| 3688 | } |
| 3689 | optional State state = 7; |
| 3690 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 3691 | } |
| 3692 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 3693 | /** Represents USB port overheat event. */ |
| 3694 | message UsbPortOverheatEvent { |
| 3695 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 3696 | optional int32 plug_temperature_deci_c = 1; |
| 3697 | |
| 3698 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 3699 | optional int32 max_temperature_deci_c = 2; |
| 3700 | |
| 3701 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 3702 | optional int32 time_to_overheat_secs = 3; |
| 3703 | |
| 3704 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 3705 | optional int32 time_to_hysteresis_secs = 4; |
| 3706 | |
| 3707 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 3708 | optional int32 time_to_inactive_secs = 5; |
| 3709 | }; |
| 3710 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 3711 | /** |
| 3712 | * Logs total effective full charge and discharge cycles on a battery. |
| 3713 | * Here are some examples of one effective cycle: |
| 3714 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 3715 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 3716 | * Pulled from: |
| 3717 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3718 | */ |
| 3719 | message BatteryCycleCount { |
| 3720 | /* Number of total charge and discharge cycles on the system battery. */ |
| 3721 | optional int32 cycle_count = 1; |
| 3722 | } |
| 3723 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3724 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3725 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 3726 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3727 | * Pulled from: |
| 3728 | * StatsCompanionService |
| 3729 | */ |
| 3730 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3731 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3732 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3733 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3734 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3735 | PUBLIC = 1; |
| 3736 | PRIVATE = 2; |
| 3737 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3738 | } |
| 3739 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3740 | // The type of external storage. |
| 3741 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3742 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 3743 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3744 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3745 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3746 | } |
| 3747 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3748 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3749 | * Logs when a connection becomes available and lost. |
| 3750 | * Logged in StatsCompanionService.java |
| 3751 | */ |
| 3752 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3753 | // Id of the network. |
| 3754 | optional int32 net_id = 1; |
| 3755 | |
| 3756 | enum State { |
| 3757 | UNKNOWN = 0; |
| 3758 | CONNECTED = 1; |
| 3759 | DISCONNECTED = 2; |
| 3760 | } |
| 3761 | // Connected state of a network. |
| 3762 | optional State state = 2; |
| 3763 | } |
| 3764 | |
| 3765 | /** |
| 3766 | * Logs when a service starts and stops. |
| 3767 | * Logged from: |
| 3768 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3769 | */ |
| 3770 | message ServiceStateChanged { |
| 3771 | |
| 3772 | optional int32 uid = 1 [(is_uid) = true]; |
| 3773 | |
| 3774 | optional string package_name = 2; |
| 3775 | |
| 3776 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3777 | |
| 3778 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3779 | START = 1; |
| 3780 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3781 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3782 | |
| 3783 | optional State state = 4; |
| 3784 | } |
| 3785 | |
| 3786 | /** |
| 3787 | * Logs when a service is launched. |
| 3788 | * Logged from: |
| 3789 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3790 | */ |
| 3791 | message ServiceLaunchReported { |
| 3792 | |
| 3793 | optional int32 uid = 1 [(is_uid) = true]; |
| 3794 | |
| 3795 | optional string package_name = 2; |
| 3796 | |
| 3797 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3798 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3799 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 3800 | /** |
| 3801 | * Logs when a hidden API is used. |
| 3802 | * |
| 3803 | * Logged from: |
| 3804 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 3805 | */ |
| 3806 | message HiddenApiUsed { |
| 3807 | // The uid of the app making the hidden access. |
| 3808 | optional int32 uid = 1 [(is_uid) = true]; |
| 3809 | |
| 3810 | // Signature of the method or field accessed. |
| 3811 | optional string signature = 2; |
| 3812 | |
| 3813 | enum AccessMethod { |
| 3814 | NONE = 0; |
| 3815 | REFLECTION = 1; |
| 3816 | JNI = 2; |
| 3817 | LINKING = 3; |
| 3818 | } |
| 3819 | |
| 3820 | // Type of access. |
| 3821 | optional AccessMethod access_method = 3; |
| 3822 | |
| 3823 | // Whether the access was prevented or not. |
| 3824 | optional bool access_denied = 4; |
| 3825 | } |
| 3826 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3827 | /** |
| 3828 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 3829 | * - When user sees privacy chip |
| 3830 | * - When user clicks privacy chip |
| 3831 | * - How does the user exit the Privacy Dialog |
| 3832 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3833 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 3834 | */ |
| 3835 | message PrivacyIndicatorsInteracted { |
| 3836 | |
| 3837 | enum Type { |
| 3838 | UNKNOWN = 0; |
| 3839 | CHIP_VIEWED = 1; |
| 3840 | CHIP_CLICKED = 2; |
| 3841 | DIALOG_PRIVACY_SETTINGS = 3; |
| 3842 | DIALOG_DISMISS = 4; |
| 3843 | DIALOG_LINE_ITEM = 5; |
| 3844 | } |
| 3845 | |
| 3846 | optional Type type = 1 [(state_field_option).option = EXCLUSIVE]; |
| 3847 | |
| 3848 | // Used if the type is LINE_ITEM |
| 3849 | optional string package_name = 2; |
| 3850 | } |
| 3851 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 3852 | /** |
| 3853 | * Logs information about a package that is moved from the internal to external storage and vice |
| 3854 | * versa. |
| 3855 | * It logs the package name, the type of the external storage where the package is installed |
| 3856 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 3857 | * and the move type: if it's from internal to external or the other way around. |
| 3858 | * |
| 3859 | * Logged from: |
| 3860 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3861 | */ |
| 3862 | message AppMovedStorageReported { |
| 3863 | enum MoveType { |
| 3864 | UNKNOWN = 0; |
| 3865 | TO_EXTERNAL = 1; |
| 3866 | TO_INTERNAL = 2; |
| 3867 | } |
| 3868 | // The type of the external storage. |
| 3869 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 3870 | // The type of move. |
| 3871 | optional MoveType move_type = 2; |
| 3872 | // The name of the package that was moved. |
| 3873 | optional string package_name = 3; |
| 3874 | } |
| 3875 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 3876 | /** |
| 3877 | * Logs when system server watchdog occurs. |
| 3878 | * Logged from: |
| 3879 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 3880 | */ |
| 3881 | message SystemServerWatchdogOccurred { |
| 3882 | optional string subject = 1; |
| 3883 | } |
| 3884 | |
| 3885 | /** |
| 3886 | * Logs when new file added to tombstones. |
| 3887 | * Logged from: |
| 3888 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 3889 | */ |
| 3890 | message TombStoneOccurred { |
| 3891 | } |
| 3892 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 3893 | /* |
| 3894 | * Information about a role request |
| 3895 | * |
| 3896 | * Logged from: |
| 3897 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 3898 | */ |
| 3899 | message RoleRequestResultReported { |
| 3900 | // UID of application requesting the role |
| 3901 | optional int32 requesting_uid = 1; |
| 3902 | |
| 3903 | // Package name of application requesting the role |
| 3904 | optional string requesting_package_name = 2; |
| 3905 | |
| 3906 | // The role to be granted |
| 3907 | optional string role_name = 3; |
| 3908 | |
| 3909 | // The count of applications qualifying for the role |
| 3910 | optional int32 qualifying_count = 4; |
| 3911 | |
| 3912 | // UID of application current granted the role |
| 3913 | optional int32 current_uid = 5; |
| 3914 | |
| 3915 | // Package name of application current granted the role |
| 3916 | optional string current_package_name = 6; |
| 3917 | |
| 3918 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 3919 | // application |
| 3920 | optional int32 granted_another_uid = 7; |
| 3921 | |
| 3922 | // Package name of another application that user chose to grant the role to, instead of the |
| 3923 | // requesting application |
| 3924 | optional string granted_another_package_name = 8; |
| 3925 | |
| 3926 | enum Result { |
| 3927 | UNDEFINED = 0; |
| 3928 | // role request was ignored |
| 3929 | IGNORED = 1; |
| 3930 | // role request was ignored because it's already granted |
| 3931 | IGNORED_ALREADY_GRANTED = 2; |
| 3932 | // role request was ignored because the application isn't qualified |
| 3933 | IGNORED_NOT_QUALIFIED = 3; |
| 3934 | // role request was ignored because user said it should be always denied |
| 3935 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 3936 | // role was granted by user action |
| 3937 | USER_GRANTED = 5; |
| 3938 | // role was denied by user action |
| 3939 | USER_DENIED = 6; |
| 3940 | // role was denied by user granting another application the role |
| 3941 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 3942 | // role was denied and set to be always denied by the user |
| 3943 | USER_DENIED_WITH_ALWAYS = 8; |
| 3944 | } |
| 3945 | // The result of the role request |
| 3946 | optional Result result = 9; |
| 3947 | } |
| 3948 | |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 3949 | /** |
| 3950 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 3951 | * |
| 3952 | * Logged from: |
| 3953 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 3954 | */ |
| 3955 | message VmsClientConnectionStateChanged { |
| 3956 | // The UID of the VMS client app |
| 3957 | optional int32 uid = 1 [(is_uid) = true]; |
| 3958 | |
| 3959 | enum State { |
| 3960 | UNKNOWN = 0; |
| 3961 | // Attempting to connect to the client |
| 3962 | CONNECTING = 1; |
| 3963 | // Client connection established |
| 3964 | CONNECTED = 2; |
| 3965 | // Client connection closed unexpectedly |
| 3966 | DISCONNECTED = 3; |
| 3967 | // Client connection closed by VMS |
| 3968 | TERMINATED = 4; |
| 3969 | // Error establishing the client connection |
| 3970 | CONNECTION_ERROR = 5; |
| 3971 | } |
| 3972 | |
| 3973 | optional State state = 2; |
| 3974 | } |
| 3975 | |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 3976 | /** |
| 3977 | * Logs when MediaProvider has successfully finished scanning a storage volume. |
| 3978 | * |
| 3979 | * Logged from: |
| 3980 | * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java |
| 3981 | */ |
| 3982 | message MediaProviderScanEvent { |
| 3983 | enum Reason { |
| 3984 | // Scan triggered due to unknown reason |
| 3985 | UNKNOWN = 0; |
| 3986 | // Scan triggered due to storage volume being mounted |
| 3987 | MOUNTED = 1; |
| 3988 | // Scan triggered due to explicit user action or app request |
| 3989 | DEMAND = 2; |
| 3990 | // Scan triggered due to idle maintenance |
| 3991 | IDLE = 3; |
| 3992 | } |
| 3993 | |
| 3994 | // Volume type that this event pertains to |
| 3995 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3996 | // Reason why this scan was triggered |
| 3997 | optional Reason reason = 2; |
| 3998 | // Total number of files scanned |
| 3999 | optional int64 item_count = 3; |
| 4000 | // Duration of scan, normalized per file |
| 4001 | optional float normalized_duration_millis = 4; |
| 4002 | // Number of database inserts, normalized per file |
| 4003 | optional float normalized_insert_count = 5; |
| 4004 | // Number of database updates, normalized per file |
| 4005 | optional float normalized_update_count = 6; |
| 4006 | // Number of database deletes, normalized per file |
| 4007 | optional float normalized_delete_count = 7; |
| 4008 | } |
| 4009 | |
| 4010 | /** |
| 4011 | * Logs when an app has asked MediaProvider to delete media belonging to the user. |
| 4012 | * |
| 4013 | * Logged from: |
| 4014 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4015 | */ |
| 4016 | message MediaProviderDeletionEvent { |
| 4017 | // Volume type that this event pertains to |
| 4018 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4019 | // Device timestamp when this deletion event occurred |
| 4020 | optional int64 timestamp_millis = 2; |
| 4021 | // App that requested deletion |
| 4022 | optional string package_name = 3; |
| 4023 | // Number of items that were deleted |
| 4024 | optional int32 item_count = 4; |
| 4025 | } |
| 4026 | |
| 4027 | /** |
| 4028 | * Logs when an app has asked MediaProvider to grant them access to media belonging to the user. |
| 4029 | * |
| 4030 | * Logged from: |
| 4031 | * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java |
| 4032 | */ |
| 4033 | message MediaProviderPermissionEvent { |
| 4034 | enum Result { |
| 4035 | UNKNOWN = 0; |
| 4036 | USER_GRANTED = 1; |
| 4037 | AUTO_GRANTED = 2; |
| 4038 | USER_DENIED = 3; |
| 4039 | USER_DENIED_WITH_PREJUDICE = 4; |
| 4040 | AUTO_DENIED = 5; |
| 4041 | } |
| 4042 | |
| 4043 | // Volume type that this event pertains to |
| 4044 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4045 | // Device timestamp when this permission event occurred |
| 4046 | optional int64 timestamp_millis = 2; |
| 4047 | // App that requested permission |
| 4048 | optional string package_name = 3; |
| 4049 | // Number of items that were requested |
| 4050 | optional int32 item_count = 4; |
| 4051 | // Result of this request |
| 4052 | optional Result result = 5; |
| 4053 | } |
| 4054 | |
| 4055 | /** |
| 4056 | * Logs when MediaProvider has finished upgrading or downgrading its database schema. |
| 4057 | * |
| 4058 | * Logged from: |
| 4059 | * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java |
| 4060 | */ |
| 4061 | message MediaProviderSchemaChange { |
| 4062 | // Volume type that this event pertains to |
| 4063 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4064 | // Old database version code |
| 4065 | optional int32 version_from = 2; |
| 4066 | // New database version code |
| 4067 | optional int32 version_to = 3; |
| 4068 | // Total number of files in database |
| 4069 | optional int64 item_count = 4; |
| 4070 | // Duration of schema change, normalized per file |
| 4071 | optional float normalized_duration_millis = 5; |
| 4072 | } |
| 4073 | |
| 4074 | /** |
| 4075 | * Logs when MediaProvider has finished an idle maintenance job. |
| 4076 | * |
| 4077 | * Logged from: |
| 4078 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4079 | */ |
| 4080 | message MediaProviderIdleMaintenance { |
| 4081 | // Volume type that this event pertains to |
| 4082 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4083 | |
| 4084 | // Total number of files in database |
| 4085 | optional int64 item_count = 2; |
| 4086 | // Duration of idle maintenance, normalized per file |
| 4087 | optional float normalized_duration_millis = 3; |
| 4088 | // Number of thumbnails found to be stale, normalized per file |
| 4089 | optional float normalized_stale_thumbnails = 4; |
| 4090 | // Number of items found to be expired, normalized per file |
| 4091 | optional float normalized_expired_media = 5; |
| 4092 | } |
| 4093 | |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4094 | /** |
| 4095 | * Represents boot time event with duration in ms. |
| 4096 | * |
| 4097 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4098 | */ |
| 4099 | message BootTimeEventDuration { |
| 4100 | enum DurationEvent { |
| 4101 | UNKNOWN = 0; |
| 4102 | // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat. |
| 4103 | ABSOLUTE_BOOT_TIME = 1; |
| 4104 | // Bootloader's 1st stage execution time. |
| 4105 | // Logged from bootstat. |
| 4106 | BOOTLOADER_FIRST_STAGE_EXEC = 2; |
| 4107 | // Bootloader's 1st stage loading time. |
| 4108 | // Logged from bootstat. |
| 4109 | BOOTLOADER_FIRST_STAGE_LOAD = 3; |
| 4110 | // Bootloader's kernel loading time. |
| 4111 | // Logged from bootstat. |
| 4112 | BOOTLOADER_KERNEL_LOAD = 4; |
| 4113 | // Bootloader's 2nd stage execution time. |
| 4114 | // Logged from bootstat. |
| 4115 | BOOTLOADER_SECOND_STAGE_EXEC = 5; |
| 4116 | // Bootloader's 2nd stage loading time. |
| 4117 | // Logged from bootstat. |
| 4118 | BOOTLOADER_SECOND_STAGE_LOAD = 6; |
| 4119 | // Duration for Bootloader to show unlocked device's warning UI. This should not happen |
| 4120 | // for locked device. |
| 4121 | // Logged from bootstat. |
| 4122 | BOOTLOADER_UI_WAIT = 7; |
| 4123 | // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above. |
| 4124 | // Logged from bootstat. |
| 4125 | BOOTLOADER_TOTAL = 8; |
| 4126 | // Shutdown duration inside init for the reboot before the current boot up. |
| 4127 | // Logged from f/b/services/.../BootReceiver.java. |
| 4128 | SHUTDOWN_DURATION = 9; |
| 4129 | // Total time for mounting of disk devices during bootup. |
| 4130 | // Logged from f/b/services/.../BootReceiver.java. |
| 4131 | MOUNT_DEFAULT_DURATION = 10; |
| 4132 | // Total time for early stage mounting of disk devices during bootup. |
| 4133 | // Logged from f/b/services/.../BootReceiver.java. |
| 4134 | MOUNT_EARLY_DURATION = 11; |
| 4135 | // Total time for late stage mounting of disk devices during bootup. |
| 4136 | // Logged from f/b/services/.../BootReceiver.java. |
| 4137 | MOUNT_LATE_DURATION = 12; |
| 4138 | // Average time to scan non-system app after OTA |
| 4139 | // Logged from f/b/services/.../PackageManagerService.java |
| 4140 | OTA_PACKAGE_MANAGER_INIT_TIME = 13; |
| 4141 | // Time to initialize Package manager after OTA |
| 4142 | // Logged from f/b/services/.../PackageManagerService.java |
| 4143 | OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14; |
| 4144 | // Time to scan all system app from Package manager after OTA |
| 4145 | // Logged from f/b/services/.../PackageManagerService.java |
| 4146 | OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15; |
| 4147 | // Init's total time for cold boot stage. |
| 4148 | // Logged from bootstat. |
| 4149 | COLDBOOT_WAIT = 16; |
| 4150 | // Init's total time for initializing selinux. |
| 4151 | // Logged from bootstat. |
| 4152 | SELINUX_INIT = 17; |
| 4153 | // Time since last factory reset. |
| 4154 | // Logged from bootstat. |
| 4155 | FACTORY_RESET_TIME_SINCE_RESET = 18; |
| 4156 | } |
| 4157 | |
| 4158 | // Type of the event. |
| 4159 | optional DurationEvent event = 1; |
| 4160 | // Duration of the event in ms. |
| 4161 | optional int64 duration_millis = 2; |
| 4162 | } |
| 4163 | |
| 4164 | /** |
| 4165 | * Represents the start of specific boot time event during bootup in ms. This is usually a time |
| 4166 | * since boot-up. |
| 4167 | * |
| 4168 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4169 | */ |
| 4170 | message BootTimeEventElapsedTime { |
| 4171 | enum ElapsedTimeEvent { |
| 4172 | UNKNOWN = 0; |
| 4173 | // Time when init starts 1st stage. Logged from bootstat. |
| 4174 | ANDROID_INIT_STAGE_1 = 1; |
| 4175 | // Time when sys.boot_completed prop is set. |
| 4176 | // Logged from bootstat. |
| 4177 | BOOT_COMPLETE = 2; |
| 4178 | // BOOT_COMPLETE for encrypted device. |
| 4179 | BOOT_COMPLETE_ENCRYPTION = 3; |
| 4180 | // BOOT_COMPLETE for device with no encryption. |
| 4181 | BOOT_COMPLETE_NO_ENCRYPTION = 4; |
| 4182 | // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time. |
| 4183 | BOOT_COMPLETE_POST_DESCRYPT = 5; |
| 4184 | // BOOT_COMPLETE after factory reset. |
| 4185 | FACTORY_RESET_BOOT_COMPLETE = 6; |
| 4186 | // BOOT_COMPLETE_NO_ENCRYPTION after factory reset. |
| 4187 | FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7; |
| 4188 | // BOOT_COMPLETE_POST_DESCRYPT after factory reset. |
| 4189 | FACTORY_RESET_BOOT_COMPLETE_POST_DESCRYPT = 8; |
| 4190 | // BOOT_COMPLETE after OTA. |
| 4191 | OTA_BOOT_COMPLETE = 9; |
| 4192 | // BOOT_COMPLETE_NO_ENCRYPTION after OTA. |
| 4193 | OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10; |
| 4194 | // BOOT_COMPLETE_POST_DESCRYPT after OTA. |
| 4195 | OTA_BOOT_COMPLETE_POST_DESCRYPT = 11; |
| 4196 | // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast. |
| 4197 | // Logged from f/b/services/.../UserController.java |
| 4198 | FRAMEWORK_LOCKED_BOOT_COMPLETED = 12; |
| 4199 | // Time when the system starts sending BOOT_COMPLETED broadcast. |
| 4200 | // Logged from f/b/services/.../UserController.java |
| 4201 | FRAMEWORK_BOOT_COMPLETED = 13; |
| 4202 | // Time when the package manager starts init. |
| 4203 | // Logged from f/b/services/.../SystemServer.java |
| 4204 | PACKAGE_MANAGER_INIT_START = 14; |
| 4205 | // Time when package manager is ready |
| 4206 | // Logged from f/b/services/.../SystemServer.java |
| 4207 | PACKAGE_MANAGER_INIT_READY = 15; |
| 4208 | // Represents the time when user has entered unlock credential for system with user pin. |
| 4209 | // Logged from bootstat. |
| 4210 | POST_DECRYPT = 16; |
| 4211 | // Represents the start of zygote's init. |
| 4212 | // Logged from zygote itself. |
| 4213 | ZYGOTE_INIT_START = 17; |
| 4214 | // Represents the start of secondary zygote's init. |
| 4215 | // TODO: add logging to zygote |
| 4216 | SECONDARY_ZYGOTE_INIT_START = 18; |
| 4217 | // Represents the start of system server's init. |
| 4218 | // Logged from f/b/services/.../SystemServer.java |
| 4219 | SYSTEM_SERVER_INIT_START = 19; |
| 4220 | // Represents the completion of system server's init. |
| 4221 | // Logged from f/b/services/.../SystemServer.java |
| 4222 | SYSTEM_SERVER_READY = 20; |
| 4223 | // Represents the start of launcher during boot-up. |
| 4224 | // TODO: add logging |
| 4225 | LAUNCHER_START = 21; |
| 4226 | // Represents the completion of launcher's initial rendering. User can use other apps from |
| 4227 | // launcher from this point. |
| 4228 | // TODO: add logging |
| 4229 | LAUNCHER_SHOWN = 22; |
| 4230 | } |
| 4231 | |
| 4232 | // Type of the event. |
| 4233 | optional ElapsedTimeEvent event = 1; |
| 4234 | // Time since bootup for the event. |
| 4235 | // It should be acquired from SystemClock elapsedRealtime() call or equivalent. |
| 4236 | optional int64 time_millis = 2; |
| 4237 | } |
| 4238 | |
| 4239 | /** |
| 4240 | * Boot time events with UTC time. |
| 4241 | * |
| 4242 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4243 | */ |
| 4244 | message BootTimeEventUtcTime { |
| 4245 | enum UtcTimeEvent { |
| 4246 | UNKNOWN = 0; |
| 4247 | // Time of the bootstat's marking of 1st boot after the last factory reset. |
| 4248 | // Logged from bootstat. |
| 4249 | FACTORY_RESET_RESET_TIME = 1; |
| 4250 | // The time when bootstat records FACTORY_RESET_* events. This is close to |
| 4251 | // BOOT_COMPLETE time for the current bootup. |
| 4252 | // Logged from bootstat. |
| 4253 | FACTORY_RESET_CURRENT_TIME = 2; |
| 4254 | // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose. |
| 4255 | // Logged from bootstat. |
| 4256 | FACTORY_RESET_RECORD_VALUE = 3; |
| 4257 | } |
| 4258 | |
| 4259 | // Type of the event. |
| 4260 | optional UtcTimeEvent event = 1; |
| 4261 | // UTC time for the event. |
| 4262 | optional int64 utc_time_secs = 2; |
| 4263 | } |
| 4264 | |
| 4265 | /** |
| 4266 | * Boot time events representing specific error code during bootup. |
| 4267 | * Meaning of error code can be different per each event type. |
| 4268 | * |
| 4269 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4270 | */ |
| 4271 | message BootTimeEventErrorCode { |
| 4272 | enum ErrorCodeEvent { |
| 4273 | UNKNOWN = 0; |
| 4274 | // Linux error code for time() call to get the current UTC time. |
| 4275 | // Logged from bootstat. |
| 4276 | FACTORY_RESET_CURRENT_TIME_FAILURE = 1; |
| 4277 | // Represents UmountStat before the reboot for the current boot up. Error codes defined |
| 4278 | // as UMOUNT_STAT_* from init/reboot.cpp. |
| 4279 | // Logged from f/b/services/.../BootReceiver.java. |
| 4280 | SHUTDOWN_UMOUNT_STAT = 2; |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4281 | // Reprepsents fie system mounting error code of /data partition for the current boot. |
| 4282 | // Error codes defined as combination of FsStatFlags from system/core/fs_mgr/fs_mgr.cpp. |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4283 | // Logged from f/b/services/.../BootReceiver.java. |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4284 | FS_MGR_FS_STAT_DATA_PARTITION = 3; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4285 | } |
| 4286 | |
| 4287 | // Type of the event. |
| 4288 | optional ErrorCodeEvent event = 1; |
| 4289 | // error code defined per each event type. |
| 4290 | // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of |
| 4291 | // FS_MGR_FS_STAT. |
| 4292 | optional int32 error_code = 2; |
| 4293 | } |
| 4294 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4295 | ////////////////////////////////////////////////////////////////////// |
| 4296 | // Pulled atoms below this line // |
| 4297 | ////////////////////////////////////////////////////////////////////// |
| 4298 | |
| 4299 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4300 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 4301 | * |
| 4302 | * Pulled from: |
| 4303 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4304 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4305 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4306 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4307 | |
| 4308 | optional int64 rx_bytes = 2; |
| 4309 | |
| 4310 | optional int64 rx_packets = 3; |
| 4311 | |
| 4312 | optional int64 tx_bytes = 4; |
| 4313 | |
| 4314 | optional int64 tx_packets = 5; |
| 4315 | } |
| 4316 | |
| 4317 | /** |
| 4318 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 4319 | * |
| 4320 | * Pulled from: |
| 4321 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4322 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4323 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4324 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4325 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4326 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 4327 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4328 | |
| 4329 | optional int64 rx_bytes = 3; |
| 4330 | |
| 4331 | optional int64 rx_packets = 4; |
| 4332 | |
| 4333 | optional int64 tx_bytes = 5; |
| 4334 | |
| 4335 | optional int64 tx_packets = 6; |
| 4336 | } |
| 4337 | |
| 4338 | /** |
| 4339 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 4340 | * |
| 4341 | * Pulled from: |
| 4342 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4343 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4344 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4345 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4346 | |
| 4347 | optional int64 rx_bytes = 2; |
| 4348 | |
| 4349 | optional int64 rx_packets = 3; |
| 4350 | |
| 4351 | optional int64 tx_bytes = 4; |
| 4352 | |
| 4353 | optional int64 tx_packets = 5; |
| 4354 | } |
| 4355 | |
| 4356 | /** |
| 4357 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 4358 | * |
| 4359 | * Pulled from: |
| 4360 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4361 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4362 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4363 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4364 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4365 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 4366 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4367 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4368 | |
| 4369 | optional int64 rx_bytes = 3; |
| 4370 | |
| 4371 | optional int64 rx_packets = 4; |
| 4372 | |
| 4373 | optional int64 tx_bytes = 5; |
| 4374 | |
| 4375 | optional int64 tx_packets = 6; |
| 4376 | } |
| 4377 | |
| 4378 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4379 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 4380 | * |
| 4381 | * Pulled from: |
| 4382 | * StatsCompanionService |
| 4383 | */ |
| 4384 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4385 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4386 | |
| 4387 | optional int64 rx_bytes = 2; |
| 4388 | |
| 4389 | optional int64 tx_bytes = 3; |
| 4390 | } |
| 4391 | |
| 4392 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4393 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 4394 | * android/internal/os/KernelWakelockStats.java |
| 4395 | * |
| 4396 | * Pulled from: |
| 4397 | * StatsCompanionService using KernelWakelockReader. |
| 4398 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4399 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4400 | optional string name = 1; |
| 4401 | |
| 4402 | optional int32 count = 2; |
| 4403 | |
| 4404 | optional int32 version = 3; |
| 4405 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4406 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4407 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4408 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4409 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4410 | * Pulls low power state information. If power.stats HAL is not available, this |
| 4411 | * includes platform and subsystem sleep state information, |
| 4412 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 4413 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4414 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4415 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4416 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 4417 | * as defined in: |
| 4418 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4419 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4420 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4421 | // Subsystem name |
| 4422 | optional string subsystem_name = 1; |
| 4423 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 4424 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4425 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 4426 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4427 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4428 | // 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] | 4429 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4430 | // 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] | 4431 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 4432 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4433 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4434 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 4435 | * Pulls on-device power measurement information. |
| 4436 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 4437 | * Pulled from: |
| 4438 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 4439 | */ |
| 4440 | message OnDevicePowerMeasurement { |
| 4441 | // Name of the subsystem (to which the rail belongs). |
| 4442 | optional string subsystem_name = 1; |
| 4443 | |
| 4444 | // Rail name. The rail lies within the subsystem. |
| 4445 | optional string rail_name = 2; |
| 4446 | |
| 4447 | // Time (in ms since boot) at which the rail energy value was measured. |
| 4448 | // This may differ slightly from the time that statsd logs this information. |
| 4449 | optional uint64 measurement_timestamp_millis = 3; |
| 4450 | |
| 4451 | // Accumulated energy used via the rail since device boot in uWs. |
| 4452 | optional uint64 energy_microwatt_secs = 4; |
| 4453 | } |
| 4454 | |
| 4455 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4456 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 4457 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 4458 | * starts from highest to lowest. The value should be monotonically |
| 4459 | * increasing since boot. However, if there is a cpu |
| 4460 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4461 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4462 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4463 | optional uint32 cluster = 1; |
| 4464 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4465 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4466 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4467 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4468 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4469 | * Pulls Cpu Time Per Uid. |
| 4470 | * Note that isolated process uid time should be attributed to host uids. |
| 4471 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4472 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4473 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 4474 | optional uint64 user_time_micros = 2; |
| 4475 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4476 | } |
| 4477 | |
| 4478 | /** |
| 4479 | * Pulls Cpu Time Per Uid per frequency. |
| 4480 | * Note that isolated process uid time should be attributed to host uids. |
| 4481 | * For each uid, we order the time by descending frequencies. |
| 4482 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4483 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4484 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4485 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4486 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4487 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 4488 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4489 | /** |
| 4490 | * Pulls Wifi Controller Activity Energy Info |
| 4491 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4492 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4493 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4494 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4495 | // stack reported state |
| 4496 | // TODO: replace this with proto enum |
| 4497 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4498 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4499 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4500 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4501 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4502 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4503 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4504 | // product of current(mA), voltage(V) and time(ms) |
| 4505 | optional uint64 controller_energy_used = 6; |
| 4506 | } |
| 4507 | |
| 4508 | /** |
| 4509 | * Pulls Modem Activity Energy Info |
| 4510 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4511 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4512 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4513 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4514 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4515 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4516 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4517 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4518 | /** |
| 4519 | * Tx power index |
| 4520 | * index 0 = tx_power < 0dBm |
| 4521 | * index 1 = 0dBm < tx_power < 5dBm |
| 4522 | * index 2 = 5dBm < tx_power < 15dBm |
| 4523 | * index 3 = 15dBm < tx_power < 20dBm |
| 4524 | * index 4 = tx_power > 20dBm |
| 4525 | */ |
| 4526 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4527 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4528 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4529 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4530 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4531 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4532 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4533 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4534 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4535 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4536 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4537 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4538 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 7322e4a | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 4539 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 4540 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4541 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4542 | /** |
| 4543 | * Pulls Bluetooth Activity Energy Info |
| 4544 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 4545 | */ |
| 4546 | message BluetoothActivityInfo { |
| 4547 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4548 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4549 | // bluetooth stack state |
| 4550 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4551 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4552 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4553 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4554 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4555 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4556 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4557 | // product of current(mA), voltage(V) and time(ms) |
| 4558 | optional uint64 energy_used = 6; |
| 4559 | } |
| 4560 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4561 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4562 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4563 | * |
| 4564 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4565 | */ |
| 4566 | message ProcessMemoryState { |
| 4567 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4568 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4569 | |
| 4570 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4571 | // Usually package name, "system" for system server. |
| 4572 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4573 | optional string process_name = 2; |
| 4574 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4575 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4576 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4577 | |
| 4578 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4579 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4580 | |
| 4581 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4582 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4583 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4584 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4585 | // Value is read from memory.stat, field total_rss if per-app memory |
| 4586 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4587 | optional int64 rss_in_bytes = 6; |
| 4588 | |
| 4589 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4590 | // Value is read from memory.stat, field total_cache if per-app memory |
| 4591 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4592 | optional int64 cache_in_bytes = 7; |
| 4593 | |
| 4594 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4595 | // Value is read from memory.stat, field total_swap if per-app memory |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4596 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4597 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 4598 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4599 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4600 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 4601 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4602 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4603 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 4604 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4605 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4606 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 4607 | } |
| 4608 | |
| 4609 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4610 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4611 | * |
| 4612 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 4613 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 4614 | * |
| 4615 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4616 | */ |
| 4617 | message ProcessMemoryHighWaterMark { |
| 4618 | // The uid if available. -1 means not available. |
| 4619 | optional int32 uid = 1 [(is_uid) = true]; |
| 4620 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4621 | // The process name. |
| 4622 | // Usually package name or process cmdline. |
| 4623 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4624 | optional string process_name = 2; |
| 4625 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4626 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 4627 | // computed by converting kilobytes to bytes. |
| 4628 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 4629 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4630 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 4631 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4632 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4633 | } |
| 4634 | |
| 4635 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 4636 | * Logs the memory stats for a process. |
| 4637 | * |
| 4638 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 4639 | * and for selected native processes. |
| 4640 | */ |
| 4641 | message ProcessMemorySnapshot { |
| 4642 | // The uid if available. -1 means not available. |
| 4643 | optional int32 uid = 1 [(is_uid) = true]; |
| 4644 | |
| 4645 | // The process name. |
| 4646 | // Usually package name or process cmdline. |
| 4647 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 4648 | optional string process_name = 2; |
| 4649 | |
| 4650 | // The pid of the process. |
| 4651 | // Allows to disambiguate instances of the process. |
| 4652 | optional int32 pid = 3; |
| 4653 | |
| 4654 | // The current OOM score adjustment value. |
| 4655 | // Read from ProcessRecord for managed processes. |
| 4656 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 4657 | optional int32 oom_score_adj = 4; |
| 4658 | |
| 4659 | // The current RSS of the process. |
| 4660 | // VmRSS from /proc/pid/status. |
| 4661 | optional int32 rss_in_kilobytes = 5; |
| 4662 | |
| 4663 | // The current anon RSS of the process. |
| 4664 | // RssAnon from /proc/pid/status. |
| 4665 | optional int32 anon_rss_in_kilobytes = 6; |
| 4666 | |
| 4667 | // The current swap size of the process. |
| 4668 | // VmSwap from /proc/pid/status. |
| 4669 | optional int32 swap_in_kilobytes = 7; |
| 4670 | |
| 4671 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 4672 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
| 4673 | } |
| 4674 | |
| 4675 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4676 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4677 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4678 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4679 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4680 | } |
| 4681 | |
| 4682 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4683 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4684 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4685 | message SystemUptime { |
| 4686 | // Milliseconds since the system was booted. |
| 4687 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 4688 | // for external input). |
| 4689 | // 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] | 4690 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4691 | } |
| 4692 | |
| 4693 | /* |
| 4694 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 4695 | * active: X (X is # cores) |
| 4696 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 4697 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 4698 | * ... |
| 4699 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 4700 | * The file contains a monotonically increasing count of time for a single boot. |
| 4701 | */ |
| 4702 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4703 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4704 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4705 | } |
| 4706 | |
| 4707 | /** |
| 4708 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 4709 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 4710 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4711 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4712 | * ... |
| 4713 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 4714 | * The file contains a monotonically increasing count of time for a single boot. |
| 4715 | */ |
| 4716 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4717 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4718 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4719 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 4720 | } |
| 4721 | |
| 4722 | /* |
| 4723 | * Pulls free disk space, for data, system partition and temporary directory. |
| 4724 | */ |
| 4725 | message DiskSpace { |
| 4726 | // available bytes in data partition |
| 4727 | optional uint64 data_available_bytes = 1; |
| 4728 | // available bytes in system partition |
| 4729 | optional uint64 system_available_bytes = 2; |
| 4730 | // available bytes in download cache or temp directories |
| 4731 | optional uint64 temp_available_bytes = 3; |
| 4732 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4733 | |
| 4734 | /** |
| 4735 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 4736 | * |
| 4737 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4738 | */ |
| 4739 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4740 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4741 | } |
| 4742 | |
| 4743 | /** |
| 4744 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4745 | * Pulled from: |
| 4746 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4747 | */ |
| 4748 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4749 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4750 | } |
| 4751 | |
| 4752 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4753 | * Pulls battery voltage. |
| 4754 | * Pulled from: |
| 4755 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4756 | */ |
| 4757 | message BatteryVoltage { |
| 4758 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4759 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4760 | } |
| 4761 | |
| 4762 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 4763 | * Pulls battery level (percent full, from 0 to 100). |
| 4764 | * |
| 4765 | * Pulled from: |
| 4766 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4767 | */ |
| 4768 | message BatteryLevel { |
| 4769 | // Battery level. Should be in [0, 100]. |
| 4770 | optional int32 battery_level = 1; |
| 4771 | } |
| 4772 | |
| 4773 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4774 | * Pulls the temperature of various parts of the device. |
| 4775 | * 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] | 4776 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4777 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4778 | */ |
| 4779 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4780 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4781 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 4782 | |
| 4783 | // The name of the temperature source. Eg. CPU0 |
| 4784 | optional string sensor_name = 2; |
| 4785 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4786 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4787 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4788 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4789 | |
| 4790 | // Relative severity of the throttling, see enum definition. |
| 4791 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 4792 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4793 | |
| 4794 | /** |
| 4795 | * Pulls the statistics of calls to Binder. |
| 4796 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 4797 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4798 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4799 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4800 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4801 | */ |
| 4802 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4803 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 4804 | // executing the binder transaction attribute the transaction to another uid using |
| 4805 | // Binder.setThreadWorkSource(). |
| 4806 | // |
| 4807 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4808 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4809 | // UID of the process executing the binder transaction. |
| 4810 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4811 | // Fully qualified class name of the API call. |
| 4812 | // |
| 4813 | // This is a system server class name. |
| 4814 | // |
| 4815 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 4816 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 4817 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 4818 | // commonly used APIs. |
| 4819 | optional string service_class_name = 2; |
| 4820 | // Method name of the API call. It can also be a transaction code if we cannot |
| 4821 | // resolve it to a name. See Binder#getTransactionName. |
| 4822 | // |
| 4823 | // This is a system server method name. |
| 4824 | optional string service_method_name = 3; |
| 4825 | // Total number of API calls. |
| 4826 | optional int64 call_count = 4; |
| 4827 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4828 | optional bool screen_interactive = 13; |
| 4829 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 4830 | // call_count will be equal to recorded_call_count. |
| 4831 | // |
| 4832 | // If recorded_call_count is different than call_count, it means data collection has been |
| 4833 | // sampled. All the fields below will be sampled in this case. |
| 4834 | optional int64 recorded_call_count = 12; |
| 4835 | // Number of exceptions thrown by the API. |
| 4836 | optional int64 recorded_exception_count = 5; |
| 4837 | // Total latency of all API calls. |
| 4838 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 4839 | optional int64 recorded_total_latency_micros = 6; |
| 4840 | // Maximum latency of one API call. |
| 4841 | optional int64 recorded_max_latency_micros = 7; |
| 4842 | // Total CPU usage of all API calls. |
| 4843 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 4844 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 4845 | optional int64 recorded_total_cpu_micros = 8; |
| 4846 | // Maximum CPU usage of one API call. |
| 4847 | optional int64 recorded_max_cpu_micros = 9; |
| 4848 | // Maximum parcel reply size of one API call. |
| 4849 | optional int64 recorded_max_reply_size_bytes = 10; |
| 4850 | // Maximum parcel request size of one API call. |
| 4851 | optional int64 recorded_max_request_size_bytes = 11; |
| 4852 | } |
| 4853 | |
| 4854 | /** |
| 4855 | * Pulls the statistics of exceptions during calls to Binder. |
| 4856 | * |
| 4857 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 4858 | * > adb shell dumpsys binder_calls_stats --reset |
| 4859 | */ |
| 4860 | message BinderCallsExceptions { |
| 4861 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 4862 | // |
| 4863 | // This is an exception class name thrown by the system server. |
| 4864 | optional string exception_class_name = 1; |
| 4865 | // Total number of exceptions. |
| 4866 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4867 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4868 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4869 | /** |
| 4870 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 4871 | * |
| 4872 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4873 | * config on the device. |
| 4874 | * |
| 4875 | * Next tag: 11 |
| 4876 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4877 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 4878 | // 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] | 4879 | optional int32 uid = 1 [(is_uid) = true]; |
| 4880 | |
| 4881 | // Fully qualified class name of the handler target class. |
| 4882 | // |
| 4883 | // This field does not contain PII. This is a system server class name. |
| 4884 | optional string handler_class_name = 2; |
| 4885 | |
| 4886 | // The name of the thread that runs the Looper. |
| 4887 | // |
| 4888 | // This field does not contain PII. This is a system server thread name. |
| 4889 | optional string looper_thread_name = 3; |
| 4890 | |
| 4891 | // The name of the dispatched message. |
| 4892 | // |
| 4893 | // This field does not contain PII. This is a system server constant or class |
| 4894 | // name. |
| 4895 | optional string message_name = 4; |
| 4896 | |
| 4897 | // Total number of successfully dispatched messages. |
| 4898 | optional int64 message_count = 5; |
| 4899 | |
| 4900 | // Total number of messages that failed dispatching. |
| 4901 | optional int64 exception_count = 6; |
| 4902 | |
| 4903 | // Total number of processed messages we have data recorded for. If we |
| 4904 | // collected data for all the messages, message_count will be equal to |
| 4905 | // recorded_message_count. |
| 4906 | // |
| 4907 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4908 | // 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] | 4909 | optional int64 recorded_message_count = 7; |
| 4910 | |
| 4911 | // Total latency of all processed messages. |
| 4912 | // Average can be computed using recorded_total_latency_micros / |
| 4913 | // recorded_message_count. |
| 4914 | optional int64 recorded_total_latency_micros = 8; |
| 4915 | |
| 4916 | // Total CPU usage of all processed message. |
| 4917 | // Average can be computed using recorded_total_cpu_micros / |
| 4918 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4919 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4920 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4921 | |
| 4922 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4923 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4924 | |
| 4925 | // Max recorded CPU usage of all processed messages. |
| 4926 | optional int64 recorded_max_cpu_micros = 11; |
| 4927 | |
| 4928 | // Max recorded latency of all processed messages. |
| 4929 | optional int64 recorded_max_latency_micros = 12; |
| 4930 | |
| 4931 | // Total number of messages we tracked the dispatching delay for. If we |
| 4932 | // collected data for all the messages, message_count will be equal to |
| 4933 | // recorded_delay_message_count. |
| 4934 | // |
| 4935 | // If recorded_delay_message_count is different than message_count, it means data |
| 4936 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 4937 | // The fields below will be sampled in this case. |
| 4938 | optional int64 recorded_delay_message_count = 13; |
| 4939 | |
| 4940 | // Total dispatching delay of all processed messages. |
| 4941 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4942 | // and the actual dispatching time. |
| 4943 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 4944 | optional int64 recorded_total_delay_millis = 14; |
| 4945 | |
| 4946 | // Max dispatching delay of all processed messages. |
| 4947 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4948 | // and the actual dispatching time. |
| 4949 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4950 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 4951 | |
| 4952 | /** |
| 4953 | * Pulls disk information, such as write speed and latency. |
| 4954 | */ |
| 4955 | message DiskStats { |
| 4956 | // Time taken to open, write 512B to, and close a file. |
| 4957 | // -1 if error performing the check. |
| 4958 | optional int64 data_write_latency_millis = 1; |
| 4959 | |
| 4960 | optional bool file_based_encryption = 2; |
| 4961 | |
| 4962 | // Recent disk write speed in kB/s. |
| 4963 | // -1 if error querying storageed. |
| 4964 | // 0 if data is unavailable. |
| 4965 | optional int32 recent_disk_write_speed = 3; |
| 4966 | } |
| 4967 | |
| 4968 | |
| 4969 | /** |
| 4970 | * Free and total bytes of the Data, Cache, and System partition. |
| 4971 | */ |
| 4972 | message DirectoryUsage { |
| 4973 | enum Directory { |
| 4974 | UNKNOWN = 0; |
| 4975 | DATA = 1; |
| 4976 | CACHE = 2; |
| 4977 | SYSTEM = 3; |
| 4978 | } |
| 4979 | optional Directory directory = 1; |
| 4980 | optional int64 free_bytes = 2; |
| 4981 | optional int64 total_bytes = 3; |
| 4982 | } |
| 4983 | |
| 4984 | |
| 4985 | /** |
| 4986 | * Size of an application: apk size, data size, and cache size. |
| 4987 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4988 | * Information is only reported for apps with the primary user (user 0). |
| 4989 | * Sizes are aggregated by package name. |
| 4990 | */ |
| 4991 | message AppSize { |
| 4992 | // Including uids will involve modifying diskstats logic. |
| 4993 | optional string package_name = 1; |
| 4994 | // App size in bytes. -1 if unavailable. |
| 4995 | optional int64 app_size_bytes = 2; |
| 4996 | // App data size in bytes. -1 if unavailable. |
| 4997 | optional int64 app_data_size_bytes = 3; |
| 4998 | // App cache size in bytes. -1 if unavailable. |
| 4999 | optional int64 app_cache_size_bytes = 4; |
| 5000 | // Time that the cache file was produced. |
| 5001 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5002 | optional int64 cache_time_millis = 5; |
| 5003 | } |
| 5004 | |
| 5005 | |
| 5006 | /** |
| 5007 | * Size of a particular category. Eg: photos, videos. |
| 5008 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5009 | */ |
| 5010 | message CategorySize { |
| 5011 | enum Category { |
| 5012 | UNKNOWN = 0; |
| 5013 | APP_SIZE = 1; |
| 5014 | APP_DATA_SIZE = 2; |
| 5015 | APP_CACHE_SIZE = 3; |
| 5016 | PHOTOS = 4; |
| 5017 | VIDEOS = 5; |
| 5018 | AUDIO = 6; |
| 5019 | DOWNLOADS = 7; |
| 5020 | SYSTEM = 8; |
| 5021 | OTHER = 9; |
| 5022 | } |
| 5023 | optional Category category = 1; |
| 5024 | // Category size in bytes. |
| 5025 | optional int64 size_bytes = 2; |
| 5026 | // Time that the cache file was produced. |
| 5027 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5028 | optional int64 cache_time_millis = 3; |
| 5029 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5030 | |
| 5031 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 5032 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 5033 | * |
| 5034 | * Read/write bytes are I/O events from a storage device |
| 5035 | * Read/write chars are data requested by read/write syscalls, and can be |
| 5036 | * satisfied by caching. |
| 5037 | * |
| 5038 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 5039 | */ |
| 5040 | message DiskIo { |
| 5041 | optional int32 uid = 1 [(is_uid) = true]; |
| 5042 | optional int64 fg_chars_read = 2; |
| 5043 | optional int64 fg_chars_write = 3; |
| 5044 | optional int64 fg_bytes_read = 4; |
| 5045 | optional int64 fg_bytes_write = 5; |
| 5046 | optional int64 bg_chars_read = 6; |
| 5047 | optional int64 bg_chars_write = 7; |
| 5048 | optional int64 bg_bytes_read = 8; |
| 5049 | optional int64 bg_bytes_write = 9; |
| 5050 | optional int64 fg_fsync = 10; |
| 5051 | optional int64 bg_fsync= 11; |
| 5052 | } |
| 5053 | |
| 5054 | |
| 5055 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5056 | * Pulls the number of fingerprints for each user. |
| 5057 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 5058 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5059 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5060 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5061 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5062 | // Defined in android/os/UserHandle.java |
| 5063 | optional int32 user = 1; |
| 5064 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5065 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5066 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5067 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5068 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5069 | * Pulls the number of faces for each user. |
| 5070 | * |
| 5071 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 5072 | */ |
| 5073 | message NumFacesEnrolled { |
| 5074 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5075 | // Defined in android/os/UserHandle.java |
| 5076 | optional int32 user = 1; |
| 5077 | // Number of faces registered to that user. |
| 5078 | optional int32 num_faces_enrolled = 2; |
| 5079 | } |
| 5080 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5081 | * A mapping of role holder -> role |
| 5082 | */ |
| 5083 | message RoleHolder { |
| 5084 | // uid of the role holder |
| 5085 | optional int32 uid = 1 [(is_uid) = true]; |
| 5086 | |
| 5087 | // package name of the role holder |
| 5088 | optional string package_name = 2; |
| 5089 | |
| 5090 | // the role held |
| 5091 | optional string role = 3; |
| 5092 | } |
| 5093 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5094 | message AggStats { |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5095 | // These are all in byte resolution. |
| 5096 | optional int64 min = 1 [deprecated = true]; |
| 5097 | optional int64 average = 2 [deprecated = true]; |
| 5098 | optional int64 max = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5099 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5100 | // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above |
| 5101 | // int64 fields. |
| 5102 | optional int32 mean_kb = 4; |
| 5103 | optional int32 max_kb = 5; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5104 | } |
| 5105 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5106 | // A reduced subset of process states; reducing the number of possible states allows more |
| 5107 | // aggressive device-side aggregation of statistics and hence reduces metric upload size. |
| 5108 | enum ProcessStateAggregated { |
| 5109 | PROCESS_STATE_UNKNOWN = 0; |
| 5110 | // Persistent system process. |
| 5111 | PROCESS_STATE_PERSISTENT = 1; |
| 5112 | // Top activity; actually any visible activity. |
| 5113 | PROCESS_STATE_TOP = 2; |
| 5114 | // Process binding to top or a foreground service. |
| 5115 | PROCESS_STATE_BOUND_TOP_OR_FGS = 3; |
| 5116 | // Processing running a foreground service. |
| 5117 | PROCESS_STATE_FGS = 4; |
| 5118 | // Important foreground process (ime, wallpaper, etc). |
| 5119 | PROCESS_STATE_IMPORTANT_FOREGROUND = 5; |
| 5120 | // Important background process. |
| 5121 | PROCESS_STATE_BACKGROUND = 6; |
| 5122 | // Process running a receiver. |
| 5123 | PROCESS_STATE_RECEIVER = 7; |
| 5124 | // All kinds of cached processes. |
| 5125 | PROCESS_STATE_CACHED = 8; |
| 5126 | } |
| 5127 | |
| 5128 | // Next tag: 13 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5129 | message ProcessStatsStateProto { |
| 5130 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5131 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5132 | optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5133 | |
| 5134 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 5135 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5136 | optional android.service.procstats.ProcessState process_state = 3 [deprecated = true]; |
| 5137 | |
| 5138 | optional ProcessStateAggregated process_state_aggregated = 10; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5139 | |
| 5140 | // Millisecond uptime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5141 | optional int64 duration_millis = 4 [deprecated = true]; |
| 5142 | // Same as above, but with minute resolution so it fits into an int32. |
| 5143 | optional int32 duration_minutes = 11; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5144 | |
| 5145 | // Millisecond elapsed realtime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5146 | optional int64 realtime_duration_millis = 9 [deprecated = true]; |
| 5147 | // Same as above, but with minute resolution so it fits into an int32. |
| 5148 | optional int32 realtime_duration_minutes = 12; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5149 | |
| 5150 | // # of samples taken |
| 5151 | optional int32 sample_size = 5; |
| 5152 | |
| 5153 | // PSS is memory reserved for this process |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5154 | optional AggStats pss = 6 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5155 | |
| 5156 | // USS is memory shared between processes, divided evenly for accounting |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5157 | optional AggStats uss = 7 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5158 | |
| 5159 | // RSS is memory resident for this process |
| 5160 | optional AggStats rss = 8; |
| 5161 | } |
| 5162 | |
| 5163 | // Next Tag: 7 |
| 5164 | message ProcessStatsProto { |
| 5165 | // Name of process. |
| 5166 | optional string process = 1; |
| 5167 | |
| 5168 | // Uid of the process. |
| 5169 | optional int32 uid = 2; |
| 5170 | |
| 5171 | // Information about how often kills occurred |
| 5172 | message Kill { |
| 5173 | // Count of excessive CPU kills |
| 5174 | optional int32 cpu = 1; |
| 5175 | |
| 5176 | // Count of kills when cached |
| 5177 | optional int32 cached = 2; |
| 5178 | |
| 5179 | // PSS stats during cached kill |
| 5180 | optional AggStats cached_pss = 3; |
| 5181 | } |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5182 | optional Kill kill = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5183 | |
| 5184 | // Time and memory spent in various states. |
| 5185 | repeated ProcessStatsStateProto states = 5; |
| 5186 | |
| 5187 | // Total time process has been running... screen_state, memory_state, and process_state |
| 5188 | // will not be set. |
| 5189 | optional ProcessStatsStateProto total_running_state = 6; |
| 5190 | } |
| 5191 | |
| 5192 | message PackageServiceOperationStatsProto { |
| 5193 | // Operate enum: Started, Foreground, Bound, Executing |
| 5194 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 5195 | |
| 5196 | // Number of times the service was in this operation. |
| 5197 | optional int32 count = 2; |
| 5198 | |
| 5199 | // Information about a state the service can be in. |
| 5200 | message StateStats { |
| 5201 | // Screen state enum. |
| 5202 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5203 | // Memory state enum. |
| 5204 | optional android.service.procstats.MemoryState memory_state = 2; |
| 5205 | |
| 5206 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5207 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5208 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5209 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5210 | } |
| 5211 | repeated StateStats state_stats = 3; |
| 5212 | } |
| 5213 | |
| 5214 | message PackageServiceStatsProto { |
| 5215 | // Name of service component. |
| 5216 | optional string service_name = 1; |
| 5217 | |
| 5218 | // The operation stats. |
| 5219 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 5220 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 5221 | } |
| 5222 | |
| 5223 | message PackageAssociationSourceProcessStatsProto { |
| 5224 | // Uid of the process. |
| 5225 | optional int32 process_uid = 1; |
| 5226 | // Process name. |
| 5227 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5228 | // Package name. |
| 5229 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5230 | // Total count of the times this association appeared. |
| 5231 | optional int32 total_count = 3; |
| 5232 | |
| 5233 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5234 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5235 | |
| 5236 | // Total count of the times this association became actively impacting its target process. |
| 5237 | optional int32 active_count = 5; |
| 5238 | |
| 5239 | // Information on one source in this association. |
| 5240 | message StateStats { |
| 5241 | // Process state enum. |
| 5242 | optional android.service.procstats.ProcessState process_state = 1; |
| 5243 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5244 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5245 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5246 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5247 | } |
| 5248 | repeated StateStats active_state_stats = 6; |
| 5249 | } |
| 5250 | |
| 5251 | message PackageAssociationProcessStatsProto { |
| 5252 | // Name of the target component. |
| 5253 | optional string component_name = 1; |
| 5254 | // Information on one source in this association. |
| 5255 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 5256 | } |
| 5257 | |
| 5258 | |
| 5259 | message ProcessStatsPackageProto { |
| 5260 | // Name of package. |
| 5261 | optional string package = 1; |
| 5262 | |
| 5263 | // Uid of the package. |
| 5264 | optional int32 uid = 2; |
| 5265 | |
| 5266 | // Version of the package. |
| 5267 | optional int64 version = 3; |
| 5268 | |
| 5269 | // Stats for each process running with the package loaded in to it. |
| 5270 | repeated ProcessStatsProto process_stats = 4; |
| 5271 | |
| 5272 | // Stats for each of the package's services. |
| 5273 | repeated PackageServiceStatsProto service_stats = 5; |
| 5274 | |
| 5275 | // Stats for each association with the package. |
| 5276 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 5277 | } |
| 5278 | |
| 5279 | message ProcessStatsSectionProto { |
| 5280 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5281 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5282 | |
| 5283 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5284 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5285 | |
| 5286 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5287 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5288 | |
| 5289 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5290 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5291 | |
| 5292 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 5293 | optional string runtime = 5; |
| 5294 | |
| 5295 | // whether kernel reports swapped pss. |
| 5296 | optional bool has_swapped_pss = 6; |
| 5297 | |
| 5298 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 5299 | enum Status { |
| 5300 | STATUS_UNKNOWN = 0; |
| 5301 | STATUS_COMPLETE = 1; |
| 5302 | STATUS_PARTIAL = 2; |
| 5303 | STATUS_SHUTDOWN = 3; |
| 5304 | STATUS_SYSPROPS = 4; |
| 5305 | } |
| 5306 | repeated Status status = 7; |
| 5307 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5308 | // Number of pages available of various types and sizes, representation fragmentation. |
| 5309 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 5310 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5311 | // Stats for each process. |
| 5312 | repeated ProcessStatsProto process_stats = 8; |
| 5313 | |
| 5314 | // Stats for each package. |
| 5315 | repeated ProcessStatsPackageProto package_stats = 9; |
| 5316 | } |
| 5317 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5318 | message ProcessStatsAvailablePagesProto { |
| 5319 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 5320 | optional int32 node = 1; |
| 5321 | |
| 5322 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 5323 | optional string zone = 2; |
| 5324 | |
| 5325 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 5326 | optional string label = 3; |
| 5327 | |
| 5328 | // Distribution of number of pages available by order size. First entry in array is |
| 5329 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 5330 | repeated int32 pages_per_order = 4; |
| 5331 | } |
| 5332 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5333 | /** |
| 5334 | * Pulled from ProcessStatsService.java |
| 5335 | */ |
| 5336 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5337 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5338 | } |
| 5339 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 5340 | /** |
| 5341 | * Pulled from ProcessStatsService.java |
| 5342 | */ |
| 5343 | message ProcStatsPkgProc { |
| 5344 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5345 | } |
| 5346 | |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 5347 | // Next Tag: 2 |
| 5348 | message PackageRemoteViewInfoProto { |
| 5349 | optional string package_name = 1; |
| 5350 | // add per-package additional info here (like channels) |
| 5351 | } |
| 5352 | |
| 5353 | // Next Tag: 2 |
| 5354 | message NotificationRemoteViewsProto { |
| 5355 | repeated PackageRemoteViewInfoProto package_remote_view_info = 1; |
| 5356 | } |
| 5357 | |
| 5358 | /** |
| 5359 | * Pulled from NotificationManagerService.java |
| 5360 | */ |
| 5361 | message NotificationRemoteViews { |
| 5362 | optional NotificationRemoteViewsProto notification_remote_views = 1; |
| 5363 | } |
| 5364 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5365 | message PowerProfileProto { |
| 5366 | optional double cpu_suspend = 1; |
| 5367 | |
| 5368 | optional double cpu_idle = 2; |
| 5369 | |
| 5370 | optional double cpu_active = 3; |
| 5371 | |
| 5372 | message CpuCluster { |
| 5373 | optional int32 id = 1; |
| 5374 | optional double cluster_power = 2; |
| 5375 | optional int32 cores = 3; |
| 5376 | repeated int64 speed = 4; |
| 5377 | repeated double core_power = 5; |
| 5378 | } |
| 5379 | |
| 5380 | repeated CpuCluster cpu_cluster = 40; |
| 5381 | |
| 5382 | optional double wifi_scan = 4; |
| 5383 | |
| 5384 | optional double wifi_on = 5; |
| 5385 | |
| 5386 | optional double wifi_active = 6; |
| 5387 | |
| 5388 | optional double wifi_controller_idle = 7; |
| 5389 | |
| 5390 | optional double wifi_controller_rx = 8; |
| 5391 | |
| 5392 | optional double wifi_controller_tx = 9; |
| 5393 | |
| 5394 | repeated double wifi_controller_tx_levels = 10; |
| 5395 | |
| 5396 | optional double wifi_controller_operating_voltage = 11; |
| 5397 | |
| 5398 | optional double bluetooth_controller_idle = 12; |
| 5399 | |
| 5400 | optional double bluetooth_controller_rx = 13; |
| 5401 | |
| 5402 | optional double bluetooth_controller_tx = 14; |
| 5403 | |
| 5404 | optional double bluetooth_controller_operating_voltage = 15; |
| 5405 | |
| 5406 | optional double modem_controller_sleep = 16; |
| 5407 | |
| 5408 | optional double modem_controller_idle = 17; |
| 5409 | |
| 5410 | optional double modem_controller_rx = 18; |
| 5411 | |
| 5412 | repeated double modem_controller_tx = 19; |
| 5413 | |
| 5414 | optional double modem_controller_operating_voltage = 20; |
| 5415 | |
| 5416 | optional double gps_on = 21; |
| 5417 | |
| 5418 | repeated double gps_signal_quality_based = 22; |
| 5419 | |
| 5420 | optional double gps_operating_voltage = 23; |
| 5421 | |
| 5422 | optional double bluetooth_on = 24; |
| 5423 | |
| 5424 | optional double bluetooth_active = 25; |
| 5425 | |
| 5426 | optional double bluetooth_at_cmd = 26; |
| 5427 | |
| 5428 | optional double ambient_display = 27; |
| 5429 | |
| 5430 | optional double screen_on = 28; |
| 5431 | |
| 5432 | optional double radio_on = 29; |
| 5433 | |
| 5434 | optional double radio_scanning = 30; |
| 5435 | |
| 5436 | optional double radio_active = 31; |
| 5437 | |
| 5438 | optional double screen_full = 32; |
| 5439 | |
| 5440 | optional double audio = 33; |
| 5441 | |
| 5442 | optional double video = 34; |
| 5443 | |
| 5444 | optional double flashlight = 35; |
| 5445 | |
| 5446 | optional double memory = 36; |
| 5447 | |
| 5448 | optional double camera = 37; |
| 5449 | |
| 5450 | optional double wifi_batched_scan = 38; |
| 5451 | |
| 5452 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5453 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 5454 | |
| 5455 | /** |
| 5456 | * power_profile.xml and other constants for power model calculations. |
| 5457 | * Pulled from PowerProfile.java |
| 5458 | */ |
| 5459 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5460 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 5461 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 5462 | |
| 5463 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 5464 | * Logs when a user restriction was added or removed. |
| 5465 | * |
| 5466 | * Logged from: |
| 5467 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5468 | */ |
| 5469 | message UserRestrictionChanged { |
| 5470 | // The raw string of the user restriction as defined in UserManager. |
| 5471 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 5472 | optional string restriction = 1; |
| 5473 | // Whether the restriction is enabled or disabled. |
| 5474 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 5475 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 5476 | |
| 5477 | /** |
| 5478 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 5479 | * in the system and returns cpu stats for those that are working at the time. |
| 5480 | * Dead pids will be dropped. Kernel processes are excluded. |
| 5481 | * Min cool-down is 5 sec. |
| 5482 | */ |
| 5483 | message ProcessCpuTime { |
| 5484 | optional int32 uid = 1 [(is_uid) = true]; |
| 5485 | |
| 5486 | optional string process_name = 2; |
| 5487 | // Process cpu time in user space, cumulative from boot/process start |
| 5488 | optional int64 user_time_millis = 3; |
| 5489 | // Process cpu time in system space, cumulative from boot/process start |
| 5490 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 5491 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5492 | |
| 5493 | /** |
| 5494 | * Pulls the CPU usage for each thread. |
| 5495 | * |
| 5496 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 5497 | * |
| 5498 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 5499 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 5500 | * considered before a public release. |
| 5501 | */ |
| 5502 | message CpuTimePerThreadFreq { |
| 5503 | // UID that owns the process. |
| 5504 | optional int32 uid = 1 [(is_uid) = true]; |
| 5505 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5506 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5507 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5508 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5509 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 5510 | optional string process_name = 4; |
| 5511 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 5512 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 5513 | |
| 5514 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 5515 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 5516 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 5517 | // significantly reduces the amount of data created |
| 5518 | optional int32 frequency1_khz = 6; |
| 5519 | optional int32 time1_millis = 7; |
| 5520 | optional int32 frequency2_khz = 8; |
| 5521 | optional int32 time2_millis = 9; |
| 5522 | optional int32 frequency3_khz = 10; |
| 5523 | optional int32 time3_millis = 11; |
| 5524 | optional int32 frequency4_khz = 12; |
| 5525 | optional int32 time4_millis = 13; |
| 5526 | optional int32 frequency5_khz = 14; |
| 5527 | optional int32 time5_millis = 15; |
| 5528 | optional int32 frequency6_khz = 16; |
| 5529 | optional int32 time6_millis = 17; |
| 5530 | optional int32 frequency7_khz = 18; |
| 5531 | optional int32 time7_millis = 19; |
| 5532 | optional int32 frequency8_khz = 20; |
| 5533 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5534 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5535 | |
| 5536 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 5537 | * Pulls information about the device's build. |
| 5538 | */ |
| 5539 | message BuildInformation { |
| 5540 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 5541 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 5542 | optional string fingerprint = 1; |
| 5543 | |
| 5544 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 5545 | optional string brand = 2; |
| 5546 | |
| 5547 | // Build.PRODUCT. The name of the overall product. |
| 5548 | optional string product = 3; |
| 5549 | |
| 5550 | // Build.DEVICE. The name of the industrial design. |
| 5551 | optional string device = 4; |
| 5552 | |
| 5553 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 5554 | optional string version_release = 5; |
| 5555 | |
| 5556 | // Build.ID. E.g. a label like "M4-rc20". |
| 5557 | optional string id = 6; |
| 5558 | |
| 5559 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 5560 | // represent this build. |
| 5561 | optional string version_incremental = 7; |
| 5562 | |
| 5563 | // Build.TYPE. The type of build, like "user" or "eng". |
| 5564 | optional string type = 8; |
| 5565 | |
| 5566 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 5567 | optional string tags = 9; |
| 5568 | } |
| 5569 | |
| 5570 | /** |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 5571 | * Logs information about mismatched caller for content capture. |
| 5572 | * |
| 5573 | * Logged from: |
| 5574 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 5575 | */ |
| 5576 | message ContentCaptureCallerMismatchReported { |
| 5577 | optional string intended_package = 1; |
| 5578 | optional string calling_package = 2; |
| 5579 | } |
| 5580 | |
| 5581 | /** |
| 5582 | * Logs information about content capture service events. |
| 5583 | * |
| 5584 | * Logged from: |
| 5585 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5586 | */ |
| 5587 | message ContentCaptureServiceEvents { |
| 5588 | // The type of event. |
| 5589 | enum Event { |
| 5590 | UNKNOWN = 0; |
| 5591 | ON_CONNECTED = 1; |
| 5592 | ON_DISCONNECTED = 2; |
| 5593 | SET_WHITELIST = 3; |
| 5594 | SET_DISABLED = 4; |
| 5595 | ON_USER_DATA_REMOVED = 5; |
| 5596 | } |
| 5597 | optional Event event = 1; |
| 5598 | // component/package of content capture service. |
| 5599 | optional string service_info = 2; |
| 5600 | // component/package of target. |
| 5601 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 5602 | // separated by " ". |
| 5603 | optional string target_info = 3; |
| 5604 | } |
| 5605 | |
| 5606 | /** |
| 5607 | * Logs information about content capture session events. |
| 5608 | * |
| 5609 | * Logged from: |
| 5610 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5611 | */ |
| 5612 | message ContentCaptureSessionEvents { |
| 5613 | // The type of event. |
| 5614 | enum Event { |
| 5615 | UNKNOWN = 0; |
| 5616 | ON_SESSION_STARTED = 1; |
| 5617 | ON_SESSION_FINISHED = 2; |
| 5618 | SESSION_NOT_CREATED = 3; |
| 5619 | } |
| 5620 | optional int32 session_id = 1; |
| 5621 | optional Event event = 2; |
| 5622 | // (n/a on session finished) |
| 5623 | optional int32 state_flags = 3; |
| 5624 | // component/package of content capture service. |
| 5625 | optional string service_info = 4; |
| 5626 | // component/package of app. |
| 5627 | // (n/a on session finished) |
| 5628 | optional string app_info = 5; |
| 5629 | optional bool is_child_session = 6; |
| 5630 | } |
| 5631 | |
| 5632 | /** |
| 5633 | * Logs information about session being flushed. |
| 5634 | * |
| 5635 | * Logged from: |
| 5636 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5637 | */ |
| 5638 | message ContentCaptureFlushed { |
| 5639 | optional int32 session_id = 1; |
| 5640 | // component/package of content capture service. |
| 5641 | optional string service_info = 2; |
| 5642 | // component/package of app. |
| 5643 | optional string app_info = 3; |
| 5644 | // session start/finish events |
| 5645 | optional int32 child_session_started = 4; |
| 5646 | optional int32 child_session_finished = 5; |
| 5647 | // count of view events. |
| 5648 | optional int32 view_appeared_count = 6; |
| 5649 | optional int32 view_disappeared_count = 7; |
| 5650 | optional int32 view_text_changed_count = 8; |
| 5651 | |
| 5652 | // Flush stats. |
| 5653 | optional int32 max_events = 9; |
| 5654 | optional int32 idle_flush_freq = 10; |
| 5655 | optional int32 text_flush_freq = 11; |
| 5656 | optional int32 flush_reason = 12; |
| 5657 | } |
| 5658 | |
| 5659 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5660 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 5661 | */ |
| 5662 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5663 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5664 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5665 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 5666 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5667 | } |
| 5668 | |
| 5669 | /** |
| 5670 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 5671 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 5672 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 5673 | */ |
| 5674 | message DeviceCalculatedPowerBlameUid { |
| 5675 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 5676 | optional int32 uid = 1 [(is_uid) = true]; |
| 5677 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5678 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5679 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5680 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5681 | } |
| 5682 | |
| 5683 | /** |
| 5684 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 5685 | * drain type. |
| 5686 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 5687 | * is attributed uids. They must all be included to get the total power use. |
| 5688 | */ |
| 5689 | message DeviceCalculatedPowerBlameOther { |
| 5690 | // The type of item whose power use is being reported. |
| 5691 | enum DrainType { |
| 5692 | AMBIENT_DISPLAY = 0; |
| 5693 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 5694 | BLUETOOTH = 2; |
| 5695 | CAMERA = 3; |
| 5696 | // Cell-standby |
| 5697 | CELL = 4; |
| 5698 | FLASHLIGHT = 5; |
| 5699 | IDLE = 6; |
| 5700 | MEMORY = 7; |
| 5701 | // Amount that total computed drain exceeded the drain estimated using the |
| 5702 | // battery level changes and capacity. |
| 5703 | OVERCOUNTED = 8; |
| 5704 | PHONE = 9; |
| 5705 | SCREEN = 10; |
| 5706 | // Amount that total computed drain was below the drain estimated using the |
| 5707 | // battery level changes and capacity. |
| 5708 | UNACCOUNTED = 11; |
| 5709 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 5710 | WIFI = 13; |
| 5711 | } |
| 5712 | optional DrainType drain_type = 1; |
| 5713 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5714 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5715 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5716 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5717 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 5718 | |
| 5719 | /** |
| 5720 | * Logs device policy features. |
| 5721 | * |
| 5722 | * Logged from: |
| 5723 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5724 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 5725 | */ |
| 5726 | message DevicePolicyEvent { |
| 5727 | // The event id - unique for each event. |
| 5728 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 5729 | // The admin package name. |
| 5730 | optional string admin_package_name = 2; |
| 5731 | // A generic integer parameter. |
| 5732 | optional int32 integer_value = 3; |
| 5733 | // A generic boolean parameter. |
| 5734 | optional bool boolean_value = 4; |
| 5735 | // A parameter specifying a time period in milliseconds. |
| 5736 | optional uint64 time_period_millis = 5; |
| 5737 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 5738 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 5739 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 5740 | |
| 5741 | /** |
| 5742 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 5743 | * |
| 5744 | * Logged from: |
| 5745 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5746 | */ |
| 5747 | message DocsUILaunchReported { |
| 5748 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 5749 | optional bool has_initial_uri = 2; |
| 5750 | optional android.stats.docsui.MimeType mime_type = 3; |
| 5751 | optional android.stats.docsui.Root initial_root = 4; |
| 5752 | } |
| 5753 | |
| 5754 | /** |
| 5755 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 5756 | * taps on root/app in hamburger menu. |
| 5757 | * |
| 5758 | * Logged from: |
| 5759 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5760 | */ |
| 5761 | message DocsUIRootVisitedReported { |
| 5762 | optional android.stats.docsui.ContextScope scope = 1; |
| 5763 | optional android.stats.docsui.Root root = 2; |
| 5764 | } |
| 5765 | |
| 5766 | /** |
| 5767 | * Logs file operation stats. Call this when a file operation has completed. |
| 5768 | * |
| 5769 | * Logged from: |
| 5770 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5771 | */ |
| 5772 | message DocsUIFileOperationReported { |
| 5773 | optional android.stats.docsui.Provider provider = 1; |
| 5774 | optional android.stats.docsui.FileOperation file_op = 2; |
| 5775 | } |
| 5776 | |
| 5777 | /** |
| 5778 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 5779 | * mode. |
| 5780 | * |
| 5781 | * Logged from: |
| 5782 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5783 | */ |
| 5784 | message DocsUIFileOperationCopyMoveModeReported { |
| 5785 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5786 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 5787 | } |
| 5788 | |
| 5789 | |
| 5790 | /** |
| 5791 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 5792 | * |
| 5793 | * Logged from: |
| 5794 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5795 | */ |
| 5796 | message DocsUIFileOperationFailureReported { |
| 5797 | optional android.stats.docsui.Authority authority = 1; |
| 5798 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 5799 | } |
| 5800 | |
| 5801 | /** |
| 5802 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 5803 | * |
| 5804 | * Logged from: |
| 5805 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5806 | */ |
| 5807 | message DocsUIFileOperationCanceledReported { |
| 5808 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5809 | } |
| 5810 | |
| 5811 | /** |
| 5812 | * Logs startup time in milliseconds. |
| 5813 | * |
| 5814 | * Logged from: |
| 5815 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5816 | */ |
| 5817 | message DocsUIStartupMsReported { |
| 5818 | optional int32 startup_millis = 1; |
| 5819 | } |
| 5820 | |
| 5821 | /** |
| 5822 | * Logs the action that was started by user. |
| 5823 | * |
| 5824 | * Logged from: |
| 5825 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5826 | */ |
| 5827 | message DocsUIUserActionReported { |
| 5828 | optional android.stats.docsui.UserAction action = 1; |
| 5829 | } |
| 5830 | |
| 5831 | /** |
| 5832 | * Logs the invalid type when invalid scoped access is requested. |
| 5833 | * |
| 5834 | * Logged from: |
| 5835 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 5836 | */ |
| 5837 | message DocsUIInvalidScopedAccessRequestReported { |
| 5838 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5839 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5840 | |
| 5841 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 5842 | * Logs the package name that launches docsui picker mode. |
| 5843 | * |
| 5844 | * Logged from: |
| 5845 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5846 | */ |
| 5847 | message DocsUIPickerLaunchedFromReported { |
| 5848 | optional string package_name = 1; |
| 5849 | } |
| 5850 | |
| 5851 | /** |
| 5852 | * Logs the search type. |
| 5853 | * |
| 5854 | * Logged from: |
| 5855 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5856 | */ |
| 5857 | message DocsUISearchTypeReported { |
| 5858 | optional android.stats.docsui.SearchType search_type = 1; |
| 5859 | } |
| 5860 | |
| 5861 | /** |
| 5862 | * Logs the search mode. |
| 5863 | * |
| 5864 | * Logged from: |
| 5865 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5866 | */ |
| 5867 | message DocsUISearchModeReported { |
| 5868 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 5869 | } |
| 5870 | |
| 5871 | /** |
| 5872 | * Logs the pick result information. |
| 5873 | * |
| 5874 | * Logged from: |
| 5875 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5876 | */ |
| 5877 | message DocsUIPickResultReported { |
| 5878 | optional int32 total_action_count = 1; |
| 5879 | optional int64 duration_millis = 2; |
| 5880 | optional int32 file_count= 3; |
| 5881 | optional bool is_searching = 4; |
| 5882 | optional android.stats.docsui.Root picked_from = 5; |
| 5883 | optional android.stats.docsui.MimeType mime_type = 6; |
| 5884 | optional int32 repeatedly_pick_times = 7; |
| 5885 | } |
| 5886 | |
| 5887 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5888 | * Logs when an app's memory is compacted. |
| 5889 | * |
| 5890 | * Logged from: |
| 5891 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 5892 | */ |
| 5893 | message AppCompacted { |
| 5894 | // The pid of the process being compacted. |
| 5895 | optional int32 pid = 1; |
| 5896 | |
| 5897 | // The name of the process being compacted. |
| 5898 | optional string process_name = 2; |
| 5899 | |
| 5900 | // The type of compaction. |
| 5901 | enum Action { |
| 5902 | UNKNOWN = 0; |
| 5903 | SOME = 1; |
| 5904 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 5905 | PERSISTENT = 3; |
| 5906 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5907 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5908 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5909 | |
| 5910 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 5911 | optional int64 before_rss_total_kilobytes = 4; |
| 5912 | |
| 5913 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 5914 | optional int64 before_rss_file_kilobytes = 5; |
| 5915 | |
| 5916 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 5917 | optional int64 before_rss_anon_kilobytes = 6; |
| 5918 | |
| 5919 | // Swap in kilobytes consumed by the process prior to compaction. |
| 5920 | optional int64 before_swap_kilobytes = 7; |
| 5921 | |
| 5922 | // Total RSS in kilobytes consumed by the process after compaction. |
| 5923 | optional int64 after_rss_total_kilobytes = 8; |
| 5924 | |
| 5925 | // File RSS in kilobytes consumed by the process after compaction. |
| 5926 | optional int64 after_rss_file_kilobytes = 9; |
| 5927 | |
| 5928 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 5929 | optional int64 after_rss_anon_kilobytes = 10; |
| 5930 | |
| 5931 | // Swap in kilobytes consumed by the process after compaction. |
| 5932 | optional int64 after_swap_kilobytes = 11; |
| 5933 | |
| 5934 | // The time taken to perform compaction in milliseconds. |
| 5935 | optional int64 time_to_compact_millis = 12; |
| 5936 | |
| 5937 | // The last compaction action performed for this app. |
| 5938 | optional Action last_action = 13; |
| 5939 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5940 | // The last time that compaction was attempted on this process in milliseconds |
| 5941 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 5942 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5943 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 5944 | // 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] | 5945 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5946 | |
| 5947 | // The process state at the time of compaction. |
| 5948 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 5949 | |
| 5950 | // Free ZRAM in kilobytes before compaction. |
| 5951 | optional int64 before_zram_free_kilobytes = 17; |
| 5952 | |
| 5953 | // Free ZRAM in kilobytes after compaction. |
| 5954 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5955 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5956 | |
| 5957 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5958 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 5959 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 5960 | * |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5961 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 5962 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 5963 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 5964 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5965 | */ |
| 5966 | message NetworkDnsEventReported { |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5967 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5968 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5969 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5970 | |
| 5971 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5972 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5973 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5974 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 5975 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5976 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5977 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 5978 | // Only valid for event_type = EVENT_RESNSEND. |
| 5979 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5980 | |
lifr | ad9becc | 2019-05-20 11:04:41 +0800 | [diff] [blame] | 5981 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5982 | |
| 5983 | // The DNS over TLS mode on a specific netId. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5984 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5985 | |
| 5986 | // Additional pass-through fields opaque to statsd. |
| 5987 | // The DNS resolver Mainline module can add new fields here without requiring an OS update. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5988 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 2b9fab7 | 2019-07-20 15:28:28 +0800 | [diff] [blame] | 5989 | |
| 5990 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 5991 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5992 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 5993 | |
| 5994 | /** |
| 5995 | * Logs when a data stall event occurs. |
| 5996 | * |
| 5997 | * Log from: |
| 5998 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5999 | */ |
| 6000 | message DataStallEvent { |
| 6001 | // Data stall evaluation type. |
| 6002 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 6003 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 6004 | optional int32 evaluation_type = 1; |
| 6005 | // See definition in data_stall_event.proto. |
| 6006 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 6007 | // See definition in data_stall_event.proto. |
| 6008 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 6009 | // See definition in data_stall_event.proto. |
| 6010 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 6011 | // See definition in data_stall_event.proto. |
| 6012 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 6013 | // See definition in data_stall_event.proto. |
| 6014 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 6015 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 6016 | |
| 6017 | /* |
| 6018 | * Logs when RescueParty resets some set of experiment flags. |
| 6019 | * |
| 6020 | * Logged from: |
| 6021 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 6022 | */ |
| 6023 | message RescuePartyResetReported { |
| 6024 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 6025 | optional int32 rescue_level = 1; |
| 6026 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 6027 | |
| 6028 | /** |
| 6029 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 6030 | * Logged from: |
| 6031 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 6032 | */ |
| 6033 | message SignedConfigReported { |
| 6034 | enum Type { |
| 6035 | UNKNOWN_TYPE = 0; |
| 6036 | GLOBAL_SETTINGS = 1; |
| 6037 | } |
| 6038 | optional Type type = 1; |
| 6039 | |
| 6040 | // The final status of the signed config received. |
| 6041 | enum Status { |
| 6042 | UNKNOWN_STATUS = 0; |
| 6043 | APPLIED = 1; |
| 6044 | BASE64_FAILURE_CONFIG = 2; |
| 6045 | BASE64_FAILURE_SIGNATURE = 3; |
| 6046 | SECURITY_EXCEPTION = 4; |
| 6047 | INVALID_CONFIG = 5; |
| 6048 | OLD_CONFIG = 6; |
| 6049 | SIGNATURE_CHECK_FAILED = 7; |
| 6050 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 6051 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 6052 | } |
| 6053 | optional Status status = 2; |
| 6054 | |
| 6055 | // The version of the signed config processed. |
| 6056 | optional int32 version = 3; |
| 6057 | |
| 6058 | // The package name that the config was extracted from. |
| 6059 | optional string from_package = 4; |
| 6060 | |
| 6061 | enum Key { |
| 6062 | NO_KEY = 0; |
| 6063 | DEBUG = 1; |
| 6064 | PRODUCTION = 2; |
| 6065 | } |
| 6066 | // Which key was used to verify the config. |
| 6067 | optional Key verified_with = 5; |
| 6068 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6069 | |
| 6070 | /* |
| 6071 | * Logs GNSS Network-Initiated (NI) location events. |
| 6072 | * |
| 6073 | * Logged from: |
| 6074 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6075 | */ |
| 6076 | message GnssNiEventReported { |
| 6077 | // The type of GnssNiEvent. |
| 6078 | enum EventType { |
| 6079 | UNKNOWN = 0; |
| 6080 | NI_REQUEST = 1; |
| 6081 | NI_RESPONSE = 2; |
| 6082 | } |
| 6083 | optional EventType event_type = 1; |
| 6084 | |
| 6085 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 6086 | optional int32 notification_id = 2; |
| 6087 | |
| 6088 | // 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] | 6089 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6090 | |
| 6091 | // NI requires notification. |
| 6092 | optional bool need_notify = 4; |
| 6093 | |
| 6094 | // NI requires verification. |
| 6095 | optional bool need_verify = 5; |
| 6096 | |
| 6097 | // NI requires privacy override, no notification/minimal trace. |
| 6098 | optional bool privacy_override = 6; |
| 6099 | |
| 6100 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 6101 | // seconds. |
| 6102 | optional int32 timeout = 7; |
| 6103 | |
| 6104 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6105 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6106 | |
| 6107 | // String representing the requester of the network inititated location request. |
| 6108 | optional string requestor_id = 9; |
| 6109 | |
| 6110 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 6111 | // network initiated location request. |
| 6112 | optional string text = 10; |
| 6113 | |
| 6114 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6115 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6116 | |
| 6117 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6118 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6119 | |
| 6120 | // True if SUPL ES is enabled. |
| 6121 | optional bool is_supl_es_enabled = 13; |
| 6122 | |
| 6123 | // True if GNSS location is enabled. |
| 6124 | optional bool is_location_enabled = 14; |
| 6125 | |
| 6126 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6127 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 6128 | } |
| 6129 | |
| 6130 | /** |
| 6131 | * Logs GNSS non-framework (NFW) location notification. |
| 6132 | * |
| 6133 | * Logged from: |
| 6134 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6135 | */ |
| 6136 | message GnssNfwNotificationReported { |
| 6137 | // Package name of the Android proxy application representing the non-framework entity that |
| 6138 | // requested location. Set to empty string if unknown. |
| 6139 | optional string proxy_app_package_name = 1; |
| 6140 | |
| 6141 | // Protocol stack that initiated the non-framework location request. |
| 6142 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 6143 | |
| 6144 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 6145 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 6146 | optional string other_protocol_stack_name = 3; |
| 6147 | |
| 6148 | // Source initiating/receiving the location information. |
| 6149 | optional android.server.location.NfwRequestor requestor = 4; |
| 6150 | |
| 6151 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 6152 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 6153 | // and used for logging purposes. |
| 6154 | optional string requestor_id = 5; |
| 6155 | |
| 6156 | // Indicates whether location information was provided for this request. |
| 6157 | optional android.server.location.NfwResponseType response_type = 6; |
| 6158 | |
| 6159 | // True if the device is in user initiated emergency session. |
| 6160 | optional bool in_emergency_mode = 7; |
| 6161 | |
| 6162 | // True if cached location is provided. |
| 6163 | optional bool is_cached_location = 8; |
| 6164 | |
| 6165 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 6166 | optional bool is_permission_mismatched = 9; |
| 6167 | } |
| 6168 | |
| 6169 | /** |
| 6170 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 6171 | * |
| 6172 | * Logged from: |
| 6173 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 6174 | */ |
| 6175 | message GnssConfigurationReported { |
| 6176 | // SUPL host name. |
| 6177 | optional string supl_host = 1; |
| 6178 | |
| 6179 | // SUPL port number. |
| 6180 | optional int32 supl_port = 2; |
| 6181 | |
| 6182 | // C2K host name. |
| 6183 | optional string c2k_host = 3; |
| 6184 | |
| 6185 | // C2K port number. |
| 6186 | optional int32 c2k_port = 4; |
| 6187 | |
| 6188 | // The SUPL version requested by Carrier. |
| 6189 | optional int32 supl_ver = 5; |
| 6190 | |
| 6191 | // The SUPL mode. |
| 6192 | optional android.server.location.SuplMode supl_mode = 6; |
| 6193 | |
| 6194 | // True if NI emergency SUPL restrictions is enabled. |
| 6195 | optional bool supl_es = 7; |
| 6196 | |
| 6197 | // LTE Positioning Profile settings |
| 6198 | optional android.server.location.LppProfile lpp_profile = 8; |
| 6199 | |
| 6200 | // Positioning protocol on A-Glonass system. |
| 6201 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 6202 | |
| 6203 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 6204 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 6205 | |
| 6206 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 6207 | optional android.server.location.GpsLock gps_lock = 11; |
| 6208 | |
| 6209 | // Number of seconds to extend the emergency session duration post emergency call. |
| 6210 | optional int32 es_extension_sec = 12; |
| 6211 | |
| 6212 | // The full list of package names of proxy Android applications representing the non-framework |
| 6213 | // location access entities (on/off the device) for which the framework user has granted |
| 6214 | // non-framework location access permission. The package names are concatenated in one string |
| 6215 | // with spaces as separators. |
| 6216 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6217 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6218 | |
| 6219 | /** |
| 6220 | * Logs when a NFC device's error occurred. |
| 6221 | * Logged from: |
| 6222 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6223 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 6224 | */ |
| 6225 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6226 | enum Type { |
| 6227 | UNKNOWN = 0; |
| 6228 | CMD_TIMEOUT = 1; |
| 6229 | ERROR_NOTIFICATION = 2; |
| 6230 | AID_OVERFLOW = 3; |
| 6231 | } |
| 6232 | optional Type type = 1; |
| 6233 | // If it's nci cmd timeout, log the timeout command. |
| 6234 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6235 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6236 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6237 | } |
| 6238 | |
| 6239 | /** |
| 6240 | * Logs when a NFC device's state changed event |
| 6241 | * Logged from: |
| 6242 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 6243 | */ |
| 6244 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6245 | enum State { |
| 6246 | UNKNOWN = 0; |
| 6247 | OFF = 1; |
| 6248 | ON = 2; |
| 6249 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 6250 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 6251 | } |
| 6252 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6253 | } |
| 6254 | |
| 6255 | /** |
| 6256 | * Logs when a NFC Beam Transaction occurred. |
| 6257 | * Logged from: |
| 6258 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 6259 | */ |
| 6260 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6261 | enum Operation { |
| 6262 | UNKNOWN = 0; |
| 6263 | SEND = 1; |
| 6264 | RECEIVE = 2; |
| 6265 | } |
| 6266 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6267 | } |
| 6268 | |
| 6269 | /** |
| 6270 | * Logs when a NFC Card Emulation Transaction occurred. |
| 6271 | * Logged from: |
| 6272 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 6273 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 6274 | */ |
| 6275 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6276 | enum Category { |
| 6277 | UNKNOWN = 0; |
| 6278 | HCE_PAYMENT = 1; |
| 6279 | HCE_OTHER = 2; |
| 6280 | OFFHOST = 3; |
| 6281 | } |
| 6282 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 6283 | optional Category category = 1; |
| 6284 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 6285 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6286 | } |
| 6287 | |
| 6288 | /** |
| 6289 | * Logs when a NFC Tag event occurred. |
| 6290 | * Logged from: |
| 6291 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 6292 | */ |
| 6293 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6294 | enum Type { |
| 6295 | UNKNOWN = 0; |
| 6296 | URL = 1; |
| 6297 | BT_PAIRING = 2; |
| 6298 | PROVISION = 3; |
| 6299 | WIFI_CONNECT = 4; |
| 6300 | APP_LAUNCH = 5; |
| 6301 | OTHERS = 6; |
| 6302 | } |
| 6303 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6304 | } |
| 6305 | |
| 6306 | /** |
| 6307 | * Logs when Hce transaction triggered |
| 6308 | * Logged from: |
| 6309 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6310 | */ |
| 6311 | message NfcHceTransactionOccurred { |
| 6312 | // The latency period(in microseconds) it took for the first HCE data |
| 6313 | // exchange. |
| 6314 | optional uint32 latency_micros = 1; |
| 6315 | } |
| 6316 | |
| 6317 | /** |
| 6318 | * Logs when SecureElement state event changed |
| 6319 | * Logged from: |
| 6320 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 6321 | */ |
| 6322 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6323 | enum State { |
| 6324 | UNKNOWN = 0; |
| 6325 | INITIALIZED = 1; |
| 6326 | DISCONNECTED = 2; |
| 6327 | CONNECTED = 3; |
| 6328 | HALCRASH = 4; |
| 6329 | } |
| 6330 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6331 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6332 | optional string state_change_reason = 2; |
| 6333 | // SIMx or eSEx. |
| 6334 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6335 | } |
| 6336 | |
| 6337 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6338 | * Information about a permission grant request |
| 6339 | */ |
| 6340 | message PermissionGrantRequestResultReported { |
| 6341 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 6342 | optional int64 request_id = 1; |
| 6343 | |
| 6344 | // UID of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6345 | optional int32 uid = 2 [(is_uid) = true]; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6346 | |
| 6347 | // Name of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6348 | optional string package_name = 3; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6349 | |
| 6350 | // The permission to be granted |
| 6351 | optional string permission_name = 4; |
| 6352 | |
| 6353 | // If the permission was explicitly requested via the API or added by the system |
| 6354 | optional bool is_implicit = 5; |
| 6355 | |
| 6356 | enum Result { |
| 6357 | UNDEFINED = 0; |
| 6358 | // permission request was ignored |
| 6359 | IGNORED = 1; |
| 6360 | // permission request was ignored because it was user fixed |
| 6361 | IGNORED_USER_FIXED = 2; |
| 6362 | // permission request was ignored because it was policy fixed |
| 6363 | IGNORED_POLICY_FIXED = 3; |
| 6364 | // permission was granted by user action |
| 6365 | USER_GRANTED = 4; |
| 6366 | // permission was automatically granted |
| 6367 | AUTO_GRANTED = 5; |
| 6368 | // permission was denied by user action |
| 6369 | USER_DENIED = 6; |
| 6370 | // permission was denied with prejudice by the user |
| 6371 | USER_DENIED_WITH_PREJUDICE = 7; |
| 6372 | // permission was automatically denied |
| 6373 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 6374 | // permission request was ignored because permission is restricted |
| 6375 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 6376 | // one time permission was granted by user action |
| 6377 | USER_GRANTED_ONE_TIME = 10; |
Stanislav Zholnin | 8fde4fb | 2019-12-06 19:06:08 +0000 | [diff] [blame] | 6378 | // user ignored request by leaving the request screen without choosing any option |
| 6379 | USER_IGNORED = 11; |
Evan Severson | 7c1cc8a | 2019-12-17 14:36:17 -0800 | [diff] [blame] | 6380 | // user granted the permission after being linked to settings |
| 6381 | USER_GRANTED_IN_SETTINGS = 12; |
| 6382 | // user denied the permission after being linked to settings |
| 6383 | USER_DENIED_IN_SETTINGS = 13; |
| 6384 | // user denied the permission with prejudice after being linked to settings |
| 6385 | USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14; |
| 6386 | // permission was automatically revoked after one-time permission expired |
| 6387 | AUTO_ONE_TIME_PERMISSION_REVOKED = 15; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6388 | } |
| 6389 | // The result of the permission grant |
| 6390 | optional Result result = 6; |
| 6391 | } |
| 6392 | |
| 6393 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6394 | * Logs when Omapi API used |
| 6395 | * Logged from: |
| 6396 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 6397 | */ |
| 6398 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6399 | enum Operation { |
| 6400 | UNKNOWN = 0; |
| 6401 | OPEN_CHANNEL = 1; |
| 6402 | } |
| 6403 | optional Operation operation = 1; |
| 6404 | // SIMx or eSEx. |
| 6405 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6406 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6407 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6408 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6409 | |
| 6410 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6411 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 6412 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6413 | * Logged from: |
| 6414 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 6415 | */ |
| 6416 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6417 | optional int64 dispatch_latency_millis = 1; |
| 6418 | } |
| 6419 | |
| 6420 | /** |
| 6421 | * Logs AttentionManagerService attention check result. |
| 6422 | * |
| 6423 | * Logged from: |
| 6424 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 6425 | */ |
| 6426 | message AttentionManagerServiceResultReported { |
| 6427 | // See core/java/android/service/attention/AttentionService.java |
| 6428 | enum AttentionCheckResult { |
| 6429 | UNKNOWN = 20; |
| 6430 | ATTENTION_SUCCESS_ABSENT = 0; |
| 6431 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 6432 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 6433 | ATTENTION_FAILURE_CANCELLED = 3; |
| 6434 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 6435 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 6436 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6437 | } |
| 6438 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6439 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 6440 | |
| 6441 | /** |
| 6442 | * Logs when an adb connection changes state. |
| 6443 | * |
| 6444 | * Logged from: |
| 6445 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 6446 | */ |
| 6447 | message AdbConnectionChanged { |
| 6448 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 6449 | // previously selected for this system. |
| 6450 | optional int64 last_connection_time_millis = 1; |
| 6451 | |
| 6452 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 6453 | // to reconnect via adb without user interaction. |
| 6454 | optional int64 auth_window_millis = 2; |
| 6455 | |
| 6456 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 6457 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 6458 | |
| 6459 | // True if the 'always allow' option was selected for this system. |
| 6460 | optional bool always_allow = 4; |
| 6461 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 6462 | |
| 6463 | /* |
| 6464 | * Logs the reported speech DSP status. |
| 6465 | * |
| 6466 | * Logged from: |
| 6467 | * Vendor audio implementation. |
| 6468 | */ |
| 6469 | message SpeechDspStatReported { |
| 6470 | // The total Speech DSP uptime in milliseconds. |
| 6471 | optional int32 total_uptime_millis = 1; |
| 6472 | // The total Speech DSP downtime in milliseconds. |
| 6473 | optional int32 total_downtime_millis = 2; |
| 6474 | optional int32 total_crash_count = 3; |
| 6475 | optional int32 total_recover_count = 4; |
| 6476 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 6477 | |
| 6478 | /** |
| 6479 | * Logs USB connector contaminant status. |
| 6480 | * |
| 6481 | * Logged from: USB Service. |
| 6482 | */ |
| 6483 | message UsbContaminantReported { |
| 6484 | optional string id = 1; |
| 6485 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 6486 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 6487 | |
| 6488 | /** |
| 6489 | * This atom is for debugging purpose. |
| 6490 | */ |
| 6491 | message DebugElapsedClock { |
| 6492 | // Monotically increasing value for each pull. |
| 6493 | optional int64 pull_count = 1; |
| 6494 | // Time from System.elapsedRealtime. |
| 6495 | optional int64 elapsed_clock_millis = 2; |
| 6496 | // Time from System.elapsedRealtime. |
| 6497 | optional int64 same_elapsed_clock_millis = 3; |
| 6498 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6499 | optional int64 elapsed_clock_diff_millis = 4; |
| 6500 | |
| 6501 | enum Type { |
| 6502 | TYPE_UNKNOWN = 0; |
| 6503 | ALWAYS_PRESENT = 1; |
| 6504 | PRESENT_ON_ODD_PULLS = 2; |
| 6505 | } |
| 6506 | // Type of behavior for the pulled data. |
| 6507 | optional Type type = 5; |
| 6508 | } |
| 6509 | |
| 6510 | /** |
| 6511 | * This atom is for debugging purpose. |
| 6512 | */ |
| 6513 | message DebugFailingElapsedClock { |
| 6514 | // Monotically increasing value for each pull. |
| 6515 | optional int64 pull_count = 1; |
| 6516 | // Time from System.elapsedRealtime. |
| 6517 | optional int64 elapsed_clock_millis = 2; |
| 6518 | // Time from System.elapsedRealtime. |
| 6519 | optional int64 same_elapsed_clock_millis = 3; |
| 6520 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6521 | optional int64 elapsed_clock_diff_millis = 4; |
| 6522 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6523 | |
| 6524 | /** Logs System UI bubbles event changed. |
| 6525 | * |
| 6526 | * Logged from: |
| 6527 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 6528 | */ |
| 6529 | message BubbleUIChanged { |
| 6530 | |
| 6531 | // The app package that is posting the bubble. |
| 6532 | optional string package_name = 1; |
| 6533 | |
| 6534 | // The notification channel that is posting the bubble. |
| 6535 | optional string notification_channel = 2; |
| 6536 | |
| 6537 | // The notification id associated with the posted bubble. |
| 6538 | optional int32 notification_id = 3; |
| 6539 | |
| 6540 | // The position of the bubble within the bubble stack. |
| 6541 | optional int32 position = 4; |
| 6542 | |
| 6543 | // The total number of bubbles within the bubble stack. |
| 6544 | optional int32 total_number = 5; |
| 6545 | |
| 6546 | // User interactions with the bubble. |
| 6547 | enum Action { |
| 6548 | UNKNOWN = 0; |
| 6549 | POSTED = 1; |
| 6550 | UPDATED = 2; |
| 6551 | EXPANDED = 3; |
| 6552 | COLLAPSED = 4; |
| 6553 | DISMISSED = 5; |
| 6554 | STACK_DISMISSED = 6; |
| 6555 | STACK_MOVED = 7; |
| 6556 | HEADER_GO_TO_APP = 8; |
| 6557 | HEADER_GO_TO_SETTINGS = 9; |
| 6558 | PERMISSION_OPT_IN = 10; |
| 6559 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 6560 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6561 | SWIPE_LEFT = 13; |
| 6562 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 6563 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 6564 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6565 | } |
| 6566 | optional Action action = 6; |
| 6567 | |
| 6568 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 6569 | optional float normalized_x_position = 7; |
| 6570 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 6571 | |
| 6572 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 6573 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 6574 | |
| 6575 | // Whether the bubble is an on-going one. |
| 6576 | optional bool is_ongoing = 10; |
| 6577 | |
| 6578 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 6579 | // This is deprecated and the value should be ignored. |
| 6580 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6581 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6582 | |
| 6583 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 6584 | * Logs System UI bubbles developer errors. |
| 6585 | * |
| 6586 | * Logged from: |
| 6587 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 6588 | */ |
| 6589 | message BubbleDeveloperErrorReported { |
| 6590 | |
| 6591 | // The app package that is posting the bubble. |
| 6592 | optional string package_name = 1; |
| 6593 | |
| 6594 | // Bubble developer error type enums. |
| 6595 | enum Error { |
| 6596 | UNKNOWN = 0; |
| 6597 | ACTIVITY_INFO_MISSING = 1; |
| 6598 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 6599 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 6600 | } |
| 6601 | optional Error error = 2 [default = UNKNOWN]; |
| 6602 | } |
| 6603 | |
| 6604 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6605 | * Logs that a constraint for a scheduled job has changed. |
| 6606 | * |
| 6607 | * Logged from: |
| 6608 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 6609 | */ |
| 6610 | message ScheduledJobConstraintChanged { |
| 6611 | repeated AttributionNode attribution_node = 1; |
| 6612 | |
| 6613 | // Name of the job. |
| 6614 | optional string job_name = 2; |
| 6615 | |
| 6616 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 6617 | |
| 6618 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 6619 | UNKNOWN = 0; |
| 6620 | UNSATISFIED = 1; |
| 6621 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6622 | } |
| 6623 | optional State state = 4; |
| 6624 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6625 | |
| 6626 | /** |
| 6627 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 6628 | * returns true. |
| 6629 | * |
| 6630 | * Logged from: |
| 6631 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 6632 | */ |
| 6633 | message ScreenTimeoutExtensionReported { |
| 6634 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 6635 | optional uint32 consecutive_timeout_extended_count = 1; |
| 6636 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 6637 | |
| 6638 | /* |
| 6639 | * Logs number of milliseconds it takes to start a process. |
| 6640 | * The definition of app process start time is from the app launch time to |
| 6641 | * the time that Zygote finished forking the app process and loaded the |
| 6642 | * application package's java classes. |
| 6643 | |
| 6644 | * This metric is different from AppStartOccurred which is for foreground |
| 6645 | * activity only. |
| 6646 | |
| 6647 | * ProcessStartTime can report all processes (both foreground and background) |
| 6648 | * start time. |
| 6649 | * |
| 6650 | * Logged from: |
| 6651 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6652 | */ |
| 6653 | message ProcessStartTime { |
| 6654 | // The uid of the ProcessRecord. |
| 6655 | optional int32 uid = 1 [(is_uid) = true]; |
| 6656 | |
| 6657 | // The process pid. |
| 6658 | optional int32 pid = 2; |
| 6659 | |
| 6660 | // The process name. |
| 6661 | // Usually package name, "system" for system server. |
| 6662 | // Provided by ActivityManagerService. |
| 6663 | optional string process_name = 3; |
| 6664 | |
| 6665 | enum StartType { |
| 6666 | UNKNOWN = 0; |
| 6667 | WARM = 1; |
| 6668 | HOT = 2; |
| 6669 | COLD = 3; |
| 6670 | } |
| 6671 | |
| 6672 | // The start type. |
| 6673 | optional StartType type = 4; |
| 6674 | |
| 6675 | // The elapsed realtime at the start of the process. |
| 6676 | optional int64 process_start_time_millis = 5; |
| 6677 | |
| 6678 | // Number of milliseconds it takes to reach bind application. |
| 6679 | optional int32 bind_application_delay_millis = 6; |
| 6680 | |
| 6681 | // Number of milliseconds it takes to finish start of the process. |
| 6682 | optional int32 process_start_delay_millis = 7; |
| 6683 | |
| 6684 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 6685 | // "service", "content provider", "broadcast" or other strings. |
| 6686 | optional string hosting_type = 8; |
| 6687 | |
| 6688 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 6689 | // in this process. |
| 6690 | optional string hosting_name = 9; |
| 6691 | } |
| 6692 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6693 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 6694 | * Track Media Codec usage |
| 6695 | * Logged from: |
| 6696 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 6697 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 6698 | */ |
| 6699 | message MediametricsCodecReported { |
| 6700 | optional int64 timestamp_nanos = 1; |
| 6701 | optional string package_name = 2; |
| 6702 | optional int64 package_version_code = 3; |
| 6703 | optional int64 media_apex_version = 4; |
| 6704 | |
| 6705 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6706 | } |
| 6707 | |
| 6708 | /** |
| 6709 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 6710 | * Logged from: |
| 6711 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 6712 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 6713 | */ |
| 6714 | message MediametricsExtractorReported { |
| 6715 | optional int64 timestamp_nanos = 1; |
| 6716 | optional string package_name = 2; |
| 6717 | optional int64 package_version_code = 3; |
| 6718 | optional int64 media_apex_version = 4; |
| 6719 | |
| 6720 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6721 | } |
| 6722 | |
| 6723 | /** |
| 6724 | * Track how we arbitrate between microphone/input requests. |
| 6725 | * Logged from |
| 6726 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 6727 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 6728 | */ |
| 6729 | message MediametricsAudiopolicyReported { |
| 6730 | optional int64 timestamp_nanos = 1; |
| 6731 | optional string package_name = 2; |
| 6732 | optional int64 package_version_code = 3; |
| 6733 | optional int64 media_apex_version = 4; |
| 6734 | |
| 6735 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6736 | } |
| 6737 | |
| 6738 | /** |
| 6739 | * Track how we arbitrate between microphone requests. |
| 6740 | * Logged from |
| 6741 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 6742 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 6743 | */ |
| 6744 | message MediametricsAudiorecordReported { |
| 6745 | optional int64 timestamp_nanos = 1; |
| 6746 | optional string package_name = 2; |
| 6747 | optional int64 package_version_code = 3; |
| 6748 | optional int64 media_apex_version = 4; |
| 6749 | |
| 6750 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6751 | } |
| 6752 | |
| 6753 | /** |
| 6754 | * Track how we arbitrate between microphone/input requests. |
| 6755 | * Logged from |
| 6756 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 6757 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 6758 | */ |
| 6759 | message MediametricsAudiothreadReported { |
| 6760 | optional int64 timestamp_nanos = 1; |
| 6761 | optional string package_name = 2; |
| 6762 | optional int64 package_version_code = 3; |
| 6763 | optional int64 media_apex_version = 4; |
| 6764 | |
| 6765 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6766 | } |
| 6767 | |
| 6768 | /** |
| 6769 | * Track how we arbitrate between microphone/input requests. |
| 6770 | * Logged from |
| 6771 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 6772 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 6773 | */ |
| 6774 | message MediametricsAudiotrackReported { |
| 6775 | optional int64 timestamp_nanos = 1; |
| 6776 | optional string package_name = 2; |
| 6777 | optional int64 package_version_code = 3; |
| 6778 | optional int64 media_apex_version = 4; |
| 6779 | |
| 6780 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6781 | } |
| 6782 | |
| 6783 | /** |
| 6784 | * Track information about DRM framework performance |
| 6785 | * Logged from |
| 6786 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 6787 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6788 | */ |
| 6789 | message MediametricsMediadrmReported { |
| 6790 | optional int64 timestamp_nanos = 1; |
| 6791 | optional string package_name = 2; |
| 6792 | optional int64 package_version_code = 3; |
| 6793 | optional int64 media_apex_version = 4; |
| 6794 | |
| 6795 | // vendor+description tell about which DRM plugin is in use on this device |
| 6796 | optional string vendor = 5; |
| 6797 | optional string description = 6; |
| 6798 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 6799 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6800 | } |
| 6801 | |
| 6802 | /** |
| 6803 | * Track information about the widevine DRM plugin performance |
| 6804 | * Logged from |
| 6805 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 6806 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6807 | */ |
| 6808 | message MediametricsDrmWidevineReported { |
| 6809 | optional int64 timestamp_nanos = 1; |
| 6810 | optional string package_name = 2; |
| 6811 | optional int64 package_version_code = 3; |
| 6812 | optional int64 media_apex_version = 4; |
| 6813 | |
| 6814 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6815 | } |
| 6816 | |
| 6817 | /** |
| 6818 | * Track information about recordings (e.g. camcorder) |
| 6819 | * Logged from |
| 6820 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 6821 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 6822 | */ |
| 6823 | message MediametricsRecorderReported { |
| 6824 | optional int64 timestamp_nanos = 1; |
| 6825 | optional string package_name = 2; |
| 6826 | optional int64 package_version_code = 3; |
| 6827 | optional int64 media_apex_version = 4; |
| 6828 | |
| 6829 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6830 | } |
| 6831 | |
| 6832 | /** |
| 6833 | * Track Media Player usage |
| 6834 | * Logged from: |
| 6835 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 6836 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 6837 | */ |
| 6838 | message MediametricsNuPlayerReported { |
| 6839 | optional int64 timestamp_nanos = 1; |
| 6840 | optional string package_name = 2; |
| 6841 | optional int64 package_version_code = 3; |
| 6842 | optional int64 media_apex_version = 4; |
| 6843 | |
| 6844 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6845 | } |
| 6846 | |
| 6847 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 6848 | * Track Legacy DRM usage |
| 6849 | * Logged from |
| 6850 | * frameworks/av/drm/drmserver/DrmManager.cpp |
| 6851 | */ |
| 6852 | message MediametricsDrmManagerReported { |
| 6853 | optional int64 timestamp_nanos = 1; |
| 6854 | optional string package_name = 2; |
| 6855 | optional int64 package_version_code = 3; |
| 6856 | optional int64 media_apex_version = 4; |
| 6857 | |
| 6858 | enum Method { |
| 6859 | METHOD_NOT_FOUND = -1; |
| 6860 | GET_CONSTRAINTS = 0; |
| 6861 | GET_METADATA = 1; |
| 6862 | CAN_HANDLE = 2; |
| 6863 | PROCESS_DRM_INFO = 3; |
| 6864 | ACQUIRE_DRM_INFO = 4; |
| 6865 | SAVE_RIGHTS = 5; |
| 6866 | GET_ORIGINAL_MIME_TYPE = 6; |
| 6867 | GET_DRM_OBJECT_TYPE = 7; |
| 6868 | CHECK_RIGHTS_STATUS = 8; |
| 6869 | REMOVE_RIGHTS = 9; |
| 6870 | REMOVE_ALL_RIGHTS = 10; |
| 6871 | OPEN_CONVERT_SESSION = 11; |
| 6872 | OPEN_DECRYPT_SESSION = 12; |
| 6873 | } |
| 6874 | |
| 6875 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 6876 | optional string plugin_id = 5; |
| 6877 | optional string description = 6; |
| 6878 | optional Method method = 7; |
| 6879 | optional string mime_types = 8; |
| 6880 | } |
| 6881 | |
| 6882 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6883 | * State of a dangerous permission requested by a package |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 6884 | * Pulled from: StatsCompanionService |
| 6885 | */ |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6886 | message DangerousPermissionState { |
| 6887 | // Name of the permission |
| 6888 | optional string permission_name = 1; |
| 6889 | |
| 6890 | // Uid of the package |
| 6891 | optional int32 uid = 2 [(is_uid) = true]; |
| 6892 | |
| 6893 | // Package requesting the permission |
| 6894 | optional string package_name = 3; |
| 6895 | |
| 6896 | // If the permission is granted to the uid |
| 6897 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 6898 | |
| 6899 | // Permission flags as per android.content.pm.PermissionFlags |
| 6900 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6901 | } |
| 6902 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6903 | /** |
| 6904 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 6905 | * |
| 6906 | * Logged from: |
| 6907 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 6908 | */ |
| 6909 | message DeviceIdentifierAccessDenied { |
| 6910 | // The name of the package denied access to the requested device identifier. |
| 6911 | optional string package_name = 1; |
| 6912 | |
| 6913 | // The name of the device identifier method the package attempted to invoke. |
| 6914 | optional string method_name = 2; |
| 6915 | |
| 6916 | // True if the package is preinstalled. |
| 6917 | optional bool is_preinstalled = 3; |
| 6918 | |
| 6919 | // True if the package is privileged. |
Sooraj Sasindran | 22b53f4 | 2019-11-27 15:57:33 -0800 | [diff] [blame] | 6920 | // Starting from Android 11, this boolean is not set and will always be false. |
| 6921 | optional bool is_priv_app = 4 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6922 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6923 | |
| 6924 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6925 | * Pulls the ongoing mainline install train version code. |
| 6926 | * Pulled from StatsCompanionService |
| 6927 | */ |
| 6928 | message TrainInfo { |
| 6929 | optional int64 train_version_code = 1; |
| 6930 | |
| 6931 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6932 | |
| 6933 | optional string train_name = 3; |
| 6934 | |
| 6935 | enum Status { |
| 6936 | UNKNOWN = 0; |
| 6937 | INSTALL_REQUESTED = 1; |
| 6938 | INSTALL_STARTED = 2; |
| 6939 | INSTALL_STAGED_NOT_READY = 3; |
| 6940 | INSTALL_STAGED_READY = 4; |
| 6941 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6942 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 6943 | // and INSTALL_FAILURE_COMMIT. |
| 6944 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 6945 | // 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] | 6946 | INSTALL_CANCELLED = 7; |
| 6947 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 6948 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 6949 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 6950 | INSTALLER_ROLLBACK_STAGED = 11; |
| 6951 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 6952 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 6953 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 6954 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 6955 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 6956 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 6957 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 6958 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 6959 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 6960 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 6961 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6962 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 6963 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 6964 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 6965 | REBOOT_TRIGGERED = 26; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6966 | } |
| 6967 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6968 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6969 | |
| 6970 | /** |
| 6971 | * Logs the gesture stage changed event. |
| 6972 | * |
| 6973 | * Logged from: |
| 6974 | * frameworks/base/packages/SystemUI/ |
| 6975 | */ |
| 6976 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6977 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6978 | } |
| 6979 | |
| 6980 | /** |
| 6981 | * Logs the feedback type. |
| 6982 | * |
| 6983 | * Logged from: |
| 6984 | * frameworks/base/packages/SystemUI/ |
| 6985 | */ |
| 6986 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6987 | // Whether or not the gesture was used. |
| 6988 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6989 | } |
| 6990 | |
| 6991 | /** |
| 6992 | * Logs the progress. |
| 6993 | * |
| 6994 | * Logged from: |
| 6995 | * frameworks/base/packages/SystemUI/ |
| 6996 | */ |
| 6997 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6998 | // [0,100] progress for the assist gesture. |
| 6999 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7000 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 7001 | |
| 7002 | /* |
| 7003 | * Information about the time zone data on a device. |
| 7004 | */ |
| 7005 | message TimeZoneDataInfo { |
| 7006 | // A version identifier for the data set on device. e.g. "2018i" |
| 7007 | optional string tzdb_version = 1; |
| 7008 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7009 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7010 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7011 | * Logs the GPU stats global health information. |
| 7012 | * |
| 7013 | * Logged from: |
| 7014 | * frameworks/native/services/gpuservice/gpustats/ |
| 7015 | */ |
| 7016 | message GpuStatsGlobalInfo { |
| 7017 | // Package name of the gpu driver. |
| 7018 | optional string driver_package_name = 1; |
| 7019 | |
| 7020 | // Version name of the gpu driver. |
| 7021 | optional string driver_version_name = 2; |
| 7022 | |
| 7023 | // Version code of the gpu driver. |
| 7024 | optional int64 driver_version_code = 3; |
| 7025 | |
| 7026 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 7027 | optional int64 driver_build_time = 4; |
| 7028 | |
| 7029 | // Total count of the gl driver gets loaded. |
| 7030 | optional int64 gl_loading_count = 5; |
| 7031 | |
| 7032 | // Total count of the gl driver fails to be loaded. |
| 7033 | optional int64 gl_loading_failure_count = 6; |
| 7034 | |
| 7035 | // Total count of the Vulkan driver gets loaded. |
| 7036 | optional int64 vk_loading_count = 7; |
| 7037 | |
| 7038 | // Total count of the Vulkan driver fails to be loaded. |
| 7039 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 7040 | |
| 7041 | // Api version of the system Vulkan driver. |
| 7042 | optional int32 vulkan_version = 9; |
| 7043 | |
| 7044 | // Api version of the system CPU Vulkan driver. |
| 7045 | optional int32 cpu_vulkan_version = 10; |
| 7046 | |
| 7047 | // Api version of the system GLES driver. |
| 7048 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7049 | |
| 7050 | // Total count of the angle driver gets loaded. |
| 7051 | optional int64 angle_loading_count = 12; |
| 7052 | |
| 7053 | // Total count of the angle driver fails to be loaded. |
| 7054 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7055 | } |
| 7056 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7057 | /** |
| 7058 | * GPU driver loading time info. |
| 7059 | */ |
| 7060 | message GpuDriverLoadingTime { |
| 7061 | // List of all the driver loading times for this app. The list size is |
| 7062 | // capped at 50. |
| 7063 | repeated int64 driver_loading_time = 1; |
| 7064 | } |
| 7065 | |
| 7066 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7067 | * Logs the GPU stats per app health information. |
| 7068 | * |
| 7069 | * Logged from: |
| 7070 | * frameworks/native/services/gpuservice/gpustats/ |
| 7071 | */ |
| 7072 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7073 | // Package name of the application that loads the gpu driver. Total number |
| 7074 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7075 | optional string app_package_name = 1; |
| 7076 | |
| 7077 | // Version code of the gpu driver this app loads. |
| 7078 | optional int64 driver_version_code = 2; |
| 7079 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7080 | // gl driver loading time info. |
| 7081 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 7082 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7083 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7084 | // Vulkan driver loading time info. |
| 7085 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 7086 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7087 | |
| 7088 | // Angle driver loading time info. |
| 7089 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 7090 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 7091 | |
| 7092 | // CPU Vulkan implementation is in use. |
| 7093 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 7094 | |
| 7095 | // App is not doing pre-rotation correctly. |
| 7096 | optional bool false_prerotation = 7; |
Yiwei Zhang | f02cf6b | 2019-12-20 14:51:07 -0800 | [diff] [blame] | 7097 | |
| 7098 | // App creates GLESv1 context. |
| 7099 | optional bool gles_1_in_use = 8; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7100 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7101 | |
| 7102 | /* |
| 7103 | * Logs the size of the system ion heap. |
| 7104 | * |
| 7105 | * Pulled from StatsCompanionService. |
| 7106 | */ |
| 7107 | message SystemIonHeapSize { |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7108 | // Deprecated due to limited support of ion stats in debugfs. |
| 7109 | // Use `IonHeapSize` instead. |
| 7110 | option deprecated = true; |
| 7111 | |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7112 | // Size of the system ion heap in bytes. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7113 | // Read from debugfs. |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7114 | optional int64 size_in_bytes = 1; |
| 7115 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7116 | |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7117 | /* |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7118 | * Logs the total size of the ion heap. |
| 7119 | * |
| 7120 | * Pulled from StatsCompanionService. |
| 7121 | */ |
| 7122 | message IonHeapSize { |
| 7123 | // Total size of all ion heaps in kilobytes. |
| 7124 | // Read from: /sys/kernel/ion/total_heaps_kb. |
| 7125 | optional int32 total_size_kb = 1; |
| 7126 | } |
| 7127 | |
| 7128 | /* |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7129 | * Logs the per-process size of the system ion heap. |
| 7130 | * |
| 7131 | * Pulled from StatsCompanionService. |
| 7132 | */ |
| 7133 | message ProcessSystemIonHeapSize { |
| 7134 | // The uid if available. -1 means not available. |
| 7135 | optional int32 uid = 1 [(is_uid) = true]; |
| 7136 | |
| 7137 | // The process name (from /proc/PID/cmdline). |
| 7138 | optional string process_name = 2; |
| 7139 | |
| 7140 | // Sum of sizes of all allocations. |
| 7141 | optional int32 total_size_in_kilobytes = 3; |
| 7142 | |
| 7143 | // Number of allocations. |
| 7144 | optional int32 allocation_count = 4; |
| 7145 | |
| 7146 | // Size of the largest allocation. |
| 7147 | optional int32 max_size_in_kilobytes = 5; |
| 7148 | } |
| 7149 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7150 | /** |
| 7151 | * Push network stack events. |
| 7152 | * |
| 7153 | * Log from: |
| 7154 | * frameworks/base/packages/NetworkStack/ |
| 7155 | */ |
| 7156 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 7157 | // The id that indicates the event reported from NetworkStack. |
| 7158 | optional int32 event_id = 1; |
| 7159 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7160 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 7161 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 7162 | |
| 7163 | /** |
| 7164 | * Logs the apps that are installed on the external storage. |
| 7165 | * Pulled from: |
| 7166 | * StatsCompanionService |
| 7167 | */ |
| 7168 | message AppsOnExternalStorageInfo { |
| 7169 | // The type of the external storage. |
| 7170 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 7171 | // The name of the package that is installed on the external storage. |
| 7172 | optional string package_name = 2; |
| 7173 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 7174 | |
| 7175 | /** |
| 7176 | * Logs the settings related to Face. |
| 7177 | * Logged from: |
| 7178 | * frameworks/base/services/core/java/com/android/server/stats |
| 7179 | */ |
| 7180 | message FaceSettings { |
| 7181 | // Whether or not face unlock is allowed on Keyguard. |
| 7182 | optional bool unlock_keyguard_enabled = 1; |
| 7183 | // Whether or not face unlock dismisses the Keyguard. |
| 7184 | optional bool unlock_dismisses_keyguard = 2; |
| 7185 | // Whether or not face unlock requires attention. |
| 7186 | optional bool unlock_attention_required = 3; |
| 7187 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 7188 | optional bool unlock_app_enabled = 4; |
| 7189 | // Whether or not face unlock always requires user confirmation. |
| 7190 | optional bool unlock_always_require_confirmation = 5; |
| 7191 | // Whether or not a diverse set of poses are required during enrollment. |
| 7192 | optional bool unlock_diversity_required = 6; |
| 7193 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 7194 | |
| 7195 | /** |
| 7196 | * Logs cooling devices maintained by the kernel. |
| 7197 | * |
| 7198 | * Pulled from StatsCompanionService.java |
| 7199 | */ |
| 7200 | message CoolingDevice { |
| 7201 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 7202 | optional android.os.CoolingTypeEnum device_location = 1; |
| 7203 | // The name of the cooling device source. Eg. CPU0 |
| 7204 | optional string device_name = 2; |
| 7205 | // Current throttle state of the cooling device. The value can any unsigned |
| 7206 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 7207 | // not in throttling, higher value means deeper throttling. |
| 7208 | optional int32 state = 3; |
| 7209 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7210 | |
| 7211 | /** |
| 7212 | * Intelligence has several counter-type events that don't warrant a |
| 7213 | * full separate atom. These are primarily API call counters but also include |
| 7214 | * counters for feature usage and specific failure modes. |
| 7215 | * |
| 7216 | * Logged from the Intelligence mainline module. |
| 7217 | */ |
| 7218 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7219 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7220 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7221 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7222 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7223 | // How many times the event occured (to report a batch of high frequency events). |
| 7224 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 7225 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7226 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7227 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 7228 | |
| 7229 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 7230 | * Logs when Car Power state changed. |
| 7231 | * |
| 7232 | * Logged from: |
| 7233 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7234 | */ |
| 7235 | message CarPowerStateChanged { |
| 7236 | // States come from CpmsState in CarPowerManagementService.java. |
| 7237 | enum State { |
| 7238 | WAIT_FOR_VHAL = 0; |
| 7239 | ON = 1; |
| 7240 | SHUTDOWN_PREPARE = 2; |
| 7241 | WAIT_FOR_FINISH = 3; |
| 7242 | SUSPEND = 4; |
| 7243 | SIMULATE_SLEEP = 5; |
| 7244 | } |
| 7245 | optional State state = 1; |
| 7246 | } |
| 7247 | |
| 7248 | /** |
| 7249 | * Logs whether GarageMode is entered. |
| 7250 | * |
| 7251 | * Logged from: |
| 7252 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7253 | */ |
| 7254 | message GarageModeInfo { |
| 7255 | // Whether GarageMode is entered. |
| 7256 | optional bool is_garage_mode = 1; |
| 7257 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7258 | |
| 7259 | /** |
| 7260 | * Historical app ops data per package. |
| 7261 | */ |
| 7262 | message AppOps { |
| 7263 | // Uid of the package requesting the op |
| 7264 | optional int32 uid = 1 [(is_uid) = true]; |
| 7265 | |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 7266 | // Name of the package performing the op |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7267 | optional string package_name = 2; |
| 7268 | |
| 7269 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 7270 | optional int32 op_id = 3; |
| 7271 | |
| 7272 | // The number of times the op was granted while the app was in the |
| 7273 | // foreground (only for trusted requests) |
| 7274 | optional int64 trusted_foreground_granted_count = 4; |
| 7275 | |
| 7276 | // The number of times the op was granted while the app was in the |
| 7277 | // background (only for trusted requests) |
| 7278 | optional int64 trusted_background_granted_count = 5; |
| 7279 | |
| 7280 | // The number of times the op was rejected while the app was in the |
| 7281 | // foreground (only for trusted requests) |
| 7282 | optional int64 trusted_foreground_rejected_count = 6; |
| 7283 | |
| 7284 | // The number of times the op was rejected while the app was in the |
| 7285 | // background (only for trusted requests) |
| 7286 | optional int64 trusted_background_rejected_count = 7; |
| 7287 | |
| 7288 | // For long-running operations, total duration of the operation |
| 7289 | // while the app was in the foreground (only for trusted requests) |
| 7290 | optional int64 trusted_foreground_duration_millis = 8; |
| 7291 | |
| 7292 | // For long-running operations, total duration of the operation |
| 7293 | // while the app was in the background (only for trusted requests) |
| 7294 | optional int64 trusted_background_duration_millis = 9; |
Stanislav Zholnin | 42d710e | 2019-11-28 13:11:54 +0000 | [diff] [blame] | 7295 | |
| 7296 | // Whether AppOps is guarded by Runtime permission |
| 7297 | optional bool is_runtime_permission = 10; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7298 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 7299 | |
| 7300 | /** |
| 7301 | * Location Manager API Usage information(e.g. API under usage, |
| 7302 | * API call's parameters). |
| 7303 | * Logged from: |
| 7304 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 7305 | */ |
| 7306 | message LocationManagerApiUsageReported { |
| 7307 | |
| 7308 | // Indicating if usage starts or usage ends. |
| 7309 | optional android.stats.location.UsageState state = 1; |
| 7310 | |
| 7311 | // LocationManagerService's API in use. |
| 7312 | // We can identify which API from LocationManager is |
| 7313 | // invoking current LMS API by the combination of |
| 7314 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 7315 | // is_location_request_null) |
| 7316 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 7317 | |
| 7318 | // Name of the package calling the API. |
| 7319 | optional string calling_package_name = 3; |
| 7320 | |
| 7321 | // Type of the location provider. |
| 7322 | optional android.stats.location.ProviderType provider = 4; |
| 7323 | |
| 7324 | // Quality of the location request |
| 7325 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 7326 | |
| 7327 | // The desired interval for active location updates, in milliseconds. |
| 7328 | // Bucketized to reduce cardinality. |
| 7329 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 7330 | |
| 7331 | // Minimum distance between location updates, in meters. |
| 7332 | // Bucketized to reduce cardinality. |
| 7333 | optional android.stats.location.SmallestDisplacementBucket |
| 7334 | bucketized_smallest_displacement = 7; |
| 7335 | |
| 7336 | // The number of location updates. |
| 7337 | optional int64 num_updates = 8; |
| 7338 | |
| 7339 | // The request expiration time, in millisecond since boot. |
| 7340 | // Bucketized to reduce cardinality. |
| 7341 | optional android.stats.location.ExpirationBucket |
| 7342 | bucketized_expire_in = 9; |
| 7343 | |
| 7344 | // Type of Callback passed in for this API. |
| 7345 | optional android.stats.location.CallbackType callback_type = 10; |
| 7346 | |
| 7347 | // The radius of the central point of the alert |
| 7348 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 7349 | // Bucketized to reduce cardinality. |
| 7350 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 7351 | |
| 7352 | // Activity Importance of API caller. |
| 7353 | // Categorized to 3 types that are interesting from location's perspective. |
| 7354 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 7355 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 7356 | |
| 7357 | /** |
| 7358 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 7359 | */ |
| 7360 | message ReviewPermissionsFragmentResultReported { |
| 7361 | // unique value identifying a permission group change. A permission group change might result |
| 7362 | // in multiple of these atoms |
| 7363 | optional int64 change_id = 1; |
| 7364 | |
| 7365 | // UID of package the permission belongs to |
| 7366 | optional int32 uid = 2 [(is_uid) = true]; |
| 7367 | |
| 7368 | // Name of package the permission belongs to |
| 7369 | optional string package_name = 3; |
| 7370 | |
| 7371 | // The permission to be granted |
| 7372 | optional string permission_name = 4; |
| 7373 | |
| 7374 | // The result of the permission grant |
| 7375 | optional bool permission_granted = 5; |
| 7376 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 7377 | |
| 7378 | /** |
| 7379 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 7380 | * Logged from: RuntimePermissionUpdgradeController |
| 7381 | */ |
| 7382 | message RuntimePermissionsUpgradeResult { |
| 7383 | // Permission granted as result of upgrade |
| 7384 | optional string permission_name = 1; |
| 7385 | |
| 7386 | // UID of package granted permission |
| 7387 | optional int32 uid = 2 [(is_uid) = true]; |
| 7388 | |
| 7389 | // Name of package granted permission |
| 7390 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 7391 | } |
| 7392 | |
| 7393 | /** |
| 7394 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 7395 | */ |
| 7396 | message GrantPermissionsActivityButtonActions { |
| 7397 | // Permission granted as result of upgrade |
| 7398 | optional string permission_group_name = 1; |
| 7399 | |
| 7400 | // UID of package granted permission |
| 7401 | optional int32 uid = 2 [(is_uid) = true]; |
| 7402 | |
| 7403 | // Name of package requesting permission |
| 7404 | optional string package_name = 3; |
| 7405 | |
| 7406 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 7407 | // LABEL_ constants in GrantPermissionActivity.java |
| 7408 | optional int32 buttons_presented = 4; |
| 7409 | |
| 7410 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 7411 | optional int32 button_clicked = 5; |
| 7412 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 7413 | |
| 7414 | /** |
| 7415 | * Information about LocationAccessCheck notification presented to user |
| 7416 | */ |
| 7417 | message LocationAccessCheckNotificationAction { |
| 7418 | |
| 7419 | // id which identifies single session of user interacting with permission controller |
| 7420 | optional int64 session_id = 1; |
| 7421 | |
| 7422 | // Uid of package for which location access check is presented |
| 7423 | optional int32 package_uid = 2; |
| 7424 | |
| 7425 | // Name of package for which location access check is presented |
| 7426 | optional string package_name = 3; |
| 7427 | |
| 7428 | enum Result { |
| 7429 | UNDEFINED = 0; |
| 7430 | // notification was presented to the user |
| 7431 | NOTIFICATION_PRESENTED = 1; |
| 7432 | // notification was declined by the user |
| 7433 | NOTIFICATION_DECLINED = 2; |
| 7434 | // notification was clicked by the user |
| 7435 | NOTIFICATION_CLICKED = 3; |
| 7436 | } |
| 7437 | |
| 7438 | // View / interaction recorded |
| 7439 | optional Result result = 4; |
| 7440 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 7441 | |
| 7442 | /** |
| 7443 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 7444 | */ |
| 7445 | message AppPermissionFragmentActionReported { |
| 7446 | // id which identifies single session of user interacting with permission controller |
| 7447 | optional int64 session_id = 1; |
| 7448 | |
| 7449 | // unique value identifying a permission group change. A permission group change might result |
| 7450 | // in multiple of these atoms |
| 7451 | optional int64 change_id = 2; |
| 7452 | |
| 7453 | // UID of package the permission belongs to |
| 7454 | optional int32 uid = 3 [(is_uid) = true]; |
| 7455 | |
| 7456 | // Name of package the permission belongs to |
| 7457 | optional string package_name = 4; |
| 7458 | |
| 7459 | // The permission to be granted |
| 7460 | optional string permission_name = 5; |
| 7461 | |
| 7462 | // The result of the permission grant |
| 7463 | optional bool permission_granted = 6; |
| 7464 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 7465 | |
| 7466 | /** |
| 7467 | * Information about a AppPermissionFragment viewed by user |
| 7468 | */ |
| 7469 | message AppPermissionFragmentViewed { |
| 7470 | // id which identifies single session of user interacting with permission controller |
| 7471 | optional int64 session_id = 1; |
| 7472 | |
| 7473 | // UID of package for which permissions are viewed |
| 7474 | optional int32 uid = 2 [(is_uid) = true]; |
| 7475 | |
| 7476 | // Name of package for which permissions are viewed |
| 7477 | optional string package_name = 3; |
| 7478 | |
| 7479 | // Permission group viewed |
| 7480 | optional string permission_group_name = 4; |
| 7481 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 7482 | |
| 7483 | /** |
| 7484 | * Information about a AppPermissionsFragment viewed by user |
| 7485 | */ |
| 7486 | message AppPermissionsFragmentViewed { |
| 7487 | // id which identifies single session of user interacting with permission controller |
| 7488 | optional int64 session_id = 1; |
| 7489 | |
| 7490 | // id which identifies single view as every view might have several logging records |
| 7491 | // with different package information attached |
| 7492 | optional int64 view_id = 2; |
| 7493 | |
| 7494 | // Permission group viewed |
| 7495 | optional string permission_group_name = 3; |
| 7496 | |
| 7497 | // UID of package for which permissions are viewed |
| 7498 | optional int32 uid = 4 [(is_uid) = true]; |
| 7499 | |
| 7500 | // Name of package for which permissions are viewed |
| 7501 | optional string package_name = 5; |
| 7502 | |
| 7503 | // Category in which permission is included |
| 7504 | enum Category { |
| 7505 | UNDEFINED = 0; |
| 7506 | ALLOWED = 1; |
| 7507 | ALLOWED_FOREGROUND = 2; |
| 7508 | DENIED = 3; |
| 7509 | } |
| 7510 | optional Category category = 6; |
| 7511 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 7512 | |
| 7513 | /** |
| 7514 | * Information about a PermissionAppsFragment viewed by user. |
| 7515 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 7516 | */ |
| 7517 | message PermissionAppsFragmentViewed { |
| 7518 | // id which identifies single session of user interacting with permission controller |
| 7519 | optional int64 session_id = 1; |
| 7520 | |
| 7521 | // id which identifies single view as every view might have several logging records |
| 7522 | // with different package information attached |
| 7523 | optional int64 view_id = 2; |
| 7524 | |
| 7525 | // Permission group viewed |
| 7526 | optional string permission_group_name = 3; |
| 7527 | |
| 7528 | // UID of package for which permissions are viewed |
| 7529 | optional int32 uid = 4 [(is_uid) = true]; |
| 7530 | |
| 7531 | // Name of package for which permissions are viewed |
| 7532 | optional string package_name = 5; |
| 7533 | |
| 7534 | // Category in which app is included |
| 7535 | enum Category { |
| 7536 | UNDEFINED = 0; |
| 7537 | ALLOWED = 1; |
| 7538 | ALLOWED_FOREGROUND = 2; |
| 7539 | DENIED = 3; |
| 7540 | } |
| 7541 | optional Category category = 6; |
| 7542 | } |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7543 | |
| 7544 | /** |
| 7545 | * Logs when there is a smart selection related event. |
| 7546 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7547 | * Logged from: TextClassifierEventLogger.java |
| 7548 | */ |
| 7549 | message TextSelectionEvent { |
| 7550 | // A session ID. |
| 7551 | optional string session_id = 1; |
| 7552 | |
| 7553 | // Event type of this event. |
| 7554 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7555 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7556 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7557 | optional string model_name = 3; |
| 7558 | |
| 7559 | // Type of widget that was involved in triggering this event. |
| 7560 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7561 | |
| 7562 | // Index of this event in a session. |
| 7563 | optional int32 event_index = 5; |
| 7564 | |
| 7565 | // Entity type that is involved. |
| 7566 | optional string entity_type = 6; |
| 7567 | |
| 7568 | // Relative word index of the start of the selection. |
| 7569 | optional int32 relative_word_start_index = 7; |
| 7570 | |
| 7571 | // Relative word (exclusive) index of the end of the selection. |
| 7572 | optional int32 relative_word_end_index = 8; |
| 7573 | |
| 7574 | // Relative word index of the start of the smart selection. |
| 7575 | optional int32 relative_suggested_word_start_index = 9; |
| 7576 | |
| 7577 | // Relative word (exclusive) index of the end of the smart selection. |
| 7578 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7579 | |
| 7580 | // Name of source package. |
| 7581 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7582 | } |
| 7583 | |
| 7584 | /** |
| 7585 | * Logs when there is a smart linkify related event. |
| 7586 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7587 | * Logged from: TextClassifierEventLogger.java |
| 7588 | */ |
| 7589 | message TextLinkifyEvent { |
| 7590 | // A session ID. |
| 7591 | optional string session_id = 1; |
| 7592 | |
| 7593 | // Event type of this event. |
| 7594 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7595 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7596 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7597 | optional string model_name = 3; |
| 7598 | |
| 7599 | // Type of widget that was involved in triggering this event. |
| 7600 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7601 | |
| 7602 | // Index of this event in a session. |
| 7603 | optional int32 event_index = 5; |
| 7604 | |
| 7605 | // Entity type that is involved. |
| 7606 | optional string entity_type = 6; |
| 7607 | |
| 7608 | // Number of links detected. |
| 7609 | optional int32 num_links = 7; |
| 7610 | |
| 7611 | // The total length of all links. |
| 7612 | optional int32 linked_text_length = 8; |
| 7613 | |
| 7614 | // Length of input text. |
| 7615 | optional int32 text_length = 9; |
| 7616 | |
| 7617 | // Time spent on generating links in ms. |
| 7618 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7619 | |
| 7620 | // Name of source package. |
| 7621 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7622 | } |
| 7623 | |
| 7624 | /** |
| 7625 | * Logs when there is a conversation actions related event. |
| 7626 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7627 | * Logged from: TextClassifierEventLogger.java |
| 7628 | */ |
| 7629 | message ConversationActionsEvent { |
| 7630 | // A session ID. |
| 7631 | optional string session_id = 1; |
| 7632 | |
| 7633 | // Event type of this event. |
| 7634 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7635 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7636 | // Name of the actions model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7637 | optional string model_name = 3; |
| 7638 | |
| 7639 | // Type of widget that was involved in triggering this event. |
| 7640 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7641 | |
| 7642 | // The first entity type that is involved. |
| 7643 | optional string first_entity_type = 5; |
| 7644 | |
| 7645 | // The second entity type that is involved. |
| 7646 | optional string second_entity_type = 6; |
| 7647 | |
| 7648 | // The third entity type that is involved. |
| 7649 | optional string third_entity_type = 7; |
| 7650 | |
| 7651 | // The score of the first entity type. |
| 7652 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7653 | |
| 7654 | // Name of source package. |
| 7655 | optional string package_name = 9; |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7656 | |
| 7657 | // Name of the annotator model that is involved in this event. |
| 7658 | optional string annotator_model_name = 10; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7659 | } |
| 7660 | |
| 7661 | /** |
| 7662 | * Logs when there is a language detection related event. |
| 7663 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7664 | * Logged from: TextClassifierEventLogger.java |
| 7665 | */ |
| 7666 | message LanguageDetectionEvent { |
| 7667 | // A session ID. |
| 7668 | optional string session_id = 1; |
| 7669 | |
| 7670 | // Event type of this event. |
| 7671 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7672 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7673 | // Name of the language detection model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7674 | optional string model_name = 3; |
| 7675 | |
| 7676 | // Type of widget that was involved in triggering this event. |
| 7677 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7678 | |
| 7679 | // Detected language. |
| 7680 | optional string language_tag = 5; |
| 7681 | |
| 7682 | // Score of the detected language. |
| 7683 | optional float score = 6; |
| 7684 | |
| 7685 | // Position of this action. |
| 7686 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7687 | |
| 7688 | // Name of source package. |
| 7689 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7690 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 7691 | |
| 7692 | /** |
| 7693 | * Information about an OTA update attempt by update_engine. |
| 7694 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7695 | */ |
| 7696 | message UpdateEngineUpdateAttemptReported { |
| 7697 | // The number of attempts for the update engine to apply a given payload. |
| 7698 | optional int32 attempt_number = 1; |
| 7699 | |
| 7700 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7701 | |
| 7702 | // The total time in minutes for the update engine to apply a given payload. |
| 7703 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 7704 | // it's increased when the system is sleeping. |
| 7705 | optional int32 duration_boottime_in_minutes = 3; |
| 7706 | |
| 7707 | // The total time in minutes for the update engine to apply a given payload. |
| 7708 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 7709 | // and it's not increased when the system is sleeping. |
| 7710 | optional int32 duration_monotonic_in_minutes = 4; |
| 7711 | |
| 7712 | // The size of the payload in MiBs. |
| 7713 | optional int32 payload_size_mib = 5; |
| 7714 | |
| 7715 | // The attempt result reported by the update engine for an OTA update. |
| 7716 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 7717 | |
| 7718 | // The error code reported by the update engine after an OTA update attempt |
| 7719 | // on A/B devices. |
| 7720 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 7721 | |
| 7722 | // The build fingerprint of the source system. The value is read from a |
| 7723 | // system property when the device takes the update. e.g. |
| 7724 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 7725 | optional string source_fingerprint = 8; |
| 7726 | } |
| 7727 | |
| 7728 | /** |
| 7729 | * Information about all the attempts the device make before finishing the |
| 7730 | * successful update. |
| 7731 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7732 | */ |
| 7733 | message UpdateEngineSuccessfulUpdateReported { |
| 7734 | // The number of attempts for the update engine to apply the payload for a |
| 7735 | // successful update. |
| 7736 | optional int32 attempt_count = 1; |
| 7737 | |
| 7738 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7739 | |
| 7740 | optional int32 payload_size_mib = 3; |
| 7741 | |
| 7742 | // The total number of bytes downloaded by update_engine since the last |
| 7743 | // successful update. |
| 7744 | optional int32 total_bytes_downloaded_mib = 4; |
| 7745 | |
| 7746 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 7747 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 7748 | // download 200MiB in total for a 100MiB package. |
| 7749 | optional int32 download_overhead_percentage = 5; |
| 7750 | |
| 7751 | // The total time in minutes for the update engine to apply the payload for a |
| 7752 | // successful update. |
| 7753 | optional int32 total_duration_minutes = 6; |
| 7754 | |
| 7755 | // The number of reboot of the device during a successful update. |
| 7756 | optional int32 reboot_count = 7; |
| 7757 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 7758 | |
| 7759 | /** |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 7760 | * Reported when the RebootEscrow HAL has attempted to recover the escrowed |
| 7761 | * key to indicate whether it was successful or not. |
| 7762 | * |
| 7763 | * Logged from: |
| 7764 | * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java |
| 7765 | */ |
| 7766 | message RebootEscrowRecoveryReported { |
| 7767 | optional bool successful = 1; |
| 7768 | } |
| 7769 | |
| 7770 | /** |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 7771 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 7772 | * Pulled from: |
| 7773 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7774 | */ |
| 7775 | message SurfaceflingerStatsGlobalInfo { |
| 7776 | // Total number of frames presented during the tracing period |
| 7777 | optional int64 total_frames = 1; |
| 7778 | // Total number of frames missed |
| 7779 | optional int64 missed_frames = 2; |
| 7780 | // Total number of frames that fell back to client composition |
| 7781 | optional int64 client_composition_frames = 3; |
| 7782 | // Total time the display was turned on |
| 7783 | optional int64 display_on_millis = 4; |
| 7784 | // Total time that was spent performing animations. |
| 7785 | // This is derived from the present-to-present layer histogram |
| 7786 | optional int64 animation_millis = 5; |
| 7787 | } |
| 7788 | |
| 7789 | /** |
| 7790 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 7791 | * The number of layers uploaded will be restricted due to size limitations. |
| 7792 | * Pulled from: |
| 7793 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7794 | */ |
| 7795 | message SurfaceflingerStatsLayerInfo { |
| 7796 | // The layer for this set of metrics |
| 7797 | // For now we can infer that the package name is included in the layer |
| 7798 | // name. |
| 7799 | optional string layer_name = 1; |
| 7800 | // Total number of frames presented |
| 7801 | optional int64 total_frames = 2; |
| 7802 | // Total number of dropped frames while latching a buffer for this layer. |
| 7803 | optional int64 dropped_frames = 3; |
| 7804 | // Set of timings measured between successive presentation timestamps. |
| 7805 | optional FrameTimingHistogram present_to_present = 4 |
| 7806 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7807 | // Set of timings measured from when an app queued a buffer for |
| 7808 | // presentation, until the buffer was actually presented to the |
| 7809 | // display. |
| 7810 | optional FrameTimingHistogram post_to_present = 5 |
| 7811 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7812 | // Set of timings measured from when a buffer is ready to be presented, |
| 7813 | // until the buffer was actually presented to the display. |
| 7814 | optional FrameTimingHistogram acquire_to_present = 6 |
| 7815 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7816 | // Set of timings measured from when a buffer was latched by |
| 7817 | // SurfaceFlinger, until the buffer was presented to the display |
| 7818 | optional FrameTimingHistogram latch_to_present = 7 |
| 7819 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7820 | // Set of timings measured from the desired presentation to the actual |
| 7821 | // presentation time |
| 7822 | optional FrameTimingHistogram desired_to_present = 8 |
| 7823 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7824 | // Set of timings measured from when an app queued a buffer for |
| 7825 | // presentation, until the buffer was ready to be presented. |
| 7826 | optional FrameTimingHistogram post_to_acquire = 9 |
| 7827 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7828 | } |
| 7829 | |
| 7830 | /** |
| 7831 | * Histogram of frame counts bucketed by time in milliseconds. |
| 7832 | * Because of size limitations, we hard-cap the number of buckets, with |
| 7833 | * buckets for corresponding to larger milliseconds being less precise. |
| 7834 | */ |
| 7835 | message FrameTimingHistogram { |
| 7836 | // Timings in milliseconds that describes a set of histogram buckets |
| 7837 | repeated int32 time_millis_buckets = 1; |
| 7838 | // Number of frames that match to each time_millis, i.e. the bucket |
| 7839 | // contents |
| 7840 | // It's required that len(time_millis) == len(frame_count) |
| 7841 | repeated int64 frame_counts = 2; |
| 7842 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7843 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7844 | /** |
| 7845 | * Information about camera facing and API level usage. |
| 7846 | * Logged from: |
| 7847 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 7848 | */ |
| 7849 | message CameraActionEvent { |
| 7850 | // Camera session duration |
| 7851 | optional int64 duration = 1; |
| 7852 | |
| 7853 | // Camera API level used |
| 7854 | optional int32 api_level = 2; |
| 7855 | |
| 7856 | // Name of client package |
| 7857 | optional string package_name = 3; |
| 7858 | |
| 7859 | // Camera facing |
| 7860 | enum Facing { |
| 7861 | UNKNOWN = 0; |
| 7862 | BACK = 1; |
| 7863 | FRONT = 2; |
| 7864 | EXTERNAL = 3; |
| 7865 | } |
| 7866 | optional Facing facing = 4; |
| 7867 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 7868 | |
| 7869 | /** |
| 7870 | * Logs when a compatibility change is affecting an app. |
| 7871 | * |
| 7872 | * Logged from: |
| 7873 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 7874 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 7875 | */ |
| 7876 | message AppCompatibilityChangeReported { |
| 7877 | // The UID of the app being affected by the compatibilty change. |
| 7878 | optional int32 uid = 1 [(is_uid) = true]; |
| 7879 | |
| 7880 | // The ID of the change affecting the app. |
| 7881 | optional int64 change_id = 2; |
| 7882 | |
| 7883 | enum State { |
| 7884 | UNKNOWN_STATE = 0; |
| 7885 | ENABLED = 1; |
| 7886 | DISABLED = 2; |
| 7887 | LOGGED = 3; |
| 7888 | } |
| 7889 | |
| 7890 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 7891 | // logged otherwise. |
| 7892 | optional State state = 3; |
| 7893 | |
| 7894 | enum Source { |
| 7895 | UNKNOWN_SOURCE = 0; |
| 7896 | APP_PROCESS = 1; |
| 7897 | SYSTEM_SERVER = 2; |
| 7898 | } |
| 7899 | |
| 7900 | // Where it was logged from. |
| 7901 | optional Source source = 4; |
| 7902 | |
| 7903 | } |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 7904 | |
| 7905 | /** |
| 7906 | * Logged from |
| 7907 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 7908 | */ |
| 7909 | message PerfettoUploaded { |
| 7910 | enum Event { |
| 7911 | PERFETTO_UNDEFINED = 0; |
| 7912 | PERFETTO_TRACE_BEGIN = 1; |
| 7913 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 7914 | PERFETTO_ON_CONNECT = 3; |
| 7915 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 7916 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 7917 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 7918 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 7919 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 7920 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 7921 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 7922 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 7923 | PERFETTO_TRIGGER_BEGIN = 12; |
| 7924 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 7925 | PERFETTO_TRIGGER_FAILURE = 14; |
| 7926 | PERFETTO_HIT_GUARDRAILS = 15; |
| 7927 | PERFETTO_ON_TIMEOUT = 16; |
| 7928 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 7929 | } |
| 7930 | |
| 7931 | // Which stage of the pipeline we are reporting from. |
| 7932 | optional Event event = 1; |
| 7933 | |
| 7934 | // UUID matching the one set inside the SystemInfo trace packet. |
| 7935 | optional int64 trace_uuid_lsb = 2; |
| 7936 | optional int64 trace_uuid_msb = 3; |
| 7937 | } |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 7938 | |
| 7939 | /** |
| 7940 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 7941 | * Metrics are keyed by uid + layer. |
| 7942 | * |
| 7943 | * Pulled from: |
| 7944 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 7945 | */ |
| 7946 | message VmsClientStats { |
| 7947 | // UID of the VMS client app |
| 7948 | optional int32 uid = 1 [(is_uid) = true]; |
| 7949 | |
| 7950 | // VMS layer definition |
| 7951 | optional int32 layer_type = 2; |
| 7952 | optional int32 layer_channel = 3; |
| 7953 | optional int32 layer_version = 4; |
| 7954 | |
| 7955 | // Bytes and packets sent by the client for the layer |
| 7956 | optional int64 tx_bytes = 5; |
| 7957 | optional int64 tx_packets = 6; |
| 7958 | |
| 7959 | // Bytes and packets received by the client for the layer |
| 7960 | optional int64 rx_bytes = 7; |
| 7961 | optional int64 rx_packets = 8; |
| 7962 | |
| 7963 | // Bytes and packets dropped due to client error |
| 7964 | optional int64 dropped_bytes = 9; |
| 7965 | optional int64 dropped_packets = 10; |
| 7966 | } |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 7967 | |
| 7968 | /** |
| 7969 | * State of a dangerous permission requested by a package - sampled |
| 7970 | * Pulled from: StatsCompanionService.java with data obtained from PackageManager API |
| 7971 | */ |
| 7972 | message DangerousPermissionStateSampled { |
| 7973 | // Name of the permission |
| 7974 | optional string permission_name = 1; |
| 7975 | |
| 7976 | // Uid of the package |
| 7977 | optional int32 uid = 2 [(is_uid) = true]; |
| 7978 | |
| 7979 | // If the permission is granted to the uid |
| 7980 | optional bool is_granted = 3; |
| 7981 | |
| 7982 | // Permission flags as per android.content.pm.PermissionFlags |
| 7983 | optional int32 permission_flags = 4; |
| 7984 | } |
| 7985 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 7986 | /** |
| 7987 | * HWUI renders pipeline type: GL (0) or Vulkan (1). |
| 7988 | */ |
| 7989 | enum PipelineType { |
| 7990 | GL = 0; |
| 7991 | VULKAN = 1; |
| 7992 | } |
| 7993 | |
| 7994 | /** |
| 7995 | * HWUI stats for a given app. |
| 7996 | */ |
| 7997 | message GraphicsStats { |
| 7998 | // The package name of the app |
| 7999 | optional string package_name = 1; |
| 8000 | |
| 8001 | // The version code of the app |
| 8002 | optional int64 version_code = 2; |
| 8003 | |
| 8004 | // The start & end timestamps in UTC as |
| 8005 | // milliseconds since January 1, 1970 |
| 8006 | // Compatible with java.util.Date#setTime() |
| 8007 | optional int64 stats_start = 3; |
| 8008 | |
| 8009 | optional int64 stats_end = 4; |
| 8010 | |
| 8011 | // HWUI renders pipeline type: GL or Vulkan. |
| 8012 | optional PipelineType pipeline = 5; |
| 8013 | |
| 8014 | // Distinct frame count. |
| 8015 | optional int32 total_frames = 6; |
| 8016 | |
| 8017 | // Number of "missed vsync" events. |
| 8018 | optional int32 missed_vsync_count = 7; |
| 8019 | |
| 8020 | // Number of frames in triple-buffering scenario (high input latency) |
| 8021 | optional int32 high_input_latency_count = 8; |
| 8022 | |
| 8023 | // Number of "slow UI thread" events. |
| 8024 | optional int32 slow_ui_thread_count = 9; |
| 8025 | |
| 8026 | // Number of "slow bitmap upload" events. |
| 8027 | optional int32 slow_bitmap_upload_count = 10; |
| 8028 | |
| 8029 | // Number of "slow draw" events. |
| 8030 | optional int32 slow_draw_count = 11; |
| 8031 | |
| 8032 | // Number of frames that missed their deadline (aka, visibly janked) |
| 8033 | optional int32 missed_deadline_count = 12; |
| 8034 | |
| 8035 | // The frame time histogram for the package |
| 8036 | optional FrameTimingHistogram cpu_histogram = 13 |
| 8037 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8038 | |
| 8039 | // The gpu frame time histogram for the package |
| 8040 | optional FrameTimingHistogram gpu_histogram = 14 |
| 8041 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8042 | |
| 8043 | // UI mainline module version. |
| 8044 | optional int64 version_ui_module = 15; |
| 8045 | |
| 8046 | // If true, these are HWUI stats for up to a 24h period for a given app from today. |
| 8047 | // If false, these are HWUI stats for a 24h period for a given app from the last complete |
| 8048 | // day (yesterday). Stats from yesterday stay constant, while stats from today may change as |
| 8049 | // more apps are running / rendering. |
| 8050 | optional bool is_today = 16; |
| 8051 | } |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8052 | |
| 8053 | /** |
| 8054 | * Message related to dangerous (runtime) app ops access |
| 8055 | */ |
| 8056 | message RuntimeAppOpsAccess { |
| 8057 | // Uid of the package accessing app op |
| 8058 | optional int32 uid = 1 [(is_uid) = true]; |
| 8059 | |
| 8060 | // Name of the package accessing app op |
| 8061 | optional string package_name = 2; |
| 8062 | |
| 8063 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 8064 | optional int32 op_id = 3; |
| 8065 | |
| 8066 | // feature id; provided by developer when accessing related API, limited at 50 chars by API. |
| 8067 | // Features must be provided through manifest using <feature> tag available in R and above. |
| 8068 | optional string feature_id = 4; |
| 8069 | |
| 8070 | // message related to app op access, limited to 600 chars by API |
| 8071 | optional string message = 5; |
| 8072 | |
| 8073 | enum SamplingStrategy { |
| 8074 | DEFAULT = 0; |
| 8075 | UNIFORM = 1; |
| 8076 | RARELY_USED = 2; |
| 8077 | } |
| 8078 | |
| 8079 | // sampling strategy used to collect this message |
| 8080 | optional SamplingStrategy sampling_strategy = 6; |
| 8081 | } |
| 8082 | |
Nikita Ioffe | 41dd57e | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 8083 | /* |
| 8084 | * Logs userspace reboot outcome and duration. |
| 8085 | * |
| 8086 | * Logged from: |
| 8087 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 8088 | */ |
| 8089 | message UserspaceRebootReported { |
| 8090 | // Possible outcomes of userspace reboot. |
| 8091 | enum Outcome { |
| 8092 | // Default value in case platform failed to determine the outcome. |
| 8093 | OUTCOME_UNKNOWN = 0; |
| 8094 | // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot). |
| 8095 | SUCCESS = 1; |
| 8096 | // Userspace reboot shutdown sequence was aborted. |
| 8097 | FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2; |
| 8098 | // Remounting userdata into checkpointing mode failed. |
| 8099 | FAILED_USERDATA_REMOUNT = 3; |
| 8100 | // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard |
| 8101 | // reboot. |
| 8102 | FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4; |
| 8103 | } |
| 8104 | // Outcome of userspace reboot. Always set. |
| 8105 | optional Outcome outcome = 1; |
| 8106 | // Duration of userspace reboot in case it has a successful outcome. |
| 8107 | // Duration is measured as time between userspace reboot was initiated and until boot completed |
| 8108 | // (e.g. sys.boot_completed=1). |
| 8109 | optional int64 duration_millis = 2; |
| 8110 | // State of primary user's (user0) credential encryption storage. |
| 8111 | enum UserEncryptionState { |
| 8112 | // Default value. |
| 8113 | USER_ENCRYPTION_STATE_UNKNOWN = 0; |
| 8114 | // Credential encrypted storage is unlocked. |
| 8115 | UNLOCKED = 1; |
| 8116 | // Credential encrypted storage is locked. |
| 8117 | LOCKED = 2; |
| 8118 | } |
| 8119 | // State of primary user's encryption storage at the moment boot completed. Always set. |
| 8120 | optional UserEncryptionState user_encryption_state = 3; |
| 8121 | } |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 8122 | |
| 8123 | /* |
| 8124 | * Logs integrity check information during each install. |
| 8125 | * |
| 8126 | * Logged from: |
| 8127 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 8128 | */ |
| 8129 | message IntegrityCheckResultReported { |
| 8130 | optional string package_name = 1; |
| 8131 | optional string app_certificate_hash = 2; |
Omer Nebil Yaveroglu | 0ade854 | 2020-01-24 12:47:46 +0000 | [diff] [blame] | 8132 | optional int64 version_code = 3; |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 8133 | optional string installer_package_name = 4; |
| 8134 | enum Response { |
| 8135 | UNKNOWN = 0; |
| 8136 | ALLOWED = 1; |
| 8137 | REJECTED = 2; |
| 8138 | FORCE_ALLOWED = 3; |
| 8139 | } |
| 8140 | optional Response response = 5; |
| 8141 | // An estimate on the cause of the response. This will only be populated for |
| 8142 | // REJECTED and FORCE_ALLOWED |
| 8143 | optional bool caused_by_app_cert_rule = 6; |
| 8144 | optional bool caused_by_installer_rule = 7; |
| 8145 | } |
| 8146 | |
| 8147 | /** |
| 8148 | * Logs the information about the rules and the provider whenever rules are |
| 8149 | * pushed into AppIntegrityManager. |
| 8150 | * |
| 8151 | * Logged from: |
| 8152 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 8153 | */ |
| 8154 | message IntegrityRulesPushed { |
| 8155 | optional bool success = 1; |
| 8156 | // Package name of the app that pushed the rules. |
| 8157 | optional string rule_provider = 2; |
| 8158 | // Version string of arbitrary format provided by the rule provider to |
| 8159 | // identify the rules. |
| 8160 | optional string rule_version = 3; |
| 8161 | } |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 8162 | |
| 8163 | /** |
| 8164 | * Logs when a cell broadcast message is received on the device. |
| 8165 | * |
| 8166 | * Logged from CellBroadcastService module: |
| 8167 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 8168 | */ |
| 8169 | message CellBroadcastMessageReported { |
| 8170 | // The type of Cell Broadcast message |
| 8171 | enum CbType { |
| 8172 | UNKNOWN_TYPE = 0; |
| 8173 | GSM = 1; |
| 8174 | CDMA = 2; |
| 8175 | CDMA_SPC = 3; |
| 8176 | } |
| 8177 | |
| 8178 | // GSM, CDMA, CDMA-SCP |
| 8179 | optional CbType type = 1; |
| 8180 | } |
| 8181 | |
| 8182 | /** |
| 8183 | * Logs when an error occurs while handling a cell broadcast message; |
| 8184 | * |
| 8185 | * Logged from CellBroadcastService module: |
| 8186 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 8187 | */ |
| 8188 | message CellBroadcastMessageError { |
| 8189 | // The type of error raised when trying to handle a cell broadcast message |
| 8190 | enum ErrorType { |
| 8191 | UNKNOWN_TYPE = 0; |
| 8192 | CDMA_DECODING_ERROR = 1; |
| 8193 | CDMA_SCP_EMPTY = 2; |
| 8194 | CDMA_SCP_HANDLING_ERROR = 3; |
| 8195 | GSM_INVALID_HEADER_LENGTH = 4; |
| 8196 | GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5; |
| 8197 | GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6; |
| 8198 | GSM_INVALID_PDU = 7; |
| 8199 | GSM_INVALID_GEO_FENCING_DATA = 8; |
| 8200 | GSM_UMTS_INVALID_WAC = 9; |
| 8201 | FAILED_TO_INSERT_TO_DB = 10; |
| 8202 | UNEXPECTED_GEOMETRY_FROM_FWK = 11; |
| 8203 | UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12; |
| 8204 | UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13; |
| 8205 | UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14; |
| 8206 | } |
| 8207 | |
| 8208 | // What kind of error occurred |
| 8209 | optional ErrorType type = 1; |
| 8210 | |
| 8211 | // Exception message (or log message) associated with the error (max 1000 chars) |
| 8212 | optional string exception_message = 2; |
| 8213 | } |