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 = |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 130 | 47 [(allow_from_any_uid) = true, (module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 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; |
Muhammad Qureshi | 9afad81 | 2020-01-23 15:04:59 -0800 | [diff] [blame] | 183 | SettingsUIChanged settings_ui_changed = 97 [(module) = "settings"]; |
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"]; |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 191 | BinaryPushStateChanged binary_push_state_changed = 102 [(module) = "statsd"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 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"]; |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 205 | WifiRunningStateChanged wifi_running_state_changed = 114 |
| 206 | [(module) = "framework", deprecated = true]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 207 | AppCompacted app_compacted = 115 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 208 | NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 209 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 210 | 117 [(module) = "docsui"]; |
| 211 | DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"]; |
| 212 | DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"]; |
| 213 | DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"]; |
| 214 | DataStallEvent data_stall_event = 121 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 215 | RescuePartyResetReported rescue_party_reset_reported = 122 [(module) = "framework"]; |
| 216 | SignedConfigReported signed_config_reported = 123 [(module) = "framework"]; |
| 217 | GnssNiEventReported gnss_ni_event_reported = 124 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 218 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = |
| 219 | 125 [(module) = "bluetooth"]; |
| 220 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = |
| 221 | 126 [(module) = "bluetooth"]; |
| 222 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = |
| 223 | 127 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 224 | AppDowngraded app_downgraded = 128 [(module) = "framework"]; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 225 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 226 | LowStorageStateChanged low_storage_state_changed = 130 [(module) = "framework"]; |
| 227 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131 [(module) = "framework"]; |
| 228 | GnssConfigurationReported gnss_configuration_reported = 132 [(module) = "framework"]; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 229 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Muhammad Qureshi | f9a5ab0 | 2020-01-25 19:43:27 -0800 | [diff] [blame] | 230 | NfcErrorOccurred nfc_error_occurred = 134 [(module) = "nfc"]; |
| 231 | NfcStateChanged nfc_state_changed = 135 [(module) = "nfc"]; |
| 232 | NfcBeamOccurred nfc_beam_occurred = 136 [(module) = "nfc"]; |
| 233 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137 [(module) = "nfc"]; |
| 234 | NfcTagOccurred nfc_tag_occurred = 138 [(module) = "nfc"]; |
| 235 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139 [(module) = "nfc"]; |
Muhammad Qureshi | 70dfeb4 | 2020-01-24 20:11:44 -0800 | [diff] [blame] | 236 | SeStateChanged se_state_changed = 140 [(module) = "secure_element"]; |
| 237 | SeOmapiReported se_omapi_reported = 141 [(module) = "secure_element"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 238 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = |
| 239 | 142 [(module) = "framework"]; |
| 240 | AttentionManagerServiceResultReported attention_manager_service_result_reported = |
| 241 | 143 [(module) = "framework"]; |
| 242 | AdbConnectionChanged adb_connection_changed = 144 [(module) = "framework"]; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 243 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 244 | UsbContaminantReported usb_contaminant_reported = 146 [(module) = "framework"]; |
| 245 | WatchdogRollbackOccurred watchdog_rollback_occurred = 147 [(module) = "framework"]; |
| 246 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = |
| 247 | 148 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 248 | BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 249 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = |
| 250 | 150 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 251 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = |
| 252 | 151 [(module) = "bluetooth"]; |
| 253 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = |
| 254 | 152 [(module) = "bluetooth"]; |
| 255 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = |
| 256 | 153 [(module) = "bluetooth"]; |
| 257 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = |
| 258 | 154 [(module) = "bluetooth"]; |
| 259 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = |
| 260 | 155 [(module) = "bluetooth"]; |
| 261 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = |
| 262 | 156 [(module) = "bluetooth"]; |
| 263 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = |
| 264 | 157 [(module) = "bluetooth"]; |
| 265 | BluetoothDeviceFailedContactCounterReported |
| 266 | bluetooth_device_failed_contact_counter_reported = 158 [(module) = "bluetooth"]; |
| 267 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = |
| 268 | 159 [(module) = "bluetooth"]; |
| 269 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = |
| 270 | 160 [(module) = "bluetooth"]; |
| 271 | BluetoothQualityReportReported bluetooth_quality_report_reported = |
| 272 | 161 [(module) = "bluetooth"]; |
| 273 | BluetoothDeviceInfoReported bluetooth_device_info_reported = |
| 274 | 162 [(module) = "bluetooth"]; |
| 275 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = |
| 276 | 163 [(module) = "bluetooth"]; |
| 277 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = |
| 278 | 164 [(module) = "bluetooth"]; |
| 279 | BluetoothBondStateChanged bluetooth_bond_state_changed = |
| 280 | 165 [(module) = "bluetooth"]; |
| 281 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = |
| 282 | 166 [(module) = "bluetooth"]; |
| 283 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = |
| 284 | 167 [(module) = "bluetooth"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 285 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = |
| 286 | 168 [(module) = "framework"]; |
| 287 | ProcessStartTime process_start_time = 169 [(module) = "framework"]; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 288 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 289 | 170 [(module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 290 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Muhammad Qureshi | ed8bca0 | 2020-01-24 16:07:49 -0800 | [diff] [blame] | 291 | DeviceIdentifierAccessDenied device_identifier_access_denied = |
| 292 | 172 [(module) = "telephony_common"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 293 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173 [(module) = "framework"]; |
Muhammad Qureshi | 76b2524 | 2020-01-25 19:02:08 -0800 | [diff] [blame] | 294 | AssistGestureStageReported assist_gesture_stage_reported = 174 [(module) = "sysui"]; |
| 295 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175 [(module) = "sysui"]; |
| 296 | AssistGestureProgressReported assist_gesture_progress_reported = 176 [(module) = "sysui"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 297 | TouchGestureClassified touch_gesture_classified = 177 [(module) = "framework"]; |
| 298 | HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true, (module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 299 | StyleUIChanged style_ui_changed = 179 [(module) = "sysui"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 300 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 301 | 180 [(module) = "permissioncontroller"]; |
| 302 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = |
| 303 | 181 [(module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 304 | NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 305 | AppMovedStorageReported app_moved_storage_reported = 183 [(module) = "framework"]; |
| 306 | BiometricEnrolled biometric_enrolled = 184 [(module) = "framework"]; |
| 307 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185 [(module) = "framework"]; |
| 308 | TombStoneOccurred tomb_stone_occurred = 186 [(module) = "framework"]; |
Muhammad Qureshi | 100d2b6 | 2020-01-23 10:30:41 -0800 | [diff] [blame] | 309 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = |
| 310 | 187 [(module) = "bluetooth"]; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 311 | IntelligenceEventReported intelligence_event_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 312 | 188 [(module) = "intelligence"]; |
| 313 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = |
| 314 | 189 [(module) = "framework"]; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 315 | RoleRequestResultReported role_request_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 316 | 190 [(module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 317 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 318 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 319 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 320 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 321 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 322 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 323 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 324 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 325 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 326 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 327 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 328 | CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"]; |
| 329 | GarageModeInfo garage_mode_info = 204 [(module) = "car"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 330 | TestAtomReported test_atom_reported = 205 [(module) = "cts"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 331 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = |
| 332 | 206 [(module) = "framework"]; |
| 333 | ContentCaptureServiceEvents content_capture_service_events = 207 [(module) = "framework"]; |
| 334 | ContentCaptureSessionEvents content_capture_session_events = 208 [(module) = "framework"]; |
| 335 | ContentCaptureFlushed content_capture_flushed = 209 [(module) = "framework"]; |
| 336 | LocationManagerApiUsageReported location_manager_api_usage_reported = |
| 337 | 210 [(module) = "framework"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 338 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 339 | 211 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 340 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 341 | 212 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 342 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 343 | 213 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 344 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 345 | 214 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 346 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 347 | 215 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 348 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 349 | 216 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 350 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 351 | 217 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 352 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 353 | 218 [(module) = "permissioncontroller"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 354 | TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"]; |
| 355 | TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"]; |
| 356 | ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"]; |
| 357 | LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 358 | ExclusionRectStateChanged exclusion_rect_state_changed = 223 [(module) = "framework"]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 359 | BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"]; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 360 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 361 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 362 | CameraActionEvent camera_action_event = 227 [(module) = "framework"]; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 363 | AppCompatibilityChangeReported app_compatibility_change_reported = |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 364 | 228 [(allow_from_any_uid) = true, (module) = "framework"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 365 | PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 366 | VmsClientConnectionStateChanged vms_client_connection_state_changed = |
| 367 | 230 [(module) = "car"]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 368 | MediaProviderScanEvent media_provider_scan_event = 233 [(module) = "mediaprovider"]; |
| 369 | MediaProviderDeletionEvent media_provider_deletion_event = 234 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 370 | MediaProviderPermissionEvent media_provider_permission_event = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 371 | 235 [(module) = "mediaprovider"]; |
| 372 | MediaProviderSchemaChange media_provider_schema_change = 236 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 373 | MediaProviderIdleMaintenance media_provider_idle_maintenance = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 374 | 237 [(module) = "mediaprovider"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 375 | RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238 [(module) = "framework"]; |
| 376 | BootTimeEventDuration boot_time_event_duration_reported = 239 [(module) = "framework"]; |
| 377 | BootTimeEventElapsedTime boot_time_event_elapsed_time_reported = |
| 378 | 240 [(module) = "framework"]; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 379 | BootTimeEventUtcTime boot_time_event_utc_time_reported = 241; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 380 | BootTimeEventErrorCode boot_time_event_error_code_reported = 242 [(module) = "framework"]; |
Nikita Ioffe | 779d6be | 2020-02-06 23:17:17 +0000 | [diff] [blame] | 381 | UserspaceRebootReported userspace_reboot_reported = 243 [(module) = "framework"]; |
Muhammad Qureshi | 550b84c | 2020-02-03 14:17:59 -0800 | [diff] [blame] | 382 | NotificationReported notification_reported = 244 [(module) = "framework"]; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 383 | NotificationPanelReported notification_panel_reported = 245; |
Will Brockman | 492be33 | 2020-02-12 16:46:04 -0500 | [diff] [blame] | 384 | NotificationChannelModified notification_channel_modified = 246; |
Muhammad Qureshi | e2b2432 | 2020-01-28 10:54:17 -0800 | [diff] [blame] | 385 | IntegrityCheckResultReported integrity_check_result_reported = 247 [(module) = "framework"]; |
| 386 | IntegrityRulesPushed integrity_rules_pushed = 248 [(module) = "framework"]; |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 387 | CellBroadcastMessageReported cb_message_reported = |
| 388 | 249 [(module) = "cellbroadcast"]; |
| 389 | CellBroadcastMessageError cb_message_error = |
| 390 | 250 [(module) = "cellbroadcast"]; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 391 | WifiHealthStatReported wifi_health_stat_reported = 251 [(module) = "wifi"]; |
| 392 | WifiFailureStatReported wifi_failure_stat_reported = 252 [(module) = "wifi"]; |
| 393 | WifiConnectionResultReported wifi_connection_result_reported = 253 [(module) = "wifi"]; |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 394 | AppFreezeChanged app_freeze_changed = 254 [(module) = "framework"]; |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 395 | SnapshotMergeReported snapshot_merge_reported = 255; |
Anton Hansson | 5a48e4b | 2020-02-06 14:50:35 +0000 | [diff] [blame] | 396 | SdkExtensionStatus sdk_extension_status = 354; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 397 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 398 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 399 | // Pulled events will start at field 10000. |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 400 | // Next: 10074 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 401 | oneof pulled { |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 402 | WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"]; |
| 403 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"]; |
| 404 | MobileBytesTransfer mobile_bytes_transfer = 10002 [(module) = "framework"]; |
| 405 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003 [(module) = "framework"]; |
| 406 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"]; |
| 407 | KernelWakelock kernel_wakelock = 10004 [(module) = "framework"]; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 408 | SubsystemSleepState subsystem_sleep_state = 10005; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 409 | CpuTimePerFreq cpu_time_per_freq = 10008 [(module) = "framework"]; |
| 410 | CpuTimePerUid cpu_time_per_uid = 10009 [(module) = "framework"]; |
| 411 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010 [(module) = "framework"]; |
| 412 | WifiActivityInfo wifi_activity_info = 10011 [(module) = "framework"]; |
| 413 | ModemActivityInfo modem_activity_info = 10012 [(module) = "framework"]; |
| 414 | BluetoothActivityInfo bluetooth_activity_info = 10007 [(module) = "framework"]; |
| 415 | ProcessMemoryState process_memory_state = 10013 [(module) = "framework"]; |
| 416 | SystemElapsedRealtime system_elapsed_realtime = 10014 [(module) = "framework"]; |
| 417 | SystemUptime system_uptime = 10015 [(module) = "framework"]; |
| 418 | CpuActiveTime cpu_active_time = 10016 [(module) = "framework"]; |
| 419 | CpuClusterTime cpu_cluster_time = 10017 [(module) = "framework"]; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 420 | DiskSpace disk_space = 10018 [deprecated=true]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 421 | RemainingBatteryCapacity remaining_battery_capacity = 10019 [(module) = "framework"]; |
| 422 | FullBatteryCapacity full_battery_capacity = 10020 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 423 | Temperature temperature = 10021 [(module) = "framework"]; |
| 424 | BinderCalls binder_calls = 10022 [(module) = "framework"]; |
| 425 | BinderCallsExceptions binder_calls_exceptions = 10023 [(module) = "framework"]; |
| 426 | LooperStats looper_stats = 10024 [(module) = "framework"]; |
| 427 | DiskStats disk_stats = 10025 [(module) = "framework"]; |
| 428 | DirectoryUsage directory_usage = 10026 [(module) = "framework"]; |
| 429 | AppSize app_size = 10027 [(module) = "framework"]; |
| 430 | CategorySize category_size = 10028 [(module) = "framework"]; |
| 431 | ProcStats proc_stats = 10029 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 432 | BatteryVoltage battery_voltage = 10030 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 433 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031 [(module) = "framework"]; |
| 434 | DiskIo disk_io = 10032 [(module) = "framework"]; |
| 435 | PowerProfile power_profile = 10033 [(module) = "framework"]; |
| 436 | ProcStatsPkgProc proc_stats_pkg_proc = 10034 [(module) = "framework"]; |
| 437 | ProcessCpuTime process_cpu_time = 10035 [(module) = "framework"]; |
| 438 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037 [(module) = "framework"]; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 439 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 440 | DeviceCalculatedPowerUse device_calculated_power_use = 10039 [(module) = "framework"]; |
| 441 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = |
| 442 | 10040 [(module) = "framework"]; |
| 443 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = |
| 444 | 10041 [(module) = "framework"]; |
| 445 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042 [(module) = "framework"]; |
Jeffrey Huang | 9a3c1b6 | 2020-01-27 17:33:13 -0800 | [diff] [blame] | 446 | BatteryLevel battery_level = 10043 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 447 | BuildInformation build_information = 10044 [(module) = "framework"]; |
Jeffrey Huang | 43f4d26 | 2020-01-30 14:03:31 -0800 | [diff] [blame] | 448 | BatteryCycleCount battery_cycle_count = 10045 [(module) = "framework"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 449 | DebugElapsedClock debug_elapsed_clock = 10046 [(module) = "framework"]; |
| 450 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047 [(module) = "framework"]; |
| 451 | NumFacesEnrolled num_faces_enrolled = 10048 [(module) = "framework"]; |
| 452 | RoleHolder role_holder = 10049 [(module) = "framework"]; |
| 453 | DangerousPermissionState dangerous_permission_state = 10050 [(module) = "framework"]; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 454 | TrainInfo train_info = 10051; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 455 | TimeZoneDataInfo time_zone_data_info = 10052 [(module) = "framework"]; |
| 456 | ExternalStorageInfo external_storage_info = 10053 [(module) = "framework"]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 457 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 458 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 459 | SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true, (module) = "framework"]; |
| 460 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057 [(module) = "framework"]; |
| 461 | FaceSettings face_settings = 10058 [(module) = "framework"]; |
| 462 | CoolingDevice cooling_device = 10059 [(module) = "framework"]; |
| 463 | AppOps app_ops = 10060 [(module) = "framework"]; |
| 464 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061 [(module) = "framework"]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 465 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 466 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 467 | ProcessMemorySnapshot process_memory_snapshot = 10064 [(module) = "framework"]; |
Muhammad Qureshi | 4ba4bac | 2020-01-25 23:48:53 -0800 | [diff] [blame] | 468 | VmsClientStats vms_client_stats = 10065 [(module) = "car"]; |
Muhammad Qureshi | 1f6dc94 | 2020-01-27 16:36:45 -0800 | [diff] [blame] | 469 | NotificationRemoteViews notification_remote_views = 10066 [(module) = "framework"]; |
| 470 | DangerousPermissionStateSampled dangerous_permission_state_sampled = |
| 471 | 10067 [(module) = "framework"]; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 472 | GraphicsStats graphics_stats = 10068; |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 473 | RuntimeAppOpAccess runtime_app_op_access = 10069 [(module) = "framework"]; |
Kenny Root | 6c218db | 2020-02-02 17:43:44 +0000 | [diff] [blame] | 474 | IonHeapSize ion_heap_size = 10070 [(module) = "framework"]; |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 475 | PackageNotificationPreferences package_notification_preferences = |
| 476 | 10071 [(module) = "framework"]; |
| 477 | PackageNotificationChannelPreferences package_notification_channel_preferences = |
| 478 | 10072 [(module) = "framework"]; |
| 479 | PackageNotificationChannelGroupPreferences package_notification_channel_group_preferences = |
| 480 | 10073 [(module) = "framework"]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 481 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 482 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 483 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 484 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 485 | // 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] | 486 | |
| 487 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 488 | } |
| 489 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 490 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 491 | * This proto represents a node of an attribution chain. |
| 492 | * Note: All attribution chains are represented as a repeated field of type |
| 493 | * AttributionNode. It is understood that in such arrays, the order is that |
| 494 | * 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] | 495 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 496 | message AttributionNode { |
| 497 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 498 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 499 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 500 | // The (optional) string tag for an element in the attribution chain. If the |
| 501 | // element has no tag, it is encoded as an empty string. |
| 502 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 503 | } |
| 504 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 505 | message KeyValuePair { |
| 506 | optional int32 key = 1; |
| 507 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 508 | int32 value_int = 2; |
| 509 | int64 value_long = 3; |
| 510 | string value_str = 4; |
| 511 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 512 | } |
| 513 | } |
| 514 | |
| 515 | message KeyValuePairsAtom { |
| 516 | optional int32 uid = 1; |
| 517 | repeated KeyValuePair pairs = 2; |
| 518 | } |
| 519 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 520 | /* |
| 521 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 522 | * 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] | 523 | * |
| 524 | * RULES: |
| 525 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 526 | * Skipping field ids is not allowed. |
| 527 | * - These form an API, so renaming, renumbering or removing fields is |
| 528 | * not allowed between android releases. (This is not currently enforced, |
| 529 | * but there will be a tool to enforce this restriction). |
| 530 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 531 | * are allowed (yet). The bytes type is also not allowed. |
| 532 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 533 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 534 | * - 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] | 535 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 536 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 537 | * annotation. The generated code on android will be represented by UIDs, |
| 538 | * and those UIDs will be translated in xxx to those strings. |
| 539 | * |
| 540 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 541 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 542 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 543 | * ***************************************************************************** |
| 544 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 545 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 546 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 547 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 548 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 549 | * |
| 550 | * Logged from: |
| 551 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 552 | */ |
| 553 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 554 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 555 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 556 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 557 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 558 | enum State { |
| 559 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 560 | START = 1; // START indicated that throttling was triggered. |
| 561 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 562 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 563 | optional State state = 2; |
| 564 | |
| 565 | optional float temperature = 3; |
| 566 | } |
| 567 | |
| 568 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 569 | * Logs when the screen state changes. |
| 570 | * |
| 571 | * Logged from: |
| 572 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 573 | */ |
| 574 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 575 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 576 | optional android.view.DisplayStateEnum state = 1 |
| 577 | [(state_field_option).option = EXCLUSIVE_STATE, (state_field_option).nested = false]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 578 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 579 | |
| 580 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 581 | * Logs that the process state of the uid, as determined by ActivityManager |
| 582 | * (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] | 583 | * |
| 584 | * Logged from: |
| 585 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 586 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 587 | message UidProcessStateChanged { |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 588 | optional int32 uid = 1 [(state_field_option).option = PRIMARY_FIELD, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 589 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 590 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 591 | optional android.app.ProcessStateEnum state = 2 |
| 592 | [(state_field_option).option = EXCLUSIVE_STATE, (state_field_option).nested = false]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 593 | } |
| 594 | |
| 595 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 596 | * Logs process state change of a process, as per the activity manager. |
| 597 | * |
| 598 | * Logged from: |
| 599 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 600 | */ |
| 601 | message ProcessStateChanged { |
| 602 | optional int32 uid = 1; |
| 603 | optional string process_name = 2; |
| 604 | optional string package_name = 3; |
| 605 | // TODO: remove this when validation is done |
| 606 | optional int64 version = 5; |
| 607 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 608 | optional android.app.ProcessStateEnum state = 4; |
| 609 | } |
| 610 | |
| 611 | /** |
| 612 | * Logs when ActivityManagerService sleep state is changed. |
| 613 | * |
| 614 | * Logged from: |
| 615 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 616 | */ |
| 617 | message ActivityManagerSleepStateChanged { |
| 618 | // TODO: import frameworks proto |
| 619 | enum State { |
| 620 | UNKNOWN = 0; |
| 621 | ASLEEP = 1; |
| 622 | AWAKE = 2; |
| 623 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 624 | optional State state = 1 [(state_field_option).option = EXCLUSIVE_STATE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 625 | } |
| 626 | |
| 627 | /** |
| 628 | * Logs when system memory state changes. |
| 629 | * |
| 630 | * Logged from: |
| 631 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 632 | */ |
| 633 | message MemoryFactorStateChanged { |
| 634 | // TODO: import frameworks proto |
| 635 | enum State { |
| 636 | MEMORY_UNKNOWN = 0; |
| 637 | NORMAL = 1; // normal. |
| 638 | MODERATE = 2; // moderate memory pressure. |
| 639 | LOW = 3; // low memory. |
| 640 | CRITICAL = 4; // critical memory. |
| 641 | |
| 642 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 643 | optional State factor = 1 [(state_field_option).option = EXCLUSIVE_STATE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 644 | } |
| 645 | |
| 646 | /** |
| 647 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 648 | * |
| 649 | * Logged from: |
| 650 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 651 | */ |
| 652 | message ExcessiveCpuUsageReported { |
| 653 | optional int32 uid = 1; |
| 654 | optional string process_name = 2; |
| 655 | optional string package_name = 3; |
| 656 | // package version. TODO: remove this when validation is done |
| 657 | optional int64 version = 4; |
| 658 | } |
| 659 | |
| 660 | /** |
| 661 | * Logs when a cached process is killed, along with its pss. |
| 662 | * |
| 663 | * Logged from: |
| 664 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 665 | */ |
| 666 | message CachedKillReported { |
| 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 = 5; |
| 672 | optional int64 pss = 4; |
| 673 | } |
| 674 | |
| 675 | /** |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 676 | * Logs the change in wifi health. |
| 677 | * |
| 678 | * Logged from: |
| 679 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiDataStall.java |
| 680 | */ |
| 681 | message WifiHealthStatReported { |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 682 | enum Band { |
| 683 | UNKNOWN = 0; |
| 684 | // All of 2.4GHz band |
| 685 | BAND_2G = 1; |
| 686 | // Frequencies in the range of [5150, 5250) GHz |
| 687 | BAND_5G_LOW = 2; |
| 688 | // Frequencies in the range of [5250, 5725) GHz |
| 689 | BAND_5G_MIDDLE = 3; |
| 690 | // Frequencies in the range of [5725, 5850) GHz |
| 691 | BAND_5G_HIGH = 4; |
| 692 | // Frequencies in the range of [5925, 6425) GHz |
| 693 | BAND_6G_LOW = 5; |
| 694 | // Frequencies in the range of [6425, 6875) GHz |
| 695 | BAND_6G_MIDDLE = 6; |
| 696 | // Frequencies in the range of [6875, 7125) GHz |
| 697 | BAND_6G_HIGH = 7; |
| 698 | } |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 699 | // duration this stat is obtained over in milliseconds |
| 700 | optional int32 duration_millis = 1; |
| 701 | // whether wifi is classified as sufficient for the user's data traffic, determined |
| 702 | // by whether the calculated throughput exceeds the average demand within |duration_millis| |
| 703 | optional bool is_sufficient = 2; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 704 | // whether cellular data is available |
xshu | 39bfd93 | 2020-02-14 15:49:24 -0800 | [diff] [blame] | 705 | optional bool is_cell_data_available = 3; |
| 706 | // the Band bucket the connected network is on |
| 707 | optional Band band = 4; |
xshu | 2c3d9e4 | 2019-09-26 17:54:02 -0700 | [diff] [blame] | 708 | } |
| 709 | |
| 710 | /** |
| 711 | * Logged when wifi detects a significant change in connection failure rate. |
| 712 | * |
| 713 | * Logged from: frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiHealthMonitor.java |
| 714 | * |
| 715 | */ |
| 716 | message WifiFailureStatReported { |
| 717 | enum AbnormalityType { |
| 718 | UNKNOWN = 0; |
| 719 | SIGNIFICANT_INCREASE = 1; |
| 720 | SIGNIFICANT_DECREASE = 2; |
| 721 | SIMPLY_HIGH = 3; |
| 722 | } |
| 723 | enum FailureType { |
| 724 | FAILURE_UNKNOWN = 0; |
| 725 | FAILURE_CONNECTION = 1; |
| 726 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 727 | FAILURE_ASSOCIATION_TIMEOUT = 3; |
| 728 | FAILURE_AUTHENTICATION = 4; |
| 729 | FAILURE_NON_LOCAL_DISCONNECTION = 5; |
| 730 | FAILURE_SHORT_CONNECTION_DUE_TO_NON_LOCAL_DISCONNECTION = 6; |
| 731 | } |
| 732 | // Reason for uploading this stat |
| 733 | optional AbnormalityType abnormality_type = 1; |
| 734 | // The particular type of failure |
| 735 | optional FailureType failure_type = 2; |
| 736 | // How many times we have encountered this combination of AbnormalityType and FailureType |
| 737 | optional int32 failure_count = 3; |
| 738 | } |
| 739 | |
| 740 | /** |
| 741 | * Logs whether a wifi connection is successful and reasons for failure if it isn't. |
| 742 | * |
| 743 | * Logged from: |
| 744 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
| 745 | */ |
| 746 | message WifiConnectionResultReported { |
| 747 | enum FailureCode { |
| 748 | FAILURE_UNKNOWN = 0; |
| 749 | FAILURE_ASSOCIATION_TIMEOUT = 1; |
| 750 | FAILURE_ASSOCIATION_REJECTION = 2; |
| 751 | FAILURE_AUTHENTICATION_GENERAL = 3; |
| 752 | FAILURE_AUTHENTICATION_EAP = 4; |
| 753 | FAILURE_DHCP = 5; |
| 754 | FAILURE_NETWORK_DISCONNECTION = 6; |
| 755 | FAILURE_ROAM_TIMEOUT = 7; |
| 756 | } |
| 757 | // true represents a successful connection |
| 758 | optional bool connection_result = 1; |
| 759 | // reason for the connection failure |
| 760 | optional FailureCode failure_code = 2; |
| 761 | // scan rssi before the connection attempt |
| 762 | optional int32 rssi = 3; |
| 763 | } |
| 764 | |
| 765 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 766 | * Logs when memory stats of a process is reported. |
| 767 | * |
| 768 | * Logged from: |
| 769 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 770 | */ |
| 771 | message ProcessMemoryStatReported { |
| 772 | optional int32 uid = 1; |
| 773 | optional string process_name = 2; |
| 774 | optional string package_name = 3; |
| 775 | //TODO: remove this when validation is done |
| 776 | optional int64 version = 9; |
| 777 | optional int64 pss = 4; |
| 778 | optional int64 uss = 5; |
| 779 | optional int64 rss = 6; |
| 780 | enum Type { |
| 781 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 782 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 783 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 784 | ADD_PSS_EXTERNAL = 3; |
| 785 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 786 | } |
| 787 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 788 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 789 | } |
| 790 | |
| 791 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 792 | * Logs that a process started, finished, crashed, or ANRed. |
| 793 | * |
| 794 | * Logged from: |
| 795 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 796 | */ |
| 797 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 798 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 799 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 800 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 801 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 802 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 803 | // What lifecycle state the process changed to. |
| 804 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 805 | enum State { |
| 806 | FINISHED = 0; |
| 807 | STARTED = 1; |
| 808 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 809 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 810 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 811 | } |
| 812 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 813 | /** |
| 814 | * Logs when the ble scan state changes. |
| 815 | * |
| 816 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 817 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 818 | */ |
| 819 | message BleScanStateChanged { |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 820 | repeated AttributionNode attribution_node = 1 |
| 821 | [(state_field_option).option = PRIMARY_FIELD_FIRST_UID]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 822 | |
| 823 | enum State { |
| 824 | OFF = 0; |
| 825 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 826 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 827 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 828 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 829 | optional State state = 2 [ |
| 830 | (state_field_option).option = EXCLUSIVE_STATE, |
| 831 | (state_field_option).default_state_value = 0 /* State.OFF */, |
| 832 | (state_field_option).reset_state_value = 2 /* State.RESET */, |
| 833 | (state_field_option).nested = true |
| 834 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 835 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 836 | // Does the scan have a filter. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 837 | optional bool is_filtered = 3 [(state_field_option).option = PRIMARY_FIELD]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 838 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 839 | optional bool is_first_match = 4 [(state_field_option).option = PRIMARY_FIELD]; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 840 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 841 | optional bool is_opportunistic = 5 [(state_field_option).option = PRIMARY_FIELD]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 842 | } |
| 843 | |
| 844 | /** |
| 845 | * Logs reporting of a ble scan finding results. |
| 846 | * |
| 847 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 848 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 849 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 850 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 851 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 852 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 853 | |
| 854 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 855 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 856 | } |
| 857 | |
| 858 | /** |
| 859 | * Logs when a sensor state changes. |
| 860 | * |
| 861 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 862 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 863 | */ |
| 864 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 865 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 866 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 867 | // The id (int) of the sensor. |
| 868 | optional int32 sensor_id = 2; |
| 869 | |
| 870 | enum State { |
| 871 | OFF = 0; |
| 872 | ON = 1; |
| 873 | } |
| 874 | optional State state = 3; |
| 875 | } |
| 876 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 877 | /** |
| 878 | * Logs when GPS state changes. |
| 879 | * |
| 880 | * Logged from: |
| 881 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 882 | */ |
| 883 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 884 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 885 | |
| 886 | enum State { |
| 887 | OFF = 0; |
| 888 | ON = 1; |
| 889 | } |
| 890 | optional State state = 2; |
| 891 | } |
| 892 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 893 | /** |
| 894 | * Logs when GPS signal quality. |
| 895 | * |
| 896 | * Logged from: |
| 897 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 898 | */ |
| 899 | message GpsSignalQualityChanged { |
| 900 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 901 | } |
| 902 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 903 | |
| 904 | /** |
| 905 | * Logs when a sync manager sync state changes. |
| 906 | * |
| 907 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 908 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 909 | */ |
| 910 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 911 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 912 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 913 | // 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] | 914 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 915 | |
| 916 | enum State { |
| 917 | OFF = 0; |
| 918 | ON = 1; |
| 919 | } |
| 920 | optional State state = 3; |
| 921 | } |
| 922 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 923 | /* |
| 924 | * Deferred job stats. |
| 925 | * |
| 926 | * Logged from: |
| 927 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 928 | */ |
| 929 | message DeferredJobStatsReported { |
| 930 | repeated AttributionNode attribution_node = 1; |
| 931 | |
| 932 | // Number of jobs deferred. |
| 933 | optional int32 num_jobs_deferred = 2; |
| 934 | |
| 935 | // Time since the last job runs. |
| 936 | optional int64 time_since_last_job_millis = 3; |
| 937 | } |
| 938 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 939 | /** |
| 940 | * Logs when a job scheduler job state changes. |
| 941 | * |
| 942 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 943 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 944 | */ |
| 945 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 946 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 947 | |
| 948 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 949 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 950 | |
| 951 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 952 | FINISHED = 0; |
| 953 | STARTED = 1; |
| 954 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 955 | } |
| 956 | optional State state = 3; |
| 957 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 958 | // The reason a job has stopped. |
| 959 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 960 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 961 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 962 | |
| 963 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 964 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 965 | // already assigned 0. |
| 966 | enum Bucket { |
| 967 | UNKNOWN = -1; |
| 968 | ACTIVE = 0; |
| 969 | WORKING_SET = 1; |
| 970 | FREQUENT = 2; |
| 971 | RARE = 3; |
| 972 | NEVER = 4; |
Kweku Adams | ae9d6be | 2020-01-14 16:10:14 -0800 | [diff] [blame] | 973 | RESTRICTED = 5; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 974 | } |
| 975 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 976 | |
| 977 | // The job id (as assigned by the app). |
| 978 | optional int32 job_id = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 979 | } |
| 980 | |
| 981 | /** |
| 982 | * Logs when the audio state changes. |
| 983 | * |
| 984 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 985 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 986 | */ |
| 987 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 988 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 989 | |
| 990 | enum State { |
| 991 | OFF = 0; |
| 992 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 993 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 994 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 995 | } |
| 996 | optional State state = 2; |
| 997 | } |
| 998 | |
| 999 | /** |
| 1000 | * Logs when the video codec state changes. |
| 1001 | * |
| 1002 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1003 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1004 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1005 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1006 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1007 | |
| 1008 | enum State { |
| 1009 | OFF = 0; |
| 1010 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1011 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 1012 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1013 | } |
| 1014 | optional State state = 2; |
| 1015 | } |
| 1016 | |
| 1017 | /** |
| 1018 | * Logs when the flashlight state changes. |
| 1019 | * |
| 1020 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1021 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1022 | */ |
| 1023 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1024 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1025 | |
| 1026 | enum State { |
| 1027 | OFF = 0; |
| 1028 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1029 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 1030 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1031 | } |
| 1032 | optional State state = 2; |
| 1033 | } |
| 1034 | |
| 1035 | /** |
| 1036 | * Logs when the camera state changes. |
| 1037 | * |
| 1038 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1039 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1040 | */ |
| 1041 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1042 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1043 | |
| 1044 | enum State { |
| 1045 | OFF = 0; |
| 1046 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 1047 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 1048 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1049 | } |
| 1050 | optional State state = 2; |
| 1051 | } |
| 1052 | |
| 1053 | /** |
| 1054 | * 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] | 1055 | * |
| 1056 | * Logged from: |
| 1057 | * TODO |
| 1058 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 1059 | message WakelockStateChanged { |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 1060 | repeated AttributionNode attribution_node = 1 |
| 1061 | [(state_field_option).option = PRIMARY_FIELD_FIRST_UID]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1062 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1063 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 1064 | // From frameworks/base/core/proto/android/os/enums.proto. |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1065 | optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).option = PRIMARY_FIELD]; |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 1066 | ; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1067 | |
| 1068 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1069 | optional string tag = 3 [(state_field_option).option = PRIMARY_FIELD]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1070 | |
| 1071 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 1072 | RELEASE = 0; |
| 1073 | ACQUIRE = 1; |
| 1074 | CHANGE_RELEASE = 2; |
| 1075 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1076 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 1077 | optional State state = 4 [ |
| 1078 | (state_field_option).option = EXCLUSIVE_STATE, |
| 1079 | (state_field_option).default_state_value = 0, |
| 1080 | (state_field_option).nested = true |
| 1081 | ]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1082 | } |
| 1083 | |
| 1084 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1085 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 1086 | * |
| 1087 | * Logged from: |
| 1088 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1089 | */ |
| 1090 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1091 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1092 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1093 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 1094 | optional string tag = 2; |
| 1095 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1096 | // TODO: I have no idea what this is. |
| 1097 | optional string history_tag = 3; |
| 1098 | |
| 1099 | enum State { |
| 1100 | OFF = 0; |
| 1101 | ON = 1; |
| 1102 | } |
| 1103 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1104 | } |
| 1105 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1106 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 1107 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 1108 | * |
| 1109 | * Logged from: |
| 1110 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 1111 | */ |
| 1112 | message InteractiveStateChanged { |
| 1113 | enum State { |
| 1114 | OFF = 0; |
| 1115 | ON = 1; |
| 1116 | } |
| 1117 | optional State state = 1; |
| 1118 | } |
| 1119 | |
| 1120 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1121 | * Logs Battery Saver state change. |
| 1122 | * |
| 1123 | * Logged from: |
| 1124 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1125 | */ |
| 1126 | message BatterySaverModeStateChanged { |
| 1127 | enum State { |
| 1128 | OFF = 0; |
| 1129 | ON = 1; |
| 1130 | } |
| 1131 | optional State state = 1; |
| 1132 | } |
| 1133 | |
| 1134 | /** |
| 1135 | * Logs Doze mode state change. |
| 1136 | * |
| 1137 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1138 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1139 | */ |
| 1140 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 1141 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1142 | } |
| 1143 | |
| 1144 | |
| 1145 | /** |
| 1146 | * Logs state change of Doze mode including maintenance windows. |
| 1147 | * |
| 1148 | * Logged from: |
| 1149 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1150 | */ |
| 1151 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 1152 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 1153 | } |
| 1154 | |
| 1155 | /** |
| 1156 | * Logs screen brightness level. |
| 1157 | * |
| 1158 | * Logged from: |
| 1159 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1160 | */ |
| 1161 | message ScreenBrightnessChanged { |
| 1162 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 1163 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1164 | } |
| 1165 | |
| 1166 | /** |
| 1167 | * Logs battery level (percent full, from 0 to 100). |
| 1168 | * |
| 1169 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1170 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1171 | */ |
| 1172 | message BatteryLevelChanged { |
| 1173 | // Battery level. Should be in [0, 100]. |
| 1174 | optional int32 battery_level = 1; |
| 1175 | } |
| 1176 | |
| 1177 | /** |
| 1178 | * Logs change in charging status of the device. |
| 1179 | * |
| 1180 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1181 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1182 | */ |
| 1183 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1184 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 1185 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1186 | } |
| 1187 | |
| 1188 | /** |
| 1189 | * Logs whether the device is plugged in, and what power source it is using. |
| 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 | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1193 | */ |
| 1194 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1195 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 1196 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1197 | } |
| 1198 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1199 | /** |
| 1200 | * Logs when an app's wakeup alarm fires. |
| 1201 | * |
| 1202 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1203 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1204 | */ |
| 1205 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1206 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1207 | |
| 1208 | // Name of the wakeup alarm. |
| 1209 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1210 | |
| 1211 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1212 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1213 | |
| 1214 | // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java. |
| 1215 | enum Bucket { |
| 1216 | UNKNOWN = 0; |
| 1217 | EXEMPTED = 5; |
| 1218 | ACTIVE = 10; |
| 1219 | WORKING_SET = 20; |
| 1220 | FREQUENT = 30; |
| 1221 | RARE = 40; |
| 1222 | NEVER = 50; |
| 1223 | } |
| 1224 | // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired. |
| 1225 | optional Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1226 | } |
| 1227 | |
| 1228 | /** |
| 1229 | * Logs when an an app causes the mobile radio to change state. |
| 1230 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1231 | * |
| 1232 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1233 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1234 | */ |
| 1235 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1236 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1237 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1238 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1239 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1240 | } |
| 1241 | |
| 1242 | /** |
| 1243 | * Logs when an an app causes the wifi radio to change state. |
| 1244 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1245 | * |
| 1246 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1247 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1248 | */ |
| 1249 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1250 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1251 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1252 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1253 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1254 | } |
| 1255 | |
| 1256 | /** |
| 1257 | * Logs kernel wakeup reasons and aborts. |
| 1258 | * |
| 1259 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1260 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1261 | */ |
| 1262 | message KernelWakeupReported { |
| 1263 | // Name of the kernel wakeup reason (or abort). |
| 1264 | optional string wakeup_reason_name = 1; |
| 1265 | |
| 1266 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1267 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1268 | } |
| 1269 | |
| 1270 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1271 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1272 | * 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] | 1273 | * |
| 1274 | * Logged from: |
| 1275 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1276 | */ |
| 1277 | message WifiEnabledStateChanged { |
| 1278 | enum State { |
| 1279 | OFF = 0; |
| 1280 | ON = 1; |
| 1281 | } |
| 1282 | optional State state = 1; |
| 1283 | } |
| 1284 | |
| 1285 | /** |
tsaichristine | cecebdc | 2020-02-04 14:05:56 -0800 | [diff] [blame] | 1286 | * This atom is deprecated starting in R. |
| 1287 | * |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1288 | * 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] | 1289 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1290 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1291 | * |
| 1292 | * Logged from: |
| 1293 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1294 | */ |
| 1295 | message WifiRunningStateChanged { |
| 1296 | repeated AttributionNode attribution_node = 1; |
| 1297 | |
| 1298 | enum State { |
| 1299 | OFF = 0; |
| 1300 | ON = 1; |
| 1301 | } |
| 1302 | optional State state = 2; |
| 1303 | } |
| 1304 | |
| 1305 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1306 | * Logs wifi locks held by an app. |
| 1307 | * |
| 1308 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1309 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1310 | */ |
| 1311 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1312 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1313 | |
| 1314 | enum State { |
| 1315 | OFF = 0; |
| 1316 | ON = 1; |
| 1317 | } |
| 1318 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1319 | |
| 1320 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1321 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1322 | } |
| 1323 | |
| 1324 | /** |
| 1325 | * Logs wifi signal strength changes. |
| 1326 | * |
| 1327 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1328 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1329 | */ |
| 1330 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1331 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1332 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1333 | } |
| 1334 | |
| 1335 | /** |
| 1336 | * Logs wifi scans performed by an app. |
| 1337 | * |
| 1338 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1339 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1340 | */ |
| 1341 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1342 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1343 | |
| 1344 | enum State { |
| 1345 | OFF = 0; |
| 1346 | ON = 1; |
| 1347 | } |
| 1348 | optional State state = 2; |
| 1349 | } |
| 1350 | |
| 1351 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1352 | * Logs wifi multicast locks held by an app |
| 1353 | * |
| 1354 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1355 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1356 | */ |
| 1357 | message WifiMulticastLockStateChanged { |
| 1358 | repeated AttributionNode attribution_node = 1; |
| 1359 | |
| 1360 | enum State { |
| 1361 | OFF = 0; |
| 1362 | ON = 1; |
| 1363 | } |
| 1364 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1365 | |
| 1366 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1367 | } |
| 1368 | |
| 1369 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1370 | * Logs shutdown reason and duration on next boot. |
| 1371 | * |
| 1372 | * Logged from: |
| 1373 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1374 | */ |
| 1375 | message ShutdownSequenceReported { |
| 1376 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1377 | optional bool reboot = 1; |
| 1378 | |
| 1379 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1380 | optional string reason = 2; |
| 1381 | |
| 1382 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1383 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1384 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1385 | |
| 1386 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1387 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1388 | } |
| 1389 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1390 | |
| 1391 | /** |
| 1392 | * Logs boot reason and duration. |
| 1393 | * |
| 1394 | * Logged from: |
| 1395 | * system/core/bootstat/bootstat.cpp |
| 1396 | */ |
| 1397 | message BootSequenceReported { |
| 1398 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1399 | // Default: "<EMPTY>" if not available. |
| 1400 | optional string bootloader_reason = 1; |
| 1401 | |
| 1402 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1403 | // Default: "<EMPTY>" if not available. |
| 1404 | optional string system_reason = 2; |
| 1405 | |
| 1406 | // 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] | 1407 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1408 | |
| 1409 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1410 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1411 | |
| 1412 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1413 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1414 | |
| 1415 | // Time since last boot in ms. Default: 0 if not available. |
| 1416 | optional int64 time_since_last_boot = 6; |
| 1417 | } |
| 1418 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1419 | |
| 1420 | /** |
| 1421 | * Logs call state and disconnect cause (if applicable). |
| 1422 | * |
| 1423 | * Logged from: |
| 1424 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1425 | */ |
| 1426 | message CallStateChanged { |
| 1427 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1428 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1429 | optional android.telecom.CallStateEnum call_state = 1; |
| 1430 | |
| 1431 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1432 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1433 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1434 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1435 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1436 | |
| 1437 | // True if the call is self-managed, which are apps that use the |
| 1438 | // telecom infrastructure to make their own calls. |
| 1439 | optional bool self_managed = 3; |
| 1440 | |
| 1441 | // True if call is external. External calls are calls on connected Wear |
| 1442 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1443 | optional bool external_call = 4; |
| 1444 | } |
| 1445 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1446 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1447 | * Logs keyguard state. The keyguard is the lock screen. |
| 1448 | * |
| 1449 | * Logged from: |
| 1450 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1451 | */ |
| 1452 | message KeyguardStateChanged { |
| 1453 | enum State { |
| 1454 | UNKNOWN = 0; |
| 1455 | // The keyguard is hidden when the phone is unlocked. |
| 1456 | HIDDEN = 1; |
| 1457 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1458 | SHOWN= 2; |
| 1459 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1460 | // Eg. Opening the camera while on the lock screen. |
| 1461 | OCCLUDED = 3; |
| 1462 | } |
| 1463 | optional State state = 1; |
| 1464 | } |
| 1465 | |
| 1466 | /** |
| 1467 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1468 | * prompts the user to enter a password (pattern, pin, etc). |
| 1469 | * |
| 1470 | * Logged from: |
| 1471 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1472 | */ |
| 1473 | |
| 1474 | message KeyguardBouncerStateChanged { |
| 1475 | enum State { |
| 1476 | UNKNOWN = 0; |
| 1477 | // Bouncer is hidden, either as a result of successfully entering the |
| 1478 | // password, screen timing out, or user going back to lock screen. |
| 1479 | HIDDEN = 1; |
| 1480 | // This is when the user is being prompted to enter the password. |
| 1481 | SHOWN = 2; |
| 1482 | } |
| 1483 | optional State state = 1; |
| 1484 | } |
| 1485 | |
| 1486 | /** |
| 1487 | * Logs the result of entering a password into the keyguard bouncer. |
| 1488 | * |
| 1489 | * Logged from: |
| 1490 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1491 | */ |
| 1492 | message KeyguardBouncerPasswordEntered { |
| 1493 | enum BouncerResult { |
| 1494 | UNKNOWN = 0; |
| 1495 | // The password entered was incorrect. |
| 1496 | FAILURE = 1; |
| 1497 | // The password entered was correct. |
| 1498 | SUCCESS = 2; |
| 1499 | } |
| 1500 | optional BouncerResult result = 1; |
| 1501 | } |
| 1502 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1503 | /* |
| 1504 | * Logs changes to the configuration of the device. The configuration is defined |
| 1505 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1506 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1507 | * Please go there to interpret the possible values each field can be. |
| 1508 | * |
| 1509 | * Logged from: |
| 1510 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1511 | */ |
| 1512 | message ResourceConfigurationChanged { |
| 1513 | // Bit mask of color capabilities of the screen. |
| 1514 | // Contains information about the color gamut and hdr mode of the screen. |
| 1515 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1516 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1517 | |
| 1518 | // The target screen density being rendered to. |
| 1519 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1520 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1521 | |
| 1522 | // Current user preference for the scaling factor for fonts, |
| 1523 | // relative to the base density scaling. |
| 1524 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1525 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1526 | |
| 1527 | // Flag indicating whether the hard keyboard is hidden. |
| 1528 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1529 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1530 | |
| 1531 | // The type of keyboard attached to the device. |
| 1532 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1533 | optional int32 keyboard = 5; |
| 1534 | |
| 1535 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1536 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1537 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1538 | |
| 1539 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1540 | // 0 if undefined. |
| 1541 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1542 | optional int32 mcc = 7; |
| 1543 | |
| 1544 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1545 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1546 | // MNC_ZERO symbol defined in Configuration.java. |
| 1547 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1548 | optional int32 mnc = 8; |
| 1549 | |
| 1550 | // The kind of navigation available on the device. |
| 1551 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1552 | optional int32 navigation = 9; |
| 1553 | |
| 1554 | // Flag indicating whether the navigation is available. |
| 1555 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1556 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1557 | |
| 1558 | // Overall orientation of the screen. |
| 1559 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1560 | optional int32 orientation = 11; |
| 1561 | |
| 1562 | // The current height of the available screen space, in dp units. |
| 1563 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1564 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1565 | |
| 1566 | // Bit mask of overall layout of the screen. |
| 1567 | // Contains information about screen size, whether the screen is wider/taller |
| 1568 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1569 | // and whether the screen has a rounded shape. |
| 1570 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1571 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1572 | |
| 1573 | // Current width of the available screen space, in dp units. |
| 1574 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1575 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1576 | |
| 1577 | // The smallest screen size an application will see in normal operation. |
| 1578 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1579 | // in portrait and landscape. |
| 1580 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1581 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1582 | |
| 1583 | // The type of touch screen attached to the device. |
| 1584 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1585 | optional int32 touchscreen = 16; |
| 1586 | |
| 1587 | // Bit mask of the ui mode. |
| 1588 | // Contains information about the overall ui mode of the device. |
| 1589 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1590 | // Also contains information about whether the device is in night mode. |
| 1591 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1592 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1593 | } |
| 1594 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1595 | |
| 1596 | /** |
| 1597 | * Logs changes in the connection state of the mobile radio. |
| 1598 | * |
| 1599 | * Logged from: |
| 1600 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1601 | */ |
| 1602 | message MobileConnectionStateChanged { |
| 1603 | // States are from the state machine DataConnection.java. |
| 1604 | enum State { |
| 1605 | UNKNOWN = 0; |
| 1606 | // The connection is inactive, or disconnected. |
| 1607 | INACTIVE = 1; |
| 1608 | // The connection is being activated, or connecting. |
| 1609 | ACTIVATING = 2; |
| 1610 | // The connection is active, or connected. |
| 1611 | ACTIVE = 3; |
| 1612 | // The connection is disconnecting. |
| 1613 | DISCONNECTING = 4; |
| 1614 | // The connection is disconnecting after creating a connection. |
| 1615 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1616 | } |
| 1617 | optional State state = 1; |
| 1618 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1619 | optional int32 sim_slot_index = 2; |
| 1620 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1621 | // every new network created. Resets whenever the device reboots. |
| 1622 | optional int32 data_connection_id = 3; |
| 1623 | // A bitmask for the capabilities of this connection. |
| 1624 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1625 | // Default value (if we have no information): 0 |
| 1626 | optional int64 capabilities = 4; |
| 1627 | // If this connection has internet. |
| 1628 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1629 | optional bool has_internet = 5; |
| 1630 | } |
| 1631 | |
| 1632 | /** |
| 1633 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1634 | * |
| 1635 | * Logged from: |
| 1636 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1637 | */ |
| 1638 | message MobileRadioTechnologyChanged { |
| 1639 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1640 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1641 | optional int32 sim_slot_index = 2; |
| 1642 | } |
| 1643 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1644 | /** |
| 1645 | * Logs the VID and PID of any connected USB devices. |
| 1646 | * |
| 1647 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1648 | * |
| 1649 | * Logged by Vendor. |
| 1650 | */ |
| 1651 | message UsbDeviceAttached { |
| 1652 | optional int32 vid = 1; |
| 1653 | optional int32 pid = 2; |
| 1654 | optional bool has_audio = 3; |
| 1655 | optional bool has_hid = 4; |
| 1656 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1657 | enum State { |
| 1658 | STATE_DISCONNECTED = 0; |
| 1659 | STATE_CONNECTED = 1; |
| 1660 | } |
| 1661 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1662 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1663 | } |
| 1664 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1665 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1666 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1667 | * Logs when Bluetooth is enabled and disabled. |
| 1668 | * |
| 1669 | * Logged from: |
| 1670 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1671 | */ |
| 1672 | message BluetoothEnabledStateChanged { |
| 1673 | repeated AttributionNode attribution_node = 1; |
| 1674 | // Whether or not bluetooth is enabled on the device. |
| 1675 | enum State { |
| 1676 | UNKNOWN = 0; |
| 1677 | ENABLED = 1; |
| 1678 | DISABLED = 2; |
| 1679 | } |
| 1680 | optional State state = 2; |
| 1681 | // The reason for being enabled/disabled. |
| 1682 | // Eg. Airplane mode, crash, application request. |
| 1683 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1684 | // 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] | 1685 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1686 | } |
| 1687 | |
| 1688 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1689 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1690 | * |
| 1691 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1692 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1693 | * |
| 1694 | * Next Tag: 5 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1695 | */ |
| 1696 | message BluetoothConnectionStateChanged { |
| 1697 | // The state of the connection. |
| 1698 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1699 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1700 | // An identifier that can be used to match connect and disconnect events. |
| 1701 | // Currently is last two bytes of a hash of a device level ID and |
| 1702 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1703 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1704 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1705 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1706 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1707 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1708 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1709 | // An identifier that can be used to match events for this device. |
| 1710 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1711 | // Salt: Randomly generated 256 bit value |
| 1712 | // Hash algorithm: HMAC-SHA256 |
| 1713 | // Size: 32 byte |
| 1714 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1715 | 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] | 1716 | } |
| 1717 | |
| 1718 | /** |
| 1719 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1720 | * |
| 1721 | * Logged from: |
| 1722 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1723 | * |
| 1724 | * Next Tag: 3 |
| 1725 | */ |
| 1726 | message BluetoothAclConnectionStateChanged { |
| 1727 | // An identifier that can be used to match events for this device. |
| 1728 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1729 | // Salt: Randomly generated 256 bit value |
| 1730 | // Hash algorithm: HMAC-SHA256 |
| 1731 | // Size: 32 byte |
| 1732 | // Default: null or empty if the device identifier is not known |
| 1733 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1734 | // The state of the connection. |
| 1735 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1736 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1737 | } |
| 1738 | |
| 1739 | /** |
| 1740 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1741 | * |
| 1742 | * Logged from: |
| 1743 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1744 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1745 | * |
| 1746 | * Next Tag: 4 |
| 1747 | */ |
| 1748 | message BluetoothScoConnectionStateChanged { |
| 1749 | // An identifier that can be used to match events for this device. |
| 1750 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1751 | // Salt: Randomly generated 256 bit value |
| 1752 | // Hash algorithm: HMAC-SHA256 |
| 1753 | // Size: 32 byte |
| 1754 | // Default: null or empty if the device identifier is not known |
| 1755 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1756 | // The state of the connection. |
| 1757 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1758 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1759 | // Codec used for this SCO connection |
| 1760 | // Default: UNKNOWN |
| 1761 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1762 | } |
| 1763 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1764 | /** |
| 1765 | * Logged when active device of a profile changes |
| 1766 | * |
| 1767 | * Logged from: |
| 1768 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1769 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1770 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1771 | */ |
| 1772 | message BluetoothActiveDeviceChanged { |
| 1773 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1774 | // From android.bluetooth.BluetoothProfile |
| 1775 | optional int32 bt_profile = 1; |
| 1776 | // An identifier that can be used to match events for this new active device. |
| 1777 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1778 | // Salt: Randomly generated 256 bit value |
| 1779 | // Hash algorithm: HMAC-SHA256 |
| 1780 | // Size: 32 byte |
| 1781 | // Default: null or empty if there is no active device for this profile |
| 1782 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1783 | } |
| 1784 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1785 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1786 | // - This event is triggered when there is a related HCI command or event |
| 1787 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1788 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1789 | // receiving command complete |
| 1790 | // - HCI events are logged when they arrive |
| 1791 | // |
| 1792 | // Low level log from system/bt |
| 1793 | // |
| 1794 | // Bluetooth classic commands: |
| 1795 | // - CMD_CREATE_CONNECTION |
| 1796 | // - CMD_DISCONNECT |
| 1797 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1798 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1799 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1800 | // - CMD_SETUP_ESCO_CONNECTION |
| 1801 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1802 | // - CMD_REJECT_ESCO_CONNECTION |
| 1803 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1804 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1805 | // |
| 1806 | // Bluetooth low energy commands: |
| 1807 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1808 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1809 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1810 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1811 | // - CMD_BLE_ADD_WHITE_LIST |
| 1812 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1813 | // |
| 1814 | // Bluetooth classic events: |
| 1815 | // - EVT_CONNECTION_COMP |
| 1816 | // - EVT_CONNECTION_REQUEST |
| 1817 | // - EVT_DISCONNECTION_COMP |
| 1818 | // - EVT_ESCO_CONNECTION_COMP |
| 1819 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1820 | // |
| 1821 | // Bluetooth low energy meta events: |
| 1822 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1823 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1824 | // |
| 1825 | // Next tag: 10 |
| 1826 | message BluetoothLinkLayerConnectionEvent { |
| 1827 | // An identifier that can be used to match events for this device. |
| 1828 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1829 | // Salt: Randomly generated 256 bit value |
| 1830 | // Hash algorithm: HMAC-SHA256 |
| 1831 | // Size: 32 byte |
| 1832 | // Default: null or empty if the device identifier is not known |
| 1833 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1834 | // Connection handle of this connection if available |
| 1835 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1836 | // Default: 0xFFFF if the handle is unknown |
| 1837 | optional int32 connection_handle = 2; |
| 1838 | // Direction of the link |
| 1839 | // Default: DIRECTION_UNKNOWN |
| 1840 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1841 | // Type of this link |
| 1842 | // Default: LINK_TYPE_UNKNOWN |
| 1843 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1844 | |
| 1845 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1846 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1847 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1848 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1849 | // set and valid, ignore hci_ble_event |
| 1850 | |
| 1851 | // HCI command associated with this event |
| 1852 | // Default: CMD_UNKNOWN |
| 1853 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1854 | // HCI event associated with this event |
| 1855 | // Default: EVT_UNKNOWN |
| 1856 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1857 | // HCI BLE meta event associated with this event |
| 1858 | // Default: BLE_EVT_UNKNOWN |
| 1859 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1860 | // HCI command status code if this is triggerred by hci_cmd |
| 1861 | // Default: STATUS_UNKNOWN |
| 1862 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1863 | // HCI reason code associated with this event |
| 1864 | // Default: STATUS_UNKNOWN |
| 1865 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
| 1866 | } |
| 1867 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1868 | /** |
| 1869 | * Logs when a module is rolled back by Watchdog. |
| 1870 | * |
| 1871 | * Logged from: Rollback Manager |
| 1872 | */ |
| 1873 | message WatchdogRollbackOccurred { |
| 1874 | enum RollbackType { |
| 1875 | UNKNOWN = 0; |
| 1876 | ROLLBACK_INITIATE = 1; |
| 1877 | ROLLBACK_SUCCESS = 2; |
| 1878 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 1879 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1880 | } |
| 1881 | optional RollbackType rollback_type = 1; |
| 1882 | |
| 1883 | optional string package_name = 2; |
| 1884 | |
| 1885 | optional int32 package_version_code = 3; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1886 | |
| 1887 | enum RollbackReasonType { |
| 1888 | REASON_UNKNOWN = 0; |
| 1889 | REASON_NATIVE_CRASH = 1; |
| 1890 | REASON_EXPLICIT_HEALTH_CHECK = 2; |
| 1891 | REASON_APP_CRASH = 3; |
| 1892 | REASON_APP_NOT_RESPONDING = 4; |
Gavin Corkery | 3285d22 | 2020-01-17 19:24:22 +0000 | [diff] [blame] | 1893 | REASON_NATIVE_CRASH_DURING_BOOT = 5; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1894 | } |
| 1895 | optional RollbackReasonType rollback_reason = 4; |
| 1896 | |
| 1897 | // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback |
| 1898 | // is initiated. Empty if the package is unknown. |
| 1899 | optional string failing_package_name = 5; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 1900 | |
| 1901 | optional TrainExperimentIds experiment_ids = 6 [(log_mode) = MODE_BYTES]; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1902 | } |
| 1903 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1904 | /** |
| 1905 | * Logs when there is a change in Bluetooth A2DP playback state |
| 1906 | * |
| 1907 | * Logged from: |
| 1908 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1909 | */ |
| 1910 | message BluetoothA2dpPlaybackStateChanged { |
| 1911 | // An identifier that can be used to match events for this device. |
| 1912 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1913 | // Salt: Randomly generated 256 bit value |
| 1914 | // Hash algorithm: HMAC-SHA256 |
| 1915 | // Size: 32 byte |
| 1916 | // Default: null or empty if the device identifier is not known |
| 1917 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1918 | // Current playback state |
| 1919 | // Default: PLAYBACK_STATE_UNKNOWN |
| 1920 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 1921 | // Current audio coding mode |
| 1922 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 1923 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
| 1924 | } |
| 1925 | |
| 1926 | /** |
| 1927 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 1928 | * |
| 1929 | * Logged from: |
| 1930 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1931 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1932 | */ |
| 1933 | message BluetoothA2dpCodecConfigChanged { |
| 1934 | // An identifier that can be used to match events for this device. |
| 1935 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1936 | // Salt: Randomly generated 256 bit value |
| 1937 | // Hash algorithm: HMAC-SHA256 |
| 1938 | // Size: 32 byte |
| 1939 | // Default: null or empty if the device identifier is not known |
| 1940 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1941 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1942 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1943 | optional int32 codec_type = 2; |
| 1944 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1945 | // Default: CODEC_PRIORITY_DEFAULT |
| 1946 | optional int32 codec_priority = 3; |
| 1947 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 1948 | // Default: SAMPLE_RATE_NONE |
| 1949 | optional int32 sample_rate = 4; |
| 1950 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 1951 | // Default: BITS_PER_SAMPLE_NONE |
| 1952 | optional int32 bits_per_sample = 5; |
| 1953 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 1954 | // Default: CHANNEL_MODE_NONE |
| 1955 | optional int32 channel_mode = 6; |
| 1956 | // Codec specific values |
| 1957 | // Default 0 |
| 1958 | optional int64 codec_specific_1 = 7; |
| 1959 | optional int64 codec_specific_2 = 8; |
| 1960 | optional int64 codec_specific_3 = 9; |
| 1961 | optional int64 codec_specific_4 = 10; |
| 1962 | } |
| 1963 | |
| 1964 | /** |
| 1965 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 1966 | * Each codec's capability is logged separately due to statsd restriction |
| 1967 | * |
| 1968 | * Logged from: |
| 1969 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1970 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1971 | */ |
| 1972 | message BluetoothA2dpCodecCapabilityChanged { |
| 1973 | // An identifier that can be used to match events for this device. |
| 1974 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1975 | // Salt: Randomly generated 256 bit value |
| 1976 | // Hash algorithm: HMAC-SHA256 |
| 1977 | // Size: 32 byte |
| 1978 | // Default: null or empty if the device identifier is not known |
| 1979 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1980 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1981 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1982 | optional int32 codec_type = 2; |
| 1983 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1984 | // Default: CODEC_PRIORITY_DEFAULT |
| 1985 | optional int32 codec_priority = 3; |
| 1986 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 1987 | // in BluetoothCodecConfig |
| 1988 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 1989 | optional int32 sample_rate = 4; |
| 1990 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 1991 | // in BluetoothCodecConfig |
| 1992 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 1993 | optional int32 bits_per_sample = 5; |
| 1994 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 1995 | // BluetoothCodecConfig |
| 1996 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 1997 | optional int32 channel_mode = 6; |
| 1998 | // Codec specific values |
| 1999 | // Default 0 |
| 2000 | optional int64 codec_specific_1 = 7; |
| 2001 | optional int64 codec_specific_2 = 8; |
| 2002 | optional int64 codec_specific_3 = 9; |
| 2003 | optional int64 codec_specific_4 = 10; |
| 2004 | } |
| 2005 | |
| 2006 | /** |
| 2007 | * Logs when A2DP failed to read from PCM source. |
| 2008 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 2009 | * |
| 2010 | * Logged from: |
| 2011 | * system/bt |
| 2012 | */ |
| 2013 | message BluetoothA2dpAudioUnderrunReported { |
| 2014 | // An identifier that can be used to match events for this device. |
| 2015 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2016 | // Salt: Randomly generated 256 bit value |
| 2017 | // Hash algorithm: HMAC-SHA256 |
| 2018 | // Size: 32 byte |
| 2019 | // Default: null or empty if the device identifier is not known |
| 2020 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2021 | // Encoding interval in nanoseconds |
| 2022 | // Default: 0 |
| 2023 | optional int64 encoding_interval_nanos = 2; |
| 2024 | // Number of bytes of PCM data that could not be read from the source |
| 2025 | // Default: 0 |
| 2026 | optional int32 num_missing_pcm_bytes = 3; |
| 2027 | } |
| 2028 | |
| 2029 | /** |
| 2030 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 2031 | * buffer queue is full and we have to drop data |
| 2032 | * |
| 2033 | * Logged from: |
| 2034 | * system/bt |
| 2035 | */ |
| 2036 | message BluetoothA2dpAudioOverrunReported { |
| 2037 | // An identifier that can be used to match events for this device. |
| 2038 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2039 | // Salt: Randomly generated 256 bit value |
| 2040 | // Hash algorithm: HMAC-SHA256 |
| 2041 | // Size: 32 byte |
| 2042 | // Default: null or empty if the device identifier is not known |
| 2043 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2044 | // Encoding interval in nanoseconds |
| 2045 | // Default: 0 |
| 2046 | optional int64 encoding_interval_nanos = 2; |
| 2047 | // Number of buffers dropped in this event |
| 2048 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 2049 | // Default: 0 |
| 2050 | optional int32 num_dropped_buffers = 3; |
| 2051 | // Number of encoded buffers dropped in this event |
| 2052 | // Default 0 |
| 2053 | optional int32 num_dropped_encoded_frames = 4; |
| 2054 | // Number of encoded bytes dropped in this event |
| 2055 | // Default: 0 |
| 2056 | optional int32 num_dropped_encoded_bytes = 5; |
| 2057 | } |
| 2058 | |
| 2059 | /** |
| 2060 | * Logs when we receive reports regarding a device's RSSI value |
| 2061 | * |
| 2062 | * Logged from: |
| 2063 | * system/bt |
| 2064 | */ |
| 2065 | message BluetoothDeviceRssiReported { |
| 2066 | // An identifier that can be used to match events for this device. |
| 2067 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2068 | // Salt: Randomly generated 256 bit value |
| 2069 | // Hash algorithm: HMAC-SHA256 |
| 2070 | // Size: 32 byte |
| 2071 | // Default: null or empty if the device identifier is not known |
| 2072 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2073 | // Connection handle of this connection if available |
| 2074 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2075 | // Default: 0xFFFF if the handle is unknown |
| 2076 | optional int32 connection_handle = 2; |
| 2077 | // HCI command status code if this is triggerred by hci_cmd |
| 2078 | // Default: STATUS_UNKNOWN |
| 2079 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2080 | // BR/EDR |
| 2081 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 2082 | // Units: dB |
| 2083 | // LE: |
| 2084 | // Range: -127 to 20, 127 (signed integer) |
| 2085 | // Units: dBm |
| 2086 | // Invalid when an out of range value is reported |
| 2087 | optional int32 rssi = 4; |
| 2088 | } |
| 2089 | |
| 2090 | /** |
| 2091 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 2092 | * |
| 2093 | * Logged from: |
| 2094 | * system/bt |
| 2095 | */ |
| 2096 | message BluetoothDeviceFailedContactCounterReported { |
| 2097 | // An identifier that can be used to match events for this device. |
| 2098 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2099 | // Salt: Randomly generated 256 bit value |
| 2100 | // Hash algorithm: HMAC-SHA256 |
| 2101 | // Size: 32 byte |
| 2102 | // Default: null or empty if the device identifier is not known |
| 2103 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2104 | // Connection handle of this connection if available |
| 2105 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2106 | // Default: 0xFFFF if the handle is unknown |
| 2107 | optional int32 connection_handle = 2; |
| 2108 | // HCI command status code if this is triggerred by hci_cmd |
| 2109 | // Default: STATUS_UNKNOWN |
| 2110 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 2111 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 2112 | // Range: uint16_t, 0-0xFFFF |
| 2113 | // Default: 0xFFFFF |
| 2114 | optional int32 failed_contact_counter = 4; |
| 2115 | } |
| 2116 | |
| 2117 | /** |
| 2118 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 2119 | * |
| 2120 | * Logged from: |
| 2121 | * system/bt |
| 2122 | */ |
| 2123 | message BluetoothDeviceTxPowerLevelReported { |
| 2124 | // An identifier that can be used to match events for this device. |
| 2125 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2126 | // Salt: Randomly generated 256 bit value |
| 2127 | // Hash algorithm: HMAC-SHA256 |
| 2128 | // Size: 32 byte |
| 2129 | // Default: null or empty if the device identifier is not known |
| 2130 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2131 | // Connection handle of this connection if available |
| 2132 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2133 | // Default: 0xFFFF if the handle is unknown |
| 2134 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2135 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 2136 | // Default: STATUS_UNKNOWN |
| 2137 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 2138 | // Range: -30 ≤ N ≤ 20 |
| 2139 | // Units: dBm |
| 2140 | // Invalid when an out of range value is reported |
| 2141 | optional int32 transmit_power_level = 4; |
| 2142 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 2143 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 2144 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2145 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 2146 | * receiving an HCI command from the host |
| 2147 | * |
| 2148 | * Logged from: system/bt |
| 2149 | */ |
| 2150 | message BluetoothHciTimeoutReported { |
| 2151 | // HCI command associated with this event |
| 2152 | // Default: CMD_UNKNOWN |
| 2153 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 2154 | } |
| 2155 | |
| 2156 | /** |
| 2157 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 2158 | * See Android Bluetooth HCI specification for more details |
| 2159 | * |
| 2160 | * Note: all count and bytes field are counted since last event |
| 2161 | * |
| 2162 | * Logged from: system/bt |
| 2163 | */ |
| 2164 | message BluetoothQualityReportReported { |
| 2165 | // Quality report ID |
| 2166 | // Original type: uint8_t |
| 2167 | // Default: BQR_ID_UNKNOWN |
| 2168 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 2169 | // Packet type of the connection |
| 2170 | // Original type: uint8_t |
| 2171 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 2172 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 2173 | // Connection handle of the connection |
| 2174 | // Original type: uint16_t |
| 2175 | optional int32 connection_handle = 3; |
| 2176 | // Performing Role for the connection |
| 2177 | // Original type: uint8_t |
| 2178 | optional int32 connection_role = 4; |
| 2179 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 2180 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 2181 | // Original type: uint8_t |
| 2182 | optional int32 tx_power_level = 5; |
| 2183 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 2184 | // absolute receiver signal strength value |
| 2185 | // Original type: int8_t |
| 2186 | optional int32 rssi = 6; |
| 2187 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 2188 | // channels used by the link currently |
| 2189 | // Original type: uint8_t |
| 2190 | optional int32 snr = 7; |
| 2191 | // Indicates the number of unused channels in AFH_channel_map |
| 2192 | // Original type: uint8_t |
| 2193 | optional int32 unused_afh_channel_count = 8; |
| 2194 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2195 | // selected for AFH |
| 2196 | // Original type: uint8_t |
| 2197 | optional int32 afh_select_unideal_channel_count = 9; |
| 2198 | // Current Link Supervision Timeout Setting |
| 2199 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2200 | // Original type: uint16_t |
| 2201 | optional int32 lsto = 10; |
| 2202 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2203 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2204 | // 0x01 (Piconet Clock) |
| 2205 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2206 | // Original type: uint32_t |
| 2207 | optional int64 connection_piconet_clock = 11; |
| 2208 | // The count of retransmission |
| 2209 | // Original type: uint32_t |
| 2210 | optional int64 retransmission_count = 12; |
| 2211 | // The count of no RX |
| 2212 | // Original type: uint32_t |
| 2213 | optional int64 no_rx_count = 13; |
| 2214 | // The count of NAK (Negative Acknowledge) |
| 2215 | // Original type: uint32_t |
| 2216 | optional int64 nak_count = 14; |
| 2217 | // Controller timestamp of last TX ACK |
| 2218 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2219 | // Original type: uint32_t |
| 2220 | optional int64 last_tx_ack_timestamp = 15; |
| 2221 | // The count of Flow-off (STOP) |
| 2222 | // Original type: uint32_t |
| 2223 | optional int64 flow_off_count = 16; |
| 2224 | // Controller timestamp of last Flow-on (GO) |
| 2225 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2226 | // Original type: uint32_t |
| 2227 | optional int64 last_flow_on_timestamp = 17; |
| 2228 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2229 | // Original type: uint32_t |
| 2230 | optional int64 buffer_overflow_bytes = 18; |
| 2231 | // Buffer underflow count (in byte) since last event |
| 2232 | // Original type: uint32_t |
| 2233 | optional int64 buffer_underflow_bytes = 19; |
| 2234 | } |
| 2235 | |
| 2236 | /** |
| 2237 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2238 | * |
| 2239 | * Notes: |
| 2240 | * - Each event can be partially filled as we might learn different pieces of device |
| 2241 | * information at different time |
| 2242 | * - Multiple device info events can be combined to give more complete picture |
| 2243 | * - When multiple device info events tries to describe the same information, the |
| 2244 | * later one wins |
| 2245 | * |
| 2246 | * Logged from: |
| 2247 | * packages/apps/Bluetooth |
| 2248 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2249 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2250 | // An identifier that can be used to match events for this device. |
| 2251 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2252 | // Salt: Randomly generated 256 bit value |
| 2253 | // Hash algorithm: HMAC-SHA256 |
| 2254 | // Size: 32 byte |
| 2255 | // Default: null or empty if the device identifier is not known |
| 2256 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2257 | // Where is this device info obtained from |
| 2258 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2259 | // Name of the data source |
| 2260 | // For EXTERNAL: package name of the data source |
| 2261 | // For INTERNAL: null for general case, component name otherwise |
| 2262 | optional string source_name = 3; |
| 2263 | // Name of the manufacturer of this device |
| 2264 | optional string manufacturer = 4; |
| 2265 | // Model of this device |
| 2266 | optional string model = 5; |
| 2267 | // Hardware version of this device |
| 2268 | optional string hardware_version = 6; |
| 2269 | // Software version of this device |
| 2270 | optional string software_version = 7; |
| 2271 | } |
| 2272 | |
| 2273 | /** |
| 2274 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2275 | * device, as documented by the Bluetooth Core HCI specification |
| 2276 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2277 | * Vol 2, Part E, Page 1118 |
| 2278 | * |
| 2279 | * Logged from: |
| 2280 | * system/bt |
| 2281 | */ |
| 2282 | message BluetoothRemoteVersionInfoReported { |
| 2283 | // Connection handle of the connection |
| 2284 | // Original type: uint16_t |
| 2285 | optional int32 connection_handle = 1; |
| 2286 | // HCI command status code |
| 2287 | // Default: STATUS_UNKNOWN |
| 2288 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2289 | // 1 byte Version of current LMP in the remote controller |
| 2290 | optional int32 lmp_version = 3; |
| 2291 | // 2 bytes LMP manufacturer code of the remote controller |
| 2292 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2293 | optional int32 lmp_manufacturer_code = 4; |
| 2294 | // 4 bytes subversion of the LMP in the remote controller |
| 2295 | optional int32 lmp_subversion = 5; |
| 2296 | } |
| 2297 | |
| 2298 | /** |
| 2299 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2300 | * Constant definitions are from: |
| 2301 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2302 | * |
| 2303 | * Current logged attributes: |
| 2304 | * - BluetoothProfileDescriptorList |
| 2305 | * - Supported Features Bitmask |
| 2306 | * |
| 2307 | * Logged from: |
| 2308 | * system/bt |
| 2309 | */ |
| 2310 | message BluetoothSdpAttributeReported { |
| 2311 | // An identifier that can be used to match events for this device. |
| 2312 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2313 | // Salt: Randomly generated 256 bit value |
| 2314 | // Hash algorithm: HMAC-SHA256 |
| 2315 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2316 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2317 | // Original type: uint16_t |
| 2318 | optional int32 protocol_uuid = 2; |
| 2319 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2320 | // Original type: uint16_t |
| 2321 | optional int32 attribute_id = 3; |
| 2322 | // Attribute value for the particular attribute |
| 2323 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2324 | } |
| 2325 | |
| 2326 | /** |
| 2327 | * Logs when bond state of a Bluetooth device changes |
| 2328 | * |
| 2329 | * Logged from: |
| 2330 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2331 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2332 | */ |
| 2333 | message BluetoothBondStateChanged { |
| 2334 | // An identifier that can be used to match events for this device. |
| 2335 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2336 | // Salt: Randomly generated 256 bit value |
| 2337 | // Hash algorithm: HMAC-SHA256 |
| 2338 | // Size: 32 byte |
| 2339 | // Default: null or empty if the device identifier is not known |
| 2340 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2341 | // Preferred transport type to remote dual mode device |
| 2342 | // Default: TRANSPORT_AUTO means no preference |
| 2343 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2344 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2345 | // Default: UNKNOWN |
| 2346 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2347 | // Current bond state (NONE, BONDING, BONDED) |
| 2348 | // Default: BOND_STATE_UNKNOWN |
| 2349 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2350 | // Bonding sub state |
| 2351 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2352 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2353 | // Unbond Reason |
| 2354 | // Default: UNBOND_REASON_UNKNOWN |
| 2355 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
| 2356 | } |
| 2357 | |
| 2358 | /** |
| 2359 | * Logs there is an event related Bluetooth classic pairing |
| 2360 | * |
| 2361 | * Logged from: |
| 2362 | * system/bt |
| 2363 | */ |
| 2364 | message BluetoothClassicPairingEventReported { |
| 2365 | // An identifier that can be used to match events for this device. |
| 2366 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2367 | // Salt: Randomly generated 256 bit value |
| 2368 | // Hash algorithm: HMAC-SHA256 |
| 2369 | // Size: 32 byte |
| 2370 | // Default: null or empty if the device identifier is not known |
| 2371 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2372 | // Connection handle of this connection if available |
| 2373 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2374 | // Default: 0xFFFF if the handle is unknown |
| 2375 | optional int32 connection_handle = 2; |
| 2376 | // HCI command associated with this event |
| 2377 | // Default: CMD_UNKNOWN |
| 2378 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2379 | // HCI event associated with this event |
| 2380 | // Default: EVT_UNKNOWN |
| 2381 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2382 | // HCI command status code if this is triggerred by hci_cmd |
| 2383 | // Default: STATUS_UNKNOWN |
| 2384 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2385 | // HCI reason code associated with this event |
| 2386 | // Default: STATUS_UNKNOWN |
| 2387 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2388 | // A status value related to this specific event |
| 2389 | // Default: 0 |
| 2390 | optional int64 event_value = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2391 | } |
| 2392 | |
| 2393 | /** |
| 2394 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2395 | * |
| 2396 | * Logged from: |
| 2397 | * system/bt |
| 2398 | */ |
| 2399 | message BluetoothSmpPairingEventReported { |
| 2400 | // An identifier that can be used to match events for this device. |
| 2401 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2402 | // Salt: Randomly generated 256 bit value |
| 2403 | // Hash algorithm: HMAC-SHA256 |
| 2404 | // Size: 32 byte |
| 2405 | // Default: null or empty if the device identifier is not known |
| 2406 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2407 | // SMP command sent or received over L2CAP |
| 2408 | // Default: CMD_UNKNOWN |
| 2409 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2410 | // Whether this command is sent or received |
| 2411 | // Default: DIRECTION_UNKNOWN |
| 2412 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2413 | // SMP failure reason code |
| 2414 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2415 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
| 2416 | } |
| 2417 | |
| 2418 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2419 | * Logs when a Bluetooth socket’s connection state changed |
| 2420 | * |
| 2421 | * Logged from: |
| 2422 | * system/bt |
| 2423 | */ |
| 2424 | message BluetoothSocketConnectionStateChanged { |
| 2425 | // An identifier that can be used to match events for this device. |
| 2426 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2427 | // Salt: Randomly generated 256 bit value |
| 2428 | // Hash algorithm: HMAC-SHA256 |
| 2429 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2430 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2431 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2432 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2433 | // Default 0 when unknown or don't care |
| 2434 | optional int32 port = 2; |
| 2435 | // Socket type as mentioned in |
| 2436 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2437 | // Default: SOCKET_TYPE_UNKNOWN |
| 2438 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2439 | // Socket connection state |
| 2440 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2441 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2442 | // Number of bytes sent to remote device during this connection |
| 2443 | optional int64 tx_bytes = 5; |
| 2444 | // Number of bytes received from remote device during this connection |
| 2445 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2446 | // Socket owner's UID |
| 2447 | optional int32 uid = 7 [(is_uid) = true]; |
| 2448 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2449 | // |port| must be spawned by |server_port| |
| 2450 | // Default 0 when unknown or don't care |
| 2451 | optional int32 server_port = 8; |
| 2452 | // Whether this is a server listener socket |
| 2453 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2454 | } |
| 2455 | |
| 2456 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2457 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2458 | * |
| 2459 | * Logged from: |
| 2460 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2461 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2462 | * |
| 2463 | */ |
| 2464 | message BluetoothClassOfDeviceReported { |
| 2465 | // An identifier that can be used to match events for this device. |
| 2466 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2467 | // Salt: Randomly generated 256 bit value |
| 2468 | // Hash algorithm: HMAC-SHA256 |
| 2469 | // Size: 32 byte |
| 2470 | // Default: null or empty if this is a server listener socket |
| 2471 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2472 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2473 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2474 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2475 | // Default: 0 |
| 2476 | optional int32 class_of_device = 2; |
| 2477 | } |
| 2478 | |
| 2479 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2480 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2481 | * |
| 2482 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2483 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2484 | */ |
| 2485 | message UsbConnectorStateChanged { |
| 2486 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2487 | STATE_DISCONNECTED = 0; |
| 2488 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2489 | } |
| 2490 | optional State state = 1; |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2491 | optional string id = 2; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2492 | // Last active session in ms. |
| 2493 | // 0 when the port is in connected state. |
| 2494 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2495 | } |
| 2496 | |
| 2497 | /** |
| 2498 | * Logs the reported speaker impedance. |
| 2499 | * |
| 2500 | * Logged from: |
| 2501 | * Vendor audio implementation. |
| 2502 | */ |
| 2503 | message SpeakerImpedanceReported { |
| 2504 | optional int32 speaker_location = 1; |
| 2505 | optional int32 impedance = 2; |
| 2506 | } |
| 2507 | |
| 2508 | /** |
| 2509 | * Logs the report of a failed hardware. |
| 2510 | * |
| 2511 | * Logged from: |
| 2512 | * Vendor HALs. |
| 2513 | * |
| 2514 | */ |
| 2515 | message HardwareFailed { |
| 2516 | enum HardwareType { |
| 2517 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2518 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2519 | HARDWARE_FAILED_CODEC = 2; |
| 2520 | HARDWARE_FAILED_SPEAKER = 3; |
| 2521 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2522 | } |
| 2523 | optional HardwareType hardware_type = 1; |
| 2524 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2525 | /** |
| 2526 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2527 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2528 | * referring to board-specific numbering schemes. |
| 2529 | */ |
| 2530 | optional int32 hardware_location = 2; |
| 2531 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2532 | /** |
| 2533 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2534 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2535 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2536 | enum HardwareErrorCode { |
| 2537 | UNKNOWN = 0; |
| 2538 | COMPLETE = 1; |
| 2539 | SPEAKER_HIGH_Z = 2; |
| 2540 | SPEAKER_SHORT = 3; |
| 2541 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2542 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2543 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2544 | } |
| 2545 | optional int32 failure_code = 3; |
| 2546 | } |
| 2547 | |
| 2548 | /** |
| 2549 | * Log an event when the device has been physically dropped. |
| 2550 | * Reported from the /vendor partition. |
| 2551 | */ |
| 2552 | message PhysicalDropDetected { |
| 2553 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2554 | optional int32 confidence_pctg = 1; |
| 2555 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2556 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2557 | // Duration of freefall in ms |
| 2558 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2559 | } |
| 2560 | |
| 2561 | /** |
| 2562 | * Log bucketed battery charge cycles. |
| 2563 | * |
| 2564 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2565 | * a given charge point. For example, if 10 cycle buckets are |
| 2566 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2567 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2568 | * |
| 2569 | * Logged from: |
| 2570 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2571 | */ |
| 2572 | message ChargeCyclesReported { |
| 2573 | optional int32 cycle_bucket_1 = 1; |
| 2574 | optional int32 cycle_bucket_2 = 2; |
| 2575 | optional int32 cycle_bucket_3 = 3; |
| 2576 | optional int32 cycle_bucket_4 = 4; |
| 2577 | optional int32 cycle_bucket_5 = 5; |
| 2578 | optional int32 cycle_bucket_6 = 6; |
| 2579 | optional int32 cycle_bucket_7 = 7; |
| 2580 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2581 | optional int32 cycle_bucket_9 = 9; |
| 2582 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2583 | } |
| 2584 | |
| 2585 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2586 | * Log battery health snapshot. |
| 2587 | * |
| 2588 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2589 | * are snapshotted periodically over 24hrs. |
| 2590 | */ |
| 2591 | message BatteryHealthSnapshot { |
| 2592 | enum BatterySnapshotType { |
| 2593 | UNKNOWN = 0; |
| 2594 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2595 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2596 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2597 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2598 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2599 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2600 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2601 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2602 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2603 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2604 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2605 | } |
| 2606 | optional BatterySnapshotType type = 1; |
| 2607 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2608 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2609 | // Voltage Battery Voltage, in microVolts. |
| 2610 | optional int32 voltage_micro_volt = 3; |
| 2611 | // Current Battery current, in microAmps. |
| 2612 | optional int32 current_micro_amps = 4; |
| 2613 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2614 | optional int32 open_circuit_micro_volt = 5; |
| 2615 | // Resistance Battery Resistance, in microOhms. |
| 2616 | optional int32 resistance_micro_ohm = 6; |
| 2617 | // Level Battery Level, as % of full. |
| 2618 | optional int32 level_percent = 7; |
| 2619 | } |
| 2620 | |
| 2621 | /** |
| 2622 | * Log slow I/O operations on the primary storage. |
| 2623 | */ |
| 2624 | message SlowIo { |
| 2625 | // Classifications of IO Operations. |
| 2626 | enum IoOperation { |
| 2627 | UNKNOWN = 0; |
| 2628 | READ = 1; |
| 2629 | WRITE = 2; |
| 2630 | UNMAP = 3; |
| 2631 | SYNC = 4; |
| 2632 | } |
| 2633 | optional IoOperation operation = 1; |
| 2634 | |
| 2635 | // The number of slow IO operations of this type over 24 hours. |
| 2636 | optional int32 count = 2; |
| 2637 | } |
| 2638 | |
| 2639 | /** |
| 2640 | * Log battery caused shutdown with the last recorded voltage. |
| 2641 | */ |
| 2642 | message BatteryCausedShutdown { |
| 2643 | // The last recorded battery voltage prior to shutdown. |
| 2644 | optional int32 last_recorded_micro_volt = 1; |
| 2645 | } |
| 2646 | |
| 2647 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2648 | * Logs when ThermalService receives throttling events. |
| 2649 | * |
| 2650 | * Logged from: |
| 2651 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2652 | */ |
| 2653 | message ThermalThrottlingSeverityStateChanged { |
| 2654 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2655 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2656 | |
| 2657 | // The name of the temperature source. Eg. CPU0 |
| 2658 | optional string sensor_name = 2; |
| 2659 | |
| 2660 | // Temperature in tenths of a degree C. |
| 2661 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2662 | optional int32 temperature_deci_celsius = 3; |
| 2663 | |
| 2664 | // Relative severity of the throttling, see enum definition. |
| 2665 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2666 | } |
| 2667 | |
| 2668 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2669 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2670 | * |
| 2671 | * Logged from: |
| 2672 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2673 | */ |
| 2674 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2675 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2676 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2677 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2678 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2679 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2680 | } |
| 2681 | |
| 2682 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2683 | * Logs phone signal strength changes. |
| 2684 | * |
| 2685 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2686 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2687 | */ |
| 2688 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2689 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2690 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2691 | } |
| 2692 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2693 | |
| 2694 | /** |
| 2695 | * Logs when the phone state, sim state or signal strength changes |
| 2696 | * |
| 2697 | * Logged from: |
| 2698 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2699 | */ |
| 2700 | message PhoneServiceStateChanged { |
| 2701 | optional android.telephony.ServiceStateEnum state = 1; |
| 2702 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2703 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2704 | } |
| 2705 | |
| 2706 | /** |
| 2707 | * Logs when the phone becomes on or off. |
| 2708 | * |
| 2709 | * Logged from: |
| 2710 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2711 | */ |
| 2712 | message PhoneStateChanged { |
| 2713 | enum State { |
| 2714 | OFF = 0; |
| 2715 | ON = 1; |
| 2716 | } |
| 2717 | optional State state = 1; |
| 2718 | } |
| 2719 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2720 | message BackGesture { |
| 2721 | enum BackType { |
| 2722 | DEFAULT_BACK_TYPE = 0; |
| 2723 | COMPLETED = 1; |
| 2724 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 2725 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 2726 | INCOMPLETE = 4; |
| 2727 | } |
| 2728 | optional BackType type = 1; |
| 2729 | |
| 2730 | optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event |
| 2731 | enum WindowHorizontalLocation { |
| 2732 | DEFAULT_LOCATION = 0; |
| 2733 | LEFT = 1; |
| 2734 | RIGHT = 2; |
| 2735 | } |
| 2736 | optional WindowHorizontalLocation x_location = 3; |
| 2737 | } |
| 2738 | |
| 2739 | message ExclusionRectStateChanged { |
| 2740 | optional string component_name = 1; // if not available, simply packageName |
| 2741 | optional int32 requested_height = 2; // px |
| 2742 | optional int32 rejected_height = 3; // px |
| 2743 | |
| 2744 | enum WindowHorizontalLocation { |
| 2745 | DEFAULT_LOCATION = 0; |
| 2746 | LEFT = 1; |
| 2747 | RIGHT = 2; |
| 2748 | } |
| 2749 | optional WindowHorizontalLocation x_location = 4; |
| 2750 | optional bool landscape = 5; |
| 2751 | optional bool splitscreen = 6; |
| 2752 | optional int32 duration_millis = 7; |
| 2753 | } |
| 2754 | |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2755 | message LauncherUIChanged { |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 2756 | optional android.stats.launcher.LauncherAction action = 1; |
| 2757 | optional android.stats.launcher.LauncherState src_state = 2; |
| 2758 | optional android.stats.launcher.LauncherState dst_state = 3; |
| 2759 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES]; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2760 | optional bool is_swipe_up_enabled = 5; |
| 2761 | } |
| 2762 | |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2763 | message StyleUIChanged { |
| 2764 | optional android.stats.style.Action action = 1; |
| 2765 | optional int32 color_package_hash = 2; |
| 2766 | optional int32 font_package_hash = 3; |
| 2767 | optional int32 shape_package_hash = 4; |
| 2768 | optional int32 clock_package_hash = 5; |
| 2769 | optional int32 launcher_grid = 6; |
| 2770 | optional int32 wallpaper_category_hash = 7; |
| 2771 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 2772 | optional int32 color_preference = 9; |
| 2773 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2774 | } |
| 2775 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2776 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2777 | * Logs when Settings UI has changed. |
| 2778 | * |
| 2779 | * Logged from: |
| 2780 | * packages/apps/Settings |
| 2781 | */ |
| 2782 | message SettingsUIChanged { |
| 2783 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2784 | * Where this SettingsUIChange event comes from. For example, if |
| 2785 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 2786 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2787 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2788 | |
| 2789 | /** |
| 2790 | * What the UI action is. |
| 2791 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2792 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2793 | |
| 2794 | /** |
| 2795 | * Where the action is happening |
| 2796 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2797 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2798 | |
| 2799 | /** |
| 2800 | * What preference changed in this event. |
| 2801 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2802 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2803 | |
| 2804 | /** |
| 2805 | * The new value of the changed preference. |
| 2806 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2807 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2808 | } |
| 2809 | |
| 2810 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2811 | * Logs basic timing information about touch events. |
| 2812 | * Reported at most every 5 minutes while device is being interacted with. |
| 2813 | * |
| 2814 | * Logged from: |
| 2815 | * frameworks/native/services/inputflinger |
| 2816 | */ |
| 2817 | message TouchEventReported { |
| 2818 | /** |
| 2819 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2820 | * and the standard deviation of the time spent processing touchscreen events |
| 2821 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2822 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2823 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 2824 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 2825 | * the kernel's input event subsystem upon receipt of the input event. |
| 2826 | * The ending point is taken inside InputDispatcher, just after the input event |
| 2827 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2828 | */ |
| 2829 | // Minimum value |
| 2830 | optional float latency_min_micros = 1; |
| 2831 | // Maximum value |
| 2832 | optional float latency_max_micros = 2; |
| 2833 | // Average value |
| 2834 | optional float latency_mean_micros = 3; |
| 2835 | // Standard deviation |
| 2836 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 2837 | // Number of touch events (input_event) in this report |
| 2838 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2839 | } |
| 2840 | |
| 2841 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 2842 | * Logs gesture classification and timing information for touch events. |
| 2843 | * |
| 2844 | * Logged from: |
| 2845 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 2846 | * frameworks/base/core/java/android/view/View.java |
| 2847 | */ |
| 2848 | message TouchGestureClassified { |
| 2849 | // The source of the classification (e.g. Java class name). |
| 2850 | optional string source = 1; |
| 2851 | |
| 2852 | enum Classification { |
| 2853 | UNKNOWN_CLASSIFICATION = 0; |
| 2854 | SINGLE_TAP = 1; |
| 2855 | DOUBLE_TAP = 2; |
| 2856 | LONG_PRESS = 3; |
| 2857 | DEEP_PRESS = 4; |
| 2858 | SCROLL = 5; |
| 2859 | } |
| 2860 | // The classification of the gesture. |
| 2861 | optional Classification classification = 2; |
| 2862 | |
| 2863 | // The interval from the start of a touch event stream until the |
| 2864 | // classification was made. |
| 2865 | optional int32 latency_millis = 3; |
| 2866 | |
| 2867 | // The distance from the location of the first touch event to the |
| 2868 | // location of the touch event when the classification was made. |
| 2869 | optional float displacement_px = 4; |
| 2870 | } |
| 2871 | |
| 2872 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2873 | * Logs that a setting was updated. |
| 2874 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2875 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2876 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 2877 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 2878 | */ |
| 2879 | message SettingChanged { |
| 2880 | // The name of the setting. |
| 2881 | optional string setting = 1; |
| 2882 | |
| 2883 | // The change being imposed on this setting. May represent a number, eg "3". |
| 2884 | optional string value = 2; |
| 2885 | |
| 2886 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 2887 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 2888 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 2889 | // The +/- feature is currently only used for location_providers_allowed. |
| 2890 | optional string new_value = 3; |
| 2891 | |
| 2892 | // The previous value of this setting. |
| 2893 | optional string prev_value = 4; |
| 2894 | |
| 2895 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 2896 | optional string tag = 5; |
| 2897 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 2898 | // True if this setting with tag should be resettable. |
| 2899 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2900 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2901 | // 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] | 2902 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2903 | |
| 2904 | enum ChangeReason { |
| 2905 | UPDATED = 1; // Updated can be an insertion or an update. |
| 2906 | DELETED = 2; |
| 2907 | } |
| 2908 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2909 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 2910 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2911 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2912 | * Logs activity going to foreground or background |
| 2913 | * |
| 2914 | * Logged from: |
| 2915 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 2916 | */ |
| 2917 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2918 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 2919 | optional string pkg_name = 2; |
| 2920 | optional string class_name = 3; |
| 2921 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2922 | enum State { |
| 2923 | BACKGROUND = 0; |
| 2924 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2925 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2926 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2927 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2928 | |
| 2929 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 2930 | * Logs when a volume entered low Storage state. |
| 2931 | * Logged from: |
| 2932 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 2933 | */ |
| 2934 | message LowStorageStateChanged { |
| 2935 | // Volume that ran out of storage. |
| 2936 | optional string volume_description = 1; |
| 2937 | |
| 2938 | enum State { |
| 2939 | UNKNOWN = 0; |
| 2940 | OFF = 1; |
| 2941 | ON = 2; |
| 2942 | } |
| 2943 | optional State state = 2; |
| 2944 | } |
| 2945 | |
| 2946 | /** |
| 2947 | * Logs when an app is downgraded. |
| 2948 | * Logged from: |
| 2949 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2950 | */ |
| 2951 | message AppDowngraded { |
| 2952 | optional string package_name = 1; |
| 2953 | // Size of the package (all data) before being downgraded. |
| 2954 | optional int64 size_in_bytes_before = 2; |
| 2955 | // Size of the package (all data) after being downgraded. |
| 2956 | optional int64 size_in_bytes_after = 3; |
| 2957 | |
| 2958 | optional bool aggressive = 4; |
| 2959 | } |
| 2960 | |
| 2961 | /** |
| 2962 | * Logs when an app is optimized after being downgraded. |
| 2963 | * Logged from: |
| 2964 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2965 | */ |
| 2966 | message AppOptimizedAfterDowngraded { |
| 2967 | optional string package_name = 1; |
| 2968 | } |
| 2969 | |
| 2970 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 2971 | * Logs whenever an app is installed on external storage. |
| 2972 | * Logged from: |
| 2973 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 2974 | */ |
| 2975 | message AppInstallOnExternalStorageReported { |
| 2976 | // The type of external storage. |
| 2977 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 2978 | // The name of the package that is installed on the sd card. |
| 2979 | optional string package_name = 2; |
| 2980 | } |
| 2981 | |
| 2982 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2983 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2984 | * Logged from: |
| 2985 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2986 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2987 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2988 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2989 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2990 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2991 | |
| 2992 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2993 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2994 | optional string process_name = 3; |
| 2995 | |
| 2996 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2997 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2998 | |
| 2999 | optional string package_name = 5; |
| 3000 | |
| 3001 | enum InstantApp { |
| 3002 | UNAVAILABLE = 0; |
| 3003 | FALSE = 1; |
| 3004 | TRUE = 2; |
| 3005 | } |
| 3006 | optional InstantApp is_instant_app = 6; |
| 3007 | |
| 3008 | enum ForegroundState { |
| 3009 | UNKNOWN = 0; |
| 3010 | BACKGROUND = 1; |
| 3011 | FOREGROUND = 2; |
| 3012 | } |
| 3013 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3014 | |
| 3015 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3016 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3017 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3018 | /** |
| 3019 | * Logs when a WTF (What a Terrible Failure) happened. |
| 3020 | * Logged from: |
| 3021 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3022 | */ |
| 3023 | message WTFOccurred { |
| 3024 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3025 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3026 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3027 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3028 | // The name of the process. |
| 3029 | // system_server if it is not by an app |
| 3030 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 3031 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3032 | // The pid if available. -1 means not available. |
| 3033 | optional sint32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3034 | |
| 3035 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3036 | } |
| 3037 | |
| 3038 | /** |
| 3039 | * Logs when system server reports low memory. |
| 3040 | * Logged from: |
| 3041 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3042 | */ |
| 3043 | message LowMemReported { |
| 3044 | } |
| 3045 | |
| 3046 | /** |
| 3047 | * Logs when an app ANR (App Not Responding) occurs. |
| 3048 | * Logged from: |
| 3049 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 3050 | */ |
| 3051 | message ANROccurred { |
| 3052 | optional int32 uid = 1 [(is_uid) = true]; |
| 3053 | |
| 3054 | optional string process_name = 2; |
| 3055 | |
| 3056 | optional string short_component_name = 3; |
| 3057 | |
| 3058 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 3059 | |
| 3060 | enum InstantApp { |
| 3061 | UNAVAILABLE = 0; |
| 3062 | FALSE = 1; |
| 3063 | TRUE = 2; |
| 3064 | } |
| 3065 | optional InstantApp is_instant_app = 5; |
| 3066 | |
| 3067 | enum ForegroundState { |
| 3068 | UNKNOWN = 0; |
| 3069 | BACKGROUND = 1; |
| 3070 | FOREGROUND = 2; |
| 3071 | } |
| 3072 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 3073 | |
| 3074 | optional android.server.ErrorSource error_source = 7; |
| 3075 | |
| 3076 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3077 | } |
| 3078 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 3079 | /** |
| 3080 | * Logs when the vibrator state changes. |
| 3081 | * Logged from: |
| 3082 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 3083 | */ |
| 3084 | message VibratorStateChanged { |
| 3085 | repeated AttributionNode attribution_node = 1; |
| 3086 | |
| 3087 | enum State { |
| 3088 | OFF = 0; |
| 3089 | ON = 1; |
| 3090 | } |
| 3091 | optional State state = 2; |
| 3092 | |
| 3093 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 3094 | // Only applicable for State == ON. |
| 3095 | optional int64 duration_millis = 3; |
| 3096 | } |
| 3097 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3098 | /* |
| 3099 | * Allows other apps to push events into statsd. |
| 3100 | * Logged from: |
| 3101 | * frameworks/base/core/java/android/util/StatsLog.java |
| 3102 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3103 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3104 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3105 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 3106 | |
| 3107 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 3108 | optional int32 label = 2; |
| 3109 | |
| 3110 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 3111 | // predicates for the metrics). |
| 3112 | enum State { |
| 3113 | UNKNOWN = 0; |
| 3114 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 3115 | STOP = 2; |
| 3116 | START = 3; |
| 3117 | } |
| 3118 | optional State state = 3; |
| 3119 | } |
| 3120 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 3121 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 3122 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 3123 | * For example, this could be due to the user manually changing the time. |
| 3124 | * |
| 3125 | * Logged from: |
| 3126 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 3127 | */ |
| 3128 | message WallClockTimeShifted { |
| 3129 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 3130 | optional int64 wall_clock_timestamp_millis = 1; |
| 3131 | } |
| 3132 | |
| 3133 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3134 | * Logs when statsd detects an anomaly. |
| 3135 | * |
| 3136 | * Logged from: |
| 3137 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 3138 | */ |
| 3139 | message AnomalyDetected { |
| 3140 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3141 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3142 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3143 | // Id of the config whose anomaly detection alert fired. |
| 3144 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3145 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 3146 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 3147 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3148 | } |
| 3149 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3150 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3151 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3152 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3153 | |
| 3154 | // The app package name. |
| 3155 | optional string pkg_name = 2; |
| 3156 | |
| 3157 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3158 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3159 | WARM = 1; |
| 3160 | HOT = 2; |
| 3161 | COLD = 3; |
| 3162 | } |
| 3163 | // The transition type. |
| 3164 | optional TransitionType type = 3; |
| 3165 | |
| 3166 | // The activity name. |
| 3167 | optional string activity_name = 4; |
| 3168 | |
| 3169 | // The name of the calling app. Empty if not set. |
| 3170 | optional string calling_pkg_name = 5; |
| 3171 | |
| 3172 | // Whether the app is an instant app. |
| 3173 | optional bool is_instant_app = 6; |
| 3174 | |
| 3175 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3176 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3177 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 3178 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3179 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3180 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3181 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3182 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3183 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3184 | optional int32 bind_application_delay_millis = 11; |
| 3185 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3186 | |
| 3187 | // Empty if not set. |
| 3188 | optional string launch_token = 13; |
| 3189 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3190 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3191 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3192 | |
| 3193 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3194 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3195 | } |
| 3196 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3197 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3198 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3199 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3200 | |
| 3201 | // The app package name. |
| 3202 | optional string pkg_name = 2; |
| 3203 | |
| 3204 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3205 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3206 | WARM = 1; |
| 3207 | HOT = 2; |
| 3208 | COLD = 3; |
| 3209 | } |
| 3210 | // The transition type. |
| 3211 | optional TransitionType type = 3; |
| 3212 | |
| 3213 | // The activity name. |
| 3214 | optional string activity_name = 4; |
| 3215 | } |
| 3216 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3217 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3218 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3219 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3220 | |
| 3221 | // The app package name. |
| 3222 | optional string pkg_name = 2; |
| 3223 | |
| 3224 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3225 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3226 | WITH_BUNDLE = 1; |
| 3227 | WITHOUT_BUNDLE = 2; |
| 3228 | } |
| 3229 | // The transition type. |
| 3230 | optional TransitionType type = 3; |
| 3231 | |
| 3232 | // The activity name. |
| 3233 | optional string activity_name = 4; |
| 3234 | |
| 3235 | optional bool transition_process_running = 5; |
| 3236 | |
| 3237 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3238 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3239 | } |
| 3240 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3241 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3242 | * Logs a picture-in-picture action |
| 3243 | * Logged from: |
| 3244 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3245 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3246 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3247 | */ |
| 3248 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3249 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3250 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3251 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3252 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3253 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3254 | enum State { |
| 3255 | ENTERED = 1; |
| 3256 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3257 | MINIMIZED = 3; |
| 3258 | DISMISSED = 4; |
| 3259 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3260 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3261 | } |
| 3262 | |
| 3263 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3264 | * Logs overlay action |
| 3265 | * Logged from: |
| 3266 | * services/core/java/com/android/server/wm/Session.java |
| 3267 | */ |
| 3268 | message OverlayStateChanged { |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 3269 | optional int32 uid = 1 [(state_field_option).option = PRIMARY_FIELD, (is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3270 | |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 3271 | optional string package_name = 2 [(state_field_option).option = PRIMARY_FIELD]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3272 | |
| 3273 | optional bool using_alert_window = 3; |
| 3274 | |
| 3275 | enum State { |
| 3276 | ENTERED = 1; |
| 3277 | EXITED = 2; |
| 3278 | } |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 3279 | optional State state = 4 [ |
| 3280 | (state_field_option).option = EXCLUSIVE_STATE, |
| 3281 | (state_field_option).nested = false, |
| 3282 | (state_field_option).default_state_value = 2 |
| 3283 | ]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3284 | } |
| 3285 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3286 | /* |
| 3287 | * Logs foreground service starts and stops. |
| 3288 | * Note that this is not when a service starts or stops, but when it is |
| 3289 | * considered foreground. |
| 3290 | * Logged from |
| 3291 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3292 | */ |
| 3293 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3294 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3295 | // package_name + "/" + class_name |
| 3296 | optional string short_name = 2; |
| 3297 | |
| 3298 | enum State { |
| 3299 | ENTER = 1; |
| 3300 | EXIT = 2; |
| 3301 | } |
| 3302 | optional State state = 3; |
| 3303 | } |
| 3304 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3305 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3306 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3307 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3308 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3309 | * |
| 3310 | * Logged from: |
| 3311 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3312 | */ |
| 3313 | message IsolatedUidChanged { |
| 3314 | // 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] | 3315 | // 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] | 3316 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3317 | optional int32 parent_uid = 1; |
| 3318 | |
| 3319 | optional int32 isolated_uid = 2; |
| 3320 | |
| 3321 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3322 | enum Event { |
| 3323 | REMOVED = 0; |
| 3324 | CREATED = 1; |
| 3325 | } |
| 3326 | optional Event event = 3; |
| 3327 | } |
| 3328 | |
| 3329 | /* |
| 3330 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3331 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3332 | * and processed by WakeupController.cpp. |
| 3333 | */ |
| 3334 | message PacketWakeupOccurred { |
| 3335 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3336 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3337 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3338 | // The interface name on which the packet was received. |
| 3339 | optional string iface = 2; |
| 3340 | // The ethertype value of the packet. |
| 3341 | optional int32 ethertype = 3; |
| 3342 | // String representation of the destination MAC address of the packet. |
| 3343 | optional string destination_hardware_address = 4; |
| 3344 | // String representation of the source address of the packet if this was an IP packet. |
| 3345 | optional string source_ip = 5; |
| 3346 | // String representation of the destination address of the packet if this was an IP packet. |
| 3347 | optional string destination_ip = 6; |
| 3348 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3349 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3350 | // families. |
| 3351 | optional int32 ip_next_header = 7; |
| 3352 | // The source port if this was a TCP or UDP packet. |
| 3353 | optional int32 source_port = 8; |
| 3354 | // The destination port if this was a TCP or UDP packet. |
| 3355 | optional int32 destination_port = 9; |
| 3356 | } |
| 3357 | |
| 3358 | /* |
| 3359 | * Logs the memory stats for an app on startup. |
| 3360 | * Logged from: |
| 3361 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3362 | */ |
| 3363 | message AppStartMemoryStateCaptured { |
| 3364 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3365 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3366 | |
| 3367 | // The process name. |
| 3368 | optional string process_name = 2; |
| 3369 | |
| 3370 | // The activity name. |
| 3371 | optional string activity_name = 3; |
| 3372 | |
| 3373 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3374 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3375 | |
| 3376 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3377 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3378 | |
| 3379 | // RSS |
| 3380 | optional int64 rss_in_bytes = 6; |
| 3381 | |
| 3382 | // CACHE |
| 3383 | optional int64 cache_in_bytes = 7; |
| 3384 | |
| 3385 | // SWAP |
| 3386 | optional int64 swap_in_bytes = 8; |
| 3387 | } |
| 3388 | |
| 3389 | /* |
| 3390 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3391 | * for LMK event. |
| 3392 | * Logged from: |
| 3393 | * system/core/lmkd/lmkd.c |
| 3394 | */ |
| 3395 | message LmkStateChanged { |
| 3396 | enum State { |
| 3397 | UNKNOWN = 0; |
| 3398 | START = 1; |
| 3399 | STOP = 2; |
| 3400 | } |
| 3401 | optional State state = 1; |
| 3402 | } |
| 3403 | |
| 3404 | /* |
| 3405 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3406 | * Logged from: |
| 3407 | * system/core/lmkd/lmkd.c |
| 3408 | */ |
| 3409 | message LmkKillOccurred { |
| 3410 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3411 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3412 | |
| 3413 | // The process name. |
| 3414 | optional string process_name = 2; |
| 3415 | |
| 3416 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3417 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3418 | |
| 3419 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3420 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3421 | |
| 3422 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3423 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3424 | |
| 3425 | // RSS |
| 3426 | optional int64 rss_in_bytes = 6; |
| 3427 | |
| 3428 | // CACHE |
| 3429 | optional int64 cache_in_bytes = 7; |
| 3430 | |
| 3431 | // SWAP |
| 3432 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3433 | |
| 3434 | // The elapsed real time of start of the process. |
| 3435 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3436 | |
| 3437 | // Min oom adj score considered by lmkd. |
| 3438 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3439 | } |
| 3440 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3441 | /* |
| 3442 | * Logs when the ActivityManagerService detects that an app died. |
| 3443 | * |
| 3444 | * Logged from: |
| 3445 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3446 | */ |
| 3447 | message AppDied { |
| 3448 | // timestamp(elapsedRealtime) of record creation |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 3449 | optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE_STATE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3450 | } |
| 3451 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3452 | /** |
| 3453 | * An atom for generic metrics logging. Available from Android Q. |
| 3454 | */ |
| 3455 | message GenericAtom { |
| 3456 | // The uid of the application that sent this custom atom. |
| 3457 | optional int32 uid = 1 [(is_uid) = true]; |
| 3458 | |
| 3459 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3460 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3461 | } |
| 3462 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3463 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3464 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3465 | * this button" or "this dialog was displayed". |
| 3466 | * Keep the UI event stream clean: don't use for system or background events. |
| 3467 | * 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] | 3468 | * |
| 3469 | * Logged from: |
| 3470 | * frameworks/base/services/core/java/com/android/server/ |
| 3471 | * frameworks/base/packages/SystemUI/src/com/android/systemui/ |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3472 | */ |
| 3473 | message UiEventReported { |
| 3474 | // The event_id. |
| 3475 | optional int32 event_id = 1; |
| 3476 | // The event's source or target uid and package, if applicable. |
| 3477 | // For example, the package posting a notification, or the destination package of a share. |
| 3478 | optional int32 uid = 2 [(is_uid) = true]; |
| 3479 | optional string package_name = 3; |
Will Brockman | 12282ac | 2019-12-20 09:37:42 -0500 | [diff] [blame] | 3480 | // An identifier used to disambiguate which logs refer to a particular instance of some |
| 3481 | // UI element. Useful when there might be multiple instances simultaneously active. |
| 3482 | optional int32 instance_id = 4; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3483 | } |
| 3484 | |
| 3485 | /** |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3486 | * Reports a notification was created or updated. |
| 3487 | * |
| 3488 | * Logged from: |
| 3489 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3490 | */ |
| 3491 | message NotificationReported { |
| 3492 | // The event_id (as for UiEventReported). |
| 3493 | optional int32 event_id = 1; |
| 3494 | // The notifying app's uid and package. |
| 3495 | optional int32 uid = 2 [(is_uid) = true]; |
| 3496 | optional string package_name = 3; |
| 3497 | // A small system-assigned identifier for the notification. |
| 3498 | // Locally probably-unique, but expect collisions across users and/or days. |
| 3499 | optional int32 instance_id = 4; |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3500 | optional int32 notification_id_hash = 5; // Small hash of the app-assigned notif ID + tag |
| 3501 | optional int32 channel_id_hash = 6; // Small hash of app-assigned channel ID |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3502 | |
| 3503 | // Grouping information |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3504 | optional int32 group_id_hash = 7; // Small hash of the group ID of the notification |
| 3505 | optional int32 group_instance_id = 8; // Instance_id of the group-summary notification |
| 3506 | optional bool is_group_summary = 9; // Tags the group-summary notification |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3507 | |
| 3508 | // Attributes |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3509 | optional string category = 10; // App-assigned notification category (API-defined strings) |
| 3510 | optional int32 style = 11; // App-assigned notification style |
| 3511 | optional int32 num_people = 12; // Number of Person records attached to the notification |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3512 | |
| 3513 | // Ordering, importance and interruptiveness |
| 3514 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3515 | optional int32 position = 13; // Position in NotificationManager's list |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3516 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3517 | optional android.stats.sysui.NotificationImportance importance = 14; |
| 3518 | optional int32 alerting = 15; // Bitfield, 1=buzz 2=beep 4=blink |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3519 | |
| 3520 | enum NotificationImportanceExplanation { |
| 3521 | IMPORTANCE_EXPLANATION_UNKNOWN = 0; |
| 3522 | IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance. |
| 3523 | IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance. |
| 3524 | IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override. |
| 3525 | IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override. |
| 3526 | // Like _APP, but based on pre-channels priority signal. |
| 3527 | IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5; |
| 3528 | } |
| 3529 | |
Will Brockman | 7614f696 | 2020-02-10 19:43:03 -0500 | [diff] [blame] | 3530 | optional NotificationImportanceExplanation importance_source = 16; |
| 3531 | optional android.stats.sysui.NotificationImportance importance_initial = 17; |
| 3532 | optional NotificationImportanceExplanation importance_initial_source = 18; |
| 3533 | optional android.stats.sysui.NotificationImportance importance_asst = 19; |
| 3534 | optional int32 assistant_hash = 20; |
| 3535 | optional float assistant_ranking_score = 21; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3536 | } |
| 3537 | |
| 3538 | message Notification { |
| 3539 | // The notifying app's uid and package. |
| 3540 | optional int32 uid = 1 [(is_uid) = true]; |
| 3541 | optional string package_name = 2; |
| 3542 | // A small system-assigned identifier for the notification. |
| 3543 | optional int32 instance_id = 3; |
| 3544 | |
| 3545 | // Grouping information. |
| 3546 | optional int32 group_instance_id = 4; |
| 3547 | optional bool is_group_summary = 5; |
| 3548 | |
| 3549 | // The section of the shade that the notification is in. |
| 3550 | // See NotificationSectionsManager.PriorityBucket. |
| 3551 | enum NotificationSection { |
| 3552 | SECTION_UNKNOWN = 0; |
| 3553 | SECTION_PEOPLE = 1; |
| 3554 | SECTION_ALERTING = 2; |
| 3555 | SECTION_SILENT = 3; |
| 3556 | } |
| 3557 | optional NotificationSection section = 6; |
| 3558 | } |
| 3559 | |
| 3560 | message NotificationList { |
| 3561 | repeated Notification notifications = 1; // An ordered sequence of notifications. |
| 3562 | } |
| 3563 | |
| 3564 | /** |
| 3565 | * Reports a notification panel was displayed, e.g. from the lockscreen or status bar. |
| 3566 | * |
| 3567 | * Logged from: |
| 3568 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
| 3569 | */ |
| 3570 | message NotificationPanelReported { |
| 3571 | // The event_id (as for UiEventReported). |
| 3572 | optional int32 event_id = 1; |
| 3573 | optional int32 num_notifications = 2; |
| 3574 | // The notifications in the panel, in the order that they appear there. |
| 3575 | optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES]; |
| 3576 | } |
| 3577 | |
| 3578 | /** |
| 3579 | * Reports a notification channel, or channel group, was created, updated, or deleted. |
| 3580 | * |
| 3581 | * Logged from: |
| 3582 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3583 | */ |
| 3584 | message NotificationChannelModified { |
| 3585 | // The event_id (as for UiEventReported). |
| 3586 | optional int32 event_id = 1; |
| 3587 | // The notifying app's uid and package. |
| 3588 | optional int32 uid = 2 [(is_uid) = true]; |
| 3589 | optional string package_name = 3; |
| 3590 | // App-assigned notification channel ID or channel-group ID |
| 3591 | optional string channel_id = 4; |
| 3592 | // Previous importance setting, if applicable |
| 3593 | optional android.stats.sysui.NotificationImportance old_importance = 5; |
| 3594 | // New importance setting |
| 3595 | optional android.stats.sysui.NotificationImportance importance = 6; |
| 3596 | } |
| 3597 | |
| 3598 | |
| 3599 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3600 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3601 | * |
| 3602 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3603 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3604 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3605 | message BiometricAcquired { |
| 3606 | // Biometric modality that was acquired. |
| 3607 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3608 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 3609 | optional int32 user = 2; |
| 3610 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3611 | optional bool is_crypto = 3; |
| 3612 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 3613 | // authenticate. Other actions may indicate an error. |
| 3614 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3615 | // The client that this acquisition was received for. |
| 3616 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3617 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 3618 | optional int32 acquire_info = 6; |
| 3619 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 3620 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3621 | // Dictates if this message should trigger additional debugging. |
| 3622 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3623 | } |
| 3624 | |
| 3625 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3626 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3627 | * |
| 3628 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3629 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3630 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3631 | message BiometricAuthenticated { |
| 3632 | // Biometric modality that was used. |
| 3633 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3634 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3635 | optional int32 user = 2; |
| 3636 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 3637 | // storage. |
| 3638 | optional bool is_crypto = 3; |
| 3639 | // The client that this acquisition was received for. |
| 3640 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3641 | // If authentication requires user confirmation. See BiometricPrompt's |
| 3642 | // setRequireConfirmation(bool) method. |
| 3643 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3644 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3645 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3646 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3647 | REJECTED = 1; |
| 3648 | PENDING_CONFIRMATION = 2; |
| 3649 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3650 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3651 | |
| 3652 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3653 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3654 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 3655 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 3656 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 3657 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3658 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3659 | // Dictates if this message should trigger additional debugging. |
| 3660 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3661 | } |
| 3662 | |
| 3663 | /** |
| 3664 | * Logs when a biometric error occurs. |
| 3665 | * |
| 3666 | * Logged from: |
| 3667 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3668 | */ |
| 3669 | message BiometricErrorOccurred { |
| 3670 | // Biometric modality that was used. |
| 3671 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3672 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3673 | optional int32 user = 2; |
| 3674 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3675 | optional bool is_crypto = 3; |
| 3676 | // Action that the device is performing. |
| 3677 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3678 | // The client that this acquisition was received for. |
| 3679 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3680 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 3681 | // are unique to modality. |
| 3682 | optional int32 error_info = 6; |
| 3683 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 3684 | // by the vendor and not specified by the HIDL interface. |
| 3685 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3686 | // Dictates if this message should trigger additional debugging. |
| 3687 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 3688 | // Time spent during the authentication attempt. |
| 3689 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3690 | } |
| 3691 | |
| 3692 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3693 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3694 | * Logged from: |
| 3695 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3696 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3697 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3698 | // Biometric modality. |
| 3699 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3700 | // Type of issue detected. |
| 3701 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3702 | // Dictates if this message should trigger additional debugging. |
| 3703 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3704 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3705 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 3706 | /** |
| 3707 | * Logs when a biometric enrollment occurs. |
| 3708 | * |
| 3709 | * Logged from: |
| 3710 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3711 | */ |
| 3712 | message BiometricEnrolled { |
| 3713 | // Biometric modality that was used. |
| 3714 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3715 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3716 | optional int32 user = 2; |
| 3717 | // The amount of time the enrollment took in milliseconds. |
| 3718 | optional int64 latency_millis = 3; |
| 3719 | // Whether or not the enrollment was successful. |
| 3720 | optional bool success = 4; |
| 3721 | } |
| 3722 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3723 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3724 | * 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] | 3725 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3726 | message FlagFlipUpdateOccurred { |
| 3727 | // If the event is from a flag config package, specify the package name. |
| 3728 | optional string flag_flip_package_name = 1; |
| 3729 | |
| 3730 | // The order id of the package |
| 3731 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3732 | } |
| 3733 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3734 | /** |
| 3735 | * Potential experiment ids that goes with a train install. |
Jonathan Nguyen | a0e6de1 | 2020-01-28 18:33:55 -0800 | [diff] [blame] | 3736 | * Should be kept in sync with experiment_ids.proto. |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3737 | */ |
| 3738 | message TrainExperimentIds { |
| 3739 | repeated int64 experiment_id = 1; |
| 3740 | } |
| 3741 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3742 | /* |
| 3743 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3744 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3745 | */ |
| 3746 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3747 | // Name of the train. |
| 3748 | optional string train_name = 1; |
| 3749 | // Version code for a "train" of packages that need to be installed atomically |
| 3750 | optional int64 train_version_code = 2; |
| 3751 | // After installation of this package, device requires a restart. |
| 3752 | optional bool requires_staging = 3; |
| 3753 | // Rollback should be enabled for this install. |
| 3754 | optional bool rollback_enabled = 4; |
| 3755 | // Requires low latency monitoring if possible. |
| 3756 | optional bool requires_low_latency_monitor = 5; |
| 3757 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3758 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3759 | UNKNOWN = 0; |
| 3760 | INSTALL_REQUESTED = 1; |
| 3761 | INSTALL_STARTED = 2; |
| 3762 | INSTALL_STAGED_NOT_READY = 3; |
| 3763 | INSTALL_STAGED_READY = 4; |
| 3764 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3765 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 3766 | // and INSTALL_FAILURE_COMMIT. |
| 3767 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 3768 | // 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] | 3769 | INSTALL_CANCELLED = 7; |
| 3770 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 3771 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 3772 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 3773 | INSTALLER_ROLLBACK_STAGED = 11; |
| 3774 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 3775 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 3776 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 3777 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 3778 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 3779 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 3780 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 3781 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 3782 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 3783 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 3784 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3785 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 3786 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 3787 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 3788 | REBOOT_TRIGGERED = 26; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3789 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3790 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3791 | // Possible experiment ids for monitoring this push. |
| 3792 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 3793 | // user id |
| 3794 | optional int32 user_id = 8; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 3795 | optional int32 reason = 9; |
Jonathan Nguyen | 703c42f | 2020-02-04 15:54:26 -0800 | [diff] [blame] | 3796 | // Whether or not this is a rollback event |
| 3797 | optional bool is_rollback = 10; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3798 | } |
| 3799 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 3800 | /* Test atom, is not logged anywhere */ |
| 3801 | message TestAtomReported { |
| 3802 | repeated AttributionNode attribution_node = 1; |
| 3803 | optional int32 int_field = 2; |
| 3804 | optional int64 long_field = 3; |
| 3805 | optional float float_field = 4; |
| 3806 | optional string string_field = 5; |
| 3807 | optional bool boolean_field = 6; |
| 3808 | enum State { |
| 3809 | UNKNOWN = 0; |
| 3810 | OFF = 1; |
| 3811 | ON = 2; |
| 3812 | } |
| 3813 | optional State state = 7; |
| 3814 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 3815 | } |
| 3816 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 3817 | /** Represents USB port overheat event. */ |
| 3818 | message UsbPortOverheatEvent { |
| 3819 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 3820 | optional int32 plug_temperature_deci_c = 1; |
| 3821 | |
| 3822 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 3823 | optional int32 max_temperature_deci_c = 2; |
| 3824 | |
| 3825 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 3826 | optional int32 time_to_overheat_secs = 3; |
| 3827 | |
| 3828 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 3829 | optional int32 time_to_hysteresis_secs = 4; |
| 3830 | |
| 3831 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 3832 | optional int32 time_to_inactive_secs = 5; |
| 3833 | }; |
| 3834 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 3835 | /** |
| 3836 | * Logs total effective full charge and discharge cycles on a battery. |
| 3837 | * Here are some examples of one effective cycle: |
| 3838 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 3839 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 3840 | * Pulled from: |
| 3841 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3842 | */ |
| 3843 | message BatteryCycleCount { |
| 3844 | /* Number of total charge and discharge cycles on the system battery. */ |
| 3845 | optional int32 cycle_count = 1; |
| 3846 | } |
| 3847 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3848 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3849 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 3850 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3851 | * Pulled from: |
| 3852 | * StatsCompanionService |
| 3853 | */ |
| 3854 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3855 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3856 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3857 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3858 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3859 | PUBLIC = 1; |
| 3860 | PRIVATE = 2; |
| 3861 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3862 | } |
| 3863 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3864 | // The type of external storage. |
| 3865 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3866 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 3867 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3868 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3869 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3870 | } |
| 3871 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3872 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3873 | * Logs when a connection becomes available and lost. |
| 3874 | * Logged in StatsCompanionService.java |
| 3875 | */ |
| 3876 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3877 | // Id of the network. |
| 3878 | optional int32 net_id = 1; |
| 3879 | |
| 3880 | enum State { |
| 3881 | UNKNOWN = 0; |
| 3882 | CONNECTED = 1; |
| 3883 | DISCONNECTED = 2; |
| 3884 | } |
| 3885 | // Connected state of a network. |
| 3886 | optional State state = 2; |
| 3887 | } |
| 3888 | |
| 3889 | /** |
| 3890 | * Logs when a service starts and stops. |
| 3891 | * Logged from: |
| 3892 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3893 | */ |
| 3894 | message ServiceStateChanged { |
| 3895 | |
| 3896 | optional int32 uid = 1 [(is_uid) = true]; |
| 3897 | |
| 3898 | optional string package_name = 2; |
| 3899 | |
| 3900 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3901 | |
| 3902 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3903 | START = 1; |
| 3904 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3905 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3906 | |
| 3907 | optional State state = 4; |
| 3908 | } |
| 3909 | |
| 3910 | /** |
| 3911 | * Logs when a service is launched. |
| 3912 | * Logged from: |
| 3913 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3914 | */ |
| 3915 | message ServiceLaunchReported { |
| 3916 | |
| 3917 | optional int32 uid = 1 [(is_uid) = true]; |
| 3918 | |
| 3919 | optional string package_name = 2; |
| 3920 | |
| 3921 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3922 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3923 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 3924 | /** |
| 3925 | * Logs when a hidden API is used. |
| 3926 | * |
| 3927 | * Logged from: |
| 3928 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 3929 | */ |
| 3930 | message HiddenApiUsed { |
| 3931 | // The uid of the app making the hidden access. |
| 3932 | optional int32 uid = 1 [(is_uid) = true]; |
| 3933 | |
| 3934 | // Signature of the method or field accessed. |
| 3935 | optional string signature = 2; |
| 3936 | |
| 3937 | enum AccessMethod { |
| 3938 | NONE = 0; |
| 3939 | REFLECTION = 1; |
| 3940 | JNI = 2; |
| 3941 | LINKING = 3; |
| 3942 | } |
| 3943 | |
| 3944 | // Type of access. |
| 3945 | optional AccessMethod access_method = 3; |
| 3946 | |
| 3947 | // Whether the access was prevented or not. |
| 3948 | optional bool access_denied = 4; |
| 3949 | } |
| 3950 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3951 | /** |
| 3952 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 3953 | * - When user sees privacy chip |
| 3954 | * - When user clicks privacy chip |
| 3955 | * - How does the user exit the Privacy Dialog |
| 3956 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3957 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 3958 | */ |
| 3959 | message PrivacyIndicatorsInteracted { |
| 3960 | |
| 3961 | enum Type { |
| 3962 | UNKNOWN = 0; |
| 3963 | CHIP_VIEWED = 1; |
| 3964 | CHIP_CLICKED = 2; |
| 3965 | DIALOG_PRIVACY_SETTINGS = 3; |
| 3966 | DIALOG_DISMISS = 4; |
| 3967 | DIALOG_LINE_ITEM = 5; |
| 3968 | } |
| 3969 | |
tsaichristine | 5adc7e0 | 2020-01-14 17:07:39 -0800 | [diff] [blame] | 3970 | optional Type type = 1 [(state_field_option).option = EXCLUSIVE_STATE]; |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3971 | |
| 3972 | // Used if the type is LINE_ITEM |
| 3973 | optional string package_name = 2; |
| 3974 | } |
| 3975 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 3976 | /** |
| 3977 | * Logs information about a package that is moved from the internal to external storage and vice |
| 3978 | * versa. |
| 3979 | * It logs the package name, the type of the external storage where the package is installed |
| 3980 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 3981 | * and the move type: if it's from internal to external or the other way around. |
| 3982 | * |
| 3983 | * Logged from: |
| 3984 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3985 | */ |
| 3986 | message AppMovedStorageReported { |
| 3987 | enum MoveType { |
| 3988 | UNKNOWN = 0; |
| 3989 | TO_EXTERNAL = 1; |
| 3990 | TO_INTERNAL = 2; |
| 3991 | } |
| 3992 | // The type of the external storage. |
| 3993 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 3994 | // The type of move. |
| 3995 | optional MoveType move_type = 2; |
| 3996 | // The name of the package that was moved. |
| 3997 | optional string package_name = 3; |
| 3998 | } |
| 3999 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 4000 | /** |
| 4001 | * Logs when system server watchdog occurs. |
| 4002 | * Logged from: |
| 4003 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 4004 | */ |
| 4005 | message SystemServerWatchdogOccurred { |
| 4006 | optional string subject = 1; |
| 4007 | } |
| 4008 | |
| 4009 | /** |
| 4010 | * Logs when new file added to tombstones. |
| 4011 | * Logged from: |
| 4012 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 4013 | */ |
| 4014 | message TombStoneOccurred { |
| 4015 | } |
| 4016 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 4017 | /* |
| 4018 | * Information about a role request |
| 4019 | * |
| 4020 | * Logged from: |
| 4021 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 4022 | */ |
| 4023 | message RoleRequestResultReported { |
| 4024 | // UID of application requesting the role |
| 4025 | optional int32 requesting_uid = 1; |
| 4026 | |
| 4027 | // Package name of application requesting the role |
| 4028 | optional string requesting_package_name = 2; |
| 4029 | |
| 4030 | // The role to be granted |
| 4031 | optional string role_name = 3; |
| 4032 | |
| 4033 | // The count of applications qualifying for the role |
| 4034 | optional int32 qualifying_count = 4; |
| 4035 | |
| 4036 | // UID of application current granted the role |
| 4037 | optional int32 current_uid = 5; |
| 4038 | |
| 4039 | // Package name of application current granted the role |
| 4040 | optional string current_package_name = 6; |
| 4041 | |
| 4042 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 4043 | // application |
| 4044 | optional int32 granted_another_uid = 7; |
| 4045 | |
| 4046 | // Package name of another application that user chose to grant the role to, instead of the |
| 4047 | // requesting application |
| 4048 | optional string granted_another_package_name = 8; |
| 4049 | |
| 4050 | enum Result { |
| 4051 | UNDEFINED = 0; |
| 4052 | // role request was ignored |
| 4053 | IGNORED = 1; |
| 4054 | // role request was ignored because it's already granted |
| 4055 | IGNORED_ALREADY_GRANTED = 2; |
| 4056 | // role request was ignored because the application isn't qualified |
| 4057 | IGNORED_NOT_QUALIFIED = 3; |
| 4058 | // role request was ignored because user said it should be always denied |
| 4059 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 4060 | // role was granted by user action |
| 4061 | USER_GRANTED = 5; |
| 4062 | // role was denied by user action |
| 4063 | USER_DENIED = 6; |
| 4064 | // role was denied by user granting another application the role |
| 4065 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 4066 | // role was denied and set to be always denied by the user |
| 4067 | USER_DENIED_WITH_ALWAYS = 8; |
| 4068 | } |
| 4069 | // The result of the role request |
| 4070 | optional Result result = 9; |
| 4071 | } |
| 4072 | |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 4073 | /** |
| 4074 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 4075 | * |
| 4076 | * Logged from: |
| 4077 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 4078 | */ |
| 4079 | message VmsClientConnectionStateChanged { |
| 4080 | // The UID of the VMS client app |
| 4081 | optional int32 uid = 1 [(is_uid) = true]; |
| 4082 | |
| 4083 | enum State { |
| 4084 | UNKNOWN = 0; |
| 4085 | // Attempting to connect to the client |
| 4086 | CONNECTING = 1; |
| 4087 | // Client connection established |
| 4088 | CONNECTED = 2; |
| 4089 | // Client connection closed unexpectedly |
| 4090 | DISCONNECTED = 3; |
| 4091 | // Client connection closed by VMS |
| 4092 | TERMINATED = 4; |
| 4093 | // Error establishing the client connection |
| 4094 | CONNECTION_ERROR = 5; |
| 4095 | } |
| 4096 | |
| 4097 | optional State state = 2; |
| 4098 | } |
| 4099 | |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 4100 | /** |
| 4101 | * Logs when MediaProvider has successfully finished scanning a storage volume. |
| 4102 | * |
| 4103 | * Logged from: |
| 4104 | * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java |
| 4105 | */ |
| 4106 | message MediaProviderScanEvent { |
| 4107 | enum Reason { |
| 4108 | // Scan triggered due to unknown reason |
| 4109 | UNKNOWN = 0; |
| 4110 | // Scan triggered due to storage volume being mounted |
| 4111 | MOUNTED = 1; |
| 4112 | // Scan triggered due to explicit user action or app request |
| 4113 | DEMAND = 2; |
| 4114 | // Scan triggered due to idle maintenance |
| 4115 | IDLE = 3; |
| 4116 | } |
| 4117 | |
| 4118 | // Volume type that this event pertains to |
| 4119 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4120 | // Reason why this scan was triggered |
| 4121 | optional Reason reason = 2; |
| 4122 | // Total number of files scanned |
| 4123 | optional int64 item_count = 3; |
| 4124 | // Duration of scan, normalized per file |
| 4125 | optional float normalized_duration_millis = 4; |
| 4126 | // Number of database inserts, normalized per file |
| 4127 | optional float normalized_insert_count = 5; |
| 4128 | // Number of database updates, normalized per file |
| 4129 | optional float normalized_update_count = 6; |
| 4130 | // Number of database deletes, normalized per file |
| 4131 | optional float normalized_delete_count = 7; |
| 4132 | } |
| 4133 | |
| 4134 | /** |
| 4135 | * Logs when an app has asked MediaProvider to delete media belonging to the user. |
| 4136 | * |
| 4137 | * Logged from: |
| 4138 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4139 | */ |
| 4140 | message MediaProviderDeletionEvent { |
| 4141 | // Volume type that this event pertains to |
| 4142 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4143 | // Device timestamp when this deletion event occurred |
| 4144 | optional int64 timestamp_millis = 2; |
| 4145 | // App that requested deletion |
| 4146 | optional string package_name = 3; |
| 4147 | // Number of items that were deleted |
| 4148 | optional int32 item_count = 4; |
| 4149 | } |
| 4150 | |
| 4151 | /** |
| 4152 | * Logs when an app has asked MediaProvider to grant them access to media belonging to the user. |
| 4153 | * |
| 4154 | * Logged from: |
| 4155 | * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java |
| 4156 | */ |
| 4157 | message MediaProviderPermissionEvent { |
| 4158 | enum Result { |
| 4159 | UNKNOWN = 0; |
| 4160 | USER_GRANTED = 1; |
| 4161 | AUTO_GRANTED = 2; |
| 4162 | USER_DENIED = 3; |
| 4163 | USER_DENIED_WITH_PREJUDICE = 4; |
| 4164 | AUTO_DENIED = 5; |
| 4165 | } |
| 4166 | |
| 4167 | // Volume type that this event pertains to |
| 4168 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4169 | // Device timestamp when this permission event occurred |
| 4170 | optional int64 timestamp_millis = 2; |
| 4171 | // App that requested permission |
| 4172 | optional string package_name = 3; |
| 4173 | // Number of items that were requested |
| 4174 | optional int32 item_count = 4; |
| 4175 | // Result of this request |
| 4176 | optional Result result = 5; |
| 4177 | } |
| 4178 | |
| 4179 | /** |
| 4180 | * Logs when MediaProvider has finished upgrading or downgrading its database schema. |
| 4181 | * |
| 4182 | * Logged from: |
| 4183 | * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java |
| 4184 | */ |
| 4185 | message MediaProviderSchemaChange { |
| 4186 | // Volume type that this event pertains to |
| 4187 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4188 | // Old database version code |
| 4189 | optional int32 version_from = 2; |
| 4190 | // New database version code |
| 4191 | optional int32 version_to = 3; |
| 4192 | // Total number of files in database |
| 4193 | optional int64 item_count = 4; |
| 4194 | // Duration of schema change, normalized per file |
| 4195 | optional float normalized_duration_millis = 5; |
| 4196 | } |
| 4197 | |
| 4198 | /** |
| 4199 | * Logs when MediaProvider has finished an idle maintenance job. |
| 4200 | * |
| 4201 | * Logged from: |
| 4202 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4203 | */ |
| 4204 | message MediaProviderIdleMaintenance { |
| 4205 | // Volume type that this event pertains to |
| 4206 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4207 | |
| 4208 | // Total number of files in database |
| 4209 | optional int64 item_count = 2; |
| 4210 | // Duration of idle maintenance, normalized per file |
| 4211 | optional float normalized_duration_millis = 3; |
| 4212 | // Number of thumbnails found to be stale, normalized per file |
| 4213 | optional float normalized_stale_thumbnails = 4; |
| 4214 | // Number of items found to be expired, normalized per file |
| 4215 | optional float normalized_expired_media = 5; |
| 4216 | } |
| 4217 | |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4218 | /** |
| 4219 | * Represents boot time event with duration in ms. |
| 4220 | * |
| 4221 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4222 | */ |
| 4223 | message BootTimeEventDuration { |
| 4224 | enum DurationEvent { |
| 4225 | UNKNOWN = 0; |
| 4226 | // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat. |
| 4227 | ABSOLUTE_BOOT_TIME = 1; |
| 4228 | // Bootloader's 1st stage execution time. |
| 4229 | // Logged from bootstat. |
| 4230 | BOOTLOADER_FIRST_STAGE_EXEC = 2; |
| 4231 | // Bootloader's 1st stage loading time. |
| 4232 | // Logged from bootstat. |
| 4233 | BOOTLOADER_FIRST_STAGE_LOAD = 3; |
| 4234 | // Bootloader's kernel loading time. |
| 4235 | // Logged from bootstat. |
| 4236 | BOOTLOADER_KERNEL_LOAD = 4; |
| 4237 | // Bootloader's 2nd stage execution time. |
| 4238 | // Logged from bootstat. |
| 4239 | BOOTLOADER_SECOND_STAGE_EXEC = 5; |
| 4240 | // Bootloader's 2nd stage loading time. |
| 4241 | // Logged from bootstat. |
| 4242 | BOOTLOADER_SECOND_STAGE_LOAD = 6; |
| 4243 | // Duration for Bootloader to show unlocked device's warning UI. This should not happen |
| 4244 | // for locked device. |
| 4245 | // Logged from bootstat. |
| 4246 | BOOTLOADER_UI_WAIT = 7; |
| 4247 | // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above. |
| 4248 | // Logged from bootstat. |
| 4249 | BOOTLOADER_TOTAL = 8; |
| 4250 | // Shutdown duration inside init for the reboot before the current boot up. |
| 4251 | // Logged from f/b/services/.../BootReceiver.java. |
| 4252 | SHUTDOWN_DURATION = 9; |
| 4253 | // Total time for mounting of disk devices during bootup. |
| 4254 | // Logged from f/b/services/.../BootReceiver.java. |
| 4255 | MOUNT_DEFAULT_DURATION = 10; |
| 4256 | // Total time for early stage mounting of disk devices during bootup. |
| 4257 | // Logged from f/b/services/.../BootReceiver.java. |
| 4258 | MOUNT_EARLY_DURATION = 11; |
| 4259 | // Total time for late stage mounting of disk devices during bootup. |
| 4260 | // Logged from f/b/services/.../BootReceiver.java. |
| 4261 | MOUNT_LATE_DURATION = 12; |
| 4262 | // Average time to scan non-system app after OTA |
| 4263 | // Logged from f/b/services/.../PackageManagerService.java |
| 4264 | OTA_PACKAGE_MANAGER_INIT_TIME = 13; |
| 4265 | // Time to initialize Package manager after OTA |
| 4266 | // Logged from f/b/services/.../PackageManagerService.java |
| 4267 | OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14; |
| 4268 | // Time to scan all system app from Package manager after OTA |
| 4269 | // Logged from f/b/services/.../PackageManagerService.java |
| 4270 | OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15; |
| 4271 | // Init's total time for cold boot stage. |
| 4272 | // Logged from bootstat. |
| 4273 | COLDBOOT_WAIT = 16; |
| 4274 | // Init's total time for initializing selinux. |
| 4275 | // Logged from bootstat. |
| 4276 | SELINUX_INIT = 17; |
| 4277 | // Time since last factory reset. |
| 4278 | // Logged from bootstat. |
| 4279 | FACTORY_RESET_TIME_SINCE_RESET = 18; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4280 | // Init's total time spent for completing the 1st stage. |
| 4281 | // Logged from bootstat. |
| 4282 | ANDROID_INIT_STAGE_1 = 19; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4283 | } |
| 4284 | |
| 4285 | // Type of the event. |
| 4286 | optional DurationEvent event = 1; |
| 4287 | // Duration of the event in ms. |
| 4288 | optional int64 duration_millis = 2; |
| 4289 | } |
| 4290 | |
| 4291 | /** |
| 4292 | * Represents the start of specific boot time event during bootup in ms. This is usually a time |
| 4293 | * since boot-up. |
| 4294 | * |
| 4295 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4296 | */ |
| 4297 | message BootTimeEventElapsedTime { |
| 4298 | enum ElapsedTimeEvent { |
| 4299 | UNKNOWN = 0; |
| 4300 | // Time when init starts 1st stage. Logged from bootstat. |
| 4301 | ANDROID_INIT_STAGE_1 = 1; |
| 4302 | // Time when sys.boot_completed prop is set. |
| 4303 | // Logged from bootstat. |
| 4304 | BOOT_COMPLETE = 2; |
| 4305 | // BOOT_COMPLETE for encrypted device. |
| 4306 | BOOT_COMPLETE_ENCRYPTION = 3; |
| 4307 | // BOOT_COMPLETE for device with no encryption. |
| 4308 | BOOT_COMPLETE_NO_ENCRYPTION = 4; |
| 4309 | // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time. |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4310 | BOOT_COMPLETE_POST_DECRYPT = 5; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4311 | // BOOT_COMPLETE after factory reset. |
| 4312 | FACTORY_RESET_BOOT_COMPLETE = 6; |
| 4313 | // BOOT_COMPLETE_NO_ENCRYPTION after factory reset. |
| 4314 | FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4315 | // BOOT_COMPLETE_POST_DECRYPT after factory reset. |
| 4316 | FACTORY_RESET_BOOT_COMPLETE_POST_DECRYPT = 8; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4317 | // BOOT_COMPLETE after OTA. |
| 4318 | OTA_BOOT_COMPLETE = 9; |
| 4319 | // BOOT_COMPLETE_NO_ENCRYPTION after OTA. |
| 4320 | OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10; |
Keun young Park | a5a696a | 2020-02-03 09:42:36 -0800 | [diff] [blame] | 4321 | // BOOT_COMPLETE_POST_DECRYPT after OTA. |
| 4322 | OTA_BOOT_COMPLETE_POST_DECRYPT = 11; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4323 | // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast. |
| 4324 | // Logged from f/b/services/.../UserController.java |
| 4325 | FRAMEWORK_LOCKED_BOOT_COMPLETED = 12; |
| 4326 | // Time when the system starts sending BOOT_COMPLETED broadcast. |
| 4327 | // Logged from f/b/services/.../UserController.java |
| 4328 | FRAMEWORK_BOOT_COMPLETED = 13; |
| 4329 | // Time when the package manager starts init. |
| 4330 | // Logged from f/b/services/.../SystemServer.java |
| 4331 | PACKAGE_MANAGER_INIT_START = 14; |
| 4332 | // Time when package manager is ready |
| 4333 | // Logged from f/b/services/.../SystemServer.java |
| 4334 | PACKAGE_MANAGER_INIT_READY = 15; |
| 4335 | // Represents the time when user has entered unlock credential for system with user pin. |
| 4336 | // Logged from bootstat. |
| 4337 | POST_DECRYPT = 16; |
| 4338 | // Represents the start of zygote's init. |
| 4339 | // Logged from zygote itself. |
| 4340 | ZYGOTE_INIT_START = 17; |
| 4341 | // Represents the start of secondary zygote's init. |
| 4342 | // TODO: add logging to zygote |
| 4343 | SECONDARY_ZYGOTE_INIT_START = 18; |
| 4344 | // Represents the start of system server's init. |
| 4345 | // Logged from f/b/services/.../SystemServer.java |
| 4346 | SYSTEM_SERVER_INIT_START = 19; |
| 4347 | // Represents the completion of system server's init. |
| 4348 | // Logged from f/b/services/.../SystemServer.java |
| 4349 | SYSTEM_SERVER_READY = 20; |
| 4350 | // Represents the start of launcher during boot-up. |
| 4351 | // TODO: add logging |
| 4352 | LAUNCHER_START = 21; |
| 4353 | // Represents the completion of launcher's initial rendering. User can use other apps from |
| 4354 | // launcher from this point. |
| 4355 | // TODO: add logging |
| 4356 | LAUNCHER_SHOWN = 22; |
| 4357 | } |
| 4358 | |
| 4359 | // Type of the event. |
| 4360 | optional ElapsedTimeEvent event = 1; |
| 4361 | // Time since bootup for the event. |
| 4362 | // It should be acquired from SystemClock elapsedRealtime() call or equivalent. |
| 4363 | optional int64 time_millis = 2; |
| 4364 | } |
| 4365 | |
| 4366 | /** |
| 4367 | * Boot time events with UTC time. |
| 4368 | * |
| 4369 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4370 | */ |
| 4371 | message BootTimeEventUtcTime { |
| 4372 | enum UtcTimeEvent { |
| 4373 | UNKNOWN = 0; |
| 4374 | // Time of the bootstat's marking of 1st boot after the last factory reset. |
| 4375 | // Logged from bootstat. |
| 4376 | FACTORY_RESET_RESET_TIME = 1; |
| 4377 | // The time when bootstat records FACTORY_RESET_* events. This is close to |
| 4378 | // BOOT_COMPLETE time for the current bootup. |
| 4379 | // Logged from bootstat. |
| 4380 | FACTORY_RESET_CURRENT_TIME = 2; |
| 4381 | // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose. |
| 4382 | // Logged from bootstat. |
| 4383 | FACTORY_RESET_RECORD_VALUE = 3; |
| 4384 | } |
| 4385 | |
| 4386 | // Type of the event. |
| 4387 | optional UtcTimeEvent event = 1; |
| 4388 | // UTC time for the event. |
| 4389 | optional int64 utc_time_secs = 2; |
| 4390 | } |
| 4391 | |
| 4392 | /** |
| 4393 | * Boot time events representing specific error code during bootup. |
| 4394 | * Meaning of error code can be different per each event type. |
| 4395 | * |
| 4396 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4397 | */ |
| 4398 | message BootTimeEventErrorCode { |
| 4399 | enum ErrorCodeEvent { |
| 4400 | UNKNOWN = 0; |
| 4401 | // Linux error code for time() call to get the current UTC time. |
| 4402 | // Logged from bootstat. |
| 4403 | FACTORY_RESET_CURRENT_TIME_FAILURE = 1; |
| 4404 | // Represents UmountStat before the reboot for the current boot up. Error codes defined |
| 4405 | // as UMOUNT_STAT_* from init/reboot.cpp. |
| 4406 | // Logged from f/b/services/.../BootReceiver.java. |
| 4407 | SHUTDOWN_UMOUNT_STAT = 2; |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4408 | // Reprepsents fie system mounting error code of /data partition for the current boot. |
| 4409 | // 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] | 4410 | // Logged from f/b/services/.../BootReceiver.java. |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4411 | FS_MGR_FS_STAT_DATA_PARTITION = 3; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4412 | } |
| 4413 | |
| 4414 | // Type of the event. |
| 4415 | optional ErrorCodeEvent event = 1; |
| 4416 | // error code defined per each event type. |
| 4417 | // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of |
| 4418 | // FS_MGR_FS_STAT. |
| 4419 | optional int32 error_code = 2; |
| 4420 | } |
| 4421 | |
Alessio Balsini | 628fb8d | 2020-01-15 15:44:48 +0000 | [diff] [blame] | 4422 | /** |
| 4423 | * Collects Virtual A/B statistics related to the use of dm-snapshot performed |
| 4424 | * after an OTA. |
| 4425 | * |
| 4426 | * Logged from: |
| 4427 | * - system/core/fs_mgr/libsnapshot/snapshot.cpp |
| 4428 | * - system/core/fs_mgr/libsnapshot/snapshotctl.cpp |
| 4429 | */ |
| 4430 | message SnapshotMergeReported { |
| 4431 | // Keep in sync with |
| 4432 | // system/core/fs_mgr/libsnapshot/android/snapshot/snapshot.proto |
| 4433 | enum UpdateState { |
| 4434 | // No update or merge is in progress. |
| 4435 | NONE = 0; |
| 4436 | // An update is applying; snapshots may already exist. |
| 4437 | INITIATED = 1; |
| 4438 | // An update is pending, but has not been successfully booted yet. |
| 4439 | UNVERIFIED = 2; |
| 4440 | // The kernel is merging in the background. |
| 4441 | MERGING = 3; |
| 4442 | // Post-merge cleanup steps could not be completed due to a transient |
| 4443 | // error, but the next reboot will finish any pending operations. |
| 4444 | MERGE_NEEDS_REBOOT = 4; |
| 4445 | // Merging is complete, and needs to be acknowledged. |
| 4446 | MERGE_COMPLETED = 5; |
| 4447 | // Merging failed due to an unrecoverable error. |
| 4448 | MERGE_FAILED = 6; |
| 4449 | // The update was implicitly cancelled, either by a rollback or a flash |
| 4450 | // operation via fastboot. This state can only be returned by WaitForMerge. |
| 4451 | CANCELLED = 7; |
| 4452 | }; |
| 4453 | |
| 4454 | // Status of the update after the merge attempts. |
| 4455 | optional UpdateState final_state = 1; |
| 4456 | |
| 4457 | // Time to complete a merge operation in milliseconds. |
| 4458 | // A negative value corresponds to the case in which the merge operation |
| 4459 | // was interrupted and resumed (e.g. in case of a system reboot during the |
| 4460 | // merge). |
| 4461 | optional int64 duration_millis = 2; |
| 4462 | |
| 4463 | // Number of reboots that occurred after issuing and before completing the |
| 4464 | // merge of all the snapshot devices. |
| 4465 | optional int32 intermediate_reboots = 3; |
| 4466 | } |
| 4467 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4468 | ////////////////////////////////////////////////////////////////////// |
| 4469 | // Pulled atoms below this line // |
| 4470 | ////////////////////////////////////////////////////////////////////// |
| 4471 | |
| 4472 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4473 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 4474 | * |
| 4475 | * Pulled from: |
| 4476 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4477 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4478 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4479 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4480 | |
| 4481 | optional int64 rx_bytes = 2; |
| 4482 | |
| 4483 | optional int64 rx_packets = 3; |
| 4484 | |
| 4485 | optional int64 tx_bytes = 4; |
| 4486 | |
| 4487 | optional int64 tx_packets = 5; |
| 4488 | } |
| 4489 | |
| 4490 | /** |
| 4491 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 4492 | * |
| 4493 | * Pulled from: |
| 4494 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4495 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4496 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4497 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4498 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4499 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 4500 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4501 | |
| 4502 | optional int64 rx_bytes = 3; |
| 4503 | |
| 4504 | optional int64 rx_packets = 4; |
| 4505 | |
| 4506 | optional int64 tx_bytes = 5; |
| 4507 | |
| 4508 | optional int64 tx_packets = 6; |
| 4509 | } |
| 4510 | |
| 4511 | /** |
| 4512 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 4513 | * |
| 4514 | * Pulled from: |
| 4515 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4516 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4517 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4518 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4519 | |
| 4520 | optional int64 rx_bytes = 2; |
| 4521 | |
| 4522 | optional int64 rx_packets = 3; |
| 4523 | |
| 4524 | optional int64 tx_bytes = 4; |
| 4525 | |
| 4526 | optional int64 tx_packets = 5; |
| 4527 | } |
| 4528 | |
| 4529 | /** |
| 4530 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 4531 | * |
| 4532 | * Pulled from: |
| 4533 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4534 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4535 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4536 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4537 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4538 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 4539 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4540 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4541 | |
| 4542 | optional int64 rx_bytes = 3; |
| 4543 | |
| 4544 | optional int64 rx_packets = 4; |
| 4545 | |
| 4546 | optional int64 tx_bytes = 5; |
| 4547 | |
| 4548 | optional int64 tx_packets = 6; |
| 4549 | } |
| 4550 | |
| 4551 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4552 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 4553 | * |
| 4554 | * Pulled from: |
| 4555 | * StatsCompanionService |
| 4556 | */ |
| 4557 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4558 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4559 | |
| 4560 | optional int64 rx_bytes = 2; |
| 4561 | |
| 4562 | optional int64 tx_bytes = 3; |
| 4563 | } |
| 4564 | |
| 4565 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4566 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 4567 | * android/internal/os/KernelWakelockStats.java |
| 4568 | * |
| 4569 | * Pulled from: |
| 4570 | * StatsCompanionService using KernelWakelockReader. |
| 4571 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4572 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4573 | optional string name = 1; |
| 4574 | |
| 4575 | optional int32 count = 2; |
| 4576 | |
| 4577 | optional int32 version = 3; |
| 4578 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4579 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4580 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4581 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4582 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4583 | * Pulls low power state information. If power.stats HAL is not available, this |
| 4584 | * includes platform and subsystem sleep state information, |
| 4585 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 4586 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4587 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4588 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4589 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 4590 | * as defined in: |
| 4591 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4592 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4593 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4594 | // Subsystem name |
| 4595 | optional string subsystem_name = 1; |
| 4596 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 4597 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4598 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 4599 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4600 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4601 | // 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] | 4602 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4603 | // 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] | 4604 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 4605 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4606 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4607 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 4608 | * Pulls on-device power measurement information. |
| 4609 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 4610 | * Pulled from: |
| 4611 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 4612 | */ |
| 4613 | message OnDevicePowerMeasurement { |
| 4614 | // Name of the subsystem (to which the rail belongs). |
| 4615 | optional string subsystem_name = 1; |
| 4616 | |
| 4617 | // Rail name. The rail lies within the subsystem. |
| 4618 | optional string rail_name = 2; |
| 4619 | |
| 4620 | // Time (in ms since boot) at which the rail energy value was measured. |
| 4621 | // This may differ slightly from the time that statsd logs this information. |
| 4622 | optional uint64 measurement_timestamp_millis = 3; |
| 4623 | |
| 4624 | // Accumulated energy used via the rail since device boot in uWs. |
| 4625 | optional uint64 energy_microwatt_secs = 4; |
| 4626 | } |
| 4627 | |
| 4628 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4629 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 4630 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 4631 | * starts from highest to lowest. The value should be monotonically |
| 4632 | * increasing since boot. However, if there is a cpu |
| 4633 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4634 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4635 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4636 | optional uint32 cluster = 1; |
| 4637 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4638 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4639 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4640 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4641 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4642 | * Pulls Cpu Time Per Uid. |
| 4643 | * Note that isolated process uid time should be attributed to host uids. |
| 4644 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4645 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4646 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 4647 | optional uint64 user_time_micros = 2; |
| 4648 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4649 | } |
| 4650 | |
| 4651 | /** |
| 4652 | * Pulls Cpu Time Per Uid per frequency. |
| 4653 | * Note that isolated process uid time should be attributed to host uids. |
| 4654 | * For each uid, we order the time by descending frequencies. |
| 4655 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4656 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4657 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4658 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4659 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4660 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 4661 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4662 | /** |
| 4663 | * Pulls Wifi Controller Activity Energy Info |
| 4664 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4665 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4666 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4667 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4668 | // stack reported state |
| 4669 | // TODO: replace this with proto enum |
| 4670 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4671 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4672 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4673 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4674 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4675 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4676 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4677 | // product of current(mA), voltage(V) and time(ms) |
| 4678 | optional uint64 controller_energy_used = 6; |
| 4679 | } |
| 4680 | |
| 4681 | /** |
| 4682 | * Pulls Modem Activity Energy Info |
| 4683 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4684 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4685 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4686 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4687 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4688 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4689 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4690 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4691 | /** |
| 4692 | * Tx power index |
| 4693 | * index 0 = tx_power < 0dBm |
| 4694 | * index 1 = 0dBm < tx_power < 5dBm |
| 4695 | * index 2 = 5dBm < tx_power < 15dBm |
| 4696 | * index 3 = 15dBm < tx_power < 20dBm |
| 4697 | * index 4 = tx_power > 20dBm |
| 4698 | */ |
| 4699 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4700 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4701 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4702 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4703 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4704 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4705 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4706 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4707 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4708 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4709 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4710 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4711 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 7322e4a | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 4712 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 4713 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4714 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4715 | /** |
| 4716 | * Pulls Bluetooth Activity Energy Info |
| 4717 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 4718 | */ |
| 4719 | message BluetoothActivityInfo { |
| 4720 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4721 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4722 | // bluetooth stack state |
| 4723 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4724 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4725 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4726 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4727 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4728 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4729 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4730 | // product of current(mA), voltage(V) and time(ms) |
| 4731 | optional uint64 energy_used = 6; |
| 4732 | } |
| 4733 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4734 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4735 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4736 | * |
| 4737 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4738 | */ |
| 4739 | message ProcessMemoryState { |
| 4740 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4741 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4742 | |
| 4743 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4744 | // Usually package name, "system" for system server. |
| 4745 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4746 | optional string process_name = 2; |
| 4747 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4748 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4749 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4750 | |
| 4751 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4752 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4753 | |
| 4754 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4755 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4756 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4757 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4758 | // Value is read from memory.stat, field total_rss if per-app memory |
| 4759 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4760 | optional int64 rss_in_bytes = 6; |
| 4761 | |
| 4762 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4763 | // Value is read from memory.stat, field total_cache if per-app memory |
| 4764 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4765 | optional int64 cache_in_bytes = 7; |
| 4766 | |
| 4767 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4768 | // 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] | 4769 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4770 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 4771 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4772 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4773 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 4774 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4775 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4776 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 4777 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4778 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4779 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 4780 | } |
| 4781 | |
| 4782 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4783 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4784 | * |
| 4785 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 4786 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 4787 | * |
| 4788 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4789 | */ |
| 4790 | message ProcessMemoryHighWaterMark { |
| 4791 | // The uid if available. -1 means not available. |
| 4792 | optional int32 uid = 1 [(is_uid) = true]; |
| 4793 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4794 | // The process name. |
| 4795 | // Usually package name or process cmdline. |
| 4796 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4797 | optional string process_name = 2; |
| 4798 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4799 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 4800 | // computed by converting kilobytes to bytes. |
| 4801 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 4802 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4803 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 4804 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4805 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4806 | } |
| 4807 | |
| 4808 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 4809 | * Logs the memory stats for a process. |
| 4810 | * |
| 4811 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 4812 | * and for selected native processes. |
| 4813 | */ |
| 4814 | message ProcessMemorySnapshot { |
| 4815 | // The uid if available. -1 means not available. |
| 4816 | optional int32 uid = 1 [(is_uid) = true]; |
| 4817 | |
| 4818 | // The process name. |
| 4819 | // Usually package name or process cmdline. |
| 4820 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 4821 | optional string process_name = 2; |
| 4822 | |
| 4823 | // The pid of the process. |
| 4824 | // Allows to disambiguate instances of the process. |
| 4825 | optional int32 pid = 3; |
| 4826 | |
| 4827 | // The current OOM score adjustment value. |
| 4828 | // Read from ProcessRecord for managed processes. |
| 4829 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 4830 | optional int32 oom_score_adj = 4; |
| 4831 | |
| 4832 | // The current RSS of the process. |
| 4833 | // VmRSS from /proc/pid/status. |
| 4834 | optional int32 rss_in_kilobytes = 5; |
| 4835 | |
| 4836 | // The current anon RSS of the process. |
| 4837 | // RssAnon from /proc/pid/status. |
| 4838 | optional int32 anon_rss_in_kilobytes = 6; |
| 4839 | |
| 4840 | // The current swap size of the process. |
| 4841 | // VmSwap from /proc/pid/status. |
| 4842 | optional int32 swap_in_kilobytes = 7; |
| 4843 | |
| 4844 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 4845 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
| 4846 | } |
| 4847 | |
| 4848 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4849 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4850 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4851 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4852 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4853 | } |
| 4854 | |
| 4855 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4856 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4857 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4858 | message SystemUptime { |
| 4859 | // Milliseconds since the system was booted. |
| 4860 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 4861 | // for external input). |
| 4862 | // 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] | 4863 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4864 | } |
| 4865 | |
| 4866 | /* |
| 4867 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 4868 | * active: X (X is # cores) |
| 4869 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 4870 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 4871 | * ... |
| 4872 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 4873 | * The file contains a monotonically increasing count of time for a single boot. |
| 4874 | */ |
| 4875 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4876 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4877 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4878 | } |
| 4879 | |
| 4880 | /** |
| 4881 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 4882 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 4883 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4884 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4885 | * ... |
| 4886 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 4887 | * The file contains a monotonically increasing count of time for a single boot. |
| 4888 | */ |
| 4889 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4890 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4891 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4892 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 4893 | } |
| 4894 | |
| 4895 | /* |
| 4896 | * Pulls free disk space, for data, system partition and temporary directory. |
| 4897 | */ |
| 4898 | message DiskSpace { |
| 4899 | // available bytes in data partition |
| 4900 | optional uint64 data_available_bytes = 1; |
| 4901 | // available bytes in system partition |
| 4902 | optional uint64 system_available_bytes = 2; |
| 4903 | // available bytes in download cache or temp directories |
| 4904 | optional uint64 temp_available_bytes = 3; |
| 4905 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4906 | |
| 4907 | /** |
| 4908 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 4909 | * |
| 4910 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4911 | */ |
| 4912 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4913 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4914 | } |
| 4915 | |
| 4916 | /** |
| 4917 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4918 | * Pulled from: |
| 4919 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4920 | */ |
| 4921 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4922 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4923 | } |
| 4924 | |
| 4925 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4926 | * Pulls battery voltage. |
| 4927 | * Pulled from: |
| 4928 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4929 | */ |
| 4930 | message BatteryVoltage { |
| 4931 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4932 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4933 | } |
| 4934 | |
| 4935 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 4936 | * Pulls battery level (percent full, from 0 to 100). |
| 4937 | * |
| 4938 | * Pulled from: |
| 4939 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4940 | */ |
| 4941 | message BatteryLevel { |
| 4942 | // Battery level. Should be in [0, 100]. |
| 4943 | optional int32 battery_level = 1; |
| 4944 | } |
| 4945 | |
| 4946 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4947 | * Pulls the temperature of various parts of the device. |
| 4948 | * 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] | 4949 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4950 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4951 | */ |
| 4952 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4953 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4954 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 4955 | |
| 4956 | // The name of the temperature source. Eg. CPU0 |
| 4957 | optional string sensor_name = 2; |
| 4958 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4959 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4960 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4961 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4962 | |
| 4963 | // Relative severity of the throttling, see enum definition. |
| 4964 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 4965 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4966 | |
| 4967 | /** |
| 4968 | * Pulls the statistics of calls to Binder. |
| 4969 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 4970 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4971 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4972 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4973 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4974 | */ |
| 4975 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4976 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 4977 | // executing the binder transaction attribute the transaction to another uid using |
| 4978 | // Binder.setThreadWorkSource(). |
| 4979 | // |
| 4980 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4981 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4982 | // UID of the process executing the binder transaction. |
| 4983 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4984 | // Fully qualified class name of the API call. |
| 4985 | // |
| 4986 | // This is a system server class name. |
| 4987 | // |
| 4988 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 4989 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 4990 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 4991 | // commonly used APIs. |
| 4992 | optional string service_class_name = 2; |
| 4993 | // Method name of the API call. It can also be a transaction code if we cannot |
| 4994 | // resolve it to a name. See Binder#getTransactionName. |
| 4995 | // |
| 4996 | // This is a system server method name. |
| 4997 | optional string service_method_name = 3; |
| 4998 | // Total number of API calls. |
| 4999 | optional int64 call_count = 4; |
| 5000 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5001 | optional bool screen_interactive = 13; |
| 5002 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 5003 | // call_count will be equal to recorded_call_count. |
| 5004 | // |
| 5005 | // If recorded_call_count is different than call_count, it means data collection has been |
| 5006 | // sampled. All the fields below will be sampled in this case. |
| 5007 | optional int64 recorded_call_count = 12; |
| 5008 | // Number of exceptions thrown by the API. |
| 5009 | optional int64 recorded_exception_count = 5; |
| 5010 | // Total latency of all API calls. |
| 5011 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 5012 | optional int64 recorded_total_latency_micros = 6; |
| 5013 | // Maximum latency of one API call. |
| 5014 | optional int64 recorded_max_latency_micros = 7; |
| 5015 | // Total CPU usage of all API calls. |
| 5016 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 5017 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 5018 | optional int64 recorded_total_cpu_micros = 8; |
| 5019 | // Maximum CPU usage of one API call. |
| 5020 | optional int64 recorded_max_cpu_micros = 9; |
| 5021 | // Maximum parcel reply size of one API call. |
| 5022 | optional int64 recorded_max_reply_size_bytes = 10; |
| 5023 | // Maximum parcel request size of one API call. |
| 5024 | optional int64 recorded_max_request_size_bytes = 11; |
| 5025 | } |
| 5026 | |
| 5027 | /** |
| 5028 | * Pulls the statistics of exceptions during calls to Binder. |
| 5029 | * |
| 5030 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 5031 | * > adb shell dumpsys binder_calls_stats --reset |
| 5032 | */ |
| 5033 | message BinderCallsExceptions { |
| 5034 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 5035 | // |
| 5036 | // This is an exception class name thrown by the system server. |
| 5037 | optional string exception_class_name = 1; |
| 5038 | // Total number of exceptions. |
| 5039 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 5040 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5041 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5042 | /** |
| 5043 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 5044 | * |
| 5045 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 5046 | * config on the device. |
| 5047 | * |
| 5048 | * Next tag: 11 |
| 5049 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5050 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 5051 | // 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] | 5052 | optional int32 uid = 1 [(is_uid) = true]; |
| 5053 | |
| 5054 | // Fully qualified class name of the handler target class. |
| 5055 | // |
| 5056 | // This field does not contain PII. This is a system server class name. |
| 5057 | optional string handler_class_name = 2; |
| 5058 | |
| 5059 | // The name of the thread that runs the Looper. |
| 5060 | // |
| 5061 | // This field does not contain PII. This is a system server thread name. |
| 5062 | optional string looper_thread_name = 3; |
| 5063 | |
| 5064 | // The name of the dispatched message. |
| 5065 | // |
| 5066 | // This field does not contain PII. This is a system server constant or class |
| 5067 | // name. |
| 5068 | optional string message_name = 4; |
| 5069 | |
| 5070 | // Total number of successfully dispatched messages. |
| 5071 | optional int64 message_count = 5; |
| 5072 | |
| 5073 | // Total number of messages that failed dispatching. |
| 5074 | optional int64 exception_count = 6; |
| 5075 | |
| 5076 | // Total number of processed messages we have data recorded for. If we |
| 5077 | // collected data for all the messages, message_count will be equal to |
| 5078 | // recorded_message_count. |
| 5079 | // |
| 5080 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5081 | // 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] | 5082 | optional int64 recorded_message_count = 7; |
| 5083 | |
| 5084 | // Total latency of all processed messages. |
| 5085 | // Average can be computed using recorded_total_latency_micros / |
| 5086 | // recorded_message_count. |
| 5087 | optional int64 recorded_total_latency_micros = 8; |
| 5088 | |
| 5089 | // Total CPU usage of all processed message. |
| 5090 | // Average can be computed using recorded_total_cpu_micros / |
| 5091 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5092 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5093 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 5094 | |
| 5095 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 5096 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 5097 | |
| 5098 | // Max recorded CPU usage of all processed messages. |
| 5099 | optional int64 recorded_max_cpu_micros = 11; |
| 5100 | |
| 5101 | // Max recorded latency of all processed messages. |
| 5102 | optional int64 recorded_max_latency_micros = 12; |
| 5103 | |
| 5104 | // Total number of messages we tracked the dispatching delay for. If we |
| 5105 | // collected data for all the messages, message_count will be equal to |
| 5106 | // recorded_delay_message_count. |
| 5107 | // |
| 5108 | // If recorded_delay_message_count is different than message_count, it means data |
| 5109 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 5110 | // The fields below will be sampled in this case. |
| 5111 | optional int64 recorded_delay_message_count = 13; |
| 5112 | |
| 5113 | // Total dispatching delay of all processed messages. |
| 5114 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5115 | // and the actual dispatching time. |
| 5116 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 5117 | optional int64 recorded_total_delay_millis = 14; |
| 5118 | |
| 5119 | // Max dispatching delay of all processed messages. |
| 5120 | // Calculated as a difference between the target dispatching time (Message.when) |
| 5121 | // and the actual dispatching time. |
| 5122 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 5123 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 5124 | |
| 5125 | /** |
| 5126 | * Pulls disk information, such as write speed and latency. |
| 5127 | */ |
| 5128 | message DiskStats { |
| 5129 | // Time taken to open, write 512B to, and close a file. |
| 5130 | // -1 if error performing the check. |
| 5131 | optional int64 data_write_latency_millis = 1; |
| 5132 | |
| 5133 | optional bool file_based_encryption = 2; |
| 5134 | |
| 5135 | // Recent disk write speed in kB/s. |
| 5136 | // -1 if error querying storageed. |
| 5137 | // 0 if data is unavailable. |
| 5138 | optional int32 recent_disk_write_speed = 3; |
| 5139 | } |
| 5140 | |
| 5141 | |
| 5142 | /** |
| 5143 | * Free and total bytes of the Data, Cache, and System partition. |
| 5144 | */ |
| 5145 | message DirectoryUsage { |
| 5146 | enum Directory { |
| 5147 | UNKNOWN = 0; |
| 5148 | DATA = 1; |
| 5149 | CACHE = 2; |
| 5150 | SYSTEM = 3; |
| 5151 | } |
| 5152 | optional Directory directory = 1; |
| 5153 | optional int64 free_bytes = 2; |
| 5154 | optional int64 total_bytes = 3; |
| 5155 | } |
| 5156 | |
| 5157 | |
| 5158 | /** |
| 5159 | * Size of an application: apk size, data size, and cache size. |
| 5160 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5161 | * Information is only reported for apps with the primary user (user 0). |
| 5162 | * Sizes are aggregated by package name. |
| 5163 | */ |
| 5164 | message AppSize { |
| 5165 | // Including uids will involve modifying diskstats logic. |
| 5166 | optional string package_name = 1; |
| 5167 | // App size in bytes. -1 if unavailable. |
| 5168 | optional int64 app_size_bytes = 2; |
| 5169 | // App data size in bytes. -1 if unavailable. |
| 5170 | optional int64 app_data_size_bytes = 3; |
| 5171 | // App cache size in bytes. -1 if unavailable. |
| 5172 | optional int64 app_cache_size_bytes = 4; |
| 5173 | // Time that the cache file was produced. |
| 5174 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5175 | optional int64 cache_time_millis = 5; |
| 5176 | } |
| 5177 | |
| 5178 | |
| 5179 | /** |
| 5180 | * Size of a particular category. Eg: photos, videos. |
| 5181 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 5182 | */ |
| 5183 | message CategorySize { |
| 5184 | enum Category { |
| 5185 | UNKNOWN = 0; |
| 5186 | APP_SIZE = 1; |
| 5187 | APP_DATA_SIZE = 2; |
| 5188 | APP_CACHE_SIZE = 3; |
| 5189 | PHOTOS = 4; |
| 5190 | VIDEOS = 5; |
| 5191 | AUDIO = 6; |
| 5192 | DOWNLOADS = 7; |
| 5193 | SYSTEM = 8; |
| 5194 | OTHER = 9; |
| 5195 | } |
| 5196 | optional Category category = 1; |
| 5197 | // Category size in bytes. |
| 5198 | optional int64 size_bytes = 2; |
| 5199 | // Time that the cache file was produced. |
| 5200 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 5201 | optional int64 cache_time_millis = 3; |
| 5202 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5203 | |
| 5204 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 5205 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 5206 | * |
| 5207 | * Read/write bytes are I/O events from a storage device |
| 5208 | * Read/write chars are data requested by read/write syscalls, and can be |
| 5209 | * satisfied by caching. |
| 5210 | * |
| 5211 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 5212 | */ |
| 5213 | message DiskIo { |
| 5214 | optional int32 uid = 1 [(is_uid) = true]; |
| 5215 | optional int64 fg_chars_read = 2; |
| 5216 | optional int64 fg_chars_write = 3; |
| 5217 | optional int64 fg_bytes_read = 4; |
| 5218 | optional int64 fg_bytes_write = 5; |
| 5219 | optional int64 bg_chars_read = 6; |
| 5220 | optional int64 bg_chars_write = 7; |
| 5221 | optional int64 bg_bytes_read = 8; |
| 5222 | optional int64 bg_bytes_write = 9; |
| 5223 | optional int64 fg_fsync = 10; |
| 5224 | optional int64 bg_fsync= 11; |
| 5225 | } |
| 5226 | |
| 5227 | |
| 5228 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5229 | * Pulls the number of fingerprints for each user. |
| 5230 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 5231 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5232 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5233 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5234 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5235 | // Defined in android/os/UserHandle.java |
| 5236 | optional int32 user = 1; |
| 5237 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5238 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5239 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5240 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5241 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5242 | * Pulls the number of faces for each user. |
| 5243 | * |
| 5244 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 5245 | */ |
| 5246 | message NumFacesEnrolled { |
| 5247 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5248 | // Defined in android/os/UserHandle.java |
| 5249 | optional int32 user = 1; |
| 5250 | // Number of faces registered to that user. |
| 5251 | optional int32 num_faces_enrolled = 2; |
| 5252 | } |
| 5253 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5254 | * A mapping of role holder -> role |
| 5255 | */ |
| 5256 | message RoleHolder { |
| 5257 | // uid of the role holder |
| 5258 | optional int32 uid = 1 [(is_uid) = true]; |
| 5259 | |
| 5260 | // package name of the role holder |
| 5261 | optional string package_name = 2; |
| 5262 | |
| 5263 | // the role held |
| 5264 | optional string role = 3; |
| 5265 | } |
| 5266 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5267 | message AggStats { |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5268 | // These are all in byte resolution. |
| 5269 | optional int64 min = 1 [deprecated = true]; |
| 5270 | optional int64 average = 2 [deprecated = true]; |
| 5271 | optional int64 max = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5272 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5273 | // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above |
| 5274 | // int64 fields. |
| 5275 | optional int32 mean_kb = 4; |
| 5276 | optional int32 max_kb = 5; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5277 | } |
| 5278 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5279 | // A reduced subset of process states; reducing the number of possible states allows more |
| 5280 | // aggressive device-side aggregation of statistics and hence reduces metric upload size. |
| 5281 | enum ProcessStateAggregated { |
| 5282 | PROCESS_STATE_UNKNOWN = 0; |
| 5283 | // Persistent system process. |
| 5284 | PROCESS_STATE_PERSISTENT = 1; |
| 5285 | // Top activity; actually any visible activity. |
| 5286 | PROCESS_STATE_TOP = 2; |
| 5287 | // Process binding to top or a foreground service. |
| 5288 | PROCESS_STATE_BOUND_TOP_OR_FGS = 3; |
| 5289 | // Processing running a foreground service. |
| 5290 | PROCESS_STATE_FGS = 4; |
| 5291 | // Important foreground process (ime, wallpaper, etc). |
| 5292 | PROCESS_STATE_IMPORTANT_FOREGROUND = 5; |
| 5293 | // Important background process. |
| 5294 | PROCESS_STATE_BACKGROUND = 6; |
| 5295 | // Process running a receiver. |
| 5296 | PROCESS_STATE_RECEIVER = 7; |
| 5297 | // All kinds of cached processes. |
| 5298 | PROCESS_STATE_CACHED = 8; |
| 5299 | } |
| 5300 | |
| 5301 | // Next tag: 13 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5302 | message ProcessStatsStateProto { |
| 5303 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5304 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5305 | optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5306 | |
| 5307 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 5308 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5309 | optional android.service.procstats.ProcessState process_state = 3 [deprecated = true]; |
| 5310 | |
| 5311 | optional ProcessStateAggregated process_state_aggregated = 10; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5312 | |
| 5313 | // Millisecond uptime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5314 | optional int64 duration_millis = 4 [deprecated = true]; |
| 5315 | // Same as above, but with minute resolution so it fits into an int32. |
| 5316 | optional int32 duration_minutes = 11; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5317 | |
| 5318 | // Millisecond elapsed realtime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5319 | optional int64 realtime_duration_millis = 9 [deprecated = true]; |
| 5320 | // Same as above, but with minute resolution so it fits into an int32. |
| 5321 | optional int32 realtime_duration_minutes = 12; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5322 | |
| 5323 | // # of samples taken |
| 5324 | optional int32 sample_size = 5; |
| 5325 | |
| 5326 | // PSS is memory reserved for this process |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5327 | optional AggStats pss = 6 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5328 | |
| 5329 | // USS is memory shared between processes, divided evenly for accounting |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5330 | optional AggStats uss = 7 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5331 | |
| 5332 | // RSS is memory resident for this process |
| 5333 | optional AggStats rss = 8; |
| 5334 | } |
| 5335 | |
| 5336 | // Next Tag: 7 |
| 5337 | message ProcessStatsProto { |
| 5338 | // Name of process. |
| 5339 | optional string process = 1; |
| 5340 | |
| 5341 | // Uid of the process. |
| 5342 | optional int32 uid = 2; |
| 5343 | |
| 5344 | // Information about how often kills occurred |
| 5345 | message Kill { |
| 5346 | // Count of excessive CPU kills |
| 5347 | optional int32 cpu = 1; |
| 5348 | |
| 5349 | // Count of kills when cached |
| 5350 | optional int32 cached = 2; |
| 5351 | |
| 5352 | // PSS stats during cached kill |
| 5353 | optional AggStats cached_pss = 3; |
| 5354 | } |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5355 | optional Kill kill = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5356 | |
| 5357 | // Time and memory spent in various states. |
| 5358 | repeated ProcessStatsStateProto states = 5; |
| 5359 | |
| 5360 | // Total time process has been running... screen_state, memory_state, and process_state |
| 5361 | // will not be set. |
| 5362 | optional ProcessStatsStateProto total_running_state = 6; |
| 5363 | } |
| 5364 | |
| 5365 | message PackageServiceOperationStatsProto { |
| 5366 | // Operate enum: Started, Foreground, Bound, Executing |
| 5367 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 5368 | |
| 5369 | // Number of times the service was in this operation. |
| 5370 | optional int32 count = 2; |
| 5371 | |
| 5372 | // Information about a state the service can be in. |
| 5373 | message StateStats { |
| 5374 | // Screen state enum. |
| 5375 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5376 | // Memory state enum. |
| 5377 | optional android.service.procstats.MemoryState memory_state = 2; |
| 5378 | |
| 5379 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5380 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5381 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5382 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5383 | } |
| 5384 | repeated StateStats state_stats = 3; |
| 5385 | } |
| 5386 | |
| 5387 | message PackageServiceStatsProto { |
| 5388 | // Name of service component. |
| 5389 | optional string service_name = 1; |
| 5390 | |
| 5391 | // The operation stats. |
| 5392 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 5393 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 5394 | } |
| 5395 | |
| 5396 | message PackageAssociationSourceProcessStatsProto { |
| 5397 | // Uid of the process. |
| 5398 | optional int32 process_uid = 1; |
| 5399 | // Process name. |
| 5400 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5401 | // Package name. |
| 5402 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5403 | // Total count of the times this association appeared. |
| 5404 | optional int32 total_count = 3; |
| 5405 | |
| 5406 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5407 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5408 | |
| 5409 | // Total count of the times this association became actively impacting its target process. |
| 5410 | optional int32 active_count = 5; |
| 5411 | |
| 5412 | // Information on one source in this association. |
| 5413 | message StateStats { |
| 5414 | // Process state enum. |
| 5415 | optional android.service.procstats.ProcessState process_state = 1; |
| 5416 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5417 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5418 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5419 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5420 | } |
| 5421 | repeated StateStats active_state_stats = 6; |
| 5422 | } |
| 5423 | |
| 5424 | message PackageAssociationProcessStatsProto { |
| 5425 | // Name of the target component. |
| 5426 | optional string component_name = 1; |
| 5427 | // Information on one source in this association. |
| 5428 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 5429 | } |
| 5430 | |
| 5431 | |
| 5432 | message ProcessStatsPackageProto { |
| 5433 | // Name of package. |
| 5434 | optional string package = 1; |
| 5435 | |
| 5436 | // Uid of the package. |
| 5437 | optional int32 uid = 2; |
| 5438 | |
| 5439 | // Version of the package. |
| 5440 | optional int64 version = 3; |
| 5441 | |
| 5442 | // Stats for each process running with the package loaded in to it. |
| 5443 | repeated ProcessStatsProto process_stats = 4; |
| 5444 | |
| 5445 | // Stats for each of the package's services. |
| 5446 | repeated PackageServiceStatsProto service_stats = 5; |
| 5447 | |
| 5448 | // Stats for each association with the package. |
| 5449 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 5450 | } |
| 5451 | |
| 5452 | message ProcessStatsSectionProto { |
| 5453 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5454 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5455 | |
| 5456 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5457 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5458 | |
| 5459 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5460 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5461 | |
| 5462 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5463 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5464 | |
| 5465 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 5466 | optional string runtime = 5; |
| 5467 | |
| 5468 | // whether kernel reports swapped pss. |
| 5469 | optional bool has_swapped_pss = 6; |
| 5470 | |
| 5471 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 5472 | enum Status { |
| 5473 | STATUS_UNKNOWN = 0; |
| 5474 | STATUS_COMPLETE = 1; |
| 5475 | STATUS_PARTIAL = 2; |
| 5476 | STATUS_SHUTDOWN = 3; |
| 5477 | STATUS_SYSPROPS = 4; |
| 5478 | } |
| 5479 | repeated Status status = 7; |
| 5480 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5481 | // Number of pages available of various types and sizes, representation fragmentation. |
| 5482 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 5483 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5484 | // Stats for each process. |
| 5485 | repeated ProcessStatsProto process_stats = 8; |
| 5486 | |
| 5487 | // Stats for each package. |
| 5488 | repeated ProcessStatsPackageProto package_stats = 9; |
| 5489 | } |
| 5490 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5491 | message ProcessStatsAvailablePagesProto { |
| 5492 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 5493 | optional int32 node = 1; |
| 5494 | |
| 5495 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 5496 | optional string zone = 2; |
| 5497 | |
| 5498 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 5499 | optional string label = 3; |
| 5500 | |
| 5501 | // Distribution of number of pages available by order size. First entry in array is |
| 5502 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 5503 | repeated int32 pages_per_order = 4; |
| 5504 | } |
| 5505 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5506 | /** |
| 5507 | * Pulled from ProcessStatsService.java |
| 5508 | */ |
| 5509 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5510 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5511 | } |
| 5512 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 5513 | /** |
| 5514 | * Pulled from ProcessStatsService.java |
| 5515 | */ |
| 5516 | message ProcStatsPkgProc { |
| 5517 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5518 | } |
| 5519 | |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 5520 | // Next Tag: 2 |
| 5521 | message PackageRemoteViewInfoProto { |
| 5522 | optional string package_name = 1; |
| 5523 | // add per-package additional info here (like channels) |
| 5524 | } |
| 5525 | |
| 5526 | // Next Tag: 2 |
| 5527 | message NotificationRemoteViewsProto { |
| 5528 | repeated PackageRemoteViewInfoProto package_remote_view_info = 1; |
| 5529 | } |
| 5530 | |
| 5531 | /** |
| 5532 | * Pulled from NotificationManagerService.java |
| 5533 | */ |
| 5534 | message NotificationRemoteViews { |
| 5535 | optional NotificationRemoteViewsProto notification_remote_views = 1; |
| 5536 | } |
| 5537 | |
Yotam Aron | 7429997 | 2020-01-16 16:20:58 +0200 | [diff] [blame] | 5538 | /** |
| 5539 | * Atom that contains a list of a package's preferences, pulled from NotificationManagerService.java |
| 5540 | */ |
| 5541 | message PackageNotificationPreferences { |
| 5542 | // Uid under which the package is installed. |
| 5543 | optional int32 uid = 1; |
| 5544 | // Notification importance, which specifies when and how a notification is displayed. |
| 5545 | // Specified under core/java/android/app/NotificationManager.java. |
| 5546 | optional int32 importance = 2; |
| 5547 | // Lockscreen visibility as set by the user. |
| 5548 | optional int32 visibility = 3; |
| 5549 | // Bitfield mask indicating what fields were locked by the user (see LockableAppfields in |
| 5550 | // PreferencesHelper.java) |
| 5551 | optional int32 user_locked_fields = 4; |
| 5552 | } |
| 5553 | |
| 5554 | /** |
| 5555 | * Atom that contains a list of a package's channel preferences, pulled from |
| 5556 | * NotificationManagerService.java. |
| 5557 | */ |
| 5558 | message PackageNotificationChannelPreferences { |
| 5559 | // Uid under which the package is installed. |
| 5560 | optional int32 uid = 1; |
| 5561 | // Channel's ID. Should always be available. |
| 5562 | optional string channel_id = 2; |
| 5563 | // Channel's name. Should always be available. |
| 5564 | optional string channel_name = 3; |
| 5565 | // Channel's description. Optionally set by the channel creator. |
| 5566 | optional string description = 4; |
| 5567 | // Notification importance, which specifies when and how a notification is displayed. Specified |
| 5568 | // under core/java/android/app/NotificationManager.java. |
| 5569 | optional int32 importance = 5; |
| 5570 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 5571 | // at core/java/android/app/NotificationChannel.java |
| 5572 | optional int32 user_locked_fields = 6; |
| 5573 | // Indicates if the channel was deleted by the app. |
| 5574 | optional bool is_deleted = 7; |
| 5575 | } |
| 5576 | |
| 5577 | /** |
| 5578 | * Atom that contains a list of a package's channel group preferences, pulled from |
| 5579 | * NotificationManagerService.java. |
| 5580 | */ |
| 5581 | message PackageNotificationChannelGroupPreferences { |
| 5582 | // Uid under which the package is installed. |
| 5583 | optional int32 uid = 1; |
| 5584 | // Channel Group's ID. Should always be available. |
| 5585 | optional string group_id = 2; |
| 5586 | // Channel Group's name. Should always be available. |
| 5587 | optional string group_name = 3; |
| 5588 | // Channel Group's description. Optionally set by group creator. |
| 5589 | optional string description = 4; |
| 5590 | // Indicates if notifications from this channel group are blocked. |
| 5591 | optional bool is_blocked = 5; |
| 5592 | // Bitmask representing which fields have been set by the user. See field bitmask descriptions |
| 5593 | // at core/java/android/app/NotificationChannelGroup.java |
| 5594 | optional int32 user_locked_fields = 6; |
| 5595 | } |
| 5596 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5597 | message PowerProfileProto { |
| 5598 | optional double cpu_suspend = 1; |
| 5599 | |
| 5600 | optional double cpu_idle = 2; |
| 5601 | |
| 5602 | optional double cpu_active = 3; |
| 5603 | |
| 5604 | message CpuCluster { |
| 5605 | optional int32 id = 1; |
| 5606 | optional double cluster_power = 2; |
| 5607 | optional int32 cores = 3; |
| 5608 | repeated int64 speed = 4; |
| 5609 | repeated double core_power = 5; |
| 5610 | } |
| 5611 | |
| 5612 | repeated CpuCluster cpu_cluster = 40; |
| 5613 | |
| 5614 | optional double wifi_scan = 4; |
| 5615 | |
| 5616 | optional double wifi_on = 5; |
| 5617 | |
| 5618 | optional double wifi_active = 6; |
| 5619 | |
| 5620 | optional double wifi_controller_idle = 7; |
| 5621 | |
| 5622 | optional double wifi_controller_rx = 8; |
| 5623 | |
| 5624 | optional double wifi_controller_tx = 9; |
| 5625 | |
| 5626 | repeated double wifi_controller_tx_levels = 10; |
| 5627 | |
| 5628 | optional double wifi_controller_operating_voltage = 11; |
| 5629 | |
| 5630 | optional double bluetooth_controller_idle = 12; |
| 5631 | |
| 5632 | optional double bluetooth_controller_rx = 13; |
| 5633 | |
| 5634 | optional double bluetooth_controller_tx = 14; |
| 5635 | |
| 5636 | optional double bluetooth_controller_operating_voltage = 15; |
| 5637 | |
| 5638 | optional double modem_controller_sleep = 16; |
| 5639 | |
| 5640 | optional double modem_controller_idle = 17; |
| 5641 | |
| 5642 | optional double modem_controller_rx = 18; |
| 5643 | |
| 5644 | repeated double modem_controller_tx = 19; |
| 5645 | |
| 5646 | optional double modem_controller_operating_voltage = 20; |
| 5647 | |
| 5648 | optional double gps_on = 21; |
| 5649 | |
| 5650 | repeated double gps_signal_quality_based = 22; |
| 5651 | |
| 5652 | optional double gps_operating_voltage = 23; |
| 5653 | |
| 5654 | optional double bluetooth_on = 24; |
| 5655 | |
| 5656 | optional double bluetooth_active = 25; |
| 5657 | |
| 5658 | optional double bluetooth_at_cmd = 26; |
| 5659 | |
| 5660 | optional double ambient_display = 27; |
| 5661 | |
| 5662 | optional double screen_on = 28; |
| 5663 | |
| 5664 | optional double radio_on = 29; |
| 5665 | |
| 5666 | optional double radio_scanning = 30; |
| 5667 | |
| 5668 | optional double radio_active = 31; |
| 5669 | |
| 5670 | optional double screen_full = 32; |
| 5671 | |
| 5672 | optional double audio = 33; |
| 5673 | |
| 5674 | optional double video = 34; |
| 5675 | |
| 5676 | optional double flashlight = 35; |
| 5677 | |
| 5678 | optional double memory = 36; |
| 5679 | |
| 5680 | optional double camera = 37; |
| 5681 | |
| 5682 | optional double wifi_batched_scan = 38; |
| 5683 | |
| 5684 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5685 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 5686 | |
| 5687 | /** |
| 5688 | * power_profile.xml and other constants for power model calculations. |
| 5689 | * Pulled from PowerProfile.java |
| 5690 | */ |
| 5691 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5692 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 5693 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 5694 | |
| 5695 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 5696 | * Logs when a user restriction was added or removed. |
| 5697 | * |
| 5698 | * Logged from: |
| 5699 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5700 | */ |
| 5701 | message UserRestrictionChanged { |
| 5702 | // The raw string of the user restriction as defined in UserManager. |
| 5703 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 5704 | optional string restriction = 1; |
| 5705 | // Whether the restriction is enabled or disabled. |
| 5706 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 5707 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 5708 | |
| 5709 | /** |
| 5710 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 5711 | * in the system and returns cpu stats for those that are working at the time. |
| 5712 | * Dead pids will be dropped. Kernel processes are excluded. |
| 5713 | * Min cool-down is 5 sec. |
| 5714 | */ |
| 5715 | message ProcessCpuTime { |
| 5716 | optional int32 uid = 1 [(is_uid) = true]; |
| 5717 | |
| 5718 | optional string process_name = 2; |
| 5719 | // Process cpu time in user space, cumulative from boot/process start |
| 5720 | optional int64 user_time_millis = 3; |
| 5721 | // Process cpu time in system space, cumulative from boot/process start |
| 5722 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 5723 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5724 | |
| 5725 | /** |
| 5726 | * Pulls the CPU usage for each thread. |
| 5727 | * |
| 5728 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 5729 | * |
| 5730 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 5731 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 5732 | * considered before a public release. |
| 5733 | */ |
| 5734 | message CpuTimePerThreadFreq { |
| 5735 | // UID that owns the process. |
| 5736 | optional int32 uid = 1 [(is_uid) = true]; |
| 5737 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5738 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5739 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5740 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5741 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 5742 | optional string process_name = 4; |
| 5743 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 5744 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 5745 | |
| 5746 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 5747 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 5748 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 5749 | // significantly reduces the amount of data created |
| 5750 | optional int32 frequency1_khz = 6; |
| 5751 | optional int32 time1_millis = 7; |
| 5752 | optional int32 frequency2_khz = 8; |
| 5753 | optional int32 time2_millis = 9; |
| 5754 | optional int32 frequency3_khz = 10; |
| 5755 | optional int32 time3_millis = 11; |
| 5756 | optional int32 frequency4_khz = 12; |
| 5757 | optional int32 time4_millis = 13; |
| 5758 | optional int32 frequency5_khz = 14; |
| 5759 | optional int32 time5_millis = 15; |
| 5760 | optional int32 frequency6_khz = 16; |
| 5761 | optional int32 time6_millis = 17; |
| 5762 | optional int32 frequency7_khz = 18; |
| 5763 | optional int32 time7_millis = 19; |
| 5764 | optional int32 frequency8_khz = 20; |
| 5765 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5766 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5767 | |
| 5768 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 5769 | * Pulls information about the device's build. |
| 5770 | */ |
| 5771 | message BuildInformation { |
| 5772 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 5773 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 5774 | optional string fingerprint = 1; |
| 5775 | |
| 5776 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 5777 | optional string brand = 2; |
| 5778 | |
| 5779 | // Build.PRODUCT. The name of the overall product. |
| 5780 | optional string product = 3; |
| 5781 | |
| 5782 | // Build.DEVICE. The name of the industrial design. |
| 5783 | optional string device = 4; |
| 5784 | |
| 5785 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 5786 | optional string version_release = 5; |
| 5787 | |
| 5788 | // Build.ID. E.g. a label like "M4-rc20". |
| 5789 | optional string id = 6; |
| 5790 | |
| 5791 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 5792 | // represent this build. |
| 5793 | optional string version_incremental = 7; |
| 5794 | |
| 5795 | // Build.TYPE. The type of build, like "user" or "eng". |
| 5796 | optional string type = 8; |
| 5797 | |
| 5798 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 5799 | optional string tags = 9; |
| 5800 | } |
| 5801 | |
| 5802 | /** |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 5803 | * Logs information about mismatched caller for content capture. |
| 5804 | * |
| 5805 | * Logged from: |
| 5806 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 5807 | */ |
| 5808 | message ContentCaptureCallerMismatchReported { |
| 5809 | optional string intended_package = 1; |
| 5810 | optional string calling_package = 2; |
| 5811 | } |
| 5812 | |
| 5813 | /** |
| 5814 | * Logs information about content capture service events. |
| 5815 | * |
| 5816 | * Logged from: |
| 5817 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5818 | */ |
| 5819 | message ContentCaptureServiceEvents { |
| 5820 | // The type of event. |
| 5821 | enum Event { |
| 5822 | UNKNOWN = 0; |
| 5823 | ON_CONNECTED = 1; |
| 5824 | ON_DISCONNECTED = 2; |
| 5825 | SET_WHITELIST = 3; |
| 5826 | SET_DISABLED = 4; |
| 5827 | ON_USER_DATA_REMOVED = 5; |
| 5828 | } |
| 5829 | optional Event event = 1; |
| 5830 | // component/package of content capture service. |
| 5831 | optional string service_info = 2; |
| 5832 | // component/package of target. |
| 5833 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 5834 | // separated by " ". |
| 5835 | optional string target_info = 3; |
| 5836 | } |
| 5837 | |
| 5838 | /** |
| 5839 | * Logs information about content capture session events. |
| 5840 | * |
| 5841 | * Logged from: |
| 5842 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5843 | */ |
| 5844 | message ContentCaptureSessionEvents { |
| 5845 | // The type of event. |
| 5846 | enum Event { |
| 5847 | UNKNOWN = 0; |
| 5848 | ON_SESSION_STARTED = 1; |
| 5849 | ON_SESSION_FINISHED = 2; |
| 5850 | SESSION_NOT_CREATED = 3; |
| 5851 | } |
| 5852 | optional int32 session_id = 1; |
| 5853 | optional Event event = 2; |
| 5854 | // (n/a on session finished) |
| 5855 | optional int32 state_flags = 3; |
| 5856 | // component/package of content capture service. |
| 5857 | optional string service_info = 4; |
| 5858 | // component/package of app. |
| 5859 | // (n/a on session finished) |
| 5860 | optional string app_info = 5; |
| 5861 | optional bool is_child_session = 6; |
| 5862 | } |
| 5863 | |
| 5864 | /** |
| 5865 | * Logs information about session being flushed. |
| 5866 | * |
| 5867 | * Logged from: |
| 5868 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5869 | */ |
| 5870 | message ContentCaptureFlushed { |
| 5871 | optional int32 session_id = 1; |
| 5872 | // component/package of content capture service. |
| 5873 | optional string service_info = 2; |
| 5874 | // component/package of app. |
| 5875 | optional string app_info = 3; |
| 5876 | // session start/finish events |
| 5877 | optional int32 child_session_started = 4; |
| 5878 | optional int32 child_session_finished = 5; |
| 5879 | // count of view events. |
| 5880 | optional int32 view_appeared_count = 6; |
| 5881 | optional int32 view_disappeared_count = 7; |
| 5882 | optional int32 view_text_changed_count = 8; |
| 5883 | |
| 5884 | // Flush stats. |
| 5885 | optional int32 max_events = 9; |
| 5886 | optional int32 idle_flush_freq = 10; |
| 5887 | optional int32 text_flush_freq = 11; |
| 5888 | optional int32 flush_reason = 12; |
| 5889 | } |
| 5890 | |
| 5891 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5892 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 5893 | */ |
| 5894 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5895 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5896 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5897 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 5898 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5899 | } |
| 5900 | |
| 5901 | /** |
| 5902 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 5903 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 5904 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 5905 | */ |
| 5906 | message DeviceCalculatedPowerBlameUid { |
| 5907 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 5908 | optional int32 uid = 1 [(is_uid) = true]; |
| 5909 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5910 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5911 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5912 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5913 | } |
| 5914 | |
| 5915 | /** |
| 5916 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 5917 | * drain type. |
| 5918 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 5919 | * is attributed uids. They must all be included to get the total power use. |
| 5920 | */ |
| 5921 | message DeviceCalculatedPowerBlameOther { |
| 5922 | // The type of item whose power use is being reported. |
| 5923 | enum DrainType { |
| 5924 | AMBIENT_DISPLAY = 0; |
| 5925 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 5926 | BLUETOOTH = 2; |
| 5927 | CAMERA = 3; |
| 5928 | // Cell-standby |
| 5929 | CELL = 4; |
| 5930 | FLASHLIGHT = 5; |
| 5931 | IDLE = 6; |
| 5932 | MEMORY = 7; |
| 5933 | // Amount that total computed drain exceeded the drain estimated using the |
| 5934 | // battery level changes and capacity. |
| 5935 | OVERCOUNTED = 8; |
| 5936 | PHONE = 9; |
| 5937 | SCREEN = 10; |
| 5938 | // Amount that total computed drain was below the drain estimated using the |
| 5939 | // battery level changes and capacity. |
| 5940 | UNACCOUNTED = 11; |
| 5941 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 5942 | WIFI = 13; |
| 5943 | } |
| 5944 | optional DrainType drain_type = 1; |
| 5945 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5946 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5947 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5948 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5949 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 5950 | |
| 5951 | /** |
| 5952 | * Logs device policy features. |
| 5953 | * |
| 5954 | * Logged from: |
| 5955 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5956 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 5957 | */ |
| 5958 | message DevicePolicyEvent { |
| 5959 | // The event id - unique for each event. |
| 5960 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 5961 | // The admin package name. |
| 5962 | optional string admin_package_name = 2; |
| 5963 | // A generic integer parameter. |
| 5964 | optional int32 integer_value = 3; |
| 5965 | // A generic boolean parameter. |
| 5966 | optional bool boolean_value = 4; |
| 5967 | // A parameter specifying a time period in milliseconds. |
| 5968 | optional uint64 time_period_millis = 5; |
| 5969 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 5970 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 5971 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 5972 | |
| 5973 | /** |
| 5974 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 5975 | * |
| 5976 | * Logged from: |
| 5977 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5978 | */ |
| 5979 | message DocsUILaunchReported { |
| 5980 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 5981 | optional bool has_initial_uri = 2; |
| 5982 | optional android.stats.docsui.MimeType mime_type = 3; |
| 5983 | optional android.stats.docsui.Root initial_root = 4; |
| 5984 | } |
| 5985 | |
| 5986 | /** |
| 5987 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 5988 | * taps on root/app in hamburger menu. |
| 5989 | * |
| 5990 | * Logged from: |
| 5991 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5992 | */ |
| 5993 | message DocsUIRootVisitedReported { |
| 5994 | optional android.stats.docsui.ContextScope scope = 1; |
| 5995 | optional android.stats.docsui.Root root = 2; |
| 5996 | } |
| 5997 | |
| 5998 | /** |
| 5999 | * Logs file operation stats. Call this when a file operation has completed. |
| 6000 | * |
| 6001 | * Logged from: |
| 6002 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6003 | */ |
| 6004 | message DocsUIFileOperationReported { |
| 6005 | optional android.stats.docsui.Provider provider = 1; |
| 6006 | optional android.stats.docsui.FileOperation file_op = 2; |
| 6007 | } |
| 6008 | |
| 6009 | /** |
| 6010 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 6011 | * mode. |
| 6012 | * |
| 6013 | * Logged from: |
| 6014 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6015 | */ |
| 6016 | message DocsUIFileOperationCopyMoveModeReported { |
| 6017 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6018 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 6019 | } |
| 6020 | |
| 6021 | |
| 6022 | /** |
| 6023 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 6024 | * |
| 6025 | * Logged from: |
| 6026 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6027 | */ |
| 6028 | message DocsUIFileOperationFailureReported { |
| 6029 | optional android.stats.docsui.Authority authority = 1; |
| 6030 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 6031 | } |
| 6032 | |
| 6033 | /** |
| 6034 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 6035 | * |
| 6036 | * Logged from: |
| 6037 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6038 | */ |
| 6039 | message DocsUIFileOperationCanceledReported { |
| 6040 | optional android.stats.docsui.FileOperation file_op = 1; |
| 6041 | } |
| 6042 | |
| 6043 | /** |
| 6044 | * Logs startup time in milliseconds. |
| 6045 | * |
| 6046 | * Logged from: |
| 6047 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6048 | */ |
| 6049 | message DocsUIStartupMsReported { |
| 6050 | optional int32 startup_millis = 1; |
| 6051 | } |
| 6052 | |
| 6053 | /** |
| 6054 | * Logs the action that was started by user. |
| 6055 | * |
| 6056 | * Logged from: |
| 6057 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6058 | */ |
| 6059 | message DocsUIUserActionReported { |
| 6060 | optional android.stats.docsui.UserAction action = 1; |
| 6061 | } |
| 6062 | |
| 6063 | /** |
| 6064 | * Logs the invalid type when invalid scoped access is requested. |
| 6065 | * |
| 6066 | * Logged from: |
| 6067 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 6068 | */ |
| 6069 | message DocsUIInvalidScopedAccessRequestReported { |
| 6070 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 6071 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6072 | |
| 6073 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 6074 | * Logs the package name that launches docsui picker mode. |
| 6075 | * |
| 6076 | * Logged from: |
| 6077 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6078 | */ |
| 6079 | message DocsUIPickerLaunchedFromReported { |
| 6080 | optional string package_name = 1; |
| 6081 | } |
| 6082 | |
| 6083 | /** |
| 6084 | * Logs the search type. |
| 6085 | * |
| 6086 | * Logged from: |
| 6087 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6088 | */ |
| 6089 | message DocsUISearchTypeReported { |
| 6090 | optional android.stats.docsui.SearchType search_type = 1; |
| 6091 | } |
| 6092 | |
| 6093 | /** |
| 6094 | * Logs the search mode. |
| 6095 | * |
| 6096 | * Logged from: |
| 6097 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6098 | */ |
| 6099 | message DocsUISearchModeReported { |
| 6100 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 6101 | } |
| 6102 | |
| 6103 | /** |
| 6104 | * Logs the pick result information. |
| 6105 | * |
| 6106 | * Logged from: |
| 6107 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 6108 | */ |
| 6109 | message DocsUIPickResultReported { |
| 6110 | optional int32 total_action_count = 1; |
| 6111 | optional int64 duration_millis = 2; |
| 6112 | optional int32 file_count= 3; |
| 6113 | optional bool is_searching = 4; |
| 6114 | optional android.stats.docsui.Root picked_from = 5; |
| 6115 | optional android.stats.docsui.MimeType mime_type = 6; |
| 6116 | optional int32 repeatedly_pick_times = 7; |
| 6117 | } |
| 6118 | |
| 6119 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6120 | * Logs when an app's memory is compacted. |
| 6121 | * |
| 6122 | * Logged from: |
| 6123 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6124 | */ |
| 6125 | message AppCompacted { |
| 6126 | // The pid of the process being compacted. |
| 6127 | optional int32 pid = 1; |
| 6128 | |
| 6129 | // The name of the process being compacted. |
| 6130 | optional string process_name = 2; |
| 6131 | |
| 6132 | // The type of compaction. |
| 6133 | enum Action { |
| 6134 | UNKNOWN = 0; |
| 6135 | SOME = 1; |
| 6136 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 6137 | PERSISTENT = 3; |
| 6138 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6139 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6140 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6141 | |
| 6142 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 6143 | optional int64 before_rss_total_kilobytes = 4; |
| 6144 | |
| 6145 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 6146 | optional int64 before_rss_file_kilobytes = 5; |
| 6147 | |
| 6148 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 6149 | optional int64 before_rss_anon_kilobytes = 6; |
| 6150 | |
| 6151 | // Swap in kilobytes consumed by the process prior to compaction. |
| 6152 | optional int64 before_swap_kilobytes = 7; |
| 6153 | |
| 6154 | // Total RSS in kilobytes consumed by the process after compaction. |
| 6155 | optional int64 after_rss_total_kilobytes = 8; |
| 6156 | |
| 6157 | // File RSS in kilobytes consumed by the process after compaction. |
| 6158 | optional int64 after_rss_file_kilobytes = 9; |
| 6159 | |
| 6160 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 6161 | optional int64 after_rss_anon_kilobytes = 10; |
| 6162 | |
| 6163 | // Swap in kilobytes consumed by the process after compaction. |
| 6164 | optional int64 after_swap_kilobytes = 11; |
| 6165 | |
| 6166 | // The time taken to perform compaction in milliseconds. |
| 6167 | optional int64 time_to_compact_millis = 12; |
| 6168 | |
| 6169 | // The last compaction action performed for this app. |
| 6170 | optional Action last_action = 13; |
| 6171 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 6172 | // The last time that compaction was attempted on this process in milliseconds |
| 6173 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 6174 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6175 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 6176 | // 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] | 6177 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6178 | |
| 6179 | // The process state at the time of compaction. |
| 6180 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 6181 | |
| 6182 | // Free ZRAM in kilobytes before compaction. |
| 6183 | optional int64 before_zram_free_kilobytes = 17; |
| 6184 | |
| 6185 | // Free ZRAM in kilobytes after compaction. |
| 6186 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 6187 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6188 | |
| 6189 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6190 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 6191 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 6192 | * |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6193 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 6194 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 6195 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 6196 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6197 | */ |
| 6198 | message NetworkDnsEventReported { |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6199 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6200 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6201 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6202 | |
| 6203 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6204 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6205 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6206 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 6207 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6208 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6209 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 6210 | // Only valid for event_type = EVENT_RESNSEND. |
| 6211 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6212 | |
lifr | ad9becc | 2019-05-20 11:04:41 +0800 | [diff] [blame] | 6213 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6214 | |
| 6215 | // The DNS over TLS mode on a specific netId. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 6216 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 6217 | |
| 6218 | // Additional pass-through fields opaque to statsd. |
| 6219 | // 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] | 6220 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 2b9fab7 | 2019-07-20 15:28:28 +0800 | [diff] [blame] | 6221 | |
| 6222 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 6223 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 6224 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 6225 | |
| 6226 | /** |
| 6227 | * Logs when a data stall event occurs. |
| 6228 | * |
| 6229 | * Log from: |
| 6230 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 6231 | */ |
| 6232 | message DataStallEvent { |
| 6233 | // Data stall evaluation type. |
| 6234 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 6235 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 6236 | optional int32 evaluation_type = 1; |
| 6237 | // See definition in data_stall_event.proto. |
| 6238 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 6239 | // See definition in data_stall_event.proto. |
| 6240 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 6241 | // See definition in data_stall_event.proto. |
| 6242 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 6243 | // See definition in data_stall_event.proto. |
| 6244 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 6245 | // See definition in data_stall_event.proto. |
| 6246 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 6247 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 6248 | |
| 6249 | /* |
| 6250 | * Logs when RescueParty resets some set of experiment flags. |
| 6251 | * |
| 6252 | * Logged from: |
| 6253 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 6254 | */ |
| 6255 | message RescuePartyResetReported { |
| 6256 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 6257 | optional int32 rescue_level = 1; |
| 6258 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 6259 | |
| 6260 | /** |
| 6261 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 6262 | * Logged from: |
| 6263 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 6264 | */ |
| 6265 | message SignedConfigReported { |
| 6266 | enum Type { |
| 6267 | UNKNOWN_TYPE = 0; |
| 6268 | GLOBAL_SETTINGS = 1; |
| 6269 | } |
| 6270 | optional Type type = 1; |
| 6271 | |
| 6272 | // The final status of the signed config received. |
| 6273 | enum Status { |
| 6274 | UNKNOWN_STATUS = 0; |
| 6275 | APPLIED = 1; |
| 6276 | BASE64_FAILURE_CONFIG = 2; |
| 6277 | BASE64_FAILURE_SIGNATURE = 3; |
| 6278 | SECURITY_EXCEPTION = 4; |
| 6279 | INVALID_CONFIG = 5; |
| 6280 | OLD_CONFIG = 6; |
| 6281 | SIGNATURE_CHECK_FAILED = 7; |
| 6282 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 6283 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 6284 | } |
| 6285 | optional Status status = 2; |
| 6286 | |
| 6287 | // The version of the signed config processed. |
| 6288 | optional int32 version = 3; |
| 6289 | |
| 6290 | // The package name that the config was extracted from. |
| 6291 | optional string from_package = 4; |
| 6292 | |
| 6293 | enum Key { |
| 6294 | NO_KEY = 0; |
| 6295 | DEBUG = 1; |
| 6296 | PRODUCTION = 2; |
| 6297 | } |
| 6298 | // Which key was used to verify the config. |
| 6299 | optional Key verified_with = 5; |
| 6300 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6301 | |
| 6302 | /* |
| 6303 | * Logs GNSS Network-Initiated (NI) location events. |
| 6304 | * |
| 6305 | * Logged from: |
| 6306 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6307 | */ |
| 6308 | message GnssNiEventReported { |
| 6309 | // The type of GnssNiEvent. |
| 6310 | enum EventType { |
| 6311 | UNKNOWN = 0; |
| 6312 | NI_REQUEST = 1; |
| 6313 | NI_RESPONSE = 2; |
| 6314 | } |
| 6315 | optional EventType event_type = 1; |
| 6316 | |
| 6317 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 6318 | optional int32 notification_id = 2; |
| 6319 | |
| 6320 | // 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] | 6321 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6322 | |
| 6323 | // NI requires notification. |
| 6324 | optional bool need_notify = 4; |
| 6325 | |
| 6326 | // NI requires verification. |
| 6327 | optional bool need_verify = 5; |
| 6328 | |
| 6329 | // NI requires privacy override, no notification/minimal trace. |
| 6330 | optional bool privacy_override = 6; |
| 6331 | |
| 6332 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 6333 | // seconds. |
| 6334 | optional int32 timeout = 7; |
| 6335 | |
| 6336 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6337 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6338 | |
| 6339 | // String representing the requester of the network inititated location request. |
| 6340 | optional string requestor_id = 9; |
| 6341 | |
| 6342 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 6343 | // network initiated location request. |
| 6344 | optional string text = 10; |
| 6345 | |
| 6346 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6347 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6348 | |
| 6349 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6350 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6351 | |
| 6352 | // True if SUPL ES is enabled. |
| 6353 | optional bool is_supl_es_enabled = 13; |
| 6354 | |
| 6355 | // True if GNSS location is enabled. |
| 6356 | optional bool is_location_enabled = 14; |
| 6357 | |
| 6358 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6359 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 6360 | } |
| 6361 | |
| 6362 | /** |
| 6363 | * Logs GNSS non-framework (NFW) location notification. |
| 6364 | * |
| 6365 | * Logged from: |
| 6366 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6367 | */ |
| 6368 | message GnssNfwNotificationReported { |
| 6369 | // Package name of the Android proxy application representing the non-framework entity that |
| 6370 | // requested location. Set to empty string if unknown. |
| 6371 | optional string proxy_app_package_name = 1; |
| 6372 | |
| 6373 | // Protocol stack that initiated the non-framework location request. |
| 6374 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 6375 | |
| 6376 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 6377 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 6378 | optional string other_protocol_stack_name = 3; |
| 6379 | |
| 6380 | // Source initiating/receiving the location information. |
| 6381 | optional android.server.location.NfwRequestor requestor = 4; |
| 6382 | |
| 6383 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 6384 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 6385 | // and used for logging purposes. |
| 6386 | optional string requestor_id = 5; |
| 6387 | |
| 6388 | // Indicates whether location information was provided for this request. |
| 6389 | optional android.server.location.NfwResponseType response_type = 6; |
| 6390 | |
| 6391 | // True if the device is in user initiated emergency session. |
| 6392 | optional bool in_emergency_mode = 7; |
| 6393 | |
| 6394 | // True if cached location is provided. |
| 6395 | optional bool is_cached_location = 8; |
| 6396 | |
| 6397 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 6398 | optional bool is_permission_mismatched = 9; |
| 6399 | } |
| 6400 | |
| 6401 | /** |
| 6402 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 6403 | * |
| 6404 | * Logged from: |
| 6405 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 6406 | */ |
| 6407 | message GnssConfigurationReported { |
| 6408 | // SUPL host name. |
| 6409 | optional string supl_host = 1; |
| 6410 | |
| 6411 | // SUPL port number. |
| 6412 | optional int32 supl_port = 2; |
| 6413 | |
| 6414 | // C2K host name. |
| 6415 | optional string c2k_host = 3; |
| 6416 | |
| 6417 | // C2K port number. |
| 6418 | optional int32 c2k_port = 4; |
| 6419 | |
| 6420 | // The SUPL version requested by Carrier. |
| 6421 | optional int32 supl_ver = 5; |
| 6422 | |
| 6423 | // The SUPL mode. |
| 6424 | optional android.server.location.SuplMode supl_mode = 6; |
| 6425 | |
| 6426 | // True if NI emergency SUPL restrictions is enabled. |
| 6427 | optional bool supl_es = 7; |
| 6428 | |
| 6429 | // LTE Positioning Profile settings |
| 6430 | optional android.server.location.LppProfile lpp_profile = 8; |
| 6431 | |
| 6432 | // Positioning protocol on A-Glonass system. |
| 6433 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 6434 | |
| 6435 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 6436 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 6437 | |
| 6438 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 6439 | optional android.server.location.GpsLock gps_lock = 11; |
| 6440 | |
| 6441 | // Number of seconds to extend the emergency session duration post emergency call. |
| 6442 | optional int32 es_extension_sec = 12; |
| 6443 | |
| 6444 | // The full list of package names of proxy Android applications representing the non-framework |
| 6445 | // location access entities (on/off the device) for which the framework user has granted |
| 6446 | // non-framework location access permission. The package names are concatenated in one string |
| 6447 | // with spaces as separators. |
| 6448 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6449 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6450 | |
| 6451 | /** |
| 6452 | * Logs when a NFC device's error occurred. |
| 6453 | * Logged from: |
| 6454 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6455 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 6456 | */ |
| 6457 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6458 | enum Type { |
| 6459 | UNKNOWN = 0; |
| 6460 | CMD_TIMEOUT = 1; |
| 6461 | ERROR_NOTIFICATION = 2; |
| 6462 | AID_OVERFLOW = 3; |
| 6463 | } |
| 6464 | optional Type type = 1; |
| 6465 | // If it's nci cmd timeout, log the timeout command. |
| 6466 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6467 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6468 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6469 | } |
| 6470 | |
| 6471 | /** |
| 6472 | * Logs when a NFC device's state changed event |
| 6473 | * Logged from: |
| 6474 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 6475 | */ |
| 6476 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6477 | enum State { |
| 6478 | UNKNOWN = 0; |
| 6479 | OFF = 1; |
| 6480 | ON = 2; |
| 6481 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 6482 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 6483 | } |
| 6484 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6485 | } |
| 6486 | |
| 6487 | /** |
| 6488 | * Logs when a NFC Beam Transaction occurred. |
| 6489 | * Logged from: |
| 6490 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 6491 | */ |
| 6492 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6493 | enum Operation { |
| 6494 | UNKNOWN = 0; |
| 6495 | SEND = 1; |
| 6496 | RECEIVE = 2; |
| 6497 | } |
| 6498 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6499 | } |
| 6500 | |
| 6501 | /** |
| 6502 | * Logs when a NFC Card Emulation Transaction occurred. |
| 6503 | * Logged from: |
| 6504 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 6505 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 6506 | */ |
| 6507 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6508 | enum Category { |
| 6509 | UNKNOWN = 0; |
| 6510 | HCE_PAYMENT = 1; |
| 6511 | HCE_OTHER = 2; |
| 6512 | OFFHOST = 3; |
| 6513 | } |
| 6514 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 6515 | optional Category category = 1; |
| 6516 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 6517 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6518 | } |
| 6519 | |
| 6520 | /** |
| 6521 | * Logs when a NFC Tag event occurred. |
| 6522 | * Logged from: |
| 6523 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 6524 | */ |
| 6525 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6526 | enum Type { |
| 6527 | UNKNOWN = 0; |
| 6528 | URL = 1; |
| 6529 | BT_PAIRING = 2; |
| 6530 | PROVISION = 3; |
| 6531 | WIFI_CONNECT = 4; |
| 6532 | APP_LAUNCH = 5; |
| 6533 | OTHERS = 6; |
| 6534 | } |
| 6535 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6536 | } |
| 6537 | |
| 6538 | /** |
| 6539 | * Logs when Hce transaction triggered |
| 6540 | * Logged from: |
| 6541 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6542 | */ |
| 6543 | message NfcHceTransactionOccurred { |
| 6544 | // The latency period(in microseconds) it took for the first HCE data |
| 6545 | // exchange. |
| 6546 | optional uint32 latency_micros = 1; |
| 6547 | } |
| 6548 | |
| 6549 | /** |
| 6550 | * Logs when SecureElement state event changed |
| 6551 | * Logged from: |
| 6552 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 6553 | */ |
| 6554 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6555 | enum State { |
| 6556 | UNKNOWN = 0; |
| 6557 | INITIALIZED = 1; |
| 6558 | DISCONNECTED = 2; |
| 6559 | CONNECTED = 3; |
| 6560 | HALCRASH = 4; |
| 6561 | } |
| 6562 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6563 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6564 | optional string state_change_reason = 2; |
| 6565 | // SIMx or eSEx. |
| 6566 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6567 | } |
| 6568 | |
| 6569 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6570 | * Information about a permission grant request |
| 6571 | */ |
| 6572 | message PermissionGrantRequestResultReported { |
| 6573 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 6574 | optional int64 request_id = 1; |
| 6575 | |
| 6576 | // UID of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6577 | optional int32 uid = 2 [(is_uid) = true]; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6578 | |
| 6579 | // Name of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6580 | optional string package_name = 3; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6581 | |
| 6582 | // The permission to be granted |
| 6583 | optional string permission_name = 4; |
| 6584 | |
| 6585 | // If the permission was explicitly requested via the API or added by the system |
| 6586 | optional bool is_implicit = 5; |
| 6587 | |
| 6588 | enum Result { |
| 6589 | UNDEFINED = 0; |
| 6590 | // permission request was ignored |
| 6591 | IGNORED = 1; |
| 6592 | // permission request was ignored because it was user fixed |
| 6593 | IGNORED_USER_FIXED = 2; |
| 6594 | // permission request was ignored because it was policy fixed |
| 6595 | IGNORED_POLICY_FIXED = 3; |
| 6596 | // permission was granted by user action |
| 6597 | USER_GRANTED = 4; |
| 6598 | // permission was automatically granted |
| 6599 | AUTO_GRANTED = 5; |
| 6600 | // permission was denied by user action |
| 6601 | USER_DENIED = 6; |
| 6602 | // permission was denied with prejudice by the user |
| 6603 | USER_DENIED_WITH_PREJUDICE = 7; |
| 6604 | // permission was automatically denied |
| 6605 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 6606 | // permission request was ignored because permission is restricted |
| 6607 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 6608 | // one time permission was granted by user action |
| 6609 | USER_GRANTED_ONE_TIME = 10; |
Stanislav Zholnin | 8fde4fb | 2019-12-06 19:06:08 +0000 | [diff] [blame] | 6610 | // user ignored request by leaving the request screen without choosing any option |
| 6611 | USER_IGNORED = 11; |
Evan Severson | 7c1cc8a | 2019-12-17 14:36:17 -0800 | [diff] [blame] | 6612 | // user granted the permission after being linked to settings |
| 6613 | USER_GRANTED_IN_SETTINGS = 12; |
| 6614 | // user denied the permission after being linked to settings |
| 6615 | USER_DENIED_IN_SETTINGS = 13; |
| 6616 | // user denied the permission with prejudice after being linked to settings |
| 6617 | USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14; |
| 6618 | // permission was automatically revoked after one-time permission expired |
| 6619 | AUTO_ONE_TIME_PERMISSION_REVOKED = 15; |
Eugene Susla | 6db4be5 | 2020-01-09 11:02:09 -0800 | [diff] [blame] | 6620 | // permission was automatically revoked for unused app |
| 6621 | AUTO_UNUSED_APP_PERMISSION_REVOKED = 16; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6622 | } |
| 6623 | // The result of the permission grant |
| 6624 | optional Result result = 6; |
| 6625 | } |
| 6626 | |
| 6627 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6628 | * Logs when Omapi API used |
| 6629 | * Logged from: |
| 6630 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 6631 | */ |
| 6632 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6633 | enum Operation { |
| 6634 | UNKNOWN = 0; |
| 6635 | OPEN_CHANNEL = 1; |
| 6636 | } |
| 6637 | optional Operation operation = 1; |
| 6638 | // SIMx or eSEx. |
| 6639 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6640 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6641 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6642 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6643 | |
| 6644 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6645 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 6646 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6647 | * Logged from: |
| 6648 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 6649 | */ |
| 6650 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6651 | optional int64 dispatch_latency_millis = 1; |
| 6652 | } |
| 6653 | |
| 6654 | /** |
| 6655 | * Logs AttentionManagerService attention check result. |
| 6656 | * |
| 6657 | * Logged from: |
| 6658 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 6659 | */ |
| 6660 | message AttentionManagerServiceResultReported { |
| 6661 | // See core/java/android/service/attention/AttentionService.java |
| 6662 | enum AttentionCheckResult { |
| 6663 | UNKNOWN = 20; |
| 6664 | ATTENTION_SUCCESS_ABSENT = 0; |
| 6665 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 6666 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 6667 | ATTENTION_FAILURE_CANCELLED = 3; |
| 6668 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 6669 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 6670 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6671 | } |
| 6672 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6673 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 6674 | |
| 6675 | /** |
| 6676 | * Logs when an adb connection changes state. |
| 6677 | * |
| 6678 | * Logged from: |
| 6679 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 6680 | */ |
| 6681 | message AdbConnectionChanged { |
| 6682 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 6683 | // previously selected for this system. |
| 6684 | optional int64 last_connection_time_millis = 1; |
| 6685 | |
| 6686 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 6687 | // to reconnect via adb without user interaction. |
| 6688 | optional int64 auth_window_millis = 2; |
| 6689 | |
| 6690 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 6691 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 6692 | |
| 6693 | // True if the 'always allow' option was selected for this system. |
| 6694 | optional bool always_allow = 4; |
| 6695 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 6696 | |
| 6697 | /* |
| 6698 | * Logs the reported speech DSP status. |
| 6699 | * |
| 6700 | * Logged from: |
| 6701 | * Vendor audio implementation. |
| 6702 | */ |
| 6703 | message SpeechDspStatReported { |
| 6704 | // The total Speech DSP uptime in milliseconds. |
| 6705 | optional int32 total_uptime_millis = 1; |
| 6706 | // The total Speech DSP downtime in milliseconds. |
| 6707 | optional int32 total_downtime_millis = 2; |
| 6708 | optional int32 total_crash_count = 3; |
| 6709 | optional int32 total_recover_count = 4; |
| 6710 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 6711 | |
| 6712 | /** |
| 6713 | * Logs USB connector contaminant status. |
| 6714 | * |
| 6715 | * Logged from: USB Service. |
| 6716 | */ |
| 6717 | message UsbContaminantReported { |
| 6718 | optional string id = 1; |
| 6719 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 6720 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 6721 | |
| 6722 | /** |
| 6723 | * This atom is for debugging purpose. |
| 6724 | */ |
| 6725 | message DebugElapsedClock { |
| 6726 | // Monotically increasing value for each pull. |
| 6727 | optional int64 pull_count = 1; |
| 6728 | // Time from System.elapsedRealtime. |
| 6729 | optional int64 elapsed_clock_millis = 2; |
| 6730 | // Time from System.elapsedRealtime. |
| 6731 | optional int64 same_elapsed_clock_millis = 3; |
| 6732 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6733 | optional int64 elapsed_clock_diff_millis = 4; |
| 6734 | |
| 6735 | enum Type { |
| 6736 | TYPE_UNKNOWN = 0; |
| 6737 | ALWAYS_PRESENT = 1; |
| 6738 | PRESENT_ON_ODD_PULLS = 2; |
| 6739 | } |
| 6740 | // Type of behavior for the pulled data. |
| 6741 | optional Type type = 5; |
| 6742 | } |
| 6743 | |
| 6744 | /** |
| 6745 | * This atom is for debugging purpose. |
| 6746 | */ |
| 6747 | message DebugFailingElapsedClock { |
| 6748 | // Monotically increasing value for each pull. |
| 6749 | optional int64 pull_count = 1; |
| 6750 | // Time from System.elapsedRealtime. |
| 6751 | optional int64 elapsed_clock_millis = 2; |
| 6752 | // Time from System.elapsedRealtime. |
| 6753 | optional int64 same_elapsed_clock_millis = 3; |
| 6754 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6755 | optional int64 elapsed_clock_diff_millis = 4; |
| 6756 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6757 | |
| 6758 | /** Logs System UI bubbles event changed. |
| 6759 | * |
| 6760 | * Logged from: |
| 6761 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 6762 | */ |
| 6763 | message BubbleUIChanged { |
| 6764 | |
| 6765 | // The app package that is posting the bubble. |
| 6766 | optional string package_name = 1; |
| 6767 | |
| 6768 | // The notification channel that is posting the bubble. |
| 6769 | optional string notification_channel = 2; |
| 6770 | |
| 6771 | // The notification id associated with the posted bubble. |
| 6772 | optional int32 notification_id = 3; |
| 6773 | |
| 6774 | // The position of the bubble within the bubble stack. |
| 6775 | optional int32 position = 4; |
| 6776 | |
| 6777 | // The total number of bubbles within the bubble stack. |
| 6778 | optional int32 total_number = 5; |
| 6779 | |
| 6780 | // User interactions with the bubble. |
| 6781 | enum Action { |
| 6782 | UNKNOWN = 0; |
| 6783 | POSTED = 1; |
| 6784 | UPDATED = 2; |
| 6785 | EXPANDED = 3; |
| 6786 | COLLAPSED = 4; |
| 6787 | DISMISSED = 5; |
| 6788 | STACK_DISMISSED = 6; |
| 6789 | STACK_MOVED = 7; |
| 6790 | HEADER_GO_TO_APP = 8; |
| 6791 | HEADER_GO_TO_SETTINGS = 9; |
| 6792 | PERMISSION_OPT_IN = 10; |
| 6793 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 6794 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6795 | SWIPE_LEFT = 13; |
| 6796 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 6797 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 6798 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6799 | } |
| 6800 | optional Action action = 6; |
| 6801 | |
| 6802 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 6803 | optional float normalized_x_position = 7; |
| 6804 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 6805 | |
| 6806 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 6807 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 6808 | |
| 6809 | // Whether the bubble is an on-going one. |
| 6810 | optional bool is_ongoing = 10; |
| 6811 | |
| 6812 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 6813 | // This is deprecated and the value should be ignored. |
| 6814 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6815 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6816 | |
| 6817 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 6818 | * Logs System UI bubbles developer errors. |
| 6819 | * |
| 6820 | * Logged from: |
| 6821 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 6822 | */ |
| 6823 | message BubbleDeveloperErrorReported { |
| 6824 | |
| 6825 | // The app package that is posting the bubble. |
| 6826 | optional string package_name = 1; |
| 6827 | |
| 6828 | // Bubble developer error type enums. |
| 6829 | enum Error { |
| 6830 | UNKNOWN = 0; |
| 6831 | ACTIVITY_INFO_MISSING = 1; |
| 6832 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 6833 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 6834 | } |
| 6835 | optional Error error = 2 [default = UNKNOWN]; |
| 6836 | } |
| 6837 | |
| 6838 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6839 | * Logs that a constraint for a scheduled job has changed. |
| 6840 | * |
| 6841 | * Logged from: |
| 6842 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 6843 | */ |
| 6844 | message ScheduledJobConstraintChanged { |
| 6845 | repeated AttributionNode attribution_node = 1; |
| 6846 | |
| 6847 | // Name of the job. |
| 6848 | optional string job_name = 2; |
| 6849 | |
| 6850 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 6851 | |
| 6852 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 6853 | UNKNOWN = 0; |
| 6854 | UNSATISFIED = 1; |
| 6855 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6856 | } |
| 6857 | optional State state = 4; |
| 6858 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6859 | |
| 6860 | /** |
| 6861 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 6862 | * returns true. |
| 6863 | * |
| 6864 | * Logged from: |
| 6865 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 6866 | */ |
| 6867 | message ScreenTimeoutExtensionReported { |
| 6868 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 6869 | optional uint32 consecutive_timeout_extended_count = 1; |
| 6870 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 6871 | |
| 6872 | /* |
| 6873 | * Logs number of milliseconds it takes to start a process. |
| 6874 | * The definition of app process start time is from the app launch time to |
| 6875 | * the time that Zygote finished forking the app process and loaded the |
| 6876 | * application package's java classes. |
| 6877 | |
| 6878 | * This metric is different from AppStartOccurred which is for foreground |
| 6879 | * activity only. |
| 6880 | |
| 6881 | * ProcessStartTime can report all processes (both foreground and background) |
| 6882 | * start time. |
| 6883 | * |
| 6884 | * Logged from: |
| 6885 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6886 | */ |
| 6887 | message ProcessStartTime { |
| 6888 | // The uid of the ProcessRecord. |
| 6889 | optional int32 uid = 1 [(is_uid) = true]; |
| 6890 | |
| 6891 | // The process pid. |
| 6892 | optional int32 pid = 2; |
| 6893 | |
| 6894 | // The process name. |
| 6895 | // Usually package name, "system" for system server. |
| 6896 | // Provided by ActivityManagerService. |
| 6897 | optional string process_name = 3; |
| 6898 | |
| 6899 | enum StartType { |
| 6900 | UNKNOWN = 0; |
| 6901 | WARM = 1; |
| 6902 | HOT = 2; |
| 6903 | COLD = 3; |
| 6904 | } |
| 6905 | |
| 6906 | // The start type. |
| 6907 | optional StartType type = 4; |
| 6908 | |
| 6909 | // The elapsed realtime at the start of the process. |
| 6910 | optional int64 process_start_time_millis = 5; |
| 6911 | |
| 6912 | // Number of milliseconds it takes to reach bind application. |
| 6913 | optional int32 bind_application_delay_millis = 6; |
| 6914 | |
| 6915 | // Number of milliseconds it takes to finish start of the process. |
| 6916 | optional int32 process_start_delay_millis = 7; |
| 6917 | |
| 6918 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 6919 | // "service", "content provider", "broadcast" or other strings. |
| 6920 | optional string hosting_type = 8; |
| 6921 | |
| 6922 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 6923 | // in this process. |
| 6924 | optional string hosting_name = 9; |
| 6925 | } |
| 6926 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6927 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 6928 | * Track Media Codec usage |
| 6929 | * Logged from: |
| 6930 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 6931 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 6932 | */ |
| 6933 | message MediametricsCodecReported { |
| 6934 | optional int64 timestamp_nanos = 1; |
| 6935 | optional string package_name = 2; |
| 6936 | optional int64 package_version_code = 3; |
| 6937 | optional int64 media_apex_version = 4; |
| 6938 | |
| 6939 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6940 | } |
| 6941 | |
| 6942 | /** |
| 6943 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 6944 | * Logged from: |
| 6945 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 6946 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 6947 | */ |
| 6948 | message MediametricsExtractorReported { |
| 6949 | optional int64 timestamp_nanos = 1; |
| 6950 | optional string package_name = 2; |
| 6951 | optional int64 package_version_code = 3; |
| 6952 | optional int64 media_apex_version = 4; |
| 6953 | |
| 6954 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6955 | } |
| 6956 | |
| 6957 | /** |
| 6958 | * Track how we arbitrate between microphone/input requests. |
| 6959 | * Logged from |
| 6960 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 6961 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 6962 | */ |
| 6963 | message MediametricsAudiopolicyReported { |
| 6964 | optional int64 timestamp_nanos = 1; |
| 6965 | optional string package_name = 2; |
| 6966 | optional int64 package_version_code = 3; |
| 6967 | optional int64 media_apex_version = 4; |
| 6968 | |
| 6969 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6970 | } |
| 6971 | |
| 6972 | /** |
| 6973 | * Track how we arbitrate between microphone requests. |
| 6974 | * Logged from |
| 6975 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 6976 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 6977 | */ |
| 6978 | message MediametricsAudiorecordReported { |
| 6979 | optional int64 timestamp_nanos = 1; |
| 6980 | optional string package_name = 2; |
| 6981 | optional int64 package_version_code = 3; |
| 6982 | optional int64 media_apex_version = 4; |
| 6983 | |
| 6984 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6985 | } |
| 6986 | |
| 6987 | /** |
| 6988 | * Track how we arbitrate between microphone/input requests. |
| 6989 | * Logged from |
| 6990 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 6991 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 6992 | */ |
| 6993 | message MediametricsAudiothreadReported { |
| 6994 | optional int64 timestamp_nanos = 1; |
| 6995 | optional string package_name = 2; |
| 6996 | optional int64 package_version_code = 3; |
| 6997 | optional int64 media_apex_version = 4; |
| 6998 | |
| 6999 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7000 | } |
| 7001 | |
| 7002 | /** |
| 7003 | * Track how we arbitrate between microphone/input requests. |
| 7004 | * Logged from |
| 7005 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 7006 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 7007 | */ |
| 7008 | message MediametricsAudiotrackReported { |
| 7009 | optional int64 timestamp_nanos = 1; |
| 7010 | optional string package_name = 2; |
| 7011 | optional int64 package_version_code = 3; |
| 7012 | optional int64 media_apex_version = 4; |
| 7013 | |
| 7014 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7015 | } |
| 7016 | |
| 7017 | /** |
| 7018 | * Track information about DRM framework performance |
| 7019 | * Logged from |
| 7020 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 7021 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 7022 | */ |
| 7023 | message MediametricsMediadrmReported { |
| 7024 | optional int64 timestamp_nanos = 1; |
| 7025 | optional string package_name = 2; |
| 7026 | optional int64 package_version_code = 3; |
| 7027 | optional int64 media_apex_version = 4; |
| 7028 | |
| 7029 | // vendor+description tell about which DRM plugin is in use on this device |
| 7030 | optional string vendor = 5; |
| 7031 | optional string description = 6; |
| 7032 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 7033 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7034 | } |
| 7035 | |
| 7036 | /** |
| 7037 | * Track information about the widevine DRM plugin performance |
| 7038 | * Logged from |
| 7039 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 7040 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 7041 | */ |
| 7042 | message MediametricsDrmWidevineReported { |
| 7043 | optional int64 timestamp_nanos = 1; |
| 7044 | optional string package_name = 2; |
| 7045 | optional int64 package_version_code = 3; |
| 7046 | optional int64 media_apex_version = 4; |
| 7047 | |
| 7048 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7049 | } |
| 7050 | |
| 7051 | /** |
| 7052 | * Track information about recordings (e.g. camcorder) |
| 7053 | * Logged from |
| 7054 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 7055 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 7056 | */ |
| 7057 | message MediametricsRecorderReported { |
| 7058 | optional int64 timestamp_nanos = 1; |
| 7059 | optional string package_name = 2; |
| 7060 | optional int64 package_version_code = 3; |
| 7061 | optional int64 media_apex_version = 4; |
| 7062 | |
| 7063 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7064 | } |
| 7065 | |
| 7066 | /** |
| 7067 | * Track Media Player usage |
| 7068 | * Logged from: |
| 7069 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 7070 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 7071 | */ |
| 7072 | message MediametricsNuPlayerReported { |
| 7073 | optional int64 timestamp_nanos = 1; |
| 7074 | optional string package_name = 2; |
| 7075 | optional int64 package_version_code = 3; |
| 7076 | optional int64 media_apex_version = 4; |
| 7077 | |
| 7078 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7079 | } |
| 7080 | |
| 7081 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 7082 | * Track Legacy DRM usage |
| 7083 | * Logged from |
| 7084 | * frameworks/av/drm/drmserver/DrmManager.cpp |
| 7085 | */ |
| 7086 | message MediametricsDrmManagerReported { |
| 7087 | optional int64 timestamp_nanos = 1; |
| 7088 | optional string package_name = 2; |
| 7089 | optional int64 package_version_code = 3; |
| 7090 | optional int64 media_apex_version = 4; |
| 7091 | |
| 7092 | enum Method { |
| 7093 | METHOD_NOT_FOUND = -1; |
| 7094 | GET_CONSTRAINTS = 0; |
| 7095 | GET_METADATA = 1; |
| 7096 | CAN_HANDLE = 2; |
| 7097 | PROCESS_DRM_INFO = 3; |
| 7098 | ACQUIRE_DRM_INFO = 4; |
| 7099 | SAVE_RIGHTS = 5; |
| 7100 | GET_ORIGINAL_MIME_TYPE = 6; |
| 7101 | GET_DRM_OBJECT_TYPE = 7; |
| 7102 | CHECK_RIGHTS_STATUS = 8; |
| 7103 | REMOVE_RIGHTS = 9; |
| 7104 | REMOVE_ALL_RIGHTS = 10; |
| 7105 | OPEN_CONVERT_SESSION = 11; |
| 7106 | OPEN_DECRYPT_SESSION = 12; |
| 7107 | } |
| 7108 | |
| 7109 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 7110 | optional string plugin_id = 5; |
| 7111 | optional string description = 6; |
| 7112 | optional Method method = 7; |
| 7113 | optional string mime_types = 8; |
Robert Shih | ec8e60c | 2020-02-08 15:20:39 -0800 | [diff] [blame] | 7114 | |
| 7115 | optional int64 get_constraints_count = 9; |
| 7116 | optional int64 get_metadata_count = 10; |
| 7117 | optional int64 can_handle_count = 11; |
| 7118 | optional int64 process_drm_info_count = 12; |
| 7119 | optional int64 acquire_drm_info_count = 13; |
| 7120 | optional int64 save_rights_count = 14; |
| 7121 | optional int64 get_original_mime_type_count = 15; |
| 7122 | optional int64 get_drm_object_type_count = 16; |
| 7123 | optional int64 check_rights_status_count = 17; |
| 7124 | optional int64 remove_rights_count = 18; |
| 7125 | optional int64 remove_all_rights_count = 19; |
| 7126 | optional int64 open_convert_session_count = 20; |
| 7127 | optional int64 open_decrypt_session_count = 21; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 7128 | } |
| 7129 | |
| 7130 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7131 | * State of a dangerous permission requested by a package |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 7132 | * Pulled from: StatsCompanionService |
| 7133 | */ |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7134 | message DangerousPermissionState { |
| 7135 | // Name of the permission |
| 7136 | optional string permission_name = 1; |
| 7137 | |
| 7138 | // Uid of the package |
| 7139 | optional int32 uid = 2 [(is_uid) = true]; |
| 7140 | |
| 7141 | // Package requesting the permission |
| 7142 | optional string package_name = 3; |
| 7143 | |
| 7144 | // If the permission is granted to the uid |
| 7145 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 7146 | |
| 7147 | // Permission flags as per android.content.pm.PermissionFlags |
| 7148 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 7149 | } |
| 7150 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 7151 | /** |
| 7152 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 7153 | * |
| 7154 | * Logged from: |
| 7155 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 7156 | */ |
| 7157 | message DeviceIdentifierAccessDenied { |
| 7158 | // The name of the package denied access to the requested device identifier. |
| 7159 | optional string package_name = 1; |
| 7160 | |
| 7161 | // The name of the device identifier method the package attempted to invoke. |
| 7162 | optional string method_name = 2; |
| 7163 | |
| 7164 | // True if the package is preinstalled. |
Meng Wang | e8953ae | 2020-01-29 10:38:58 -0800 | [diff] [blame] | 7165 | // Starting from Android 11, this boolean is not set and will always be false. |
| 7166 | optional bool is_preinstalled = 3 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 7167 | |
| 7168 | // True if the package is privileged. |
Sooraj Sasindran | 22b53f4 | 2019-11-27 15:57:33 -0800 | [diff] [blame] | 7169 | // Starting from Android 11, this boolean is not set and will always be false. |
| 7170 | optional bool is_priv_app = 4 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 7171 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 7172 | |
| 7173 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 7174 | * Pulls the ongoing mainline install train version code. |
| 7175 | * Pulled from StatsCompanionService |
| 7176 | */ |
| 7177 | message TrainInfo { |
| 7178 | optional int64 train_version_code = 1; |
| 7179 | |
| 7180 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 7181 | |
| 7182 | optional string train_name = 3; |
| 7183 | |
| 7184 | enum Status { |
| 7185 | UNKNOWN = 0; |
| 7186 | INSTALL_REQUESTED = 1; |
| 7187 | INSTALL_STARTED = 2; |
| 7188 | INSTALL_STAGED_NOT_READY = 3; |
| 7189 | INSTALL_STAGED_READY = 4; |
| 7190 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 7191 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 7192 | // and INSTALL_FAILURE_COMMIT. |
| 7193 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 7194 | // 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] | 7195 | INSTALL_CANCELLED = 7; |
| 7196 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 7197 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 7198 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 7199 | INSTALLER_ROLLBACK_STAGED = 11; |
| 7200 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 7201 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 7202 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 7203 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 7204 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 7205 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 7206 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 7207 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 7208 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 7209 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 7210 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 7211 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 7212 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 7213 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 7214 | REBOOT_TRIGGERED = 26; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 7215 | } |
| 7216 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 7217 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7218 | |
| 7219 | /** |
| 7220 | * Logs the gesture stage changed event. |
| 7221 | * |
| 7222 | * Logged from: |
| 7223 | * frameworks/base/packages/SystemUI/ |
| 7224 | */ |
| 7225 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 7226 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7227 | } |
| 7228 | |
| 7229 | /** |
| 7230 | * Logs the feedback type. |
| 7231 | * |
| 7232 | * Logged from: |
| 7233 | * frameworks/base/packages/SystemUI/ |
| 7234 | */ |
| 7235 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 7236 | // Whether or not the gesture was used. |
| 7237 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7238 | } |
| 7239 | |
| 7240 | /** |
| 7241 | * Logs the progress. |
| 7242 | * |
| 7243 | * Logged from: |
| 7244 | * frameworks/base/packages/SystemUI/ |
| 7245 | */ |
| 7246 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 7247 | // [0,100] progress for the assist gesture. |
| 7248 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 7249 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 7250 | |
| 7251 | /* |
| 7252 | * Information about the time zone data on a device. |
| 7253 | */ |
| 7254 | message TimeZoneDataInfo { |
| 7255 | // A version identifier for the data set on device. e.g. "2018i" |
| 7256 | optional string tzdb_version = 1; |
| 7257 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7258 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7259 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7260 | * Logs the GPU stats global health information. |
| 7261 | * |
| 7262 | * Logged from: |
| 7263 | * frameworks/native/services/gpuservice/gpustats/ |
| 7264 | */ |
| 7265 | message GpuStatsGlobalInfo { |
| 7266 | // Package name of the gpu driver. |
| 7267 | optional string driver_package_name = 1; |
| 7268 | |
| 7269 | // Version name of the gpu driver. |
| 7270 | optional string driver_version_name = 2; |
| 7271 | |
| 7272 | // Version code of the gpu driver. |
| 7273 | optional int64 driver_version_code = 3; |
| 7274 | |
| 7275 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 7276 | optional int64 driver_build_time = 4; |
| 7277 | |
| 7278 | // Total count of the gl driver gets loaded. |
| 7279 | optional int64 gl_loading_count = 5; |
| 7280 | |
| 7281 | // Total count of the gl driver fails to be loaded. |
| 7282 | optional int64 gl_loading_failure_count = 6; |
| 7283 | |
| 7284 | // Total count of the Vulkan driver gets loaded. |
| 7285 | optional int64 vk_loading_count = 7; |
| 7286 | |
| 7287 | // Total count of the Vulkan driver fails to be loaded. |
| 7288 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 7289 | |
| 7290 | // Api version of the system Vulkan driver. |
| 7291 | optional int32 vulkan_version = 9; |
| 7292 | |
| 7293 | // Api version of the system CPU Vulkan driver. |
| 7294 | optional int32 cpu_vulkan_version = 10; |
| 7295 | |
| 7296 | // Api version of the system GLES driver. |
| 7297 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7298 | |
| 7299 | // Total count of the angle driver gets loaded. |
| 7300 | optional int64 angle_loading_count = 12; |
| 7301 | |
| 7302 | // Total count of the angle driver fails to be loaded. |
| 7303 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7304 | } |
| 7305 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7306 | /** |
| 7307 | * GPU driver loading time info. |
| 7308 | */ |
| 7309 | message GpuDriverLoadingTime { |
| 7310 | // List of all the driver loading times for this app. The list size is |
| 7311 | // capped at 50. |
| 7312 | repeated int64 driver_loading_time = 1; |
| 7313 | } |
| 7314 | |
| 7315 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7316 | * Logs the GPU stats per app health information. |
| 7317 | * |
| 7318 | * Logged from: |
| 7319 | * frameworks/native/services/gpuservice/gpustats/ |
| 7320 | */ |
| 7321 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7322 | // Package name of the application that loads the gpu driver. Total number |
| 7323 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7324 | optional string app_package_name = 1; |
| 7325 | |
| 7326 | // Version code of the gpu driver this app loads. |
| 7327 | optional int64 driver_version_code = 2; |
| 7328 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7329 | // gl driver loading time info. |
| 7330 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 7331 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7332 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7333 | // Vulkan driver loading time info. |
| 7334 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 7335 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7336 | |
| 7337 | // Angle driver loading time info. |
| 7338 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 7339 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 7340 | |
| 7341 | // CPU Vulkan implementation is in use. |
| 7342 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 7343 | |
| 7344 | // App is not doing pre-rotation correctly. |
| 7345 | optional bool false_prerotation = 7; |
Yiwei Zhang | f02cf6b | 2019-12-20 14:51:07 -0800 | [diff] [blame] | 7346 | |
| 7347 | // App creates GLESv1 context. |
| 7348 | optional bool gles_1_in_use = 8; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7349 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7350 | |
| 7351 | /* |
| 7352 | * Logs the size of the system ion heap. |
| 7353 | * |
| 7354 | * Pulled from StatsCompanionService. |
| 7355 | */ |
| 7356 | message SystemIonHeapSize { |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7357 | // Deprecated due to limited support of ion stats in debugfs. |
| 7358 | // Use `IonHeapSize` instead. |
| 7359 | option deprecated = true; |
| 7360 | |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7361 | // Size of the system ion heap in bytes. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7362 | // Read from debugfs. |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7363 | optional int64 size_in_bytes = 1; |
| 7364 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7365 | |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7366 | /* |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7367 | * Logs the total size of the ion heap. |
| 7368 | * |
| 7369 | * Pulled from StatsCompanionService. |
| 7370 | */ |
| 7371 | message IonHeapSize { |
| 7372 | // Total size of all ion heaps in kilobytes. |
| 7373 | // Read from: /sys/kernel/ion/total_heaps_kb. |
| 7374 | optional int32 total_size_kb = 1; |
| 7375 | } |
| 7376 | |
| 7377 | /* |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7378 | * Logs the per-process size of the system ion heap. |
| 7379 | * |
| 7380 | * Pulled from StatsCompanionService. |
| 7381 | */ |
| 7382 | message ProcessSystemIonHeapSize { |
| 7383 | // The uid if available. -1 means not available. |
| 7384 | optional int32 uid = 1 [(is_uid) = true]; |
| 7385 | |
| 7386 | // The process name (from /proc/PID/cmdline). |
| 7387 | optional string process_name = 2; |
| 7388 | |
| 7389 | // Sum of sizes of all allocations. |
| 7390 | optional int32 total_size_in_kilobytes = 3; |
| 7391 | |
| 7392 | // Number of allocations. |
| 7393 | optional int32 allocation_count = 4; |
| 7394 | |
| 7395 | // Size of the largest allocation. |
| 7396 | optional int32 max_size_in_kilobytes = 5; |
| 7397 | } |
| 7398 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7399 | /** |
| 7400 | * Push network stack events. |
| 7401 | * |
| 7402 | * Log from: |
| 7403 | * frameworks/base/packages/NetworkStack/ |
| 7404 | */ |
| 7405 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 7406 | // The id that indicates the event reported from NetworkStack. |
| 7407 | optional int32 event_id = 1; |
| 7408 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7409 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 7410 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 7411 | |
| 7412 | /** |
| 7413 | * Logs the apps that are installed on the external storage. |
| 7414 | * Pulled from: |
| 7415 | * StatsCompanionService |
| 7416 | */ |
| 7417 | message AppsOnExternalStorageInfo { |
| 7418 | // The type of the external storage. |
| 7419 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 7420 | // The name of the package that is installed on the external storage. |
| 7421 | optional string package_name = 2; |
| 7422 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 7423 | |
| 7424 | /** |
| 7425 | * Logs the settings related to Face. |
| 7426 | * Logged from: |
| 7427 | * frameworks/base/services/core/java/com/android/server/stats |
| 7428 | */ |
| 7429 | message FaceSettings { |
| 7430 | // Whether or not face unlock is allowed on Keyguard. |
| 7431 | optional bool unlock_keyguard_enabled = 1; |
| 7432 | // Whether or not face unlock dismisses the Keyguard. |
| 7433 | optional bool unlock_dismisses_keyguard = 2; |
| 7434 | // Whether or not face unlock requires attention. |
| 7435 | optional bool unlock_attention_required = 3; |
| 7436 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 7437 | optional bool unlock_app_enabled = 4; |
| 7438 | // Whether or not face unlock always requires user confirmation. |
| 7439 | optional bool unlock_always_require_confirmation = 5; |
| 7440 | // Whether or not a diverse set of poses are required during enrollment. |
| 7441 | optional bool unlock_diversity_required = 6; |
| 7442 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 7443 | |
| 7444 | /** |
| 7445 | * Logs cooling devices maintained by the kernel. |
| 7446 | * |
| 7447 | * Pulled from StatsCompanionService.java |
| 7448 | */ |
| 7449 | message CoolingDevice { |
| 7450 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 7451 | optional android.os.CoolingTypeEnum device_location = 1; |
| 7452 | // The name of the cooling device source. Eg. CPU0 |
| 7453 | optional string device_name = 2; |
| 7454 | // Current throttle state of the cooling device. The value can any unsigned |
| 7455 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 7456 | // not in throttling, higher value means deeper throttling. |
| 7457 | optional int32 state = 3; |
| 7458 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7459 | |
| 7460 | /** |
| 7461 | * Intelligence has several counter-type events that don't warrant a |
| 7462 | * full separate atom. These are primarily API call counters but also include |
| 7463 | * counters for feature usage and specific failure modes. |
| 7464 | * |
| 7465 | * Logged from the Intelligence mainline module. |
| 7466 | */ |
| 7467 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7468 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7469 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7470 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7471 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7472 | // How many times the event occured (to report a batch of high frequency events). |
| 7473 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 7474 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7475 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7476 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 7477 | |
| 7478 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 7479 | * Logs when Car Power state changed. |
| 7480 | * |
| 7481 | * Logged from: |
| 7482 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7483 | */ |
| 7484 | message CarPowerStateChanged { |
| 7485 | // States come from CpmsState in CarPowerManagementService.java. |
| 7486 | enum State { |
| 7487 | WAIT_FOR_VHAL = 0; |
| 7488 | ON = 1; |
| 7489 | SHUTDOWN_PREPARE = 2; |
| 7490 | WAIT_FOR_FINISH = 3; |
| 7491 | SUSPEND = 4; |
| 7492 | SIMULATE_SLEEP = 5; |
| 7493 | } |
| 7494 | optional State state = 1; |
| 7495 | } |
| 7496 | |
| 7497 | /** |
| 7498 | * Logs whether GarageMode is entered. |
| 7499 | * |
| 7500 | * Logged from: |
| 7501 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7502 | */ |
| 7503 | message GarageModeInfo { |
| 7504 | // Whether GarageMode is entered. |
| 7505 | optional bool is_garage_mode = 1; |
| 7506 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7507 | |
| 7508 | /** |
| 7509 | * Historical app ops data per package. |
| 7510 | */ |
| 7511 | message AppOps { |
| 7512 | // Uid of the package requesting the op |
| 7513 | optional int32 uid = 1 [(is_uid) = true]; |
| 7514 | |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 7515 | // Name of the package performing the op |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7516 | optional string package_name = 2; |
| 7517 | |
| 7518 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 7519 | optional int32 op_id = 3; |
| 7520 | |
| 7521 | // The number of times the op was granted while the app was in the |
| 7522 | // foreground (only for trusted requests) |
| 7523 | optional int64 trusted_foreground_granted_count = 4; |
| 7524 | |
| 7525 | // The number of times the op was granted while the app was in the |
| 7526 | // background (only for trusted requests) |
| 7527 | optional int64 trusted_background_granted_count = 5; |
| 7528 | |
| 7529 | // The number of times the op was rejected while the app was in the |
| 7530 | // foreground (only for trusted requests) |
| 7531 | optional int64 trusted_foreground_rejected_count = 6; |
| 7532 | |
| 7533 | // The number of times the op was rejected while the app was in the |
| 7534 | // background (only for trusted requests) |
| 7535 | optional int64 trusted_background_rejected_count = 7; |
| 7536 | |
| 7537 | // For long-running operations, total duration of the operation |
| 7538 | // while the app was in the foreground (only for trusted requests) |
| 7539 | optional int64 trusted_foreground_duration_millis = 8; |
| 7540 | |
| 7541 | // For long-running operations, total duration of the operation |
| 7542 | // while the app was in the background (only for trusted requests) |
| 7543 | optional int64 trusted_background_duration_millis = 9; |
Stanislav Zholnin | 42d710e | 2019-11-28 13:11:54 +0000 | [diff] [blame] | 7544 | |
| 7545 | // Whether AppOps is guarded by Runtime permission |
| 7546 | optional bool is_runtime_permission = 10; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7547 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 7548 | |
| 7549 | /** |
| 7550 | * Location Manager API Usage information(e.g. API under usage, |
| 7551 | * API call's parameters). |
| 7552 | * Logged from: |
| 7553 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 7554 | */ |
| 7555 | message LocationManagerApiUsageReported { |
| 7556 | |
| 7557 | // Indicating if usage starts or usage ends. |
| 7558 | optional android.stats.location.UsageState state = 1; |
| 7559 | |
| 7560 | // LocationManagerService's API in use. |
| 7561 | // We can identify which API from LocationManager is |
| 7562 | // invoking current LMS API by the combination of |
| 7563 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 7564 | // is_location_request_null) |
| 7565 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 7566 | |
| 7567 | // Name of the package calling the API. |
| 7568 | optional string calling_package_name = 3; |
| 7569 | |
| 7570 | // Type of the location provider. |
| 7571 | optional android.stats.location.ProviderType provider = 4; |
| 7572 | |
| 7573 | // Quality of the location request |
| 7574 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 7575 | |
| 7576 | // The desired interval for active location updates, in milliseconds. |
| 7577 | // Bucketized to reduce cardinality. |
| 7578 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 7579 | |
| 7580 | // Minimum distance between location updates, in meters. |
| 7581 | // Bucketized to reduce cardinality. |
| 7582 | optional android.stats.location.SmallestDisplacementBucket |
| 7583 | bucketized_smallest_displacement = 7; |
| 7584 | |
| 7585 | // The number of location updates. |
| 7586 | optional int64 num_updates = 8; |
| 7587 | |
| 7588 | // The request expiration time, in millisecond since boot. |
| 7589 | // Bucketized to reduce cardinality. |
| 7590 | optional android.stats.location.ExpirationBucket |
| 7591 | bucketized_expire_in = 9; |
| 7592 | |
| 7593 | // Type of Callback passed in for this API. |
| 7594 | optional android.stats.location.CallbackType callback_type = 10; |
| 7595 | |
| 7596 | // The radius of the central point of the alert |
| 7597 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 7598 | // Bucketized to reduce cardinality. |
| 7599 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 7600 | |
| 7601 | // Activity Importance of API caller. |
| 7602 | // Categorized to 3 types that are interesting from location's perspective. |
| 7603 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 7604 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 7605 | |
| 7606 | /** |
| 7607 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 7608 | */ |
| 7609 | message ReviewPermissionsFragmentResultReported { |
| 7610 | // unique value identifying a permission group change. A permission group change might result |
| 7611 | // in multiple of these atoms |
| 7612 | optional int64 change_id = 1; |
| 7613 | |
| 7614 | // UID of package the permission belongs to |
| 7615 | optional int32 uid = 2 [(is_uid) = true]; |
| 7616 | |
| 7617 | // Name of package the permission belongs to |
| 7618 | optional string package_name = 3; |
| 7619 | |
| 7620 | // The permission to be granted |
| 7621 | optional string permission_name = 4; |
| 7622 | |
| 7623 | // The result of the permission grant |
| 7624 | optional bool permission_granted = 5; |
| 7625 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 7626 | |
| 7627 | /** |
| 7628 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 7629 | * Logged from: RuntimePermissionUpdgradeController |
| 7630 | */ |
| 7631 | message RuntimePermissionsUpgradeResult { |
| 7632 | // Permission granted as result of upgrade |
| 7633 | optional string permission_name = 1; |
| 7634 | |
| 7635 | // UID of package granted permission |
| 7636 | optional int32 uid = 2 [(is_uid) = true]; |
| 7637 | |
| 7638 | // Name of package granted permission |
| 7639 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 7640 | } |
| 7641 | |
| 7642 | /** |
| 7643 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 7644 | */ |
| 7645 | message GrantPermissionsActivityButtonActions { |
| 7646 | // Permission granted as result of upgrade |
| 7647 | optional string permission_group_name = 1; |
| 7648 | |
| 7649 | // UID of package granted permission |
| 7650 | optional int32 uid = 2 [(is_uid) = true]; |
| 7651 | |
| 7652 | // Name of package requesting permission |
| 7653 | optional string package_name = 3; |
| 7654 | |
| 7655 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 7656 | // LABEL_ constants in GrantPermissionActivity.java |
| 7657 | optional int32 buttons_presented = 4; |
| 7658 | |
| 7659 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 7660 | optional int32 button_clicked = 5; |
Evan Severson | 5dfc091 | 2020-02-06 14:50:23 -0800 | [diff] [blame] | 7661 | |
| 7662 | // id which identifies single session of user interacting with permission controller |
| 7663 | optional int64 session_id = 6; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 7664 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 7665 | |
| 7666 | /** |
| 7667 | * Information about LocationAccessCheck notification presented to user |
| 7668 | */ |
| 7669 | message LocationAccessCheckNotificationAction { |
| 7670 | |
| 7671 | // id which identifies single session of user interacting with permission controller |
| 7672 | optional int64 session_id = 1; |
| 7673 | |
| 7674 | // Uid of package for which location access check is presented |
| 7675 | optional int32 package_uid = 2; |
| 7676 | |
| 7677 | // Name of package for which location access check is presented |
| 7678 | optional string package_name = 3; |
| 7679 | |
| 7680 | enum Result { |
| 7681 | UNDEFINED = 0; |
| 7682 | // notification was presented to the user |
| 7683 | NOTIFICATION_PRESENTED = 1; |
| 7684 | // notification was declined by the user |
| 7685 | NOTIFICATION_DECLINED = 2; |
| 7686 | // notification was clicked by the user |
| 7687 | NOTIFICATION_CLICKED = 3; |
| 7688 | } |
| 7689 | |
| 7690 | // View / interaction recorded |
| 7691 | optional Result result = 4; |
| 7692 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 7693 | |
| 7694 | /** |
| 7695 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 7696 | */ |
| 7697 | message AppPermissionFragmentActionReported { |
| 7698 | // id which identifies single session of user interacting with permission controller |
| 7699 | optional int64 session_id = 1; |
| 7700 | |
| 7701 | // unique value identifying a permission group change. A permission group change might result |
| 7702 | // in multiple of these atoms |
| 7703 | optional int64 change_id = 2; |
| 7704 | |
| 7705 | // UID of package the permission belongs to |
| 7706 | optional int32 uid = 3 [(is_uid) = true]; |
| 7707 | |
| 7708 | // Name of package the permission belongs to |
| 7709 | optional string package_name = 4; |
| 7710 | |
| 7711 | // The permission to be granted |
| 7712 | optional string permission_name = 5; |
| 7713 | |
| 7714 | // The result of the permission grant |
| 7715 | optional bool permission_granted = 6; |
Stanislav Zholnin | 126da0c | 2020-01-28 16:50:43 +0000 | [diff] [blame] | 7716 | |
| 7717 | // State of Permission Flags after grant as per android.content.pm.PermissionFlags |
| 7718 | optional int32 permission_flags = 7; |
| 7719 | |
| 7720 | enum Button { |
| 7721 | UNDEFINED = 0; |
| 7722 | // Allow button |
| 7723 | ALLOW = 1; |
| 7724 | // Deny button |
| 7725 | DENY = 2; |
| 7726 | // Ask every time button |
| 7727 | ASK_EVERY_TIME = 3; |
| 7728 | // Allow all the time button |
| 7729 | ALLOW_ALWAYS = 4; |
| 7730 | // Allow only while using the app button |
| 7731 | ALLOW_FOREGROUND = 5; |
| 7732 | // Same is Deny button but shown in while in use dialog |
| 7733 | DENY_FOREGROUND = 6; |
| 7734 | } |
| 7735 | |
| 7736 | // Button pressed in the dialog |
| 7737 | optional Button button_pressed = 8; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 7738 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 7739 | |
| 7740 | /** |
| 7741 | * Information about a AppPermissionFragment viewed by user |
| 7742 | */ |
| 7743 | message AppPermissionFragmentViewed { |
| 7744 | // id which identifies single session of user interacting with permission controller |
| 7745 | optional int64 session_id = 1; |
| 7746 | |
| 7747 | // UID of package for which permissions are viewed |
| 7748 | optional int32 uid = 2 [(is_uid) = true]; |
| 7749 | |
| 7750 | // Name of package for which permissions are viewed |
| 7751 | optional string package_name = 3; |
| 7752 | |
| 7753 | // Permission group viewed |
| 7754 | optional string permission_group_name = 4; |
| 7755 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 7756 | |
| 7757 | /** |
| 7758 | * Information about a AppPermissionsFragment viewed by user |
| 7759 | */ |
| 7760 | message AppPermissionsFragmentViewed { |
| 7761 | // id which identifies single session of user interacting with permission controller |
| 7762 | optional int64 session_id = 1; |
| 7763 | |
| 7764 | // id which identifies single view as every view might have several logging records |
| 7765 | // with different package information attached |
| 7766 | optional int64 view_id = 2; |
| 7767 | |
| 7768 | // Permission group viewed |
| 7769 | optional string permission_group_name = 3; |
| 7770 | |
| 7771 | // UID of package for which permissions are viewed |
| 7772 | optional int32 uid = 4 [(is_uid) = true]; |
| 7773 | |
| 7774 | // Name of package for which permissions are viewed |
| 7775 | optional string package_name = 5; |
| 7776 | |
| 7777 | // Category in which permission is included |
| 7778 | enum Category { |
| 7779 | UNDEFINED = 0; |
| 7780 | ALLOWED = 1; |
| 7781 | ALLOWED_FOREGROUND = 2; |
| 7782 | DENIED = 3; |
| 7783 | } |
| 7784 | optional Category category = 6; |
| 7785 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 7786 | |
| 7787 | /** |
| 7788 | * Information about a PermissionAppsFragment viewed by user. |
| 7789 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 7790 | */ |
| 7791 | message PermissionAppsFragmentViewed { |
| 7792 | // id which identifies single session of user interacting with permission controller |
| 7793 | optional int64 session_id = 1; |
| 7794 | |
| 7795 | // id which identifies single view as every view might have several logging records |
| 7796 | // with different package information attached |
| 7797 | optional int64 view_id = 2; |
| 7798 | |
| 7799 | // Permission group viewed |
| 7800 | optional string permission_group_name = 3; |
| 7801 | |
| 7802 | // UID of package for which permissions are viewed |
| 7803 | optional int32 uid = 4 [(is_uid) = true]; |
| 7804 | |
| 7805 | // Name of package for which permissions are viewed |
| 7806 | optional string package_name = 5; |
| 7807 | |
| 7808 | // Category in which app is included |
| 7809 | enum Category { |
| 7810 | UNDEFINED = 0; |
| 7811 | ALLOWED = 1; |
| 7812 | ALLOWED_FOREGROUND = 2; |
| 7813 | DENIED = 3; |
| 7814 | } |
| 7815 | optional Category category = 6; |
| 7816 | } |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7817 | |
| 7818 | /** |
| 7819 | * Logs when there is a smart selection related event. |
| 7820 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7821 | * Logged from: TextClassifierEventLogger.java |
| 7822 | */ |
| 7823 | message TextSelectionEvent { |
| 7824 | // A session ID. |
| 7825 | optional string session_id = 1; |
| 7826 | |
| 7827 | // Event type of this event. |
| 7828 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7829 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7830 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7831 | optional string model_name = 3; |
| 7832 | |
| 7833 | // Type of widget that was involved in triggering this event. |
| 7834 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7835 | |
| 7836 | // Index of this event in a session. |
| 7837 | optional int32 event_index = 5; |
| 7838 | |
| 7839 | // Entity type that is involved. |
| 7840 | optional string entity_type = 6; |
| 7841 | |
| 7842 | // Relative word index of the start of the selection. |
| 7843 | optional int32 relative_word_start_index = 7; |
| 7844 | |
| 7845 | // Relative word (exclusive) index of the end of the selection. |
| 7846 | optional int32 relative_word_end_index = 8; |
| 7847 | |
| 7848 | // Relative word index of the start of the smart selection. |
| 7849 | optional int32 relative_suggested_word_start_index = 9; |
| 7850 | |
| 7851 | // Relative word (exclusive) index of the end of the smart selection. |
| 7852 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7853 | |
| 7854 | // Name of source package. |
| 7855 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7856 | } |
| 7857 | |
| 7858 | /** |
| 7859 | * Logs when there is a smart linkify related event. |
| 7860 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7861 | * Logged from: TextClassifierEventLogger.java |
| 7862 | */ |
| 7863 | message TextLinkifyEvent { |
| 7864 | // A session ID. |
| 7865 | optional string session_id = 1; |
| 7866 | |
| 7867 | // Event type of this event. |
| 7868 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7869 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7870 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7871 | optional string model_name = 3; |
| 7872 | |
| 7873 | // Type of widget that was involved in triggering this event. |
| 7874 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7875 | |
| 7876 | // Index of this event in a session. |
| 7877 | optional int32 event_index = 5; |
| 7878 | |
| 7879 | // Entity type that is involved. |
| 7880 | optional string entity_type = 6; |
| 7881 | |
| 7882 | // Number of links detected. |
| 7883 | optional int32 num_links = 7; |
| 7884 | |
| 7885 | // The total length of all links. |
| 7886 | optional int32 linked_text_length = 8; |
| 7887 | |
| 7888 | // Length of input text. |
| 7889 | optional int32 text_length = 9; |
| 7890 | |
| 7891 | // Time spent on generating links in ms. |
| 7892 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7893 | |
| 7894 | // Name of source package. |
| 7895 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7896 | } |
| 7897 | |
| 7898 | /** |
| 7899 | * Logs when there is a conversation actions related event. |
| 7900 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7901 | * Logged from: TextClassifierEventLogger.java |
| 7902 | */ |
| 7903 | message ConversationActionsEvent { |
| 7904 | // A session ID. |
| 7905 | optional string session_id = 1; |
| 7906 | |
| 7907 | // Event type of this event. |
| 7908 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7909 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7910 | // Name of the actions model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7911 | optional string model_name = 3; |
| 7912 | |
| 7913 | // Type of widget that was involved in triggering this event. |
| 7914 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7915 | |
| 7916 | // The first entity type that is involved. |
| 7917 | optional string first_entity_type = 5; |
| 7918 | |
| 7919 | // The second entity type that is involved. |
| 7920 | optional string second_entity_type = 6; |
| 7921 | |
| 7922 | // The third entity type that is involved. |
| 7923 | optional string third_entity_type = 7; |
| 7924 | |
| 7925 | // The score of the first entity type. |
| 7926 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7927 | |
| 7928 | // Name of source package. |
| 7929 | optional string package_name = 9; |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7930 | |
| 7931 | // Name of the annotator model that is involved in this event. |
| 7932 | optional string annotator_model_name = 10; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7933 | } |
| 7934 | |
| 7935 | /** |
| 7936 | * Logs when there is a language detection related event. |
| 7937 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7938 | * Logged from: TextClassifierEventLogger.java |
| 7939 | */ |
| 7940 | message LanguageDetectionEvent { |
| 7941 | // A session ID. |
| 7942 | optional string session_id = 1; |
| 7943 | |
| 7944 | // Event type of this event. |
| 7945 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7946 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7947 | // Name of the language detection model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7948 | optional string model_name = 3; |
| 7949 | |
| 7950 | // Type of widget that was involved in triggering this event. |
| 7951 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7952 | |
| 7953 | // Detected language. |
| 7954 | optional string language_tag = 5; |
| 7955 | |
| 7956 | // Score of the detected language. |
| 7957 | optional float score = 6; |
| 7958 | |
| 7959 | // Position of this action. |
| 7960 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7961 | |
| 7962 | // Name of source package. |
| 7963 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7964 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 7965 | |
| 7966 | /** |
| 7967 | * Information about an OTA update attempt by update_engine. |
| 7968 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7969 | */ |
| 7970 | message UpdateEngineUpdateAttemptReported { |
| 7971 | // The number of attempts for the update engine to apply a given payload. |
| 7972 | optional int32 attempt_number = 1; |
| 7973 | |
| 7974 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7975 | |
| 7976 | // The total time in minutes for the update engine to apply a given payload. |
| 7977 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 7978 | // it's increased when the system is sleeping. |
| 7979 | optional int32 duration_boottime_in_minutes = 3; |
| 7980 | |
| 7981 | // The total time in minutes for the update engine to apply a given payload. |
| 7982 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 7983 | // and it's not increased when the system is sleeping. |
| 7984 | optional int32 duration_monotonic_in_minutes = 4; |
| 7985 | |
| 7986 | // The size of the payload in MiBs. |
| 7987 | optional int32 payload_size_mib = 5; |
| 7988 | |
| 7989 | // The attempt result reported by the update engine for an OTA update. |
| 7990 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 7991 | |
| 7992 | // The error code reported by the update engine after an OTA update attempt |
| 7993 | // on A/B devices. |
| 7994 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 7995 | |
| 7996 | // The build fingerprint of the source system. The value is read from a |
| 7997 | // system property when the device takes the update. e.g. |
| 7998 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 7999 | optional string source_fingerprint = 8; |
| 8000 | } |
| 8001 | |
| 8002 | /** |
| 8003 | * Information about all the attempts the device make before finishing the |
| 8004 | * successful update. |
| 8005 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 8006 | */ |
| 8007 | message UpdateEngineSuccessfulUpdateReported { |
| 8008 | // The number of attempts for the update engine to apply the payload for a |
| 8009 | // successful update. |
| 8010 | optional int32 attempt_count = 1; |
| 8011 | |
| 8012 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 8013 | |
| 8014 | optional int32 payload_size_mib = 3; |
| 8015 | |
| 8016 | // The total number of bytes downloaded by update_engine since the last |
| 8017 | // successful update. |
| 8018 | optional int32 total_bytes_downloaded_mib = 4; |
| 8019 | |
| 8020 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 8021 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 8022 | // download 200MiB in total for a 100MiB package. |
| 8023 | optional int32 download_overhead_percentage = 5; |
| 8024 | |
| 8025 | // The total time in minutes for the update engine to apply the payload for a |
| 8026 | // successful update. |
| 8027 | optional int32 total_duration_minutes = 6; |
| 8028 | |
| 8029 | // The number of reboot of the device during a successful update. |
| 8030 | optional int32 reboot_count = 7; |
| 8031 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8032 | |
| 8033 | /** |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 8034 | * Reported when the RebootEscrow HAL has attempted to recover the escrowed |
| 8035 | * key to indicate whether it was successful or not. |
| 8036 | * |
| 8037 | * Logged from: |
| 8038 | * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java |
| 8039 | */ |
| 8040 | message RebootEscrowRecoveryReported { |
| 8041 | optional bool successful = 1; |
| 8042 | } |
| 8043 | |
| 8044 | /** |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8045 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 8046 | * Pulled from: |
| 8047 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 8048 | */ |
| 8049 | message SurfaceflingerStatsGlobalInfo { |
| 8050 | // Total number of frames presented during the tracing period |
| 8051 | optional int64 total_frames = 1; |
| 8052 | // Total number of frames missed |
| 8053 | optional int64 missed_frames = 2; |
| 8054 | // Total number of frames that fell back to client composition |
| 8055 | optional int64 client_composition_frames = 3; |
| 8056 | // Total time the display was turned on |
| 8057 | optional int64 display_on_millis = 4; |
| 8058 | // Total time that was spent performing animations. |
| 8059 | // This is derived from the present-to-present layer histogram |
| 8060 | optional int64 animation_millis = 5; |
Alec Mouri | a262245 | 2020-02-10 17:46:50 -0800 | [diff] [blame] | 8061 | // Total number of event connections tracked by SurfaceFlinger at the time |
| 8062 | // of this pull. If this number grows prohibitively large, then this can |
| 8063 | // cause jank due to resource contention. |
| 8064 | optional int32 event_connection_count = 6; |
Alec Mouri | bb55b7f | 2020-02-12 17:35:01 -0800 | [diff] [blame] | 8065 | // Set of timings measured from when SurfaceFlinger began compositing a |
| 8066 | // frame, until the frame was requested to be presented to the display. This |
| 8067 | // measures SurfaceFlinger's total CPU walltime on the critical path per |
| 8068 | // frame. |
| 8069 | optional FrameTimingHistogram frame_duration = 7 |
| 8070 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8071 | // Set of timings measured from when SurfaceFlinger first began using the |
| 8072 | // GPU to composite a frame, until the GPU has finished compositing that |
| 8073 | // frame. This measures the total additional time SurfaceFlinger needed to |
| 8074 | // perform due to falling back into GPU composition. |
| 8075 | optional FrameTimingHistogram render_engine_timing = 8 |
| 8076 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8077 | } |
| 8078 | |
| 8079 | /** |
| 8080 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 8081 | * The number of layers uploaded will be restricted due to size limitations. |
| 8082 | * Pulled from: |
| 8083 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 8084 | */ |
| 8085 | message SurfaceflingerStatsLayerInfo { |
| 8086 | // The layer for this set of metrics |
| 8087 | // For now we can infer that the package name is included in the layer |
| 8088 | // name. |
| 8089 | optional string layer_name = 1; |
| 8090 | // Total number of frames presented |
| 8091 | optional int64 total_frames = 2; |
| 8092 | // Total number of dropped frames while latching a buffer for this layer. |
| 8093 | optional int64 dropped_frames = 3; |
| 8094 | // Set of timings measured between successive presentation timestamps. |
| 8095 | optional FrameTimingHistogram present_to_present = 4 |
| 8096 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8097 | // Set of timings measured from when an app queued a buffer for |
| 8098 | // presentation, until the buffer was actually presented to the |
| 8099 | // display. |
| 8100 | optional FrameTimingHistogram post_to_present = 5 |
| 8101 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8102 | // Set of timings measured from when a buffer is ready to be presented, |
| 8103 | // until the buffer was actually presented to the display. |
| 8104 | optional FrameTimingHistogram acquire_to_present = 6 |
| 8105 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8106 | // Set of timings measured from when a buffer was latched by |
| 8107 | // SurfaceFlinger, until the buffer was presented to the display |
| 8108 | optional FrameTimingHistogram latch_to_present = 7 |
| 8109 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8110 | // Set of timings measured from the desired presentation to the actual |
| 8111 | // presentation time |
| 8112 | optional FrameTimingHistogram desired_to_present = 8 |
| 8113 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8114 | // Set of timings measured from when an app queued a buffer for |
| 8115 | // presentation, until the buffer was ready to be presented. |
| 8116 | optional FrameTimingHistogram post_to_acquire = 9 |
| 8117 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 59cdc901 | 2020-02-10 10:58:39 -0800 | [diff] [blame] | 8118 | // Frames missed latch because the acquire fence didn't fire |
| 8119 | optional int64 late_acquire_frames = 10; |
| 8120 | // Frames latched early because the desired present time was bad |
| 8121 | optional int64 bad_desired_present_frames = 11; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 8122 | } |
| 8123 | |
| 8124 | /** |
| 8125 | * Histogram of frame counts bucketed by time in milliseconds. |
| 8126 | * Because of size limitations, we hard-cap the number of buckets, with |
| 8127 | * buckets for corresponding to larger milliseconds being less precise. |
| 8128 | */ |
| 8129 | message FrameTimingHistogram { |
| 8130 | // Timings in milliseconds that describes a set of histogram buckets |
| 8131 | repeated int32 time_millis_buckets = 1; |
| 8132 | // Number of frames that match to each time_millis, i.e. the bucket |
| 8133 | // contents |
| 8134 | // It's required that len(time_millis) == len(frame_count) |
| 8135 | repeated int64 frame_counts = 2; |
| 8136 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 8137 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 8138 | /** |
| 8139 | * Information about camera facing and API level usage. |
| 8140 | * Logged from: |
| 8141 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 8142 | */ |
| 8143 | message CameraActionEvent { |
| 8144 | // Camera session duration |
| 8145 | optional int64 duration = 1; |
| 8146 | |
| 8147 | // Camera API level used |
| 8148 | optional int32 api_level = 2; |
| 8149 | |
| 8150 | // Name of client package |
| 8151 | optional string package_name = 3; |
| 8152 | |
| 8153 | // Camera facing |
| 8154 | enum Facing { |
| 8155 | UNKNOWN = 0; |
| 8156 | BACK = 1; |
| 8157 | FRONT = 2; |
| 8158 | EXTERNAL = 3; |
| 8159 | } |
| 8160 | optional Facing facing = 4; |
| 8161 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 8162 | |
| 8163 | /** |
| 8164 | * Logs when a compatibility change is affecting an app. |
| 8165 | * |
| 8166 | * Logged from: |
| 8167 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 8168 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 8169 | */ |
| 8170 | message AppCompatibilityChangeReported { |
| 8171 | // The UID of the app being affected by the compatibilty change. |
| 8172 | optional int32 uid = 1 [(is_uid) = true]; |
| 8173 | |
| 8174 | // The ID of the change affecting the app. |
| 8175 | optional int64 change_id = 2; |
| 8176 | |
| 8177 | enum State { |
| 8178 | UNKNOWN_STATE = 0; |
| 8179 | ENABLED = 1; |
| 8180 | DISABLED = 2; |
| 8181 | LOGGED = 3; |
| 8182 | } |
| 8183 | |
| 8184 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 8185 | // logged otherwise. |
| 8186 | optional State state = 3; |
| 8187 | |
| 8188 | enum Source { |
| 8189 | UNKNOWN_SOURCE = 0; |
| 8190 | APP_PROCESS = 1; |
| 8191 | SYSTEM_SERVER = 2; |
| 8192 | } |
| 8193 | |
| 8194 | // Where it was logged from. |
| 8195 | optional Source source = 4; |
| 8196 | |
| 8197 | } |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 8198 | |
| 8199 | /** |
| 8200 | * Logged from |
| 8201 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 8202 | */ |
| 8203 | message PerfettoUploaded { |
| 8204 | enum Event { |
| 8205 | PERFETTO_UNDEFINED = 0; |
| 8206 | PERFETTO_TRACE_BEGIN = 1; |
| 8207 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 8208 | PERFETTO_ON_CONNECT = 3; |
| 8209 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 8210 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 8211 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 8212 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 8213 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 8214 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 8215 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 8216 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 8217 | PERFETTO_TRIGGER_BEGIN = 12; |
| 8218 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 8219 | PERFETTO_TRIGGER_FAILURE = 14; |
| 8220 | PERFETTO_HIT_GUARDRAILS = 15; |
| 8221 | PERFETTO_ON_TIMEOUT = 16; |
| 8222 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 8223 | } |
| 8224 | |
| 8225 | // Which stage of the pipeline we are reporting from. |
| 8226 | optional Event event = 1; |
| 8227 | |
| 8228 | // UUID matching the one set inside the SystemInfo trace packet. |
| 8229 | optional int64 trace_uuid_lsb = 2; |
| 8230 | optional int64 trace_uuid_msb = 3; |
| 8231 | } |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 8232 | |
| 8233 | /** |
| 8234 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 8235 | * Metrics are keyed by uid + layer. |
| 8236 | * |
| 8237 | * Pulled from: |
| 8238 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 8239 | */ |
| 8240 | message VmsClientStats { |
| 8241 | // UID of the VMS client app |
| 8242 | optional int32 uid = 1 [(is_uid) = true]; |
| 8243 | |
| 8244 | // VMS layer definition |
| 8245 | optional int32 layer_type = 2; |
| 8246 | optional int32 layer_channel = 3; |
| 8247 | optional int32 layer_version = 4; |
| 8248 | |
| 8249 | // Bytes and packets sent by the client for the layer |
| 8250 | optional int64 tx_bytes = 5; |
| 8251 | optional int64 tx_packets = 6; |
| 8252 | |
| 8253 | // Bytes and packets received by the client for the layer |
| 8254 | optional int64 rx_bytes = 7; |
| 8255 | optional int64 rx_packets = 8; |
| 8256 | |
| 8257 | // Bytes and packets dropped due to client error |
| 8258 | optional int64 dropped_bytes = 9; |
| 8259 | optional int64 dropped_packets = 10; |
| 8260 | } |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 8261 | |
| 8262 | /** |
| 8263 | * State of a dangerous permission requested by a package - sampled |
| 8264 | * Pulled from: StatsCompanionService.java with data obtained from PackageManager API |
| 8265 | */ |
| 8266 | message DangerousPermissionStateSampled { |
| 8267 | // Name of the permission |
| 8268 | optional string permission_name = 1; |
| 8269 | |
| 8270 | // Uid of the package |
| 8271 | optional int32 uid = 2 [(is_uid) = true]; |
| 8272 | |
| 8273 | // If the permission is granted to the uid |
| 8274 | optional bool is_granted = 3; |
| 8275 | |
| 8276 | // Permission flags as per android.content.pm.PermissionFlags |
| 8277 | optional int32 permission_flags = 4; |
| 8278 | } |
| 8279 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8280 | /** |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8281 | * HWUI stats for a given app. |
| 8282 | */ |
| 8283 | message GraphicsStats { |
| 8284 | // The package name of the app |
| 8285 | optional string package_name = 1; |
| 8286 | |
| 8287 | // The version code of the app |
| 8288 | optional int64 version_code = 2; |
| 8289 | |
| 8290 | // The start & end timestamps in UTC as |
| 8291 | // milliseconds since January 1, 1970 |
| 8292 | // Compatible with java.util.Date#setTime() |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 8293 | optional int64 start_millis = 3; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8294 | |
Stan Iliev | b651719 | 2020-02-18 10:12:42 -0500 | [diff] [blame] | 8295 | optional int64 end_millis = 4; |
| 8296 | |
| 8297 | // HWUI renders pipeline type: GL (1) or Vulkan (2). |
| 8298 | enum PipelineType { |
| 8299 | UNKNOWN = 0; |
| 8300 | GL = 1; |
| 8301 | VULKAN = 2; |
| 8302 | } |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 8303 | |
| 8304 | // HWUI renders pipeline type: GL or Vulkan. |
| 8305 | optional PipelineType pipeline = 5; |
| 8306 | |
| 8307 | // Distinct frame count. |
| 8308 | optional int32 total_frames = 6; |
| 8309 | |
| 8310 | // Number of "missed vsync" events. |
| 8311 | optional int32 missed_vsync_count = 7; |
| 8312 | |
| 8313 | // Number of frames in triple-buffering scenario (high input latency) |
| 8314 | optional int32 high_input_latency_count = 8; |
| 8315 | |
| 8316 | // Number of "slow UI thread" events. |
| 8317 | optional int32 slow_ui_thread_count = 9; |
| 8318 | |
| 8319 | // Number of "slow bitmap upload" events. |
| 8320 | optional int32 slow_bitmap_upload_count = 10; |
| 8321 | |
| 8322 | // Number of "slow draw" events. |
| 8323 | optional int32 slow_draw_count = 11; |
| 8324 | |
| 8325 | // Number of frames that missed their deadline (aka, visibly janked) |
| 8326 | optional int32 missed_deadline_count = 12; |
| 8327 | |
| 8328 | // The frame time histogram for the package |
| 8329 | optional FrameTimingHistogram cpu_histogram = 13 |
| 8330 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8331 | |
| 8332 | // The gpu frame time histogram for the package |
| 8333 | optional FrameTimingHistogram gpu_histogram = 14 |
| 8334 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 8335 | |
| 8336 | // UI mainline module version. |
| 8337 | optional int64 version_ui_module = 15; |
| 8338 | |
| 8339 | // If true, these are HWUI stats for up to a 24h period for a given app from today. |
| 8340 | // If false, these are HWUI stats for a 24h period for a given app from the last complete |
| 8341 | // day (yesterday). Stats from yesterday stay constant, while stats from today may change as |
| 8342 | // more apps are running / rendering. |
| 8343 | optional bool is_today = 16; |
| 8344 | } |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8345 | |
| 8346 | /** |
| 8347 | * Message related to dangerous (runtime) app ops access |
| 8348 | */ |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 8349 | message RuntimeAppOpAccess { |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8350 | // Uid of the package accessing app op |
| 8351 | optional int32 uid = 1 [(is_uid) = true]; |
| 8352 | |
| 8353 | // Name of the package accessing app op |
| 8354 | optional string package_name = 2; |
| 8355 | |
Stanislav Zholnin | 88c6f32 | 2020-01-29 14:48:11 +0000 | [diff] [blame] | 8356 | // operation string id per OPSTR_ constants in AppOpsManager.java |
| 8357 | optional string op = 3; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8358 | |
| 8359 | // feature id; provided by developer when accessing related API, limited at 50 chars by API. |
| 8360 | // Features must be provided through manifest using <feature> tag available in R and above. |
| 8361 | optional string feature_id = 4; |
| 8362 | |
| 8363 | // message related to app op access, limited to 600 chars by API |
| 8364 | optional string message = 5; |
| 8365 | |
| 8366 | enum SamplingStrategy { |
| 8367 | DEFAULT = 0; |
| 8368 | UNIFORM = 1; |
| 8369 | RARELY_USED = 2; |
| 8370 | } |
| 8371 | |
| 8372 | // sampling strategy used to collect this message |
| 8373 | optional SamplingStrategy sampling_strategy = 6; |
| 8374 | } |
| 8375 | |
Nikita Ioffe | 41dd57e | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 8376 | /* |
| 8377 | * Logs userspace reboot outcome and duration. |
| 8378 | * |
| 8379 | * Logged from: |
| 8380 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 8381 | */ |
| 8382 | message UserspaceRebootReported { |
| 8383 | // Possible outcomes of userspace reboot. |
| 8384 | enum Outcome { |
| 8385 | // Default value in case platform failed to determine the outcome. |
| 8386 | OUTCOME_UNKNOWN = 0; |
| 8387 | // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot). |
| 8388 | SUCCESS = 1; |
| 8389 | // Userspace reboot shutdown sequence was aborted. |
| 8390 | FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2; |
| 8391 | // Remounting userdata into checkpointing mode failed. |
| 8392 | FAILED_USERDATA_REMOUNT = 3; |
| 8393 | // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard |
| 8394 | // reboot. |
| 8395 | FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4; |
| 8396 | } |
| 8397 | // Outcome of userspace reboot. Always set. |
| 8398 | optional Outcome outcome = 1; |
| 8399 | // Duration of userspace reboot in case it has a successful outcome. |
| 8400 | // Duration is measured as time between userspace reboot was initiated and until boot completed |
| 8401 | // (e.g. sys.boot_completed=1). |
| 8402 | optional int64 duration_millis = 2; |
| 8403 | // State of primary user's (user0) credential encryption storage. |
| 8404 | enum UserEncryptionState { |
| 8405 | // Default value. |
| 8406 | USER_ENCRYPTION_STATE_UNKNOWN = 0; |
| 8407 | // Credential encrypted storage is unlocked. |
| 8408 | UNLOCKED = 1; |
| 8409 | // Credential encrypted storage is locked. |
| 8410 | LOCKED = 2; |
| 8411 | } |
| 8412 | // State of primary user's encryption storage at the moment boot completed. Always set. |
| 8413 | optional UserEncryptionState user_encryption_state = 3; |
| 8414 | } |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 8415 | |
| 8416 | /* |
| 8417 | * Logs integrity check information during each install. |
| 8418 | * |
| 8419 | * Logged from: |
| 8420 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 8421 | */ |
| 8422 | message IntegrityCheckResultReported { |
| 8423 | optional string package_name = 1; |
| 8424 | optional string app_certificate_hash = 2; |
Omer Nebil Yaveroglu | 0ade854 | 2020-01-24 12:47:46 +0000 | [diff] [blame] | 8425 | optional int64 version_code = 3; |
Omer Nebil Yaveroglu | 06b969a | 2020-01-23 11:10:38 +0000 | [diff] [blame] | 8426 | optional string installer_package_name = 4; |
| 8427 | enum Response { |
| 8428 | UNKNOWN = 0; |
| 8429 | ALLOWED = 1; |
| 8430 | REJECTED = 2; |
| 8431 | FORCE_ALLOWED = 3; |
| 8432 | } |
| 8433 | optional Response response = 5; |
| 8434 | // An estimate on the cause of the response. This will only be populated for |
| 8435 | // REJECTED and FORCE_ALLOWED |
| 8436 | optional bool caused_by_app_cert_rule = 6; |
| 8437 | optional bool caused_by_installer_rule = 7; |
| 8438 | } |
| 8439 | |
| 8440 | /** |
| 8441 | * Logs the information about the rules and the provider whenever rules are |
| 8442 | * pushed into AppIntegrityManager. |
| 8443 | * |
| 8444 | * Logged from: |
| 8445 | * frameworks/base/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java |
| 8446 | */ |
| 8447 | message IntegrityRulesPushed { |
| 8448 | optional bool success = 1; |
| 8449 | // Package name of the app that pushed the rules. |
| 8450 | optional string rule_provider = 2; |
| 8451 | // Version string of arbitrary format provided by the rule provider to |
| 8452 | // identify the rules. |
| 8453 | optional string rule_version = 3; |
| 8454 | } |
Jordan Liu | bedfa70 | 2019-12-20 15:08:45 -0800 | [diff] [blame] | 8455 | |
| 8456 | /** |
| 8457 | * Logs when a cell broadcast message is received on the device. |
| 8458 | * |
| 8459 | * Logged from CellBroadcastService module: |
| 8460 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 8461 | */ |
| 8462 | message CellBroadcastMessageReported { |
| 8463 | // The type of Cell Broadcast message |
| 8464 | enum CbType { |
| 8465 | UNKNOWN_TYPE = 0; |
| 8466 | GSM = 1; |
| 8467 | CDMA = 2; |
| 8468 | CDMA_SPC = 3; |
| 8469 | } |
| 8470 | |
| 8471 | // GSM, CDMA, CDMA-SCP |
| 8472 | optional CbType type = 1; |
| 8473 | } |
| 8474 | |
| 8475 | /** |
| 8476 | * Logs when an error occurs while handling a cell broadcast message; |
| 8477 | * |
| 8478 | * Logged from CellBroadcastService module: |
| 8479 | * packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
| 8480 | */ |
| 8481 | message CellBroadcastMessageError { |
| 8482 | // The type of error raised when trying to handle a cell broadcast message |
| 8483 | enum ErrorType { |
| 8484 | UNKNOWN_TYPE = 0; |
| 8485 | CDMA_DECODING_ERROR = 1; |
| 8486 | CDMA_SCP_EMPTY = 2; |
| 8487 | CDMA_SCP_HANDLING_ERROR = 3; |
| 8488 | GSM_INVALID_HEADER_LENGTH = 4; |
| 8489 | GSM_UNSUPPORTED_HEADER_MESSAGE_TYPE = 5; |
| 8490 | GSM_UNSUPPORTED_HEADER_DATA_CODING_SCHEME = 6; |
| 8491 | GSM_INVALID_PDU = 7; |
| 8492 | GSM_INVALID_GEO_FENCING_DATA = 8; |
| 8493 | GSM_UMTS_INVALID_WAC = 9; |
| 8494 | FAILED_TO_INSERT_TO_DB = 10; |
| 8495 | UNEXPECTED_GEOMETRY_FROM_FWK = 11; |
| 8496 | UNEXPECTED_GSM_MESSAGE_TYPE_FROM_FWK = 12; |
| 8497 | UNEXPECTED_CDMA_MESSAGE_TYPE_FROM_FWK = 13; |
| 8498 | UNEXPECTED_CDMA_SCP_MESSAGE_TYPE_FROM_FWK = 14; |
| 8499 | } |
| 8500 | |
| 8501 | // What kind of error occurred |
| 8502 | optional ErrorType type = 1; |
| 8503 | |
| 8504 | // Exception message (or log message) associated with the error (max 1000 chars) |
| 8505 | optional string exception_message = 2; |
| 8506 | } |
Anton Hansson | 5a48e4b | 2020-02-06 14:50:35 +0000 | [diff] [blame] | 8507 | |
| 8508 | /** |
| 8509 | * Logs when the SDK Extensions test app has polled the current version. |
| 8510 | * This is atom ID 354. |
| 8511 | * |
| 8512 | * Logged from: |
| 8513 | * vendor/google_testing/integration/packages/apps/SdkExtensionsTestApp/ |
| 8514 | */ |
| 8515 | message SdkExtensionStatus { |
| 8516 | enum ApiCallStatus { |
| 8517 | CALL_NOT_ATTEMPTED = 0; |
| 8518 | CALL_SUCCESSFUL = 1; |
| 8519 | CALL_FAILED = 2; |
| 8520 | } |
| 8521 | |
| 8522 | optional ApiCallStatus result = 1; |
| 8523 | |
| 8524 | // The R extension version, i.e. android.os.ext.SdkExtension.getExtensionVersion(R). |
| 8525 | optional int32 r_extension_version = 2; |
| 8526 | |
| 8527 | // A number identifying which particular symbol's call failed, if any. 0 means no missing symbol. |
| 8528 | // "Failed" here can mean a symbol that wasn't meant to be visible was, or the other way around. |
| 8529 | optional int32 failed_call_symbol = 3; |
| 8530 | } |
Marco Ballesio | 497aff4 | 2020-01-24 08:39:42 -0800 | [diff] [blame] | 8531 | |
| 8532 | /** |
| 8533 | * Logs when an app is frozen or unfrozen. |
| 8534 | * |
| 8535 | * Logged from: |
| 8536 | * frameworks/base/services/core/java/com/android/server/am/CachedAppOptimizer.java |
| 8537 | */ |
| 8538 | message AppFreezeChanged { |
| 8539 | // The type of event. |
| 8540 | enum Action { |
| 8541 | UNKNOWN = 0; |
| 8542 | FREEZE_APP = 1; |
| 8543 | UNFREEZE_APP = 2; |
| 8544 | } |
| 8545 | optional Action action = 1; |
| 8546 | |
| 8547 | // Pid of the process being frozen. |
| 8548 | optional int32 pid = 2; |
| 8549 | |
| 8550 | // Name of the process being frozen. |
| 8551 | optional string process_name = 3; |
| 8552 | |
| 8553 | // Time since last unfrozen. |
| 8554 | optional int64 time_unfrozen_millis = 4; |
| 8555 | } |